Index: /trunk/sources/HeuristicLab.Algorithms.DataAnalysis/3.3/LinearRegression.cs
===================================================================
--- /trunk/sources/HeuristicLab.Algorithms.DataAnalysis/3.3/LinearRegression.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.Algorithms.DataAnalysis/3.3/LinearRegression.cs	(revision 4068)
@@ -21,20 +21,14 @@
 
 using System;
-using System.Collections.Generic;
-using System.Linq;
 using HeuristicLab.Common;
 using HeuristicLab.Core;
 using HeuristicLab.Data;
-using HeuristicLab.Operators;
 using HeuristicLab.Optimization;
 using HeuristicLab.Parameters;
 using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
-using HeuristicLab.PluginInfrastructure;
-using HeuristicLab.Random;
-using HeuristicLab.Analysis;
 using HeuristicLab.Problems.DataAnalysis;
+using HeuristicLab.Problems.DataAnalysis.Evaluators;
 using HeuristicLab.Problems.DataAnalysis.Regression.LinearRegression;
 using HeuristicLab.Problems.DataAnalysis.Regression.Symbolic;
-using HeuristicLab.Problems.DataAnalysis.Evaluators;
 using HeuristicLab.Problems.DataAnalysis.Regression.Symbolic.Analyzers;
 using HeuristicLab.Problems.DataAnalysis.Symbolic;
Index: /trunk/sources/HeuristicLab.Algorithms.DataAnalysis/3.3/SupportVectorMachine.cs
===================================================================
--- /trunk/sources/HeuristicLab.Algorithms.DataAnalysis/3.3/SupportVectorMachine.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.Algorithms.DataAnalysis/3.3/SupportVectorMachine.cs	(revision 4068)
@@ -21,24 +21,14 @@
 
 using System;
-using System.Collections.Generic;
-using System.Linq;
 using HeuristicLab.Common;
 using HeuristicLab.Core;
 using HeuristicLab.Data;
-using HeuristicLab.Operators;
 using HeuristicLab.Optimization;
 using HeuristicLab.Parameters;
 using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
-using HeuristicLab.PluginInfrastructure;
-using HeuristicLab.Random;
-using HeuristicLab.Analysis;
 using HeuristicLab.Problems.DataAnalysis;
-using HeuristicLab.Problems.DataAnalysis.Regression.LinearRegression;
-using HeuristicLab.Problems.DataAnalysis.Regression.Symbolic;
 using HeuristicLab.Problems.DataAnalysis.Evaluators;
-using HeuristicLab.Problems.DataAnalysis.Regression.Symbolic.Analyzers;
-using HeuristicLab.Problems.DataAnalysis.Symbolic;
+using HeuristicLab.Problems.DataAnalysis.Regression.SupportVectorRegression;
 using HeuristicLab.Problems.DataAnalysis.SupportVectorMachine;
-using HeuristicLab.Problems.DataAnalysis.Regression.SupportVectorRegression;
 
 namespace HeuristicLab.Algorithms.DataAnalysis {
Index: /trunk/sources/HeuristicLab.Algorithms.EvolutionStrategy/3.3/EvolutionStrategyMainLoop.cs
===================================================================
--- /trunk/sources/HeuristicLab.Algorithms.EvolutionStrategy/3.3/EvolutionStrategyMainLoop.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.Algorithms.EvolutionStrategy/3.3/EvolutionStrategyMainLoop.cs	(revision 4068)
@@ -20,6 +20,4 @@
 #endregion
 
-using HeuristicLab.Analysis;
-using HeuristicLab.Common;
 using HeuristicLab.Core;
 using HeuristicLab.Data;
Index: /trunk/sources/HeuristicLab.Algorithms.EvolutionStrategy/3.3/WithoutRepeatingBatchedRandomSelector.cs
===================================================================
--- /trunk/sources/HeuristicLab.Algorithms.EvolutionStrategy/3.3/WithoutRepeatingBatchedRandomSelector.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.Algorithms.EvolutionStrategy/3.3/WithoutRepeatingBatchedRandomSelector.cs	(revision 4068)
@@ -22,5 +22,4 @@
 using System;
 using System.Collections.Generic;
-using HeuristicLab.Common;
 using HeuristicLab.Core;
 using HeuristicLab.Data;
Index: /trunk/sources/HeuristicLab.Algorithms.GeneticAlgorithm/3.3/GeneticAlgorithm.cs
===================================================================
--- /trunk/sources/HeuristicLab.Algorithms.GeneticAlgorithm/3.3/GeneticAlgorithm.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.Algorithms.GeneticAlgorithm/3.3/GeneticAlgorithm.cs	(revision 4068)
@@ -21,10 +21,9 @@
 
 using System;
-using System.Collections.Generic;
 using System.Linq;
+using HeuristicLab.Analysis;
 using HeuristicLab.Common;
 using HeuristicLab.Core;
 using HeuristicLab.Data;
-using HeuristicLab.Operators;
 using HeuristicLab.Optimization;
 using HeuristicLab.Optimization.Operators;
@@ -33,5 +32,4 @@
 using HeuristicLab.PluginInfrastructure;
 using HeuristicLab.Random;
-using HeuristicLab.Analysis;
 
 namespace HeuristicLab.Algorithms.GeneticAlgorithm {
Index: /trunk/sources/HeuristicLab.Algorithms.GeneticAlgorithm/3.3/GeneticAlgorithmMainLoop.cs
===================================================================
--- /trunk/sources/HeuristicLab.Algorithms.GeneticAlgorithm/3.3/GeneticAlgorithmMainLoop.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.Algorithms.GeneticAlgorithm/3.3/GeneticAlgorithmMainLoop.cs	(revision 4068)
@@ -20,6 +20,4 @@
 #endregion
 
-using HeuristicLab.Analysis;
-using HeuristicLab.Common;
 using HeuristicLab.Core;
 using HeuristicLab.Data;
Index: /trunk/sources/HeuristicLab.Algorithms.GeneticAlgorithm/3.3/IslandGeneticAlgorithm.cs
===================================================================
--- /trunk/sources/HeuristicLab.Algorithms.GeneticAlgorithm/3.3/IslandGeneticAlgorithm.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.Algorithms.GeneticAlgorithm/3.3/IslandGeneticAlgorithm.cs	(revision 4068)
@@ -21,6 +21,6 @@
 
 using System;
-using System.Collections.Generic;
 using System.Linq;
+using HeuristicLab.Analysis;
 using HeuristicLab.Common;
 using HeuristicLab.Core;
@@ -33,6 +33,4 @@
 using HeuristicLab.PluginInfrastructure;
 using HeuristicLab.Random;
-using HeuristicLab.Selection;
-using HeuristicLab.Analysis;
 
 namespace HeuristicLab.Algorithms.GeneticAlgorithm {
@@ -217,5 +215,5 @@
       Parameters.Add(new ValueParameter<MultiAnalyzer>("Analyzer", "The operator used to analyze the islands.", new MultiAnalyzer()));
       Parameters.Add(new ValueParameter<MultiAnalyzer>("IslandAnalyzer", "The operator used to analyze each island.", new MultiAnalyzer()));
-      
+
       RandomCreator randomCreator = new RandomCreator();
       SubScopesCreator populationCreator = new SubScopesCreator();
Index: /trunk/sources/HeuristicLab.Algorithms.GeneticAlgorithm/3.3/IslandGeneticAlgorithmMainLoop.cs
===================================================================
--- /trunk/sources/HeuristicLab.Algorithms.GeneticAlgorithm/3.3/IslandGeneticAlgorithmMainLoop.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.Algorithms.GeneticAlgorithm/3.3/IslandGeneticAlgorithmMainLoop.cs	(revision 4068)
@@ -20,9 +20,4 @@
 #endregion
 
-using System;
-using System.Collections.Generic;
-using System.Linq;
-using HeuristicLab.Analysis;
-using HeuristicLab.Common;
 using HeuristicLab.Core;
 using HeuristicLab.Data;
@@ -32,5 +27,4 @@
 using HeuristicLab.Parameters;
 using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
-using HeuristicLab.PluginInfrastructure;
 using HeuristicLab.Selection;
 
Index: /trunk/sources/HeuristicLab.Algorithms.GeneticAlgorithm/3.3/Tests/Properties/AssemblyInfo.cs
===================================================================
--- /trunk/sources/HeuristicLab.Algorithms.GeneticAlgorithm/3.3/Tests/Properties/AssemblyInfo.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.Algorithms.GeneticAlgorithm/3.3/Tests/Properties/AssemblyInfo.cs	(revision 4068)
@@ -21,5 +21,4 @@
 
 using System.Reflection;
-using System.Runtime.CompilerServices;
 using System.Runtime.InteropServices;
 
Index: /trunk/sources/HeuristicLab.Algorithms.LocalSearch/3.3/LocalSearch.cs
===================================================================
--- /trunk/sources/HeuristicLab.Algorithms.LocalSearch/3.3/LocalSearch.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.Algorithms.LocalSearch/3.3/LocalSearch.cs	(revision 4068)
@@ -23,15 +23,13 @@
 using System.Collections.Generic;
 using System.Linq;
+using HeuristicLab.Analysis;
 using HeuristicLab.Common;
 using HeuristicLab.Core;
 using HeuristicLab.Data;
 using HeuristicLab.Optimization;
-using HeuristicLab.Operators;
 using HeuristicLab.Optimization.Operators;
 using HeuristicLab.Parameters;
 using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
-using HeuristicLab.PluginInfrastructure;
 using HeuristicLab.Random;
-using HeuristicLab.Analysis;
 
 namespace HeuristicLab.Algorithms.LocalSearch {
@@ -135,5 +133,5 @@
       Parameters.Add(new ValueParameter<IntValue>("SampleSize", "Number of moves that MultiMoveGenerators should create. This is ignored for Exhaustive- and SingleMoveGenerators.", new IntValue(100)));
       Parameters.Add(new ValueParameter<MultiAnalyzer>("Analyzer", "The operator used to analyze the solution and moves.", new MultiAnalyzer()));
-      
+
       RandomCreator randomCreator = new RandomCreator();
       SolutionsCreator solutionsCreator = new SolutionsCreator();
Index: /trunk/sources/HeuristicLab.Algorithms.LocalSearch/3.3/LocalSearchMainLoop.cs
===================================================================
--- /trunk/sources/HeuristicLab.Algorithms.LocalSearch/3.3/LocalSearchMainLoop.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.Algorithms.LocalSearch/3.3/LocalSearchMainLoop.cs	(revision 4068)
@@ -20,6 +20,4 @@
 #endregion
 
-using HeuristicLab.Analysis;
-using HeuristicLab.Common;
 using HeuristicLab.Core;
 using HeuristicLab.Data;
Index: /trunk/sources/HeuristicLab.Algorithms.NSGA2/3.3/CrowdedTournamentSelector.cs
===================================================================
--- /trunk/sources/HeuristicLab.Algorithms.NSGA2/3.3/CrowdedTournamentSelector.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.Algorithms.NSGA2/3.3/CrowdedTournamentSelector.cs	(revision 4068)
@@ -20,14 +20,11 @@
 #endregion
 
-using System;
 using System.Collections.Generic;
 using System.Linq;
-using System.Text;
+using HeuristicLab.Core;
+using HeuristicLab.Data;
+using HeuristicLab.Optimization;
+using HeuristicLab.Parameters;
 using HeuristicLab.Selection;
-using HeuristicLab.Optimization;
-using HeuristicLab.Data;
-using HeuristicLab.Core;
-using HeuristicLab.Parameters;
-using HeuristicLab.Collections;
 
 namespace HeuristicLab.Algorithms.NSGA2 {
Index: /trunk/sources/HeuristicLab.Algorithms.NSGA2/3.3/DefaultCrossover.cs
===================================================================
--- /trunk/sources/HeuristicLab.Algorithms.NSGA2/3.3/DefaultCrossover.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.Algorithms.NSGA2/3.3/DefaultCrossover.cs	(revision 4068)
@@ -20,13 +20,9 @@
 #endregion
 
-using System;
-using System.Collections.Generic;
-using System.Linq;
-using System.Text;
+using HeuristicLab.Core;
 using HeuristicLab.Operators;
-using HeuristicLab.Core;
-using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
 using HeuristicLab.Optimization;
 using HeuristicLab.Parameters;
+using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
 
 namespace HeuristicLab.Algorithms.NSGA2 {
Index: /trunk/sources/HeuristicLab.Algorithms.NSGA2/3.3/NSGA2.cs
===================================================================
--- /trunk/sources/HeuristicLab.Algorithms.NSGA2/3.3/NSGA2.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.Algorithms.NSGA2/3.3/NSGA2.cs	(revision 4068)
@@ -22,16 +22,14 @@
 using System;
 using System.Linq;
+using HeuristicLab.Analysis;
 using HeuristicLab.Common;
 using HeuristicLab.Core;
 using HeuristicLab.Data;
 using HeuristicLab.Optimization;
+using HeuristicLab.Optimization.Operators;
 using HeuristicLab.Parameters;
 using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
-using HeuristicLab.Analysis;
+using HeuristicLab.PluginInfrastructure;
 using HeuristicLab.Random;
-using HeuristicLab.Optimization.Operators;
-using HeuristicLab.PluginInfrastructure;
-using HeuristicLab.Selection;
-using HeuristicLab.Operators;
 
 namespace HeuristicLab.Algorithms.NSGA2 {
Index: /trunk/sources/HeuristicLab.Algorithms.NSGA2/3.3/NSGA2MainLoop.cs
===================================================================
--- /trunk/sources/HeuristicLab.Algorithms.NSGA2/3.3/NSGA2MainLoop.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.Algorithms.NSGA2/3.3/NSGA2MainLoop.cs	(revision 4068)
@@ -21,9 +21,9 @@
 
 using HeuristicLab.Core;
+using HeuristicLab.Data;
 using HeuristicLab.Operators;
+using HeuristicLab.Optimization.Operators;
+using HeuristicLab.Parameters;
 using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
-using HeuristicLab.Parameters;
-using HeuristicLab.Data;
-using HeuristicLab.Optimization.Operators;
 using HeuristicLab.Selection;
 
Index: /trunk/sources/HeuristicLab.Algorithms.NSGA2/3.3/RankAndCrowdingSorter.cs
===================================================================
--- /trunk/sources/HeuristicLab.Algorithms.NSGA2/3.3/RankAndCrowdingSorter.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.Algorithms.NSGA2/3.3/RankAndCrowdingSorter.cs	(revision 4068)
@@ -20,13 +20,9 @@
 #endregion
 
-using System;
-using System.Collections.Generic;
-using System.Linq;
-using System.Text;
+using HeuristicLab.Core;
+using HeuristicLab.Data;
 using HeuristicLab.Operators;
-using HeuristicLab.Core;
+using HeuristicLab.Parameters;
 using HeuristicLab.Selection;
-using HeuristicLab.Parameters;
-using HeuristicLab.Data;
 
 namespace HeuristicLab.Algorithms.NSGA2 {
Index: /trunk/sources/HeuristicLab.Algorithms.OffspringSelectionGeneticAlgorithm/3.3/IslandOffspringSelectionGeneticAlgorithm.cs
===================================================================
--- /trunk/sources/HeuristicLab.Algorithms.OffspringSelectionGeneticAlgorithm/3.3/IslandOffspringSelectionGeneticAlgorithm.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.Algorithms.OffspringSelectionGeneticAlgorithm/3.3/IslandOffspringSelectionGeneticAlgorithm.cs	(revision 4068)
@@ -21,5 +21,4 @@
 
 using System;
-using System.Collections.Generic;
 using System.Linq;
 using HeuristicLab.Analysis;
Index: /trunk/sources/HeuristicLab.Algorithms.OffspringSelectionGeneticAlgorithm/3.3/IslandOffspringSelectionGeneticAlgorithmMainLoop.cs
===================================================================
--- /trunk/sources/HeuristicLab.Algorithms.OffspringSelectionGeneticAlgorithm/3.3/IslandOffspringSelectionGeneticAlgorithmMainLoop.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.Algorithms.OffspringSelectionGeneticAlgorithm/3.3/IslandOffspringSelectionGeneticAlgorithmMainLoop.cs	(revision 4068)
@@ -20,9 +20,4 @@
 #endregion
 
-using System;
-using System.Collections.Generic;
-using System.Linq;
-using HeuristicLab.Analysis;
-using HeuristicLab.Common;
 using HeuristicLab.Core;
 using HeuristicLab.Data;
@@ -32,6 +27,4 @@
 using HeuristicLab.Parameters;
 using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
-using HeuristicLab.PluginInfrastructure;
-using HeuristicLab.Selection;
 
 namespace HeuristicLab.Algorithms.OffspringSelectionGeneticAlgorithm {
Index: /trunk/sources/HeuristicLab.Algorithms.OffspringSelectionGeneticAlgorithm/3.3/OffspringSelectionGeneticAlgorithm.cs
===================================================================
--- /trunk/sources/HeuristicLab.Algorithms.OffspringSelectionGeneticAlgorithm/3.3/OffspringSelectionGeneticAlgorithm.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.Algorithms.OffspringSelectionGeneticAlgorithm/3.3/OffspringSelectionGeneticAlgorithm.cs	(revision 4068)
@@ -21,7 +21,7 @@
 
 using System;
-using System.Collections.Generic;
 using System.Linq;
 using HeuristicLab.Analysis;
+using HeuristicLab.Common;
 using HeuristicLab.Core;
 using HeuristicLab.Data;
@@ -32,5 +32,4 @@
 using HeuristicLab.PluginInfrastructure;
 using HeuristicLab.Random;
-using HeuristicLab.Common;
 
 namespace HeuristicLab.Algorithms.OffspringSelectionGeneticAlgorithm {
Index: /trunk/sources/HeuristicLab.Algorithms.OffspringSelectionGeneticAlgorithm/3.3/OffspringSelectionGeneticAlgorithmMainLoop.cs
===================================================================
--- /trunk/sources/HeuristicLab.Algorithms.OffspringSelectionGeneticAlgorithm/3.3/OffspringSelectionGeneticAlgorithmMainLoop.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.Algorithms.OffspringSelectionGeneticAlgorithm/3.3/OffspringSelectionGeneticAlgorithmMainLoop.cs	(revision 4068)
@@ -20,5 +20,4 @@
 #endregion
 
-using HeuristicLab.Analysis;
 using HeuristicLab.Core;
 using HeuristicLab.Data;
@@ -27,5 +26,4 @@
 using HeuristicLab.Parameters;
 using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
-using HeuristicLab.Selection;
 
 namespace HeuristicLab.Algorithms.OffspringSelectionGeneticAlgorithm {
Index: /trunk/sources/HeuristicLab.Algorithms.OffspringSelectionGeneticAlgorithm/3.3/OffspringSelectionGeneticAlgorithmMainOperator.cs
===================================================================
--- /trunk/sources/HeuristicLab.Algorithms.OffspringSelectionGeneticAlgorithm/3.3/OffspringSelectionGeneticAlgorithmMainOperator.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.Algorithms.OffspringSelectionGeneticAlgorithm/3.3/OffspringSelectionGeneticAlgorithmMainOperator.cs	(revision 4068)
@@ -20,5 +20,4 @@
 #endregion
 
-using HeuristicLab.Analysis;
 using HeuristicLab.Core;
 using HeuristicLab.Data;
@@ -141,5 +140,5 @@
       LeftReducer leftReducer = new LeftReducer();
       MergingReducer mergingReducer = new MergingReducer();
-      
+
       selector.Name = "Selector (placeholder)";
       selector.OperatorParameter.ActualName = SelectorParameter.Name;
Index: /trunk/sources/HeuristicLab.Algorithms.OffspringSelectionGeneticAlgorithm/3.3/SASEGASA.cs
===================================================================
--- /trunk/sources/HeuristicLab.Algorithms.OffspringSelectionGeneticAlgorithm/3.3/SASEGASA.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.Algorithms.OffspringSelectionGeneticAlgorithm/3.3/SASEGASA.cs	(revision 4068)
@@ -21,5 +21,4 @@
 
 using System;
-using System.Collections.Generic;
 using System.Linq;
 using HeuristicLab.Analysis;
@@ -34,5 +33,4 @@
 using HeuristicLab.PluginInfrastructure;
 using HeuristicLab.Random;
-using HeuristicLab.Selection;
 
 namespace HeuristicLab.Algorithms.OffspringSelectionGeneticAlgorithm {
Index: /trunk/sources/HeuristicLab.Algorithms.OffspringSelectionGeneticAlgorithm/3.3/SASEGASAMainLoop.cs
===================================================================
--- /trunk/sources/HeuristicLab.Algorithms.OffspringSelectionGeneticAlgorithm/3.3/SASEGASAMainLoop.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.Algorithms.OffspringSelectionGeneticAlgorithm/3.3/SASEGASAMainLoop.cs	(revision 4068)
@@ -20,9 +20,4 @@
 #endregion
 
-using System;
-using System.Collections.Generic;
-using System.Linq;
-using HeuristicLab.Analysis;
-using HeuristicLab.Common;
 using HeuristicLab.Core;
 using HeuristicLab.Data;
@@ -32,6 +27,4 @@
 using HeuristicLab.Parameters;
 using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
-using HeuristicLab.PluginInfrastructure;
-using HeuristicLab.Selection;
 
 namespace HeuristicLab.Algorithms.OffspringSelectionGeneticAlgorithm {
Index: /trunk/sources/HeuristicLab.Algorithms.ParticleSwarmOptimization/3.3/ParticleSwarmOptimization.cs
===================================================================
--- /trunk/sources/HeuristicLab.Algorithms.ParticleSwarmOptimization/3.3/ParticleSwarmOptimization.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.Algorithms.ParticleSwarmOptimization/3.3/ParticleSwarmOptimization.cs	(revision 4068)
@@ -23,16 +23,15 @@
 using System.Collections.Generic;
 using System.Linq;
+using HeuristicLab.Analysis;
 using HeuristicLab.Common;
 using HeuristicLab.Core;
 using HeuristicLab.Data;
 using HeuristicLab.Encodings.RealVectorEncoding;
+using HeuristicLab.Operators;
 using HeuristicLab.Optimization;
-using HeuristicLab.Operators;
 using HeuristicLab.Optimization.Operators;
 using HeuristicLab.Parameters;
 using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
-using HeuristicLab.PluginInfrastructure;
 using HeuristicLab.Random;
-using HeuristicLab.Analysis;
 
 namespace HeuristicLab.Algorithms.ParticleSwarmOptimization {
@@ -57,5 +56,5 @@
       set { AnalyzerParameter.Value = value; }
     }
-    #endregion 
+    #endregion
 
     #region Parameter Properties
@@ -131,9 +130,9 @@
       randomCreator.SetSeedRandomlyParameter.ActualName = SetSeedRandomlyParameter.Name;
       randomCreator.SetSeedRandomlyParameter.Value = null;
-      
+
       solutionsCreator.NumberOfSolutionsParameter.ActualName = SwarmSizeParameter.Name;
-      
+
       encoder.OperatorParameter.ActualName = "Encoder";
-      
+
       velocityVectorCreator.BoundsParameter.ActualName = "ZeroBounds";
       velocityVectorCreator.RealVectorParameter.ActualName = "Velocity";
@@ -210,5 +209,5 @@
       UpdateEncoders();
       UpdateAnalyzers();
-      ParameterizeAnalyzers(); 
+      ParameterizeAnalyzers();
       bestLocalQualityInitalizer.RightSideParameter.ActualName = Problem.Evaluator.QualityParameter.ActualName;
       Problem.Evaluator.QualityParameter.ActualNameChanged += new EventHandler(Evaluator_QualityParameter_ActualNameChanged);
Index: /trunk/sources/HeuristicLab.Algorithms.ParticleSwarmOptimization/3.3/ParticleSwarmOptimizationMainLoop.cs
===================================================================
--- /trunk/sources/HeuristicLab.Algorithms.ParticleSwarmOptimization/3.3/ParticleSwarmOptimizationMainLoop.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.Algorithms.ParticleSwarmOptimization/3.3/ParticleSwarmOptimizationMainLoop.cs	(revision 4068)
@@ -21,17 +21,11 @@
 
 using System;
-using System.Collections.Generic;
-using System.Linq;
-using System.Text;
+using HeuristicLab.Core;
+using HeuristicLab.Data;
 using HeuristicLab.Operators;
-using HeuristicLab.Common;
-using HeuristicLab.Core;
+using HeuristicLab.Optimization;
+using HeuristicLab.Optimization.Operators;
+using HeuristicLab.Parameters;
 using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
-using HeuristicLab.Parameters;
-using HeuristicLab.Data;
-using HeuristicLab.Analysis;
-using HeuristicLab.Optimization.Operators;
-using HeuristicLab.Encodings.RealVectorEncoding;
-using HeuristicLab.Optimization;
 
 namespace HeuristicLab.Algorithms.ParticleSwarmOptimization {
@@ -70,5 +64,5 @@
 
     [Storable]
-    private ParticleUpdater velocityUpdater; 
+    private ParticleUpdater velocityUpdater;
 
     [StorableConstructor]
@@ -98,9 +92,9 @@
       IntCounter intCounter = new IntCounter();
       ConditionalBranch conditionalBranch = new ConditionalBranch();
-      velocityUpdater = new ParticleUpdater(); 
+      velocityUpdater = new ParticleUpdater();
       UniformSubScopesProcessor uniformSubScopesProcessor = new UniformSubScopesProcessor();
       UniformSubScopesProcessor uniformSubScopesProcessor2 = new UniformSubScopesProcessor();
       Placeholder encPlaceholder = new Placeholder();
-      Placeholder decPlaceholder = new Placeholder(); 
+      Placeholder decPlaceholder = new Placeholder();
       Placeholder evaluator = new Placeholder();
       Comparator comparator = new Comparator();
@@ -134,5 +128,5 @@
 
       encPlaceholder.OperatorParameter.ActualName = EncoderParameter.ActualName;
-      decPlaceholder.OperatorParameter.ActualName = DecoderParameter.ActualName; 
+      decPlaceholder.OperatorParameter.ActualName = DecoderParameter.ActualName;
 
       evaluator.Name = "Evaluator (placeholder)";
@@ -159,5 +153,5 @@
       swarmUpdater.Successor = null;
       intCounter.Successor = resultsCollector1;
-      resultsCollector1.Successor = analyzer1; 
+      resultsCollector1.Successor = analyzer1;
       analyzer1.Successor = comparator;
       #endregion
Index: /trunk/sources/HeuristicLab.Algorithms.ParticleSwarmOptimization/3.3/ParticleUpdater.cs
===================================================================
--- /trunk/sources/HeuristicLab.Algorithms.ParticleSwarmOptimization/3.3/ParticleUpdater.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.Algorithms.ParticleSwarmOptimization/3.3/ParticleUpdater.cs	(revision 4068)
@@ -20,13 +20,9 @@
 #endregion
 
-using System;
-using System.Collections.Generic;
-using System.Linq;
-using System.Text;
+using HeuristicLab.Core;
+using HeuristicLab.Data;
+using HeuristicLab.Encodings.RealVectorEncoding;
 using HeuristicLab.Operators;
 using HeuristicLab.Parameters;
-using HeuristicLab.Encodings.RealVectorEncoding;
-using HeuristicLab.Data;
-using HeuristicLab.Core;
 
 namespace HeuristicLab.Algorithms.ParticleSwarmOptimization {
@@ -72,5 +68,5 @@
       double alpha = ((IRandom)RandomParameter.ActualValue).NextDouble();
       double beta = ((IRandom)RandomParameter.ActualValue).NextDouble();
-      RealVector velocity = (RealVector) VelocityParameter.ActualValue; 
+      RealVector velocity = (RealVector)VelocityParameter.ActualValue;
       for (int i = 0; i < velocity.Length; i++) {
         velocity[i] = velocity[i] + alpha * (BestLocalParameter.ActualValue[i] - CurrentPositionParameter.ActualValue[i]) + beta * (BestGlobalParameter.ActualValue[i] - CurrentPositionParameter.ActualValue[i]);
@@ -79,8 +75,8 @@
       for (int i = 0; i < CurrentPositionParameter.ActualValue.Length; i++) {
         CurrentPositionParameter.ActualValue[i] = CurrentPositionParameter.ActualValue[i] + VelocityParameter.ActualValue[i];
-        if (CurrentPositionParameter.ActualValue[i] < BoundsParameter.ActualValue[0,0]) {
-          CurrentPositionParameter.ActualValue[i] = BoundsParameter.ActualValue[0, 0]; 
-        } else if (CurrentPositionParameter.ActualValue[i] > BoundsParameter.ActualValue[0,1]) {
-          CurrentPositionParameter.ActualValue[i] = BoundsParameter.ActualValue[0, 1]; 
+        if (CurrentPositionParameter.ActualValue[i] < BoundsParameter.ActualValue[0, 0]) {
+          CurrentPositionParameter.ActualValue[i] = BoundsParameter.ActualValue[0, 0];
+        } else if (CurrentPositionParameter.ActualValue[i] > BoundsParameter.ActualValue[0, 1]) {
+          CurrentPositionParameter.ActualValue[i] = BoundsParameter.ActualValue[0, 1];
         }
       }
Index: /trunk/sources/HeuristicLab.Algorithms.ParticleSwarmOptimization/3.3/PermutationToRealVectorEncoder.cs
===================================================================
--- /trunk/sources/HeuristicLab.Algorithms.ParticleSwarmOptimization/3.3/PermutationToRealVectorEncoder.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.Algorithms.ParticleSwarmOptimization/3.3/PermutationToRealVectorEncoder.cs	(revision 4068)
@@ -20,17 +20,11 @@
 #endregion
 
-using System;
-using System.Collections.Generic;
-using System.Linq;
-using System.Text;
-using HeuristicLab.Operators;
-using HeuristicLab.Common;
 using HeuristicLab.Core;
 using HeuristicLab.Data;
-using HeuristicLab.Parameters;
 using HeuristicLab.Encodings.PermutationEncoding;
 using HeuristicLab.Encodings.RealVectorEncoding;
-using HeuristicLab.Collections;
+using HeuristicLab.Operators;
 using HeuristicLab.Optimization;
+using HeuristicLab.Parameters;
 
 namespace HeuristicLab.Algorithms.ParticleSwarmOptimization {
@@ -58,5 +52,6 @@
     }
 
-    public PermutationToRealVectorEncoder() : base() {
+    public PermutationToRealVectorEncoder()
+      : base() {
       Parameters.Add(new LookupParameter<Permutation>("Permutation", "The permutation to encode."));
       Parameters.Add(new LookupParameter<RealVector>("RealVector", "The resulting real vector."));
@@ -72,8 +67,8 @@
       for (int i = 0; i < permutation.Length; i++) {
         realVector[permutation[i]] = max;
-        max = max - 1; 
+        max = max - 1;
       }
       RealVectorParameter.ActualValue = realVector;
-      LengthParameter.ActualValue = new IntValue(realVector.Length); 
+      LengthParameter.ActualValue = new IntValue(realVector.Length);
       return base.Apply();
     }
Index: /trunk/sources/HeuristicLab.Algorithms.ParticleSwarmOptimization/3.3/SwarmUpdater.cs
===================================================================
--- /trunk/sources/HeuristicLab.Algorithms.ParticleSwarmOptimization/3.3/SwarmUpdater.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.Algorithms.ParticleSwarmOptimization/3.3/SwarmUpdater.cs	(revision 4068)
@@ -20,12 +20,8 @@
 #endregion
 
-using System;
-using System.Collections.Generic;
-using System.Linq;
-using System.Text;
-using HeuristicLab.Operators;
 using HeuristicLab.Core;
 using HeuristicLab.Data;
 using HeuristicLab.Encodings.RealVectorEncoding;
+using HeuristicLab.Operators;
 using HeuristicLab.Parameters;
 
@@ -78,5 +74,5 @@
         if (CurrentQualityParameter.ActualValue.Value > LocalBestQualityParameter.ActualValue.Value) {
           LocalBestQualityParameter.ActualValue.Value = CurrentQualityParameter.ActualValue.Value;
-          BestLocalParameter.ActualValue = (RealVector) CurrentPositionParameter.ActualValue.Clone();
+          BestLocalParameter.ActualValue = (RealVector)CurrentPositionParameter.ActualValue.Clone();
         }
         if (CurrentQualityParameter.ActualValue.Value > GlobalBestQualityParameter.ActualValue.Value) {
Index: /trunk/sources/HeuristicLab.Algorithms.SimulatedAnnealing/3.3/SimulatedAnnealing.cs
===================================================================
--- /trunk/sources/HeuristicLab.Algorithms.SimulatedAnnealing/3.3/SimulatedAnnealing.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.Algorithms.SimulatedAnnealing/3.3/SimulatedAnnealing.cs	(revision 4068)
@@ -23,9 +23,9 @@
 using System.Collections.Generic;
 using System.Linq;
+using HeuristicLab.Analysis;
 using HeuristicLab.Common;
 using HeuristicLab.Core;
 using HeuristicLab.Data;
 using HeuristicLab.Optimization;
-using HeuristicLab.Operators;
 using HeuristicLab.Optimization.Operators;
 using HeuristicLab.Parameters;
@@ -33,5 +33,4 @@
 using HeuristicLab.PluginInfrastructure;
 using HeuristicLab.Random;
-using HeuristicLab.Analysis;
 
 namespace HeuristicLab.Algorithms.SimulatedAnnealing {
@@ -155,5 +154,5 @@
       Parameters.Add(new ValueParameter<DoubleValue>("EndTemperature", "The final temperature which should be reached when iterations reaches maximum iterations.", new DoubleValue(1e-6)));
       Parameters.Add(new ValueParameter<MultiAnalyzer>("Analyzer", "The operator used to analyze each generation.", new MultiAnalyzer()));
-      
+
       RandomCreator randomCreator = new RandomCreator();
       SolutionsCreator solutionsCreator = new SolutionsCreator();
Index: /trunk/sources/HeuristicLab.Algorithms.SimulatedAnnealing/3.3/SimulatedAnnealingMainLoop.cs
===================================================================
--- /trunk/sources/HeuristicLab.Algorithms.SimulatedAnnealing/3.3/SimulatedAnnealingMainLoop.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.Algorithms.SimulatedAnnealing/3.3/SimulatedAnnealingMainLoop.cs	(revision 4068)
@@ -20,6 +20,4 @@
 #endregion
 
-using HeuristicLab.Analysis;
-using HeuristicLab.Common;
 using HeuristicLab.Core;
 using HeuristicLab.Data;
@@ -28,5 +26,4 @@
 using HeuristicLab.Parameters;
 using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
-using HeuristicLab.Selection;
 
 namespace HeuristicLab.Algorithms.SimulatedAnnealing {
@@ -103,5 +100,5 @@
       Parameters.Add(new ValueLookupParameter<IntValue>("InnerIterations", "The amount of inner iterations (number of moves before temperature is adjusted again)."));
       Parameters.Add(new ValueLookupParameter<IntValue>("MaximumIterations", "The maximum number of iterations which should be processed."));
-      
+
       Parameters.Add(new ValueLookupParameter<IOperator>("MoveGenerator", "The operator that generates the moves."));
       Parameters.Add(new ValueLookupParameter<IOperator>("MoveEvaluator", "The operator that evaluates a move."));
Index: /trunk/sources/HeuristicLab.Algorithms.TabuSearch/3.3/TabuListCreator.cs
===================================================================
--- /trunk/sources/HeuristicLab.Algorithms.TabuSearch/3.3/TabuListCreator.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.Algorithms.TabuSearch/3.3/TabuListCreator.cs	(revision 4068)
@@ -20,12 +20,8 @@
 #endregion
 
-using System;
-using System.Collections.Generic;
-using HeuristicLab.Common;
 using HeuristicLab.Core;
 using HeuristicLab.Operators;
 using HeuristicLab.Parameters;
 using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
-using HeuristicLab.Selection;
 
 namespace HeuristicLab.Algorithms.TabuSearch {
Index: /trunk/sources/HeuristicLab.Algorithms.TabuSearch/3.3/TabuNeighborhoodAnalyzer.cs
===================================================================
--- /trunk/sources/HeuristicLab.Algorithms.TabuSearch/3.3/TabuNeighborhoodAnalyzer.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.Algorithms.TabuSearch/3.3/TabuNeighborhoodAnalyzer.cs	(revision 4068)
@@ -21,9 +21,9 @@
 
 using System.Linq;
+using HeuristicLab.Core;
+using HeuristicLab.Data;
 using HeuristicLab.Operators;
 using HeuristicLab.Optimization;
 using HeuristicLab.Parameters;
-using HeuristicLab.Data;
-using HeuristicLab.Core;
 
 namespace HeuristicLab.Algorithms.TabuSearch {
Index: /trunk/sources/HeuristicLab.Algorithms.TabuSearch/3.3/TabuSearch.cs
===================================================================
--- /trunk/sources/HeuristicLab.Algorithms.TabuSearch/3.3/TabuSearch.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.Algorithms.TabuSearch/3.3/TabuSearch.cs	(revision 4068)
@@ -23,15 +23,13 @@
 using System.Collections.Generic;
 using System.Linq;
+using HeuristicLab.Analysis;
 using HeuristicLab.Common;
 using HeuristicLab.Core;
 using HeuristicLab.Data;
 using HeuristicLab.Optimization;
-using HeuristicLab.Operators;
 using HeuristicLab.Optimization.Operators;
 using HeuristicLab.Parameters;
 using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
-using HeuristicLab.PluginInfrastructure;
 using HeuristicLab.Random;
-using HeuristicLab.Analysis;
 
 namespace HeuristicLab.Algorithms.TabuSearch {
@@ -155,5 +153,5 @@
       Parameters.Add(new ValueParameter<IntValue>("SampleSize", "The neighborhood size for stochastic sampling move generators", new IntValue(100)));
       Parameters.Add(new ValueParameter<MultiAnalyzer>("Analyzer", "The operator used to analyze the solution.", new MultiAnalyzer()));
-      
+
       RandomCreator randomCreator = new RandomCreator();
       SolutionsCreator solutionsCreator = new SolutionsCreator();
Index: /trunk/sources/HeuristicLab.Algorithms.TabuSearch/3.3/TabuSearchMainLoop.cs
===================================================================
--- /trunk/sources/HeuristicLab.Algorithms.TabuSearch/3.3/TabuSearchMainLoop.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.Algorithms.TabuSearch/3.3/TabuSearchMainLoop.cs	(revision 4068)
@@ -21,5 +21,4 @@
 
 using HeuristicLab.Analysis;
-using HeuristicLab.Common;
 using HeuristicLab.Core;
 using HeuristicLab.Data;
@@ -188,5 +187,5 @@
       tabuSelector.MoveQualityParameter.ActualName = MoveQualityParameter.Name;
       tabuSelector.MoveTabuParameter.ActualName = MoveTabuParameter.Name;
-      
+
       moveMakingProcessor.Name = "MoveMaking processor (UniformSubScopesProcessor)";
 
Index: /trunk/sources/HeuristicLab.Algorithms.TabuSearch/3.3/TabuSelector.cs
===================================================================
--- /trunk/sources/HeuristicLab.Algorithms.TabuSearch/3.3/TabuSelector.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.Algorithms.TabuSearch/3.3/TabuSelector.cs	(revision 4068)
@@ -22,8 +22,6 @@
 using System;
 using System.Collections.Generic;
-using HeuristicLab.Common;
 using HeuristicLab.Core;
 using HeuristicLab.Data;
-using HeuristicLab.Operators;
 using HeuristicLab.Parameters;
 using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
Index: /trunk/sources/HeuristicLab.Analysis.Views/3.3/DataTableView.cs
===================================================================
--- /trunk/sources/HeuristicLab.Analysis.Views/3.3/DataTableView.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.Analysis.Views/3.3/DataTableView.cs	(revision 4068)
@@ -21,12 +21,12 @@
 
 using System;
+using System.Collections.Generic;
+using System.Drawing;
 using System.Linq;
-using System.Collections.Generic;
+using System.Windows.Forms;
 using System.Windows.Forms.DataVisualization.Charting;
 using HeuristicLab.Collections;
 using HeuristicLab.Core.Views;
 using HeuristicLab.MainForm;
-using System.Windows.Forms;
-using System.Drawing;
 
 namespace HeuristicLab.Analysis.Views {
Index: /trunk/sources/HeuristicLab.Analysis/3.3/BestAverageWorstQualityCalculator.cs
===================================================================
--- /trunk/sources/HeuristicLab.Analysis/3.3/BestAverageWorstQualityCalculator.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.Analysis/3.3/BestAverageWorstQualityCalculator.cs	(revision 4068)
@@ -20,5 +20,4 @@
 #endregion
 
-using HeuristicLab.Common;
 using HeuristicLab.Core;
 using HeuristicLab.Data;
Index: /trunk/sources/HeuristicLab.Analysis/3.3/BestQualityMemorizer.cs
===================================================================
--- /trunk/sources/HeuristicLab.Analysis/3.3/BestQualityMemorizer.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.Analysis/3.3/BestQualityMemorizer.cs	(revision 4068)
@@ -20,5 +20,4 @@
 #endregion
 
-using HeuristicLab.Common;
 using HeuristicLab.Core;
 using HeuristicLab.Data;
Index: /trunk/sources/HeuristicLab.Analysis/3.3/DataTable.cs
===================================================================
--- /trunk/sources/HeuristicLab.Analysis/3.3/DataTable.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.Analysis/3.3/DataTable.cs	(revision 4068)
@@ -20,13 +20,13 @@
 #endregion
 
+using System;
+using System.Collections.Generic;
 using System.Drawing;
 using System.Linq;
+using HeuristicLab.Collections;
 using HeuristicLab.Common;
 using HeuristicLab.Core;
+using HeuristicLab.Data;
 using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
-using HeuristicLab.Data;
-using System;
-using System.Collections.Generic;
-using HeuristicLab.Collections;
 
 namespace HeuristicLab.Analysis {
Index: /trunk/sources/HeuristicLab.Analysis/3.3/DataTableValuesCollector.cs
===================================================================
--- /trunk/sources/HeuristicLab.Analysis/3.3/DataTableValuesCollector.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.Analysis/3.3/DataTableValuesCollector.cs	(revision 4068)
@@ -20,8 +20,6 @@
 #endregion
 
-using System;
 using System.Collections.Generic;
 using System.Linq;
-using HeuristicLab.Common;
 using HeuristicLab.Core;
 using HeuristicLab.Data;
Index: /trunk/sources/HeuristicLab.Analysis/3.3/MinAverageMaxValueCalculator.cs
===================================================================
--- /trunk/sources/HeuristicLab.Analysis/3.3/MinAverageMaxValueCalculator.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.Analysis/3.3/MinAverageMaxValueCalculator.cs	(revision 4068)
@@ -20,5 +20,4 @@
 #endregion
 
-using HeuristicLab.Common;
 using HeuristicLab.Core;
 using HeuristicLab.Data;
Index: /trunk/sources/HeuristicLab.Analysis/3.3/QualityDifferenceCalculator.cs
===================================================================
--- /trunk/sources/HeuristicLab.Analysis/3.3/QualityDifferenceCalculator.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.Analysis/3.3/QualityDifferenceCalculator.cs	(revision 4068)
@@ -20,5 +20,4 @@
 #endregion
 
-using HeuristicLab.Common;
 using HeuristicLab.Core;
 using HeuristicLab.Data;
Index: /trunk/sources/HeuristicLab.CodeEditor/3.3/CodeCompletionData.cs
===================================================================
--- /trunk/sources/HeuristicLab.CodeEditor/3.3/CodeCompletionData.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.CodeEditor/3.3/CodeCompletionData.cs	(revision 4068)
@@ -8,15 +8,12 @@
  */
 
-using System;
+using System.Collections.Generic;
 using System.IO;
+using System.Linq;
 using System.Text;
 using System.Xml;
-using System.Linq;
-
 using ICSharpCode.SharpDevelop.Dom;
 using ICSharpCode.SharpDevelop.Dom.CSharp;
-using ICSharpCode.SharpDevelop.Dom.VBNet;
 using ICSharpCode.TextEditor.Gui.CompletionWindow;
-using System.Collections.Generic;
 
 namespace HeuristicLab.CodeEditor {
@@ -158,5 +155,6 @@
         }
         return b.ToString();
-      } catch (XmlException) {
+      }
+      catch (XmlException) {
         return xmlDoc;
       }
Index: /trunk/sources/HeuristicLab.CodeEditor/3.3/CodeCompletionKeyHandler.cs
===================================================================
--- /trunk/sources/HeuristicLab.CodeEditor/3.3/CodeCompletionKeyHandler.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.CodeEditor/3.3/CodeCompletionKeyHandler.cs	(revision 4068)
@@ -27,12 +27,6 @@
 
 using System;
-using System.Collections.Generic;
-using System.Drawing;
-using System.Windows.Forms;
-using System.IO;
-using System.Threading;
 
 using ICSharpCode.TextEditor;
-using ICSharpCode.TextEditor.Gui;
 using ICSharpCode.TextEditor.Gui.CompletionWindow;
 
Index: /trunk/sources/HeuristicLab.CodeEditor/3.3/CodeCompletionProvider.cs
===================================================================
--- /trunk/sources/HeuristicLab.CodeEditor/3.3/CodeCompletionProvider.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.CodeEditor/3.3/CodeCompletionProvider.cs	(revision 4068)
@@ -29,5 +29,4 @@
 using System.Collections;
 using System.Collections.Generic;
-using System.Text;
 using System.Windows.Forms;
 using ICSharpCode.TextEditor;
Index: /trunk/sources/HeuristicLab.CodeEditor/3.3/CodeEditor.Designer.cs
===================================================================
--- /trunk/sources/HeuristicLab.CodeEditor/3.3/CodeEditor.Designer.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.CodeEditor/3.3/CodeEditor.Designer.cs	(revision 4068)
@@ -1,4 +1,3 @@
-﻿using System;
-namespace HeuristicLab.CodeEditor {
+﻿namespace HeuristicLab.CodeEditor {
   public partial class CodeEditor : System.Windows.Forms.UserControl {
     /// <summary>
Index: /trunk/sources/HeuristicLab.CodeEditor/3.3/CodeEditor.cs
===================================================================
--- /trunk/sources/HeuristicLab.CodeEditor/3.3/CodeEditor.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.CodeEditor/3.3/CodeEditor.cs	(revision 4068)
@@ -27,19 +27,17 @@
 
 using System;
-using System.Linq;
+using System.CodeDom.Compiler;
 using System.Collections.Generic;
+using System.Diagnostics;
 using System.Drawing;
+using System.IO;
+using System.Reflection;
+using System.Threading;
 using System.Windows.Forms;
-using System.IO;
-using System.Threading;
 using HeuristicLab.Common.Resources;
-
+using ICSharpCode.TextEditor;
+using ICSharpCode.TextEditor.Document;
+using Dom = ICSharpCode.SharpDevelop.Dom;
 using NRefactory = ICSharpCode.NRefactory;
-using Dom = ICSharpCode.SharpDevelop.Dom;
-using ICSharpCode.TextEditor.Document;
-using System.CodeDom.Compiler;
-using ICSharpCode.TextEditor;
-using System.Reflection;
-using System.Diagnostics;
 
 namespace HeuristicLab.CodeEditor {
@@ -166,9 +164,14 @@
         // if we made it this far, enable on-disk parsing cache
         projectContentRegistry.ActivatePersistence(persistencePath);
-      } catch (NotSupportedException) {
-      } catch (IOException) {
-      } catch (System.Security.SecurityException) {
-      } catch (UnauthorizedAccessException) {
-      } catch (ArgumentException) {
+      }
+      catch (NotSupportedException) {
+      }
+      catch (IOException) {
+      }
+      catch (System.Security.SecurityException) {
+      }
+      catch (UnauthorizedAccessException) {
+      }
+      catch (ArgumentException) {
       }
       projectContent = new Dom.DefaultProjectContent();
@@ -347,5 +350,6 @@
         lastCompilationUnit = newCompilationUnit;
         parseInformation.SetCompilationUnit(newCompilationUnit);
-      } catch { }
+      }
+      catch { }
     }
 
Index: /trunk/sources/HeuristicLab.CodeEditor/3.3/CodeViewer.cs
===================================================================
--- /trunk/sources/HeuristicLab.CodeEditor/3.3/CodeViewer.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.CodeEditor/3.3/CodeViewer.cs	(revision 4068)
@@ -20,10 +20,4 @@
 #endregion
 using System;
-using System.Collections.Generic;
-using System.ComponentModel;
-using System.Data;
-using System.Drawing;
-using System.Linq;
-using System.Text;
 using System.Windows.Forms;
 
@@ -37,5 +31,6 @@
     }
 
-    public CodeViewer(string code) : this() {
+    public CodeViewer(string code)
+      : this() {
       textEditorControl1.Text = code;
     }
Index: /trunk/sources/HeuristicLab.CodeEditor/3.3/ErrorBookmark.cs
===================================================================
--- /trunk/sources/HeuristicLab.CodeEditor/3.3/ErrorBookmark.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.CodeEditor/3.3/ErrorBookmark.cs	(revision 4068)
@@ -19,11 +19,7 @@
  */
 #endregion
-using System;
-using System.Collections.Generic;
-using System.Linq;
-using System.Text;
 using System.Drawing;
+using ICSharpCode.TextEditor;
 using ICSharpCode.TextEditor.Document;
-using ICSharpCode.TextEditor;
 
 namespace HeuristicLab.CodeEditor {
@@ -36,7 +32,7 @@
     }
 
-    public override void Draw(IconBarMargin margin, System.Drawing.Graphics g, System.Drawing.Point p) {      
+    public override void Draw(IconBarMargin margin, System.Drawing.Graphics g, System.Drawing.Point p) {
       int delta = margin.TextArea.TextView.FontHeight / 4;
-			Rectangle rect = new Rectangle(
+      Rectangle rect = new Rectangle(
         2,
         p.Y + delta,
Index: /trunk/sources/HeuristicLab.CodeEditor/3.3/ToolTipProvider.cs
===================================================================
--- /trunk/sources/HeuristicLab.CodeEditor/3.3/ToolTipProvider.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.CodeEditor/3.3/ToolTipProvider.cs	(revision 4068)
@@ -26,11 +26,9 @@
 // OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 
-using System;
 using System.Text;
 using ICSharpCode.SharpDevelop.Dom;
 using ICSharpCode.SharpDevelop.Dom.CSharp;
-using ICSharpCode.SharpDevelop.Dom.VBNet;
+using NRefactoryResolver = ICSharpCode.SharpDevelop.Dom.NRefactoryResolver.NRefactoryResolver;
 using TextEditor = ICSharpCode.TextEditor;
-using NRefactoryResolver = ICSharpCode.SharpDevelop.Dom.NRefactoryResolver.NRefactoryResolver;
 
 namespace HeuristicLab.CodeEditor {
@@ -52,5 +50,5 @@
       if (e.InDocument && !e.ToolTipShown) {
         IExpressionFinder expressionFinder;
-        expressionFinder = new CSharpExpressionFinder(codeEditor.parseInformation);        
+        expressionFinder = new CSharpExpressionFinder(codeEditor.parseInformation);
         ExpressionResult expression = expressionFinder.FindFullExpression(
           editor.Text,
Index: /trunk/sources/HeuristicLab.Collections/3.3/INotifyObservableArrayItemsChanged.cs
===================================================================
--- /trunk/sources/HeuristicLab.Collections/3.3/INotifyObservableArrayItemsChanged.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.Collections/3.3/INotifyObservableArrayItemsChanged.cs	(revision 4068)
@@ -20,6 +20,4 @@
 #endregion
 
-using System.Collections.Generic;
-using System.ComponentModel;
 
 namespace HeuristicLab.Collections {
Index: /trunk/sources/HeuristicLab.Collections/3.3/INotifyObservableCollectionItemsChanged.cs
===================================================================
--- /trunk/sources/HeuristicLab.Collections/3.3/INotifyObservableCollectionItemsChanged.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.Collections/3.3/INotifyObservableCollectionItemsChanged.cs	(revision 4068)
@@ -20,6 +20,4 @@
 #endregion
 
-using System.Collections.Generic;
-using System.ComponentModel;
 
 namespace HeuristicLab.Collections {
Index: /trunk/sources/HeuristicLab.Collections/3.3/INotifyObservableListItemsChanged.cs
===================================================================
--- /trunk/sources/HeuristicLab.Collections/3.3/INotifyObservableListItemsChanged.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.Collections/3.3/INotifyObservableListItemsChanged.cs	(revision 4068)
@@ -20,5 +20,4 @@
 #endregion
 
-using System.Collections.Generic;
 
 namespace HeuristicLab.Collections {
Index: /trunk/sources/HeuristicLab.Collections/3.3/IObservableArray.cs
===================================================================
--- /trunk/sources/HeuristicLab.Collections/3.3/IObservableArray.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.Collections/3.3/IObservableArray.cs	(revision 4068)
@@ -20,5 +20,4 @@
 #endregion
 
-using System;
 using System.Collections.Generic;
 using System.ComponentModel;
Index: /trunk/sources/HeuristicLab.Collections/3.3/IObservableCollection.cs
===================================================================
--- /trunk/sources/HeuristicLab.Collections/3.3/IObservableCollection.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.Collections/3.3/IObservableCollection.cs	(revision 4068)
@@ -20,5 +20,4 @@
 #endregion
 
-using System;
 using System.Collections.Generic;
 using System.ComponentModel;
Index: /trunk/sources/HeuristicLab.Collections/3.3/IndexedItem.cs
===================================================================
--- /trunk/sources/HeuristicLab.Collections/3.3/IndexedItem.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.Collections/3.3/IndexedItem.cs	(revision 4068)
@@ -21,5 +21,4 @@
 
 using System;
-using System.Text;
 
 namespace HeuristicLab.Collections {
Index: /trunk/sources/HeuristicLab.Common.Resources/3.3/HeuristicLab.Designer.cs
===================================================================
--- /trunk/sources/HeuristicLab.Common.Resources/3.3/HeuristicLab.Designer.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.Common.Resources/3.3/HeuristicLab.Designer.cs	(revision 4068)
@@ -10,75 +10,74 @@
 
 namespace HeuristicLab.Common.Resources {
-    using System;
-    
-    
+
+
+  /// <summary>
+  ///   A strongly-typed resource class, for looking up localized strings, etc.
+  /// </summary>
+  // This class was auto-generated by the StronglyTypedResourceBuilder
+  // class via a tool like ResGen or Visual Studio.
+  // To add or remove a member, edit your .ResX file then rerun ResGen
+  // with the /str option, or rebuild your VS project.
+  [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "4.0.0.0")]
+  [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
+  [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
+  public class HeuristicLab {
+
+    private static global::System.Resources.ResourceManager resourceMan;
+
+    private static global::System.Globalization.CultureInfo resourceCulture;
+
+    [global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")]
+    internal HeuristicLab() {
+    }
+
     /// <summary>
-    ///   A strongly-typed resource class, for looking up localized strings, etc.
+    ///   Returns the cached ResourceManager instance used by this class.
     /// </summary>
-    // This class was auto-generated by the StronglyTypedResourceBuilder
-    // class via a tool like ResGen or Visual Studio.
-    // To add or remove a member, edit your .ResX file then rerun ResGen
-    // with the /str option, or rebuild your VS project.
-    [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "4.0.0.0")]
-    [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
-    [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
-    public class HeuristicLab {
-        
-        private static global::System.Resources.ResourceManager resourceMan;
-        
-        private static global::System.Globalization.CultureInfo resourceCulture;
-        
-        [global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")]
-        internal HeuristicLab() {
+    [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
+    public static global::System.Resources.ResourceManager ResourceManager {
+      get {
+        if (object.ReferenceEquals(resourceMan, null)) {
+          global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("HeuristicLab.Common.Resources.HeuristicLab", typeof(HeuristicLab).Assembly);
+          resourceMan = temp;
         }
-        
-        /// <summary>
-        ///   Returns the cached ResourceManager instance used by this class.
-        /// </summary>
-        [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
-        public static global::System.Resources.ResourceManager ResourceManager {
-            get {
-                if (object.ReferenceEquals(resourceMan, null)) {
-                    global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("HeuristicLab.Common.Resources.HeuristicLab", typeof(HeuristicLab).Assembly);
-                    resourceMan = temp;
-                }
-                return resourceMan;
-            }
-        }
-        
-        /// <summary>
-        ///   Overrides the current thread's CurrentUICulture property for all
-        ///   resource lookups using this strongly typed resource class.
-        /// </summary>
-        [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
-        public static global::System.Globalization.CultureInfo Culture {
-            get {
-                return resourceCulture;
-            }
-            set {
-                resourceCulture = value;
-            }
-        }
-        
-        public static System.Drawing.Bitmap HeuristicLabBanner {
-            get {
-                object obj = ResourceManager.GetObject("HeuristicLabBanner", resourceCulture);
-                return ((System.Drawing.Bitmap)(obj));
-            }
-        }
-        
-        public static System.Drawing.Bitmap HeuristicLabLogo {
-            get {
-                object obj = ResourceManager.GetObject("HeuristicLabLogo", resourceCulture);
-                return ((System.Drawing.Bitmap)(obj));
-            }
-        }
-        
-        public static System.Drawing.Icon Icon {
-            get {
-                object obj = ResourceManager.GetObject("Icon", resourceCulture);
-                return ((System.Drawing.Icon)(obj));
-            }
-        }
+        return resourceMan;
+      }
     }
+
+    /// <summary>
+    ///   Overrides the current thread's CurrentUICulture property for all
+    ///   resource lookups using this strongly typed resource class.
+    /// </summary>
+    [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
+    public static global::System.Globalization.CultureInfo Culture {
+      get {
+        return resourceCulture;
+      }
+      set {
+        resourceCulture = value;
+      }
+    }
+
+    public static System.Drawing.Bitmap HeuristicLabBanner {
+      get {
+        object obj = ResourceManager.GetObject("HeuristicLabBanner", resourceCulture);
+        return ((System.Drawing.Bitmap)(obj));
+      }
+    }
+
+    public static System.Drawing.Bitmap HeuristicLabLogo {
+      get {
+        object obj = ResourceManager.GetObject("HeuristicLabLogo", resourceCulture);
+        return ((System.Drawing.Bitmap)(obj));
+      }
+    }
+
+    public static System.Drawing.Icon Icon {
+      get {
+        object obj = ResourceManager.GetObject("Icon", resourceCulture);
+        return ((System.Drawing.Icon)(obj));
+      }
+    }
+  }
 }
Index: /trunk/sources/HeuristicLab.Common.Resources/3.3/VS2008ImageLibrary.Designer.cs
===================================================================
--- /trunk/sources/HeuristicLab.Common.Resources/3.3/VS2008ImageLibrary.Designer.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.Common.Resources/3.3/VS2008ImageLibrary.Designer.cs	(revision 4068)
@@ -10,733 +10,732 @@
 
 namespace HeuristicLab.Common.Resources {
-    using System;
-    
-    
+
+
+  /// <summary>
+  ///   A strongly-typed resource class, for looking up localized strings, etc.
+  /// </summary>
+  // This class was auto-generated by the StronglyTypedResourceBuilder
+  // class via a tool like ResGen or Visual Studio.
+  // To add or remove a member, edit your .ResX file then rerun ResGen
+  // with the /str option, or rebuild your VS project.
+  [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "4.0.0.0")]
+  [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
+  [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
+  public class VS2008ImageLibrary {
+
+    private static global::System.Resources.ResourceManager resourceMan;
+
+    private static global::System.Globalization.CultureInfo resourceCulture;
+
+    [global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")]
+    internal VS2008ImageLibrary() {
+    }
+
     /// <summary>
-    ///   A strongly-typed resource class, for looking up localized strings, etc.
+    ///   Returns the cached ResourceManager instance used by this class.
     /// </summary>
-    // This class was auto-generated by the StronglyTypedResourceBuilder
-    // class via a tool like ResGen or Visual Studio.
-    // To add or remove a member, edit your .ResX file then rerun ResGen
-    // with the /str option, or rebuild your VS project.
-    [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "4.0.0.0")]
-    [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
-    [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
-    public class VS2008ImageLibrary {
-        
-        private static global::System.Resources.ResourceManager resourceMan;
-        
-        private static global::System.Globalization.CultureInfo resourceCulture;
-        
-        [global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")]
-        internal VS2008ImageLibrary() {
+    [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
+    public static global::System.Resources.ResourceManager ResourceManager {
+      get {
+        if (object.ReferenceEquals(resourceMan, null)) {
+          global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("HeuristicLab.Common.Resources.VS2008ImageLibrary", typeof(VS2008ImageLibrary).Assembly);
+          resourceMan = temp;
         }
-        
-        /// <summary>
-        ///   Returns the cached ResourceManager instance used by this class.
-        /// </summary>
-        [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
-        public static global::System.Resources.ResourceManager ResourceManager {
-            get {
-                if (object.ReferenceEquals(resourceMan, null)) {
-                    global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("HeuristicLab.Common.Resources.VS2008ImageLibrary", typeof(VS2008ImageLibrary).Assembly);
-                    resourceMan = temp;
-                }
-                return resourceMan;
-            }
-        }
-        
-        /// <summary>
-        ///   Overrides the current thread's CurrentUICulture property for all
-        ///   resource lookups using this strongly typed resource class.
-        /// </summary>
-        [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
-        public static global::System.Globalization.CultureInfo Culture {
-            get {
-                return resourceCulture;
-            }
-            set {
-                resourceCulture = value;
-            }
-        }
-        
-        public static System.Drawing.Bitmap ActualSize {
-            get {
-                object obj = ResourceManager.GetObject("ActualSize", resourceCulture);
-                return ((System.Drawing.Bitmap)(obj));
-            }
-        }
-        
-        public static System.Drawing.Bitmap Add {
-            get {
-                object obj = ResourceManager.GetObject("Add", resourceCulture);
-                return ((System.Drawing.Bitmap)(obj));
-            }
-        }
-        
-        public static System.Drawing.Bitmap ArrowDown {
-            get {
-                object obj = ResourceManager.GetObject("ArrowDown", resourceCulture);
-                return ((System.Drawing.Bitmap)(obj));
-            }
-        }
-        
-        public static System.Drawing.Bitmap ArrowUp {
-            get {
-                object obj = ResourceManager.GetObject("ArrowUp", resourceCulture);
-                return ((System.Drawing.Bitmap)(obj));
-            }
-        }
-        
-        public static System.Drawing.Bitmap Assembly {
-            get {
-                object obj = ResourceManager.GetObject("Assembly", resourceCulture);
-                return ((System.Drawing.Bitmap)(obj));
-            }
-        }
-        
-        public static System.Drawing.Bitmap Breakpoint {
-            get {
-                object obj = ResourceManager.GetObject("Breakpoint", resourceCulture);
-                return ((System.Drawing.Bitmap)(obj));
-            }
-        }
-        
-        public static System.Drawing.Bitmap BreakpointActive {
-            get {
-                object obj = ResourceManager.GetObject("BreakpointActive", resourceCulture);
-                return ((System.Drawing.Bitmap)(obj));
-            }
-        }
-        
-        public static System.Drawing.Bitmap BreakpointInactive {
-            get {
-                object obj = ResourceManager.GetObject("BreakpointInactive", resourceCulture);
-                return ((System.Drawing.Bitmap)(obj));
-            }
-        }
-        
-        public static System.Drawing.Bitmap Class {
-            get {
-                object obj = ResourceManager.GetObject("Class", resourceCulture);
-                return ((System.Drawing.Bitmap)(obj));
-            }
-        }
-        
-        public static System.Drawing.Bitmap Collapse {
-            get {
-                object obj = ResourceManager.GetObject("Collapse", resourceCulture);
-                return ((System.Drawing.Bitmap)(obj));
-            }
-        }
-        
-        public static System.Drawing.Bitmap Comment {
-            get {
-                object obj = ResourceManager.GetObject("Comment", resourceCulture);
-                return ((System.Drawing.Bitmap)(obj));
-            }
-        }
-        
-        public static System.Drawing.Bitmap Component {
-            get {
-                object obj = ResourceManager.GetObject("Component", resourceCulture);
-                return ((System.Drawing.Bitmap)(obj));
-            }
-        }
-        
-        public static System.Drawing.Bitmap Constant {
-            get {
-                object obj = ResourceManager.GetObject("Constant", resourceCulture);
-                return ((System.Drawing.Bitmap)(obj));
-            }
-        }
-        
-        public static System.Drawing.Bitmap Control {
-            get {
-                object obj = ResourceManager.GetObject("Control", resourceCulture);
-                return ((System.Drawing.Bitmap)(obj));
-            }
-        }
-        
-        public static System.Drawing.Bitmap Copy {
-            get {
-                object obj = ResourceManager.GetObject("Copy", resourceCulture);
-                return ((System.Drawing.Bitmap)(obj));
-            }
-        }
-        
-        public static System.Drawing.Bitmap Cut {
-            get {
-                object obj = ResourceManager.GetObject("Cut", resourceCulture);
-                return ((System.Drawing.Bitmap)(obj));
-            }
-        }
-        
-        public static System.Drawing.Bitmap Database {
-            get {
-                object obj = ResourceManager.GetObject("Database", resourceCulture);
-                return ((System.Drawing.Bitmap)(obj));
-            }
-        }
-        
-        public static System.Drawing.Bitmap Delegate {
-            get {
-                object obj = ResourceManager.GetObject("Delegate", resourceCulture);
-                return ((System.Drawing.Bitmap)(obj));
-            }
-        }
-        
-        public static System.Drawing.Bitmap Delete {
-            get {
-                object obj = ResourceManager.GetObject("Delete", resourceCulture);
-                return ((System.Drawing.Bitmap)(obj));
-            }
-        }
-        
-        public static System.Drawing.Bitmap DeleteFolder {
-            get {
-                object obj = ResourceManager.GetObject("DeleteFolder", resourceCulture);
-                return ((System.Drawing.Bitmap)(obj));
-            }
-        }
-        
-        public static System.Drawing.Bitmap Document {
-            get {
-                object obj = ResourceManager.GetObject("Document", resourceCulture);
-                return ((System.Drawing.Bitmap)(obj));
-            }
-        }
-        
-        public static System.Drawing.Bitmap Drive {
-            get {
-                object obj = ResourceManager.GetObject("Drive", resourceCulture);
-                return ((System.Drawing.Bitmap)(obj));
-            }
-        }
-        
-        public static System.Drawing.Bitmap Edit {
-            get {
-                object obj = ResourceManager.GetObject("Edit", resourceCulture);
-                return ((System.Drawing.Bitmap)(obj));
-            }
-        }
-        
-        public static System.Drawing.Bitmap EditInformation {
-            get {
-                object obj = ResourceManager.GetObject("EditInformation", resourceCulture);
-                return ((System.Drawing.Bitmap)(obj));
-            }
-        }
-        
-        public static System.Drawing.Bitmap EditTable {
-            get {
-                object obj = ResourceManager.GetObject("EditTable", resourceCulture);
-                return ((System.Drawing.Bitmap)(obj));
-            }
-        }
-        
-        public static System.Drawing.Bitmap Enum {
-            get {
-                object obj = ResourceManager.GetObject("Enum", resourceCulture);
-                return ((System.Drawing.Bitmap)(obj));
-            }
-        }
-        
-        public static System.Drawing.Bitmap EnumItem {
-            get {
-                object obj = ResourceManager.GetObject("EnumItem", resourceCulture);
-                return ((System.Drawing.Bitmap)(obj));
-            }
-        }
-        
-        public static System.Drawing.Bitmap Error {
-            get {
-                object obj = ResourceManager.GetObject("Error", resourceCulture);
-                return ((System.Drawing.Bitmap)(obj));
-            }
-        }
-        
-        public static System.Drawing.Bitmap Event {
-            get {
-                object obj = ResourceManager.GetObject("Event", resourceCulture);
-                return ((System.Drawing.Bitmap)(obj));
-            }
-        }
-        
-        public static System.Drawing.Bitmap Exception {
-            get {
-                object obj = ResourceManager.GetObject("Exception", resourceCulture);
-                return ((System.Drawing.Bitmap)(obj));
-            }
-        }
-        
-        public static System.Drawing.Bitmap ExecutablePaused {
-            get {
-                object obj = ResourceManager.GetObject("ExecutablePaused", resourceCulture);
-                return ((System.Drawing.Bitmap)(obj));
-            }
-        }
-        
-        public static System.Drawing.Bitmap ExecutablePrepared {
-            get {
-                object obj = ResourceManager.GetObject("ExecutablePrepared", resourceCulture);
-                return ((System.Drawing.Bitmap)(obj));
-            }
-        }
-        
-        public static System.Drawing.Bitmap ExecutableStarted {
-            get {
-                object obj = ResourceManager.GetObject("ExecutableStarted", resourceCulture);
-                return ((System.Drawing.Bitmap)(obj));
-            }
-        }
-        
-        public static System.Drawing.Bitmap ExecutableStopped {
-            get {
-                object obj = ResourceManager.GetObject("ExecutableStopped", resourceCulture);
-                return ((System.Drawing.Bitmap)(obj));
-            }
-        }
-        
-        public static System.Drawing.Bitmap Expand {
-            get {
-                object obj = ResourceManager.GetObject("Expand", resourceCulture);
-                return ((System.Drawing.Bitmap)(obj));
-            }
-        }
-        
-        public static System.Drawing.Bitmap Field {
-            get {
-                object obj = ResourceManager.GetObject("Field", resourceCulture);
-                return ((System.Drawing.Bitmap)(obj));
-            }
-        }
-        
-        public static System.Drawing.Bitmap File {
-            get {
-                object obj = ResourceManager.GetObject("File", resourceCulture);
-                return ((System.Drawing.Bitmap)(obj));
-            }
-        }
-        
-        public static System.Drawing.Bitmap FlagBlue {
-            get {
-                object obj = ResourceManager.GetObject("FlagBlue", resourceCulture);
-                return ((System.Drawing.Bitmap)(obj));
-            }
-        }
-        
-        public static System.Drawing.Bitmap FlagGreen {
-            get {
-                object obj = ResourceManager.GetObject("FlagGreen", resourceCulture);
-                return ((System.Drawing.Bitmap)(obj));
-            }
-        }
-        
-        public static System.Drawing.Bitmap FlagRed {
-            get {
-                object obj = ResourceManager.GetObject("FlagRed", resourceCulture);
-                return ((System.Drawing.Bitmap)(obj));
-            }
-        }
-        
-        public static System.Drawing.Bitmap FormulaEvaluator {
-            get {
-                object obj = ResourceManager.GetObject("FormulaEvaluator", resourceCulture);
-                return ((System.Drawing.Bitmap)(obj));
-            }
-        }
-        
-        public static System.Drawing.Bitmap Function {
-            get {
-                object obj = ResourceManager.GetObject("Function", resourceCulture);
-                return ((System.Drawing.Bitmap)(obj));
-            }
-        }
-        
-        public static System.Drawing.Bitmap Image {
-            get {
-                object obj = ResourceManager.GetObject("Image", resourceCulture);
-                return ((System.Drawing.Bitmap)(obj));
-            }
-        }
-        
-        public static System.Drawing.Bitmap Install {
-            get {
-                object obj = ResourceManager.GetObject("Install", resourceCulture);
-                return ((System.Drawing.Bitmap)(obj));
-            }
-        }
-        
-        public static System.Drawing.Bitmap Interface {
-            get {
-                object obj = ResourceManager.GetObject("Interface", resourceCulture);
-                return ((System.Drawing.Bitmap)(obj));
-            }
-        }
-        
-        public static System.Drawing.Bitmap Internet {
-            get {
-                object obj = ResourceManager.GetObject("Internet", resourceCulture);
-                return ((System.Drawing.Bitmap)(obj));
-            }
-        }
-        
-        public static System.Drawing.Bitmap Library {
-            get {
-                object obj = ResourceManager.GetObject("Library", resourceCulture);
-                return ((System.Drawing.Bitmap)(obj));
-            }
-        }
-        
-        public static System.Drawing.Bitmap Macro {
-            get {
-                object obj = ResourceManager.GetObject("Macro", resourceCulture);
-                return ((System.Drawing.Bitmap)(obj));
-            }
-        }
-        
-        public static System.Drawing.Bitmap Map {
-            get {
-                object obj = ResourceManager.GetObject("Map", resourceCulture);
-                return ((System.Drawing.Bitmap)(obj));
-            }
-        }
-        
-        public static System.Drawing.Bitmap MapItem {
-            get {
-                object obj = ResourceManager.GetObject("MapItem", resourceCulture);
-                return ((System.Drawing.Bitmap)(obj));
-            }
-        }
-        
-        public static System.Drawing.Bitmap Method {
-            get {
-                object obj = ResourceManager.GetObject("Method", resourceCulture);
-                return ((System.Drawing.Bitmap)(obj));
-            }
-        }
-        
-        public static System.Drawing.Bitmap MethodOverload {
-            get {
-                object obj = ResourceManager.GetObject("MethodOverload", resourceCulture);
-                return ((System.Drawing.Bitmap)(obj));
-            }
-        }
-        
-        public static System.Drawing.Bitmap Module {
-            get {
-                object obj = ResourceManager.GetObject("Module", resourceCulture);
-                return ((System.Drawing.Bitmap)(obj));
-            }
-        }
-        
-        public static System.Drawing.Bitmap Namespace {
-            get {
-                object obj = ResourceManager.GetObject("Namespace", resourceCulture);
-                return ((System.Drawing.Bitmap)(obj));
-            }
-        }
-        
-        public static System.Drawing.Bitmap NetworkConnections {
-            get {
-                object obj = ResourceManager.GetObject("NetworkConnections", resourceCulture);
-                return ((System.Drawing.Bitmap)(obj));
-            }
-        }
-        
-        public static System.Drawing.Bitmap NewDocument {
-            get {
-                object obj = ResourceManager.GetObject("NewDocument", resourceCulture);
-                return ((System.Drawing.Bitmap)(obj));
-            }
-        }
-        
-        public static System.Drawing.Bitmap NewFolder {
-            get {
-                object obj = ResourceManager.GetObject("NewFolder", resourceCulture);
-                return ((System.Drawing.Bitmap)(obj));
-            }
-        }
-        
-        public static System.Drawing.Bitmap Nothing {
-            get {
-                object obj = ResourceManager.GetObject("Nothing", resourceCulture);
-                return ((System.Drawing.Bitmap)(obj));
-            }
-        }
-        
-        public static System.Drawing.Bitmap Object {
-            get {
-                object obj = ResourceManager.GetObject("Object", resourceCulture);
-                return ((System.Drawing.Bitmap)(obj));
-            }
-        }
-        
-        public static System.Drawing.Bitmap Open {
-            get {
-                object obj = ResourceManager.GetObject("Open", resourceCulture);
-                return ((System.Drawing.Bitmap)(obj));
-            }
-        }
-        
-        public static System.Drawing.Bitmap Operator {
-            get {
-                object obj = ResourceManager.GetObject("Operator", resourceCulture);
-                return ((System.Drawing.Bitmap)(obj));
-            }
-        }
-        
-        public static System.Drawing.Bitmap OrgChart {
-            get {
-                object obj = ResourceManager.GetObject("OrgChart", resourceCulture);
-                return ((System.Drawing.Bitmap)(obj));
-            }
-        }
-        
-        public static System.Drawing.Bitmap Paste {
-            get {
-                object obj = ResourceManager.GetObject("Paste", resourceCulture);
-                return ((System.Drawing.Bitmap)(obj));
-            }
-        }
-        
-        public static System.Drawing.Bitmap Pause {
-            get {
-                object obj = ResourceManager.GetObject("Pause", resourceCulture);
-                return ((System.Drawing.Bitmap)(obj));
-            }
-        }
-        
-        public static System.Drawing.Icon Performance {
-            get {
-                object obj = ResourceManager.GetObject("Performance", resourceCulture);
-                return ((System.Drawing.Icon)(obj));
-            }
-        }
-        
-        public static System.Drawing.Bitmap Play {
-            get {
-                object obj = ResourceManager.GetObject("Play", resourceCulture);
-                return ((System.Drawing.Bitmap)(obj));
-            }
-        }
-        
-        public static System.Drawing.Bitmap Pointer {
-            get {
-                object obj = ResourceManager.GetObject("Pointer", resourceCulture);
-                return ((System.Drawing.Bitmap)(obj));
-            }
-        }
-        
-        public static System.Drawing.Bitmap Print {
-            get {
-                object obj = ResourceManager.GetObject("Print", resourceCulture);
-                return ((System.Drawing.Bitmap)(obj));
-            }
-        }
-        
-        public static System.Drawing.Bitmap PrintPreview {
-            get {
-                object obj = ResourceManager.GetObject("PrintPreview", resourceCulture);
-                return ((System.Drawing.Bitmap)(obj));
-            }
-        }
-        
-        public static System.Drawing.Bitmap Properties {
-            get {
-                object obj = ResourceManager.GetObject("Properties", resourceCulture);
-                return ((System.Drawing.Bitmap)(obj));
-            }
-        }
-        
-        public static System.Drawing.Bitmap ProtectForm {
-            get {
-                object obj = ResourceManager.GetObject("ProtectForm", resourceCulture);
-                return ((System.Drawing.Bitmap)(obj));
-            }
-        }
-        
-        public static System.Drawing.Bitmap Redo {
-            get {
-                object obj = ResourceManager.GetObject("Redo", resourceCulture);
-                return ((System.Drawing.Bitmap)(obj));
-            }
-        }
-        
-        public static System.Drawing.Bitmap RefreshDocument {
-            get {
-                object obj = ResourceManager.GetObject("RefreshDocument", resourceCulture);
-                return ((System.Drawing.Bitmap)(obj));
-            }
-        }
-        
-        public static System.Drawing.Bitmap Remove {
-            get {
-                object obj = ResourceManager.GetObject("Remove", resourceCulture);
-                return ((System.Drawing.Bitmap)(obj));
-            }
-        }
-        
-        public static System.Drawing.Bitmap Restart {
-            get {
-                object obj = ResourceManager.GetObject("Restart", resourceCulture);
-                return ((System.Drawing.Bitmap)(obj));
-            }
-        }
-        
-        public static System.Drawing.Bitmap Save {
-            get {
-                object obj = ResourceManager.GetObject("Save", resourceCulture);
-                return ((System.Drawing.Bitmap)(obj));
-            }
-        }
-        
-        public static System.Drawing.Bitmap SaveAll {
-            get {
-                object obj = ResourceManager.GetObject("SaveAll", resourceCulture);
-                return ((System.Drawing.Bitmap)(obj));
-            }
-        }
-        
-        public static System.Drawing.Bitmap Script {
-            get {
-                object obj = ResourceManager.GetObject("Script", resourceCulture);
-                return ((System.Drawing.Bitmap)(obj));
-            }
-        }
-        
-        public static System.Drawing.Bitmap Sort {
-            get {
-                object obj = ResourceManager.GetObject("Sort", resourceCulture);
-                return ((System.Drawing.Bitmap)(obj));
-            }
-        }
-        
-        public static System.Drawing.Bitmap SortUp {
-            get {
-                object obj = ResourceManager.GetObject("SortUp", resourceCulture);
-                return ((System.Drawing.Bitmap)(obj));
-            }
-        }
-        
-        public static System.Drawing.Bitmap Stop {
-            get {
-                object obj = ResourceManager.GetObject("Stop", resourceCulture);
-                return ((System.Drawing.Bitmap)(obj));
-            }
-        }
-        
-        public static System.Drawing.Bitmap Structure {
-            get {
-                object obj = ResourceManager.GetObject("Structure", resourceCulture);
-                return ((System.Drawing.Bitmap)(obj));
-            }
-        }
-        
-        public static System.Drawing.Bitmap Table {
-            get {
-                object obj = ResourceManager.GetObject("Table", resourceCulture);
-                return ((System.Drawing.Bitmap)(obj));
-            }
-        }
-        
-        public static System.Drawing.Bitmap Template {
-            get {
-                object obj = ResourceManager.GetObject("Template", resourceCulture);
-                return ((System.Drawing.Bitmap)(obj));
-            }
-        }
-        
-        public static System.Drawing.Bitmap Timer {
-            get {
-                object obj = ResourceManager.GetObject("Timer", resourceCulture);
-                return ((System.Drawing.Bitmap)(obj));
-            }
-        }
-        
-        public static System.Drawing.Bitmap Type {
-            get {
-                object obj = ResourceManager.GetObject("Type", resourceCulture);
-                return ((System.Drawing.Bitmap)(obj));
-            }
-        }
-        
-        public static System.Drawing.Bitmap TypeDef {
-            get {
-                object obj = ResourceManager.GetObject("TypeDef", resourceCulture);
-                return ((System.Drawing.Bitmap)(obj));
-            }
-        }
-        
-        public static System.Drawing.Bitmap Undo {
-            get {
-                object obj = ResourceManager.GetObject("Undo", resourceCulture);
-                return ((System.Drawing.Bitmap)(obj));
-            }
-        }
-        
-        public static System.Drawing.Bitmap Union {
-            get {
-                object obj = ResourceManager.GetObject("Union", resourceCulture);
-                return ((System.Drawing.Bitmap)(obj));
-            }
-        }
-        
-        public static System.Drawing.Bitmap User {
-            get {
-                object obj = ResourceManager.GetObject("User", resourceCulture);
-                return ((System.Drawing.Bitmap)(obj));
-            }
-        }
-        
-        public static System.Drawing.Bitmap UserAccounts {
-            get {
-                object obj = ResourceManager.GetObject("UserAccounts", resourceCulture);
-                return ((System.Drawing.Bitmap)(obj));
-            }
-        }
-        
-        public static System.Drawing.Bitmap ValueType {
-            get {
-                object obj = ResourceManager.GetObject("ValueType", resourceCulture);
-                return ((System.Drawing.Bitmap)(obj));
-            }
-        }
-        
-        public static System.Drawing.Bitmap Warning {
-            get {
-                object obj = ResourceManager.GetObject("Warning", resourceCulture);
-                return ((System.Drawing.Bitmap)(obj));
-            }
-        }
-        
-        public static System.Drawing.Bitmap Windows {
-            get {
-                object obj = ResourceManager.GetObject("Windows", resourceCulture);
-                return ((System.Drawing.Bitmap)(obj));
-            }
-        }
-        
-        public static System.Drawing.Bitmap Zoom {
-            get {
-                object obj = ResourceManager.GetObject("Zoom", resourceCulture);
-                return ((System.Drawing.Bitmap)(obj));
-            }
-        }
-        
-        public static System.Drawing.Bitmap ZoomIn {
-            get {
-                object obj = ResourceManager.GetObject("ZoomIn", resourceCulture);
-                return ((System.Drawing.Bitmap)(obj));
-            }
-        }
-        
-        public static System.Drawing.Bitmap ZoomOut {
-            get {
-                object obj = ResourceManager.GetObject("ZoomOut", resourceCulture);
-                return ((System.Drawing.Bitmap)(obj));
-            }
-        }
-    }
+        return resourceMan;
+      }
+    }
+
+    /// <summary>
+    ///   Overrides the current thread's CurrentUICulture property for all
+    ///   resource lookups using this strongly typed resource class.
+    /// </summary>
+    [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
+    public static global::System.Globalization.CultureInfo Culture {
+      get {
+        return resourceCulture;
+      }
+      set {
+        resourceCulture = value;
+      }
+    }
+
+    public static System.Drawing.Bitmap ActualSize {
+      get {
+        object obj = ResourceManager.GetObject("ActualSize", resourceCulture);
+        return ((System.Drawing.Bitmap)(obj));
+      }
+    }
+
+    public static System.Drawing.Bitmap Add {
+      get {
+        object obj = ResourceManager.GetObject("Add", resourceCulture);
+        return ((System.Drawing.Bitmap)(obj));
+      }
+    }
+
+    public static System.Drawing.Bitmap ArrowDown {
+      get {
+        object obj = ResourceManager.GetObject("ArrowDown", resourceCulture);
+        return ((System.Drawing.Bitmap)(obj));
+      }
+    }
+
+    public static System.Drawing.Bitmap ArrowUp {
+      get {
+        object obj = ResourceManager.GetObject("ArrowUp", resourceCulture);
+        return ((System.Drawing.Bitmap)(obj));
+      }
+    }
+
+    public static System.Drawing.Bitmap Assembly {
+      get {
+        object obj = ResourceManager.GetObject("Assembly", resourceCulture);
+        return ((System.Drawing.Bitmap)(obj));
+      }
+    }
+
+    public static System.Drawing.Bitmap Breakpoint {
+      get {
+        object obj = ResourceManager.GetObject("Breakpoint", resourceCulture);
+        return ((System.Drawing.Bitmap)(obj));
+      }
+    }
+
+    public static System.Drawing.Bitmap BreakpointActive {
+      get {
+        object obj = ResourceManager.GetObject("BreakpointActive", resourceCulture);
+        return ((System.Drawing.Bitmap)(obj));
+      }
+    }
+
+    public static System.Drawing.Bitmap BreakpointInactive {
+      get {
+        object obj = ResourceManager.GetObject("BreakpointInactive", resourceCulture);
+        return ((System.Drawing.Bitmap)(obj));
+      }
+    }
+
+    public static System.Drawing.Bitmap Class {
+      get {
+        object obj = ResourceManager.GetObject("Class", resourceCulture);
+        return ((System.Drawing.Bitmap)(obj));
+      }
+    }
+
+    public static System.Drawing.Bitmap Collapse {
+      get {
+        object obj = ResourceManager.GetObject("Collapse", resourceCulture);
+        return ((System.Drawing.Bitmap)(obj));
+      }
+    }
+
+    public static System.Drawing.Bitmap Comment {
+      get {
+        object obj = ResourceManager.GetObject("Comment", resourceCulture);
+        return ((System.Drawing.Bitmap)(obj));
+      }
+    }
+
+    public static System.Drawing.Bitmap Component {
+      get {
+        object obj = ResourceManager.GetObject("Component", resourceCulture);
+        return ((System.Drawing.Bitmap)(obj));
+      }
+    }
+
+    public static System.Drawing.Bitmap Constant {
+      get {
+        object obj = ResourceManager.GetObject("Constant", resourceCulture);
+        return ((System.Drawing.Bitmap)(obj));
+      }
+    }
+
+    public static System.Drawing.Bitmap Control {
+      get {
+        object obj = ResourceManager.GetObject("Control", resourceCulture);
+        return ((System.Drawing.Bitmap)(obj));
+      }
+    }
+
+    public static System.Drawing.Bitmap Copy {
+      get {
+        object obj = ResourceManager.GetObject("Copy", resourceCulture);
+        return ((System.Drawing.Bitmap)(obj));
+      }
+    }
+
+    public static System.Drawing.Bitmap Cut {
+      get {
+        object obj = ResourceManager.GetObject("Cut", resourceCulture);
+        return ((System.Drawing.Bitmap)(obj));
+      }
+    }
+
+    public static System.Drawing.Bitmap Database {
+      get {
+        object obj = ResourceManager.GetObject("Database", resourceCulture);
+        return ((System.Drawing.Bitmap)(obj));
+      }
+    }
+
+    public static System.Drawing.Bitmap Delegate {
+      get {
+        object obj = ResourceManager.GetObject("Delegate", resourceCulture);
+        return ((System.Drawing.Bitmap)(obj));
+      }
+    }
+
+    public static System.Drawing.Bitmap Delete {
+      get {
+        object obj = ResourceManager.GetObject("Delete", resourceCulture);
+        return ((System.Drawing.Bitmap)(obj));
+      }
+    }
+
+    public static System.Drawing.Bitmap DeleteFolder {
+      get {
+        object obj = ResourceManager.GetObject("DeleteFolder", resourceCulture);
+        return ((System.Drawing.Bitmap)(obj));
+      }
+    }
+
+    public static System.Drawing.Bitmap Document {
+      get {
+        object obj = ResourceManager.GetObject("Document", resourceCulture);
+        return ((System.Drawing.Bitmap)(obj));
+      }
+    }
+
+    public static System.Drawing.Bitmap Drive {
+      get {
+        object obj = ResourceManager.GetObject("Drive", resourceCulture);
+        return ((System.Drawing.Bitmap)(obj));
+      }
+    }
+
+    public static System.Drawing.Bitmap Edit {
+      get {
+        object obj = ResourceManager.GetObject("Edit", resourceCulture);
+        return ((System.Drawing.Bitmap)(obj));
+      }
+    }
+
+    public static System.Drawing.Bitmap EditInformation {
+      get {
+        object obj = ResourceManager.GetObject("EditInformation", resourceCulture);
+        return ((System.Drawing.Bitmap)(obj));
+      }
+    }
+
+    public static System.Drawing.Bitmap EditTable {
+      get {
+        object obj = ResourceManager.GetObject("EditTable", resourceCulture);
+        return ((System.Drawing.Bitmap)(obj));
+      }
+    }
+
+    public static System.Drawing.Bitmap Enum {
+      get {
+        object obj = ResourceManager.GetObject("Enum", resourceCulture);
+        return ((System.Drawing.Bitmap)(obj));
+      }
+    }
+
+    public static System.Drawing.Bitmap EnumItem {
+      get {
+        object obj = ResourceManager.GetObject("EnumItem", resourceCulture);
+        return ((System.Drawing.Bitmap)(obj));
+      }
+    }
+
+    public static System.Drawing.Bitmap Error {
+      get {
+        object obj = ResourceManager.GetObject("Error", resourceCulture);
+        return ((System.Drawing.Bitmap)(obj));
+      }
+    }
+
+    public static System.Drawing.Bitmap Event {
+      get {
+        object obj = ResourceManager.GetObject("Event", resourceCulture);
+        return ((System.Drawing.Bitmap)(obj));
+      }
+    }
+
+    public static System.Drawing.Bitmap Exception {
+      get {
+        object obj = ResourceManager.GetObject("Exception", resourceCulture);
+        return ((System.Drawing.Bitmap)(obj));
+      }
+    }
+
+    public static System.Drawing.Bitmap ExecutablePaused {
+      get {
+        object obj = ResourceManager.GetObject("ExecutablePaused", resourceCulture);
+        return ((System.Drawing.Bitmap)(obj));
+      }
+    }
+
+    public static System.Drawing.Bitmap ExecutablePrepared {
+      get {
+        object obj = ResourceManager.GetObject("ExecutablePrepared", resourceCulture);
+        return ((System.Drawing.Bitmap)(obj));
+      }
+    }
+
+    public static System.Drawing.Bitmap ExecutableStarted {
+      get {
+        object obj = ResourceManager.GetObject("ExecutableStarted", resourceCulture);
+        return ((System.Drawing.Bitmap)(obj));
+      }
+    }
+
+    public static System.Drawing.Bitmap ExecutableStopped {
+      get {
+        object obj = ResourceManager.GetObject("ExecutableStopped", resourceCulture);
+        return ((System.Drawing.Bitmap)(obj));
+      }
+    }
+
+    public static System.Drawing.Bitmap Expand {
+      get {
+        object obj = ResourceManager.GetObject("Expand", resourceCulture);
+        return ((System.Drawing.Bitmap)(obj));
+      }
+    }
+
+    public static System.Drawing.Bitmap Field {
+      get {
+        object obj = ResourceManager.GetObject("Field", resourceCulture);
+        return ((System.Drawing.Bitmap)(obj));
+      }
+    }
+
+    public static System.Drawing.Bitmap File {
+      get {
+        object obj = ResourceManager.GetObject("File", resourceCulture);
+        return ((System.Drawing.Bitmap)(obj));
+      }
+    }
+
+    public static System.Drawing.Bitmap FlagBlue {
+      get {
+        object obj = ResourceManager.GetObject("FlagBlue", resourceCulture);
+        return ((System.Drawing.Bitmap)(obj));
+      }
+    }
+
+    public static System.Drawing.Bitmap FlagGreen {
+      get {
+        object obj = ResourceManager.GetObject("FlagGreen", resourceCulture);
+        return ((System.Drawing.Bitmap)(obj));
+      }
+    }
+
+    public static System.Drawing.Bitmap FlagRed {
+      get {
+        object obj = ResourceManager.GetObject("FlagRed", resourceCulture);
+        return ((System.Drawing.Bitmap)(obj));
+      }
+    }
+
+    public static System.Drawing.Bitmap FormulaEvaluator {
+      get {
+        object obj = ResourceManager.GetObject("FormulaEvaluator", resourceCulture);
+        return ((System.Drawing.Bitmap)(obj));
+      }
+    }
+
+    public static System.Drawing.Bitmap Function {
+      get {
+        object obj = ResourceManager.GetObject("Function", resourceCulture);
+        return ((System.Drawing.Bitmap)(obj));
+      }
+    }
+
+    public static System.Drawing.Bitmap Image {
+      get {
+        object obj = ResourceManager.GetObject("Image", resourceCulture);
+        return ((System.Drawing.Bitmap)(obj));
+      }
+    }
+
+    public static System.Drawing.Bitmap Install {
+      get {
+        object obj = ResourceManager.GetObject("Install", resourceCulture);
+        return ((System.Drawing.Bitmap)(obj));
+      }
+    }
+
+    public static System.Drawing.Bitmap Interface {
+      get {
+        object obj = ResourceManager.GetObject("Interface", resourceCulture);
+        return ((System.Drawing.Bitmap)(obj));
+      }
+    }
+
+    public static System.Drawing.Bitmap Internet {
+      get {
+        object obj = ResourceManager.GetObject("Internet", resourceCulture);
+        return ((System.Drawing.Bitmap)(obj));
+      }
+    }
+
+    public static System.Drawing.Bitmap Library {
+      get {
+        object obj = ResourceManager.GetObject("Library", resourceCulture);
+        return ((System.Drawing.Bitmap)(obj));
+      }
+    }
+
+    public static System.Drawing.Bitmap Macro {
+      get {
+        object obj = ResourceManager.GetObject("Macro", resourceCulture);
+        return ((System.Drawing.Bitmap)(obj));
+      }
+    }
+
+    public static System.Drawing.Bitmap Map {
+      get {
+        object obj = ResourceManager.GetObject("Map", resourceCulture);
+        return ((System.Drawing.Bitmap)(obj));
+      }
+    }
+
+    public static System.Drawing.Bitmap MapItem {
+      get {
+        object obj = ResourceManager.GetObject("MapItem", resourceCulture);
+        return ((System.Drawing.Bitmap)(obj));
+      }
+    }
+
+    public static System.Drawing.Bitmap Method {
+      get {
+        object obj = ResourceManager.GetObject("Method", resourceCulture);
+        return ((System.Drawing.Bitmap)(obj));
+      }
+    }
+
+    public static System.Drawing.Bitmap MethodOverload {
+      get {
+        object obj = ResourceManager.GetObject("MethodOverload", resourceCulture);
+        return ((System.Drawing.Bitmap)(obj));
+      }
+    }
+
+    public static System.Drawing.Bitmap Module {
+      get {
+        object obj = ResourceManager.GetObject("Module", resourceCulture);
+        return ((System.Drawing.Bitmap)(obj));
+      }
+    }
+
+    public static System.Drawing.Bitmap Namespace {
+      get {
+        object obj = ResourceManager.GetObject("Namespace", resourceCulture);
+        return ((System.Drawing.Bitmap)(obj));
+      }
+    }
+
+    public static System.Drawing.Bitmap NetworkConnections {
+      get {
+        object obj = ResourceManager.GetObject("NetworkConnections", resourceCulture);
+        return ((System.Drawing.Bitmap)(obj));
+      }
+    }
+
+    public static System.Drawing.Bitmap NewDocument {
+      get {
+        object obj = ResourceManager.GetObject("NewDocument", resourceCulture);
+        return ((System.Drawing.Bitmap)(obj));
+      }
+    }
+
+    public static System.Drawing.Bitmap NewFolder {
+      get {
+        object obj = ResourceManager.GetObject("NewFolder", resourceCulture);
+        return ((System.Drawing.Bitmap)(obj));
+      }
+    }
+
+    public static System.Drawing.Bitmap Nothing {
+      get {
+        object obj = ResourceManager.GetObject("Nothing", resourceCulture);
+        return ((System.Drawing.Bitmap)(obj));
+      }
+    }
+
+    public static System.Drawing.Bitmap Object {
+      get {
+        object obj = ResourceManager.GetObject("Object", resourceCulture);
+        return ((System.Drawing.Bitmap)(obj));
+      }
+    }
+
+    public static System.Drawing.Bitmap Open {
+      get {
+        object obj = ResourceManager.GetObject("Open", resourceCulture);
+        return ((System.Drawing.Bitmap)(obj));
+      }
+    }
+
+    public static System.Drawing.Bitmap Operator {
+      get {
+        object obj = ResourceManager.GetObject("Operator", resourceCulture);
+        return ((System.Drawing.Bitmap)(obj));
+      }
+    }
+
+    public static System.Drawing.Bitmap OrgChart {
+      get {
+        object obj = ResourceManager.GetObject("OrgChart", resourceCulture);
+        return ((System.Drawing.Bitmap)(obj));
+      }
+    }
+
+    public static System.Drawing.Bitmap Paste {
+      get {
+        object obj = ResourceManager.GetObject("Paste", resourceCulture);
+        return ((System.Drawing.Bitmap)(obj));
+      }
+    }
+
+    public static System.Drawing.Bitmap Pause {
+      get {
+        object obj = ResourceManager.GetObject("Pause", resourceCulture);
+        return ((System.Drawing.Bitmap)(obj));
+      }
+    }
+
+    public static System.Drawing.Icon Performance {
+      get {
+        object obj = ResourceManager.GetObject("Performance", resourceCulture);
+        return ((System.Drawing.Icon)(obj));
+      }
+    }
+
+    public static System.Drawing.Bitmap Play {
+      get {
+        object obj = ResourceManager.GetObject("Play", resourceCulture);
+        return ((System.Drawing.Bitmap)(obj));
+      }
+    }
+
+    public static System.Drawing.Bitmap Pointer {
+      get {
+        object obj = ResourceManager.GetObject("Pointer", resourceCulture);
+        return ((System.Drawing.Bitmap)(obj));
+      }
+    }
+
+    public static System.Drawing.Bitmap Print {
+      get {
+        object obj = ResourceManager.GetObject("Print", resourceCulture);
+        return ((System.Drawing.Bitmap)(obj));
+      }
+    }
+
+    public static System.Drawing.Bitmap PrintPreview {
+      get {
+        object obj = ResourceManager.GetObject("PrintPreview", resourceCulture);
+        return ((System.Drawing.Bitmap)(obj));
+      }
+    }
+
+    public static System.Drawing.Bitmap Properties {
+      get {
+        object obj = ResourceManager.GetObject("Properties", resourceCulture);
+        return ((System.Drawing.Bitmap)(obj));
+      }
+    }
+
+    public static System.Drawing.Bitmap ProtectForm {
+      get {
+        object obj = ResourceManager.GetObject("ProtectForm", resourceCulture);
+        return ((System.Drawing.Bitmap)(obj));
+      }
+    }
+
+    public static System.Drawing.Bitmap Redo {
+      get {
+        object obj = ResourceManager.GetObject("Redo", resourceCulture);
+        return ((System.Drawing.Bitmap)(obj));
+      }
+    }
+
+    public static System.Drawing.Bitmap RefreshDocument {
+      get {
+        object obj = ResourceManager.GetObject("RefreshDocument", resourceCulture);
+        return ((System.Drawing.Bitmap)(obj));
+      }
+    }
+
+    public static System.Drawing.Bitmap Remove {
+      get {
+        object obj = ResourceManager.GetObject("Remove", resourceCulture);
+        return ((System.Drawing.Bitmap)(obj));
+      }
+    }
+
+    public static System.Drawing.Bitmap Restart {
+      get {
+        object obj = ResourceManager.GetObject("Restart", resourceCulture);
+        return ((System.Drawing.Bitmap)(obj));
+      }
+    }
+
+    public static System.Drawing.Bitmap Save {
+      get {
+        object obj = ResourceManager.GetObject("Save", resourceCulture);
+        return ((System.Drawing.Bitmap)(obj));
+      }
+    }
+
+    public static System.Drawing.Bitmap SaveAll {
+      get {
+        object obj = ResourceManager.GetObject("SaveAll", resourceCulture);
+        return ((System.Drawing.Bitmap)(obj));
+      }
+    }
+
+    public static System.Drawing.Bitmap Script {
+      get {
+        object obj = ResourceManager.GetObject("Script", resourceCulture);
+        return ((System.Drawing.Bitmap)(obj));
+      }
+    }
+
+    public static System.Drawing.Bitmap Sort {
+      get {
+        object obj = ResourceManager.GetObject("Sort", resourceCulture);
+        return ((System.Drawing.Bitmap)(obj));
+      }
+    }
+
+    public static System.Drawing.Bitmap SortUp {
+      get {
+        object obj = ResourceManager.GetObject("SortUp", resourceCulture);
+        return ((System.Drawing.Bitmap)(obj));
+      }
+    }
+
+    public static System.Drawing.Bitmap Stop {
+      get {
+        object obj = ResourceManager.GetObject("Stop", resourceCulture);
+        return ((System.Drawing.Bitmap)(obj));
+      }
+    }
+
+    public static System.Drawing.Bitmap Structure {
+      get {
+        object obj = ResourceManager.GetObject("Structure", resourceCulture);
+        return ((System.Drawing.Bitmap)(obj));
+      }
+    }
+
+    public static System.Drawing.Bitmap Table {
+      get {
+        object obj = ResourceManager.GetObject("Table", resourceCulture);
+        return ((System.Drawing.Bitmap)(obj));
+      }
+    }
+
+    public static System.Drawing.Bitmap Template {
+      get {
+        object obj = ResourceManager.GetObject("Template", resourceCulture);
+        return ((System.Drawing.Bitmap)(obj));
+      }
+    }
+
+    public static System.Drawing.Bitmap Timer {
+      get {
+        object obj = ResourceManager.GetObject("Timer", resourceCulture);
+        return ((System.Drawing.Bitmap)(obj));
+      }
+    }
+
+    public static System.Drawing.Bitmap Type {
+      get {
+        object obj = ResourceManager.GetObject("Type", resourceCulture);
+        return ((System.Drawing.Bitmap)(obj));
+      }
+    }
+
+    public static System.Drawing.Bitmap TypeDef {
+      get {
+        object obj = ResourceManager.GetObject("TypeDef", resourceCulture);
+        return ((System.Drawing.Bitmap)(obj));
+      }
+    }
+
+    public static System.Drawing.Bitmap Undo {
+      get {
+        object obj = ResourceManager.GetObject("Undo", resourceCulture);
+        return ((System.Drawing.Bitmap)(obj));
+      }
+    }
+
+    public static System.Drawing.Bitmap Union {
+      get {
+        object obj = ResourceManager.GetObject("Union", resourceCulture);
+        return ((System.Drawing.Bitmap)(obj));
+      }
+    }
+
+    public static System.Drawing.Bitmap User {
+      get {
+        object obj = ResourceManager.GetObject("User", resourceCulture);
+        return ((System.Drawing.Bitmap)(obj));
+      }
+    }
+
+    public static System.Drawing.Bitmap UserAccounts {
+      get {
+        object obj = ResourceManager.GetObject("UserAccounts", resourceCulture);
+        return ((System.Drawing.Bitmap)(obj));
+      }
+    }
+
+    public static System.Drawing.Bitmap ValueType {
+      get {
+        object obj = ResourceManager.GetObject("ValueType", resourceCulture);
+        return ((System.Drawing.Bitmap)(obj));
+      }
+    }
+
+    public static System.Drawing.Bitmap Warning {
+      get {
+        object obj = ResourceManager.GetObject("Warning", resourceCulture);
+        return ((System.Drawing.Bitmap)(obj));
+      }
+    }
+
+    public static System.Drawing.Bitmap Windows {
+      get {
+        object obj = ResourceManager.GetObject("Windows", resourceCulture);
+        return ((System.Drawing.Bitmap)(obj));
+      }
+    }
+
+    public static System.Drawing.Bitmap Zoom {
+      get {
+        object obj = ResourceManager.GetObject("Zoom", resourceCulture);
+        return ((System.Drawing.Bitmap)(obj));
+      }
+    }
+
+    public static System.Drawing.Bitmap ZoomIn {
+      get {
+        object obj = ResourceManager.GetObject("ZoomIn", resourceCulture);
+        return ((System.Drawing.Bitmap)(obj));
+      }
+    }
+
+    public static System.Drawing.Bitmap ZoomOut {
+      get {
+        object obj = ResourceManager.GetObject("ZoomOut", resourceCulture);
+        return ((System.Drawing.Bitmap)(obj));
+      }
+    }
+  }
 }
Index: /trunk/sources/HeuristicLab.Common/3.3/CancelEventArgs.cs
===================================================================
--- /trunk/sources/HeuristicLab.Common/3.3/CancelEventArgs.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.Common/3.3/CancelEventArgs.cs	(revision 4068)
@@ -20,8 +20,4 @@
 #endregion
 
-using System;
-using System.Collections.Generic;
-using System.Linq;
-using System.Text;
 using System.ComponentModel;
 
Index: /trunk/sources/HeuristicLab.Common/3.3/Cloner.cs
===================================================================
--- /trunk/sources/HeuristicLab.Common/3.3/Cloner.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.Common/3.3/Cloner.cs	(revision 4068)
@@ -20,7 +20,5 @@
 #endregion
 
-using System;
 using System.Collections.Generic;
-using System.Text;
 
 namespace HeuristicLab.Common {
Index: /trunk/sources/HeuristicLab.Common/3.3/EnumerableStatisticExtensions.cs
===================================================================
--- /trunk/sources/HeuristicLab.Common/3.3/EnumerableStatisticExtensions.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.Common/3.3/EnumerableStatisticExtensions.cs	(revision 4068)
@@ -22,5 +22,4 @@
 using System;
 using System.Collections.Generic;
-using System.Text;
 using System.Linq;
 
Index: /trunk/sources/HeuristicLab.Common/3.3/ReferenceEqualityComparer.cs
===================================================================
--- /trunk/sources/HeuristicLab.Common/3.3/ReferenceEqualityComparer.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.Common/3.3/ReferenceEqualityComparer.cs	(revision 4068)
@@ -20,7 +20,5 @@
 #endregion
 
-using System;
 using System.Collections.Generic;
-using System.Text;
 
 namespace HeuristicLab.Common {
Index: /trunk/sources/HeuristicLab.Core.Views/3.3/CheckedItemCollectionView.cs
===================================================================
--- /trunk/sources/HeuristicLab.Core.Views/3.3/CheckedItemCollectionView.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.Core.Views/3.3/CheckedItemCollectionView.cs	(revision 4068)
@@ -20,11 +20,4 @@
 #endregion
 
-using System;
-using System.Collections.Generic;
-using System.ComponentModel;
-using System.Drawing;
-using System.Data;
-using System.Linq;
-using System.Text;
 using System.Windows.Forms;
 using HeuristicLab.Collections;
@@ -40,5 +33,5 @@
       set { base.Content = value; }
     }
-    
+
     public CheckedItemCollectionView()
       : base() {
@@ -99,5 +92,5 @@
         }
       }
-    }      
+    }
     #endregion
   }
Index: /trunk/sources/HeuristicLab.Core.Views/3.3/CheckedItemListView.cs
===================================================================
--- /trunk/sources/HeuristicLab.Core.Views/3.3/CheckedItemListView.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.Core.Views/3.3/CheckedItemListView.cs	(revision 4068)
@@ -20,11 +20,4 @@
 #endregion
 
-using System;
-using System.Collections.Generic;
-using System.ComponentModel;
-using System.Drawing;
-using System.Data;
-using System.Linq;
-using System.Text;
 using System.Windows.Forms;
 using HeuristicLab.Collections;
Index: /trunk/sources/HeuristicLab.Core.Views/3.3/ItemCollectionView.Designer.cs
===================================================================
--- /trunk/sources/HeuristicLab.Core.Views/3.3/ItemCollectionView.Designer.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.Core.Views/3.3/ItemCollectionView.Designer.cs	(revision 4068)
@@ -22,5 +22,4 @@
 using System;
 using System.Windows.Forms;
-using System.ComponentModel;
 
 namespace HeuristicLab.Core.Views {
Index: /trunk/sources/HeuristicLab.Core.Views/3.3/ItemCollectionView.cs
===================================================================
--- /trunk/sources/HeuristicLab.Core.Views/3.3/ItemCollectionView.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.Core.Views/3.3/ItemCollectionView.cs	(revision 4068)
@@ -22,5 +22,4 @@
 using System;
 using System.Collections.Generic;
-using System.Linq;
 using System.Windows.Forms;
 using HeuristicLab.Collections;
Index: /trunk/sources/HeuristicLab.Core.Views/3.3/ItemSetView.Designer.cs
===================================================================
--- /trunk/sources/HeuristicLab.Core.Views/3.3/ItemSetView.Designer.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.Core.Views/3.3/ItemSetView.Designer.cs	(revision 4068)
@@ -20,7 +20,4 @@
 #endregion
 
-using System;
-using System.Windows.Forms;
-using System.ComponentModel;
 
 namespace HeuristicLab.Core.Views {
Index: /trunk/sources/HeuristicLab.Core.Views/3.3/ItemSetView.cs
===================================================================
--- /trunk/sources/HeuristicLab.Core.Views/3.3/ItemSetView.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.Core.Views/3.3/ItemSetView.cs	(revision 4068)
@@ -22,5 +22,4 @@
 using System.Collections.Generic;
 using System.Windows.Forms;
-using HeuristicLab.Collections;
 using HeuristicLab.MainForm;
 
Index: /trunk/sources/HeuristicLab.Core.Views/3.3/ItemView.Designer.cs
===================================================================
--- /trunk/sources/HeuristicLab.Core.Views/3.3/ItemView.Designer.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.Core.Views/3.3/ItemView.Designer.cs	(revision 4068)
@@ -20,5 +20,4 @@
 #endregion
 
-using System;
 
 namespace HeuristicLab.Core.Views {
Index: /trunk/sources/HeuristicLab.Core.Views/3.3/ItemView.cs
===================================================================
--- /trunk/sources/HeuristicLab.Core.Views/3.3/ItemView.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.Core.Views/3.3/ItemView.cs	(revision 4068)
@@ -20,8 +20,5 @@
 #endregion
 
-using System;
-using HeuristicLab.MainForm;
 using HeuristicLab.MainForm.WindowsForms;
-using System.Threading;
 
 namespace HeuristicLab.Core.Views {
Index: /trunk/sources/HeuristicLab.Core.Views/3.3/NamedItemCollectionView.Designer.cs
===================================================================
--- /trunk/sources/HeuristicLab.Core.Views/3.3/NamedItemCollectionView.Designer.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.Core.Views/3.3/NamedItemCollectionView.Designer.cs	(revision 4068)
@@ -20,7 +20,4 @@
 #endregion
 
-using System;
-using System.Windows.Forms;
-using System.ComponentModel;
 
 namespace HeuristicLab.Core.Views {
Index: /trunk/sources/HeuristicLab.Core.Views/3.3/NamedItemView.cs
===================================================================
--- /trunk/sources/HeuristicLab.Core.Views/3.3/NamedItemView.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.Core.Views/3.3/NamedItemView.cs	(revision 4068)
@@ -23,5 +23,4 @@
 using System.ComponentModel;
 using System.Windows.Forms;
-using HeuristicLab.Common;
 using HeuristicLab.MainForm;
 
Index: /trunk/sources/HeuristicLab.Core.Views/3.3/OperatorCollectionView.cs
===================================================================
--- /trunk/sources/HeuristicLab.Core.Views/3.3/OperatorCollectionView.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.Core.Views/3.3/OperatorCollectionView.cs	(revision 4068)
@@ -22,5 +22,4 @@
 using System;
 using System.Windows.Forms;
-using HeuristicLab.Collections;
 using HeuristicLab.MainForm;
 using HeuristicLab.PluginInfrastructure;
Index: /trunk/sources/HeuristicLab.Core.Views/3.3/OperatorListView.cs
===================================================================
--- /trunk/sources/HeuristicLab.Core.Views/3.3/OperatorListView.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.Core.Views/3.3/OperatorListView.cs	(revision 4068)
@@ -22,5 +22,4 @@
 using System;
 using System.Windows.Forms;
-using HeuristicLab.Collections;
 using HeuristicLab.MainForm;
 using HeuristicLab.PluginInfrastructure;
Index: /trunk/sources/HeuristicLab.Core.Views/3.3/OperatorSetView.cs
===================================================================
--- /trunk/sources/HeuristicLab.Core.Views/3.3/OperatorSetView.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.Core.Views/3.3/OperatorSetView.cs	(revision 4068)
@@ -22,5 +22,4 @@
 using System;
 using System.Windows.Forms;
-using HeuristicLab.Collections;
 using HeuristicLab.MainForm;
 using HeuristicLab.PluginInfrastructure;
Index: /trunk/sources/HeuristicLab.Core.Views/3.3/ParameterCollectionView.cs
===================================================================
--- /trunk/sources/HeuristicLab.Core.Views/3.3/ParameterCollectionView.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.Core.Views/3.3/ParameterCollectionView.cs	(revision 4068)
@@ -22,5 +22,4 @@
 using System;
 using System.Windows.Forms;
-using HeuristicLab.Collections;
 using HeuristicLab.MainForm;
 
Index: /trunk/sources/HeuristicLab.Core.Views/3.3/ScopeListView.cs
===================================================================
--- /trunk/sources/HeuristicLab.Core.Views/3.3/ScopeListView.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.Core.Views/3.3/ScopeListView.cs	(revision 4068)
@@ -20,5 +20,4 @@
 #endregion
 
-using HeuristicLab.Collections;
 using HeuristicLab.MainForm;
 
Index: /trunk/sources/HeuristicLab.Core.Views/3.3/TypeSelector.cs
===================================================================
--- /trunk/sources/HeuristicLab.Core.Views/3.3/TypeSelector.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.Core.Views/3.3/TypeSelector.cs	(revision 4068)
@@ -21,4 +21,5 @@
 
 using System;
+using System.Collections.Generic;
 using System.Linq;
 using System.Text;
@@ -26,7 +27,6 @@
 using HeuristicLab.Common;
 using HeuristicLab.PluginInfrastructure;
-using System.Collections.Generic;
-
-namespace HeuristicLab.Core.Views { 
+
+namespace HeuristicLab.Core.Views {
   public partial class TypeSelector : UserControl {
     protected List<TreeNode> treeNodes;
Index: /trunk/sources/HeuristicLab.Core.Views/3.3/ValueParameterCollectionView.cs
===================================================================
--- /trunk/sources/HeuristicLab.Core.Views/3.3/ValueParameterCollectionView.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.Core.Views/3.3/ValueParameterCollectionView.cs	(revision 4068)
@@ -22,5 +22,4 @@
 using System;
 using System.Windows.Forms;
-using HeuristicLab.Collections;
 using HeuristicLab.MainForm;
 
Index: /trunk/sources/HeuristicLab.Core.Views/3.3/VariableCollectionView.cs
===================================================================
--- /trunk/sources/HeuristicLab.Core.Views/3.3/VariableCollectionView.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.Core.Views/3.3/VariableCollectionView.cs	(revision 4068)
@@ -20,5 +20,4 @@
 #endregion
 
-using HeuristicLab.Collections;
 using HeuristicLab.MainForm;
 
Index: /trunk/sources/HeuristicLab.Core.Views/3.3/VariableValueView.cs
===================================================================
--- /trunk/sources/HeuristicLab.Core.Views/3.3/VariableValueView.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.Core.Views/3.3/VariableValueView.cs	(revision 4068)
@@ -22,5 +22,4 @@
 using System;
 using System.Windows.Forms;
-using HeuristicLab.Common;
 using HeuristicLab.MainForm;
 
Index: /trunk/sources/HeuristicLab.Core/3.3/Collections/CheckedItemCollection.cs
===================================================================
--- /trunk/sources/HeuristicLab.Core/3.3/Collections/CheckedItemCollection.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.Core/3.3/Collections/CheckedItemCollection.cs	(revision 4068)
@@ -22,9 +22,7 @@
 using System;
 using System.Collections.Generic;
-using System.Drawing;
 using System.Linq;
 using HeuristicLab.Collections;
 using HeuristicLab.Common;
-using HeuristicLab.Common.Resources;
 using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
 
Index: /trunk/sources/HeuristicLab.Core/3.3/Collections/CheckedItemList.cs
===================================================================
--- /trunk/sources/HeuristicLab.Core/3.3/Collections/CheckedItemList.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.Core/3.3/Collections/CheckedItemList.cs	(revision 4068)
@@ -21,14 +21,9 @@
 
 using System;
+using System.Collections.Generic;
 using System.Linq;
-using System.Collections;
-using System.Collections.Generic;
-using System.Collections.ObjectModel;
-using System.Text;
-using System.Drawing;
+using HeuristicLab.Collections;
+using HeuristicLab.Common;
 using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
-using HeuristicLab.Common;
-using HeuristicLab.Common.Resources;
-using HeuristicLab.Collections;
 
 namespace HeuristicLab.Core {
Index: /trunk/sources/HeuristicLab.Core/3.3/Collections/ConstraintCollection.cs
===================================================================
--- /trunk/sources/HeuristicLab.Core/3.3/Collections/ConstraintCollection.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.Core/3.3/Collections/ConstraintCollection.cs	(revision 4068)
@@ -20,8 +20,5 @@
 #endregion
 
-using System;
 using System.Collections.Generic;
-using System.Linq;
-using System.Text;
 using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
 
Index: /trunk/sources/HeuristicLab.Core/3.3/Collections/ItemArray.cs
===================================================================
--- /trunk/sources/HeuristicLab.Core/3.3/Collections/ItemArray.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.Core/3.3/Collections/ItemArray.cs	(revision 4068)
@@ -21,14 +21,11 @@
 
 using System;
+using System.Collections.Generic;
+using System.Drawing;
 using System.Linq;
-using System.Collections;
-using System.Collections.Generic;
-using System.Collections.ObjectModel;
-using System.Text;
-using System.Drawing;
-using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
+using HeuristicLab.Collections;
 using HeuristicLab.Common;
 using HeuristicLab.Common.Resources;
-using HeuristicLab.Collections;
+using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
 
 namespace HeuristicLab.Core {
Index: /trunk/sources/HeuristicLab.Core/3.3/Collections/ItemDictionary.cs
===================================================================
--- /trunk/sources/HeuristicLab.Core/3.3/Collections/ItemDictionary.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.Core/3.3/Collections/ItemDictionary.cs	(revision 4068)
@@ -23,5 +23,4 @@
 using System.Collections.Generic;
 using System.Drawing;
-using System.Linq;
 using HeuristicLab.Collections;
 using HeuristicLab.Common;
@@ -32,5 +31,7 @@
   [StorableClass]
   [Item("ItemDictionary", "Represents a dictionary of items.")]
-  public class ItemDictionary<TKey, TValue> : ObservableDictionary<TKey, TValue>, IItemDictionary<TKey, TValue> where TKey : class, IItem where TValue : class, IItem {
+  public class ItemDictionary<TKey, TValue> : ObservableDictionary<TKey, TValue>, IItemDictionary<TKey, TValue>
+    where TKey : class, IItem
+    where TValue : class, IItem {
     private string filename;
     public string Filename {
Index: /trunk/sources/HeuristicLab.Core/3.3/Collections/ItemList.cs
===================================================================
--- /trunk/sources/HeuristicLab.Core/3.3/Collections/ItemList.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.Core/3.3/Collections/ItemList.cs	(revision 4068)
@@ -21,14 +21,11 @@
 
 using System;
+using System.Collections.Generic;
+using System.Drawing;
 using System.Linq;
-using System.Collections;
-using System.Collections.Generic;
-using System.Collections.ObjectModel;
-using System.Text;
-using System.Drawing;
-using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
+using HeuristicLab.Collections;
 using HeuristicLab.Common;
 using HeuristicLab.Common.Resources;
-using HeuristicLab.Collections;
+using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
 
 namespace HeuristicLab.Core {
Index: /trunk/sources/HeuristicLab.Core/3.3/Collections/ItemSet.cs
===================================================================
--- /trunk/sources/HeuristicLab.Core/3.3/Collections/ItemSet.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.Core/3.3/Collections/ItemSet.cs	(revision 4068)
@@ -21,14 +21,11 @@
 
 using System;
+using System.Collections.Generic;
+using System.Drawing;
 using System.Linq;
-using System.Collections;
-using System.Collections.Generic;
-using System.Collections.ObjectModel;
-using System.Text;
-using System.Drawing;
-using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
+using HeuristicLab.Collections;
 using HeuristicLab.Common;
 using HeuristicLab.Common.Resources;
-using HeuristicLab.Collections;
+using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
 
 namespace HeuristicLab.Core {
Index: /trunk/sources/HeuristicLab.Core/3.3/Collections/KeyedItemCollection.cs
===================================================================
--- /trunk/sources/HeuristicLab.Core/3.3/Collections/KeyedItemCollection.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.Core/3.3/Collections/KeyedItemCollection.cs	(revision 4068)
@@ -23,5 +23,4 @@
 using System.Collections.Generic;
 using System.Drawing;
-using System.Linq;
 using HeuristicLab.Collections;
 using HeuristicLab.Common;
Index: /trunk/sources/HeuristicLab.Core/3.3/Collections/NamedItemCollection.cs
===================================================================
--- /trunk/sources/HeuristicLab.Core/3.3/Collections/NamedItemCollection.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.Core/3.3/Collections/NamedItemCollection.cs	(revision 4068)
@@ -22,7 +22,4 @@
 using System;
 using System.Collections.Generic;
-using System.Drawing;
-using System.Linq;
-using HeuristicLab.Collections;
 using HeuristicLab.Common;
 using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
@@ -34,5 +31,6 @@
     public NamedItemCollection() : base() { }
     public NamedItemCollection(int capacity) : base(capacity) { }
-    public NamedItemCollection(IEnumerable<T> collection) : base(collection) {
+    public NamedItemCollection(IEnumerable<T> collection)
+      : base(collection) {
       Initialize();
     }
Index: /trunk/sources/HeuristicLab.Core/3.3/Collections/OperatorCollection.cs
===================================================================
--- /trunk/sources/HeuristicLab.Core/3.3/Collections/OperatorCollection.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.Core/3.3/Collections/OperatorCollection.cs	(revision 4068)
@@ -20,10 +20,5 @@
 #endregion
 
-using System;
-using System.Collections;
 using System.Collections.Generic;
-using System.Collections.ObjectModel;
-using System.Text;
-using System.Drawing;
 using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
 
Index: /trunk/sources/HeuristicLab.Core/3.3/Collections/OperatorList.cs
===================================================================
--- /trunk/sources/HeuristicLab.Core/3.3/Collections/OperatorList.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.Core/3.3/Collections/OperatorList.cs	(revision 4068)
@@ -20,10 +20,5 @@
 #endregion
 
-using System;
-using System.Collections;
 using System.Collections.Generic;
-using System.Collections.ObjectModel;
-using System.Text;
-using System.Drawing;
 using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
 
Index: /trunk/sources/HeuristicLab.Core/3.3/Collections/OperatorSet.cs
===================================================================
--- /trunk/sources/HeuristicLab.Core/3.3/Collections/OperatorSet.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.Core/3.3/Collections/OperatorSet.cs	(revision 4068)
@@ -20,10 +20,5 @@
 #endregion
 
-using System;
-using System.Collections;
 using System.Collections.Generic;
-using System.Collections.ObjectModel;
-using System.Text;
-using System.Drawing;
 using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
 
Index: /trunk/sources/HeuristicLab.Core/3.3/Collections/ReadOnlyCheckedItemCollection.cs
===================================================================
--- /trunk/sources/HeuristicLab.Core/3.3/Collections/ReadOnlyCheckedItemCollection.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.Core/3.3/Collections/ReadOnlyCheckedItemCollection.cs	(revision 4068)
@@ -22,9 +22,5 @@
 using System;
 using System.Collections.Generic;
-using System.Drawing;
-using System.Linq;
 using HeuristicLab.Collections;
-using HeuristicLab.Common;
-using HeuristicLab.Common.Resources;
 using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
 
@@ -36,5 +32,5 @@
       get { return (CheckedItemCollection<T>)base.collection; }
     }
-    
+
     public ReadOnlyCheckedItemCollection() : base(new CheckedItemCollection<T>()) { }
     public ReadOnlyCheckedItemCollection(ICheckedItemCollection<T> collection)
@@ -53,5 +49,5 @@
         handler(this, e);
     }
-    
+
     public IEnumerable<T> CheckedItems {
       get { return CheckedItemCollection.CheckedItems; }
Index: /trunk/sources/HeuristicLab.Core/3.3/Collections/ReadOnlyCheckedItemList.cs
===================================================================
--- /trunk/sources/HeuristicLab.Core/3.3/Collections/ReadOnlyCheckedItemList.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.Core/3.3/Collections/ReadOnlyCheckedItemList.cs	(revision 4068)
@@ -22,9 +22,5 @@
 using System;
 using System.Collections.Generic;
-using System.Drawing;
-using System.Linq;
 using HeuristicLab.Collections;
-using HeuristicLab.Common;
-using HeuristicLab.Common.Resources;
 using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
 
@@ -36,7 +32,8 @@
       get { return (CheckedItemList<T>)base.list; }
     }
-    
+
     public ReadOnlyCheckedItemList() : base(new CheckedItemList<T>()) { }
-    public ReadOnlyCheckedItemList(ICheckedItemList<T> list) : base(list) {
+    public ReadOnlyCheckedItemList(ICheckedItemList<T> list)
+      : base(list) {
       list.CheckedItemsChanged += new CollectionItemsChangedEventHandler<IndexedItem<T>>(list_CheckedItemsChanged);
     }
@@ -52,5 +49,5 @@
         handler(this, e);
     }
-    
+
     public IEnumerable<IndexedItem<T>> CheckedItems {
       get { return CheckedItemList.CheckedItems; }
Index: /trunk/sources/HeuristicLab.Core/3.3/Collections/ReadOnlyItemArray.cs
===================================================================
--- /trunk/sources/HeuristicLab.Core/3.3/Collections/ReadOnlyItemArray.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.Core/3.3/Collections/ReadOnlyItemArray.cs	(revision 4068)
@@ -21,7 +21,5 @@
 
 using System;
-using System.Collections.Generic;
 using System.Drawing;
-using System.Linq;
 using HeuristicLab.Collections;
 using HeuristicLab.Common;
Index: /trunk/sources/HeuristicLab.Core/3.3/Collections/ReadOnlyItemCollection.cs
===================================================================
--- /trunk/sources/HeuristicLab.Core/3.3/Collections/ReadOnlyItemCollection.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.Core/3.3/Collections/ReadOnlyItemCollection.cs	(revision 4068)
@@ -21,7 +21,5 @@
 
 using System;
-using System.Collections.Generic;
 using System.Drawing;
-using System.Linq;
 using HeuristicLab.Collections;
 using HeuristicLab.Common;
Index: /trunk/sources/HeuristicLab.Core/3.3/Collections/ReadOnlyItemDictionary.cs
===================================================================
--- /trunk/sources/HeuristicLab.Core/3.3/Collections/ReadOnlyItemDictionary.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.Core/3.3/Collections/ReadOnlyItemDictionary.cs	(revision 4068)
@@ -21,7 +21,5 @@
 
 using System;
-using System.Collections.Generic;
 using System.Drawing;
-using System.Linq;
 using HeuristicLab.Collections;
 using HeuristicLab.Common;
@@ -32,5 +30,7 @@
   [StorableClass]
   [Item("ReadOnlyItemDictionary", "Represents a read-only dictionary of items.")]
-  public class ReadOnlyItemDictionary<TKey, TValue> : ReadOnlyObservableDictionary<TKey, TValue>, IItemDictionary<TKey, TValue> where TKey : class, IItem where TValue : class, IItem {
+  public class ReadOnlyItemDictionary<TKey, TValue> : ReadOnlyObservableDictionary<TKey, TValue>, IItemDictionary<TKey, TValue>
+    where TKey : class, IItem
+    where TValue : class, IItem {
     private string filename;
     public string Filename {
Index: /trunk/sources/HeuristicLab.Core/3.3/Collections/ReadOnlyItemList.cs
===================================================================
--- /trunk/sources/HeuristicLab.Core/3.3/Collections/ReadOnlyItemList.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.Core/3.3/Collections/ReadOnlyItemList.cs	(revision 4068)
@@ -21,7 +21,5 @@
 
 using System;
-using System.Collections.Generic;
 using System.Drawing;
-using System.Linq;
 using HeuristicLab.Collections;
 using HeuristicLab.Common;
Index: /trunk/sources/HeuristicLab.Core/3.3/Collections/ReadOnlyItemSet.cs
===================================================================
--- /trunk/sources/HeuristicLab.Core/3.3/Collections/ReadOnlyItemSet.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.Core/3.3/Collections/ReadOnlyItemSet.cs	(revision 4068)
@@ -21,7 +21,5 @@
 
 using System;
-using System.Collections.Generic;
 using System.Drawing;
-using System.Linq;
 using HeuristicLab.Collections;
 using HeuristicLab.Common;
Index: /trunk/sources/HeuristicLab.Core/3.3/Collections/ReadOnlyKeyedItemCollection.cs
===================================================================
--- /trunk/sources/HeuristicLab.Core/3.3/Collections/ReadOnlyKeyedItemCollection.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.Core/3.3/Collections/ReadOnlyKeyedItemCollection.cs	(revision 4068)
@@ -21,7 +21,5 @@
 
 using System;
-using System.Collections.Generic;
 using System.Drawing;
-using System.Linq;
 using HeuristicLab.Collections;
 using HeuristicLab.Common;
Index: /trunk/sources/HeuristicLab.Core/3.3/Collections/VariableCollection.cs
===================================================================
--- /trunk/sources/HeuristicLab.Core/3.3/Collections/VariableCollection.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.Core/3.3/Collections/VariableCollection.cs	(revision 4068)
@@ -21,5 +21,4 @@
 
 using System.Collections.Generic;
-using System.Linq;
 using HeuristicLab.Common;
 using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
Index: /trunk/sources/HeuristicLab.Core/3.3/Constraints/ComparisonConstraint.cs
===================================================================
--- /trunk/sources/HeuristicLab.Core/3.3/Constraints/ComparisonConstraint.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.Core/3.3/Constraints/ComparisonConstraint.cs	(revision 4068)
@@ -22,6 +22,4 @@
 using System;
 using System.Collections.Generic;
-using System.Linq;
-using System.Text;
 using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
 
Index: /trunk/sources/HeuristicLab.Core/3.3/Constraints/Constraint.cs
===================================================================
--- /trunk/sources/HeuristicLab.Core/3.3/Constraints/Constraint.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.Core/3.3/Constraints/Constraint.cs	(revision 4068)
@@ -23,5 +23,4 @@
 using System.Collections.Generic;
 using System.Linq;
-using System.Text;
 using HeuristicLab.Common;
 using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
Index: /trunk/sources/HeuristicLab.Core/3.3/Constraints/ConstraintOperation.cs
===================================================================
--- /trunk/sources/HeuristicLab.Core/3.3/Constraints/ConstraintOperation.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.Core/3.3/Constraints/ConstraintOperation.cs	(revision 4068)
@@ -20,5 +20,4 @@
 #endregion
 
-using System.Collections.Generic;
 using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
 namespace HeuristicLab.Core {
@@ -61,8 +60,8 @@
     }
     public static bool operator ==(ConstraintOperation co1, ConstraintOperation co2) {
-      if(object.ReferenceEquals(co1,co2))
+      if (object.ReferenceEquals(co1, co2))
         return true;
-      
-      if((object)co1 == null || (object) co2 == null)
+
+      if ((object)co1 == null || (object)co2 == null)
         return false;
 
Index: /trunk/sources/HeuristicLab.Core/3.3/Constraints/EqualityConstraint.cs
===================================================================
--- /trunk/sources/HeuristicLab.Core/3.3/Constraints/EqualityConstraint.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.Core/3.3/Constraints/EqualityConstraint.cs	(revision 4068)
@@ -22,8 +22,5 @@
 using System;
 using System.Collections.Generic;
-using System.Linq;
-using System.Text;
 using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
-using HeuristicLab.Common;
 
 namespace HeuristicLab.Core {
Index: /trunk/sources/HeuristicLab.Core/3.3/Constraints/IConstraint.cs
===================================================================
--- /trunk/sources/HeuristicLab.Core/3.3/Constraints/IConstraint.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.Core/3.3/Constraints/IConstraint.cs	(revision 4068)
@@ -22,6 +22,4 @@
 using System;
 using System.Collections.Generic;
-using System.Linq;
-using System.Text;
 
 namespace HeuristicLab.Core {
Index: /trunk/sources/HeuristicLab.Core/3.3/Constraints/TypeCompatibilityConstraint.cs
===================================================================
--- /trunk/sources/HeuristicLab.Core/3.3/Constraints/TypeCompatibilityConstraint.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.Core/3.3/Constraints/TypeCompatibilityConstraint.cs	(revision 4068)
@@ -22,6 +22,4 @@
 using System;
 using System.Collections.Generic;
-using System.Linq;
-using System.Text;
 using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
 
Index: /trunk/sources/HeuristicLab.Core/3.3/ExecutionContext.cs
===================================================================
--- /trunk/sources/HeuristicLab.Core/3.3/ExecutionContext.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.Core/3.3/ExecutionContext.cs	(revision 4068)
@@ -21,5 +21,4 @@
 
 using System;
-using HeuristicLab.Collections;
 using HeuristicLab.Common;
 using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
Index: /trunk/sources/HeuristicLab.Core/3.3/Interfaces/ICheckedItemCollection.cs
===================================================================
--- /trunk/sources/HeuristicLab.Core/3.3/Interfaces/ICheckedItemCollection.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.Core/3.3/Interfaces/ICheckedItemCollection.cs	(revision 4068)
@@ -20,6 +20,6 @@
 #endregion
 
+using System.Collections.Generic;
 using HeuristicLab.Collections;
-using System.Collections.Generic;
 
 namespace HeuristicLab.Core {
Index: /trunk/sources/HeuristicLab.Core/3.3/Interfaces/ICheckedItemList.cs
===================================================================
--- /trunk/sources/HeuristicLab.Core/3.3/Interfaces/ICheckedItemList.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.Core/3.3/Interfaces/ICheckedItemList.cs	(revision 4068)
@@ -20,6 +20,6 @@
 #endregion
 
+using System.Collections.Generic;
 using HeuristicLab.Collections;
-using System.Collections.Generic;
 
 namespace HeuristicLab.Core {
Index: /trunk/sources/HeuristicLab.Core/3.3/Interfaces/IExecutionContext.cs
===================================================================
--- /trunk/sources/HeuristicLab.Core/3.3/Interfaces/IExecutionContext.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.Core/3.3/Interfaces/IExecutionContext.cs	(revision 4068)
@@ -20,5 +20,4 @@
 #endregion
 
-using HeuristicLab.Collections;
 using HeuristicLab.Common;
 
Index: /trunk/sources/HeuristicLab.Core/3.3/Interfaces/IItemDictionary.cs
===================================================================
--- /trunk/sources/HeuristicLab.Core/3.3/Interfaces/IItemDictionary.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.Core/3.3/Interfaces/IItemDictionary.cs	(revision 4068)
@@ -20,8 +20,9 @@
 #endregion
 
-using System.Collections.Generic;
 using HeuristicLab.Collections;
 
 namespace HeuristicLab.Core {
-  public interface IItemDictionary<TKey, TValue> : IObservableDictionary<TKey, TValue>, IItem where TKey : class, IItem where TValue : class, IItem { }
+  public interface IItemDictionary<TKey, TValue> : IObservableDictionary<TKey, TValue>, IItem
+    where TKey : class, IItem
+    where TValue : class, IItem { }
 }
Index: /trunk/sources/HeuristicLab.Core/3.3/Interfaces/IParameterizedItem.cs
===================================================================
--- /trunk/sources/HeuristicLab.Core/3.3/Interfaces/IParameterizedItem.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.Core/3.3/Interfaces/IParameterizedItem.cs	(revision 4068)
@@ -21,5 +21,4 @@
 
 using System.Collections.Generic;
-using HeuristicLab.Collections;
 
 namespace HeuristicLab.Core {
Index: /trunk/sources/HeuristicLab.Core/3.3/OperatorGraph.cs
===================================================================
--- /trunk/sources/HeuristicLab.Core/3.3/OperatorGraph.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.Core/3.3/OperatorGraph.cs	(revision 4068)
@@ -21,11 +21,8 @@
 
 using System;
-using System.Collections.Generic;
-using System.Text;
-using System.Xml;
 using System.Linq;
+using HeuristicLab.Collections;
+using HeuristicLab.Common;
 using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
-using HeuristicLab.Common;
-using HeuristicLab.Collections;
 
 namespace HeuristicLab.Core {
@@ -95,6 +92,6 @@
     private void OnOperatorGraphDeserializationFinished() {
       EventHandler handler = DeserializationFinished;
-      if(handler != null)
-        handler(this,EventArgs.Empty);
+      if (handler != null)
+        handler(this, EventArgs.Empty);
     }
     [StorableHook(HookType.AfterDeserialization)]
Index: /trunk/sources/HeuristicLab.Core/3.3/ParameterizedNamedItem.cs
===================================================================
--- /trunk/sources/HeuristicLab.Core/3.3/ParameterizedNamedItem.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.Core/3.3/ParameterizedNamedItem.cs	(revision 4068)
@@ -22,5 +22,4 @@
 using System.Collections.Generic;
 using System.Linq;
-using HeuristicLab.Collections;
 using HeuristicLab.Common;
 using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
Index: /trunk/sources/HeuristicLab.Core/3.3/PersistenceContentManager.cs
===================================================================
--- /trunk/sources/HeuristicLab.Core/3.3/PersistenceContentManager.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.Core/3.3/PersistenceContentManager.cs	(revision 4068)
@@ -20,5 +20,4 @@
 #endregion
 
-using System;
 using HeuristicLab.Common;
 using HeuristicLab.Persistence.Default.Xml;
Index: /trunk/sources/HeuristicLab.Data.Views/3.3/ColumnsVisibilityDialog.cs
===================================================================
--- /trunk/sources/HeuristicLab.Data.Views/3.3/ColumnsVisibilityDialog.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.Data.Views/3.3/ColumnsVisibilityDialog.cs	(revision 4068)
@@ -20,11 +20,5 @@
 #endregion
 
-using System;
 using System.Collections.Generic;
-using System.ComponentModel;
-using System.Data;
-using System.Drawing;
-using System.Linq;
-using System.Text;
 using System.Windows.Forms;
 
@@ -35,5 +29,6 @@
     }
 
-    public ColumnsVisibilityDialog(IEnumerable<DataGridViewColumn> columns) :this() {
+    public ColumnsVisibilityDialog(IEnumerable<DataGridViewColumn> columns)
+      : this() {
       this.Columns = columns;
     }
Index: /trunk/sources/HeuristicLab.Data.Views/3.3/StringConvertibleMatrixView.cs
===================================================================
--- /trunk/sources/HeuristicLab.Data.Views/3.3/StringConvertibleMatrixView.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.Data.Views/3.3/StringConvertibleMatrixView.cs	(revision 4068)
@@ -21,7 +21,6 @@
 
 using System;
+using System.Collections.Generic;
 using System.ComponentModel;
-using System.Collections.Generic;
-using System.Drawing;
 using System.Linq;
 using System.Windows.Forms;
Index: /trunk/sources/HeuristicLab.Data/3.3/PercentValue.cs
===================================================================
--- /trunk/sources/HeuristicLab.Data/3.3/PercentValue.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.Data/3.3/PercentValue.cs	(revision 4068)
@@ -20,5 +20,4 @@
 #endregion
 
-using System.Text;
 using HeuristicLab.Common;
 using HeuristicLab.Core;
Index: /trunk/sources/HeuristicLab.Data/3.3/StringArray.cs
===================================================================
--- /trunk/sources/HeuristicLab.Data/3.3/StringArray.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.Data/3.3/StringArray.cs	(revision 4068)
@@ -21,12 +21,12 @@
 
 using System;
+using System.Collections;
+using System.Collections.Generic;
+using System.Drawing;
 using System.Linq;
-using System.Collections;
-using System.Drawing;
 using System.Text;
 using HeuristicLab.Common;
 using HeuristicLab.Core;
 using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
-using System.Collections.Generic;
 
 namespace HeuristicLab.Data {
Index: /trunk/sources/HeuristicLab.Encodings.BinaryVectorEncoding/3.3/BinaryVectorCreator.cs
===================================================================
--- /trunk/sources/HeuristicLab.Encodings.BinaryVectorEncoding/3.3/BinaryVectorCreator.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.Encodings.BinaryVectorEncoding/3.3/BinaryVectorCreator.cs	(revision 4068)
@@ -20,5 +20,4 @@
 #endregion
 
-using HeuristicLab.Common;
 using HeuristicLab.Core;
 using HeuristicLab.Data;
Index: /trunk/sources/HeuristicLab.Encodings.BinaryVectorEncoding/3.3/BinaryVectorCrossover.cs
===================================================================
--- /trunk/sources/HeuristicLab.Encodings.BinaryVectorEncoding/3.3/BinaryVectorCrossover.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.Encodings.BinaryVectorEncoding/3.3/BinaryVectorCrossover.cs	(revision 4068)
@@ -20,7 +20,5 @@
 #endregion
 
-using HeuristicLab.Common;
 using HeuristicLab.Core;
-using HeuristicLab.Data;
 using HeuristicLab.Operators;
 using HeuristicLab.Optimization;
Index: /trunk/sources/HeuristicLab.Encodings.BinaryVectorEncoding/3.3/BinaryVectorManipulator.cs
===================================================================
--- /trunk/sources/HeuristicLab.Encodings.BinaryVectorEncoding/3.3/BinaryVectorManipulator.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.Encodings.BinaryVectorEncoding/3.3/BinaryVectorManipulator.cs	(revision 4068)
@@ -20,7 +20,5 @@
 #endregion
 
-using HeuristicLab.Common;
 using HeuristicLab.Core;
-using HeuristicLab.Data;
 using HeuristicLab.Operators;
 using HeuristicLab.Optimization;
Index: /trunk/sources/HeuristicLab.Encodings.BinaryVectorEncoding/3.3/Creators/RandomBinaryVectorCreator.cs
===================================================================
--- /trunk/sources/HeuristicLab.Encodings.BinaryVectorEncoding/3.3/Creators/RandomBinaryVectorCreator.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.Encodings.BinaryVectorEncoding/3.3/Creators/RandomBinaryVectorCreator.cs	(revision 4068)
@@ -20,9 +20,4 @@
 #endregion
 
-using System;
-using System.Collections.Generic;
-using System.Linq;
-using System.Text;
-using HeuristicLab.Common;
 using HeuristicLab.Core;
 using HeuristicLab.Data;
@@ -35,5 +30,5 @@
   [Item("RandomBinaryVectorCreator", "An operator which creates a new random binary vector with each element randomly initialized.")]
   [StorableClass]
-  public class RandomBinaryVectorCreator: BinaryVectorCreator {
+  public class RandomBinaryVectorCreator : BinaryVectorCreator {
     /// <summary>
     /// Generates a new random binary vector with the given <paramref name="length"/>.
Index: /trunk/sources/HeuristicLab.Encodings.BinaryVectorEncoding/3.3/Crossovers/NPointCrossover.cs
===================================================================
--- /trunk/sources/HeuristicLab.Encodings.BinaryVectorEncoding/3.3/Crossovers/NPointCrossover.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.Encodings.BinaryVectorEncoding/3.3/Crossovers/NPointCrossover.cs	(revision 4068)
@@ -22,11 +22,8 @@
 using System;
 using System.Collections.Generic;
-using System.Linq;
-using System.Text;
-using HeuristicLab.Common;
 using HeuristicLab.Core;
-using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
 using HeuristicLab.Data;
 using HeuristicLab.Parameters;
+using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
 
 namespace HeuristicLab.Encodings.BinaryVectorEncoding {
@@ -39,5 +36,5 @@
   [Item("NPointCrossover", "N point crossover for binary vectors. It is implemented as described in Eiben, A.E. and Smith, J.E. 2003. Introduction to Evolutionary Computation. Natural Computing Series, Springer-Verlag Berlin Heidelberg.")]
   [StorableClass]
-  public class NPointCrossover: BinaryVectorCrossover {
+  public class NPointCrossover : BinaryVectorCrossover {
     /// <summary>
     /// Number of crossover points.
@@ -80,5 +77,5 @@
       //choose break points
       List<int> breakpointPool = new List<int>();
-           
+
       for (int i = 0; i < length; i++)
         breakpointPool.Add(i);
@@ -98,5 +95,5 @@
 
       while (arrayIndex < length) {
-        if (breakPointIndex < breakpoints.Length && 
+        if (breakPointIndex < breakpoints.Length &&
           arrayIndex == breakpoints[breakPointIndex]) {
           breakPointIndex++;
Index: /trunk/sources/HeuristicLab.Encodings.BinaryVectorEncoding/3.3/Crossovers/SinglePointCrossover.cs
===================================================================
--- /trunk/sources/HeuristicLab.Encodings.BinaryVectorEncoding/3.3/Crossovers/SinglePointCrossover.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.Encodings.BinaryVectorEncoding/3.3/Crossovers/SinglePointCrossover.cs	(revision 4068)
@@ -21,12 +21,7 @@
 
 using System;
-using System.Collections.Generic;
-using System.Linq;
-using System.Text;
-using HeuristicLab.Common;
 using HeuristicLab.Core;
+using HeuristicLab.Data;
 using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
-using HeuristicLab.Data;
-using HeuristicLab.Parameters;
 
 namespace HeuristicLab.Encodings.BinaryVectorEncoding {
@@ -39,5 +34,5 @@
   [Item("SinglePointCrossover", "Single point crossover for binary vectors. It is implemented based on the NPointCrossover.")]
   [StorableClass]
-  public class SinglePointCrossover: BinaryVectorCrossover {
+  public class SinglePointCrossover : BinaryVectorCrossover {
     /// <summary>
     /// Performs a single point crossover at a randomly chosen position of two 
Index: /trunk/sources/HeuristicLab.Encodings.BinaryVectorEncoding/3.3/Crossovers/UniformCrossover.cs
===================================================================
--- /trunk/sources/HeuristicLab.Encodings.BinaryVectorEncoding/3.3/Crossovers/UniformCrossover.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.Encodings.BinaryVectorEncoding/3.3/Crossovers/UniformCrossover.cs	(revision 4068)
@@ -21,12 +21,6 @@
 
 using System;
-using System.Collections.Generic;
-using System.Linq;
-using System.Text;
-using HeuristicLab.Common;
 using HeuristicLab.Core;
 using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
-using HeuristicLab.Data;
-using HeuristicLab.Parameters;
 
 namespace HeuristicLab.Encodings.BinaryVectorEncoding {
@@ -39,5 +33,5 @@
   [Item("UniformCrossover", "Uniform crossover for binary vectors. It is implemented as described in Eiben, A.E. and Smith, J.E. 2003. Introduction to Evolutionary Computation. Natural Computing Series, Springer-Verlag Berlin Heidelberg.")]
   [StorableClass]
-  public class UniformCrossover: BinaryVectorCrossover {
+  public class UniformCrossover : BinaryVectorCrossover {
     /// <summary>
     /// Performs a uniform crossover between two binary vectors.
@@ -60,5 +54,5 @@
           result[i] = parent2[i];
       }
-      
+
       return new BinaryVector(result);
     }
Index: /trunk/sources/HeuristicLab.Encodings.BinaryVectorEncoding/3.3/Interfaces/IBinaryVectorCreator.cs
===================================================================
--- /trunk/sources/HeuristicLab.Encodings.BinaryVectorEncoding/3.3/Interfaces/IBinaryVectorCreator.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.Encodings.BinaryVectorEncoding/3.3/Interfaces/IBinaryVectorCreator.cs	(revision 4068)
@@ -20,5 +20,4 @@
 #endregion
 
-using HeuristicLab.Common;
 using HeuristicLab.Core;
 using HeuristicLab.Data;
Index: /trunk/sources/HeuristicLab.Encodings.BinaryVectorEncoding/3.3/Interfaces/IBinaryVectorCrossover.cs
===================================================================
--- /trunk/sources/HeuristicLab.Encodings.BinaryVectorEncoding/3.3/Interfaces/IBinaryVectorCrossover.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.Encodings.BinaryVectorEncoding/3.3/Interfaces/IBinaryVectorCrossover.cs	(revision 4068)
@@ -20,7 +20,5 @@
 #endregion
 
-using HeuristicLab.Common;
 using HeuristicLab.Core;
-using HeuristicLab.Data;
 using HeuristicLab.Optimization;
 
Index: /trunk/sources/HeuristicLab.Encodings.BinaryVectorEncoding/3.3/Interfaces/IBinaryVectorManipulator.cs
===================================================================
--- /trunk/sources/HeuristicLab.Encodings.BinaryVectorEncoding/3.3/Interfaces/IBinaryVectorManipulator.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.Encodings.BinaryVectorEncoding/3.3/Interfaces/IBinaryVectorManipulator.cs	(revision 4068)
@@ -20,7 +20,5 @@
 #endregion
 
-using HeuristicLab.Common;
 using HeuristicLab.Core;
-using HeuristicLab.Data;
 using HeuristicLab.Optimization;
 
Index: /trunk/sources/HeuristicLab.Encodings.BinaryVectorEncoding/3.3/Interfaces/IBinaryVectorMoveOperator.cs
===================================================================
--- /trunk/sources/HeuristicLab.Encodings.BinaryVectorEncoding/3.3/Interfaces/IBinaryVectorMoveOperator.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.Encodings.BinaryVectorEncoding/3.3/Interfaces/IBinaryVectorMoveOperator.cs	(revision 4068)
@@ -20,5 +20,4 @@
 #endregion
 
-using HeuristicLab.Common;
 using HeuristicLab.Core;
 using HeuristicLab.Optimization;
Index: /trunk/sources/HeuristicLab.Encodings.BinaryVectorEncoding/3.3/Interfaces/IBinaryVectorOperator.cs
===================================================================
--- /trunk/sources/HeuristicLab.Encodings.BinaryVectorEncoding/3.3/Interfaces/IBinaryVectorOperator.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.Encodings.BinaryVectorEncoding/3.3/Interfaces/IBinaryVectorOperator.cs	(revision 4068)
@@ -20,5 +20,4 @@
 #endregion
 
-using HeuristicLab.Common;
 using HeuristicLab.Core;
 
Index: /trunk/sources/HeuristicLab.Encodings.BinaryVectorEncoding/3.3/Interfaces/IOneBitflipMoveOperator.cs
===================================================================
--- /trunk/sources/HeuristicLab.Encodings.BinaryVectorEncoding/3.3/Interfaces/IOneBitflipMoveOperator.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.Encodings.BinaryVectorEncoding/3.3/Interfaces/IOneBitflipMoveOperator.cs	(revision 4068)
@@ -20,7 +20,5 @@
 #endregion
 
-using HeuristicLab.Common;
 using HeuristicLab.Core;
-using HeuristicLab.Optimization;
 
 namespace HeuristicLab.Encodings.BinaryVectorEncoding {
Index: /trunk/sources/HeuristicLab.Encodings.BinaryVectorEncoding/3.3/Manipulators/SinglePositionBitflipManipulator.cs
===================================================================
--- /trunk/sources/HeuristicLab.Encodings.BinaryVectorEncoding/3.3/Manipulators/SinglePositionBitflipManipulator.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.Encodings.BinaryVectorEncoding/3.3/Manipulators/SinglePositionBitflipManipulator.cs	(revision 4068)
@@ -20,9 +20,4 @@
 #endregion
 
-using System;
-using System.Collections.Generic;
-using System.Linq;
-using System.Text;
-using HeuristicLab.Common;
 using HeuristicLab.Core;
 using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
@@ -37,5 +32,5 @@
   [Item("SinglePositionBitflipManipulator", "Flips exactly one bit of a binary vector. It is implemented as described in Michalewicz, Z. 1999. Genetic Algorithms + Data Structures = Evolution Programs. Third, Revised and Extended Edition, Spring-Verlag Berlin Heidelberg.")]
   [StorableClass]
-  public class SinglePositionBitflipManipulator: BinaryVectorManipulator {
+  public class SinglePositionBitflipManipulator : BinaryVectorManipulator {
     /// <summary>
     /// Performs the single position bitflip mutation on a binary vector.
Index: /trunk/sources/HeuristicLab.Encodings.BinaryVectorEncoding/3.3/Manipulators/SomePositionsBitflipManipulator.cs
===================================================================
--- /trunk/sources/HeuristicLab.Encodings.BinaryVectorEncoding/3.3/Manipulators/SomePositionsBitflipManipulator.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.Encodings.BinaryVectorEncoding/3.3/Manipulators/SomePositionsBitflipManipulator.cs	(revision 4068)
@@ -20,13 +20,8 @@
 #endregion
 
-using System;
-using System.Collections.Generic;
-using System.Linq;
-using System.Text;
-using HeuristicLab.Common;
 using HeuristicLab.Core;
-using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
 using HeuristicLab.Data;
 using HeuristicLab.Parameters;
+using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
 
 namespace HeuristicLab.Encodings.BinaryVectorEncoding {
Index: /trunk/sources/HeuristicLab.Encodings.BinaryVectorEncoding/3.3/Moves/OneBitflipMove/ExhaustiveOneBitflipMoveGenerator.cs
===================================================================
--- /trunk/sources/HeuristicLab.Encodings.BinaryVectorEncoding/3.3/Moves/OneBitflipMove/ExhaustiveOneBitflipMoveGenerator.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.Encodings.BinaryVectorEncoding/3.3/Moves/OneBitflipMove/ExhaustiveOneBitflipMoveGenerator.cs	(revision 4068)
@@ -20,9 +20,7 @@
 #endregion
 
-using System;
-using HeuristicLab.Common;
 using HeuristicLab.Core;
+using HeuristicLab.Optimization;
 using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
-using HeuristicLab.Optimization;
 
 namespace HeuristicLab.Encodings.BinaryVectorEncoding {
@@ -35,5 +33,5 @@
       OneBitflipMove[] moves = new OneBitflipMove[totalMoves];
       for (int i = 0; i < length; i++)
-          moves[i] = new OneBitflipMove(i);
+        moves[i] = new OneBitflipMove(i);
 
       return moves;
Index: /trunk/sources/HeuristicLab.Encodings.BinaryVectorEncoding/3.3/Moves/OneBitflipMove/OneBitflipMove.cs
===================================================================
--- /trunk/sources/HeuristicLab.Encodings.BinaryVectorEncoding/3.3/Moves/OneBitflipMove/OneBitflipMove.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.Encodings.BinaryVectorEncoding/3.3/Moves/OneBitflipMove/OneBitflipMove.cs	(revision 4068)
@@ -20,5 +20,4 @@
 #endregion
 
-using HeuristicLab.Common;
 using HeuristicLab.Core;
 using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
Index: /trunk/sources/HeuristicLab.Encodings.BinaryVectorEncoding/3.3/Moves/OneBitflipMove/OneBitflipMoveGenerator.cs
===================================================================
--- /trunk/sources/HeuristicLab.Encodings.BinaryVectorEncoding/3.3/Moves/OneBitflipMove/OneBitflipMoveGenerator.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.Encodings.BinaryVectorEncoding/3.3/Moves/OneBitflipMove/OneBitflipMoveGenerator.cs	(revision 4068)
@@ -20,6 +20,4 @@
 #endregion
 
-using System;
-using HeuristicLab.Common;
 using HeuristicLab.Core;
 using HeuristicLab.Operators;
Index: /trunk/sources/HeuristicLab.Encodings.BinaryVectorEncoding/3.3/Moves/OneBitflipMove/OneBitflipMoveMaker.cs
===================================================================
--- /trunk/sources/HeuristicLab.Encodings.BinaryVectorEncoding/3.3/Moves/OneBitflipMove/OneBitflipMoveMaker.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.Encodings.BinaryVectorEncoding/3.3/Moves/OneBitflipMove/OneBitflipMoveMaker.cs	(revision 4068)
@@ -20,6 +20,4 @@
 #endregion
 
-using System;
-using HeuristicLab.Common;
 using HeuristicLab.Core;
 using HeuristicLab.Data;
Index: /trunk/sources/HeuristicLab.Encodings.BinaryVectorEncoding/3.3/Moves/OneBitflipMove/OneBitflipMoveTabuChecker.cs
===================================================================
--- /trunk/sources/HeuristicLab.Encodings.BinaryVectorEncoding/3.3/Moves/OneBitflipMove/OneBitflipMoveTabuChecker.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.Encodings.BinaryVectorEncoding/3.3/Moves/OneBitflipMove/OneBitflipMoveTabuChecker.cs	(revision 4068)
@@ -20,6 +20,4 @@
 #endregion
 
-using System;
-using HeuristicLab.Common;
 using HeuristicLab.Core;
 using HeuristicLab.Data;
@@ -41,5 +39,5 @@
     public ILookupParameter<BinaryVector> BinaryVectorParameter {
       get { return (LookupParameter<BinaryVector>)Parameters["BinaryVector"]; }
-    }      
+    }
     public ILookupParameter<ItemList<IItem>> TabuListParameter {
       get { return (ILookupParameter<ItemList<IItem>>)Parameters["TabuList"]; }
Index: /trunk/sources/HeuristicLab.Encodings.BinaryVectorEncoding/3.3/Moves/OneBitflipMove/OneBitflipMoveTabuMaker.cs
===================================================================
--- /trunk/sources/HeuristicLab.Encodings.BinaryVectorEncoding/3.3/Moves/OneBitflipMove/OneBitflipMoveTabuMaker.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.Encodings.BinaryVectorEncoding/3.3/Moves/OneBitflipMove/OneBitflipMoveTabuMaker.cs	(revision 4068)
@@ -20,10 +20,5 @@
 #endregion
 
-using System;
-using HeuristicLab.Common;
 using HeuristicLab.Core;
-using HeuristicLab.Data;
-using HeuristicLab.Operators;
-using HeuristicLab.Optimization;
 using HeuristicLab.Optimization.Operators;
 using HeuristicLab.Parameters;
Index: /trunk/sources/HeuristicLab.Encodings.BinaryVectorEncoding/3.3/Moves/OneBitflipMove/StochasticOneBitflipMultiMoveGenerator.cs
===================================================================
--- /trunk/sources/HeuristicLab.Encodings.BinaryVectorEncoding/3.3/Moves/OneBitflipMove/StochasticOneBitflipMultiMoveGenerator.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.Encodings.BinaryVectorEncoding/3.3/Moves/OneBitflipMove/StochasticOneBitflipMultiMoveGenerator.cs	(revision 4068)
@@ -20,9 +20,6 @@
 #endregion
 
-using System;
-using HeuristicLab.Common;
 using HeuristicLab.Core;
 using HeuristicLab.Data;
-using HeuristicLab.Operators;
 using HeuristicLab.Optimization;
 using HeuristicLab.Parameters;
Index: /trunk/sources/HeuristicLab.Encodings.BinaryVectorEncoding/3.3/Moves/OneBitflipMove/StochasticOneBitflipSingleMoveGenerator.cs
===================================================================
--- /trunk/sources/HeuristicLab.Encodings.BinaryVectorEncoding/3.3/Moves/OneBitflipMove/StochasticOneBitflipSingleMoveGenerator.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.Encodings.BinaryVectorEncoding/3.3/Moves/OneBitflipMove/StochasticOneBitflipSingleMoveGenerator.cs	(revision 4068)
@@ -20,8 +20,5 @@
 #endregion
 
-using System;
-using HeuristicLab.Common;
 using HeuristicLab.Core;
-using HeuristicLab.Data;
 using HeuristicLab.Optimization;
 using HeuristicLab.Parameters;
Index: /trunk/sources/HeuristicLab.Encodings.BinaryVectorEncoding/3.3/Tests/Auxiliary.cs
===================================================================
--- /trunk/sources/HeuristicLab.Encodings.BinaryVectorEncoding/3.3/Tests/Auxiliary.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.Encodings.BinaryVectorEncoding/3.3/Tests/Auxiliary.cs	(revision 4068)
@@ -20,5 +20,4 @@
 #endregion
 
-using HeuristicLab.Common;
 using HeuristicLab.Encodings.BinaryVectorEncoding;
 
Index: /trunk/sources/HeuristicLab.Encodings.BinaryVectorEncoding/3.3/Tests/NPointCrossoverTest.cs
===================================================================
--- /trunk/sources/HeuristicLab.Encodings.BinaryVectorEncoding/3.3/Tests/NPointCrossoverTest.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.Encodings.BinaryVectorEncoding/3.3/Tests/NPointCrossoverTest.cs	(revision 4068)
@@ -20,10 +20,8 @@
 #endregion
 
+using HeuristicLab.Core;
+using HeuristicLab.Data;
 using HeuristicLab.Encodings.BinaryVectorEncoding;
 using Microsoft.VisualStudio.TestTools.UnitTesting;
-using HeuristicLab.Common;
-using HeuristicLab.Core;
-using HeuristicLab.Data;
-using HeuristicLab.Parameters;
 
 namespace HeuristicLab.Encodings.BinaryVectorEncoding_33.Tests {
@@ -112,5 +110,6 @@
         BinaryVector actual;
         actual = target.Cross(random, parents);
-      } catch (System.ArgumentException) {
+      }
+      catch (System.ArgumentException) {
         exceptionFired = true;
       }
@@ -136,5 +135,5 @@
       actual = NPointCrossover.Apply(random, parent1, parent2, n);
       Assert.IsTrue(Auxiliary.BinaryVectorIsEqualByPosition(actual, expected));
-      
+
       // The following test is based on Eiben, A.E. and Smith, J.E. 2003. Introduction to Evolutionary Computation. Natural Computing Series, Springer-Verlag Berlin Heidelberg, p. 48
       random.Reset();
@@ -165,5 +164,6 @@
       try {
         actual = NPointCrossover.Apply(random, parent1, parent2, n);
-      } catch (System.ArgumentException) {
+      }
+      catch (System.ArgumentException) {
         exceptionFired = true;
       }
Index: /trunk/sources/HeuristicLab.Encodings.BinaryVectorEncoding/3.3/Tests/Properties/AssemblyInfo.cs
===================================================================
--- /trunk/sources/HeuristicLab.Encodings.BinaryVectorEncoding/3.3/Tests/Properties/AssemblyInfo.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.Encodings.BinaryVectorEncoding/3.3/Tests/Properties/AssemblyInfo.cs	(revision 4068)
@@ -21,5 +21,4 @@
 
 using System.Reflection;
-using System.Runtime.CompilerServices;
 using System.Runtime.InteropServices;
 
Index: /trunk/sources/HeuristicLab.Encodings.BinaryVectorEncoding/3.3/Tests/SinglePointCrossoverTest.cs
===================================================================
--- /trunk/sources/HeuristicLab.Encodings.BinaryVectorEncoding/3.3/Tests/SinglePointCrossoverTest.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.Encodings.BinaryVectorEncoding/3.3/Tests/SinglePointCrossoverTest.cs	(revision 4068)
@@ -20,10 +20,7 @@
 #endregion
 
+using HeuristicLab.Core;
 using HeuristicLab.Encodings.BinaryVectorEncoding;
 using Microsoft.VisualStudio.TestTools.UnitTesting;
-using HeuristicLab.Common;
-using HeuristicLab.Core;
-using HeuristicLab.Data;
-using HeuristicLab.Parameters;
 
 namespace HeuristicLab.Encodings.BinaryVectorEncoding_33.Tests {
@@ -112,5 +109,6 @@
         BinaryVector actual;
         actual = target.Cross(random, parents);
-      } catch (System.ArgumentException) {
+      }
+      catch (System.ArgumentException) {
         exceptionFired = true;
       }
Index: /trunk/sources/HeuristicLab.Encodings.BinaryVectorEncoding/3.3/Tests/SinglePositionBitflipManipulatorTest.cs
===================================================================
--- /trunk/sources/HeuristicLab.Encodings.BinaryVectorEncoding/3.3/Tests/SinglePositionBitflipManipulatorTest.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.Encodings.BinaryVectorEncoding/3.3/Tests/SinglePositionBitflipManipulatorTest.cs	(revision 4068)
@@ -20,7 +20,6 @@
 #endregion
 
+using HeuristicLab.Encodings.BinaryVectorEncoding;
 using Microsoft.VisualStudio.TestTools.UnitTesting;
-using HeuristicLab.Encodings.BinaryVectorEncoding;
-using HeuristicLab.Data;
 
 namespace HeuristicLab.Encodings.BinaryVectorEncoding_33.Tests {
Index: /trunk/sources/HeuristicLab.Encodings.BinaryVectorEncoding/3.3/Tests/SomePositionsBitflipManipulatorTest.cs
===================================================================
--- /trunk/sources/HeuristicLab.Encodings.BinaryVectorEncoding/3.3/Tests/SomePositionsBitflipManipulatorTest.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.Encodings.BinaryVectorEncoding/3.3/Tests/SomePositionsBitflipManipulatorTest.cs	(revision 4068)
@@ -20,7 +20,7 @@
 #endregion
 
+using HeuristicLab.Data;
+using HeuristicLab.Encodings.BinaryVectorEncoding;
 using Microsoft.VisualStudio.TestTools.UnitTesting;
-using HeuristicLab.Encodings.BinaryVectorEncoding;
-using HeuristicLab.Data;
 
 namespace HeuristicLab.Encodings.BinaryVectorEncoding_33.Tests {
Index: /trunk/sources/HeuristicLab.Encodings.BinaryVectorEncoding/3.3/Tests/UniformCrossoverTest.cs
===================================================================
--- /trunk/sources/HeuristicLab.Encodings.BinaryVectorEncoding/3.3/Tests/UniformCrossoverTest.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.Encodings.BinaryVectorEncoding/3.3/Tests/UniformCrossoverTest.cs	(revision 4068)
@@ -20,10 +20,7 @@
 #endregion
 
+using HeuristicLab.Core;
 using HeuristicLab.Encodings.BinaryVectorEncoding;
 using Microsoft.VisualStudio.TestTools.UnitTesting;
-using HeuristicLab.Common;
-using HeuristicLab.Core;
-using HeuristicLab.Data;
-using HeuristicLab.Parameters;
 
 namespace HeuristicLab.Encodings.BinaryVectorEncoding_33.Tests {
@@ -112,5 +109,6 @@
         BinaryVector actual;
         actual = target.Cross(random, parents);
-      } catch (System.ArgumentException) {
+      }
+      catch (System.ArgumentException) {
         exceptionFired = true;
       }
@@ -131,5 +129,5 @@
       parent1 = new BinaryVector(new bool[] { false, false, false, false, true, false, false, false, false });
       parent2 = new BinaryVector(new bool[] { true, true, false, true, false, false, false, false, true });
-      expected = new BinaryVector(new bool[] { false, true, false, false, false, false, false, false, false});
+      expected = new BinaryVector(new bool[] { false, true, false, false, false, false, false, false, false });
       actual = UniformCrossover.Apply(random, parent1, parent2);
       Assert.IsTrue(Auxiliary.BinaryVectorIsEqualByPosition(actual, expected));
@@ -143,5 +141,5 @@
       actual = UniformCrossover.Apply(random, parent1, parent2);
       Assert.IsTrue(Auxiliary.BinaryVectorIsEqualByPosition(actual, expected));
-      
+
       // The following test is not based on any published examples
       random.Reset();
@@ -152,5 +150,6 @@
       try {
         actual = UniformCrossover.Apply(random, parent1, parent2);
-      } catch (System.ArgumentException) {
+      }
+      catch (System.ArgumentException) {
         exceptionFired = true;
       }
Index: /trunk/sources/HeuristicLab.Encodings.IntegerVectorEncoding/3.3/Creators/UniformRandomIntegerVectorCreator.cs
===================================================================
--- /trunk/sources/HeuristicLab.Encodings.IntegerVectorEncoding/3.3/Creators/UniformRandomIntegerVectorCreator.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.Encodings.IntegerVectorEncoding/3.3/Creators/UniformRandomIntegerVectorCreator.cs	(revision 4068)
@@ -20,8 +20,4 @@
 #endregion
 
-using System;
-using System.Collections.Generic;
-using System.Text;
-using HeuristicLab.Common;
 using HeuristicLab.Core;
 using HeuristicLab.Data;
Index: /trunk/sources/HeuristicLab.Encodings.IntegerVectorEncoding/3.3/Crossovers/DiscreteCrossover.cs
===================================================================
--- /trunk/sources/HeuristicLab.Encodings.IntegerVectorEncoding/3.3/Crossovers/DiscreteCrossover.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.Encodings.IntegerVectorEncoding/3.3/Crossovers/DiscreteCrossover.cs	(revision 4068)
@@ -21,9 +21,5 @@
 
 using System;
-using System.Collections.Generic;
-using System.Text;
-using HeuristicLab.Common;
 using HeuristicLab.Core;
-using HeuristicLab.Data;
 using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
 
@@ -47,5 +43,5 @@
     /// <returns>The newly created integer vector, resulting from the crossover operation.</returns>
     public static IntegerVector Apply(IRandom random, IntegerVector parent1, IntegerVector parent2) {
-      if(parent1.Length != parent2.Length)
+      if (parent1.Length != parent2.Length)
         throw new ArgumentException("DiscreteCrossover: The parents are of different length.");
 
Index: /trunk/sources/HeuristicLab.Encodings.IntegerVectorEncoding/3.3/Crossovers/SinglePointCrossover.cs
===================================================================
--- /trunk/sources/HeuristicLab.Encodings.IntegerVectorEncoding/3.3/Crossovers/SinglePointCrossover.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.Encodings.IntegerVectorEncoding/3.3/Crossovers/SinglePointCrossover.cs	(revision 4068)
@@ -21,9 +21,5 @@
 
 using System;
-using System.Collections.Generic;
-using System.Text;
-using HeuristicLab.Common;
 using HeuristicLab.Core;
-using HeuristicLab.Data;
 using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
 
Index: /trunk/sources/HeuristicLab.Encodings.IntegerVectorEncoding/3.3/IntegerVectorCreator.cs
===================================================================
--- /trunk/sources/HeuristicLab.Encodings.IntegerVectorEncoding/3.3/IntegerVectorCreator.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.Encodings.IntegerVectorEncoding/3.3/IntegerVectorCreator.cs	(revision 4068)
@@ -20,5 +20,4 @@
 #endregion
 
-using HeuristicLab.Common;
 using HeuristicLab.Core;
 using HeuristicLab.Data;
Index: /trunk/sources/HeuristicLab.Encodings.IntegerVectorEncoding/3.3/IntegerVectorCrossover.cs
===================================================================
--- /trunk/sources/HeuristicLab.Encodings.IntegerVectorEncoding/3.3/IntegerVectorCrossover.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.Encodings.IntegerVectorEncoding/3.3/IntegerVectorCrossover.cs	(revision 4068)
@@ -20,7 +20,5 @@
 #endregion
 
-using HeuristicLab.Common;
 using HeuristicLab.Core;
-using HeuristicLab.Data;
 using HeuristicLab.Operators;
 using HeuristicLab.Optimization;
Index: /trunk/sources/HeuristicLab.Encodings.IntegerVectorEncoding/3.3/IntegerVectorManipulator.cs
===================================================================
--- /trunk/sources/HeuristicLab.Encodings.IntegerVectorEncoding/3.3/IntegerVectorManipulator.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.Encodings.IntegerVectorEncoding/3.3/IntegerVectorManipulator.cs	(revision 4068)
@@ -20,7 +20,5 @@
 #endregion
 
-using HeuristicLab.Common;
 using HeuristicLab.Core;
-using HeuristicLab.Data;
 using HeuristicLab.Operators;
 using HeuristicLab.Optimization;
Index: /trunk/sources/HeuristicLab.Encodings.IntegerVectorEncoding/3.3/Interfaces/IIntegerVectorCreator.cs
===================================================================
--- /trunk/sources/HeuristicLab.Encodings.IntegerVectorEncoding/3.3/Interfaces/IIntegerVectorCreator.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.Encodings.IntegerVectorEncoding/3.3/Interfaces/IIntegerVectorCreator.cs	(revision 4068)
@@ -20,5 +20,4 @@
 #endregion
 
-using HeuristicLab.Common;
 using HeuristicLab.Core;
 using HeuristicLab.Data;
Index: /trunk/sources/HeuristicLab.Encodings.IntegerVectorEncoding/3.3/Interfaces/IIntegerVectorCrossover.cs
===================================================================
--- /trunk/sources/HeuristicLab.Encodings.IntegerVectorEncoding/3.3/Interfaces/IIntegerVectorCrossover.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.Encodings.IntegerVectorEncoding/3.3/Interfaces/IIntegerVectorCrossover.cs	(revision 4068)
@@ -20,7 +20,5 @@
 #endregion
 
-using HeuristicLab.Common;
 using HeuristicLab.Core;
-using HeuristicLab.Data;
 using HeuristicLab.Optimization;
 
Index: /trunk/sources/HeuristicLab.Encodings.IntegerVectorEncoding/3.3/Interfaces/IIntegerVectorManipulator.cs
===================================================================
--- /trunk/sources/HeuristicLab.Encodings.IntegerVectorEncoding/3.3/Interfaces/IIntegerVectorManipulator.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.Encodings.IntegerVectorEncoding/3.3/Interfaces/IIntegerVectorManipulator.cs	(revision 4068)
@@ -20,7 +20,5 @@
 #endregion
 
-using HeuristicLab.Common;
 using HeuristicLab.Core;
-using HeuristicLab.Data;
 using HeuristicLab.Optimization;
 
Index: /trunk/sources/HeuristicLab.Encodings.IntegerVectorEncoding/3.3/Interfaces/IIntegerVectorOperator.cs
===================================================================
--- /trunk/sources/HeuristicLab.Encodings.IntegerVectorEncoding/3.3/Interfaces/IIntegerVectorOperator.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.Encodings.IntegerVectorEncoding/3.3/Interfaces/IIntegerVectorOperator.cs	(revision 4068)
@@ -20,5 +20,4 @@
 #endregion
 
-using HeuristicLab.Common;
 using HeuristicLab.Core;
 
Index: /trunk/sources/HeuristicLab.Encodings.IntegerVectorEncoding/3.3/Manipulators/UniformOnePositionManipulator.cs
===================================================================
--- /trunk/sources/HeuristicLab.Encodings.IntegerVectorEncoding/3.3/Manipulators/UniformOnePositionManipulator.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.Encodings.IntegerVectorEncoding/3.3/Manipulators/UniformOnePositionManipulator.cs	(revision 4068)
@@ -21,7 +21,4 @@
 
 using System;
-using System.Collections.Generic;
-using System.Text;
-using HeuristicLab.Common;
 using HeuristicLab.Core;
 using HeuristicLab.Data;
Index: /trunk/sources/HeuristicLab.Encodings.IntegerVectorEncoding/3.3/Tests/Auxiliary.cs
===================================================================
--- /trunk/sources/HeuristicLab.Encodings.IntegerVectorEncoding/3.3/Tests/Auxiliary.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.Encodings.IntegerVectorEncoding/3.3/Tests/Auxiliary.cs	(revision 4068)
@@ -20,5 +20,4 @@
 #endregion
 
-using HeuristicLab.Common;
 using HeuristicLab.Encodings.IntegerVectorEncoding;
 
Index: /trunk/sources/HeuristicLab.Encodings.IntegerVectorEncoding/3.3/Tests/DiscreteCrossoverTest.cs
===================================================================
--- /trunk/sources/HeuristicLab.Encodings.IntegerVectorEncoding/3.3/Tests/DiscreteCrossoverTest.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.Encodings.IntegerVectorEncoding/3.3/Tests/DiscreteCrossoverTest.cs	(revision 4068)
@@ -20,10 +20,7 @@
 #endregion
 
+using HeuristicLab.Core;
 using HeuristicLab.Encodings.IntegerVectorEncoding;
 using Microsoft.VisualStudio.TestTools.UnitTesting;
-using HeuristicLab.Common;
-using HeuristicLab.Core;
-using HeuristicLab.Data;
-using HeuristicLab.Parameters;
 
 namespace HeuristicLab.Encodings.IntegerVectorEncoding_33.Tests {
@@ -100,5 +97,6 @@
         IntegerVector actual;
         actual = target.Cross(random, parents);
-      } catch (System.ArgumentException) {
+      }
+      catch (System.ArgumentException) {
         exceptionFired = true;
       }
@@ -131,5 +129,6 @@
       try {
         actual = DiscreteCrossover.Apply(random, parent1, parent2);
-      } catch (System.ArgumentException) {
+      }
+      catch (System.ArgumentException) {
         exceptionFired = true;
       }
Index: /trunk/sources/HeuristicLab.Encodings.IntegerVectorEncoding/3.3/Tests/Properties/AssemblyInfo.cs
===================================================================
--- /trunk/sources/HeuristicLab.Encodings.IntegerVectorEncoding/3.3/Tests/Properties/AssemblyInfo.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.Encodings.IntegerVectorEncoding/3.3/Tests/Properties/AssemblyInfo.cs	(revision 4068)
@@ -21,5 +21,4 @@
 
 using System.Reflection;
-using System.Runtime.CompilerServices;
 using System.Runtime.InteropServices;
 
Index: /trunk/sources/HeuristicLab.Encodings.IntegerVectorEncoding/3.3/Tests/SinglePointCrossoverTest.cs
===================================================================
--- /trunk/sources/HeuristicLab.Encodings.IntegerVectorEncoding/3.3/Tests/SinglePointCrossoverTest.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.Encodings.IntegerVectorEncoding/3.3/Tests/SinglePointCrossoverTest.cs	(revision 4068)
@@ -20,10 +20,7 @@
 #endregion
 
+using HeuristicLab.Core;
 using HeuristicLab.Encodings.IntegerVectorEncoding;
 using Microsoft.VisualStudio.TestTools.UnitTesting;
-using HeuristicLab.Common;
-using HeuristicLab.Core;
-using HeuristicLab.Data;
-using HeuristicLab.Parameters;
 
 namespace HeuristicLab.Encodings.IntegerVectorEncoding_33.Tests {
@@ -112,5 +109,6 @@
         IntegerVector actual;
         actual = target.Cross(random, parents);
-      } catch (System.ArgumentException) {
+      }
+      catch (System.ArgumentException) {
         exceptionFired = true;
       }
@@ -142,5 +140,6 @@
       try {
         actual = SinglePointCrossover.Apply(random, parent1, parent2);
-      } catch (System.ArgumentException) {
+      }
+      catch (System.ArgumentException) {
         exceptionFired = true;
       }
Index: /trunk/sources/HeuristicLab.Encodings.IntegerVectorEncoding/3.3/Tests/UniformOnePositionManipulatorTest.cs
===================================================================
--- /trunk/sources/HeuristicLab.Encodings.IntegerVectorEncoding/3.3/Tests/UniformOnePositionManipulatorTest.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.Encodings.IntegerVectorEncoding/3.3/Tests/UniformOnePositionManipulatorTest.cs	(revision 4068)
@@ -20,7 +20,7 @@
 #endregion
 
+using HeuristicLab.Data;
+using HeuristicLab.Encodings.IntegerVectorEncoding;
 using Microsoft.VisualStudio.TestTools.UnitTesting;
-using HeuristicLab.Encodings.IntegerVectorEncoding;
-using HeuristicLab.Data;
 
 namespace HeuristicLab.Encodings.IntegerVectorEncoding_33.Tests {
Index: /trunk/sources/HeuristicLab.Encodings.PermutationEncoding.Views/3.3/PermutationTypeView.cs
===================================================================
--- /trunk/sources/HeuristicLab.Encodings.PermutationEncoding.Views/3.3/PermutationTypeView.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.Encodings.PermutationEncoding.Views/3.3/PermutationTypeView.cs	(revision 4068)
@@ -23,5 +23,4 @@
 using System.Windows.Forms;
 using HeuristicLab.Core.Views;
-using HeuristicLab.Encodings.PermutationEncoding;
 using HeuristicLab.MainForm;
 
Index: /trunk/sources/HeuristicLab.Encodings.PermutationEncoding/3.3/Creators/RandomPermutationCreator.cs
===================================================================
--- /trunk/sources/HeuristicLab.Encodings.PermutationEncoding/3.3/Creators/RandomPermutationCreator.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.Encodings.PermutationEncoding/3.3/Creators/RandomPermutationCreator.cs	(revision 4068)
@@ -20,5 +20,4 @@
 #endregion
 
-using HeuristicLab.Common;
 using HeuristicLab.Core;
 using HeuristicLab.Data;
Index: /trunk/sources/HeuristicLab.Encodings.PermutationEncoding/3.3/Crossovers/CosaCrossover.cs
===================================================================
--- /trunk/sources/HeuristicLab.Encodings.PermutationEncoding/3.3/Crossovers/CosaCrossover.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.Encodings.PermutationEncoding/3.3/Crossovers/CosaCrossover.cs	(revision 4068)
@@ -21,5 +21,4 @@
 
 using System;
-using HeuristicLab.Common;
 using HeuristicLab.Core;
 using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
Index: /trunk/sources/HeuristicLab.Encodings.PermutationEncoding/3.3/Crossovers/CyclicCrossover.cs
===================================================================
--- /trunk/sources/HeuristicLab.Encodings.PermutationEncoding/3.3/Crossovers/CyclicCrossover.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.Encodings.PermutationEncoding/3.3/Crossovers/CyclicCrossover.cs	(revision 4068)
@@ -21,5 +21,4 @@
 
 using System;
-using HeuristicLab.Common;
 using HeuristicLab.Core;
 using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
@@ -66,5 +65,6 @@
           invParent2[parent2[i]] = i;
         }
-      } catch (IndexOutOfRangeException) {
+      }
+      catch (IndexOutOfRangeException) {
         throw new InvalidOperationException("CyclicCrossover: The permutation must consist of numbers in the interval [0;N) with N = length of the permutation.");
       }
Index: /trunk/sources/HeuristicLab.Encodings.PermutationEncoding/3.3/Crossovers/CyclicCrossover2.cs
===================================================================
--- /trunk/sources/HeuristicLab.Encodings.PermutationEncoding/3.3/Crossovers/CyclicCrossover2.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.Encodings.PermutationEncoding/3.3/Crossovers/CyclicCrossover2.cs	(revision 4068)
@@ -21,5 +21,4 @@
 
 using System;
-using HeuristicLab.Common;
 using HeuristicLab.Core;
 using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
Index: /trunk/sources/HeuristicLab.Encodings.PermutationEncoding/3.3/Crossovers/EdgeRecombinationCrossover.cs
===================================================================
--- /trunk/sources/HeuristicLab.Encodings.PermutationEncoding/3.3/Crossovers/EdgeRecombinationCrossover.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.Encodings.PermutationEncoding/3.3/Crossovers/EdgeRecombinationCrossover.cs	(revision 4068)
@@ -21,5 +21,4 @@
 
 using System;
-using HeuristicLab.Common;
 using HeuristicLab.Core;
 using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
Index: /trunk/sources/HeuristicLab.Encodings.PermutationEncoding/3.3/Crossovers/MaximalPreservativeCrossover.cs
===================================================================
--- /trunk/sources/HeuristicLab.Encodings.PermutationEncoding/3.3/Crossovers/MaximalPreservativeCrossover.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.Encodings.PermutationEncoding/3.3/Crossovers/MaximalPreservativeCrossover.cs	(revision 4068)
@@ -21,5 +21,4 @@
 
 using System;
-using HeuristicLab.Common;
 using HeuristicLab.Core;
 using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
@@ -84,5 +83,6 @@
           invParent2[parent2[i]] = i;
         }
-      } catch (IndexOutOfRangeException) {
+      }
+      catch (IndexOutOfRangeException) {
         throw new InvalidOperationException("MaximalPreservativeCrossover: The permutation must consist of numbers in the interval [0;N) with N = length of the permutation.");
       }
Index: /trunk/sources/HeuristicLab.Encodings.PermutationEncoding/3.3/Crossovers/OrderBasedCrossover.cs
===================================================================
--- /trunk/sources/HeuristicLab.Encodings.PermutationEncoding/3.3/Crossovers/OrderBasedCrossover.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.Encodings.PermutationEncoding/3.3/Crossovers/OrderBasedCrossover.cs	(revision 4068)
@@ -21,5 +21,4 @@
 
 using System;
-using HeuristicLab.Common;
 using HeuristicLab.Core;
 using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
Index: /trunk/sources/HeuristicLab.Encodings.PermutationEncoding/3.3/Crossovers/OrderCrossover.cs
===================================================================
--- /trunk/sources/HeuristicLab.Encodings.PermutationEncoding/3.3/Crossovers/OrderCrossover.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.Encodings.PermutationEncoding/3.3/Crossovers/OrderCrossover.cs	(revision 4068)
@@ -21,5 +21,4 @@
 
 using System;
-using HeuristicLab.Common;
 using HeuristicLab.Core;
 using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
@@ -78,5 +77,6 @@
           if (i >= length) i = 0;
         }
-      } catch (IndexOutOfRangeException) {
+      }
+      catch (IndexOutOfRangeException) {
         throw new InvalidOperationException("OrderCrossover: The permutation must consist of numbers in the interval [0;N) with N = length of the permutation.");
       }
Index: /trunk/sources/HeuristicLab.Encodings.PermutationEncoding/3.3/Crossovers/OrderCrossover2.cs
===================================================================
--- /trunk/sources/HeuristicLab.Encodings.PermutationEncoding/3.3/Crossovers/OrderCrossover2.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.Encodings.PermutationEncoding/3.3/Crossovers/OrderCrossover2.cs	(revision 4068)
@@ -21,5 +21,4 @@
 
 using System;
-using HeuristicLab.Common;
 using HeuristicLab.Core;
 using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
Index: /trunk/sources/HeuristicLab.Encodings.PermutationEncoding/3.3/Crossovers/PartiallyMatchedCrossover.cs
===================================================================
--- /trunk/sources/HeuristicLab.Encodings.PermutationEncoding/3.3/Crossovers/PartiallyMatchedCrossover.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.Encodings.PermutationEncoding/3.3/Crossovers/PartiallyMatchedCrossover.cs	(revision 4068)
@@ -21,5 +21,4 @@
 
 using System;
-using HeuristicLab.Common;
 using HeuristicLab.Core;
 using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
@@ -72,5 +71,6 @@
           invResult[result[j]] = j;
         }
-      } catch (IndexOutOfRangeException) {
+      }
+      catch (IndexOutOfRangeException) {
         throw new InvalidOperationException("PartiallyMatchedCrossover: The permutation must consist of consecutive numbers from 0 to N-1 with N = length of the permutation.");
       }
Index: /trunk/sources/HeuristicLab.Encodings.PermutationEncoding/3.3/Crossovers/PositionBasedCrossover.cs
===================================================================
--- /trunk/sources/HeuristicLab.Encodings.PermutationEncoding/3.3/Crossovers/PositionBasedCrossover.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.Encodings.PermutationEncoding/3.3/Crossovers/PositionBasedCrossover.cs	(revision 4068)
@@ -21,5 +21,4 @@
 
 using System;
-using HeuristicLab.Common;
 using HeuristicLab.Core;
 using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
Index: /trunk/sources/HeuristicLab.Encodings.PermutationEncoding/3.3/Interfaces/IPermutationCreator.cs
===================================================================
--- /trunk/sources/HeuristicLab.Encodings.PermutationEncoding/3.3/Interfaces/IPermutationCreator.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.Encodings.PermutationEncoding/3.3/Interfaces/IPermutationCreator.cs	(revision 4068)
@@ -20,5 +20,4 @@
 #endregion
 
-using HeuristicLab.Common;
 using HeuristicLab.Core;
 using HeuristicLab.Data;
Index: /trunk/sources/HeuristicLab.Encodings.PermutationEncoding/3.3/Interfaces/IPermutationCrossover.cs
===================================================================
--- /trunk/sources/HeuristicLab.Encodings.PermutationEncoding/3.3/Interfaces/IPermutationCrossover.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.Encodings.PermutationEncoding/3.3/Interfaces/IPermutationCrossover.cs	(revision 4068)
@@ -20,5 +20,4 @@
 #endregion
 
-using HeuristicLab.Common;
 using HeuristicLab.Core;
 using HeuristicLab.Optimization;
Index: /trunk/sources/HeuristicLab.Encodings.PermutationEncoding/3.3/Interfaces/IPermutationInversionMoveOperator.cs
===================================================================
--- /trunk/sources/HeuristicLab.Encodings.PermutationEncoding/3.3/Interfaces/IPermutationInversionMoveOperator.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.Encodings.PermutationEncoding/3.3/Interfaces/IPermutationInversionMoveOperator.cs	(revision 4068)
@@ -20,7 +20,5 @@
 #endregion
 
-using HeuristicLab.Common;
 using HeuristicLab.Core;
-using HeuristicLab.Optimization;
 
 namespace HeuristicLab.Encodings.PermutationEncoding {
Index: /trunk/sources/HeuristicLab.Encodings.PermutationEncoding/3.3/Interfaces/IPermutationManipulator.cs
===================================================================
--- /trunk/sources/HeuristicLab.Encodings.PermutationEncoding/3.3/Interfaces/IPermutationManipulator.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.Encodings.PermutationEncoding/3.3/Interfaces/IPermutationManipulator.cs	(revision 4068)
@@ -20,5 +20,4 @@
 #endregion
 
-using HeuristicLab.Common;
 using HeuristicLab.Core;
 using HeuristicLab.Optimization;
Index: /trunk/sources/HeuristicLab.Encodings.PermutationEncoding/3.3/Interfaces/IPermutationMoveOperator.cs
===================================================================
--- /trunk/sources/HeuristicLab.Encodings.PermutationEncoding/3.3/Interfaces/IPermutationMoveOperator.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.Encodings.PermutationEncoding/3.3/Interfaces/IPermutationMoveOperator.cs	(revision 4068)
@@ -20,5 +20,4 @@
 #endregion
 
-using HeuristicLab.Common;
 using HeuristicLab.Core;
 using HeuristicLab.Optimization;
Index: /trunk/sources/HeuristicLab.Encodings.PermutationEncoding/3.3/Interfaces/IPermutationOperator.cs
===================================================================
--- /trunk/sources/HeuristicLab.Encodings.PermutationEncoding/3.3/Interfaces/IPermutationOperator.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.Encodings.PermutationEncoding/3.3/Interfaces/IPermutationOperator.cs	(revision 4068)
@@ -20,5 +20,4 @@
 #endregion
 
-using HeuristicLab.Common;
 using HeuristicLab.Core;
 
Index: /trunk/sources/HeuristicLab.Encodings.PermutationEncoding/3.3/Interfaces/IPermutationTranslocationMoveOperator.cs
===================================================================
--- /trunk/sources/HeuristicLab.Encodings.PermutationEncoding/3.3/Interfaces/IPermutationTranslocationMoveOperator.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.Encodings.PermutationEncoding/3.3/Interfaces/IPermutationTranslocationMoveOperator.cs	(revision 4068)
@@ -20,7 +20,5 @@
 #endregion
 
-using HeuristicLab.Common;
 using HeuristicLab.Core;
-using HeuristicLab.Optimization;
 
 namespace HeuristicLab.Encodings.PermutationEncoding {
Index: /trunk/sources/HeuristicLab.Encodings.PermutationEncoding/3.3/Manipulators/InsertionManipulator.cs
===================================================================
--- /trunk/sources/HeuristicLab.Encodings.PermutationEncoding/3.3/Manipulators/InsertionManipulator.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.Encodings.PermutationEncoding/3.3/Manipulators/InsertionManipulator.cs	(revision 4068)
@@ -20,5 +20,4 @@
 #endregion
 
-using HeuristicLab.Common;
 using HeuristicLab.Core;
 using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
Index: /trunk/sources/HeuristicLab.Encodings.PermutationEncoding/3.3/Manipulators/InversionManipulator.cs
===================================================================
--- /trunk/sources/HeuristicLab.Encodings.PermutationEncoding/3.3/Manipulators/InversionManipulator.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.Encodings.PermutationEncoding/3.3/Manipulators/InversionManipulator.cs	(revision 4068)
@@ -20,5 +20,4 @@
 #endregion
 
-using HeuristicLab.Common;
 using HeuristicLab.Core;
 using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
Index: /trunk/sources/HeuristicLab.Encodings.PermutationEncoding/3.3/Manipulators/ScrambleManipulator.cs
===================================================================
--- /trunk/sources/HeuristicLab.Encodings.PermutationEncoding/3.3/Manipulators/ScrambleManipulator.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.Encodings.PermutationEncoding/3.3/Manipulators/ScrambleManipulator.cs	(revision 4068)
@@ -20,5 +20,4 @@
 #endregion
 
-using HeuristicLab.Common;
 using HeuristicLab.Core;
 using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
Index: /trunk/sources/HeuristicLab.Encodings.PermutationEncoding/3.3/Manipulators/Swap2Manipulator.cs
===================================================================
--- /trunk/sources/HeuristicLab.Encodings.PermutationEncoding/3.3/Manipulators/Swap2Manipulator.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.Encodings.PermutationEncoding/3.3/Manipulators/Swap2Manipulator.cs	(revision 4068)
@@ -20,5 +20,4 @@
 #endregion
 
-using HeuristicLab.Common;
 using HeuristicLab.Core;
 using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
Index: /trunk/sources/HeuristicLab.Encodings.PermutationEncoding/3.3/Manipulators/Swap3Manipulator.cs
===================================================================
--- /trunk/sources/HeuristicLab.Encodings.PermutationEncoding/3.3/Manipulators/Swap3Manipulator.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.Encodings.PermutationEncoding/3.3/Manipulators/Swap3Manipulator.cs	(revision 4068)
@@ -21,5 +21,4 @@
 
 using System;
-using HeuristicLab.Common;
 using HeuristicLab.Core;
 using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
Index: /trunk/sources/HeuristicLab.Encodings.PermutationEncoding/3.3/Manipulators/TranslocationInversionManipulator.cs
===================================================================
--- /trunk/sources/HeuristicLab.Encodings.PermutationEncoding/3.3/Manipulators/TranslocationInversionManipulator.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.Encodings.PermutationEncoding/3.3/Manipulators/TranslocationInversionManipulator.cs	(revision 4068)
@@ -20,5 +20,4 @@
 #endregion
 
-using HeuristicLab.Common;
 using HeuristicLab.Core;
 using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
Index: /trunk/sources/HeuristicLab.Encodings.PermutationEncoding/3.3/Manipulators/TranslocationManipulator.cs
===================================================================
--- /trunk/sources/HeuristicLab.Encodings.PermutationEncoding/3.3/Manipulators/TranslocationManipulator.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.Encodings.PermutationEncoding/3.3/Manipulators/TranslocationManipulator.cs	(revision 4068)
@@ -20,5 +20,4 @@
 #endregion
 
-using HeuristicLab.Common;
 using HeuristicLab.Core;
 using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
Index: /trunk/sources/HeuristicLab.Encodings.PermutationEncoding/3.3/Moves/ThreeOpt/ExhaustiveInsertionMoveGenerator.cs
===================================================================
--- /trunk/sources/HeuristicLab.Encodings.PermutationEncoding/3.3/Moves/ThreeOpt/ExhaustiveInsertionMoveGenerator.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.Encodings.PermutationEncoding/3.3/Moves/ThreeOpt/ExhaustiveInsertionMoveGenerator.cs	(revision 4068)
@@ -21,11 +21,7 @@
 
 using System;
-using HeuristicLab.Common;
 using HeuristicLab.Core;
-using HeuristicLab.Data;
 using HeuristicLab.Optimization;
-using HeuristicLab.Parameters;
 using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
-using System.Collections.Generic;
 
 namespace HeuristicLab.Encodings.PermutationEncoding {
Index: /trunk/sources/HeuristicLab.Encodings.PermutationEncoding/3.3/Moves/ThreeOpt/StochasticSingleInsertionMoveGenerator.cs
===================================================================
--- /trunk/sources/HeuristicLab.Encodings.PermutationEncoding/3.3/Moves/ThreeOpt/StochasticSingleInsertionMoveGenerator.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.Encodings.PermutationEncoding/3.3/Moves/ThreeOpt/StochasticSingleInsertionMoveGenerator.cs	(revision 4068)
@@ -21,5 +21,5 @@
 
 using System;
-using HeuristicLab.Common;
+using System.Collections.Generic;
 using HeuristicLab.Core;
 using HeuristicLab.Data;
@@ -27,5 +27,4 @@
 using HeuristicLab.Parameters;
 using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
-using System.Collections.Generic;
 
 namespace HeuristicLab.Encodings.PermutationEncoding {
@@ -57,7 +56,7 @@
       HashSet<int> usedIndices = new HashSet<int>();
       while (count < sampleSize) {
-        
+
         int index = random.Next(length);
-        
+
         if (usedIndices.Count != length)
           while (usedIndices.Contains(index))
Index: /trunk/sources/HeuristicLab.Encodings.PermutationEncoding/3.3/Moves/ThreeOpt/StochasticTranslocationMultiMoveGenerator.cs
===================================================================
--- /trunk/sources/HeuristicLab.Encodings.PermutationEncoding/3.3/Moves/ThreeOpt/StochasticTranslocationMultiMoveGenerator.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.Encodings.PermutationEncoding/3.3/Moves/ThreeOpt/StochasticTranslocationMultiMoveGenerator.cs	(revision 4068)
@@ -20,6 +20,4 @@
 #endregion
 
-using System;
-using HeuristicLab.Common;
 using HeuristicLab.Core;
 using HeuristicLab.Data;
Index: /trunk/sources/HeuristicLab.Encodings.PermutationEncoding/3.3/Moves/ThreeOpt/StochasticTranslocationSingleMoveGenerator.cs
===================================================================
--- /trunk/sources/HeuristicLab.Encodings.PermutationEncoding/3.3/Moves/ThreeOpt/StochasticTranslocationSingleMoveGenerator.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.Encodings.PermutationEncoding/3.3/Moves/ThreeOpt/StochasticTranslocationSingleMoveGenerator.cs	(revision 4068)
@@ -21,7 +21,5 @@
 
 using System;
-using HeuristicLab.Common;
 using HeuristicLab.Core;
-using HeuristicLab.Data;
 using HeuristicLab.Optimization;
 using HeuristicLab.Parameters;
Index: /trunk/sources/HeuristicLab.Encodings.PermutationEncoding/3.3/Moves/ThreeOpt/TranslocationMove.cs
===================================================================
--- /trunk/sources/HeuristicLab.Encodings.PermutationEncoding/3.3/Moves/ThreeOpt/TranslocationMove.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.Encodings.PermutationEncoding/3.3/Moves/ThreeOpt/TranslocationMove.cs	(revision 4068)
@@ -20,5 +20,4 @@
 #endregion
 
-using HeuristicLab.Common;
 using HeuristicLab.Core;
 using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
Index: /trunk/sources/HeuristicLab.Encodings.PermutationEncoding/3.3/Moves/ThreeOpt/TranslocationMoveGenerator.cs
===================================================================
--- /trunk/sources/HeuristicLab.Encodings.PermutationEncoding/3.3/Moves/ThreeOpt/TranslocationMoveGenerator.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.Encodings.PermutationEncoding/3.3/Moves/ThreeOpt/TranslocationMoveGenerator.cs	(revision 4068)
@@ -20,6 +20,4 @@
 #endregion
 
-using System;
-using HeuristicLab.Common;
 using HeuristicLab.Core;
 using HeuristicLab.Operators;
Index: /trunk/sources/HeuristicLab.Encodings.PermutationEncoding/3.3/Moves/ThreeOpt/TranslocationMoveHardTabuCriterion.cs
===================================================================
--- /trunk/sources/HeuristicLab.Encodings.PermutationEncoding/3.3/Moves/ThreeOpt/TranslocationMoveHardTabuCriterion.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.Encodings.PermutationEncoding/3.3/Moves/ThreeOpt/TranslocationMoveHardTabuCriterion.cs	(revision 4068)
@@ -20,6 +20,4 @@
 #endregion
 
-using System;
-using HeuristicLab.Common;
 using HeuristicLab.Core;
 using HeuristicLab.Data;
Index: /trunk/sources/HeuristicLab.Encodings.PermutationEncoding/3.3/Moves/ThreeOpt/TranslocationMoveMaker.cs
===================================================================
--- /trunk/sources/HeuristicLab.Encodings.PermutationEncoding/3.3/Moves/ThreeOpt/TranslocationMoveMaker.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.Encodings.PermutationEncoding/3.3/Moves/ThreeOpt/TranslocationMoveMaker.cs	(revision 4068)
@@ -20,6 +20,4 @@
 #endregion
 
-using System;
-using HeuristicLab.Common;
 using HeuristicLab.Core;
 using HeuristicLab.Data;
Index: /trunk/sources/HeuristicLab.Encodings.PermutationEncoding/3.3/Moves/ThreeOpt/TranslocationMoveSoftTabuCriterion.cs
===================================================================
--- /trunk/sources/HeuristicLab.Encodings.PermutationEncoding/3.3/Moves/ThreeOpt/TranslocationMoveSoftTabuCriterion.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.Encodings.PermutationEncoding/3.3/Moves/ThreeOpt/TranslocationMoveSoftTabuCriterion.cs	(revision 4068)
@@ -20,6 +20,4 @@
 #endregion
 
-using System;
-using HeuristicLab.Common;
 using HeuristicLab.Core;
 using HeuristicLab.Data;
Index: /trunk/sources/HeuristicLab.Encodings.PermutationEncoding/3.3/Moves/ThreeOpt/TranslocationMoveTabuMaker.cs
===================================================================
--- /trunk/sources/HeuristicLab.Encodings.PermutationEncoding/3.3/Moves/ThreeOpt/TranslocationMoveTabuMaker.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.Encodings.PermutationEncoding/3.3/Moves/ThreeOpt/TranslocationMoveTabuMaker.cs	(revision 4068)
@@ -20,10 +20,5 @@
 #endregion
 
-using System;
-using HeuristicLab.Common;
 using HeuristicLab.Core;
-using HeuristicLab.Data;
-using HeuristicLab.Operators;
-using HeuristicLab.Optimization;
 using HeuristicLab.Optimization.Operators;
 using HeuristicLab.Parameters;
Index: /trunk/sources/HeuristicLab.Encodings.PermutationEncoding/3.3/Moves/TwoOpt/ExhaustiveInversionMoveGenerator.cs
===================================================================
--- /trunk/sources/HeuristicLab.Encodings.PermutationEncoding/3.3/Moves/TwoOpt/ExhaustiveInversionMoveGenerator.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.Encodings.PermutationEncoding/3.3/Moves/TwoOpt/ExhaustiveInversionMoveGenerator.cs	(revision 4068)
@@ -21,8 +21,7 @@
 
 using System;
-using HeuristicLab.Common;
 using HeuristicLab.Core;
+using HeuristicLab.Optimization;
 using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
-using HeuristicLab.Optimization;
 
 namespace HeuristicLab.Encodings.PermutationEncoding {
Index: /trunk/sources/HeuristicLab.Encodings.PermutationEncoding/3.3/Moves/TwoOpt/InversionMove.cs
===================================================================
--- /trunk/sources/HeuristicLab.Encodings.PermutationEncoding/3.3/Moves/TwoOpt/InversionMove.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.Encodings.PermutationEncoding/3.3/Moves/TwoOpt/InversionMove.cs	(revision 4068)
@@ -20,5 +20,4 @@
 #endregion
 
-using HeuristicLab.Common;
 using HeuristicLab.Core;
 using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
Index: /trunk/sources/HeuristicLab.Encodings.PermutationEncoding/3.3/Moves/TwoOpt/InversionMoveGenerator.cs
===================================================================
--- /trunk/sources/HeuristicLab.Encodings.PermutationEncoding/3.3/Moves/TwoOpt/InversionMoveGenerator.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.Encodings.PermutationEncoding/3.3/Moves/TwoOpt/InversionMoveGenerator.cs	(revision 4068)
@@ -20,6 +20,4 @@
 #endregion
 
-using System;
-using HeuristicLab.Common;
 using HeuristicLab.Core;
 using HeuristicLab.Operators;
Index: /trunk/sources/HeuristicLab.Encodings.PermutationEncoding/3.3/Moves/TwoOpt/InversionMoveHardTabuCriterion.cs
===================================================================
--- /trunk/sources/HeuristicLab.Encodings.PermutationEncoding/3.3/Moves/TwoOpt/InversionMoveHardTabuCriterion.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.Encodings.PermutationEncoding/3.3/Moves/TwoOpt/InversionMoveHardTabuCriterion.cs	(revision 4068)
@@ -21,5 +21,4 @@
 
 using System;
-using HeuristicLab.Common;
 using HeuristicLab.Core;
 using HeuristicLab.Data;
Index: /trunk/sources/HeuristicLab.Encodings.PermutationEncoding/3.3/Moves/TwoOpt/InversionMoveMaker.cs
===================================================================
--- /trunk/sources/HeuristicLab.Encodings.PermutationEncoding/3.3/Moves/TwoOpt/InversionMoveMaker.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.Encodings.PermutationEncoding/3.3/Moves/TwoOpt/InversionMoveMaker.cs	(revision 4068)
@@ -20,6 +20,4 @@
 #endregion
 
-using System;
-using HeuristicLab.Common;
 using HeuristicLab.Core;
 using HeuristicLab.Data;
Index: /trunk/sources/HeuristicLab.Encodings.PermutationEncoding/3.3/Moves/TwoOpt/InversionMoveSoftTabuCriterion.cs
===================================================================
--- /trunk/sources/HeuristicLab.Encodings.PermutationEncoding/3.3/Moves/TwoOpt/InversionMoveSoftTabuCriterion.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.Encodings.PermutationEncoding/3.3/Moves/TwoOpt/InversionMoveSoftTabuCriterion.cs	(revision 4068)
@@ -21,5 +21,4 @@
 
 using System;
-using HeuristicLab.Common;
 using HeuristicLab.Core;
 using HeuristicLab.Data;
Index: /trunk/sources/HeuristicLab.Encodings.PermutationEncoding/3.3/Moves/TwoOpt/InversionMoveTabuMaker.cs
===================================================================
--- /trunk/sources/HeuristicLab.Encodings.PermutationEncoding/3.3/Moves/TwoOpt/InversionMoveTabuMaker.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.Encodings.PermutationEncoding/3.3/Moves/TwoOpt/InversionMoveTabuMaker.cs	(revision 4068)
@@ -20,10 +20,5 @@
 #endregion
 
-using System;
-using HeuristicLab.Common;
 using HeuristicLab.Core;
-using HeuristicLab.Data;
-using HeuristicLab.Operators;
-using HeuristicLab.Optimization;
 using HeuristicLab.Optimization.Operators;
 using HeuristicLab.Parameters;
Index: /trunk/sources/HeuristicLab.Encodings.PermutationEncoding/3.3/Moves/TwoOpt/StochasticInversionMultiMoveGenerator.cs
===================================================================
--- /trunk/sources/HeuristicLab.Encodings.PermutationEncoding/3.3/Moves/TwoOpt/StochasticInversionMultiMoveGenerator.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.Encodings.PermutationEncoding/3.3/Moves/TwoOpt/StochasticInversionMultiMoveGenerator.cs	(revision 4068)
@@ -20,6 +20,4 @@
 #endregion
 
-using System;
-using HeuristicLab.Common;
 using HeuristicLab.Core;
 using HeuristicLab.Data;
Index: /trunk/sources/HeuristicLab.Encodings.PermutationEncoding/3.3/Moves/TwoOpt/StochasticInversionSingleMoveGenerator.cs
===================================================================
--- /trunk/sources/HeuristicLab.Encodings.PermutationEncoding/3.3/Moves/TwoOpt/StochasticInversionSingleMoveGenerator.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.Encodings.PermutationEncoding/3.3/Moves/TwoOpt/StochasticInversionSingleMoveGenerator.cs	(revision 4068)
@@ -21,7 +21,5 @@
 
 using System;
-using HeuristicLab.Common;
 using HeuristicLab.Core;
-using HeuristicLab.Data;
 using HeuristicLab.Optimization;
 using HeuristicLab.Parameters;
Index: /trunk/sources/HeuristicLab.Encodings.PermutationEncoding/3.3/PermutationCrossover.cs
===================================================================
--- /trunk/sources/HeuristicLab.Encodings.PermutationEncoding/3.3/PermutationCrossover.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.Encodings.PermutationEncoding/3.3/PermutationCrossover.cs	(revision 4068)
@@ -20,5 +20,4 @@
 #endregion
 
-using HeuristicLab.Common;
 using HeuristicLab.Core;
 using HeuristicLab.Operators;
Index: /trunk/sources/HeuristicLab.Encodings.PermutationEncoding/3.3/PermutationManipulator.cs
===================================================================
--- /trunk/sources/HeuristicLab.Encodings.PermutationEncoding/3.3/PermutationManipulator.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.Encodings.PermutationEncoding/3.3/PermutationManipulator.cs	(revision 4068)
@@ -20,5 +20,4 @@
 #endregion
 
-using HeuristicLab.Common;
 using HeuristicLab.Core;
 using HeuristicLab.Operators;
Index: /trunk/sources/HeuristicLab.Encodings.PermutationEncoding/3.3/Tests/CosaCrossoverTest.cs
===================================================================
--- /trunk/sources/HeuristicLab.Encodings.PermutationEncoding/3.3/Tests/CosaCrossoverTest.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.Encodings.PermutationEncoding/3.3/Tests/CosaCrossoverTest.cs	(revision 4068)
@@ -20,14 +20,13 @@
 #endregion
 
-using HeuristicLab.Common;
 using HeuristicLab.Core;
+using HeuristicLab.Encodings.PermutationEncoding;
 using Microsoft.VisualStudio.TestTools.UnitTesting;
-using HeuristicLab.Encodings.PermutationEncoding;
 
 namespace HeuristicLab.Encodings.PermutationEncoding_33.Tests {
-    /// <summary>
-    ///This is a test class for CosaCrossoverTest and is intended
-    ///to contain all CosaCrossoverTest Unit Tests
-    ///</summary>
+  /// <summary>
+  ///This is a test class for CosaCrossoverTest and is intended
+  ///to contain all CosaCrossoverTest Unit Tests
+  ///</summary>
   [TestClass()]
   public class CosaCrossoverTest {
@@ -87,5 +86,5 @@
     public void CosaCrossoverCrossTest() {
       TestRandom random = new TestRandom();
-      CosaCrossover_Accessor target = 
+      CosaCrossover_Accessor target =
         new CosaCrossover_Accessor(new PrivateObject(typeof(CosaCrossover)));
       // perform a test with more than two parents
@@ -95,5 +94,6 @@
         target.Cross(random, new ItemArray<Permutation>(new Permutation[] { 
           new Permutation(PermutationTypes.RelativeUndirected, 4), new Permutation(PermutationTypes.RelativeUndirected, 4), new Permutation(PermutationTypes.RelativeUndirected, 4)}));
-      } catch (System.InvalidOperationException) {
+      }
+      catch (System.InvalidOperationException) {
         exceptionFired = true;
       }
@@ -144,5 +144,5 @@
       Assert.IsTrue(actual.Validate());
       Assert.IsTrue(Auxiliary.PermutationIsEqualByPosition(expected, actual));
-      
+
       // perform a test when the two permutations are of unequal length
       random.Reset();
@@ -150,5 +150,6 @@
       try {
         CosaCrossover.Apply(random, new Permutation(PermutationTypes.RelativeUndirected, 8), new Permutation(PermutationTypes.RelativeUndirected, 6));
-      } catch (System.ArgumentException) {
+      }
+      catch (System.ArgumentException) {
         exceptionFired = true;
       }
Index: /trunk/sources/HeuristicLab.Encodings.PermutationEncoding/3.3/Tests/CyclicCrossover2Test.cs
===================================================================
--- /trunk/sources/HeuristicLab.Encodings.PermutationEncoding/3.3/Tests/CyclicCrossover2Test.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.Encodings.PermutationEncoding/3.3/Tests/CyclicCrossover2Test.cs	(revision 4068)
@@ -21,12 +21,12 @@
 
 using HeuristicLab.Core;
+using HeuristicLab.Encodings.PermutationEncoding;
 using Microsoft.VisualStudio.TestTools.UnitTesting;
-using HeuristicLab.Encodings.PermutationEncoding;
 
 namespace HeuristicLab.Encodings.PermutationEncoding_33.Tests {
-    /// <summary>
-    ///This is a test class for CyclicCrossover2Test and is intended
-    ///to contain all CyclicCrossover2Test Unit Tests
-    ///</summary>
+  /// <summary>
+  ///This is a test class for CyclicCrossover2Test and is intended
+  ///to contain all CyclicCrossover2Test Unit Tests
+  ///</summary>
   [TestClass()]
   public class CyclicCrossover2Test {
@@ -93,5 +93,6 @@
         target.Cross(random, new ItemArray<Permutation>(new Permutation[] { 
           new Permutation(PermutationTypes.RelativeUndirected, 4), new Permutation(PermutationTypes.RelativeUndirected, 4), new Permutation(PermutationTypes.RelativeUndirected, 4)}));
-      } catch (System.InvalidOperationException) {
+      }
+      catch (System.InvalidOperationException) {
         exceptionFired = true;
       }
@@ -124,5 +125,6 @@
       try {
         CyclicCrossover.Apply(random, new Permutation(PermutationTypes.RelativeUndirected, 8), new Permutation(PermutationTypes.RelativeUndirected, 6));
-      } catch (System.ArgumentException) {
+      }
+      catch (System.ArgumentException) {
         exceptionFired = true;
       }
Index: /trunk/sources/HeuristicLab.Encodings.PermutationEncoding/3.3/Tests/CyclicCrossoverTest.cs
===================================================================
--- /trunk/sources/HeuristicLab.Encodings.PermutationEncoding/3.3/Tests/CyclicCrossoverTest.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.Encodings.PermutationEncoding/3.3/Tests/CyclicCrossoverTest.cs	(revision 4068)
@@ -20,8 +20,7 @@
 #endregion
 
-using HeuristicLab.Common;
 using HeuristicLab.Core;
+using HeuristicLab.Encodings.PermutationEncoding;
 using Microsoft.VisualStudio.TestTools.UnitTesting;
-using HeuristicLab.Encodings.PermutationEncoding;
 
 namespace HeuristicLab.Encodings.PermutationEncoding_33.Tests {
Index: /trunk/sources/HeuristicLab.Encodings.PermutationEncoding/3.3/Tests/EdgeRecombinationCrossoverTest.cs
===================================================================
--- /trunk/sources/HeuristicLab.Encodings.PermutationEncoding/3.3/Tests/EdgeRecombinationCrossoverTest.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.Encodings.PermutationEncoding/3.3/Tests/EdgeRecombinationCrossoverTest.cs	(revision 4068)
@@ -20,8 +20,7 @@
 #endregion
 
-using HeuristicLab.Common;
 using HeuristicLab.Core;
+using HeuristicLab.Encodings.PermutationEncoding;
 using Microsoft.VisualStudio.TestTools.UnitTesting;
-using HeuristicLab.Encodings.PermutationEncoding;
 
 namespace HeuristicLab.Encodings.PermutationEncoding_33.Tests {
@@ -122,5 +121,5 @@
       Assert.IsTrue(actual.Validate());
       Assert.IsTrue(Auxiliary.PermutationIsEqualByPosition(expected, actual));
-     
+
       // perform a test when the two permutations are of unequal length
       random.Reset();
Index: /trunk/sources/HeuristicLab.Encodings.PermutationEncoding/3.3/Tests/InsertionManipulatorTest.cs
===================================================================
--- /trunk/sources/HeuristicLab.Encodings.PermutationEncoding/3.3/Tests/InsertionManipulatorTest.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.Encodings.PermutationEncoding/3.3/Tests/InsertionManipulatorTest.cs	(revision 4068)
@@ -20,6 +20,6 @@
 #endregion
 
+using HeuristicLab.Encodings.PermutationEncoding;
 using Microsoft.VisualStudio.TestTools.UnitTesting;
-using HeuristicLab.Encodings.PermutationEncoding;
 
 namespace HeuristicLab.Encodings.PermutationEncoding_33.Tests {
@@ -90,5 +90,5 @@
       parent = new Permutation(PermutationTypes.RelativeUndirected, new int[] { 0, 1, 2, 3, 4, 5, 6, 7 });
       Assert.IsTrue(parent.Validate());
-      
+
       expected = new Permutation(PermutationTypes.RelativeUndirected, new int[] { 0, 1, 2, 4, 5, 6, 3, 7 });
       Assert.IsTrue(expected.Validate());
Index: /trunk/sources/HeuristicLab.Encodings.PermutationEncoding/3.3/Tests/InversionManipulatorTest.cs
===================================================================
--- /trunk/sources/HeuristicLab.Encodings.PermutationEncoding/3.3/Tests/InversionManipulatorTest.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.Encodings.PermutationEncoding/3.3/Tests/InversionManipulatorTest.cs	(revision 4068)
@@ -20,6 +20,6 @@
 #endregion
 
+using HeuristicLab.Encodings.PermutationEncoding;
 using Microsoft.VisualStudio.TestTools.UnitTesting;
-using HeuristicLab.Encodings.PermutationEncoding;
 
 namespace HeuristicLab.Encodings.PermutationEncoding_33.Tests {
@@ -90,5 +90,5 @@
       parent = new Permutation(PermutationTypes.RelativeUndirected, new int[] { 0, 1, 2, 3, 4, 5, 6, 7, 8 });
       Assert.IsTrue(parent.Validate());
-      
+
       expected = new Permutation(PermutationTypes.RelativeUndirected, new int[] { 0, 4, 3, 2, 1, 5, 6, 7, 8 });
       Assert.IsTrue(expected.Validate());
Index: /trunk/sources/HeuristicLab.Encodings.PermutationEncoding/3.3/Tests/MaximalPreservativeCrossoverTest.cs
===================================================================
--- /trunk/sources/HeuristicLab.Encodings.PermutationEncoding/3.3/Tests/MaximalPreservativeCrossoverTest.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.Encodings.PermutationEncoding/3.3/Tests/MaximalPreservativeCrossoverTest.cs	(revision 4068)
@@ -20,8 +20,7 @@
 #endregion
 
-using HeuristicLab.Common;
 using HeuristicLab.Core;
+using HeuristicLab.Encodings.PermutationEncoding;
 using Microsoft.VisualStudio.TestTools.UnitTesting;
-using HeuristicLab.Encodings.PermutationEncoding;
 
 namespace HeuristicLab.Encodings.PermutationEncoding_33.Tests {
@@ -121,5 +120,5 @@
       Assert.IsTrue(actual.Validate());
       Assert.IsTrue(Auxiliary.PermutationIsEqualByPosition(expected, actual));
-     
+
       // perform a test when the two permutations are of unequal length
       random.Reset();
Index: /trunk/sources/HeuristicLab.Encodings.PermutationEncoding/3.3/Tests/OrderBasedCrossoverTest.cs
===================================================================
--- /trunk/sources/HeuristicLab.Encodings.PermutationEncoding/3.3/Tests/OrderBasedCrossoverTest.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.Encodings.PermutationEncoding/3.3/Tests/OrderBasedCrossoverTest.cs	(revision 4068)
@@ -20,14 +20,13 @@
 #endregion
 
-using HeuristicLab.Common;
 using HeuristicLab.Core;
+using HeuristicLab.Encodings.PermutationEncoding;
 using Microsoft.VisualStudio.TestTools.UnitTesting;
-using HeuristicLab.Encodings.PermutationEncoding;
 
 namespace HeuristicLab.Encodings.PermutationEncoding_33.Tests {
-    /// <summary>
-    ///This is a test class for OrderBasedCrossoverTest and is intended
-    ///to contain all OrderBasedCrossoverTest Unit Tests
-    ///</summary>
+  /// <summary>
+  ///This is a test class for OrderBasedCrossoverTest and is intended
+  ///to contain all OrderBasedCrossoverTest Unit Tests
+  ///</summary>
   [TestClass()]
   public class OrderBasedCrossoverTest {
@@ -87,5 +86,5 @@
     public void OrderBasedCrossoverCrossTest() {
       TestRandom random = new TestRandom();
-      OrderBasedCrossover_Accessor target = 
+      OrderBasedCrossover_Accessor target =
         new OrderBasedCrossover_Accessor(new PrivateObject(typeof(OrderBasedCrossover)));
       // perform a test with more than two parents
@@ -95,5 +94,6 @@
         target.Cross(random, new ItemArray<Permutation>(new Permutation[] { 
           new Permutation(PermutationTypes.RelativeUndirected, 4), new Permutation(PermutationTypes.RelativeUndirected, 4), new Permutation(PermutationTypes.RelativeUndirected, 4)}));
-      } catch (System.InvalidOperationException) {
+      }
+      catch (System.InvalidOperationException) {
         exceptionFired = true;
       }
@@ -124,5 +124,6 @@
       try {
         OrderBasedCrossover.Apply(random, new Permutation(PermutationTypes.RelativeUndirected, 8), new Permutation(PermutationTypes.RelativeUndirected, 6));
-      } catch (System.ArgumentException) {
+      }
+      catch (System.ArgumentException) {
         exceptionFired = true;
       }
Index: /trunk/sources/HeuristicLab.Encodings.PermutationEncoding/3.3/Tests/OrderCrossover2Test.cs
===================================================================
--- /trunk/sources/HeuristicLab.Encodings.PermutationEncoding/3.3/Tests/OrderCrossover2Test.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.Encodings.PermutationEncoding/3.3/Tests/OrderCrossover2Test.cs	(revision 4068)
@@ -21,12 +21,12 @@
 
 using HeuristicLab.Core;
+using HeuristicLab.Encodings.PermutationEncoding;
 using Microsoft.VisualStudio.TestTools.UnitTesting;
-using HeuristicLab.Encodings.PermutationEncoding;
 
 namespace HeuristicLab.Encodings.PermutationEncoding_33.Tests {
-    /// <summary>
-    ///This is a test class for OrderCrossover2Test and is intended
-    ///to contain all OrderCrossover2Test Unit Tests
-    ///</summary>
+  /// <summary>
+  ///This is a test class for OrderCrossover2Test and is intended
+  ///to contain all OrderCrossover2Test Unit Tests
+  ///</summary>
   [TestClass()]
   public class OrderCrossover2Test {
@@ -92,5 +92,6 @@
         target.Cross(random, new ItemArray<Permutation>(new Permutation[] { 
           new Permutation(PermutationTypes.RelativeUndirected, 4), new Permutation(PermutationTypes.RelativeUndirected, 4), new Permutation(PermutationTypes.RelativeUndirected, 4)}));
-      } catch (System.InvalidOperationException) {
+      }
+      catch (System.InvalidOperationException) {
         exceptionFired = true;
       }
@@ -123,5 +124,6 @@
       try {
         OrderCrossover.Apply(random, new Permutation(PermutationTypes.RelativeUndirected, 8), new Permutation(PermutationTypes.RelativeUndirected, 6));
-      } catch (System.ArgumentException) {
+      }
+      catch (System.ArgumentException) {
         exceptionFired = true;
       }
Index: /trunk/sources/HeuristicLab.Encodings.PermutationEncoding/3.3/Tests/OrderCrossoverTest.cs
===================================================================
--- /trunk/sources/HeuristicLab.Encodings.PermutationEncoding/3.3/Tests/OrderCrossoverTest.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.Encodings.PermutationEncoding/3.3/Tests/OrderCrossoverTest.cs	(revision 4068)
@@ -20,14 +20,13 @@
 #endregion
 
-using HeuristicLab.Common;
 using HeuristicLab.Core;
+using HeuristicLab.Encodings.PermutationEncoding;
 using Microsoft.VisualStudio.TestTools.UnitTesting;
-using HeuristicLab.Encodings.PermutationEncoding;
 
 namespace HeuristicLab.Encodings.PermutationEncoding_33.Tests {
-    /// <summary>
-    ///This is a test class for OrderCrossoverTest and is intended
-    ///to contain all OrderCrossoverTest Unit Tests
-    ///</summary>
+  /// <summary>
+  ///This is a test class for OrderCrossoverTest and is intended
+  ///to contain all OrderCrossoverTest Unit Tests
+  ///</summary>
   [TestClass()]
   public class OrderCrossoverTest {
@@ -87,5 +86,5 @@
     public void OrderCrossoverCrossTest() {
       TestRandom random = new TestRandom();
-      OrderCrossover_Accessor target = 
+      OrderCrossover_Accessor target =
         new OrderCrossover_Accessor(new PrivateObject(typeof(OrderCrossover)));
       // perform a test with more than two parents
@@ -95,5 +94,6 @@
         target.Cross(random, new ItemArray<Permutation>(new Permutation[] { 
           new Permutation(PermutationTypes.RelativeUndirected, 4), new Permutation(PermutationTypes.RelativeUndirected, 4), new Permutation(PermutationTypes.RelativeUndirected, 4)}));
-      } catch (System.InvalidOperationException) {
+      }
+      catch (System.InvalidOperationException) {
         exceptionFired = true;
       }
@@ -177,5 +177,6 @@
       try {
         OrderCrossover.Apply(random, new Permutation(PermutationTypes.RelativeUndirected, 8), new Permutation(PermutationTypes.RelativeUndirected, 6));
-      } catch (System.ArgumentException) {
+      }
+      catch (System.ArgumentException) {
         exceptionFired = true;
       }
Index: /trunk/sources/HeuristicLab.Encodings.PermutationEncoding/3.3/Tests/PartiallyMatchedCrossoverTest.cs
===================================================================
--- /trunk/sources/HeuristicLab.Encodings.PermutationEncoding/3.3/Tests/PartiallyMatchedCrossoverTest.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.Encodings.PermutationEncoding/3.3/Tests/PartiallyMatchedCrossoverTest.cs	(revision 4068)
@@ -20,8 +20,7 @@
 #endregion
 
-using HeuristicLab.Common;
 using HeuristicLab.Core;
+using HeuristicLab.Encodings.PermutationEncoding;
 using Microsoft.VisualStudio.TestTools.UnitTesting;
-using HeuristicLab.Encodings.PermutationEncoding;
 
 namespace HeuristicLab.Encodings.PermutationEncoding_33.Tests {
Index: /trunk/sources/HeuristicLab.Encodings.PermutationEncoding/3.3/Tests/PositionBasedCrossoverTest.cs
===================================================================
--- /trunk/sources/HeuristicLab.Encodings.PermutationEncoding/3.3/Tests/PositionBasedCrossoverTest.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.Encodings.PermutationEncoding/3.3/Tests/PositionBasedCrossoverTest.cs	(revision 4068)
@@ -20,8 +20,7 @@
 #endregion
 
-using HeuristicLab.Common;
 using HeuristicLab.Core;
+using HeuristicLab.Encodings.PermutationEncoding;
 using Microsoft.VisualStudio.TestTools.UnitTesting;
-using HeuristicLab.Encodings.PermutationEncoding;
 
 namespace HeuristicLab.Encodings.PermutationEncoding_33.Tests {
@@ -89,5 +88,5 @@
       PositionBasedCrossover_Accessor target = new PositionBasedCrossover_Accessor(
         new PrivateObject(typeof(PositionBasedCrossover)));
-     
+
       // perform a test with more than two parents
       random.Reset();
@@ -131,5 +130,6 @@
       try {
         PositionBasedCrossover.Apply(random, new Permutation(PermutationTypes.RelativeUndirected, 8), new Permutation(PermutationTypes.RelativeUndirected, 6));
-      } catch (System.ArgumentException) {
+      }
+      catch (System.ArgumentException) {
         exceptionFired = true;
       }
Index: /trunk/sources/HeuristicLab.Encodings.PermutationEncoding/3.3/Tests/ScrambleManipulatorTest.cs
===================================================================
--- /trunk/sources/HeuristicLab.Encodings.PermutationEncoding/3.3/Tests/ScrambleManipulatorTest.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.Encodings.PermutationEncoding/3.3/Tests/ScrambleManipulatorTest.cs	(revision 4068)
@@ -20,6 +20,6 @@
 #endregion
 
+using HeuristicLab.Encodings.PermutationEncoding;
 using Microsoft.VisualStudio.TestTools.UnitTesting;
-using HeuristicLab.Encodings.PermutationEncoding;
 
 namespace HeuristicLab.Encodings.PermutationEncoding_33.Tests {
@@ -90,5 +90,5 @@
       parent = new Permutation(PermutationTypes.RelativeUndirected, new int[] { 0, 1, 2, 3, 4, 5, 6, 7 });
       Assert.IsTrue(parent.Validate());
-      
+
       expected = new Permutation(PermutationTypes.RelativeUndirected, new int[] { 0, 1, 2, 4, 5, 6, 3, 7 });
       Assert.IsTrue(expected.Validate());
Index: /trunk/sources/HeuristicLab.Encodings.PermutationEncoding/3.3/Tests/Swap2ManipulatorTest.cs
===================================================================
--- /trunk/sources/HeuristicLab.Encodings.PermutationEncoding/3.3/Tests/Swap2ManipulatorTest.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.Encodings.PermutationEncoding/3.3/Tests/Swap2ManipulatorTest.cs	(revision 4068)
@@ -20,6 +20,6 @@
 #endregion
 
+using HeuristicLab.Encodings.PermutationEncoding;
 using Microsoft.VisualStudio.TestTools.UnitTesting;
-using HeuristicLab.Encodings.PermutationEncoding;
 
 namespace HeuristicLab.Encodings.PermutationEncoding_33.Tests {
Index: /trunk/sources/HeuristicLab.Encodings.PermutationEncoding/3.3/Tests/Swap3ManipulatorTest.cs
===================================================================
--- /trunk/sources/HeuristicLab.Encodings.PermutationEncoding/3.3/Tests/Swap3ManipulatorTest.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.Encodings.PermutationEncoding/3.3/Tests/Swap3ManipulatorTest.cs	(revision 4068)
@@ -20,6 +20,6 @@
 #endregion
 
+using HeuristicLab.Encodings.PermutationEncoding;
 using Microsoft.VisualStudio.TestTools.UnitTesting;
-using HeuristicLab.Encodings.PermutationEncoding;
 
 namespace HeuristicLab.Encodings.PermutationEncoding_33.Tests {
Index: /trunk/sources/HeuristicLab.Encodings.PermutationEncoding/3.3/Tests/TranslocationInversionManipulatorTest.cs
===================================================================
--- /trunk/sources/HeuristicLab.Encodings.PermutationEncoding/3.3/Tests/TranslocationInversionManipulatorTest.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.Encodings.PermutationEncoding/3.3/Tests/TranslocationInversionManipulatorTest.cs	(revision 4068)
@@ -20,6 +20,6 @@
 #endregion
 
+using HeuristicLab.Encodings.PermutationEncoding;
 using Microsoft.VisualStudio.TestTools.UnitTesting;
-using HeuristicLab.Encodings.PermutationEncoding;
 
 namespace HeuristicLab.Encodings.PermutationEncoding_33.Tests {
@@ -90,5 +90,5 @@
       parent = new Permutation(PermutationTypes.RelativeUndirected, new int[] { 0, 1, 2, 3, 4, 5, 6, 7 });
       Assert.IsTrue(parent.Validate());
-      
+
       expected = new Permutation(PermutationTypes.RelativeUndirected, new int[] { 0, 1, 5, 6, 4, 3, 2, 7 });
       Assert.IsTrue(expected.Validate());
Index: /trunk/sources/HeuristicLab.Encodings.PermutationEncoding/3.3/Tests/TranslocationManipulatorTest.cs
===================================================================
--- /trunk/sources/HeuristicLab.Encodings.PermutationEncoding/3.3/Tests/TranslocationManipulatorTest.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.Encodings.PermutationEncoding/3.3/Tests/TranslocationManipulatorTest.cs	(revision 4068)
@@ -20,6 +20,6 @@
 #endregion
 
+using HeuristicLab.Encodings.PermutationEncoding;
 using Microsoft.VisualStudio.TestTools.UnitTesting;
-using HeuristicLab.Encodings.PermutationEncoding;
 
 namespace HeuristicLab.Encodings.PermutationEncoding_33.Tests {
@@ -90,5 +90,5 @@
       parent = new Permutation(PermutationTypes.RelativeUndirected, new int[] { 0, 1, 2, 3, 4, 5, 6, 7 });
       Assert.IsTrue(parent.Validate());
-      
+
       expected = new Permutation(PermutationTypes.RelativeUndirected, new int[] { 0, 1, 5, 6, 2, 3, 4, 7 });
       Assert.IsTrue(expected.Validate());
Index: /trunk/sources/HeuristicLab.Encodings.RealVectorEncoding/3.3/BoundsChecker.cs
===================================================================
--- /trunk/sources/HeuristicLab.Encodings.RealVectorEncoding/3.3/BoundsChecker.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.Encodings.RealVectorEncoding/3.3/BoundsChecker.cs	(revision 4068)
@@ -21,5 +21,4 @@
 
 using System;
-using HeuristicLab.Common;
 using HeuristicLab.Core;
 using HeuristicLab.Data;
Index: /trunk/sources/HeuristicLab.Encodings.RealVectorEncoding/3.3/Creators/UniformRandomRealVectorCreator.cs
===================================================================
--- /trunk/sources/HeuristicLab.Encodings.RealVectorEncoding/3.3/Creators/UniformRandomRealVectorCreator.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.Encodings.RealVectorEncoding/3.3/Creators/UniformRandomRealVectorCreator.cs	(revision 4068)
@@ -21,10 +21,7 @@
 
 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;
 
Index: /trunk/sources/HeuristicLab.Encodings.RealVectorEncoding/3.3/Crossovers/AverageCrossover.cs
===================================================================
--- /trunk/sources/HeuristicLab.Encodings.RealVectorEncoding/3.3/Crossovers/AverageCrossover.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.Encodings.RealVectorEncoding/3.3/Crossovers/AverageCrossover.cs	(revision 4068)
@@ -21,7 +21,5 @@
 
 using System;
-using HeuristicLab.Common;
 using HeuristicLab.Core;
-using HeuristicLab.Data;
 using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
 
@@ -58,5 +56,6 @@
           result[i] = avg / (double)parentsCount;
         }
-      } catch (IndexOutOfRangeException) {
+      }
+      catch (IndexOutOfRangeException) {
         throw new ArgumentException("AverageCrossover: The parents' vectors are of different length.", "parents");
       }
Index: /trunk/sources/HeuristicLab.Encodings.RealVectorEncoding/3.3/Crossovers/BlendAlphaBetaCrossover.cs
===================================================================
--- /trunk/sources/HeuristicLab.Encodings.RealVectorEncoding/3.3/Crossovers/BlendAlphaBetaCrossover.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.Encodings.RealVectorEncoding/3.3/Crossovers/BlendAlphaBetaCrossover.cs	(revision 4068)
@@ -21,5 +21,4 @@
 
 using System;
-using HeuristicLab.Common;
 using HeuristicLab.Core;
 using HeuristicLab.Data;
@@ -138,5 +137,5 @@
       if (QualityParameter.ActualValue == null || QualityParameter.ActualValue.Length != parents.Length) throw new InvalidOperationException("BlendAlphaBetaCrossover: Parameter " + QualityParameter.ActualName + " could not be found, or not in the same quantity as there are parents.");
       if (AlphaParameter.ActualValue == null || BetaParameter.ActualValue == null) throw new InvalidOperationException("BlendAlphaBetaCrossover: Parameter " + AlphaParameter.ActualName + " or paramter " + BetaParameter.ActualName + " could not be found.");
-      
+
       ItemArray<DoubleValue> qualities = QualityParameter.ActualValue;
       bool maximization = MaximizationParameter.ActualValue.Value;
Index: /trunk/sources/HeuristicLab.Encodings.RealVectorEncoding/3.3/Crossovers/BlendAlphaCrossover.cs
===================================================================
--- /trunk/sources/HeuristicLab.Encodings.RealVectorEncoding/3.3/Crossovers/BlendAlphaCrossover.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.Encodings.RealVectorEncoding/3.3/Crossovers/BlendAlphaCrossover.cs	(revision 4068)
@@ -21,5 +21,4 @@
 
 using System;
-using HeuristicLab.Common;
 using HeuristicLab.Core;
 using HeuristicLab.Data;
Index: /trunk/sources/HeuristicLab.Encodings.RealVectorEncoding/3.3/Crossovers/DiscreteCrossover.cs
===================================================================
--- /trunk/sources/HeuristicLab.Encodings.RealVectorEncoding/3.3/Crossovers/DiscreteCrossover.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.Encodings.RealVectorEncoding/3.3/Crossovers/DiscreteCrossover.cs	(revision 4068)
@@ -21,8 +21,5 @@
 
 using System;
-using HeuristicLab.Common;
 using HeuristicLab.Core;
-using HeuristicLab.Data;
-using HeuristicLab.Parameters;
 using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
 
@@ -48,15 +45,15 @@
     public static RealVector Apply(IRandom random, ItemArray<RealVector> parents) {
       int length = parents[0].Length;
-      
-      for (int i = 0; i < parents.Length; i++) { 
-        if(parents[i].Length != length)
+
+      for (int i = 0; i < parents.Length; i++) {
+        if (parents[i].Length != length)
           throw new ArgumentException("DiscreteCrossover: The parents' vectors are of different length.", "parents");
       }
-      
+
       RealVector result = new RealVector(length);
       for (int i = 0; i < length; i++) {
         result[i] = parents[random.Next(parents.Length)][i];
-      }        
-      
+      }
+
       return result;
     }
Index: /trunk/sources/HeuristicLab.Encodings.RealVectorEncoding/3.3/Crossovers/HeuristicCrossover.cs
===================================================================
--- /trunk/sources/HeuristicLab.Encodings.RealVectorEncoding/3.3/Crossovers/HeuristicCrossover.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.Encodings.RealVectorEncoding/3.3/Crossovers/HeuristicCrossover.cs	(revision 4068)
@@ -21,5 +21,4 @@
 
 using System;
-using HeuristicLab.Common;
 using HeuristicLab.Core;
 using HeuristicLab.Data;
@@ -72,5 +71,5 @@
       if (betterParent.Length != worseParent.Length)
         throw new ArgumentException("HeuristicCrossover: the two parents are not of the same length");
-      
+
       int length = betterParent.Length;
       double[] result = new double[length];
Index: /trunk/sources/HeuristicLab.Encodings.RealVectorEncoding/3.3/Crossovers/LocalCrossover.cs
===================================================================
--- /trunk/sources/HeuristicLab.Encodings.RealVectorEncoding/3.3/Crossovers/LocalCrossover.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.Encodings.RealVectorEncoding/3.3/Crossovers/LocalCrossover.cs	(revision 4068)
@@ -21,7 +21,5 @@
 
 using System;
-using HeuristicLab.Common;
 using HeuristicLab.Core;
-using HeuristicLab.Data;
 using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
 
@@ -47,5 +45,5 @@
       if (parent1.Length != parent2.Length)
         throw new ArgumentException("LocalCrossover: the two parents are not of the same length");
-      
+
       double factor;
       int length = parent1.Length;
Index: /trunk/sources/HeuristicLab.Encodings.RealVectorEncoding/3.3/Crossovers/RandomConvexCrossover.cs
===================================================================
--- /trunk/sources/HeuristicLab.Encodings.RealVectorEncoding/3.3/Crossovers/RandomConvexCrossover.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.Encodings.RealVectorEncoding/3.3/Crossovers/RandomConvexCrossover.cs	(revision 4068)
@@ -21,7 +21,5 @@
 
 using System;
-using HeuristicLab.Common;
 using HeuristicLab.Core;
-using HeuristicLab.Data;
 using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
 
@@ -47,5 +45,5 @@
       if (parent1.Length != parent2.Length)
         throw new ArgumentException("ERROR in RandomConvexCrossover: the two parents are not of the same length");
-      
+
       int length = parent1.Length;
       double[] result = new double[length];
Index: /trunk/sources/HeuristicLab.Encodings.RealVectorEncoding/3.3/Crossovers/SimulatedBinaryCrossover.cs
===================================================================
--- /trunk/sources/HeuristicLab.Encodings.RealVectorEncoding/3.3/Crossovers/SimulatedBinaryCrossover.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.Encodings.RealVectorEncoding/3.3/Crossovers/SimulatedBinaryCrossover.cs	(revision 4068)
@@ -21,5 +21,4 @@
 
 using System;
-using HeuristicLab.Common;
 using HeuristicLab.Core;
 using HeuristicLab.Data;
Index: /trunk/sources/HeuristicLab.Encodings.RealVectorEncoding/3.3/Crossovers/SinglePointCrossover.cs
===================================================================
--- /trunk/sources/HeuristicLab.Encodings.RealVectorEncoding/3.3/Crossovers/SinglePointCrossover.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.Encodings.RealVectorEncoding/3.3/Crossovers/SinglePointCrossover.cs	(revision 4068)
@@ -21,7 +21,5 @@
 
 using System;
-using HeuristicLab.Common;
 using HeuristicLab.Core;
-using HeuristicLab.Data;
 using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
 
Index: /trunk/sources/HeuristicLab.Encodings.RealVectorEncoding/3.3/Crossovers/UniformAllPositionsArithmeticCrossover.cs
===================================================================
--- /trunk/sources/HeuristicLab.Encodings.RealVectorEncoding/3.3/Crossovers/UniformAllPositionsArithmeticCrossover.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.Encodings.RealVectorEncoding/3.3/Crossovers/UniformAllPositionsArithmeticCrossover.cs	(revision 4068)
@@ -21,5 +21,4 @@
 
 using System;
-using HeuristicLab.Common;
 using HeuristicLab.Core;
 using HeuristicLab.Data;
@@ -82,5 +81,5 @@
     /// <returns>The vector resulting from the crossover.</returns>
     protected override RealVector Cross(IRandom random, ItemArray<RealVector> parents) {
- 	    if (parents.Length != 2) throw new ArgumentException("UniformAllPositionsArithmeticCrossover: There must be exactly two parents.", "parents");
+      if (parents.Length != 2) throw new ArgumentException("UniformAllPositionsArithmeticCrossover: There must be exactly two parents.", "parents");
       if (AlphaParameter.ActualValue == null) throw new InvalidOperationException("UniformAllPositionsArithmeticCrossover: Parameter " + AlphaParameter.ActualName + " could not be found.");
       return Apply(random, parents[0], parents[1], AlphaParameter.ActualValue);
Index: /trunk/sources/HeuristicLab.Encodings.RealVectorEncoding/3.3/Crossovers/UniformSomePositionsArithmeticCrossover.cs
===================================================================
--- /trunk/sources/HeuristicLab.Encodings.RealVectorEncoding/3.3/Crossovers/UniformSomePositionsArithmeticCrossover.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.Encodings.RealVectorEncoding/3.3/Crossovers/UniformSomePositionsArithmeticCrossover.cs	(revision 4068)
@@ -21,5 +21,4 @@
 
 using System;
-using HeuristicLab.Common;
 using HeuristicLab.Core;
 using HeuristicLab.Data;
@@ -74,5 +73,5 @@
       if (alpha.Value < 0 || alpha.Value > 1) throw new ArgumentException("UniformSomePositionsArithmeticCrossover: Parameter alpha must be in the range [0;1]", "alpha");
       if (probability.Value < 0 || probability.Value > 1) throw new ArgumentException("UniformSomePositionsArithmeticCrossover: Parameter probability must be in the range [0;1]", "probability");
-      
+
       RealVector result = new RealVector(length);
       for (int i = 0; i < length; i++) {
@@ -92,5 +91,5 @@
     /// <param name="parents">The collection of parents (must be of size 2).</param>
     /// <returns>The vector resulting from the crossover.</returns>
-    protected override RealVector  Cross(IRandom random, ItemArray<RealVector> parents) {
+    protected override RealVector Cross(IRandom random, ItemArray<RealVector> parents) {
       if (parents.Length != 2) throw new ArgumentException("UniformSomePositionsArithmeticCrossover: There must be exactly two parents.", "parents");
       if (AlphaParameter.ActualValue == null) throw new InvalidOperationException("UniformSomePositionsArithmeticCrossover: Parameter " + AlphaParameter.ActualName + " could not be found.");
Index: /trunk/sources/HeuristicLab.Encodings.RealVectorEncoding/3.3/Interfaces/IAdditiveRealVectorMoveOperator.cs
===================================================================
--- /trunk/sources/HeuristicLab.Encodings.RealVectorEncoding/3.3/Interfaces/IAdditiveRealVectorMoveOperator.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.Encodings.RealVectorEncoding/3.3/Interfaces/IAdditiveRealVectorMoveOperator.cs	(revision 4068)
@@ -20,7 +20,5 @@
 #endregion
 
-using HeuristicLab.Common;
 using HeuristicLab.Core;
-using HeuristicLab.Optimization;
 
 namespace HeuristicLab.Encodings.RealVectorEncoding {
Index: /trunk/sources/HeuristicLab.Encodings.RealVectorEncoding/3.3/Interfaces/IRealVectorBoundsChecker.cs
===================================================================
--- /trunk/sources/HeuristicLab.Encodings.RealVectorEncoding/3.3/Interfaces/IRealVectorBoundsChecker.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.Encodings.RealVectorEncoding/3.3/Interfaces/IRealVectorBoundsChecker.cs	(revision 4068)
@@ -20,5 +20,4 @@
 #endregion
 
-using HeuristicLab.Common;
 using HeuristicLab.Core;
 using HeuristicLab.Data;
Index: /trunk/sources/HeuristicLab.Encodings.RealVectorEncoding/3.3/Interfaces/IRealVectorCreator.cs
===================================================================
--- /trunk/sources/HeuristicLab.Encodings.RealVectorEncoding/3.3/Interfaces/IRealVectorCreator.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.Encodings.RealVectorEncoding/3.3/Interfaces/IRealVectorCreator.cs	(revision 4068)
@@ -20,5 +20,4 @@
 #endregion
 
-using HeuristicLab.Common;
 using HeuristicLab.Core;
 using HeuristicLab.Data;
Index: /trunk/sources/HeuristicLab.Encodings.RealVectorEncoding/3.3/Interfaces/IRealVectorCrossover.cs
===================================================================
--- /trunk/sources/HeuristicLab.Encodings.RealVectorEncoding/3.3/Interfaces/IRealVectorCrossover.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.Encodings.RealVectorEncoding/3.3/Interfaces/IRealVectorCrossover.cs	(revision 4068)
@@ -20,5 +20,4 @@
 #endregion
 
-using HeuristicLab.Common;
 using HeuristicLab.Core;
 using HeuristicLab.Data;
Index: /trunk/sources/HeuristicLab.Encodings.RealVectorEncoding/3.3/Interfaces/IRealVectorManipulator.cs
===================================================================
--- /trunk/sources/HeuristicLab.Encodings.RealVectorEncoding/3.3/Interfaces/IRealVectorManipulator.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.Encodings.RealVectorEncoding/3.3/Interfaces/IRealVectorManipulator.cs	(revision 4068)
@@ -20,5 +20,4 @@
 #endregion
 
-using HeuristicLab.Common;
 using HeuristicLab.Core;
 using HeuristicLab.Data;
Index: /trunk/sources/HeuristicLab.Encodings.RealVectorEncoding/3.3/Interfaces/IRealVectorMoveGenerator.cs
===================================================================
--- /trunk/sources/HeuristicLab.Encodings.RealVectorEncoding/3.3/Interfaces/IRealVectorMoveGenerator.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.Encodings.RealVectorEncoding/3.3/Interfaces/IRealVectorMoveGenerator.cs	(revision 4068)
@@ -20,5 +20,4 @@
 #endregion
 
-using HeuristicLab.Common;
 using HeuristicLab.Core;
 using HeuristicLab.Data;
Index: /trunk/sources/HeuristicLab.Encodings.RealVectorEncoding/3.3/Interfaces/IRealVectorMoveOperator.cs
===================================================================
--- /trunk/sources/HeuristicLab.Encodings.RealVectorEncoding/3.3/Interfaces/IRealVectorMoveOperator.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.Encodings.RealVectorEncoding/3.3/Interfaces/IRealVectorMoveOperator.cs	(revision 4068)
@@ -20,7 +20,5 @@
 #endregion
 
-using HeuristicLab.Common;
 using HeuristicLab.Core;
-using HeuristicLab.Data;
 using HeuristicLab.Optimization;
 
Index: /trunk/sources/HeuristicLab.Encodings.RealVectorEncoding/3.3/Interfaces/IRealVectorOperator.cs
===================================================================
--- /trunk/sources/HeuristicLab.Encodings.RealVectorEncoding/3.3/Interfaces/IRealVectorOperator.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.Encodings.RealVectorEncoding/3.3/Interfaces/IRealVectorOperator.cs	(revision 4068)
@@ -20,5 +20,4 @@
 #endregion
 
-using HeuristicLab.Common;
 using HeuristicLab.Core;
 
Index: /trunk/sources/HeuristicLab.Encodings.RealVectorEncoding/3.3/Interfaces/IRealVectorStdDevStrategyParameterCreator.cs
===================================================================
--- /trunk/sources/HeuristicLab.Encodings.RealVectorEncoding/3.3/Interfaces/IRealVectorStdDevStrategyParameterCreator.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.Encodings.RealVectorEncoding/3.3/Interfaces/IRealVectorStdDevStrategyParameterCreator.cs	(revision 4068)
@@ -20,5 +20,4 @@
 #endregion
 
-using HeuristicLab.Common;
 using HeuristicLab.Core;
 using HeuristicLab.Data;
Index: /trunk/sources/HeuristicLab.Encodings.RealVectorEncoding/3.3/Interfaces/IRealVectorStdDevStrategyParameterCrossover.cs
===================================================================
--- /trunk/sources/HeuristicLab.Encodings.RealVectorEncoding/3.3/Interfaces/IRealVectorStdDevStrategyParameterCrossover.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.Encodings.RealVectorEncoding/3.3/Interfaces/IRealVectorStdDevStrategyParameterCrossover.cs	(revision 4068)
@@ -20,7 +20,5 @@
 #endregion
 
-using HeuristicLab.Common;
 using HeuristicLab.Core;
-using HeuristicLab.Data;
 using HeuristicLab.Optimization;
 
Index: /trunk/sources/HeuristicLab.Encodings.RealVectorEncoding/3.3/Interfaces/IRealVectorStdDevStrategyParameterManipulator.cs
===================================================================
--- /trunk/sources/HeuristicLab.Encodings.RealVectorEncoding/3.3/Interfaces/IRealVectorStdDevStrategyParameterManipulator.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.Encodings.RealVectorEncoding/3.3/Interfaces/IRealVectorStdDevStrategyParameterManipulator.cs	(revision 4068)
@@ -20,5 +20,4 @@
 #endregion
 
-using HeuristicLab.Common;
 using HeuristicLab.Core;
 using HeuristicLab.Data;
Index: /trunk/sources/HeuristicLab.Encodings.RealVectorEncoding/3.3/Interfaces/IRealVectorStdDevStrategyParameterOperator.cs
===================================================================
--- /trunk/sources/HeuristicLab.Encodings.RealVectorEncoding/3.3/Interfaces/IRealVectorStdDevStrategyParameterOperator.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.Encodings.RealVectorEncoding/3.3/Interfaces/IRealVectorStdDevStrategyParameterOperator.cs	(revision 4068)
@@ -20,7 +20,4 @@
 #endregion
 
-using HeuristicLab.Common;
-using HeuristicLab.Core;
-using HeuristicLab.Optimization;
 
 namespace HeuristicLab.Encodings.RealVectorEncoding {
Index: /trunk/sources/HeuristicLab.Encodings.RealVectorEncoding/3.3/Manipulators/BreederGeneticAlgorithmManipulator.cs
===================================================================
--- /trunk/sources/HeuristicLab.Encodings.RealVectorEncoding/3.3/Manipulators/BreederGeneticAlgorithmManipulator.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.Encodings.RealVectorEncoding/3.3/Manipulators/BreederGeneticAlgorithmManipulator.cs	(revision 4068)
@@ -21,5 +21,4 @@
 
 using System;
-using HeuristicLab.Common;
 using HeuristicLab.Core;
 using HeuristicLab.Data;
Index: /trunk/sources/HeuristicLab.Encodings.RealVectorEncoding/3.3/Manipulators/MichalewiczNonUniformAllPositionsManipulator.cs
===================================================================
--- /trunk/sources/HeuristicLab.Encodings.RealVectorEncoding/3.3/Manipulators/MichalewiczNonUniformAllPositionsManipulator.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.Encodings.RealVectorEncoding/3.3/Manipulators/MichalewiczNonUniformAllPositionsManipulator.cs	(revision 4068)
@@ -21,5 +21,4 @@
 
 using System;
-using HeuristicLab.Common;
 using HeuristicLab.Core;
 using HeuristicLab.Data;
Index: /trunk/sources/HeuristicLab.Encodings.RealVectorEncoding/3.3/Manipulators/MichalewiczNonUniformOnePositionManipulator.cs
===================================================================
--- /trunk/sources/HeuristicLab.Encodings.RealVectorEncoding/3.3/Manipulators/MichalewiczNonUniformOnePositionManipulator.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.Encodings.RealVectorEncoding/3.3/Manipulators/MichalewiczNonUniformOnePositionManipulator.cs	(revision 4068)
@@ -21,5 +21,4 @@
 
 using System;
-using HeuristicLab.Common;
 using HeuristicLab.Core;
 using HeuristicLab.Data;
Index: /trunk/sources/HeuristicLab.Encodings.RealVectorEncoding/3.3/Manipulators/NormalAllPositionsManipulator.cs
===================================================================
--- /trunk/sources/HeuristicLab.Encodings.RealVectorEncoding/3.3/Manipulators/NormalAllPositionsManipulator.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.Encodings.RealVectorEncoding/3.3/Manipulators/NormalAllPositionsManipulator.cs	(revision 4068)
@@ -21,7 +21,5 @@
 
 using System;
-using HeuristicLab.Common;
 using HeuristicLab.Core;
-using HeuristicLab.Data;
 using HeuristicLab.Optimization;
 using HeuristicLab.Parameters;
Index: /trunk/sources/HeuristicLab.Encodings.RealVectorEncoding/3.3/Manipulators/PolynomialAllPositionManipulator.cs
===================================================================
--- /trunk/sources/HeuristicLab.Encodings.RealVectorEncoding/3.3/Manipulators/PolynomialAllPositionManipulator.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.Encodings.RealVectorEncoding/3.3/Manipulators/PolynomialAllPositionManipulator.cs	(revision 4068)
@@ -21,5 +21,4 @@
 
 using System;
-using HeuristicLab.Common;
 using HeuristicLab.Core;
 using HeuristicLab.Data;
Index: /trunk/sources/HeuristicLab.Encodings.RealVectorEncoding/3.3/Manipulators/PolynomialOnePositionManipulator.cs
===================================================================
--- /trunk/sources/HeuristicLab.Encodings.RealVectorEncoding/3.3/Manipulators/PolynomialOnePositionManipulator.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.Encodings.RealVectorEncoding/3.3/Manipulators/PolynomialOnePositionManipulator.cs	(revision 4068)
@@ -21,5 +21,4 @@
 
 using System;
-using HeuristicLab.Common;
 using HeuristicLab.Core;
 using HeuristicLab.Data;
Index: /trunk/sources/HeuristicLab.Encodings.RealVectorEncoding/3.3/Manipulators/UniformOnePositionManipulator.cs
===================================================================
--- /trunk/sources/HeuristicLab.Encodings.RealVectorEncoding/3.3/Manipulators/UniformOnePositionManipulator.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.Encodings.RealVectorEncoding/3.3/Manipulators/UniformOnePositionManipulator.cs	(revision 4068)
@@ -21,8 +21,6 @@
 
 using System;
-using HeuristicLab.Common;
 using HeuristicLab.Core;
 using HeuristicLab.Data;
-using HeuristicLab.Parameters;
 using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
 
Index: /trunk/sources/HeuristicLab.Encodings.RealVectorEncoding/3.3/Moves/AdditiveMoveGenerator.cs
===================================================================
--- /trunk/sources/HeuristicLab.Encodings.RealVectorEncoding/3.3/Moves/AdditiveMoveGenerator.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.Encodings.RealVectorEncoding/3.3/Moves/AdditiveMoveGenerator.cs	(revision 4068)
@@ -20,12 +20,10 @@
 #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;
-using HeuristicLab.Data;
 
 namespace HeuristicLab.Encodings.RealVectorEncoding {
Index: /trunk/sources/HeuristicLab.Encodings.RealVectorEncoding/3.3/Moves/AdditiveMoveMaker.cs
===================================================================
--- /trunk/sources/HeuristicLab.Encodings.RealVectorEncoding/3.3/Moves/AdditiveMoveMaker.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.Encodings.RealVectorEncoding/3.3/Moves/AdditiveMoveMaker.cs	(revision 4068)
@@ -20,6 +20,4 @@
 #endregion
 
-using System;
-using HeuristicLab.Common;
 using HeuristicLab.Core;
 using HeuristicLab.Data;
Index: /trunk/sources/HeuristicLab.Encodings.RealVectorEncoding/3.3/Moves/AdditiveMoveTabuChecker.cs
===================================================================
--- /trunk/sources/HeuristicLab.Encodings.RealVectorEncoding/3.3/Moves/AdditiveMoveTabuChecker.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.Encodings.RealVectorEncoding/3.3/Moves/AdditiveMoveTabuChecker.cs	(revision 4068)
@@ -21,5 +21,4 @@
 
 using System;
-using HeuristicLab.Common;
 using HeuristicLab.Core;
 using HeuristicLab.Data;
Index: /trunk/sources/HeuristicLab.Encodings.RealVectorEncoding/3.3/Moves/AdditiveMoveTabuMaker.cs
===================================================================
--- /trunk/sources/HeuristicLab.Encodings.RealVectorEncoding/3.3/Moves/AdditiveMoveTabuMaker.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.Encodings.RealVectorEncoding/3.3/Moves/AdditiveMoveTabuMaker.cs	(revision 4068)
@@ -20,10 +20,5 @@
 #endregion
 
-using System;
-using HeuristicLab.Common;
 using HeuristicLab.Core;
-using HeuristicLab.Data;
-using HeuristicLab.Operators;
-using HeuristicLab.Optimization;
 using HeuristicLab.Optimization.Operators;
 using HeuristicLab.Parameters;
Index: /trunk/sources/HeuristicLab.Encodings.RealVectorEncoding/3.3/Moves/StochasticNormalMultiMoveGenerator.cs
===================================================================
--- /trunk/sources/HeuristicLab.Encodings.RealVectorEncoding/3.3/Moves/StochasticNormalMultiMoveGenerator.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.Encodings.RealVectorEncoding/3.3/Moves/StochasticNormalMultiMoveGenerator.cs	(revision 4068)
@@ -20,12 +20,9 @@
 #endregion
 
-using System;
-using HeuristicLab.Common;
 using HeuristicLab.Core;
+using HeuristicLab.Data;
+using HeuristicLab.Optimization;
+using HeuristicLab.Parameters;
 using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
-using HeuristicLab.Optimization;
-using HeuristicLab.Operators;
-using HeuristicLab.Parameters;
-using HeuristicLab.Data;
 using HeuristicLab.Random;
 
Index: /trunk/sources/HeuristicLab.Encodings.RealVectorEncoding/3.3/Moves/StochasticPolynomialMultiMoveGenerator.cs
===================================================================
--- /trunk/sources/HeuristicLab.Encodings.RealVectorEncoding/3.3/Moves/StochasticPolynomialMultiMoveGenerator.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.Encodings.RealVectorEncoding/3.3/Moves/StochasticPolynomialMultiMoveGenerator.cs	(revision 4068)
@@ -20,12 +20,9 @@
 #endregion
 
-using System;
-using HeuristicLab.Common;
 using HeuristicLab.Core;
+using HeuristicLab.Data;
+using HeuristicLab.Optimization;
+using HeuristicLab.Parameters;
 using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
-using HeuristicLab.Optimization;
-using HeuristicLab.Operators;
-using HeuristicLab.Parameters;
-using HeuristicLab.Data;
 
 namespace HeuristicLab.Encodings.RealVectorEncoding {
Index: /trunk/sources/HeuristicLab.Encodings.RealVectorEncoding/3.3/RealVectorCreator.cs
===================================================================
--- /trunk/sources/HeuristicLab.Encodings.RealVectorEncoding/3.3/RealVectorCreator.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.Encodings.RealVectorEncoding/3.3/RealVectorCreator.cs	(revision 4068)
@@ -20,5 +20,4 @@
 #endregion
 
-using HeuristicLab.Common;
 using HeuristicLab.Core;
 using HeuristicLab.Data;
Index: /trunk/sources/HeuristicLab.Encodings.RealVectorEncoding/3.3/RealVectorCrossover.cs
===================================================================
--- /trunk/sources/HeuristicLab.Encodings.RealVectorEncoding/3.3/RealVectorCrossover.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.Encodings.RealVectorEncoding/3.3/RealVectorCrossover.cs	(revision 4068)
@@ -20,5 +20,4 @@
 #endregion
 
-using HeuristicLab.Common;
 using HeuristicLab.Core;
 using HeuristicLab.Data;
Index: /trunk/sources/HeuristicLab.Encodings.RealVectorEncoding/3.3/RealVectorManipulator.cs
===================================================================
--- /trunk/sources/HeuristicLab.Encodings.RealVectorEncoding/3.3/RealVectorManipulator.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.Encodings.RealVectorEncoding/3.3/RealVectorManipulator.cs	(revision 4068)
@@ -20,5 +20,4 @@
 #endregion
 
-using HeuristicLab.Common;
 using HeuristicLab.Core;
 using HeuristicLab.Data;
Index: /trunk/sources/HeuristicLab.Encodings.RealVectorEncoding/3.3/StrategyParameters/StdDevStrategyVectorCreator.cs
===================================================================
--- /trunk/sources/HeuristicLab.Encodings.RealVectorEncoding/3.3/StrategyParameters/StdDevStrategyVectorCreator.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.Encodings.RealVectorEncoding/3.3/StrategyParameters/StdDevStrategyVectorCreator.cs	(revision 4068)
@@ -20,5 +20,4 @@
 #endregion
 
-using HeuristicLab.Common;
 using HeuristicLab.Core;
 using HeuristicLab.Data;
@@ -26,5 +25,4 @@
 using HeuristicLab.Optimization;
 using HeuristicLab.Parameters;
-using HeuristicLab.Encodings.RealVectorEncoding;
 using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
 
@@ -54,5 +52,5 @@
       Parameters.Add(new LookupParameter<RealVector>("StrategyParameter", "The crossed strategy parameter."));
       Parameters.Add(new ValueLookupParameter<IntValue>("Length", "The length of the vector."));
-      Parameters.Add(new ValueLookupParameter<DoubleMatrix>("Bounds", "A 2 column matrix specifying the lower and upper bound for each dimension. If there are less rows than dimension the bounds vector is cycled.", new DoubleMatrix(new double[,] { {0, 5} })));
+      Parameters.Add(new ValueLookupParameter<DoubleMatrix>("Bounds", "A 2 column matrix specifying the lower and upper bound for each dimension. If there are less rows than dimension the bounds vector is cycled.", new DoubleMatrix(new double[,] { { 0, 5 } })));
     }
 
Index: /trunk/sources/HeuristicLab.Encodings.RealVectorEncoding/3.3/StrategyParameters/StdDevStrategyVectorCrossover.cs
===================================================================
--- /trunk/sources/HeuristicLab.Encodings.RealVectorEncoding/3.3/StrategyParameters/StdDevStrategyVectorCrossover.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.Encodings.RealVectorEncoding/3.3/StrategyParameters/StdDevStrategyVectorCrossover.cs	(revision 4068)
@@ -20,10 +20,8 @@
 #endregion
 
-using HeuristicLab.Common;
 using HeuristicLab.Core;
 using HeuristicLab.Operators;
 using HeuristicLab.Optimization;
 using HeuristicLab.Parameters;
-using HeuristicLab.Encodings.RealVectorEncoding;
 using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
 
Index: /trunk/sources/HeuristicLab.Encodings.RealVectorEncoding/3.3/StrategyParameters/StdDevStrategyVectorManipulator.cs
===================================================================
--- /trunk/sources/HeuristicLab.Encodings.RealVectorEncoding/3.3/StrategyParameters/StdDevStrategyVectorManipulator.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.Encodings.RealVectorEncoding/3.3/StrategyParameters/StdDevStrategyVectorManipulator.cs	(revision 4068)
@@ -20,13 +20,12 @@
 #endregion
 
-using HeuristicLab.Common;
+using System;
 using HeuristicLab.Core;
+using HeuristicLab.Data;
 using HeuristicLab.Operators;
 using HeuristicLab.Optimization;
 using HeuristicLab.Parameters;
-using HeuristicLab.Data;
+using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
 using HeuristicLab.Random;
-using System;
-using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
 
 namespace HeuristicLab.Encodings.RealVectorEncoding {
Index: /trunk/sources/HeuristicLab.Encodings.RealVectorEncoding/3.3/Tests/BlendAlphaBetaCrossoverTest.cs
===================================================================
--- /trunk/sources/HeuristicLab.Encodings.RealVectorEncoding/3.3/Tests/BlendAlphaBetaCrossoverTest.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.Encodings.RealVectorEncoding/3.3/Tests/BlendAlphaBetaCrossoverTest.cs	(revision 4068)
@@ -20,10 +20,8 @@
 #endregion
 
+using HeuristicLab.Core;
+using HeuristicLab.Data;
 using HeuristicLab.Encodings.RealVectorEncoding;
 using Microsoft.VisualStudio.TestTools.UnitTesting;
-using HeuristicLab.Common;
-using HeuristicLab.Core;
-using HeuristicLab.Data;
-using HeuristicLab.Parameters;
 
 namespace HeuristicLab.Encodings.RealVectorEncoding_33.Tests {
@@ -100,5 +98,6 @@
         RealVector actual;
         actual = target.Cross(random, parents);
-      } catch (System.ArgumentException) {
+      }
+      catch (System.ArgumentException) {
         exceptionFired = true;
       }
@@ -111,5 +110,6 @@
         RealVector actual;
         actual = target.Cross(random, parents);
-      } catch (System.ArgumentException) {
+      }
+      catch (System.ArgumentException) {
         exceptionFired = true;
       }
@@ -146,5 +146,6 @@
       try {
         actual = BlendAlphaBetaCrossover.Apply(random, parent1, parent2, alpha, beta);
-      } catch (System.ArgumentException) {
+      }
+      catch (System.ArgumentException) {
         exceptionFired = true;
       }
@@ -159,5 +160,6 @@
       try {
         actual = BlendAlphaBetaCrossover.Apply(random, parent1, parent2, alpha, beta);
-      } catch (System.ArgumentException) {
+      }
+      catch (System.ArgumentException) {
         exceptionFired = true;
       }
Index: /trunk/sources/HeuristicLab.Encodings.RealVectorEncoding/3.3/Tests/BlendAlphaCrossoverTest.cs
===================================================================
--- /trunk/sources/HeuristicLab.Encodings.RealVectorEncoding/3.3/Tests/BlendAlphaCrossoverTest.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.Encodings.RealVectorEncoding/3.3/Tests/BlendAlphaCrossoverTest.cs	(revision 4068)
@@ -20,10 +20,8 @@
 #endregion
 
+using HeuristicLab.Core;
+using HeuristicLab.Data;
 using HeuristicLab.Encodings.RealVectorEncoding;
 using Microsoft.VisualStudio.TestTools.UnitTesting;
-using HeuristicLab.Common;
-using HeuristicLab.Core;
-using HeuristicLab.Data;
-using HeuristicLab.Parameters;
 
 namespace HeuristicLab.Encodings.RealVectorEncoding_33.Tests {
@@ -100,5 +98,6 @@
         RealVector actual;
         actual = target.Cross(random, parents);
-      } catch (System.ArgumentException) {
+      }
+      catch (System.ArgumentException) {
         exceptionFired = true;
       }
@@ -111,5 +110,6 @@
         RealVector actual;
         actual = target.Cross(random, parents);
-      } catch (System.ArgumentException) {
+      }
+      catch (System.ArgumentException) {
         exceptionFired = true;
       }
@@ -154,5 +154,6 @@
       try {
         actual = BlendAlphaCrossover.Apply(random, parent1, parent2, alpha);
-      } catch (System.ArgumentException) {
+      }
+      catch (System.ArgumentException) {
         exceptionFired = true;
       }
@@ -168,5 +169,6 @@
       try {
         actual = BlendAlphaCrossover.Apply(random, parent1, parent2, alpha);
-      } catch (System.ArgumentException) {
+      }
+      catch (System.ArgumentException) {
         exceptionFired = true;
       }
Index: /trunk/sources/HeuristicLab.Encodings.RealVectorEncoding/3.3/Tests/DiscreteCrossoverTest.cs
===================================================================
--- /trunk/sources/HeuristicLab.Encodings.RealVectorEncoding/3.3/Tests/DiscreteCrossoverTest.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.Encodings.RealVectorEncoding/3.3/Tests/DiscreteCrossoverTest.cs	(revision 4068)
@@ -20,10 +20,7 @@
 #endregion
 
+using HeuristicLab.Core;
 using HeuristicLab.Encodings.RealVectorEncoding;
 using Microsoft.VisualStudio.TestTools.UnitTesting;
-using HeuristicLab.Common;
-using HeuristicLab.Core;
-using HeuristicLab.Data;
-using HeuristicLab.Parameters;
 
 namespace HeuristicLab.Encodings.RealVectorEncoding_33.Tests {
@@ -100,5 +97,6 @@
         RealVector actual;
         actual = target.Cross(random, parents);
-      } catch (System.ArgumentException) {
+      }
+      catch (System.ArgumentException) {
         exceptionFired = true;
       }
@@ -120,5 +118,5 @@
       parent1 = new RealVector(new double[] { 0.2, 0.2, 0.3, 0.5, 0.1 });
       parent2 = new RealVector(new double[] { 0.4, 0.1, 0.3, 0.2, 0.8 });
-      parents = new ItemArray<RealVector>( new RealVector[] { parent1, parent2 } );
+      parents = new ItemArray<RealVector>(new RealVector[] { parent1, parent2 });
       expected = new RealVector(new double[] { 0.2, 0.2, 0.3, 0.5, 0.8 });
       actual = DiscreteCrossover.Apply(random, parents);
@@ -133,5 +131,6 @@
       try {
         actual = DiscreteCrossover.Apply(random, parents);
-      } catch (System.ArgumentException) {
+      }
+      catch (System.ArgumentException) {
         exceptionFired = true;
       }
Index: /trunk/sources/HeuristicLab.Encodings.RealVectorEncoding/3.3/Tests/HeuristicCrossoverTest.cs
===================================================================
--- /trunk/sources/HeuristicLab.Encodings.RealVectorEncoding/3.3/Tests/HeuristicCrossoverTest.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.Encodings.RealVectorEncoding/3.3/Tests/HeuristicCrossoverTest.cs	(revision 4068)
@@ -20,10 +20,7 @@
 #endregion
 
+using HeuristicLab.Core;
 using HeuristicLab.Encodings.RealVectorEncoding;
 using Microsoft.VisualStudio.TestTools.UnitTesting;
-using HeuristicLab.Common;
-using HeuristicLab.Core;
-using HeuristicLab.Data;
-using HeuristicLab.Parameters;
 
 namespace HeuristicLab.Encodings.RealVectorEncoding_33.Tests {
@@ -112,5 +109,6 @@
         RealVector actual;
         actual = target.Cross(random, parents);
-      } catch (System.ArgumentException) {
+      }
+      catch (System.ArgumentException) {
         exceptionFired = true;
       }
@@ -142,5 +140,6 @@
       try {
         actual = HeuristicCrossover.Apply(random, parent1, parent2);
-      } catch (System.ArgumentException) {
+      }
+      catch (System.ArgumentException) {
         exceptionFired = true;
       }
Index: /trunk/sources/HeuristicLab.Encodings.RealVectorEncoding/3.3/Tests/LocalCrossoverTest.cs
===================================================================
--- /trunk/sources/HeuristicLab.Encodings.RealVectorEncoding/3.3/Tests/LocalCrossoverTest.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.Encodings.RealVectorEncoding/3.3/Tests/LocalCrossoverTest.cs	(revision 4068)
@@ -20,10 +20,7 @@
 #endregion
 
+using HeuristicLab.Core;
 using HeuristicLab.Encodings.RealVectorEncoding;
 using Microsoft.VisualStudio.TestTools.UnitTesting;
-using HeuristicLab.Common;
-using HeuristicLab.Core;
-using HeuristicLab.Data;
-using HeuristicLab.Parameters;
 
 namespace HeuristicLab.Encodings.RealVectorEncoding_33.Tests {
@@ -112,5 +109,6 @@
         RealVector actual;
         actual = target.Cross(random, parents);
-      } catch (System.ArgumentException) {
+      }
+      catch (System.ArgumentException) {
         exceptionFired = true;
       }
@@ -136,5 +134,5 @@
       // The following test is not based on published examples
       random.Reset();
-      random.DoubleNumbers = new double[] { 0.3, 0.1, 0.2, 0.4, 0.23, 0.5};
+      random.DoubleNumbers = new double[] { 0.3, 0.1, 0.2, 0.4, 0.23, 0.5 };
       parent1 = new RealVector(new double[] { 0.2, 0.2, 0.3, 0.5, 0.1, 0.9 }); // this parent is longer
       parent2 = new RealVector(new double[] { 0.4, 0.1, 0.3, 0.2, 0.8 });
@@ -142,5 +140,6 @@
       try {
         actual = LocalCrossover.Apply(random, parent1, parent2);
-      } catch (System.ArgumentException) {
+      }
+      catch (System.ArgumentException) {
         exceptionFired = true;
       }
Index: /trunk/sources/HeuristicLab.Encodings.RealVectorEncoding/3.3/Tests/MichalewiczNonUniformAllPositionsManipulatorTest.cs
===================================================================
--- /trunk/sources/HeuristicLab.Encodings.RealVectorEncoding/3.3/Tests/MichalewiczNonUniformAllPositionsManipulatorTest.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.Encodings.RealVectorEncoding/3.3/Tests/MichalewiczNonUniformAllPositionsManipulatorTest.cs	(revision 4068)
@@ -20,7 +20,7 @@
 #endregion
 
+using HeuristicLab.Data;
+using HeuristicLab.Encodings.RealVectorEncoding;
 using Microsoft.VisualStudio.TestTools.UnitTesting;
-using HeuristicLab.Encodings.RealVectorEncoding;
-using HeuristicLab.Data;
 
 namespace HeuristicLab.Encodings.RealVectorEncoding_33.Tests {
Index: /trunk/sources/HeuristicLab.Encodings.RealVectorEncoding/3.3/Tests/MichalewiczNonUniformOnePositionManipulatorTest.cs
===================================================================
--- /trunk/sources/HeuristicLab.Encodings.RealVectorEncoding/3.3/Tests/MichalewiczNonUniformOnePositionManipulatorTest.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.Encodings.RealVectorEncoding/3.3/Tests/MichalewiczNonUniformOnePositionManipulatorTest.cs	(revision 4068)
@@ -20,7 +20,7 @@
 #endregion
 
+using HeuristicLab.Data;
+using HeuristicLab.Encodings.RealVectorEncoding;
 using Microsoft.VisualStudio.TestTools.UnitTesting;
-using HeuristicLab.Encodings.RealVectorEncoding;
-using HeuristicLab.Data;
 
 namespace HeuristicLab.Encodings.RealVectorEncoding_33.Tests {
Index: /trunk/sources/HeuristicLab.Encodings.RealVectorEncoding/3.3/Tests/PolynomialAllPositionManipulatorTest.cs
===================================================================
--- /trunk/sources/HeuristicLab.Encodings.RealVectorEncoding/3.3/Tests/PolynomialAllPositionManipulatorTest.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.Encodings.RealVectorEncoding/3.3/Tests/PolynomialAllPositionManipulatorTest.cs	(revision 4068)
@@ -20,7 +20,7 @@
 #endregion
 
+using HeuristicLab.Data;
+using HeuristicLab.Encodings.RealVectorEncoding;
 using Microsoft.VisualStudio.TestTools.UnitTesting;
-using HeuristicLab.Encodings.RealVectorEncoding;
-using HeuristicLab.Data;
 
 namespace HeuristicLab.Encodings.RealVectorEncoding_33.Tests {
Index: /trunk/sources/HeuristicLab.Encodings.RealVectorEncoding/3.3/Tests/PolynomialOnePositionManipulatorTest.cs
===================================================================
--- /trunk/sources/HeuristicLab.Encodings.RealVectorEncoding/3.3/Tests/PolynomialOnePositionManipulatorTest.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.Encodings.RealVectorEncoding/3.3/Tests/PolynomialOnePositionManipulatorTest.cs	(revision 4068)
@@ -20,7 +20,7 @@
 #endregion
 
+using HeuristicLab.Data;
+using HeuristicLab.Encodings.RealVectorEncoding;
 using Microsoft.VisualStudio.TestTools.UnitTesting;
-using HeuristicLab.Encodings.RealVectorEncoding;
-using HeuristicLab.Data;
 
 namespace HeuristicLab.Encodings.RealVectorEncoding_33.Tests {
Index: /trunk/sources/HeuristicLab.Encodings.RealVectorEncoding/3.3/Tests/Properties/AssemblyInfo.cs
===================================================================
--- /trunk/sources/HeuristicLab.Encodings.RealVectorEncoding/3.3/Tests/Properties/AssemblyInfo.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.Encodings.RealVectorEncoding/3.3/Tests/Properties/AssemblyInfo.cs	(revision 4068)
@@ -21,5 +21,4 @@
 
 using System.Reflection;
-using System.Runtime.CompilerServices;
 using System.Runtime.InteropServices;
 
Index: /trunk/sources/HeuristicLab.Encodings.RealVectorEncoding/3.3/Tests/RandomConvexCrossoverTest.cs
===================================================================
--- /trunk/sources/HeuristicLab.Encodings.RealVectorEncoding/3.3/Tests/RandomConvexCrossoverTest.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.Encodings.RealVectorEncoding/3.3/Tests/RandomConvexCrossoverTest.cs	(revision 4068)
@@ -20,10 +20,7 @@
 #endregion
 
+using HeuristicLab.Core;
 using HeuristicLab.Encodings.RealVectorEncoding;
 using Microsoft.VisualStudio.TestTools.UnitTesting;
-using HeuristicLab.Common;
-using HeuristicLab.Core;
-using HeuristicLab.Data;
-using HeuristicLab.Parameters;
 
 namespace HeuristicLab.Encodings.RealVectorEncoding_33.Tests {
@@ -112,5 +109,6 @@
         RealVector actual;
         actual = target.Cross(random, parents);
-      } catch (System.ArgumentException) {
+      }
+      catch (System.ArgumentException) {
         exceptionFired = true;
       }
@@ -142,5 +140,6 @@
       try {
         actual = RandomConvexCrossover.Apply(random, parent1, parent2);
-      } catch (System.ArgumentException) {
+      }
+      catch (System.ArgumentException) {
         exceptionFired = true;
       }
Index: /trunk/sources/HeuristicLab.Encodings.RealVectorEncoding/3.3/Tests/SimulatedBinaryCrossoverTest.cs
===================================================================
--- /trunk/sources/HeuristicLab.Encodings.RealVectorEncoding/3.3/Tests/SimulatedBinaryCrossoverTest.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.Encodings.RealVectorEncoding/3.3/Tests/SimulatedBinaryCrossoverTest.cs	(revision 4068)
@@ -20,10 +20,8 @@
 #endregion
 
+using HeuristicLab.Core;
+using HeuristicLab.Data;
 using HeuristicLab.Encodings.RealVectorEncoding;
 using Microsoft.VisualStudio.TestTools.UnitTesting;
-using HeuristicLab.Common;
-using HeuristicLab.Core;
-using HeuristicLab.Data;
-using HeuristicLab.Parameters;
 
 namespace HeuristicLab.Encodings.RealVectorEncoding_33.Tests {
@@ -112,5 +110,6 @@
         RealVector actual;
         actual = target.Cross(random, parents);
-      } catch (System.ArgumentException) {
+      }
+      catch (System.ArgumentException) {
         exceptionFired = true;
       }
@@ -145,5 +144,6 @@
       try {
         actual = SimulatedBinaryCrossover.Apply(random, parent1, parent2, contiguity);
-      } catch (System.ArgumentException) {
+      }
+      catch (System.ArgumentException) {
         exceptionFired = true;
       }
@@ -153,5 +153,5 @@
       random.DoubleNumbers = new double[] { 0.3, 0.9, 0.7, 0.2, 0.8, 0.1, 0.2, 0.3, 0.4, 0.8, 0.7 };
       contiguity = new DoubleValue(-0.3);  //  contiguity < 0
-      parent1 = new RealVector(new double[] { 0.2, 0.2, 0.3, 0.5, 0.1}); 
+      parent1 = new RealVector(new double[] { 0.2, 0.2, 0.3, 0.5, 0.1 });
       parent2 = new RealVector(new double[] { 0.4, 0.1, 0.3, 0.2, 0.8 });
       exceptionFired = false;
Index: /trunk/sources/HeuristicLab.Encodings.RealVectorEncoding/3.3/Tests/SinglePointCrossoverTest.cs
===================================================================
--- /trunk/sources/HeuristicLab.Encodings.RealVectorEncoding/3.3/Tests/SinglePointCrossoverTest.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.Encodings.RealVectorEncoding/3.3/Tests/SinglePointCrossoverTest.cs	(revision 4068)
@@ -20,10 +20,7 @@
 #endregion
 
+using HeuristicLab.Core;
 using HeuristicLab.Encodings.RealVectorEncoding;
 using Microsoft.VisualStudio.TestTools.UnitTesting;
-using HeuristicLab.Common;
-using HeuristicLab.Core;
-using HeuristicLab.Data;
-using HeuristicLab.Parameters;
 
 namespace HeuristicLab.Encodings.RealVectorEncoding_33.Tests {
@@ -112,5 +109,6 @@
         RealVector actual;
         actual = target.Cross(random, parents);
-      } catch (System.ArgumentException) {
+      }
+      catch (System.ArgumentException) {
         exceptionFired = true;
       }
@@ -123,5 +121,6 @@
         RealVector actual;
         actual = target.Cross(random, parents);
-      } catch (System.ArgumentException) {
+      }
+      catch (System.ArgumentException) {
         exceptionFired = true;
       }
@@ -153,5 +152,6 @@
       try {
         actual = SinglePointCrossover.Apply(random, parent1, parent2);
-      } catch (System.ArgumentException) {
+      }
+      catch (System.ArgumentException) {
         exceptionFired = true;
       }
Index: /trunk/sources/HeuristicLab.Encodings.RealVectorEncoding/3.3/Tests/UniformOnePositionManipulatorTest.cs
===================================================================
--- /trunk/sources/HeuristicLab.Encodings.RealVectorEncoding/3.3/Tests/UniformOnePositionManipulatorTest.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.Encodings.RealVectorEncoding/3.3/Tests/UniformOnePositionManipulatorTest.cs	(revision 4068)
@@ -20,7 +20,7 @@
 #endregion
 
+using HeuristicLab.Data;
+using HeuristicLab.Encodings.RealVectorEncoding;
 using Microsoft.VisualStudio.TestTools.UnitTesting;
-using HeuristicLab.Encodings.RealVectorEncoding;
-using HeuristicLab.Data;
 
 namespace HeuristicLab.Encodings.RealVectorEncoding_33.Tests {
Index: /trunk/sources/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding.Views/3.3/DefaultSymbolicExpressionGrammarView.cs
===================================================================
--- /trunk/sources/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding.Views/3.3/DefaultSymbolicExpressionGrammarView.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding.Views/3.3/DefaultSymbolicExpressionGrammarView.cs	(revision 4068)
@@ -21,16 +21,10 @@
 
 using System;
-using System.Collections.Generic;
-using System.ComponentModel;
-using System.Drawing;
-using System.Data;
-using System.Linq;
-using System.Text;
 using System.Windows.Forms;
+using HeuristicLab.Core;
+using HeuristicLab.Core.Views;
+using HeuristicLab.Encodings.SymbolicExpressionTreeEncoding.Symbols;
 using HeuristicLab.MainForm;
 using HeuristicLab.MainForm.WindowsForms;
-using HeuristicLab.Encodings.SymbolicExpressionTreeEncoding.Symbols;
-using HeuristicLab.Core.Views;
-using HeuristicLab.Core;
 
 namespace HeuristicLab.Encodings.SymbolicExpressionTreeEncoding.Views {
Index: /trunk/sources/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding.Views/3.3/GraphicalSymbolicExpressionTreeView.cs
===================================================================
--- /trunk/sources/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding.Views/3.3/GraphicalSymbolicExpressionTreeView.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding.Views/3.3/GraphicalSymbolicExpressionTreeView.cs	(revision 4068)
@@ -20,16 +20,8 @@
 #endregion
 
-using System;
-using System.Collections.Generic;
-using System.Collections.Specialized;
-using System.ComponentModel;
-using System.Data;
-using System.Drawing;
-using System.Linq;
-using System.Text;
 using System.Windows.Forms;
+using HeuristicLab.Core.Views;
 using HeuristicLab.MainForm;
 using HeuristicLab.MainForm.WindowsForms;
-using HeuristicLab.Core.Views;
 
 namespace HeuristicLab.Encodings.SymbolicExpressionTreeEncoding.Views {
Index: /trunk/sources/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding.Views/3.3/SymbolView.cs
===================================================================
--- /trunk/sources/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding.Views/3.3/SymbolView.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding.Views/3.3/SymbolView.cs	(revision 4068)
@@ -21,15 +21,9 @@
 
 using System;
-using System.Collections.Generic;
-using System.ComponentModel;
-using System.Drawing;
-using System.Data;
-using System.Linq;
-using System.Text;
 using System.Windows.Forms;
+using HeuristicLab.Core.Views;
+using HeuristicLab.Encodings.SymbolicExpressionTreeEncoding.Symbols;
 using HeuristicLab.MainForm;
 using HeuristicLab.MainForm.WindowsForms;
-using HeuristicLab.Encodings.SymbolicExpressionTreeEncoding.Symbols;
-using HeuristicLab.Core.Views;
 
 namespace HeuristicLab.Encodings.SymbolicExpressionTreeEncoding.Views {
Index: /trunk/sources/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding.Views/3.3/SymbolicExpressionTreeChart.cs
===================================================================
--- /trunk/sources/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding.Views/3.3/SymbolicExpressionTreeChart.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding.Views/3.3/SymbolicExpressionTreeChart.cs	(revision 4068)
@@ -22,9 +22,5 @@
 using System;
 using System.Collections.Generic;
-using System.ComponentModel;
 using System.Drawing;
-using System.Data;
-using System.Linq;
-using System.Text;
 using System.Windows.Forms;
 
Index: /trunk/sources/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding.Views/3.3/SymbolicExpressionView.cs
===================================================================
--- /trunk/sources/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding.Views/3.3/SymbolicExpressionView.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding.Views/3.3/SymbolicExpressionView.cs	(revision 4068)
@@ -20,11 +20,4 @@
 #endregion
 
-using System;
-using System.Collections.Generic;
-using System.ComponentModel;
-using System.Drawing;
-using System.Data;
-using System.Linq;
-using System.Text;
 using System.Windows.Forms;
 using HeuristicLab.MainForm;
Index: /trunk/sources/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding.Views/3.3/VisualSymbolicExpressionTreeNode.cs
===================================================================
--- /trunk/sources/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding.Views/3.3/VisualSymbolicExpressionTreeNode.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding.Views/3.3/VisualSymbolicExpressionTreeNode.cs	(revision 4068)
@@ -20,8 +20,4 @@
 #endregion
 
-using System;
-using System.Collections.Generic;
-using System.Linq;
-using System.Text;
 using System.Drawing;
 
Index: /trunk/sources/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.3/Analyzers/MinAverageMaxSymbolicExpressionTreeSizeAnalyzer.cs
===================================================================
--- /trunk/sources/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.3/Analyzers/MinAverageMaxSymbolicExpressionTreeSizeAnalyzer.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.3/Analyzers/MinAverageMaxSymbolicExpressionTreeSizeAnalyzer.cs	(revision 4068)
@@ -20,18 +20,13 @@
 #endregion
 
-using System.Linq;
+using System;
+using HeuristicLab.Analysis;
 using HeuristicLab.Common;
 using HeuristicLab.Core;
 using HeuristicLab.Data;
+using HeuristicLab.Encodings.SymbolicExpressionTreeEncoding.Interfaces;
 using HeuristicLab.Operators;
-using HeuristicLab.Optimization;
 using HeuristicLab.Parameters;
 using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
-using HeuristicLab.Encodings.SymbolicExpressionTreeEncoding;
-using System.Collections.Generic;
-using HeuristicLab.Analysis;
-using HeuristicLab.Encodings.SymbolicExpressionTreeEncoding.Interfaces;
-using System;
-using HeuristicLab.Optimization.Operators;
 
 namespace HeuristicLab.Encodings.SymbolicExpressionTreeEncoding.Analyzers {
Index: /trunk/sources/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.3/Analyzers/SymbolicExpressionTreeSizeCalculator.cs
===================================================================
--- /trunk/sources/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.3/Analyzers/SymbolicExpressionTreeSizeCalculator.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.3/Analyzers/SymbolicExpressionTreeSizeCalculator.cs	(revision 4068)
@@ -20,14 +20,9 @@
 #endregion
 
-using System.Linq;
-using HeuristicLab.Common;
 using HeuristicLab.Core;
 using HeuristicLab.Data;
 using HeuristicLab.Operators;
-using HeuristicLab.Optimization;
 using HeuristicLab.Parameters;
 using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
-using HeuristicLab.Encodings.SymbolicExpressionTreeEncoding;
-using System.Collections.Generic;
 
 namespace HeuristicLab.Encodings.SymbolicExpressionTreeEncoding.Analyzers {
Index: /trunk/sources/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.3/ArchitectureManipulators/ArgumentCreater.cs
===================================================================
--- /trunk/sources/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.3/ArchitectureManipulators/ArgumentCreater.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.3/ArchitectureManipulators/ArgumentCreater.cs	(revision 4068)
@@ -20,17 +20,10 @@
 #endregion
 
-using System;
+using System.Collections.Generic;
 using System.Linq;
-using HeuristicLab.Common;
 using HeuristicLab.Core;
 using HeuristicLab.Data;
-using HeuristicLab.Operators;
-using HeuristicLab.Optimization;
-using HeuristicLab.Parameters;
+using HeuristicLab.Encodings.SymbolicExpressionTreeEncoding.Symbols;
 using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
-using HeuristicLab.Encodings.SymbolicExpressionTreeEncoding.Symbols;
-using System.Collections.Generic;
-using System.Text;
-using System.Diagnostics;
 
 namespace HeuristicLab.Encodings.SymbolicExpressionTreeEncoding.ArchitectureManipulators {
Index: /trunk/sources/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.3/ArchitectureManipulators/ArgumentDeleter.cs
===================================================================
--- /trunk/sources/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.3/ArchitectureManipulators/ArgumentDeleter.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.3/ArchitectureManipulators/ArgumentDeleter.cs	(revision 4068)
@@ -20,17 +20,9 @@
 #endregion
 
-using System;
 using System.Linq;
-using HeuristicLab.Common;
 using HeuristicLab.Core;
 using HeuristicLab.Data;
-using HeuristicLab.Operators;
-using HeuristicLab.Optimization;
-using HeuristicLab.Parameters;
+using HeuristicLab.Encodings.SymbolicExpressionTreeEncoding.Symbols;
 using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
-using HeuristicLab.Encodings.SymbolicExpressionTreeEncoding.Symbols;
-using System.Collections.Generic;
-using System.Text;
-using System.Diagnostics;
 
 namespace HeuristicLab.Encodings.SymbolicExpressionTreeEncoding.ArchitectureManipulators {
Index: /trunk/sources/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.3/ArchitectureManipulators/ArgumentDuplicater.cs
===================================================================
--- /trunk/sources/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.3/ArchitectureManipulators/ArgumentDuplicater.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.3/ArchitectureManipulators/ArgumentDuplicater.cs	(revision 4068)
@@ -20,17 +20,9 @@
 #endregion
 
-using System;
 using System.Linq;
-using HeuristicLab.Common;
 using HeuristicLab.Core;
 using HeuristicLab.Data;
-using HeuristicLab.Operators;
-using HeuristicLab.Optimization;
-using HeuristicLab.Parameters;
+using HeuristicLab.Encodings.SymbolicExpressionTreeEncoding.Symbols;
 using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
-using HeuristicLab.Encodings.SymbolicExpressionTreeEncoding.Symbols;
-using System.Collections.Generic;
-using System.Text;
-using System.Diagnostics;
 
 namespace HeuristicLab.Encodings.SymbolicExpressionTreeEncoding.ArchitectureManipulators {
Index: /trunk/sources/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.3/ArchitectureManipulators/GrammarModifier.cs
===================================================================
--- /trunk/sources/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.3/ArchitectureManipulators/GrammarModifier.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.3/ArchitectureManipulators/GrammarModifier.cs	(revision 4068)
@@ -20,17 +20,6 @@
 #endregion
 
-using System;
-using System.Linq;
-using HeuristicLab.Common;
-using HeuristicLab.Core;
-using HeuristicLab.Data;
-using HeuristicLab.Operators;
-using HeuristicLab.Optimization;
-using HeuristicLab.Parameters;
-using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
+using System.Collections.Generic;
 using HeuristicLab.Encodings.SymbolicExpressionTreeEncoding.Symbols;
-using System.Collections.Generic;
-using System.Text;
-using System.Diagnostics;
 
 namespace HeuristicLab.Encodings.SymbolicExpressionTreeEncoding.ArchitectureManipulators {
Index: /trunk/sources/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.3/ArchitectureManipulators/MultiSymbolicExpressionTreeArchitectureManipulator.cs
===================================================================
--- /trunk/sources/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.3/ArchitectureManipulators/MultiSymbolicExpressionTreeArchitectureManipulator.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.3/ArchitectureManipulators/MultiSymbolicExpressionTreeArchitectureManipulator.cs	(revision 4068)
@@ -24,10 +24,10 @@
 using HeuristicLab.Collections;
 using HeuristicLab.Core;
+using HeuristicLab.Data;
+using HeuristicLab.Encodings.SymbolicExpressionTreeEncoding.Interfaces;
 using HeuristicLab.Operators;
 using HeuristicLab.Optimization;
 using HeuristicLab.Parameters;
 using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
-using HeuristicLab.Data;
-using HeuristicLab.Encodings.SymbolicExpressionTreeEncoding.Interfaces;
 using HeuristicLab.PluginInfrastructure;
 
Index: /trunk/sources/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.3/ArchitectureManipulators/SubroutineCreater.cs
===================================================================
--- /trunk/sources/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.3/ArchitectureManipulators/SubroutineCreater.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.3/ArchitectureManipulators/SubroutineCreater.cs	(revision 4068)
@@ -21,16 +21,11 @@
 
 using System;
+using System.Collections.Generic;
 using System.Linq;
-using HeuristicLab.Common;
+using System.Text;
 using HeuristicLab.Core;
 using HeuristicLab.Data;
-using HeuristicLab.Operators;
-using HeuristicLab.Optimization;
-using HeuristicLab.Parameters;
+using HeuristicLab.Encodings.SymbolicExpressionTreeEncoding.Symbols;
 using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
-using HeuristicLab.Encodings.SymbolicExpressionTreeEncoding.Symbols;
-using System.Collections.Generic;
-using System.Text;
-using System.Diagnostics;
 
 namespace HeuristicLab.Encodings.SymbolicExpressionTreeEncoding.ArchitectureManipulators {
Index: /trunk/sources/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.3/ArchitectureManipulators/SubroutineDeleter.cs
===================================================================
--- /trunk/sources/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.3/ArchitectureManipulators/SubroutineDeleter.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.3/ArchitectureManipulators/SubroutineDeleter.cs	(revision 4068)
@@ -22,16 +22,9 @@
 using System;
 using System.Linq;
-using HeuristicLab.Common;
 using HeuristicLab.Core;
 using HeuristicLab.Data;
-using HeuristicLab.Operators;
-using HeuristicLab.Optimization;
-using HeuristicLab.Parameters;
+using HeuristicLab.Encodings.SymbolicExpressionTreeEncoding.Creators;
+using HeuristicLab.Encodings.SymbolicExpressionTreeEncoding.Symbols;
 using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
-using HeuristicLab.Encodings.SymbolicExpressionTreeEncoding.Symbols;
-using System.Collections.Generic;
-using System.Text;
-using System.Diagnostics;
-using HeuristicLab.Encodings.SymbolicExpressionTreeEncoding.Creators;
 
 namespace HeuristicLab.Encodings.SymbolicExpressionTreeEncoding.ArchitectureManipulators {
Index: /trunk/sources/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.3/ArchitectureManipulators/SubroutineDuplicater.cs
===================================================================
--- /trunk/sources/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.3/ArchitectureManipulators/SubroutineDuplicater.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.3/ArchitectureManipulators/SubroutineDuplicater.cs	(revision 4068)
@@ -21,16 +21,11 @@
 
 using System;
+using System.Collections.Generic;
 using System.Linq;
-using HeuristicLab.Common;
+using System.Text;
 using HeuristicLab.Core;
 using HeuristicLab.Data;
-using HeuristicLab.Operators;
-using HeuristicLab.Optimization;
-using HeuristicLab.Parameters;
+using HeuristicLab.Encodings.SymbolicExpressionTreeEncoding.Symbols;
 using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
-using HeuristicLab.Encodings.SymbolicExpressionTreeEncoding.Symbols;
-using System.Collections.Generic;
-using System.Text;
-using System.Diagnostics;
 
 namespace HeuristicLab.Encodings.SymbolicExpressionTreeEncoding.ArchitectureManipulators {
Index: /trunk/sources/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.3/ArchitectureManipulators/SymbolicExpressionTreeArchitectureManipulator.cs
===================================================================
--- /trunk/sources/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.3/ArchitectureManipulators/SymbolicExpressionTreeArchitectureManipulator.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.3/ArchitectureManipulators/SymbolicExpressionTreeArchitectureManipulator.cs	(revision 4068)
@@ -20,18 +20,10 @@
 #endregion
 
-using System;
-using System.Linq;
-using HeuristicLab.Common;
 using HeuristicLab.Core;
 using HeuristicLab.Data;
-using HeuristicLab.Operators;
-using HeuristicLab.Optimization;
+using HeuristicLab.Encodings.SymbolicExpressionTreeEncoding.Interfaces;
+using HeuristicLab.Encodings.SymbolicExpressionTreeEncoding.Manipulators;
 using HeuristicLab.Parameters;
 using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
-using HeuristicLab.Encodings.SymbolicExpressionTreeEncoding.Symbols;
-using System.Collections.Generic;
-using System.Text;
-using HeuristicLab.Encodings.SymbolicExpressionTreeEncoding.Manipulators;
-using HeuristicLab.Encodings.SymbolicExpressionTreeEncoding.Interfaces;
 
 namespace HeuristicLab.Encodings.SymbolicExpressionTreeEncoding.ArchitectureManipulators {
Index: /trunk/sources/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.3/Compiler/Instruction.cs
===================================================================
--- /trunk/sources/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.3/Compiler/Instruction.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.3/Compiler/Instruction.cs	(revision 4068)
@@ -20,11 +20,4 @@
 #endregion
 
-using System;
-using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
-using HeuristicLab.Common;
-using HeuristicLab.Core;
-using System.Collections.Generic;
-using HeuristicLab.Encodings.SymbolicExpressionTreeEncoding;
-using HeuristicLab.Encodings.SymbolicExpressionTreeEncoding.Symbols;
 
 namespace HeuristicLab.Encodings.SymbolicExpressionTreeEncoding.Compiler {
Index: /trunk/sources/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.3/Compiler/SymbolicExpressionTreeCompiler.cs
===================================================================
--- /trunk/sources/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.3/Compiler/SymbolicExpressionTreeCompiler.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.3/Compiler/SymbolicExpressionTreeCompiler.cs	(revision 4068)
@@ -21,10 +21,6 @@
 
 using System;
+using System.Collections.Generic;
 using System.Linq;
-using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
-using HeuristicLab.Common;
-using HeuristicLab.Core;
-using System.Collections.Generic;
-using HeuristicLab.Encodings.SymbolicExpressionTreeEncoding;
 using HeuristicLab.Encodings.SymbolicExpressionTreeEncoding.Symbols;
 
@@ -40,5 +36,5 @@
       foreach (var branch in tree.Root.SubTrees[0].SubTrees) {
         code.AddRange(Compile(branch, opCodeMapper));
-      }      
+      }
       // compile function branches
       var functionBranches = from node in tree.IterateNodesPrefix()
Index: /trunk/sources/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.3/Creators/ProbabilisticTreeCreator.cs
===================================================================
--- /trunk/sources/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.3/Creators/ProbabilisticTreeCreator.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.3/Creators/ProbabilisticTreeCreator.cs	(revision 4068)
@@ -21,14 +21,12 @@
 
 using System;
+using System.Collections.Generic;
 using System.Linq;
-using System.Collections.Generic;
 using System.Text;
-using HeuristicLab.Common;
 using HeuristicLab.Core;
 using HeuristicLab.Data;
-using HeuristicLab.Random;
-using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
 using HeuristicLab.Encodings.SymbolicExpressionTreeEncoding.ArchitectureManipulators;
 using HeuristicLab.Encodings.SymbolicExpressionTreeEncoding.Symbols;
+using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
 
 namespace HeuristicLab.Encodings.SymbolicExpressionTreeEncoding.Creators {
Index: /trunk/sources/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.3/Creators/SymbolicExpressionTreeCreator.cs
===================================================================
--- /trunk/sources/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.3/Creators/SymbolicExpressionTreeCreator.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.3/Creators/SymbolicExpressionTreeCreator.cs	(revision 4068)
@@ -20,13 +20,9 @@
 #endregion
 
-using System.Linq;
-using HeuristicLab.Common;
 using HeuristicLab.Core;
 using HeuristicLab.Data;
-using HeuristicLab.Operators;
-using HeuristicLab.Optimization;
+using HeuristicLab.Encodings.SymbolicExpressionTreeEncoding.Interfaces;
 using HeuristicLab.Parameters;
 using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
-using HeuristicLab.Encodings.SymbolicExpressionTreeEncoding.Interfaces;
 
 namespace HeuristicLab.Encodings.SymbolicExpressionTreeEncoding.Creators {
Index: /trunk/sources/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.3/Crossovers/CrossoverPoint.cs
===================================================================
--- /trunk/sources/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.3/Crossovers/CrossoverPoint.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.3/Crossovers/CrossoverPoint.cs	(revision 4068)
@@ -20,13 +20,4 @@
 #endregion
 
-using System.Collections.Generic;
-using HeuristicLab.Common;
-using HeuristicLab.Core;
-using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
-using HeuristicLab.Data;
-using System.Linq;
-using System;
-using HeuristicLab.Parameters;
-using HeuristicLab.Encodings.SymbolicExpressionTreeEncoding.Symbols;
 
 namespace HeuristicLab.Encodings.SymbolicExpressionTreeEncoding.Crossovers {
Index: /trunk/sources/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.3/Crossovers/SubtreeCrossover.cs
===================================================================
--- /trunk/sources/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.3/Crossovers/SubtreeCrossover.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.3/Crossovers/SubtreeCrossover.cs	(revision 4068)
@@ -20,13 +20,11 @@
 #endregion
 
+using System;
 using System.Collections.Generic;
-using HeuristicLab.Common;
+using System.Linq;
 using HeuristicLab.Core;
+using HeuristicLab.Data;
+using HeuristicLab.Parameters;
 using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
-using HeuristicLab.Data;
-using System.Linq;
-using System;
-using HeuristicLab.Parameters;
-using HeuristicLab.Encodings.SymbolicExpressionTreeEncoding.Symbols;
 
 namespace HeuristicLab.Encodings.SymbolicExpressionTreeEncoding.Crossovers {
Index: /trunk/sources/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.3/Crossovers/SymbolicExpressionTreeCrossover.cs
===================================================================
--- /trunk/sources/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.3/Crossovers/SymbolicExpressionTreeCrossover.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.3/Crossovers/SymbolicExpressionTreeCrossover.cs	(revision 4068)
@@ -20,14 +20,10 @@
 #endregion
 
-using HeuristicLab.Common;
+using System;
 using HeuristicLab.Core;
 using HeuristicLab.Data;
-using HeuristicLab.Operators;
-using HeuristicLab.Optimization;
+using HeuristicLab.Encodings.SymbolicExpressionTreeEncoding.Interfaces;
 using HeuristicLab.Parameters;
 using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
-using System;
-using System.Diagnostics;
-using HeuristicLab.Encodings.SymbolicExpressionTreeEncoding.Interfaces;
 
 namespace HeuristicLab.Encodings.SymbolicExpressionTreeEncoding.Crossovers {
@@ -80,5 +76,5 @@
       SymbolicExpressionTree result = Cross(random, parent0, parent1,
         MaxTreeSizeParameter.ActualValue, MaxTreeHeightParameter.ActualValue, out success);
-      
+
       if (!success) FailedCrossoverEvents.Value++;
 
@@ -87,5 +83,5 @@
     }
 
-    protected abstract SymbolicExpressionTree Cross(IRandom random, 
+    protected abstract SymbolicExpressionTree Cross(IRandom random,
       SymbolicExpressionTree parent0, SymbolicExpressionTree parent1,
       IntValue maxTreeSize, IntValue maxTreeHeight, out bool success);
Index: /trunk/sources/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.3/DefaultSymbolicExpressionGrammar.cs
===================================================================
--- /trunk/sources/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.3/DefaultSymbolicExpressionGrammar.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.3/DefaultSymbolicExpressionGrammar.cs	(revision 4068)
@@ -23,10 +23,8 @@
 using System.Collections.Generic;
 using System.Linq;
-using System.Text;
 using HeuristicLab.Common;
 using HeuristicLab.Core;
-using System.Xml;
+using HeuristicLab.Encodings.SymbolicExpressionTreeEncoding.Symbols;
 using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
-using HeuristicLab.Encodings.SymbolicExpressionTreeEncoding.Symbols;
 
 namespace HeuristicLab.Encodings.SymbolicExpressionTreeEncoding {
@@ -108,8 +106,9 @@
 
     //copy constructor for cloning
-    protected DefaultSymbolicExpressionGrammar(DefaultSymbolicExpressionGrammar copy) :base() {
+    protected DefaultSymbolicExpressionGrammar(DefaultSymbolicExpressionGrammar copy)
+      : base() {
       this.minSubTreeCount = new Dictionary<string, int>(copy.minSubTreeCount);
       this.maxSubTreeCount = new Dictionary<string, int>(copy.maxSubTreeCount);
-      
+
       this.startSymbol = copy.startSymbol;
       this.allowedChildSymbols = new Dictionary<string, List<List<string>>>();
Index: /trunk/sources/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.3/EnumerableExtensions.cs
===================================================================
--- /trunk/sources/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.3/EnumerableExtensions.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.3/EnumerableExtensions.cs	(revision 4068)
@@ -20,13 +20,7 @@
 #endregion
 
-using System;
 using System.Collections.Generic;
-using System.Text;
-using HeuristicLab.Common;
+using System.Linq;
 using HeuristicLab.Core;
-using System.Linq;
-using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
-using HeuristicLab.Data;
-using HeuristicLab.Parameters;
 
 namespace HeuristicLab.Encodings.SymbolicExpressionTreeEncoding {
Index: /trunk/sources/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.3/GlobalSymbolicExpressionGrammar.cs
===================================================================
--- /trunk/sources/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.3/GlobalSymbolicExpressionGrammar.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.3/GlobalSymbolicExpressionGrammar.cs	(revision 4068)
@@ -20,13 +20,8 @@
 #endregion
 
-using System;
-using System.Collections.Generic;
-using System.Linq;
-using System.Text;
 using HeuristicLab.Common;
 using HeuristicLab.Core;
-using System.Xml;
+using HeuristicLab.Encodings.SymbolicExpressionTreeEncoding.Symbols;
 using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
-using HeuristicLab.Encodings.SymbolicExpressionTreeEncoding.Symbols;
 
 namespace HeuristicLab.Encodings.SymbolicExpressionTreeEncoding {
@@ -38,5 +33,5 @@
     public int MinFunctionDefinitions {
       get { return minFunctionDefinitions; }
-      set { 
+      set {
         minFunctionDefinitions = value;
         UpdateAdfConstraints();
@@ -47,5 +42,5 @@
     public int MaxFunctionDefinitions {
       get { return maxFunctionDefinitions; }
-      set { 
+      set {
         maxFunctionDefinitions = value;
         UpdateAdfConstraints();
@@ -56,5 +51,5 @@
     public int MinFunctionArguments {
       get { return minFunctionArguments; }
-      set { 
+      set {
         minFunctionArguments = value;
       }
@@ -64,5 +59,5 @@
     public int MaxFunctionArguments {
       get { return maxFunctionArguments; }
-      set { 
+      set {
         maxFunctionArguments = value;
       }
@@ -74,5 +69,5 @@
 
 
-    public GlobalSymbolicExpressionGrammar(ISymbolicExpressionGrammar mainBranchGrammar )
+    public GlobalSymbolicExpressionGrammar(ISymbolicExpressionGrammar mainBranchGrammar)
       : base() {
       maxFunctionArguments = 3;
@@ -148,5 +143,5 @@
       SetMinSubtreeCount(StartSymbol, minFunctionDefinitions + 1);
       SetMaxSubtreeCount(StartSymbol, maxFunctionDefinitions + 1);
-      
+
       // ADF branches maxFunctionDefinitions 
       for (int argumentIndex = 1; argumentIndex < maxFunctionDefinitions + 1; argumentIndex++) {
Index: /trunk/sources/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.3/Interfaces/ISymbolicExpressionGrammar.cs
===================================================================
--- /trunk/sources/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.3/Interfaces/ISymbolicExpressionGrammar.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.3/Interfaces/ISymbolicExpressionGrammar.cs	(revision 4068)
@@ -20,12 +20,6 @@
 #endregion
 
-using System;
 using System.Collections.Generic;
-using System.Linq;
-using System.Text;
-using HeuristicLab.Common;
 using HeuristicLab.Core;
-using System.Xml;
-using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
 using HeuristicLab.Encodings.SymbolicExpressionTreeEncoding.Symbols;
 
Index: /trunk/sources/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.3/Interfaces/ISymbolicExpressionTreeAnalyzer.cs
===================================================================
--- /trunk/sources/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.3/Interfaces/ISymbolicExpressionTreeAnalyzer.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.3/Interfaces/ISymbolicExpressionTreeAnalyzer.cs	(revision 4068)
@@ -20,13 +20,6 @@
 #endregion
 
-using HeuristicLab.Common;
-using HeuristicLab.Core;
-using HeuristicLab.Data;
-using HeuristicLab.Operators;
 using HeuristicLab.Optimization;
 using HeuristicLab.Parameters;
-using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
-using System;
-using System.Diagnostics;
 
 namespace HeuristicLab.Encodings.SymbolicExpressionTreeEncoding.Interfaces {
Index: /trunk/sources/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.3/Interfaces/ISymbolicExpressionTreeArchitectureManipulator.cs
===================================================================
--- /trunk/sources/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.3/Interfaces/ISymbolicExpressionTreeArchitectureManipulator.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.3/Interfaces/ISymbolicExpressionTreeArchitectureManipulator.cs	(revision 4068)
@@ -20,11 +20,6 @@
 #endregion
 
-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.Encodings.SymbolicExpressionTreeEncoding.Interfaces {
Index: /trunk/sources/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.3/Interfaces/ISymbolicExpressionTreeCreator.cs
===================================================================
--- /trunk/sources/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.3/Interfaces/ISymbolicExpressionTreeCreator.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.3/Interfaces/ISymbolicExpressionTreeCreator.cs	(revision 4068)
@@ -20,11 +20,7 @@
 #endregion
 
-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.Encodings.SymbolicExpressionTreeEncoding.Interfaces {
Index: /trunk/sources/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.3/Interfaces/ISymbolicExpressionTreeCrossover.cs
===================================================================
--- /trunk/sources/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.3/Interfaces/ISymbolicExpressionTreeCrossover.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.3/Interfaces/ISymbolicExpressionTreeCrossover.cs	(revision 4068)
@@ -20,13 +20,6 @@
 #endregion
 
-using HeuristicLab.Common;
 using HeuristicLab.Core;
-using HeuristicLab.Data;
-using HeuristicLab.Operators;
 using HeuristicLab.Optimization;
-using HeuristicLab.Parameters;
-using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
-using System;
-using System.Diagnostics;
 
 namespace HeuristicLab.Encodings.SymbolicExpressionTreeEncoding.Interfaces {
Index: /trunk/sources/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.3/Interfaces/ISymbolicExpressionTreeManipulator.cs
===================================================================
--- /trunk/sources/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.3/Interfaces/ISymbolicExpressionTreeManipulator.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.3/Interfaces/ISymbolicExpressionTreeManipulator.cs	(revision 4068)
@@ -20,11 +20,6 @@
 #endregion
 
-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.Encodings.SymbolicExpressionTreeEncoding.Interfaces {
Index: /trunk/sources/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.3/Interfaces/ISymbolicExpressionTreeOperator.cs
===================================================================
--- /trunk/sources/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.3/Interfaces/ISymbolicExpressionTreeOperator.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.3/Interfaces/ISymbolicExpressionTreeOperator.cs	(revision 4068)
@@ -20,13 +20,6 @@
 #endregion
 
-using HeuristicLab.Common;
 using HeuristicLab.Core;
 using HeuristicLab.Data;
-using HeuristicLab.Operators;
-using HeuristicLab.Optimization;
-using HeuristicLab.Parameters;
-using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
-using System;
-using System.Diagnostics;
 
 namespace HeuristicLab.Encodings.SymbolicExpressionTreeEncoding.Interfaces {
Index: /trunk/sources/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.3/Manipulators/ChangeNodeTypeManipulation.cs
===================================================================
--- /trunk/sources/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.3/Manipulators/ChangeNodeTypeManipulation.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.3/Manipulators/ChangeNodeTypeManipulation.cs	(revision 4068)
@@ -20,13 +20,11 @@
 #endregion
 
+using System;
+using System.Collections.Generic;
 using System.Linq;
 using HeuristicLab.Core;
-using HeuristicLab.Operators;
-using HeuristicLab.Random;
 using HeuristicLab.Data;
+using HeuristicLab.Encodings.SymbolicExpressionTreeEncoding.Symbols;
 using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
-using System;
-using System.Collections.Generic;
-using HeuristicLab.Encodings.SymbolicExpressionTreeEncoding.Symbols;
 
 namespace HeuristicLab.Encodings.SymbolicExpressionTreeEncoding.Manipulators {
Index: /trunk/sources/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.3/Manipulators/FullTreeShaker.cs
===================================================================
--- /trunk/sources/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.3/Manipulators/FullTreeShaker.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.3/Manipulators/FullTreeShaker.cs	(revision 4068)
@@ -20,8 +20,5 @@
 #endregion
 
-using System.Linq;
 using HeuristicLab.Core;
-using HeuristicLab.Operators;
-using HeuristicLab.Random;
 using HeuristicLab.Data;
 using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
Index: /trunk/sources/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.3/Manipulators/MultiSymbolicExpressionTreeManipulator.cs
===================================================================
--- /trunk/sources/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.3/Manipulators/MultiSymbolicExpressionTreeManipulator.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.3/Manipulators/MultiSymbolicExpressionTreeManipulator.cs	(revision 4068)
@@ -24,10 +24,10 @@
 using HeuristicLab.Collections;
 using HeuristicLab.Core;
+using HeuristicLab.Data;
+using HeuristicLab.Encodings.SymbolicExpressionTreeEncoding.Interfaces;
 using HeuristicLab.Operators;
 using HeuristicLab.Optimization;
 using HeuristicLab.Parameters;
 using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
-using HeuristicLab.Data;
-using HeuristicLab.Encodings.SymbolicExpressionTreeEncoding.Interfaces;
 using HeuristicLab.PluginInfrastructure;
 
Index: /trunk/sources/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.3/Manipulators/OnePointShaker.cs
===================================================================
--- /trunk/sources/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.3/Manipulators/OnePointShaker.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.3/Manipulators/OnePointShaker.cs	(revision 4068)
@@ -22,6 +22,4 @@
 using System.Linq;
 using HeuristicLab.Core;
-using HeuristicLab.Operators;
-using HeuristicLab.Random;
 using HeuristicLab.Data;
 using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
Index: /trunk/sources/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.3/Manipulators/SymbolicExpressionTreeManipulator.cs
===================================================================
--- /trunk/sources/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.3/Manipulators/SymbolicExpressionTreeManipulator.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.3/Manipulators/SymbolicExpressionTreeManipulator.cs	(revision 4068)
@@ -20,12 +20,9 @@
 #endregion
 
-using HeuristicLab.Common;
 using HeuristicLab.Core;
 using HeuristicLab.Data;
-using HeuristicLab.Operators;
-using HeuristicLab.Optimization;
+using HeuristicLab.Encodings.SymbolicExpressionTreeEncoding.Interfaces;
 using HeuristicLab.Parameters;
 using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
-using HeuristicLab.Encodings.SymbolicExpressionTreeEncoding.Interfaces;
 
 namespace HeuristicLab.Encodings.SymbolicExpressionTreeEncoding.Manipulators {
Index: /trunk/sources/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.3/SymbolicExpressionTree.cs
===================================================================
--- /trunk/sources/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.3/SymbolicExpressionTree.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.3/SymbolicExpressionTree.cs	(revision 4068)
@@ -21,13 +21,9 @@
 
 using System;
-using System.Linq;
 using System.Collections.Generic;
-using System.Text;
+using System.Drawing;
 using HeuristicLab.Common;
 using HeuristicLab.Core;
-using System.Xml;
 using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
-using HeuristicLab.Data;
-using System.Drawing;
 
 namespace HeuristicLab.Encodings.SymbolicExpressionTreeEncoding {
Index: /trunk/sources/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.3/SymbolicExpressionTreeNode.cs
===================================================================
--- /trunk/sources/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.3/SymbolicExpressionTreeNode.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.3/SymbolicExpressionTreeNode.cs	(revision 4068)
@@ -21,14 +21,9 @@
 
 using System;
+using System.Collections.Generic;
 using System.Linq;
-using System.Collections.Generic;
-using System.Text;
-using HeuristicLab.Common;
 using HeuristicLab.Core;
-using System.Xml;
+using HeuristicLab.Encodings.SymbolicExpressionTreeEncoding.Symbols;
 using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
-using HeuristicLab.Data;
-using System.Diagnostics;
-using HeuristicLab.Encodings.SymbolicExpressionTreeEncoding.Symbols;
 
 namespace HeuristicLab.Encodings.SymbolicExpressionTreeEncoding {
Index: /trunk/sources/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.3/SymbolicExpressionTreeOperator.cs
===================================================================
--- /trunk/sources/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.3/SymbolicExpressionTreeOperator.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.3/SymbolicExpressionTreeOperator.cs	(revision 4068)
@@ -20,13 +20,11 @@
 #endregion
 
-using System.Linq;
-using HeuristicLab.Common;
 using HeuristicLab.Core;
 using HeuristicLab.Data;
+using HeuristicLab.Encodings.SymbolicExpressionTreeEncoding.Interfaces;
 using HeuristicLab.Operators;
 using HeuristicLab.Optimization;
 using HeuristicLab.Parameters;
 using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
-using HeuristicLab.Encodings.SymbolicExpressionTreeEncoding.Interfaces;
 
 namespace HeuristicLab.Encodings.SymbolicExpressionTreeEncoding {
Index: /trunk/sources/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.3/SymbolicExpressionTreeStringFormatter.cs
===================================================================
--- /trunk/sources/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.3/SymbolicExpressionTreeStringFormatter.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.3/SymbolicExpressionTreeStringFormatter.cs	(revision 4068)
@@ -21,5 +21,4 @@
 
 using System.Text;
-using HeuristicLab.Core;
 using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
 
Index: /trunk/sources/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.3/SymbolicExpressionTreeTerminalNode.cs
===================================================================
--- /trunk/sources/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.3/SymbolicExpressionTreeTerminalNode.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.3/SymbolicExpressionTreeTerminalNode.cs	(revision 4068)
@@ -22,11 +22,6 @@
 using System;
 using System.Collections.Generic;
-using System.Text;
-using HeuristicLab.Common;
-using HeuristicLab.Core;
-using System.Xml;
+using HeuristicLab.Encodings.SymbolicExpressionTreeEncoding.Symbols;
 using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
-using HeuristicLab.Data;
-using HeuristicLab.Encodings.SymbolicExpressionTreeEncoding.Symbols;
 
 namespace HeuristicLab.Encodings.SymbolicExpressionTreeEncoding {
Index: /trunk/sources/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.3/SymbolicExpressionTreeTopLevelNode.cs
===================================================================
--- /trunk/sources/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.3/SymbolicExpressionTreeTopLevelNode.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.3/SymbolicExpressionTreeTopLevelNode.cs	(revision 4068)
@@ -20,15 +20,6 @@
 #endregion
 
-using System;
-using System.Linq;
-using System.Collections.Generic;
-using System.Text;
-using HeuristicLab.Common;
-using HeuristicLab.Core;
-using System.Xml;
+using HeuristicLab.Encodings.SymbolicExpressionTreeEncoding.Symbols;
 using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
-using HeuristicLab.Data;
-using System.Diagnostics;
-using HeuristicLab.Encodings.SymbolicExpressionTreeEncoding.Symbols;
 
 namespace HeuristicLab.Encodings.SymbolicExpressionTreeEncoding {
Index: /trunk/sources/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.3/Symbols/Argument.cs
===================================================================
--- /trunk/sources/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.3/Symbols/Argument.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.3/Symbols/Argument.cs	(revision 4068)
@@ -20,7 +20,7 @@
 #endregion
 
-using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
 using HeuristicLab.Common;
 using HeuristicLab.Core;
+using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
 namespace HeuristicLab.Encodings.SymbolicExpressionTreeEncoding.Symbols {
   /// <summary>
Index: /trunk/sources/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.3/Symbols/Defun.cs
===================================================================
--- /trunk/sources/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.3/Symbols/Defun.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.3/Symbols/Defun.cs	(revision 4068)
@@ -20,7 +20,6 @@
 #endregion
 
+using HeuristicLab.Core;
 using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
-using HeuristicLab.Common;
-using HeuristicLab.Core;
 namespace HeuristicLab.Encodings.SymbolicExpressionTreeEncoding.Symbols {
   /// <summary>
Index: /trunk/sources/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.3/Symbols/DefunTreeNode.cs
===================================================================
--- /trunk/sources/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.3/Symbols/DefunTreeNode.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.3/Symbols/DefunTreeNode.cs	(revision 4068)
@@ -20,8 +20,5 @@
 #endregion
 
-using System;
 using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
-using HeuristicLab.Common;
-using HeuristicLab.Core;
 namespace HeuristicLab.Encodings.SymbolicExpressionTreeEncoding.Symbols {
   [StorableClass]
Index: /trunk/sources/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.3/Symbols/InvokeFunction.cs
===================================================================
--- /trunk/sources/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.3/Symbols/InvokeFunction.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.3/Symbols/InvokeFunction.cs	(revision 4068)
@@ -20,8 +20,8 @@
 #endregion
 
-using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
+using System;
 using HeuristicLab.Common;
 using HeuristicLab.Core;
-using System;
+using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
 namespace HeuristicLab.Encodings.SymbolicExpressionTreeEncoding.Symbols {
   /// <summary>
Index: /trunk/sources/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.3/Symbols/ProgramRootSymbol.cs
===================================================================
--- /trunk/sources/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.3/Symbols/ProgramRootSymbol.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.3/Symbols/ProgramRootSymbol.cs	(revision 4068)
@@ -20,7 +20,6 @@
 #endregion
 
+using HeuristicLab.Core;
 using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
-using HeuristicLab.Common;
-using HeuristicLab.Core;
 namespace HeuristicLab.Encodings.SymbolicExpressionTreeEncoding.Symbols {
   [StorableClass]
Index: /trunk/sources/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.3/Symbols/ReadOnlySymbol.cs
===================================================================
--- /trunk/sources/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.3/Symbols/ReadOnlySymbol.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.3/Symbols/ReadOnlySymbol.cs	(revision 4068)
@@ -20,13 +20,6 @@
 #endregion
 
-using System;
-using System.Collections.Generic;
-using System.Text;
-using HeuristicLab.Common;
 using HeuristicLab.Core;
-using System.Linq;
 using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
-using HeuristicLab.Data;
-using HeuristicLab.Parameters;
 
 namespace HeuristicLab.Encodings.SymbolicExpressionTreeEncoding.Symbols {
Index: /trunk/sources/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.3/Symbols/StartSymbol.cs
===================================================================
--- /trunk/sources/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.3/Symbols/StartSymbol.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.3/Symbols/StartSymbol.cs	(revision 4068)
@@ -20,7 +20,6 @@
 #endregion
 
+using HeuristicLab.Core;
 using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
-using HeuristicLab.Common;
-using HeuristicLab.Core;
 namespace HeuristicLab.Encodings.SymbolicExpressionTreeEncoding.Symbols {
   [StorableClass]
Index: /trunk/sources/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.3/Symbols/Symbol.cs
===================================================================
--- /trunk/sources/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.3/Symbols/Symbol.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.3/Symbols/Symbol.cs	(revision 4068)
@@ -21,12 +21,7 @@
 
 using System;
-using System.Collections.Generic;
-using System.Text;
 using HeuristicLab.Common;
 using HeuristicLab.Core;
-using System.Linq;
 using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
-using HeuristicLab.Data;
-using HeuristicLab.Parameters;
 
 namespace HeuristicLab.Encodings.SymbolicExpressionTreeEncoding.Symbols {
Index: /trunk/sources/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.3/Tests/AllArchitectureAlteringOperatorsTest.cs
===================================================================
--- /trunk/sources/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.3/Tests/AllArchitectureAlteringOperatorsTest.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.3/Tests/AllArchitectureAlteringOperatorsTest.cs	(revision 4068)
@@ -21,16 +21,13 @@
 
 using System;
-using System.Text;
 using System.Collections.Generic;
-using System.Linq;
-using Microsoft.VisualStudio.TestTools.UnitTesting;
+using System.Diagnostics;
+using HeuristicLab.Data;
 using HeuristicLab.Encodings.SymbolicExpressionTreeEncoding;
-using HeuristicLab.Random;
-using System.Diagnostics;
 using HeuristicLab.Encodings.SymbolicExpressionTreeEncoding.ArchitectureManipulators;
-using HeuristicLab.Data;
 using HeuristicLab.Encodings.SymbolicExpressionTreeEncoding.Creators;
 using HeuristicLab.Encodings.SymbolicExpressionTreeEncoding.Crossovers;
-using HeuristicLab.Encodings.SymbolicExpressionTreeEncoding.Manipulators;
+using HeuristicLab.Random;
+using Microsoft.VisualStudio.TestTools.UnitTesting;
 
 namespace HeuristicLab.Encodings.SymbolicExpressionTreeEncoding_3._3.Tests {
Index: /trunk/sources/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.3/Tests/ArgumentCreaterTest.cs
===================================================================
--- /trunk/sources/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.3/Tests/ArgumentCreaterTest.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.3/Tests/ArgumentCreaterTest.cs	(revision 4068)
@@ -21,13 +21,10 @@
 
 using System;
-using System.Text;
 using System.Collections.Generic;
-using System.Linq;
-using Microsoft.VisualStudio.TestTools.UnitTesting;
 using HeuristicLab.Encodings.SymbolicExpressionTreeEncoding;
-using HeuristicLab.Random;
-using System.Diagnostics;
 using HeuristicLab.Encodings.SymbolicExpressionTreeEncoding.ArchitectureManipulators;
 using HeuristicLab.Encodings.SymbolicExpressionTreeEncoding.Creators;
+using HeuristicLab.Random;
+using Microsoft.VisualStudio.TestTools.UnitTesting;
 
 namespace HeuristicLab.Encodings.SymbolicExpressionTreeEncoding_3._3.Tests {
Index: /trunk/sources/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.3/Tests/ArgumentDeleterTest.cs
===================================================================
--- /trunk/sources/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.3/Tests/ArgumentDeleterTest.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.3/Tests/ArgumentDeleterTest.cs	(revision 4068)
@@ -21,13 +21,10 @@
 
 using System;
-using System.Text;
 using System.Collections.Generic;
-using System.Linq;
-using Microsoft.VisualStudio.TestTools.UnitTesting;
 using HeuristicLab.Encodings.SymbolicExpressionTreeEncoding;
-using HeuristicLab.Random;
-using System.Diagnostics;
 using HeuristicLab.Encodings.SymbolicExpressionTreeEncoding.ArchitectureManipulators;
 using HeuristicLab.Encodings.SymbolicExpressionTreeEncoding.Creators;
+using HeuristicLab.Random;
+using Microsoft.VisualStudio.TestTools.UnitTesting;
 
 namespace HeuristicLab.Encodings.SymbolicExpressionTreeEncoding_3._3.Tests {
Index: /trunk/sources/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.3/Tests/ArgumentDuplicaterTest.cs
===================================================================
--- /trunk/sources/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.3/Tests/ArgumentDuplicaterTest.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.3/Tests/ArgumentDuplicaterTest.cs	(revision 4068)
@@ -21,13 +21,10 @@
 
 using System;
-using System.Text;
 using System.Collections.Generic;
-using System.Linq;
-using Microsoft.VisualStudio.TestTools.UnitTesting;
 using HeuristicLab.Encodings.SymbolicExpressionTreeEncoding;
-using HeuristicLab.Random;
-using System.Diagnostics;
 using HeuristicLab.Encodings.SymbolicExpressionTreeEncoding.ArchitectureManipulators;
 using HeuristicLab.Encodings.SymbolicExpressionTreeEncoding.Creators;
+using HeuristicLab.Random;
+using Microsoft.VisualStudio.TestTools.UnitTesting;
 
 namespace HeuristicLab.Encodings.SymbolicExpressionTreeEncoding_3._3.Tests {
Index: /trunk/sources/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.3/Tests/Grammars.cs
===================================================================
--- /trunk/sources/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.3/Tests/Grammars.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.3/Tests/Grammars.cs	(revision 4068)
@@ -20,12 +20,6 @@
 #endregion
 
-using System;
-using System.Text;
 using System.Collections.Generic;
-using System.Linq;
-using Microsoft.VisualStudio.TestTools.UnitTesting;
 using HeuristicLab.Encodings.SymbolicExpressionTreeEncoding;
-using HeuristicLab.Random;
-using System.Diagnostics;
 using HeuristicLab.Encodings.SymbolicExpressionTreeEncoding.Symbols;
 
Index: /trunk/sources/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.3/Tests/ProbabilisticTreeCreaterTest.cs
===================================================================
--- /trunk/sources/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.3/Tests/ProbabilisticTreeCreaterTest.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.3/Tests/ProbabilisticTreeCreaterTest.cs	(revision 4068)
@@ -21,12 +21,9 @@
 
 using System;
-using System.Text;
 using System.Collections.Generic;
-using System.Linq;
+using HeuristicLab.Encodings.SymbolicExpressionTreeEncoding;
+using HeuristicLab.Encodings.SymbolicExpressionTreeEncoding.Creators;
+using HeuristicLab.Random;
 using Microsoft.VisualStudio.TestTools.UnitTesting;
-using HeuristicLab.Encodings.SymbolicExpressionTreeEncoding;
-using HeuristicLab.Random;
-using System.Diagnostics;
-using HeuristicLab.Encodings.SymbolicExpressionTreeEncoding.Creators;
 
 namespace HeuristicLab.Encodings.SymbolicExpressionTreeEncoding_3._3.Tests {
Index: /trunk/sources/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.3/Tests/Properties/AssemblyInfo.cs
===================================================================
--- /trunk/sources/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.3/Tests/Properties/AssemblyInfo.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.3/Tests/Properties/AssemblyInfo.cs	(revision 4068)
@@ -21,5 +21,4 @@
 
 using System.Reflection;
-using System.Runtime.CompilerServices;
 using System.Runtime.InteropServices;
 
Index: /trunk/sources/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.3/Tests/SubroutineCreaterTest.cs
===================================================================
--- /trunk/sources/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.3/Tests/SubroutineCreaterTest.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.3/Tests/SubroutineCreaterTest.cs	(revision 4068)
@@ -21,13 +21,10 @@
 
 using System;
-using System.Text;
 using System.Collections.Generic;
-using System.Linq;
-using Microsoft.VisualStudio.TestTools.UnitTesting;
 using HeuristicLab.Encodings.SymbolicExpressionTreeEncoding;
-using HeuristicLab.Random;
-using System.Diagnostics;
 using HeuristicLab.Encodings.SymbolicExpressionTreeEncoding.ArchitectureManipulators;
 using HeuristicLab.Encodings.SymbolicExpressionTreeEncoding.Creators;
+using HeuristicLab.Random;
+using Microsoft.VisualStudio.TestTools.UnitTesting;
 
 namespace HeuristicLab.Encodings.SymbolicExpressionTreeEncoding_3._3.Tests {
Index: /trunk/sources/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.3/Tests/SubroutineDeleterTest.cs
===================================================================
--- /trunk/sources/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.3/Tests/SubroutineDeleterTest.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.3/Tests/SubroutineDeleterTest.cs	(revision 4068)
@@ -21,13 +21,10 @@
 
 using System;
-using System.Text;
 using System.Collections.Generic;
-using System.Linq;
-using Microsoft.VisualStudio.TestTools.UnitTesting;
 using HeuristicLab.Encodings.SymbolicExpressionTreeEncoding;
-using HeuristicLab.Random;
-using System.Diagnostics;
 using HeuristicLab.Encodings.SymbolicExpressionTreeEncoding.ArchitectureManipulators;
 using HeuristicLab.Encodings.SymbolicExpressionTreeEncoding.Creators;
+using HeuristicLab.Random;
+using Microsoft.VisualStudio.TestTools.UnitTesting;
 
 namespace HeuristicLab.Encodings.SymbolicExpressionTreeEncoding_3._3.Tests {
Index: /trunk/sources/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.3/Tests/SubroutineDuplicaterTest.cs
===================================================================
--- /trunk/sources/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.3/Tests/SubroutineDuplicaterTest.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.3/Tests/SubroutineDuplicaterTest.cs	(revision 4068)
@@ -21,13 +21,10 @@
 
 using System;
-using System.Text;
 using System.Collections.Generic;
-using System.Linq;
-using Microsoft.VisualStudio.TestTools.UnitTesting;
 using HeuristicLab.Encodings.SymbolicExpressionTreeEncoding;
-using HeuristicLab.Random;
-using System.Diagnostics;
 using HeuristicLab.Encodings.SymbolicExpressionTreeEncoding.ArchitectureManipulators;
 using HeuristicLab.Encodings.SymbolicExpressionTreeEncoding.Creators;
+using HeuristicLab.Random;
+using Microsoft.VisualStudio.TestTools.UnitTesting;
 
 namespace HeuristicLab.Encodings.SymbolicExpressionTreeEncoding_3._3.Tests {
Index: /trunk/sources/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.3/Tests/SubtreeCrossoverTest.cs
===================================================================
--- /trunk/sources/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.3/Tests/SubtreeCrossoverTest.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.3/Tests/SubtreeCrossoverTest.cs	(revision 4068)
@@ -21,13 +21,11 @@
 
 using System;
-using System.Text;
 using System.Collections.Generic;
-using System.Linq;
+using System.Diagnostics;
+using HeuristicLab.Encodings.SymbolicExpressionTreeEncoding;
+using HeuristicLab.Encodings.SymbolicExpressionTreeEncoding.Creators;
+using HeuristicLab.Encodings.SymbolicExpressionTreeEncoding.Crossovers;
+using HeuristicLab.Random;
 using Microsoft.VisualStudio.TestTools.UnitTesting;
-using HeuristicLab.Encodings.SymbolicExpressionTreeEncoding;
-using HeuristicLab.Random;
-using System.Diagnostics;
-using HeuristicLab.Encodings.SymbolicExpressionTreeEncoding.Crossovers;
-using HeuristicLab.Encodings.SymbolicExpressionTreeEncoding.Creators;
 
 namespace HeuristicLab.Encodings.SymbolicExpressionTreeEncoding_3._3.Tests {
Index: /trunk/sources/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.3/Tests/Util.cs
===================================================================
--- /trunk/sources/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.3/Tests/Util.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.3/Tests/Util.cs	(revision 4068)
@@ -21,11 +21,9 @@
 
 using System;
-using System.Text;
 using System.Collections.Generic;
 using System.Linq;
+using System.Text;
+using HeuristicLab.Encodings.SymbolicExpressionTreeEncoding;
 using Microsoft.VisualStudio.TestTools.UnitTesting;
-using HeuristicLab.Encodings.SymbolicExpressionTreeEncoding;
-using HeuristicLab.Random;
-using System.Diagnostics;
 
 namespace HeuristicLab.Encodings.SymbolicExpressionTreeEncoding_3._3.Tests {
Index: /trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.ALGLIB/2.5.0/ALGLIB-2.5.0/Properties/AssemblyInfo.cs
===================================================================
--- /trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.ALGLIB/2.5.0/ALGLIB-2.5.0/Properties/AssemblyInfo.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.ALGLIB/2.5.0/ALGLIB-2.5.0/Properties/AssemblyInfo.cs	(revision 4068)
@@ -1,4 +1,3 @@
 ﻿using System.Reflection;
-using System.Runtime.CompilerServices;
 using System.Runtime.InteropServices;
 
Index: /trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.ALGLIB/2.5.0/ALGLIB-2.5.0/ablas.cs
===================================================================
--- /trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.ALGLIB/2.5.0/ALGLIB-2.5.0/ablas.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.ALGLIB/2.5.0/ALGLIB-2.5.0/ablas.cs	(revision 4068)
@@ -19,3285 +19,2751 @@
 *************************************************************************/
 
-using System;
-
-namespace alglib
-{
-    public class ablas
-    {
-        /*************************************************************************
-        Splits matrix length in two parts, left part should match ABLAS block size
-
-        INPUT PARAMETERS
-            A   -   real matrix, is passed to ensure that we didn't split
-                    complex matrix using real splitting subroutine.
-                    matrix itself is not changed.
-            N   -   length, N>0
-
-        OUTPUT PARAMETERS
-            N1  -   length
-            N2  -   length
-
-        N1+N2=N, N1>=N2, N2 may be zero
-
-          -- ALGLIB routine --
-             15.12.2009
-             Bochkanov Sergey
-        *************************************************************************/
-        public static void ablassplitlength(ref double[,] a,
-            int n,
-            ref int n1,
-            ref int n2)
-        {
-            if( n>ablasblocksize(ref a) )
-            {
-                ablasinternalsplitlength(n, ablasblocksize(ref a), ref n1, ref n2);
-            }
-            else
-            {
-                ablasinternalsplitlength(n, ablasmicroblocksize(), ref n1, ref n2);
-            }
-        }
-
-
-        /*************************************************************************
-        Complex ABLASSplitLength
-
-          -- ALGLIB routine --
-             15.12.2009
-             Bochkanov Sergey
-        *************************************************************************/
-        public static void ablascomplexsplitlength(ref AP.Complex[,] a,
-            int n,
-            ref int n1,
-            ref int n2)
-        {
-            if( n>ablascomplexblocksize(ref a) )
-            {
-                ablasinternalsplitlength(n, ablascomplexblocksize(ref a), ref n1, ref n2);
-            }
-            else
-            {
-                ablasinternalsplitlength(n, ablasmicroblocksize(), ref n1, ref n2);
-            }
-        }
-
-
-        /*************************************************************************
-        Returns block size - subdivision size where  cache-oblivious  soubroutines
-        switch to the optimized kernel.
-
-        INPUT PARAMETERS
-            A   -   real matrix, is passed to ensure that we didn't split
-                    complex matrix using real splitting subroutine.
-                    matrix itself is not changed.
-
-          -- ALGLIB routine --
-             15.12.2009
-             Bochkanov Sergey
-        *************************************************************************/
-        public static int ablasblocksize(ref double[,] a)
-        {
-            int result = 0;
-
-            result = 32;
-            return result;
-        }
-
-
-        /*************************************************************************
-        Block size for complex subroutines.
-
-          -- ALGLIB routine --
-             15.12.2009
-             Bochkanov Sergey
-        *************************************************************************/
-        public static int ablascomplexblocksize(ref AP.Complex[,] a)
-        {
-            int result = 0;
-
-            result = 24;
-            return result;
-        }
-
-
-        /*************************************************************************
-        Microblock size
-
-          -- ALGLIB routine --
-             15.12.2009
-             Bochkanov Sergey
-        *************************************************************************/
-        public static int ablasmicroblocksize()
-        {
-            int result = 0;
-
-            result = 8;
-            return result;
-        }
-
-
-        /*************************************************************************
-        Cache-oblivous complex "copy-and-transpose"
-
-        Input parameters:
-            M   -   number of rows
-            N   -   number of columns
-            A   -   source matrix, MxN submatrix is copied and transposed
-            IA  -   submatrix offset (row index)
-            JA  -   submatrix offset (column index)
-            A   -   destination matrix
-            IB  -   submatrix offset (row index)
-            JB  -   submatrix offset (column index)
-        *************************************************************************/
-        public static void cmatrixtranspose(int m,
-            int n,
-            ref AP.Complex[,] a,
-            int ia,
-            int ja,
-            ref AP.Complex[,] b,
-            int ib,
-            int jb)
-        {
-            int i = 0;
-            int s1 = 0;
-            int s2 = 0;
-            int i_ = 0;
-            int i1_ = 0;
-
-            if( m<=2*ablascomplexblocksize(ref a) & n<=2*ablascomplexblocksize(ref a) )
-            {
-                
-                //
-                // base case
-                //
-                for(i=0; i<=m-1; i++)
-                {
-                    i1_ = (ja) - (ib);
-                    for(i_=ib; i_<=ib+n-1;i_++)
-                    {
-                        b[i_,jb+i] = a[ia+i,i_+i1_];
-                    }
+
+namespace alglib {
+  public class ablas {
+    /*************************************************************************
+    Splits matrix length in two parts, left part should match ABLAS block size
+
+    INPUT PARAMETERS
+        A   -   real matrix, is passed to ensure that we didn't split
+                complex matrix using real splitting subroutine.
+                matrix itself is not changed.
+        N   -   length, N>0
+
+    OUTPUT PARAMETERS
+        N1  -   length
+        N2  -   length
+
+    N1+N2=N, N1>=N2, N2 may be zero
+
+      -- ALGLIB routine --
+         15.12.2009
+         Bochkanov Sergey
+    *************************************************************************/
+    public static void ablassplitlength(ref double[,] a,
+        int n,
+        ref int n1,
+        ref int n2) {
+      if (n > ablasblocksize(ref a)) {
+        ablasinternalsplitlength(n, ablasblocksize(ref a), ref n1, ref n2);
+      } else {
+        ablasinternalsplitlength(n, ablasmicroblocksize(), ref n1, ref n2);
+      }
+    }
+
+
+    /*************************************************************************
+    Complex ABLASSplitLength
+
+      -- ALGLIB routine --
+         15.12.2009
+         Bochkanov Sergey
+    *************************************************************************/
+    public static void ablascomplexsplitlength(ref AP.Complex[,] a,
+        int n,
+        ref int n1,
+        ref int n2) {
+      if (n > ablascomplexblocksize(ref a)) {
+        ablasinternalsplitlength(n, ablascomplexblocksize(ref a), ref n1, ref n2);
+      } else {
+        ablasinternalsplitlength(n, ablasmicroblocksize(), ref n1, ref n2);
+      }
+    }
+
+
+    /*************************************************************************
+    Returns block size - subdivision size where  cache-oblivious  soubroutines
+    switch to the optimized kernel.
+
+    INPUT PARAMETERS
+        A   -   real matrix, is passed to ensure that we didn't split
+                complex matrix using real splitting subroutine.
+                matrix itself is not changed.
+
+      -- ALGLIB routine --
+         15.12.2009
+         Bochkanov Sergey
+    *************************************************************************/
+    public static int ablasblocksize(ref double[,] a) {
+      int result = 0;
+
+      result = 32;
+      return result;
+    }
+
+
+    /*************************************************************************
+    Block size for complex subroutines.
+
+      -- ALGLIB routine --
+         15.12.2009
+         Bochkanov Sergey
+    *************************************************************************/
+    public static int ablascomplexblocksize(ref AP.Complex[,] a) {
+      int result = 0;
+
+      result = 24;
+      return result;
+    }
+
+
+    /*************************************************************************
+    Microblock size
+
+      -- ALGLIB routine --
+         15.12.2009
+         Bochkanov Sergey
+    *************************************************************************/
+    public static int ablasmicroblocksize() {
+      int result = 0;
+
+      result = 8;
+      return result;
+    }
+
+
+    /*************************************************************************
+    Cache-oblivous complex "copy-and-transpose"
+
+    Input parameters:
+        M   -   number of rows
+        N   -   number of columns
+        A   -   source matrix, MxN submatrix is copied and transposed
+        IA  -   submatrix offset (row index)
+        JA  -   submatrix offset (column index)
+        A   -   destination matrix
+        IB  -   submatrix offset (row index)
+        JB  -   submatrix offset (column index)
+    *************************************************************************/
+    public static void cmatrixtranspose(int m,
+        int n,
+        ref AP.Complex[,] a,
+        int ia,
+        int ja,
+        ref AP.Complex[,] b,
+        int ib,
+        int jb) {
+      int i = 0;
+      int s1 = 0;
+      int s2 = 0;
+      int i_ = 0;
+      int i1_ = 0;
+
+      if (m <= 2 * ablascomplexblocksize(ref a) & n <= 2 * ablascomplexblocksize(ref a)) {
+
+        //
+        // base case
+        //
+        for (i = 0; i <= m - 1; i++) {
+          i1_ = (ja) - (ib);
+          for (i_ = ib; i_ <= ib + n - 1; i_++) {
+            b[i_, jb + i] = a[ia + i, i_ + i1_];
+          }
+        }
+      } else {
+
+        //
+        // Cache-oblivious recursion
+        //
+        if (m > n) {
+          ablascomplexsplitlength(ref a, m, ref s1, ref s2);
+          cmatrixtranspose(s1, n, ref a, ia, ja, ref b, ib, jb);
+          cmatrixtranspose(s2, n, ref a, ia + s1, ja, ref b, ib, jb + s1);
+        } else {
+          ablascomplexsplitlength(ref a, n, ref s1, ref s2);
+          cmatrixtranspose(m, s1, ref a, ia, ja, ref b, ib, jb);
+          cmatrixtranspose(m, s2, ref a, ia, ja + s1, ref b, ib + s1, jb);
+        }
+      }
+    }
+
+
+    /*************************************************************************
+    Cache-oblivous real "copy-and-transpose"
+
+    Input parameters:
+        M   -   number of rows
+        N   -   number of columns
+        A   -   source matrix, MxN submatrix is copied and transposed
+        IA  -   submatrix offset (row index)
+        JA  -   submatrix offset (column index)
+        A   -   destination matrix
+        IB  -   submatrix offset (row index)
+        JB  -   submatrix offset (column index)
+    *************************************************************************/
+    public static void rmatrixtranspose(int m,
+        int n,
+        ref double[,] a,
+        int ia,
+        int ja,
+        ref double[,] b,
+        int ib,
+        int jb) {
+      int i = 0;
+      int s1 = 0;
+      int s2 = 0;
+      int i_ = 0;
+      int i1_ = 0;
+
+      if (m <= 2 * ablasblocksize(ref a) & n <= 2 * ablasblocksize(ref a)) {
+
+        //
+        // base case
+        //
+        for (i = 0; i <= m - 1; i++) {
+          i1_ = (ja) - (ib);
+          for (i_ = ib; i_ <= ib + n - 1; i_++) {
+            b[i_, jb + i] = a[ia + i, i_ + i1_];
+          }
+        }
+      } else {
+
+        //
+        // Cache-oblivious recursion
+        //
+        if (m > n) {
+          ablassplitlength(ref a, m, ref s1, ref s2);
+          rmatrixtranspose(s1, n, ref a, ia, ja, ref b, ib, jb);
+          rmatrixtranspose(s2, n, ref a, ia + s1, ja, ref b, ib, jb + s1);
+        } else {
+          ablassplitlength(ref a, n, ref s1, ref s2);
+          rmatrixtranspose(m, s1, ref a, ia, ja, ref b, ib, jb);
+          rmatrixtranspose(m, s2, ref a, ia, ja + s1, ref b, ib + s1, jb);
+        }
+      }
+    }
+
+
+    /*************************************************************************
+    Copy
+
+    Input parameters:
+        M   -   number of rows
+        N   -   number of columns
+        A   -   source matrix, MxN submatrix is copied and transposed
+        IA  -   submatrix offset (row index)
+        JA  -   submatrix offset (column index)
+        B   -   destination matrix
+        IB  -   submatrix offset (row index)
+        JB  -   submatrix offset (column index)
+    *************************************************************************/
+    public static void cmatrixcopy(int m,
+        int n,
+        ref AP.Complex[,] a,
+        int ia,
+        int ja,
+        ref AP.Complex[,] b,
+        int ib,
+        int jb) {
+      int i = 0;
+      int i_ = 0;
+      int i1_ = 0;
+
+      for (i = 0; i <= m - 1; i++) {
+        i1_ = (ja) - (jb);
+        for (i_ = jb; i_ <= jb + n - 1; i_++) {
+          b[ib + i, i_] = a[ia + i, i_ + i1_];
+        }
+      }
+    }
+
+
+    /*************************************************************************
+    Copy
+
+    Input parameters:
+        M   -   number of rows
+        N   -   number of columns
+        A   -   source matrix, MxN submatrix is copied and transposed
+        IA  -   submatrix offset (row index)
+        JA  -   submatrix offset (column index)
+        B   -   destination matrix
+        IB  -   submatrix offset (row index)
+        JB  -   submatrix offset (column index)
+    *************************************************************************/
+    public static void rmatrixcopy(int m,
+        int n,
+        ref double[,] a,
+        int ia,
+        int ja,
+        ref double[,] b,
+        int ib,
+        int jb) {
+      int i = 0;
+      int i_ = 0;
+      int i1_ = 0;
+
+      for (i = 0; i <= m - 1; i++) {
+        i1_ = (ja) - (jb);
+        for (i_ = jb; i_ <= jb + n - 1; i_++) {
+          b[ib + i, i_] = a[ia + i, i_ + i1_];
+        }
+      }
+    }
+
+
+    /*************************************************************************
+    Rank-1 correction: A := A + u*v'
+
+    INPUT PARAMETERS:
+        M   -   number of rows
+        N   -   number of columns
+        A   -   target matrix, MxN submatrix is updated
+        IA  -   submatrix offset (row index)
+        JA  -   submatrix offset (column index)
+        U   -   vector #1
+        IU  -   subvector offset
+        V   -   vector #2
+        IV  -   subvector offset
+    *************************************************************************/
+    public static void cmatrixrank1(int m,
+        int n,
+        ref AP.Complex[,] a,
+        int ia,
+        int ja,
+        ref AP.Complex[] u,
+        int iu,
+        ref AP.Complex[] v,
+        int iv) {
+      int i = 0;
+      AP.Complex s = 0;
+      int i_ = 0;
+      int i1_ = 0;
+
+      if (m == 0 | n == 0) {
+        return;
+      }
+      if (ablasf.cmatrixrank1f(m, n, ref a, ia, ja, ref u, iu, ref v, iv)) {
+        return;
+      }
+      for (i = 0; i <= m - 1; i++) {
+        s = u[iu + i];
+        i1_ = (iv) - (ja);
+        for (i_ = ja; i_ <= ja + n - 1; i_++) {
+          a[ia + i, i_] = a[ia + i, i_] + s * v[i_ + i1_];
+        }
+      }
+    }
+
+
+    /*************************************************************************
+    Rank-1 correction: A := A + u*v'
+
+    INPUT PARAMETERS:
+        M   -   number of rows
+        N   -   number of columns
+        A   -   target matrix, MxN submatrix is updated
+        IA  -   submatrix offset (row index)
+        JA  -   submatrix offset (column index)
+        U   -   vector #1
+        IU  -   subvector offset
+        V   -   vector #2
+        IV  -   subvector offset
+    *************************************************************************/
+    public static void rmatrixrank1(int m,
+        int n,
+        ref double[,] a,
+        int ia,
+        int ja,
+        ref double[] u,
+        int iu,
+        ref double[] v,
+        int iv) {
+      int i = 0;
+      double s = 0;
+      int i_ = 0;
+      int i1_ = 0;
+
+      if (m == 0 | n == 0) {
+        return;
+      }
+      if (ablasf.rmatrixrank1f(m, n, ref a, ia, ja, ref u, iu, ref v, iv)) {
+        return;
+      }
+      for (i = 0; i <= m - 1; i++) {
+        s = u[iu + i];
+        i1_ = (iv) - (ja);
+        for (i_ = ja; i_ <= ja + n - 1; i_++) {
+          a[ia + i, i_] = a[ia + i, i_] + s * v[i_ + i1_];
+        }
+      }
+    }
+
+
+    /*************************************************************************
+    Matrix-vector product: y := op(A)*x
+
+    INPUT PARAMETERS:
+        M   -   number of rows of op(A)
+                M>=0
+        N   -   number of columns of op(A)
+                N>=0
+        A   -   target matrix
+        IA  -   submatrix offset (row index)
+        JA  -   submatrix offset (column index)
+        OpA -   operation type:
+                * OpA=0     =>  op(A) = A
+                * OpA=1     =>  op(A) = A^T
+                * OpA=2     =>  op(A) = A^H
+        X   -   input vector
+        IX  -   subvector offset
+        IY  -   subvector offset
+
+    OUTPUT PARAMETERS:
+        Y   -   vector which stores result
+
+    if M=0, then subroutine does nothing.
+    if N=0, Y is filled by zeros.
+
+
+      -- ALGLIB routine --
+
+         28.01.2010
+         Bochkanov Sergey
+    *************************************************************************/
+    public static void cmatrixmv(int m,
+        int n,
+        ref AP.Complex[,] a,
+        int ia,
+        int ja,
+        int opa,
+        ref AP.Complex[] x,
+        int ix,
+        ref AP.Complex[] y,
+        int iy) {
+      int i = 0;
+      AP.Complex v = 0;
+      int i_ = 0;
+      int i1_ = 0;
+
+      if (m == 0) {
+        return;
+      }
+      if (n == 0) {
+        for (i = 0; i <= m - 1; i++) {
+          y[iy + i] = 0;
+        }
+        return;
+      }
+      if (ablasf.cmatrixmvf(m, n, ref a, ia, ja, opa, ref x, ix, ref y, iy)) {
+        return;
+      }
+      if (opa == 0) {
+
+        //
+        // y = A*x
+        //
+        for (i = 0; i <= m - 1; i++) {
+          i1_ = (ix) - (ja);
+          v = 0.0;
+          for (i_ = ja; i_ <= ja + n - 1; i_++) {
+            v += a[ia + i, i_] * x[i_ + i1_];
+          }
+          y[iy + i] = v;
+        }
+        return;
+      }
+      if (opa == 1) {
+
+        //
+        // y = A^T*x
+        //
+        for (i = 0; i <= m - 1; i++) {
+          y[iy + i] = 0;
+        }
+        for (i = 0; i <= n - 1; i++) {
+          v = x[ix + i];
+          i1_ = (ja) - (iy);
+          for (i_ = iy; i_ <= iy + m - 1; i_++) {
+            y[i_] = y[i_] + v * a[ia + i, i_ + i1_];
+          }
+        }
+        return;
+      }
+      if (opa == 2) {
+
+        //
+        // y = A^H*x
+        //
+        for (i = 0; i <= m - 1; i++) {
+          y[iy + i] = 0;
+        }
+        for (i = 0; i <= n - 1; i++) {
+          v = x[ix + i];
+          i1_ = (ja) - (iy);
+          for (i_ = iy; i_ <= iy + m - 1; i_++) {
+            y[i_] = y[i_] + v * AP.Math.Conj(a[ia + i, i_ + i1_]);
+          }
+        }
+        return;
+      }
+    }
+
+
+    /*************************************************************************
+    Matrix-vector product: y := op(A)*x
+
+    INPUT PARAMETERS:
+        M   -   number of rows of op(A)
+        N   -   number of columns of op(A)
+        A   -   target matrix
+        IA  -   submatrix offset (row index)
+        JA  -   submatrix offset (column index)
+        OpA -   operation type:
+                * OpA=0     =>  op(A) = A
+                * OpA=1     =>  op(A) = A^T
+        X   -   input vector
+        IX  -   subvector offset
+        IY  -   subvector offset
+
+    OUTPUT PARAMETERS:
+        Y   -   vector which stores result
+
+    if M=0, then subroutine does nothing.
+    if N=0, Y is filled by zeros.
+
+
+      -- ALGLIB routine --
+
+         28.01.2010
+         Bochkanov Sergey
+    *************************************************************************/
+    public static void rmatrixmv(int m,
+        int n,
+        ref double[,] a,
+        int ia,
+        int ja,
+        int opa,
+        ref double[] x,
+        int ix,
+        ref double[] y,
+        int iy) {
+      int i = 0;
+      double v = 0;
+      int i_ = 0;
+      int i1_ = 0;
+
+      if (m == 0) {
+        return;
+      }
+      if (n == 0) {
+        for (i = 0; i <= m - 1; i++) {
+          y[iy + i] = 0;
+        }
+        return;
+      }
+      if (ablasf.rmatrixmvf(m, n, ref a, ia, ja, opa, ref x, ix, ref y, iy)) {
+        return;
+      }
+      if (opa == 0) {
+
+        //
+        // y = A*x
+        //
+        for (i = 0; i <= m - 1; i++) {
+          i1_ = (ix) - (ja);
+          v = 0.0;
+          for (i_ = ja; i_ <= ja + n - 1; i_++) {
+            v += a[ia + i, i_] * x[i_ + i1_];
+          }
+          y[iy + i] = v;
+        }
+        return;
+      }
+      if (opa == 1) {
+
+        //
+        // y = A^T*x
+        //
+        for (i = 0; i <= m - 1; i++) {
+          y[iy + i] = 0;
+        }
+        for (i = 0; i <= n - 1; i++) {
+          v = x[ix + i];
+          i1_ = (ja) - (iy);
+          for (i_ = iy; i_ <= iy + m - 1; i_++) {
+            y[i_] = y[i_] + v * a[ia + i, i_ + i1_];
+          }
+        }
+        return;
+      }
+    }
+
+
+    /*************************************************************************
+    This subroutine calculates X*op(A^-1) where:
+    * X is MxN general matrix
+    * A is NxN upper/lower triangular/unitriangular matrix
+    * "op" may be identity transformation, transposition, conjugate transposition
+
+    Multiplication result replaces X.
+    Cache-oblivious algorithm is used.
+
+    INPUT PARAMETERS
+        N   -   matrix size, N>=0
+        M   -   matrix size, N>=0
+        A       -   matrix, actial matrix is stored in A[I1:I1+N-1,J1:J1+N-1]
+        I1      -   submatrix offset
+        J1      -   submatrix offset
+        IsUpper -   whether matrix is upper triangular
+        IsUnit  -   whether matrix is unitriangular
+        OpType  -   transformation type:
+                    * 0 - no transformation
+                    * 1 - transposition
+                    * 2 - conjugate transposition
+        C   -   matrix, actial matrix is stored in C[I2:I2+M-1,J2:J2+N-1]
+        I2  -   submatrix offset
+        J2  -   submatrix offset
+
+      -- ALGLIB routine --
+         15.12.2009
+         Bochkanov Sergey
+    *************************************************************************/
+    public static void cmatrixrighttrsm(int m,
+        int n,
+        ref AP.Complex[,] a,
+        int i1,
+        int j1,
+        bool isupper,
+        bool isunit,
+        int optype,
+        ref AP.Complex[,] x,
+        int i2,
+        int j2) {
+      int s1 = 0;
+      int s2 = 0;
+      int bs = 0;
+
+      bs = ablascomplexblocksize(ref a);
+      if (m <= bs & n <= bs) {
+        cmatrixrighttrsm2(m, n, ref a, i1, j1, isupper, isunit, optype, ref x, i2, j2);
+        return;
+      }
+      if (m >= n) {
+
+        //
+        // Split X: X*A = (X1 X2)^T*A
+        //
+        ablascomplexsplitlength(ref a, m, ref s1, ref s2);
+        cmatrixrighttrsm(s1, n, ref a, i1, j1, isupper, isunit, optype, ref x, i2, j2);
+        cmatrixrighttrsm(s2, n, ref a, i1, j1, isupper, isunit, optype, ref x, i2 + s1, j2);
+      } else {
+
+        //
+        // Split A:
+        //               (A1  A12)
+        // X*op(A) = X*op(       )
+        //               (     A2)
+        //
+        // Different variants depending on
+        // IsUpper/OpType combinations
+        //
+        ablascomplexsplitlength(ref a, n, ref s1, ref s2);
+        if (isupper & optype == 0) {
+
+          //
+          //                  (A1  A12)-1
+          // X*A^-1 = (X1 X2)*(       )
+          //                  (     A2)
+          //
+          cmatrixrighttrsm(m, s1, ref a, i1, j1, isupper, isunit, optype, ref x, i2, j2);
+          cmatrixgemm(m, s2, s1, -1.0, ref x, i2, j2, 0, ref a, i1, j1 + s1, 0, 1.0, ref x, i2, j2 + s1);
+          cmatrixrighttrsm(m, s2, ref a, i1 + s1, j1 + s1, isupper, isunit, optype, ref x, i2, j2 + s1);
+          return;
+        }
+        if (isupper & optype != 0) {
+
+          //
+          //                  (A1'     )-1
+          // X*A^-1 = (X1 X2)*(        )
+          //                  (A12' A2')
+          //
+          cmatrixrighttrsm(m, s2, ref a, i1 + s1, j1 + s1, isupper, isunit, optype, ref x, i2, j2 + s1);
+          cmatrixgemm(m, s1, s2, -1.0, ref x, i2, j2 + s1, 0, ref a, i1, j1 + s1, optype, 1.0, ref x, i2, j2);
+          cmatrixrighttrsm(m, s1, ref a, i1, j1, isupper, isunit, optype, ref x, i2, j2);
+          return;
+        }
+        if (!isupper & optype == 0) {
+
+          //
+          //                  (A1     )-1
+          // X*A^-1 = (X1 X2)*(       )
+          //                  (A21  A2)
+          //
+          cmatrixrighttrsm(m, s2, ref a, i1 + s1, j1 + s1, isupper, isunit, optype, ref x, i2, j2 + s1);
+          cmatrixgemm(m, s1, s2, -1.0, ref x, i2, j2 + s1, 0, ref a, i1 + s1, j1, 0, 1.0, ref x, i2, j2);
+          cmatrixrighttrsm(m, s1, ref a, i1, j1, isupper, isunit, optype, ref x, i2, j2);
+          return;
+        }
+        if (!isupper & optype != 0) {
+
+          //
+          //                  (A1' A21')-1
+          // X*A^-1 = (X1 X2)*(        )
+          //                  (     A2')
+          //
+          cmatrixrighttrsm(m, s1, ref a, i1, j1, isupper, isunit, optype, ref x, i2, j2);
+          cmatrixgemm(m, s2, s1, -1.0, ref x, i2, j2, 0, ref a, i1 + s1, j1, optype, 1.0, ref x, i2, j2 + s1);
+          cmatrixrighttrsm(m, s2, ref a, i1 + s1, j1 + s1, isupper, isunit, optype, ref x, i2, j2 + s1);
+          return;
+        }
+      }
+    }
+
+
+    /*************************************************************************
+    This subroutine calculates op(A^-1)*X where:
+    * X is MxN general matrix
+    * A is MxM upper/lower triangular/unitriangular matrix
+    * "op" may be identity transformation, transposition, conjugate transposition
+
+    Multiplication result replaces X.
+    Cache-oblivious algorithm is used.
+
+    INPUT PARAMETERS
+        N   -   matrix size, N>=0
+        M   -   matrix size, N>=0
+        A       -   matrix, actial matrix is stored in A[I1:I1+M-1,J1:J1+M-1]
+        I1      -   submatrix offset
+        J1      -   submatrix offset
+        IsUpper -   whether matrix is upper triangular
+        IsUnit  -   whether matrix is unitriangular
+        OpType  -   transformation type:
+                    * 0 - no transformation
+                    * 1 - transposition
+                    * 2 - conjugate transposition
+        C   -   matrix, actial matrix is stored in C[I2:I2+M-1,J2:J2+N-1]
+        I2  -   submatrix offset
+        J2  -   submatrix offset
+
+      -- ALGLIB routine --
+         15.12.2009
+         Bochkanov Sergey
+    *************************************************************************/
+    public static void cmatrixlefttrsm(int m,
+        int n,
+        ref AP.Complex[,] a,
+        int i1,
+        int j1,
+        bool isupper,
+        bool isunit,
+        int optype,
+        ref AP.Complex[,] x,
+        int i2,
+        int j2) {
+      int s1 = 0;
+      int s2 = 0;
+      int bs = 0;
+
+      bs = ablascomplexblocksize(ref a);
+      if (m <= bs & n <= bs) {
+        cmatrixlefttrsm2(m, n, ref a, i1, j1, isupper, isunit, optype, ref x, i2, j2);
+        return;
+      }
+      if (n >= m) {
+
+        //
+        // Split X: op(A)^-1*X = op(A)^-1*(X1 X2)
+        //
+        ablascomplexsplitlength(ref x, n, ref s1, ref s2);
+        cmatrixlefttrsm(m, s1, ref a, i1, j1, isupper, isunit, optype, ref x, i2, j2);
+        cmatrixlefttrsm(m, s2, ref a, i1, j1, isupper, isunit, optype, ref x, i2, j2 + s1);
+      } else {
+
+        //
+        // Split A
+        //
+        ablascomplexsplitlength(ref a, m, ref s1, ref s2);
+        if (isupper & optype == 0) {
+
+          //
+          //           (A1  A12)-1  ( X1 )
+          // A^-1*X* = (       )   *(    )
+          //           (     A2)    ( X2 )
+          //
+          cmatrixlefttrsm(s2, n, ref a, i1 + s1, j1 + s1, isupper, isunit, optype, ref x, i2 + s1, j2);
+          cmatrixgemm(s1, n, s2, -1.0, ref a, i1, j1 + s1, 0, ref x, i2 + s1, j2, 0, 1.0, ref x, i2, j2);
+          cmatrixlefttrsm(s1, n, ref a, i1, j1, isupper, isunit, optype, ref x, i2, j2);
+          return;
+        }
+        if (isupper & optype != 0) {
+
+          //
+          //          (A1'     )-1 ( X1 )
+          // A^-1*X = (        )  *(    )
+          //          (A12' A2')   ( X2 )
+          //
+          cmatrixlefttrsm(s1, n, ref a, i1, j1, isupper, isunit, optype, ref x, i2, j2);
+          cmatrixgemm(s2, n, s1, -1.0, ref a, i1, j1 + s1, optype, ref x, i2, j2, 0, 1.0, ref x, i2 + s1, j2);
+          cmatrixlefttrsm(s2, n, ref a, i1 + s1, j1 + s1, isupper, isunit, optype, ref x, i2 + s1, j2);
+          return;
+        }
+        if (!isupper & optype == 0) {
+
+          //
+          //          (A1     )-1 ( X1 )
+          // A^-1*X = (       )  *(    )
+          //          (A21  A2)   ( X2 )
+          //
+          cmatrixlefttrsm(s1, n, ref a, i1, j1, isupper, isunit, optype, ref x, i2, j2);
+          cmatrixgemm(s2, n, s1, -1.0, ref a, i1 + s1, j1, 0, ref x, i2, j2, 0, 1.0, ref x, i2 + s1, j2);
+          cmatrixlefttrsm(s2, n, ref a, i1 + s1, j1 + s1, isupper, isunit, optype, ref x, i2 + s1, j2);
+          return;
+        }
+        if (!isupper & optype != 0) {
+
+          //
+          //          (A1' A21')-1 ( X1 )
+          // A^-1*X = (        )  *(    )
+          //          (     A2')   ( X2 )
+          //
+          cmatrixlefttrsm(s2, n, ref a, i1 + s1, j1 + s1, isupper, isunit, optype, ref x, i2 + s1, j2);
+          cmatrixgemm(s1, n, s2, -1.0, ref a, i1 + s1, j1, optype, ref x, i2 + s1, j2, 0, 1.0, ref x, i2, j2);
+          cmatrixlefttrsm(s1, n, ref a, i1, j1, isupper, isunit, optype, ref x, i2, j2);
+          return;
+        }
+      }
+    }
+
+
+    /*************************************************************************
+    Same as CMatrixRightTRSM, but for real matrices
+
+    OpType may be only 0 or 1.
+
+      -- ALGLIB routine --
+         15.12.2009
+         Bochkanov Sergey
+    *************************************************************************/
+    public static void rmatrixrighttrsm(int m,
+        int n,
+        ref double[,] a,
+        int i1,
+        int j1,
+        bool isupper,
+        bool isunit,
+        int optype,
+        ref double[,] x,
+        int i2,
+        int j2) {
+      int s1 = 0;
+      int s2 = 0;
+      int bs = 0;
+
+      bs = ablasblocksize(ref a);
+      if (m <= bs & n <= bs) {
+        rmatrixrighttrsm2(m, n, ref a, i1, j1, isupper, isunit, optype, ref x, i2, j2);
+        return;
+      }
+      if (m >= n) {
+
+        //
+        // Split X: X*A = (X1 X2)^T*A
+        //
+        ablassplitlength(ref a, m, ref s1, ref s2);
+        rmatrixrighttrsm(s1, n, ref a, i1, j1, isupper, isunit, optype, ref x, i2, j2);
+        rmatrixrighttrsm(s2, n, ref a, i1, j1, isupper, isunit, optype, ref x, i2 + s1, j2);
+      } else {
+
+        //
+        // Split A:
+        //               (A1  A12)
+        // X*op(A) = X*op(       )
+        //               (     A2)
+        //
+        // Different variants depending on
+        // IsUpper/OpType combinations
+        //
+        ablassplitlength(ref a, n, ref s1, ref s2);
+        if (isupper & optype == 0) {
+
+          //
+          //                  (A1  A12)-1
+          // X*A^-1 = (X1 X2)*(       )
+          //                  (     A2)
+          //
+          rmatrixrighttrsm(m, s1, ref a, i1, j1, isupper, isunit, optype, ref x, i2, j2);
+          rmatrixgemm(m, s2, s1, -1.0, ref x, i2, j2, 0, ref a, i1, j1 + s1, 0, 1.0, ref x, i2, j2 + s1);
+          rmatrixrighttrsm(m, s2, ref a, i1 + s1, j1 + s1, isupper, isunit, optype, ref x, i2, j2 + s1);
+          return;
+        }
+        if (isupper & optype != 0) {
+
+          //
+          //                  (A1'     )-1
+          // X*A^-1 = (X1 X2)*(        )
+          //                  (A12' A2')
+          //
+          rmatrixrighttrsm(m, s2, ref a, i1 + s1, j1 + s1, isupper, isunit, optype, ref x, i2, j2 + s1);
+          rmatrixgemm(m, s1, s2, -1.0, ref x, i2, j2 + s1, 0, ref a, i1, j1 + s1, optype, 1.0, ref x, i2, j2);
+          rmatrixrighttrsm(m, s1, ref a, i1, j1, isupper, isunit, optype, ref x, i2, j2);
+          return;
+        }
+        if (!isupper & optype == 0) {
+
+          //
+          //                  (A1     )-1
+          // X*A^-1 = (X1 X2)*(       )
+          //                  (A21  A2)
+          //
+          rmatrixrighttrsm(m, s2, ref a, i1 + s1, j1 + s1, isupper, isunit, optype, ref x, i2, j2 + s1);
+          rmatrixgemm(m, s1, s2, -1.0, ref x, i2, j2 + s1, 0, ref a, i1 + s1, j1, 0, 1.0, ref x, i2, j2);
+          rmatrixrighttrsm(m, s1, ref a, i1, j1, isupper, isunit, optype, ref x, i2, j2);
+          return;
+        }
+        if (!isupper & optype != 0) {
+
+          //
+          //                  (A1' A21')-1
+          // X*A^-1 = (X1 X2)*(        )
+          //                  (     A2')
+          //
+          rmatrixrighttrsm(m, s1, ref a, i1, j1, isupper, isunit, optype, ref x, i2, j2);
+          rmatrixgemm(m, s2, s1, -1.0, ref x, i2, j2, 0, ref a, i1 + s1, j1, optype, 1.0, ref x, i2, j2 + s1);
+          rmatrixrighttrsm(m, s2, ref a, i1 + s1, j1 + s1, isupper, isunit, optype, ref x, i2, j2 + s1);
+          return;
+        }
+      }
+    }
+
+
+    /*************************************************************************
+    Same as CMatrixLeftTRSM, but for real matrices
+
+    OpType may be only 0 or 1.
+
+      -- ALGLIB routine --
+         15.12.2009
+         Bochkanov Sergey
+    *************************************************************************/
+    public static void rmatrixlefttrsm(int m,
+        int n,
+        ref double[,] a,
+        int i1,
+        int j1,
+        bool isupper,
+        bool isunit,
+        int optype,
+        ref double[,] x,
+        int i2,
+        int j2) {
+      int s1 = 0;
+      int s2 = 0;
+      int bs = 0;
+
+      bs = ablasblocksize(ref a);
+      if (m <= bs & n <= bs) {
+        rmatrixlefttrsm2(m, n, ref a, i1, j1, isupper, isunit, optype, ref x, i2, j2);
+        return;
+      }
+      if (n >= m) {
+
+        //
+        // Split X: op(A)^-1*X = op(A)^-1*(X1 X2)
+        //
+        ablassplitlength(ref x, n, ref s1, ref s2);
+        rmatrixlefttrsm(m, s1, ref a, i1, j1, isupper, isunit, optype, ref x, i2, j2);
+        rmatrixlefttrsm(m, s2, ref a, i1, j1, isupper, isunit, optype, ref x, i2, j2 + s1);
+      } else {
+
+        //
+        // Split A
+        //
+        ablassplitlength(ref a, m, ref s1, ref s2);
+        if (isupper & optype == 0) {
+
+          //
+          //           (A1  A12)-1  ( X1 )
+          // A^-1*X* = (       )   *(    )
+          //           (     A2)    ( X2 )
+          //
+          rmatrixlefttrsm(s2, n, ref a, i1 + s1, j1 + s1, isupper, isunit, optype, ref x, i2 + s1, j2);
+          rmatrixgemm(s1, n, s2, -1.0, ref a, i1, j1 + s1, 0, ref x, i2 + s1, j2, 0, 1.0, ref x, i2, j2);
+          rmatrixlefttrsm(s1, n, ref a, i1, j1, isupper, isunit, optype, ref x, i2, j2);
+          return;
+        }
+        if (isupper & optype != 0) {
+
+          //
+          //          (A1'     )-1 ( X1 )
+          // A^-1*X = (        )  *(    )
+          //          (A12' A2')   ( X2 )
+          //
+          rmatrixlefttrsm(s1, n, ref a, i1, j1, isupper, isunit, optype, ref x, i2, j2);
+          rmatrixgemm(s2, n, s1, -1.0, ref a, i1, j1 + s1, optype, ref x, i2, j2, 0, 1.0, ref x, i2 + s1, j2);
+          rmatrixlefttrsm(s2, n, ref a, i1 + s1, j1 + s1, isupper, isunit, optype, ref x, i2 + s1, j2);
+          return;
+        }
+        if (!isupper & optype == 0) {
+
+          //
+          //          (A1     )-1 ( X1 )
+          // A^-1*X = (       )  *(    )
+          //          (A21  A2)   ( X2 )
+          //
+          rmatrixlefttrsm(s1, n, ref a, i1, j1, isupper, isunit, optype, ref x, i2, j2);
+          rmatrixgemm(s2, n, s1, -1.0, ref a, i1 + s1, j1, 0, ref x, i2, j2, 0, 1.0, ref x, i2 + s1, j2);
+          rmatrixlefttrsm(s2, n, ref a, i1 + s1, j1 + s1, isupper, isunit, optype, ref x, i2 + s1, j2);
+          return;
+        }
+        if (!isupper & optype != 0) {
+
+          //
+          //          (A1' A21')-1 ( X1 )
+          // A^-1*X = (        )  *(    )
+          //          (     A2')   ( X2 )
+          //
+          rmatrixlefttrsm(s2, n, ref a, i1 + s1, j1 + s1, isupper, isunit, optype, ref x, i2 + s1, j2);
+          rmatrixgemm(s1, n, s2, -1.0, ref a, i1 + s1, j1, optype, ref x, i2 + s1, j2, 0, 1.0, ref x, i2, j2);
+          rmatrixlefttrsm(s1, n, ref a, i1, j1, isupper, isunit, optype, ref x, i2, j2);
+          return;
+        }
+      }
+    }
+
+
+    /*************************************************************************
+    This subroutine calculates  C=alpha*A*A^H+beta*C  or  C=alpha*A^H*A+beta*C
+    where:
+    * C is NxN Hermitian matrix given by its upper/lower triangle
+    * A is NxK matrix when A*A^H is calculated, KxN matrix otherwise
+
+    Additional info:
+    * cache-oblivious algorithm is used.
+    * multiplication result replaces C. If Beta=0, C elements are not used in
+      calculations (not multiplied by zero - just not referenced)
+    * if Alpha=0, A is not used (not multiplied by zero - just not referenced)
+    * if both Beta and Alpha are zero, C is filled by zeros.
+
+    INPUT PARAMETERS
+        N       -   matrix size, N>=0
+        K       -   matrix size, K>=0
+        Alpha   -   coefficient
+        A       -   matrix
+        IA      -   submatrix offset
+        JA      -   submatrix offset
+        OpTypeA -   multiplication type:
+                    * 0 - A*A^H is calculated
+                    * 2 - A^H*A is calculated
+        Beta    -   coefficient
+        C       -   matrix
+        IC      -   submatrix offset
+        JC      -   submatrix offset
+        IsUpper -   whether C is upper triangular or lower triangular
+
+      -- ALGLIB routine --
+         16.12.2009
+         Bochkanov Sergey
+    *************************************************************************/
+    public static void cmatrixsyrk(int n,
+        int k,
+        double alpha,
+        ref AP.Complex[,] a,
+        int ia,
+        int ja,
+        int optypea,
+        double beta,
+        ref AP.Complex[,] c,
+        int ic,
+        int jc,
+        bool isupper) {
+      int s1 = 0;
+      int s2 = 0;
+      int bs = 0;
+
+      bs = ablascomplexblocksize(ref a);
+      if (n <= bs & k <= bs) {
+        cmatrixsyrk2(n, k, alpha, ref a, ia, ja, optypea, beta, ref c, ic, jc, isupper);
+        return;
+      }
+      if (k >= n) {
+
+        //
+        // Split K
+        //
+        ablascomplexsplitlength(ref a, k, ref s1, ref s2);
+        if (optypea == 0) {
+          cmatrixsyrk(n, s1, alpha, ref a, ia, ja, optypea, beta, ref c, ic, jc, isupper);
+          cmatrixsyrk(n, s2, alpha, ref a, ia, ja + s1, optypea, 1.0, ref c, ic, jc, isupper);
+        } else {
+          cmatrixsyrk(n, s1, alpha, ref a, ia, ja, optypea, beta, ref c, ic, jc, isupper);
+          cmatrixsyrk(n, s2, alpha, ref a, ia + s1, ja, optypea, 1.0, ref c, ic, jc, isupper);
+        }
+      } else {
+
+        //
+        // Split N
+        //
+        ablascomplexsplitlength(ref a, n, ref s1, ref s2);
+        if (optypea == 0 & isupper) {
+          cmatrixsyrk(s1, k, alpha, ref a, ia, ja, optypea, beta, ref c, ic, jc, isupper);
+          cmatrixgemm(s1, s2, k, alpha, ref a, ia, ja, 0, ref a, ia + s1, ja, 2, beta, ref c, ic, jc + s1);
+          cmatrixsyrk(s2, k, alpha, ref a, ia + s1, ja, optypea, beta, ref c, ic + s1, jc + s1, isupper);
+          return;
+        }
+        if (optypea == 0 & !isupper) {
+          cmatrixsyrk(s1, k, alpha, ref a, ia, ja, optypea, beta, ref c, ic, jc, isupper);
+          cmatrixgemm(s2, s1, k, alpha, ref a, ia + s1, ja, 0, ref a, ia, ja, 2, beta, ref c, ic + s1, jc);
+          cmatrixsyrk(s2, k, alpha, ref a, ia + s1, ja, optypea, beta, ref c, ic + s1, jc + s1, isupper);
+          return;
+        }
+        if (optypea != 0 & isupper) {
+          cmatrixsyrk(s1, k, alpha, ref a, ia, ja, optypea, beta, ref c, ic, jc, isupper);
+          cmatrixgemm(s1, s2, k, alpha, ref a, ia, ja, 2, ref a, ia, ja + s1, 0, beta, ref c, ic, jc + s1);
+          cmatrixsyrk(s2, k, alpha, ref a, ia, ja + s1, optypea, beta, ref c, ic + s1, jc + s1, isupper);
+          return;
+        }
+        if (optypea != 0 & !isupper) {
+          cmatrixsyrk(s1, k, alpha, ref a, ia, ja, optypea, beta, ref c, ic, jc, isupper);
+          cmatrixgemm(s2, s1, k, alpha, ref a, ia, ja + s1, 2, ref a, ia, ja, 0, beta, ref c, ic + s1, jc);
+          cmatrixsyrk(s2, k, alpha, ref a, ia, ja + s1, optypea, beta, ref c, ic + s1, jc + s1, isupper);
+          return;
+        }
+      }
+    }
+
+
+    /*************************************************************************
+    Same as CMatrixSYRK, but for real matrices
+
+    OpType may be only 0 or 1.
+
+      -- ALGLIB routine --
+         16.12.2009
+         Bochkanov Sergey
+    *************************************************************************/
+    public static void rmatrixsyrk(int n,
+        int k,
+        double alpha,
+        ref double[,] a,
+        int ia,
+        int ja,
+        int optypea,
+        double beta,
+        ref double[,] c,
+        int ic,
+        int jc,
+        bool isupper) {
+      int s1 = 0;
+      int s2 = 0;
+      int bs = 0;
+
+      bs = ablasblocksize(ref a);
+      if (n <= bs & k <= bs) {
+        rmatrixsyrk2(n, k, alpha, ref a, ia, ja, optypea, beta, ref c, ic, jc, isupper);
+        return;
+      }
+      if (k >= n) {
+
+        //
+        // Split K
+        //
+        ablassplitlength(ref a, k, ref s1, ref s2);
+        if (optypea == 0) {
+          rmatrixsyrk(n, s1, alpha, ref a, ia, ja, optypea, beta, ref c, ic, jc, isupper);
+          rmatrixsyrk(n, s2, alpha, ref a, ia, ja + s1, optypea, 1.0, ref c, ic, jc, isupper);
+        } else {
+          rmatrixsyrk(n, s1, alpha, ref a, ia, ja, optypea, beta, ref c, ic, jc, isupper);
+          rmatrixsyrk(n, s2, alpha, ref a, ia + s1, ja, optypea, 1.0, ref c, ic, jc, isupper);
+        }
+      } else {
+
+        //
+        // Split N
+        //
+        ablassplitlength(ref a, n, ref s1, ref s2);
+        if (optypea == 0 & isupper) {
+          rmatrixsyrk(s1, k, alpha, ref a, ia, ja, optypea, beta, ref c, ic, jc, isupper);
+          rmatrixgemm(s1, s2, k, alpha, ref a, ia, ja, 0, ref a, ia + s1, ja, 1, beta, ref c, ic, jc + s1);
+          rmatrixsyrk(s2, k, alpha, ref a, ia + s1, ja, optypea, beta, ref c, ic + s1, jc + s1, isupper);
+          return;
+        }
+        if (optypea == 0 & !isupper) {
+          rmatrixsyrk(s1, k, alpha, ref a, ia, ja, optypea, beta, ref c, ic, jc, isupper);
+          rmatrixgemm(s2, s1, k, alpha, ref a, ia + s1, ja, 0, ref a, ia, ja, 1, beta, ref c, ic + s1, jc);
+          rmatrixsyrk(s2, k, alpha, ref a, ia + s1, ja, optypea, beta, ref c, ic + s1, jc + s1, isupper);
+          return;
+        }
+        if (optypea != 0 & isupper) {
+          rmatrixsyrk(s1, k, alpha, ref a, ia, ja, optypea, beta, ref c, ic, jc, isupper);
+          rmatrixgemm(s1, s2, k, alpha, ref a, ia, ja, 1, ref a, ia, ja + s1, 0, beta, ref c, ic, jc + s1);
+          rmatrixsyrk(s2, k, alpha, ref a, ia, ja + s1, optypea, beta, ref c, ic + s1, jc + s1, isupper);
+          return;
+        }
+        if (optypea != 0 & !isupper) {
+          rmatrixsyrk(s1, k, alpha, ref a, ia, ja, optypea, beta, ref c, ic, jc, isupper);
+          rmatrixgemm(s2, s1, k, alpha, ref a, ia, ja + s1, 1, ref a, ia, ja, 0, beta, ref c, ic + s1, jc);
+          rmatrixsyrk(s2, k, alpha, ref a, ia, ja + s1, optypea, beta, ref c, ic + s1, jc + s1, isupper);
+          return;
+        }
+      }
+    }
+
+
+    /*************************************************************************
+    This subroutine calculates C = alpha*op1(A)*op2(B) +beta*C where:
+    * C is MxN general matrix
+    * op1(A) is MxK matrix
+    * op2(B) is KxN matrix
+    * "op" may be identity transformation, transposition, conjugate transposition
+
+    Additional info:
+    * cache-oblivious algorithm is used.
+    * multiplication result replaces C. If Beta=0, C elements are not used in
+      calculations (not multiplied by zero - just not referenced)
+    * if Alpha=0, A is not used (not multiplied by zero - just not referenced)
+    * if both Beta and Alpha are zero, C is filled by zeros.
+
+    INPUT PARAMETERS
+        N       -   matrix size, N>0
+        M       -   matrix size, N>0
+        K       -   matrix size, K>0
+        Alpha   -   coefficient
+        A       -   matrix
+        IA      -   submatrix offset
+        JA      -   submatrix offset
+        OpTypeA -   transformation type:
+                    * 0 - no transformation
+                    * 1 - transposition
+                    * 2 - conjugate transposition
+        B       -   matrix
+        IB      -   submatrix offset
+        JB      -   submatrix offset
+        OpTypeB -   transformation type:
+                    * 0 - no transformation
+                    * 1 - transposition
+                    * 2 - conjugate transposition
+        Beta    -   coefficient
+        C       -   matrix
+        IC      -   submatrix offset
+        JC      -   submatrix offset
+
+      -- ALGLIB routine --
+         16.12.2009
+         Bochkanov Sergey
+    *************************************************************************/
+    public static void cmatrixgemm(int m,
+        int n,
+        int k,
+        AP.Complex alpha,
+        ref AP.Complex[,] a,
+        int ia,
+        int ja,
+        int optypea,
+        ref AP.Complex[,] b,
+        int ib,
+        int jb,
+        int optypeb,
+        AP.Complex beta,
+        ref AP.Complex[,] c,
+        int ic,
+        int jc) {
+      int s1 = 0;
+      int s2 = 0;
+      int bs = 0;
+
+      bs = ablascomplexblocksize(ref a);
+      if (m <= bs & n <= bs & k <= bs) {
+        cmatrixgemmk(m, n, k, alpha, ref a, ia, ja, optypea, ref b, ib, jb, optypeb, beta, ref c, ic, jc);
+        return;
+      }
+      if (m >= n & m >= k) {
+
+        //
+        // A*B = (A1 A2)^T*B
+        //
+        ablascomplexsplitlength(ref a, m, ref s1, ref s2);
+        cmatrixgemm(s1, n, k, alpha, ref a, ia, ja, optypea, ref b, ib, jb, optypeb, beta, ref c, ic, jc);
+        if (optypea == 0) {
+          cmatrixgemm(s2, n, k, alpha, ref a, ia + s1, ja, optypea, ref b, ib, jb, optypeb, beta, ref c, ic + s1, jc);
+        } else {
+          cmatrixgemm(s2, n, k, alpha, ref a, ia, ja + s1, optypea, ref b, ib, jb, optypeb, beta, ref c, ic + s1, jc);
+        }
+        return;
+      }
+      if (n >= m & n >= k) {
+
+        //
+        // A*B = A*(B1 B2)
+        //
+        ablascomplexsplitlength(ref a, n, ref s1, ref s2);
+        if (optypeb == 0) {
+          cmatrixgemm(m, s1, k, alpha, ref a, ia, ja, optypea, ref b, ib, jb, optypeb, beta, ref c, ic, jc);
+          cmatrixgemm(m, s2, k, alpha, ref a, ia, ja, optypea, ref b, ib, jb + s1, optypeb, beta, ref c, ic, jc + s1);
+        } else {
+          cmatrixgemm(m, s1, k, alpha, ref a, ia, ja, optypea, ref b, ib, jb, optypeb, beta, ref c, ic, jc);
+          cmatrixgemm(m, s2, k, alpha, ref a, ia, ja, optypea, ref b, ib + s1, jb, optypeb, beta, ref c, ic, jc + s1);
+        }
+        return;
+      }
+      if (k >= m & k >= n) {
+
+        //
+        // A*B = (A1 A2)*(B1 B2)^T
+        //
+        ablascomplexsplitlength(ref a, k, ref s1, ref s2);
+        if (optypea == 0 & optypeb == 0) {
+          cmatrixgemm(m, n, s1, alpha, ref a, ia, ja, optypea, ref b, ib, jb, optypeb, beta, ref c, ic, jc);
+          cmatrixgemm(m, n, s2, alpha, ref a, ia, ja + s1, optypea, ref b, ib + s1, jb, optypeb, 1.0, ref c, ic, jc);
+        }
+        if (optypea == 0 & optypeb != 0) {
+          cmatrixgemm(m, n, s1, alpha, ref a, ia, ja, optypea, ref b, ib, jb, optypeb, beta, ref c, ic, jc);
+          cmatrixgemm(m, n, s2, alpha, ref a, ia, ja + s1, optypea, ref b, ib, jb + s1, optypeb, 1.0, ref c, ic, jc);
+        }
+        if (optypea != 0 & optypeb == 0) {
+          cmatrixgemm(m, n, s1, alpha, ref a, ia, ja, optypea, ref b, ib, jb, optypeb, beta, ref c, ic, jc);
+          cmatrixgemm(m, n, s2, alpha, ref a, ia + s1, ja, optypea, ref b, ib + s1, jb, optypeb, 1.0, ref c, ic, jc);
+        }
+        if (optypea != 0 & optypeb != 0) {
+          cmatrixgemm(m, n, s1, alpha, ref a, ia, ja, optypea, ref b, ib, jb, optypeb, beta, ref c, ic, jc);
+          cmatrixgemm(m, n, s2, alpha, ref a, ia + s1, ja, optypea, ref b, ib, jb + s1, optypeb, 1.0, ref c, ic, jc);
+        }
+        return;
+      }
+    }
+
+
+    /*************************************************************************
+    Same as CMatrixGEMM, but for real numbers.
+    OpType may be only 0 or 1.
+
+      -- ALGLIB routine --
+         16.12.2009
+         Bochkanov Sergey
+    *************************************************************************/
+    public static void rmatrixgemm(int m,
+        int n,
+        int k,
+        double alpha,
+        ref double[,] a,
+        int ia,
+        int ja,
+        int optypea,
+        ref double[,] b,
+        int ib,
+        int jb,
+        int optypeb,
+        double beta,
+        ref double[,] c,
+        int ic,
+        int jc) {
+      int s1 = 0;
+      int s2 = 0;
+      int bs = 0;
+
+      bs = ablasblocksize(ref a);
+      if (m <= bs & n <= bs & k <= bs) {
+        rmatrixgemmk(m, n, k, alpha, ref a, ia, ja, optypea, ref b, ib, jb, optypeb, beta, ref c, ic, jc);
+        return;
+      }
+      if (m >= n & m >= k) {
+
+        //
+        // A*B = (A1 A2)^T*B
+        //
+        ablassplitlength(ref a, m, ref s1, ref s2);
+        if (optypea == 0) {
+          rmatrixgemm(s1, n, k, alpha, ref a, ia, ja, optypea, ref b, ib, jb, optypeb, beta, ref c, ic, jc);
+          rmatrixgemm(s2, n, k, alpha, ref a, ia + s1, ja, optypea, ref b, ib, jb, optypeb, beta, ref c, ic + s1, jc);
+        } else {
+          rmatrixgemm(s1, n, k, alpha, ref a, ia, ja, optypea, ref b, ib, jb, optypeb, beta, ref c, ic, jc);
+          rmatrixgemm(s2, n, k, alpha, ref a, ia, ja + s1, optypea, ref b, ib, jb, optypeb, beta, ref c, ic + s1, jc);
+        }
+        return;
+      }
+      if (n >= m & n >= k) {
+
+        //
+        // A*B = A*(B1 B2)
+        //
+        ablassplitlength(ref a, n, ref s1, ref s2);
+        if (optypeb == 0) {
+          rmatrixgemm(m, s1, k, alpha, ref a, ia, ja, optypea, ref b, ib, jb, optypeb, beta, ref c, ic, jc);
+          rmatrixgemm(m, s2, k, alpha, ref a, ia, ja, optypea, ref b, ib, jb + s1, optypeb, beta, ref c, ic, jc + s1);
+        } else {
+          rmatrixgemm(m, s1, k, alpha, ref a, ia, ja, optypea, ref b, ib, jb, optypeb, beta, ref c, ic, jc);
+          rmatrixgemm(m, s2, k, alpha, ref a, ia, ja, optypea, ref b, ib + s1, jb, optypeb, beta, ref c, ic, jc + s1);
+        }
+        return;
+      }
+      if (k >= m & k >= n) {
+
+        //
+        // A*B = (A1 A2)*(B1 B2)^T
+        //
+        ablassplitlength(ref a, k, ref s1, ref s2);
+        if (optypea == 0 & optypeb == 0) {
+          rmatrixgemm(m, n, s1, alpha, ref a, ia, ja, optypea, ref b, ib, jb, optypeb, beta, ref c, ic, jc);
+          rmatrixgemm(m, n, s2, alpha, ref a, ia, ja + s1, optypea, ref b, ib + s1, jb, optypeb, 1.0, ref c, ic, jc);
+        }
+        if (optypea == 0 & optypeb != 0) {
+          rmatrixgemm(m, n, s1, alpha, ref a, ia, ja, optypea, ref b, ib, jb, optypeb, beta, ref c, ic, jc);
+          rmatrixgemm(m, n, s2, alpha, ref a, ia, ja + s1, optypea, ref b, ib, jb + s1, optypeb, 1.0, ref c, ic, jc);
+        }
+        if (optypea != 0 & optypeb == 0) {
+          rmatrixgemm(m, n, s1, alpha, ref a, ia, ja, optypea, ref b, ib, jb, optypeb, beta, ref c, ic, jc);
+          rmatrixgemm(m, n, s2, alpha, ref a, ia + s1, ja, optypea, ref b, ib + s1, jb, optypeb, 1.0, ref c, ic, jc);
+        }
+        if (optypea != 0 & optypeb != 0) {
+          rmatrixgemm(m, n, s1, alpha, ref a, ia, ja, optypea, ref b, ib, jb, optypeb, beta, ref c, ic, jc);
+          rmatrixgemm(m, n, s2, alpha, ref a, ia + s1, ja, optypea, ref b, ib, jb + s1, optypeb, 1.0, ref c, ic, jc);
+        }
+        return;
+      }
+    }
+
+
+    /*************************************************************************
+    Complex ABLASSplitLength
+
+      -- ALGLIB routine --
+         15.12.2009
+         Bochkanov Sergey
+    *************************************************************************/
+    private static void ablasinternalsplitlength(int n,
+        int nb,
+        ref int n1,
+        ref int n2) {
+      int r = 0;
+
+      if (n <= nb) {
+
+        //
+        // Block size, no further splitting
+        //
+        n1 = n;
+        n2 = 0;
+      } else {
+
+        //
+        // Greater than block size
+        //
+        if (n % nb != 0) {
+
+          //
+          // Split remainder
+          //
+          n2 = n % nb;
+          n1 = n - n2;
+        } else {
+
+          //
+          // Split on block boundaries
+          //
+          n2 = n / 2;
+          n1 = n - n2;
+          if (n1 % nb == 0) {
+            return;
+          }
+          r = nb - n1 % nb;
+          n1 = n1 + r;
+          n2 = n2 - r;
+        }
+      }
+    }
+
+
+    /*************************************************************************
+    Level 2 variant of CMatrixRightTRSM
+    *************************************************************************/
+    private static void cmatrixrighttrsm2(int m,
+        int n,
+        ref AP.Complex[,] a,
+        int i1,
+        int j1,
+        bool isupper,
+        bool isunit,
+        int optype,
+        ref AP.Complex[,] x,
+        int i2,
+        int j2) {
+      int i = 0;
+      int j = 0;
+      AP.Complex vc = 0;
+      AP.Complex vd = 0;
+      int i_ = 0;
+      int i1_ = 0;
+
+
+      //
+      // Special case
+      //
+      if (n * m == 0) {
+        return;
+      }
+
+      //
+      // Try to call fast TRSM
+      //
+      if (ablasf.cmatrixrighttrsmf(m, n, ref a, i1, j1, isupper, isunit, optype, ref x, i2, j2)) {
+        return;
+      }
+
+      //
+      // General case
+      //
+      if (isupper) {
+
+        //
+        // Upper triangular matrix
+        //
+        if (optype == 0) {
+
+          //
+          // X*A^(-1)
+          //
+          for (i = 0; i <= m - 1; i++) {
+            for (j = 0; j <= n - 1; j++) {
+              if (isunit) {
+                vd = 1;
+              } else {
+                vd = a[i1 + j, j1 + j];
+              }
+              x[i2 + i, j2 + j] = x[i2 + i, j2 + j] / vd;
+              if (j < n - 1) {
+                vc = x[i2 + i, j2 + j];
+                i1_ = (j1 + j + 1) - (j2 + j + 1);
+                for (i_ = j2 + j + 1; i_ <= j2 + n - 1; i_++) {
+                  x[i2 + i, i_] = x[i2 + i, i_] - vc * a[i1 + j, i_ + i1_];
                 }
-            }
-            else
-            {
-                
-                //
-                // Cache-oblivious recursion
-                //
-                if( m>n )
-                {
-                    ablascomplexsplitlength(ref a, m, ref s1, ref s2);
-                    cmatrixtranspose(s1, n, ref a, ia, ja, ref b, ib, jb);
-                    cmatrixtranspose(s2, n, ref a, ia+s1, ja, ref b, ib, jb+s1);
+              }
+            }
+          }
+          return;
+        }
+        if (optype == 1) {
+
+          //
+          // X*A^(-T)
+          //
+          for (i = 0; i <= m - 1; i++) {
+            for (j = n - 1; j >= 0; j--) {
+              vc = 0;
+              vd = 1;
+              if (j < n - 1) {
+                i1_ = (j1 + j + 1) - (j2 + j + 1);
+                vc = 0.0;
+                for (i_ = j2 + j + 1; i_ <= j2 + n - 1; i_++) {
+                  vc += x[i2 + i, i_] * a[i1 + j, i_ + i1_];
                 }
-                else
-                {
-                    ablascomplexsplitlength(ref a, n, ref s1, ref s2);
-                    cmatrixtranspose(m, s1, ref a, ia, ja, ref b, ib, jb);
-                    cmatrixtranspose(m, s2, ref a, ia, ja+s1, ref b, ib+s1, jb);
+              }
+              if (!isunit) {
+                vd = a[i1 + j, j1 + j];
+              }
+              x[i2 + i, j2 + j] = (x[i2 + i, j2 + j] - vc) / vd;
+            }
+          }
+          return;
+        }
+        if (optype == 2) {
+
+          //
+          // X*A^(-H)
+          //
+          for (i = 0; i <= m - 1; i++) {
+            for (j = n - 1; j >= 0; j--) {
+              vc = 0;
+              vd = 1;
+              if (j < n - 1) {
+                i1_ = (j1 + j + 1) - (j2 + j + 1);
+                vc = 0.0;
+                for (i_ = j2 + j + 1; i_ <= j2 + n - 1; i_++) {
+                  vc += x[i2 + i, i_] * AP.Math.Conj(a[i1 + j, i_ + i1_]);
                 }
-            }
-        }
-
-
-        /*************************************************************************
-        Cache-oblivous real "copy-and-transpose"
-
-        Input parameters:
-            M   -   number of rows
-            N   -   number of columns
-            A   -   source matrix, MxN submatrix is copied and transposed
-            IA  -   submatrix offset (row index)
-            JA  -   submatrix offset (column index)
-            A   -   destination matrix
-            IB  -   submatrix offset (row index)
-            JB  -   submatrix offset (column index)
-        *************************************************************************/
-        public static void rmatrixtranspose(int m,
-            int n,
-            ref double[,] a,
-            int ia,
-            int ja,
-            ref double[,] b,
-            int ib,
-            int jb)
-        {
-            int i = 0;
-            int s1 = 0;
-            int s2 = 0;
-            int i_ = 0;
-            int i1_ = 0;
-
-            if( m<=2*ablasblocksize(ref a) & n<=2*ablasblocksize(ref a) )
-            {
-                
-                //
-                // base case
-                //
-                for(i=0; i<=m-1; i++)
-                {
-                    i1_ = (ja) - (ib);
-                    for(i_=ib; i_<=ib+n-1;i_++)
-                    {
-                        b[i_,jb+i] = a[ia+i,i_+i1_];
-                    }
+              }
+              if (!isunit) {
+                vd = AP.Math.Conj(a[i1 + j, j1 + j]);
+              }
+              x[i2 + i, j2 + j] = (x[i2 + i, j2 + j] - vc) / vd;
+            }
+          }
+          return;
+        }
+      } else {
+
+        //
+        // Lower triangular matrix
+        //
+        if (optype == 0) {
+
+          //
+          // X*A^(-1)
+          //
+          for (i = 0; i <= m - 1; i++) {
+            for (j = n - 1; j >= 0; j--) {
+              if (isunit) {
+                vd = 1;
+              } else {
+                vd = a[i1 + j, j1 + j];
+              }
+              x[i2 + i, j2 + j] = x[i2 + i, j2 + j] / vd;
+              if (j > 0) {
+                vc = x[i2 + i, j2 + j];
+                i1_ = (j1) - (j2);
+                for (i_ = j2; i_ <= j2 + j - 1; i_++) {
+                  x[i2 + i, i_] = x[i2 + i, i_] - vc * a[i1 + j, i_ + i1_];
                 }
-            }
-            else
-            {
-                
-                //
-                // Cache-oblivious recursion
-                //
-                if( m>n )
-                {
-                    ablassplitlength(ref a, m, ref s1, ref s2);
-                    rmatrixtranspose(s1, n, ref a, ia, ja, ref b, ib, jb);
-                    rmatrixtranspose(s2, n, ref a, ia+s1, ja, ref b, ib, jb+s1);
+              }
+            }
+          }
+          return;
+        }
+        if (optype == 1) {
+
+          //
+          // X*A^(-T)
+          //
+          for (i = 0; i <= m - 1; i++) {
+            for (j = 0; j <= n - 1; j++) {
+              vc = 0;
+              vd = 1;
+              if (j > 0) {
+                i1_ = (j1) - (j2);
+                vc = 0.0;
+                for (i_ = j2; i_ <= j2 + j - 1; i_++) {
+                  vc += x[i2 + i, i_] * a[i1 + j, i_ + i1_];
                 }
-                else
-                {
-                    ablassplitlength(ref a, n, ref s1, ref s2);
-                    rmatrixtranspose(m, s1, ref a, ia, ja, ref b, ib, jb);
-                    rmatrixtranspose(m, s2, ref a, ia, ja+s1, ref b, ib+s1, jb);
+              }
+              if (!isunit) {
+                vd = a[i1 + j, j1 + j];
+              }
+              x[i2 + i, j2 + j] = (x[i2 + i, j2 + j] - vc) / vd;
+            }
+          }
+          return;
+        }
+        if (optype == 2) {
+
+          //
+          // X*A^(-H)
+          //
+          for (i = 0; i <= m - 1; i++) {
+            for (j = 0; j <= n - 1; j++) {
+              vc = 0;
+              vd = 1;
+              if (j > 0) {
+                i1_ = (j1) - (j2);
+                vc = 0.0;
+                for (i_ = j2; i_ <= j2 + j - 1; i_++) {
+                  vc += x[i2 + i, i_] * AP.Math.Conj(a[i1 + j, i_ + i1_]);
                 }
-            }
-        }
-
-
-        /*************************************************************************
-        Copy
-
-        Input parameters:
-            M   -   number of rows
-            N   -   number of columns
-            A   -   source matrix, MxN submatrix is copied and transposed
-            IA  -   submatrix offset (row index)
-            JA  -   submatrix offset (column index)
-            B   -   destination matrix
-            IB  -   submatrix offset (row index)
-            JB  -   submatrix offset (column index)
-        *************************************************************************/
-        public static void cmatrixcopy(int m,
-            int n,
-            ref AP.Complex[,] a,
-            int ia,
-            int ja,
-            ref AP.Complex[,] b,
-            int ib,
-            int jb)
-        {
-            int i = 0;
-            int i_ = 0;
-            int i1_ = 0;
-
-            for(i=0; i<=m-1; i++)
-            {
-                i1_ = (ja) - (jb);
-                for(i_=jb; i_<=jb+n-1;i_++)
-                {
-                    b[ib+i,i_] = a[ia+i,i_+i1_];
+              }
+              if (!isunit) {
+                vd = AP.Math.Conj(a[i1 + j, j1 + j]);
+              }
+              x[i2 + i, j2 + j] = (x[i2 + i, j2 + j] - vc) / vd;
+            }
+          }
+          return;
+        }
+      }
+    }
+
+
+    /*************************************************************************
+    Level-2 subroutine
+    *************************************************************************/
+    private static void cmatrixlefttrsm2(int m,
+        int n,
+        ref AP.Complex[,] a,
+        int i1,
+        int j1,
+        bool isupper,
+        bool isunit,
+        int optype,
+        ref AP.Complex[,] x,
+        int i2,
+        int j2) {
+      int i = 0;
+      int j = 0;
+      AP.Complex vc = 0;
+      AP.Complex vd = 0;
+      int i_ = 0;
+
+
+      //
+      // Special case
+      //
+      if (n * m == 0) {
+        return;
+      }
+
+      //
+      // Try to call fast TRSM
+      //
+      if (ablasf.cmatrixlefttrsmf(m, n, ref a, i1, j1, isupper, isunit, optype, ref x, i2, j2)) {
+        return;
+      }
+
+      //
+      // General case
+      //
+      if (isupper) {
+
+        //
+        // Upper triangular matrix
+        //
+        if (optype == 0) {
+
+          //
+          // A^(-1)*X
+          //
+          for (i = m - 1; i >= 0; i--) {
+            for (j = i + 1; j <= m - 1; j++) {
+              vc = a[i1 + i, j1 + j];
+              for (i_ = j2; i_ <= j2 + n - 1; i_++) {
+                x[i2 + i, i_] = x[i2 + i, i_] - vc * x[i2 + j, i_];
+              }
+            }
+            if (!isunit) {
+              vd = 1 / a[i1 + i, j1 + i];
+              for (i_ = j2; i_ <= j2 + n - 1; i_++) {
+                x[i2 + i, i_] = vd * x[i2 + i, i_];
+              }
+            }
+          }
+          return;
+        }
+        if (optype == 1) {
+
+          //
+          // A^(-T)*X
+          //
+          for (i = 0; i <= m - 1; i++) {
+            if (isunit) {
+              vd = 1;
+            } else {
+              vd = 1 / a[i1 + i, j1 + i];
+            }
+            for (i_ = j2; i_ <= j2 + n - 1; i_++) {
+              x[i2 + i, i_] = vd * x[i2 + i, i_];
+            }
+            for (j = i + 1; j <= m - 1; j++) {
+              vc = a[i1 + i, j1 + j];
+              for (i_ = j2; i_ <= j2 + n - 1; i_++) {
+                x[i2 + j, i_] = x[i2 + j, i_] - vc * x[i2 + i, i_];
+              }
+            }
+          }
+          return;
+        }
+        if (optype == 2) {
+
+          //
+          // A^(-H)*X
+          //
+          for (i = 0; i <= m - 1; i++) {
+            if (isunit) {
+              vd = 1;
+            } else {
+              vd = 1 / AP.Math.Conj(a[i1 + i, j1 + i]);
+            }
+            for (i_ = j2; i_ <= j2 + n - 1; i_++) {
+              x[i2 + i, i_] = vd * x[i2 + i, i_];
+            }
+            for (j = i + 1; j <= m - 1; j++) {
+              vc = AP.Math.Conj(a[i1 + i, j1 + j]);
+              for (i_ = j2; i_ <= j2 + n - 1; i_++) {
+                x[i2 + j, i_] = x[i2 + j, i_] - vc * x[i2 + i, i_];
+              }
+            }
+          }
+          return;
+        }
+      } else {
+
+        //
+        // Lower triangular matrix
+        //
+        if (optype == 0) {
+
+          //
+          // A^(-1)*X
+          //
+          for (i = 0; i <= m - 1; i++) {
+            for (j = 0; j <= i - 1; j++) {
+              vc = a[i1 + i, j1 + j];
+              for (i_ = j2; i_ <= j2 + n - 1; i_++) {
+                x[i2 + i, i_] = x[i2 + i, i_] - vc * x[i2 + j, i_];
+              }
+            }
+            if (isunit) {
+              vd = 1;
+            } else {
+              vd = 1 / a[i1 + j, j1 + j];
+            }
+            for (i_ = j2; i_ <= j2 + n - 1; i_++) {
+              x[i2 + i, i_] = vd * x[i2 + i, i_];
+            }
+          }
+          return;
+        }
+        if (optype == 1) {
+
+          //
+          // A^(-T)*X
+          //
+          for (i = m - 1; i >= 0; i--) {
+            if (isunit) {
+              vd = 1;
+            } else {
+              vd = 1 / a[i1 + i, j1 + i];
+            }
+            for (i_ = j2; i_ <= j2 + n - 1; i_++) {
+              x[i2 + i, i_] = vd * x[i2 + i, i_];
+            }
+            for (j = i - 1; j >= 0; j--) {
+              vc = a[i1 + i, j1 + j];
+              for (i_ = j2; i_ <= j2 + n - 1; i_++) {
+                x[i2 + j, i_] = x[i2 + j, i_] - vc * x[i2 + i, i_];
+              }
+            }
+          }
+          return;
+        }
+        if (optype == 2) {
+
+          //
+          // A^(-H)*X
+          //
+          for (i = m - 1; i >= 0; i--) {
+            if (isunit) {
+              vd = 1;
+            } else {
+              vd = 1 / AP.Math.Conj(a[i1 + i, j1 + i]);
+            }
+            for (i_ = j2; i_ <= j2 + n - 1; i_++) {
+              x[i2 + i, i_] = vd * x[i2 + i, i_];
+            }
+            for (j = i - 1; j >= 0; j--) {
+              vc = AP.Math.Conj(a[i1 + i, j1 + j]);
+              for (i_ = j2; i_ <= j2 + n - 1; i_++) {
+                x[i2 + j, i_] = x[i2 + j, i_] - vc * x[i2 + i, i_];
+              }
+            }
+          }
+          return;
+        }
+      }
+    }
+
+
+    /*************************************************************************
+    Level 2 subroutine
+
+      -- ALGLIB routine --
+         15.12.2009
+         Bochkanov Sergey
+    *************************************************************************/
+    private static void rmatrixrighttrsm2(int m,
+        int n,
+        ref double[,] a,
+        int i1,
+        int j1,
+        bool isupper,
+        bool isunit,
+        int optype,
+        ref double[,] x,
+        int i2,
+        int j2) {
+      int i = 0;
+      int j = 0;
+      double vr = 0;
+      double vd = 0;
+      int i_ = 0;
+      int i1_ = 0;
+
+
+      //
+      // Special case
+      //
+      if (n * m == 0) {
+        return;
+      }
+
+      //
+      // Try to use "fast" code
+      //
+      if (ablasf.rmatrixrighttrsmf(m, n, ref a, i1, j1, isupper, isunit, optype, ref x, i2, j2)) {
+        return;
+      }
+
+      //
+      // General case
+      //
+      if (isupper) {
+
+        //
+        // Upper triangular matrix
+        //
+        if (optype == 0) {
+
+          //
+          // X*A^(-1)
+          //
+          for (i = 0; i <= m - 1; i++) {
+            for (j = 0; j <= n - 1; j++) {
+              if (isunit) {
+                vd = 1;
+              } else {
+                vd = a[i1 + j, j1 + j];
+              }
+              x[i2 + i, j2 + j] = x[i2 + i, j2 + j] / vd;
+              if (j < n - 1) {
+                vr = x[i2 + i, j2 + j];
+                i1_ = (j1 + j + 1) - (j2 + j + 1);
+                for (i_ = j2 + j + 1; i_ <= j2 + n - 1; i_++) {
+                  x[i2 + i, i_] = x[i2 + i, i_] - vr * a[i1 + j, i_ + i1_];
                 }
-            }
-        }
-
-
-        /*************************************************************************
-        Copy
-
-        Input parameters:
-            M   -   number of rows
-            N   -   number of columns
-            A   -   source matrix, MxN submatrix is copied and transposed
-            IA  -   submatrix offset (row index)
-            JA  -   submatrix offset (column index)
-            B   -   destination matrix
-            IB  -   submatrix offset (row index)
-            JB  -   submatrix offset (column index)
-        *************************************************************************/
-        public static void rmatrixcopy(int m,
-            int n,
-            ref double[,] a,
-            int ia,
-            int ja,
-            ref double[,] b,
-            int ib,
-            int jb)
-        {
-            int i = 0;
-            int i_ = 0;
-            int i1_ = 0;
-
-            for(i=0; i<=m-1; i++)
-            {
-                i1_ = (ja) - (jb);
-                for(i_=jb; i_<=jb+n-1;i_++)
-                {
-                    b[ib+i,i_] = a[ia+i,i_+i1_];
+              }
+            }
+          }
+          return;
+        }
+        if (optype == 1) {
+
+          //
+          // X*A^(-T)
+          //
+          for (i = 0; i <= m - 1; i++) {
+            for (j = n - 1; j >= 0; j--) {
+              vr = 0;
+              vd = 1;
+              if (j < n - 1) {
+                i1_ = (j1 + j + 1) - (j2 + j + 1);
+                vr = 0.0;
+                for (i_ = j2 + j + 1; i_ <= j2 + n - 1; i_++) {
+                  vr += x[i2 + i, i_] * a[i1 + j, i_ + i1_];
                 }
-            }
-        }
-
-
-        /*************************************************************************
-        Rank-1 correction: A := A + u*v'
-
-        INPUT PARAMETERS:
-            M   -   number of rows
-            N   -   number of columns
-            A   -   target matrix, MxN submatrix is updated
-            IA  -   submatrix offset (row index)
-            JA  -   submatrix offset (column index)
-            U   -   vector #1
-            IU  -   subvector offset
-            V   -   vector #2
-            IV  -   subvector offset
-        *************************************************************************/
-        public static void cmatrixrank1(int m,
-            int n,
-            ref AP.Complex[,] a,
-            int ia,
-            int ja,
-            ref AP.Complex[] u,
-            int iu,
-            ref AP.Complex[] v,
-            int iv)
-        {
-            int i = 0;
-            AP.Complex s = 0;
-            int i_ = 0;
-            int i1_ = 0;
-
-            if( m==0 | n==0 )
-            {
-                return;
-            }
-            if( ablasf.cmatrixrank1f(m, n, ref a, ia, ja, ref u, iu, ref v, iv) )
-            {
-                return;
-            }
-            for(i=0; i<=m-1; i++)
-            {
-                s = u[iu+i];
-                i1_ = (iv) - (ja);
-                for(i_=ja; i_<=ja+n-1;i_++)
-                {
-                    a[ia+i,i_] = a[ia+i,i_] + s*v[i_+i1_];
+              }
+              if (!isunit) {
+                vd = a[i1 + j, j1 + j];
+              }
+              x[i2 + i, j2 + j] = (x[i2 + i, j2 + j] - vr) / vd;
+            }
+          }
+          return;
+        }
+      } else {
+
+        //
+        // Lower triangular matrix
+        //
+        if (optype == 0) {
+
+          //
+          // X*A^(-1)
+          //
+          for (i = 0; i <= m - 1; i++) {
+            for (j = n - 1; j >= 0; j--) {
+              if (isunit) {
+                vd = 1;
+              } else {
+                vd = a[i1 + j, j1 + j];
+              }
+              x[i2 + i, j2 + j] = x[i2 + i, j2 + j] / vd;
+              if (j > 0) {
+                vr = x[i2 + i, j2 + j];
+                i1_ = (j1) - (j2);
+                for (i_ = j2; i_ <= j2 + j - 1; i_++) {
+                  x[i2 + i, i_] = x[i2 + i, i_] - vr * a[i1 + j, i_ + i1_];
                 }
-            }
-        }
-
-
-        /*************************************************************************
-        Rank-1 correction: A := A + u*v'
-
-        INPUT PARAMETERS:
-            M   -   number of rows
-            N   -   number of columns
-            A   -   target matrix, MxN submatrix is updated
-            IA  -   submatrix offset (row index)
-            JA  -   submatrix offset (column index)
-            U   -   vector #1
-            IU  -   subvector offset
-            V   -   vector #2
-            IV  -   subvector offset
-        *************************************************************************/
-        public static void rmatrixrank1(int m,
-            int n,
-            ref double[,] a,
-            int ia,
-            int ja,
-            ref double[] u,
-            int iu,
-            ref double[] v,
-            int iv)
-        {
-            int i = 0;
-            double s = 0;
-            int i_ = 0;
-            int i1_ = 0;
-
-            if( m==0 | n==0 )
-            {
-                return;
-            }
-            if( ablasf.rmatrixrank1f(m, n, ref a, ia, ja, ref u, iu, ref v, iv) )
-            {
-                return;
-            }
-            for(i=0; i<=m-1; i++)
-            {
-                s = u[iu+i];
-                i1_ = (iv) - (ja);
-                for(i_=ja; i_<=ja+n-1;i_++)
-                {
-                    a[ia+i,i_] = a[ia+i,i_] + s*v[i_+i1_];
+              }
+            }
+          }
+          return;
+        }
+        if (optype == 1) {
+
+          //
+          // X*A^(-T)
+          //
+          for (i = 0; i <= m - 1; i++) {
+            for (j = 0; j <= n - 1; j++) {
+              vr = 0;
+              vd = 1;
+              if (j > 0) {
+                i1_ = (j1) - (j2);
+                vr = 0.0;
+                for (i_ = j2; i_ <= j2 + j - 1; i_++) {
+                  vr += x[i2 + i, i_] * a[i1 + j, i_ + i1_];
                 }
-            }
-        }
-
-
-        /*************************************************************************
-        Matrix-vector product: y := op(A)*x
-
-        INPUT PARAMETERS:
-            M   -   number of rows of op(A)
-                    M>=0
-            N   -   number of columns of op(A)
-                    N>=0
-            A   -   target matrix
-            IA  -   submatrix offset (row index)
-            JA  -   submatrix offset (column index)
-            OpA -   operation type:
-                    * OpA=0     =>  op(A) = A
-                    * OpA=1     =>  op(A) = A^T
-                    * OpA=2     =>  op(A) = A^H
-            X   -   input vector
-            IX  -   subvector offset
-            IY  -   subvector offset
-
-        OUTPUT PARAMETERS:
-            Y   -   vector which stores result
-
-        if M=0, then subroutine does nothing.
-        if N=0, Y is filled by zeros.
-
-
-          -- ALGLIB routine --
-
-             28.01.2010
-             Bochkanov Sergey
-        *************************************************************************/
-        public static void cmatrixmv(int m,
-            int n,
-            ref AP.Complex[,] a,
-            int ia,
-            int ja,
-            int opa,
-            ref AP.Complex[] x,
-            int ix,
-            ref AP.Complex[] y,
-            int iy)
-        {
-            int i = 0;
-            AP.Complex v = 0;
-            int i_ = 0;
-            int i1_ = 0;
-
-            if( m==0 )
-            {
-                return;
-            }
-            if( n==0 )
-            {
-                for(i=0; i<=m-1; i++)
-                {
-                    y[iy+i] = 0;
+              }
+              if (!isunit) {
+                vd = a[i1 + j, j1 + j];
+              }
+              x[i2 + i, j2 + j] = (x[i2 + i, j2 + j] - vr) / vd;
+            }
+          }
+          return;
+        }
+      }
+    }
+
+
+    /*************************************************************************
+    Level 2 subroutine
+    *************************************************************************/
+    private static void rmatrixlefttrsm2(int m,
+        int n,
+        ref double[,] a,
+        int i1,
+        int j1,
+        bool isupper,
+        bool isunit,
+        int optype,
+        ref double[,] x,
+        int i2,
+        int j2) {
+      int i = 0;
+      int j = 0;
+      double vr = 0;
+      double vd = 0;
+      int i_ = 0;
+
+
+      //
+      // Special case
+      //
+      if (n * m == 0) {
+        return;
+      }
+
+      //
+      // Try fast code
+      //
+      if (ablasf.rmatrixlefttrsmf(m, n, ref a, i1, j1, isupper, isunit, optype, ref x, i2, j2)) {
+        return;
+      }
+
+      //
+      // General case
+      //
+      if (isupper) {
+
+        //
+        // Upper triangular matrix
+        //
+        if (optype == 0) {
+
+          //
+          // A^(-1)*X
+          //
+          for (i = m - 1; i >= 0; i--) {
+            for (j = i + 1; j <= m - 1; j++) {
+              vr = a[i1 + i, j1 + j];
+              for (i_ = j2; i_ <= j2 + n - 1; i_++) {
+                x[i2 + i, i_] = x[i2 + i, i_] - vr * x[i2 + j, i_];
+              }
+            }
+            if (!isunit) {
+              vd = 1 / a[i1 + i, j1 + i];
+              for (i_ = j2; i_ <= j2 + n - 1; i_++) {
+                x[i2 + i, i_] = vd * x[i2 + i, i_];
+              }
+            }
+          }
+          return;
+        }
+        if (optype == 1) {
+
+          //
+          // A^(-T)*X
+          //
+          for (i = 0; i <= m - 1; i++) {
+            if (isunit) {
+              vd = 1;
+            } else {
+              vd = 1 / a[i1 + i, j1 + i];
+            }
+            for (i_ = j2; i_ <= j2 + n - 1; i_++) {
+              x[i2 + i, i_] = vd * x[i2 + i, i_];
+            }
+            for (j = i + 1; j <= m - 1; j++) {
+              vr = a[i1 + i, j1 + j];
+              for (i_ = j2; i_ <= j2 + n - 1; i_++) {
+                x[i2 + j, i_] = x[i2 + j, i_] - vr * x[i2 + i, i_];
+              }
+            }
+          }
+          return;
+        }
+      } else {
+
+        //
+        // Lower triangular matrix
+        //
+        if (optype == 0) {
+
+          //
+          // A^(-1)*X
+          //
+          for (i = 0; i <= m - 1; i++) {
+            for (j = 0; j <= i - 1; j++) {
+              vr = a[i1 + i, j1 + j];
+              for (i_ = j2; i_ <= j2 + n - 1; i_++) {
+                x[i2 + i, i_] = x[i2 + i, i_] - vr * x[i2 + j, i_];
+              }
+            }
+            if (isunit) {
+              vd = 1;
+            } else {
+              vd = 1 / a[i1 + j, j1 + j];
+            }
+            for (i_ = j2; i_ <= j2 + n - 1; i_++) {
+              x[i2 + i, i_] = vd * x[i2 + i, i_];
+            }
+          }
+          return;
+        }
+        if (optype == 1) {
+
+          //
+          // A^(-T)*X
+          //
+          for (i = m - 1; i >= 0; i--) {
+            if (isunit) {
+              vd = 1;
+            } else {
+              vd = 1 / a[i1 + i, j1 + i];
+            }
+            for (i_ = j2; i_ <= j2 + n - 1; i_++) {
+              x[i2 + i, i_] = vd * x[i2 + i, i_];
+            }
+            for (j = i - 1; j >= 0; j--) {
+              vr = a[i1 + i, j1 + j];
+              for (i_ = j2; i_ <= j2 + n - 1; i_++) {
+                x[i2 + j, i_] = x[i2 + j, i_] - vr * x[i2 + i, i_];
+              }
+            }
+          }
+          return;
+        }
+      }
+    }
+
+
+    /*************************************************************************
+    Level 2 subroutine
+    *************************************************************************/
+    private static void cmatrixsyrk2(int n,
+        int k,
+        double alpha,
+        ref AP.Complex[,] a,
+        int ia,
+        int ja,
+        int optypea,
+        double beta,
+        ref AP.Complex[,] c,
+        int ic,
+        int jc,
+        bool isupper) {
+      int i = 0;
+      int j = 0;
+      int j1 = 0;
+      int j2 = 0;
+      AP.Complex v = 0;
+      int i_ = 0;
+      int i1_ = 0;
+
+
+      //
+      // Fast exit (nothing to be done)
+      //
+      if (((double)(alpha) == (double)(0) | k == 0) & (double)(beta) == (double)(1)) {
+        return;
+      }
+
+      //
+      // Try to call fast SYRK
+      //
+      if (ablasf.cmatrixsyrkf(n, k, alpha, ref a, ia, ja, optypea, beta, ref c, ic, jc, isupper)) {
+        return;
+      }
+
+      //
+      // SYRK
+      //
+      if (optypea == 0) {
+
+        //
+        // C=alpha*A*A^H+beta*C
+        //
+        for (i = 0; i <= n - 1; i++) {
+          if (isupper) {
+            j1 = i;
+            j2 = n - 1;
+          } else {
+            j1 = 0;
+            j2 = i;
+          }
+          for (j = j1; j <= j2; j++) {
+            if ((double)(alpha) != (double)(0) & k > 0) {
+              v = 0.0;
+              for (i_ = ja; i_ <= ja + k - 1; i_++) {
+                v += a[ia + i, i_] * AP.Math.Conj(a[ia + j, i_]);
+              }
+            } else {
+              v = 0;
+            }
+            if ((double)(beta) == (double)(0)) {
+              c[ic + i, jc + j] = alpha * v;
+            } else {
+              c[ic + i, jc + j] = beta * c[ic + i, jc + j] + alpha * v;
+            }
+          }
+        }
+        return;
+      } else {
+
+        //
+        // C=alpha*A^H*A+beta*C
+        //
+        for (i = 0; i <= n - 1; i++) {
+          if (isupper) {
+            j1 = i;
+            j2 = n - 1;
+          } else {
+            j1 = 0;
+            j2 = i;
+          }
+          if ((double)(beta) == (double)(0)) {
+            for (j = j1; j <= j2; j++) {
+              c[ic + i, jc + j] = 0;
+            }
+          } else {
+            for (i_ = jc + j1; i_ <= jc + j2; i_++) {
+              c[ic + i, i_] = beta * c[ic + i, i_];
+            }
+          }
+        }
+        for (i = 0; i <= k - 1; i++) {
+          for (j = 0; j <= n - 1; j++) {
+            if (isupper) {
+              j1 = j;
+              j2 = n - 1;
+            } else {
+              j1 = 0;
+              j2 = j;
+            }
+            v = alpha * AP.Math.Conj(a[ia + i, ja + j]);
+            i1_ = (ja + j1) - (jc + j1);
+            for (i_ = jc + j1; i_ <= jc + j2; i_++) {
+              c[ic + j, i_] = c[ic + j, i_] + v * a[ia + i, i_ + i1_];
+            }
+          }
+        }
+        return;
+      }
+    }
+
+
+    /*************************************************************************
+    Level 2 subrotuine
+    *************************************************************************/
+    private static void rmatrixsyrk2(int n,
+        int k,
+        double alpha,
+        ref double[,] a,
+        int ia,
+        int ja,
+        int optypea,
+        double beta,
+        ref double[,] c,
+        int ic,
+        int jc,
+        bool isupper) {
+      int i = 0;
+      int j = 0;
+      int j1 = 0;
+      int j2 = 0;
+      double v = 0;
+      int i_ = 0;
+      int i1_ = 0;
+
+
+      //
+      // Fast exit (nothing to be done)
+      //
+      if (((double)(alpha) == (double)(0) | k == 0) & (double)(beta) == (double)(1)) {
+        return;
+      }
+
+      //
+      // Try to call fast SYRK
+      //
+      if (ablasf.rmatrixsyrkf(n, k, alpha, ref a, ia, ja, optypea, beta, ref c, ic, jc, isupper)) {
+        return;
+      }
+
+      //
+      // SYRK
+      //
+      if (optypea == 0) {
+
+        //
+        // C=alpha*A*A^H+beta*C
+        //
+        for (i = 0; i <= n - 1; i++) {
+          if (isupper) {
+            j1 = i;
+            j2 = n - 1;
+          } else {
+            j1 = 0;
+            j2 = i;
+          }
+          for (j = j1; j <= j2; j++) {
+            if ((double)(alpha) != (double)(0) & k > 0) {
+              v = 0.0;
+              for (i_ = ja; i_ <= ja + k - 1; i_++) {
+                v += a[ia + i, i_] * a[ia + j, i_];
+              }
+            } else {
+              v = 0;
+            }
+            if ((double)(beta) == (double)(0)) {
+              c[ic + i, jc + j] = alpha * v;
+            } else {
+              c[ic + i, jc + j] = beta * c[ic + i, jc + j] + alpha * v;
+            }
+          }
+        }
+        return;
+      } else {
+
+        //
+        // C=alpha*A^H*A+beta*C
+        //
+        for (i = 0; i <= n - 1; i++) {
+          if (isupper) {
+            j1 = i;
+            j2 = n - 1;
+          } else {
+            j1 = 0;
+            j2 = i;
+          }
+          if ((double)(beta) == (double)(0)) {
+            for (j = j1; j <= j2; j++) {
+              c[ic + i, jc + j] = 0;
+            }
+          } else {
+            for (i_ = jc + j1; i_ <= jc + j2; i_++) {
+              c[ic + i, i_] = beta * c[ic + i, i_];
+            }
+          }
+        }
+        for (i = 0; i <= k - 1; i++) {
+          for (j = 0; j <= n - 1; j++) {
+            if (isupper) {
+              j1 = j;
+              j2 = n - 1;
+            } else {
+              j1 = 0;
+              j2 = j;
+            }
+            v = alpha * a[ia + i, ja + j];
+            i1_ = (ja + j1) - (jc + j1);
+            for (i_ = jc + j1; i_ <= jc + j2; i_++) {
+              c[ic + j, i_] = c[ic + j, i_] + v * a[ia + i, i_ + i1_];
+            }
+          }
+        }
+        return;
+      }
+    }
+
+
+    /*************************************************************************
+    GEMM kernel
+
+      -- ALGLIB routine --
+         16.12.2009
+         Bochkanov Sergey
+    *************************************************************************/
+    private static void cmatrixgemmk(int m,
+        int n,
+        int k,
+        AP.Complex alpha,
+        ref AP.Complex[,] a,
+        int ia,
+        int ja,
+        int optypea,
+        ref AP.Complex[,] b,
+        int ib,
+        int jb,
+        int optypeb,
+        AP.Complex beta,
+        ref AP.Complex[,] c,
+        int ic,
+        int jc) {
+      int i = 0;
+      int j = 0;
+      AP.Complex v = 0;
+      int i_ = 0;
+      int i1_ = 0;
+
+
+      //
+      // Special case
+      //
+      if (m * n == 0) {
+        return;
+      }
+
+      //
+      // Try optimized code
+      //
+      if (ablasf.cmatrixgemmf(m, n, k, alpha, ref a, ia, ja, optypea, ref b, ib, jb, optypeb, beta, ref c, ic, jc)) {
+        return;
+      }
+
+      //
+      // Another special case
+      //
+      if (k == 0) {
+        if (beta != 0) {
+          for (i = 0; i <= m - 1; i++) {
+            for (j = 0; j <= n - 1; j++) {
+              c[ic + i, jc + j] = beta * c[ic + i, jc + j];
+            }
+          }
+        } else {
+          for (i = 0; i <= m - 1; i++) {
+            for (j = 0; j <= n - 1; j++) {
+              c[ic + i, jc + j] = 0;
+            }
+          }
+        }
+        return;
+      }
+
+      //
+      // General case
+      //
+      if (optypea == 0 & optypeb != 0) {
+
+        //
+        // A*B'
+        //
+        for (i = 0; i <= m - 1; i++) {
+          for (j = 0; j <= n - 1; j++) {
+            if (k == 0 | alpha == 0) {
+              v = 0;
+            } else {
+              if (optypeb == 1) {
+                i1_ = (jb) - (ja);
+                v = 0.0;
+                for (i_ = ja; i_ <= ja + k - 1; i_++) {
+                  v += a[ia + i, i_] * b[ib + j, i_ + i1_];
                 }
-                return;
-            }
-            if( ablasf.cmatrixmvf(m, n, ref a, ia, ja, opa, ref x, ix, ref y, iy) )
-            {
-                return;
-            }
-            if( opa==0 )
-            {
-                
-                //
-                // y = A*x
-                //
-                for(i=0; i<=m-1; i++)
-                {
-                    i1_ = (ix)-(ja);
-                    v = 0.0;
-                    for(i_=ja; i_<=ja+n-1;i_++)
-                    {
-                        v += a[ia+i,i_]*x[i_+i1_];
-                    }
-                    y[iy+i] = v;
+              } else {
+                i1_ = (jb) - (ja);
+                v = 0.0;
+                for (i_ = ja; i_ <= ja + k - 1; i_++) {
+                  v += a[ia + i, i_] * AP.Math.Conj(b[ib + j, i_ + i1_]);
                 }
-                return;
-            }
-            if( opa==1 )
-            {
-                
-                //
-                // y = A^T*x
-                //
-                for(i=0; i<=m-1; i++)
-                {
-                    y[iy+i] = 0;
+              }
+            }
+            if (beta == 0) {
+              c[ic + i, jc + j] = alpha * v;
+            } else {
+              c[ic + i, jc + j] = beta * c[ic + i, jc + j] + alpha * v;
+            }
+          }
+        }
+        return;
+      }
+      if (optypea == 0 & optypeb == 0) {
+
+        //
+        // A*B
+        //
+        for (i = 0; i <= m - 1; i++) {
+          if (beta != 0) {
+            for (i_ = jc; i_ <= jc + n - 1; i_++) {
+              c[ic + i, i_] = beta * c[ic + i, i_];
+            }
+          } else {
+            for (j = 0; j <= n - 1; j++) {
+              c[ic + i, jc + j] = 0;
+            }
+          }
+          if (alpha != 0) {
+            for (j = 0; j <= k - 1; j++) {
+              v = alpha * a[ia + i, ja + j];
+              i1_ = (jb) - (jc);
+              for (i_ = jc; i_ <= jc + n - 1; i_++) {
+                c[ic + i, i_] = c[ic + i, i_] + v * b[ib + j, i_ + i1_];
+              }
+            }
+          }
+        }
+        return;
+      }
+      if (optypea != 0 & optypeb != 0) {
+
+        //
+        // A'*B'
+        //
+        for (i = 0; i <= m - 1; i++) {
+          for (j = 0; j <= n - 1; j++) {
+            if (alpha == 0) {
+              v = 0;
+            } else {
+              if (optypea == 1) {
+                if (optypeb == 1) {
+                  i1_ = (jb) - (ia);
+                  v = 0.0;
+                  for (i_ = ia; i_ <= ia + k - 1; i_++) {
+                    v += a[i_, ja + i] * b[ib + j, i_ + i1_];
+                  }
+                } else {
+                  i1_ = (jb) - (ia);
+                  v = 0.0;
+                  for (i_ = ia; i_ <= ia + k - 1; i_++) {
+                    v += a[i_, ja + i] * AP.Math.Conj(b[ib + j, i_ + i1_]);
+                  }
                 }
-                for(i=0; i<=n-1; i++)
-                {
-                    v = x[ix+i];
-                    i1_ = (ja) - (iy);
-                    for(i_=iy; i_<=iy+m-1;i_++)
-                    {
-                        y[i_] = y[i_] + v*a[ia+i,i_+i1_];
-                    }
+              } else {
+                if (optypeb == 1) {
+                  i1_ = (jb) - (ia);
+                  v = 0.0;
+                  for (i_ = ia; i_ <= ia + k - 1; i_++) {
+                    v += AP.Math.Conj(a[i_, ja + i]) * b[ib + j, i_ + i1_];
+                  }
+                } else {
+                  i1_ = (jb) - (ia);
+                  v = 0.0;
+                  for (i_ = ia; i_ <= ia + k - 1; i_++) {
+                    v += AP.Math.Conj(a[i_, ja + i]) * AP.Math.Conj(b[ib + j, i_ + i1_]);
+                  }
                 }
-                return;
-            }
-            if( opa==2 )
-            {
-                
-                //
-                // y = A^H*x
-                //
-                for(i=0; i<=m-1; i++)
-                {
-                    y[iy+i] = 0;
-                }
-                for(i=0; i<=n-1; i++)
-                {
-                    v = x[ix+i];
-                    i1_ = (ja) - (iy);
-                    for(i_=iy; i_<=iy+m-1;i_++)
-                    {
-                        y[i_] = y[i_] + v*AP.Math.Conj(a[ia+i,i_+i1_]);
-                    }
-                }
-                return;
-            }
-        }
-
-
-        /*************************************************************************
-        Matrix-vector product: y := op(A)*x
-
-        INPUT PARAMETERS:
-            M   -   number of rows of op(A)
-            N   -   number of columns of op(A)
-            A   -   target matrix
-            IA  -   submatrix offset (row index)
-            JA  -   submatrix offset (column index)
-            OpA -   operation type:
-                    * OpA=0     =>  op(A) = A
-                    * OpA=1     =>  op(A) = A^T
-            X   -   input vector
-            IX  -   subvector offset
-            IY  -   subvector offset
-
-        OUTPUT PARAMETERS:
-            Y   -   vector which stores result
-
-        if M=0, then subroutine does nothing.
-        if N=0, Y is filled by zeros.
-
-
-          -- ALGLIB routine --
-
-             28.01.2010
-             Bochkanov Sergey
-        *************************************************************************/
-        public static void rmatrixmv(int m,
-            int n,
-            ref double[,] a,
-            int ia,
-            int ja,
-            int opa,
-            ref double[] x,
-            int ix,
-            ref double[] y,
-            int iy)
-        {
-            int i = 0;
-            double v = 0;
-            int i_ = 0;
-            int i1_ = 0;
-
-            if( m==0 )
-            {
-                return;
-            }
-            if( n==0 )
-            {
-                for(i=0; i<=m-1; i++)
-                {
-                    y[iy+i] = 0;
-                }
-                return;
-            }
-            if( ablasf.rmatrixmvf(m, n, ref a, ia, ja, opa, ref x, ix, ref y, iy) )
-            {
-                return;
-            }
-            if( opa==0 )
-            {
-                
-                //
-                // y = A*x
-                //
-                for(i=0; i<=m-1; i++)
-                {
-                    i1_ = (ix)-(ja);
-                    v = 0.0;
-                    for(i_=ja; i_<=ja+n-1;i_++)
-                    {
-                        v += a[ia+i,i_]*x[i_+i1_];
-                    }
-                    y[iy+i] = v;
-                }
-                return;
-            }
-            if( opa==1 )
-            {
-                
-                //
-                // y = A^T*x
-                //
-                for(i=0; i<=m-1; i++)
-                {
-                    y[iy+i] = 0;
-                }
-                for(i=0; i<=n-1; i++)
-                {
-                    v = x[ix+i];
-                    i1_ = (ja) - (iy);
-                    for(i_=iy; i_<=iy+m-1;i_++)
-                    {
-                        y[i_] = y[i_] + v*a[ia+i,i_+i1_];
-                    }
-                }
-                return;
-            }
-        }
-
-
-        /*************************************************************************
-        This subroutine calculates X*op(A^-1) where:
-        * X is MxN general matrix
-        * A is NxN upper/lower triangular/unitriangular matrix
-        * "op" may be identity transformation, transposition, conjugate transposition
-
-        Multiplication result replaces X.
-        Cache-oblivious algorithm is used.
-
-        INPUT PARAMETERS
-            N   -   matrix size, N>=0
-            M   -   matrix size, N>=0
-            A       -   matrix, actial matrix is stored in A[I1:I1+N-1,J1:J1+N-1]
-            I1      -   submatrix offset
-            J1      -   submatrix offset
-            IsUpper -   whether matrix is upper triangular
-            IsUnit  -   whether matrix is unitriangular
-            OpType  -   transformation type:
-                        * 0 - no transformation
-                        * 1 - transposition
-                        * 2 - conjugate transposition
-            C   -   matrix, actial matrix is stored in C[I2:I2+M-1,J2:J2+N-1]
-            I2  -   submatrix offset
-            J2  -   submatrix offset
-
-          -- ALGLIB routine --
-             15.12.2009
-             Bochkanov Sergey
-        *************************************************************************/
-        public static void cmatrixrighttrsm(int m,
-            int n,
-            ref AP.Complex[,] a,
-            int i1,
-            int j1,
-            bool isupper,
-            bool isunit,
-            int optype,
-            ref AP.Complex[,] x,
-            int i2,
-            int j2)
-        {
-            int s1 = 0;
-            int s2 = 0;
-            int bs = 0;
-
-            bs = ablascomplexblocksize(ref a);
-            if( m<=bs & n<=bs )
-            {
-                cmatrixrighttrsm2(m, n, ref a, i1, j1, isupper, isunit, optype, ref x, i2, j2);
-                return;
-            }
-            if( m>=n )
-            {
-                
-                //
-                // Split X: X*A = (X1 X2)^T*A
-                //
-                ablascomplexsplitlength(ref a, m, ref s1, ref s2);
-                cmatrixrighttrsm(s1, n, ref a, i1, j1, isupper, isunit, optype, ref x, i2, j2);
-                cmatrixrighttrsm(s2, n, ref a, i1, j1, isupper, isunit, optype, ref x, i2+s1, j2);
-            }
-            else
-            {
-                
-                //
-                // Split A:
-                //               (A1  A12)
-                // X*op(A) = X*op(       )
-                //               (     A2)
-                //
-                // Different variants depending on
-                // IsUpper/OpType combinations
-                //
-                ablascomplexsplitlength(ref a, n, ref s1, ref s2);
-                if( isupper & optype==0 )
-                {
-                    
-                    //
-                    //                  (A1  A12)-1
-                    // X*A^-1 = (X1 X2)*(       )
-                    //                  (     A2)
-                    //
-                    cmatrixrighttrsm(m, s1, ref a, i1, j1, isupper, isunit, optype, ref x, i2, j2);
-                    cmatrixgemm(m, s2, s1, -1.0, ref x, i2, j2, 0, ref a, i1, j1+s1, 0, 1.0, ref x, i2, j2+s1);
-                    cmatrixrighttrsm(m, s2, ref a, i1+s1, j1+s1, isupper, isunit, optype, ref x, i2, j2+s1);
-                    return;
-                }
-                if( isupper & optype!=0 )
-                {
-                    
-                    //
-                    //                  (A1'     )-1
-                    // X*A^-1 = (X1 X2)*(        )
-                    //                  (A12' A2')
-                    //
-                    cmatrixrighttrsm(m, s2, ref a, i1+s1, j1+s1, isupper, isunit, optype, ref x, i2, j2+s1);
-                    cmatrixgemm(m, s1, s2, -1.0, ref x, i2, j2+s1, 0, ref a, i1, j1+s1, optype, 1.0, ref x, i2, j2);
-                    cmatrixrighttrsm(m, s1, ref a, i1, j1, isupper, isunit, optype, ref x, i2, j2);
-                    return;
-                }
-                if( !isupper & optype==0 )
-                {
-                    
-                    //
-                    //                  (A1     )-1
-                    // X*A^-1 = (X1 X2)*(       )
-                    //                  (A21  A2)
-                    //
-                    cmatrixrighttrsm(m, s2, ref a, i1+s1, j1+s1, isupper, isunit, optype, ref x, i2, j2+s1);
-                    cmatrixgemm(m, s1, s2, -1.0, ref x, i2, j2+s1, 0, ref a, i1+s1, j1, 0, 1.0, ref x, i2, j2);
-                    cmatrixrighttrsm(m, s1, ref a, i1, j1, isupper, isunit, optype, ref x, i2, j2);
-                    return;
-                }
-                if( !isupper & optype!=0 )
-                {
-                    
-                    //
-                    //                  (A1' A21')-1
-                    // X*A^-1 = (X1 X2)*(        )
-                    //                  (     A2')
-                    //
-                    cmatrixrighttrsm(m, s1, ref a, i1, j1, isupper, isunit, optype, ref x, i2, j2);
-                    cmatrixgemm(m, s2, s1, -1.0, ref x, i2, j2, 0, ref a, i1+s1, j1, optype, 1.0, ref x, i2, j2+s1);
-                    cmatrixrighttrsm(m, s2, ref a, i1+s1, j1+s1, isupper, isunit, optype, ref x, i2, j2+s1);
-                    return;
-                }
-            }
-        }
-
-
-        /*************************************************************************
-        This subroutine calculates op(A^-1)*X where:
-        * X is MxN general matrix
-        * A is MxM upper/lower triangular/unitriangular matrix
-        * "op" may be identity transformation, transposition, conjugate transposition
-
-        Multiplication result replaces X.
-        Cache-oblivious algorithm is used.
-
-        INPUT PARAMETERS
-            N   -   matrix size, N>=0
-            M   -   matrix size, N>=0
-            A       -   matrix, actial matrix is stored in A[I1:I1+M-1,J1:J1+M-1]
-            I1      -   submatrix offset
-            J1      -   submatrix offset
-            IsUpper -   whether matrix is upper triangular
-            IsUnit  -   whether matrix is unitriangular
-            OpType  -   transformation type:
-                        * 0 - no transformation
-                        * 1 - transposition
-                        * 2 - conjugate transposition
-            C   -   matrix, actial matrix is stored in C[I2:I2+M-1,J2:J2+N-1]
-            I2  -   submatrix offset
-            J2  -   submatrix offset
-
-          -- ALGLIB routine --
-             15.12.2009
-             Bochkanov Sergey
-        *************************************************************************/
-        public static void cmatrixlefttrsm(int m,
-            int n,
-            ref AP.Complex[,] a,
-            int i1,
-            int j1,
-            bool isupper,
-            bool isunit,
-            int optype,
-            ref AP.Complex[,] x,
-            int i2,
-            int j2)
-        {
-            int s1 = 0;
-            int s2 = 0;
-            int bs = 0;
-
-            bs = ablascomplexblocksize(ref a);
-            if( m<=bs & n<=bs )
-            {
-                cmatrixlefttrsm2(m, n, ref a, i1, j1, isupper, isunit, optype, ref x, i2, j2);
-                return;
-            }
-            if( n>=m )
-            {
-                
-                //
-                // Split X: op(A)^-1*X = op(A)^-1*(X1 X2)
-                //
-                ablascomplexsplitlength(ref x, n, ref s1, ref s2);
-                cmatrixlefttrsm(m, s1, ref a, i1, j1, isupper, isunit, optype, ref x, i2, j2);
-                cmatrixlefttrsm(m, s2, ref a, i1, j1, isupper, isunit, optype, ref x, i2, j2+s1);
-            }
-            else
-            {
-                
-                //
-                // Split A
-                //
-                ablascomplexsplitlength(ref a, m, ref s1, ref s2);
-                if( isupper & optype==0 )
-                {
-                    
-                    //
-                    //           (A1  A12)-1  ( X1 )
-                    // A^-1*X* = (       )   *(    )
-                    //           (     A2)    ( X2 )
-                    //
-                    cmatrixlefttrsm(s2, n, ref a, i1+s1, j1+s1, isupper, isunit, optype, ref x, i2+s1, j2);
-                    cmatrixgemm(s1, n, s2, -1.0, ref a, i1, j1+s1, 0, ref x, i2+s1, j2, 0, 1.0, ref x, i2, j2);
-                    cmatrixlefttrsm(s1, n, ref a, i1, j1, isupper, isunit, optype, ref x, i2, j2);
-                    return;
-                }
-                if( isupper & optype!=0 )
-                {
-                    
-                    //
-                    //          (A1'     )-1 ( X1 )
-                    // A^-1*X = (        )  *(    )
-                    //          (A12' A2')   ( X2 )
-                    //
-                    cmatrixlefttrsm(s1, n, ref a, i1, j1, isupper, isunit, optype, ref x, i2, j2);
-                    cmatrixgemm(s2, n, s1, -1.0, ref a, i1, j1+s1, optype, ref x, i2, j2, 0, 1.0, ref x, i2+s1, j2);
-                    cmatrixlefttrsm(s2, n, ref a, i1+s1, j1+s1, isupper, isunit, optype, ref x, i2+s1, j2);
-                    return;
-                }
-                if( !isupper & optype==0 )
-                {
-                    
-                    //
-                    //          (A1     )-1 ( X1 )
-                    // A^-1*X = (       )  *(    )
-                    //          (A21  A2)   ( X2 )
-                    //
-                    cmatrixlefttrsm(s1, n, ref a, i1, j1, isupper, isunit, optype, ref x, i2, j2);
-                    cmatrixgemm(s2, n, s1, -1.0, ref a, i1+s1, j1, 0, ref x, i2, j2, 0, 1.0, ref x, i2+s1, j2);
-                    cmatrixlefttrsm(s2, n, ref a, i1+s1, j1+s1, isupper, isunit, optype, ref x, i2+s1, j2);
-                    return;
-                }
-                if( !isupper & optype!=0 )
-                {
-                    
-                    //
-                    //          (A1' A21')-1 ( X1 )
-                    // A^-1*X = (        )  *(    )
-                    //          (     A2')   ( X2 )
-                    //
-                    cmatrixlefttrsm(s2, n, ref a, i1+s1, j1+s1, isupper, isunit, optype, ref x, i2+s1, j2);
-                    cmatrixgemm(s1, n, s2, -1.0, ref a, i1+s1, j1, optype, ref x, i2+s1, j2, 0, 1.0, ref x, i2, j2);
-                    cmatrixlefttrsm(s1, n, ref a, i1, j1, isupper, isunit, optype, ref x, i2, j2);
-                    return;
-                }
-            }
-        }
-
-
-        /*************************************************************************
-        Same as CMatrixRightTRSM, but for real matrices
-
-        OpType may be only 0 or 1.
-
-          -- ALGLIB routine --
-             15.12.2009
-             Bochkanov Sergey
-        *************************************************************************/
-        public static void rmatrixrighttrsm(int m,
-            int n,
-            ref double[,] a,
-            int i1,
-            int j1,
-            bool isupper,
-            bool isunit,
-            int optype,
-            ref double[,] x,
-            int i2,
-            int j2)
-        {
-            int s1 = 0;
-            int s2 = 0;
-            int bs = 0;
-
-            bs = ablasblocksize(ref a);
-            if( m<=bs & n<=bs )
-            {
-                rmatrixrighttrsm2(m, n, ref a, i1, j1, isupper, isunit, optype, ref x, i2, j2);
-                return;
-            }
-            if( m>=n )
-            {
-                
-                //
-                // Split X: X*A = (X1 X2)^T*A
-                //
-                ablassplitlength(ref a, m, ref s1, ref s2);
-                rmatrixrighttrsm(s1, n, ref a, i1, j1, isupper, isunit, optype, ref x, i2, j2);
-                rmatrixrighttrsm(s2, n, ref a, i1, j1, isupper, isunit, optype, ref x, i2+s1, j2);
-            }
-            else
-            {
-                
-                //
-                // Split A:
-                //               (A1  A12)
-                // X*op(A) = X*op(       )
-                //               (     A2)
-                //
-                // Different variants depending on
-                // IsUpper/OpType combinations
-                //
-                ablassplitlength(ref a, n, ref s1, ref s2);
-                if( isupper & optype==0 )
-                {
-                    
-                    //
-                    //                  (A1  A12)-1
-                    // X*A^-1 = (X1 X2)*(       )
-                    //                  (     A2)
-                    //
-                    rmatrixrighttrsm(m, s1, ref a, i1, j1, isupper, isunit, optype, ref x, i2, j2);
-                    rmatrixgemm(m, s2, s1, -1.0, ref x, i2, j2, 0, ref a, i1, j1+s1, 0, 1.0, ref x, i2, j2+s1);
-                    rmatrixrighttrsm(m, s2, ref a, i1+s1, j1+s1, isupper, isunit, optype, ref x, i2, j2+s1);
-                    return;
-                }
-                if( isupper & optype!=0 )
-                {
-                    
-                    //
-                    //                  (A1'     )-1
-                    // X*A^-1 = (X1 X2)*(        )
-                    //                  (A12' A2')
-                    //
-                    rmatrixrighttrsm(m, s2, ref a, i1+s1, j1+s1, isupper, isunit, optype, ref x, i2, j2+s1);
-                    rmatrixgemm(m, s1, s2, -1.0, ref x, i2, j2+s1, 0, ref a, i1, j1+s1, optype, 1.0, ref x, i2, j2);
-                    rmatrixrighttrsm(m, s1, ref a, i1, j1, isupper, isunit, optype, ref x, i2, j2);
-                    return;
-                }
-                if( !isupper & optype==0 )
-                {
-                    
-                    //
-                    //                  (A1     )-1
-                    // X*A^-1 = (X1 X2)*(       )
-                    //                  (A21  A2)
-                    //
-                    rmatrixrighttrsm(m, s2, ref a, i1+s1, j1+s1, isupper, isunit, optype, ref x, i2, j2+s1);
-                    rmatrixgemm(m, s1, s2, -1.0, ref x, i2, j2+s1, 0, ref a, i1+s1, j1, 0, 1.0, ref x, i2, j2);
-                    rmatrixrighttrsm(m, s1, ref a, i1, j1, isupper, isunit, optype, ref x, i2, j2);
-                    return;
-                }
-                if( !isupper & optype!=0 )
-                {
-                    
-                    //
-                    //                  (A1' A21')-1
-                    // X*A^-1 = (X1 X2)*(        )
-                    //                  (     A2')
-                    //
-                    rmatrixrighttrsm(m, s1, ref a, i1, j1, isupper, isunit, optype, ref x, i2, j2);
-                    rmatrixgemm(m, s2, s1, -1.0, ref x, i2, j2, 0, ref a, i1+s1, j1, optype, 1.0, ref x, i2, j2+s1);
-                    rmatrixrighttrsm(m, s2, ref a, i1+s1, j1+s1, isupper, isunit, optype, ref x, i2, j2+s1);
-                    return;
-                }
-            }
-        }
-
-
-        /*************************************************************************
-        Same as CMatrixLeftTRSM, but for real matrices
-
-        OpType may be only 0 or 1.
-
-          -- ALGLIB routine --
-             15.12.2009
-             Bochkanov Sergey
-        *************************************************************************/
-        public static void rmatrixlefttrsm(int m,
-            int n,
-            ref double[,] a,
-            int i1,
-            int j1,
-            bool isupper,
-            bool isunit,
-            int optype,
-            ref double[,] x,
-            int i2,
-            int j2)
-        {
-            int s1 = 0;
-            int s2 = 0;
-            int bs = 0;
-
-            bs = ablasblocksize(ref a);
-            if( m<=bs & n<=bs )
-            {
-                rmatrixlefttrsm2(m, n, ref a, i1, j1, isupper, isunit, optype, ref x, i2, j2);
-                return;
-            }
-            if( n>=m )
-            {
-                
-                //
-                // Split X: op(A)^-1*X = op(A)^-1*(X1 X2)
-                //
-                ablassplitlength(ref x, n, ref s1, ref s2);
-                rmatrixlefttrsm(m, s1, ref a, i1, j1, isupper, isunit, optype, ref x, i2, j2);
-                rmatrixlefttrsm(m, s2, ref a, i1, j1, isupper, isunit, optype, ref x, i2, j2+s1);
-            }
-            else
-            {
-                
-                //
-                // Split A
-                //
-                ablassplitlength(ref a, m, ref s1, ref s2);
-                if( isupper & optype==0 )
-                {
-                    
-                    //
-                    //           (A1  A12)-1  ( X1 )
-                    // A^-1*X* = (       )   *(    )
-                    //           (     A2)    ( X2 )
-                    //
-                    rmatrixlefttrsm(s2, n, ref a, i1+s1, j1+s1, isupper, isunit, optype, ref x, i2+s1, j2);
-                    rmatrixgemm(s1, n, s2, -1.0, ref a, i1, j1+s1, 0, ref x, i2+s1, j2, 0, 1.0, ref x, i2, j2);
-                    rmatrixlefttrsm(s1, n, ref a, i1, j1, isupper, isunit, optype, ref x, i2, j2);
-                    return;
-                }
-                if( isupper & optype!=0 )
-                {
-                    
-                    //
-                    //          (A1'     )-1 ( X1 )
-                    // A^-1*X = (        )  *(    )
-                    //          (A12' A2')   ( X2 )
-                    //
-                    rmatrixlefttrsm(s1, n, ref a, i1, j1, isupper, isunit, optype, ref x, i2, j2);
-                    rmatrixgemm(s2, n, s1, -1.0, ref a, i1, j1+s1, optype, ref x, i2, j2, 0, 1.0, ref x, i2+s1, j2);
-                    rmatrixlefttrsm(s2, n, ref a, i1+s1, j1+s1, isupper, isunit, optype, ref x, i2+s1, j2);
-                    return;
-                }
-                if( !isupper & optype==0 )
-                {
-                    
-                    //
-                    //          (A1     )-1 ( X1 )
-                    // A^-1*X = (       )  *(    )
-                    //          (A21  A2)   ( X2 )
-                    //
-                    rmatrixlefttrsm(s1, n, ref a, i1, j1, isupper, isunit, optype, ref x, i2, j2);
-                    rmatrixgemm(s2, n, s1, -1.0, ref a, i1+s1, j1, 0, ref x, i2, j2, 0, 1.0, ref x, i2+s1, j2);
-                    rmatrixlefttrsm(s2, n, ref a, i1+s1, j1+s1, isupper, isunit, optype, ref x, i2+s1, j2);
-                    return;
-                }
-                if( !isupper & optype!=0 )
-                {
-                    
-                    //
-                    //          (A1' A21')-1 ( X1 )
-                    // A^-1*X = (        )  *(    )
-                    //          (     A2')   ( X2 )
-                    //
-                    rmatrixlefttrsm(s2, n, ref a, i1+s1, j1+s1, isupper, isunit, optype, ref x, i2+s1, j2);
-                    rmatrixgemm(s1, n, s2, -1.0, ref a, i1+s1, j1, optype, ref x, i2+s1, j2, 0, 1.0, ref x, i2, j2);
-                    rmatrixlefttrsm(s1, n, ref a, i1, j1, isupper, isunit, optype, ref x, i2, j2);
-                    return;
-                }
-            }
-        }
-
-
-        /*************************************************************************
-        This subroutine calculates  C=alpha*A*A^H+beta*C  or  C=alpha*A^H*A+beta*C
-        where:
-        * C is NxN Hermitian matrix given by its upper/lower triangle
-        * A is NxK matrix when A*A^H is calculated, KxN matrix otherwise
-
-        Additional info:
-        * cache-oblivious algorithm is used.
-        * multiplication result replaces C. If Beta=0, C elements are not used in
-          calculations (not multiplied by zero - just not referenced)
-        * if Alpha=0, A is not used (not multiplied by zero - just not referenced)
-        * if both Beta and Alpha are zero, C is filled by zeros.
-
-        INPUT PARAMETERS
-            N       -   matrix size, N>=0
-            K       -   matrix size, K>=0
-            Alpha   -   coefficient
-            A       -   matrix
-            IA      -   submatrix offset
-            JA      -   submatrix offset
-            OpTypeA -   multiplication type:
-                        * 0 - A*A^H is calculated
-                        * 2 - A^H*A is calculated
-            Beta    -   coefficient
-            C       -   matrix
-            IC      -   submatrix offset
-            JC      -   submatrix offset
-            IsUpper -   whether C is upper triangular or lower triangular
-
-          -- ALGLIB routine --
-             16.12.2009
-             Bochkanov Sergey
-        *************************************************************************/
-        public static void cmatrixsyrk(int n,
-            int k,
-            double alpha,
-            ref AP.Complex[,] a,
-            int ia,
-            int ja,
-            int optypea,
-            double beta,
-            ref AP.Complex[,] c,
-            int ic,
-            int jc,
-            bool isupper)
-        {
-            int s1 = 0;
-            int s2 = 0;
-            int bs = 0;
-
-            bs = ablascomplexblocksize(ref a);
-            if( n<=bs & k<=bs )
-            {
-                cmatrixsyrk2(n, k, alpha, ref a, ia, ja, optypea, beta, ref c, ic, jc, isupper);
-                return;
-            }
-            if( k>=n )
-            {
-                
-                //
-                // Split K
-                //
-                ablascomplexsplitlength(ref a, k, ref s1, ref s2);
-                if( optypea==0 )
-                {
-                    cmatrixsyrk(n, s1, alpha, ref a, ia, ja, optypea, beta, ref c, ic, jc, isupper);
-                    cmatrixsyrk(n, s2, alpha, ref a, ia, ja+s1, optypea, 1.0, ref c, ic, jc, isupper);
-                }
-                else
-                {
-                    cmatrixsyrk(n, s1, alpha, ref a, ia, ja, optypea, beta, ref c, ic, jc, isupper);
-                    cmatrixsyrk(n, s2, alpha, ref a, ia+s1, ja, optypea, 1.0, ref c, ic, jc, isupper);
-                }
-            }
-            else
-            {
-                
-                //
-                // Split N
-                //
-                ablascomplexsplitlength(ref a, n, ref s1, ref s2);
-                if( optypea==0 & isupper )
-                {
-                    cmatrixsyrk(s1, k, alpha, ref a, ia, ja, optypea, beta, ref c, ic, jc, isupper);
-                    cmatrixgemm(s1, s2, k, alpha, ref a, ia, ja, 0, ref a, ia+s1, ja, 2, beta, ref c, ic, jc+s1);
-                    cmatrixsyrk(s2, k, alpha, ref a, ia+s1, ja, optypea, beta, ref c, ic+s1, jc+s1, isupper);
-                    return;
-                }
-                if( optypea==0 & !isupper )
-                {
-                    cmatrixsyrk(s1, k, alpha, ref a, ia, ja, optypea, beta, ref c, ic, jc, isupper);
-                    cmatrixgemm(s2, s1, k, alpha, ref a, ia+s1, ja, 0, ref a, ia, ja, 2, beta, ref c, ic+s1, jc);
-                    cmatrixsyrk(s2, k, alpha, ref a, ia+s1, ja, optypea, beta, ref c, ic+s1, jc+s1, isupper);
-                    return;
-                }
-                if( optypea!=0 & isupper )
-                {
-                    cmatrixsyrk(s1, k, alpha, ref a, ia, ja, optypea, beta, ref c, ic, jc, isupper);
-                    cmatrixgemm(s1, s2, k, alpha, ref a, ia, ja, 2, ref a, ia, ja+s1, 0, beta, ref c, ic, jc+s1);
-                    cmatrixsyrk(s2, k, alpha, ref a, ia, ja+s1, optypea, beta, ref c, ic+s1, jc+s1, isupper);
-                    return;
-                }
-                if( optypea!=0 & !isupper )
-                {
-                    cmatrixsyrk(s1, k, alpha, ref a, ia, ja, optypea, beta, ref c, ic, jc, isupper);
-                    cmatrixgemm(s2, s1, k, alpha, ref a, ia, ja+s1, 2, ref a, ia, ja, 0, beta, ref c, ic+s1, jc);
-                    cmatrixsyrk(s2, k, alpha, ref a, ia, ja+s1, optypea, beta, ref c, ic+s1, jc+s1, isupper);
-                    return;
-                }
-            }
-        }
-
-
-        /*************************************************************************
-        Same as CMatrixSYRK, but for real matrices
-
-        OpType may be only 0 or 1.
-
-          -- ALGLIB routine --
-             16.12.2009
-             Bochkanov Sergey
-        *************************************************************************/
-        public static void rmatrixsyrk(int n,
-            int k,
-            double alpha,
-            ref double[,] a,
-            int ia,
-            int ja,
-            int optypea,
-            double beta,
-            ref double[,] c,
-            int ic,
-            int jc,
-            bool isupper)
-        {
-            int s1 = 0;
-            int s2 = 0;
-            int bs = 0;
-
-            bs = ablasblocksize(ref a);
-            if( n<=bs & k<=bs )
-            {
-                rmatrixsyrk2(n, k, alpha, ref a, ia, ja, optypea, beta, ref c, ic, jc, isupper);
-                return;
-            }
-            if( k>=n )
-            {
-                
-                //
-                // Split K
-                //
-                ablassplitlength(ref a, k, ref s1, ref s2);
-                if( optypea==0 )
-                {
-                    rmatrixsyrk(n, s1, alpha, ref a, ia, ja, optypea, beta, ref c, ic, jc, isupper);
-                    rmatrixsyrk(n, s2, alpha, ref a, ia, ja+s1, optypea, 1.0, ref c, ic, jc, isupper);
-                }
-                else
-                {
-                    rmatrixsyrk(n, s1, alpha, ref a, ia, ja, optypea, beta, ref c, ic, jc, isupper);
-                    rmatrixsyrk(n, s2, alpha, ref a, ia+s1, ja, optypea, 1.0, ref c, ic, jc, isupper);
-                }
-            }
-            else
-            {
-                
-                //
-                // Split N
-                //
-                ablassplitlength(ref a, n, ref s1, ref s2);
-                if( optypea==0 & isupper )
-                {
-                    rmatrixsyrk(s1, k, alpha, ref a, ia, ja, optypea, beta, ref c, ic, jc, isupper);
-                    rmatrixgemm(s1, s2, k, alpha, ref a, ia, ja, 0, ref a, ia+s1, ja, 1, beta, ref c, ic, jc+s1);
-                    rmatrixsyrk(s2, k, alpha, ref a, ia+s1, ja, optypea, beta, ref c, ic+s1, jc+s1, isupper);
-                    return;
-                }
-                if( optypea==0 & !isupper )
-                {
-                    rmatrixsyrk(s1, k, alpha, ref a, ia, ja, optypea, beta, ref c, ic, jc, isupper);
-                    rmatrixgemm(s2, s1, k, alpha, ref a, ia+s1, ja, 0, ref a, ia, ja, 1, beta, ref c, ic+s1, jc);
-                    rmatrixsyrk(s2, k, alpha, ref a, ia+s1, ja, optypea, beta, ref c, ic+s1, jc+s1, isupper);
-                    return;
-                }
-                if( optypea!=0 & isupper )
-                {
-                    rmatrixsyrk(s1, k, alpha, ref a, ia, ja, optypea, beta, ref c, ic, jc, isupper);
-                    rmatrixgemm(s1, s2, k, alpha, ref a, ia, ja, 1, ref a, ia, ja+s1, 0, beta, ref c, ic, jc+s1);
-                    rmatrixsyrk(s2, k, alpha, ref a, ia, ja+s1, optypea, beta, ref c, ic+s1, jc+s1, isupper);
-                    return;
-                }
-                if( optypea!=0 & !isupper )
-                {
-                    rmatrixsyrk(s1, k, alpha, ref a, ia, ja, optypea, beta, ref c, ic, jc, isupper);
-                    rmatrixgemm(s2, s1, k, alpha, ref a, ia, ja+s1, 1, ref a, ia, ja, 0, beta, ref c, ic+s1, jc);
-                    rmatrixsyrk(s2, k, alpha, ref a, ia, ja+s1, optypea, beta, ref c, ic+s1, jc+s1, isupper);
-                    return;
-                }
-            }
-        }
-
-
-        /*************************************************************************
-        This subroutine calculates C = alpha*op1(A)*op2(B) +beta*C where:
-        * C is MxN general matrix
-        * op1(A) is MxK matrix
-        * op2(B) is KxN matrix
-        * "op" may be identity transformation, transposition, conjugate transposition
-
-        Additional info:
-        * cache-oblivious algorithm is used.
-        * multiplication result replaces C. If Beta=0, C elements are not used in
-          calculations (not multiplied by zero - just not referenced)
-        * if Alpha=0, A is not used (not multiplied by zero - just not referenced)
-        * if both Beta and Alpha are zero, C is filled by zeros.
-
-        INPUT PARAMETERS
-            N       -   matrix size, N>0
-            M       -   matrix size, N>0
-            K       -   matrix size, K>0
-            Alpha   -   coefficient
-            A       -   matrix
-            IA      -   submatrix offset
-            JA      -   submatrix offset
-            OpTypeA -   transformation type:
-                        * 0 - no transformation
-                        * 1 - transposition
-                        * 2 - conjugate transposition
-            B       -   matrix
-            IB      -   submatrix offset
-            JB      -   submatrix offset
-            OpTypeB -   transformation type:
-                        * 0 - no transformation
-                        * 1 - transposition
-                        * 2 - conjugate transposition
-            Beta    -   coefficient
-            C       -   matrix
-            IC      -   submatrix offset
-            JC      -   submatrix offset
-
-          -- ALGLIB routine --
-             16.12.2009
-             Bochkanov Sergey
-        *************************************************************************/
-        public static void cmatrixgemm(int m,
-            int n,
-            int k,
-            AP.Complex alpha,
-            ref AP.Complex[,] a,
-            int ia,
-            int ja,
-            int optypea,
-            ref AP.Complex[,] b,
-            int ib,
-            int jb,
-            int optypeb,
-            AP.Complex beta,
-            ref AP.Complex[,] c,
-            int ic,
-            int jc)
-        {
-            int s1 = 0;
-            int s2 = 0;
-            int bs = 0;
-
-            bs = ablascomplexblocksize(ref a);
-            if( m<=bs & n<=bs & k<=bs )
-            {
-                cmatrixgemmk(m, n, k, alpha, ref a, ia, ja, optypea, ref b, ib, jb, optypeb, beta, ref c, ic, jc);
-                return;
-            }
-            if( m>=n & m>=k )
-            {
-                
-                //
-                // A*B = (A1 A2)^T*B
-                //
-                ablascomplexsplitlength(ref a, m, ref s1, ref s2);
-                cmatrixgemm(s1, n, k, alpha, ref a, ia, ja, optypea, ref b, ib, jb, optypeb, beta, ref c, ic, jc);
-                if( optypea==0 )
-                {
-                    cmatrixgemm(s2, n, k, alpha, ref a, ia+s1, ja, optypea, ref b, ib, jb, optypeb, beta, ref c, ic+s1, jc);
-                }
-                else
-                {
-                    cmatrixgemm(s2, n, k, alpha, ref a, ia, ja+s1, optypea, ref b, ib, jb, optypeb, beta, ref c, ic+s1, jc);
-                }
-                return;
-            }
-            if( n>=m & n>=k )
-            {
-                
-                //
-                // A*B = A*(B1 B2)
-                //
-                ablascomplexsplitlength(ref a, n, ref s1, ref s2);
-                if( optypeb==0 )
-                {
-                    cmatrixgemm(m, s1, k, alpha, ref a, ia, ja, optypea, ref b, ib, jb, optypeb, beta, ref c, ic, jc);
-                    cmatrixgemm(m, s2, k, alpha, ref a, ia, ja, optypea, ref b, ib, jb+s1, optypeb, beta, ref c, ic, jc+s1);
-                }
-                else
-                {
-                    cmatrixgemm(m, s1, k, alpha, ref a, ia, ja, optypea, ref b, ib, jb, optypeb, beta, ref c, ic, jc);
-                    cmatrixgemm(m, s2, k, alpha, ref a, ia, ja, optypea, ref b, ib+s1, jb, optypeb, beta, ref c, ic, jc+s1);
-                }
-                return;
-            }
-            if( k>=m & k>=n )
-            {
-                
-                //
-                // A*B = (A1 A2)*(B1 B2)^T
-                //
-                ablascomplexsplitlength(ref a, k, ref s1, ref s2);
-                if( optypea==0 & optypeb==0 )
-                {
-                    cmatrixgemm(m, n, s1, alpha, ref a, ia, ja, optypea, ref b, ib, jb, optypeb, beta, ref c, ic, jc);
-                    cmatrixgemm(m, n, s2, alpha, ref a, ia, ja+s1, optypea, ref b, ib+s1, jb, optypeb, 1.0, ref c, ic, jc);
-                }
-                if( optypea==0 & optypeb!=0 )
-                {
-                    cmatrixgemm(m, n, s1, alpha, ref a, ia, ja, optypea, ref b, ib, jb, optypeb, beta, ref c, ic, jc);
-                    cmatrixgemm(m, n, s2, alpha, ref a, ia, ja+s1, optypea, ref b, ib, jb+s1, optypeb, 1.0, ref c, ic, jc);
-                }
-                if( optypea!=0 & optypeb==0 )
-                {
-                    cmatrixgemm(m, n, s1, alpha, ref a, ia, ja, optypea, ref b, ib, jb, optypeb, beta, ref c, ic, jc);
-                    cmatrixgemm(m, n, s2, alpha, ref a, ia+s1, ja, optypea, ref b, ib+s1, jb, optypeb, 1.0, ref c, ic, jc);
-                }
-                if( optypea!=0 & optypeb!=0 )
-                {
-                    cmatrixgemm(m, n, s1, alpha, ref a, ia, ja, optypea, ref b, ib, jb, optypeb, beta, ref c, ic, jc);
-                    cmatrixgemm(m, n, s2, alpha, ref a, ia+s1, ja, optypea, ref b, ib, jb+s1, optypeb, 1.0, ref c, ic, jc);
-                }
-                return;
-            }
-        }
-
-
-        /*************************************************************************
-        Same as CMatrixGEMM, but for real numbers.
-        OpType may be only 0 or 1.
-
-          -- ALGLIB routine --
-             16.12.2009
-             Bochkanov Sergey
-        *************************************************************************/
-        public static void rmatrixgemm(int m,
-            int n,
-            int k,
-            double alpha,
-            ref double[,] a,
-            int ia,
-            int ja,
-            int optypea,
-            ref double[,] b,
-            int ib,
-            int jb,
-            int optypeb,
-            double beta,
-            ref double[,] c,
-            int ic,
-            int jc)
-        {
-            int s1 = 0;
-            int s2 = 0;
-            int bs = 0;
-
-            bs = ablasblocksize(ref a);
-            if( m<=bs & n<=bs & k<=bs )
-            {
-                rmatrixgemmk(m, n, k, alpha, ref a, ia, ja, optypea, ref b, ib, jb, optypeb, beta, ref c, ic, jc);
-                return;
-            }
-            if( m>=n & m>=k )
-            {
-                
-                //
-                // A*B = (A1 A2)^T*B
-                //
-                ablassplitlength(ref a, m, ref s1, ref s2);
-                if( optypea==0 )
-                {
-                    rmatrixgemm(s1, n, k, alpha, ref a, ia, ja, optypea, ref b, ib, jb, optypeb, beta, ref c, ic, jc);
-                    rmatrixgemm(s2, n, k, alpha, ref a, ia+s1, ja, optypea, ref b, ib, jb, optypeb, beta, ref c, ic+s1, jc);
-                }
-                else
-                {
-                    rmatrixgemm(s1, n, k, alpha, ref a, ia, ja, optypea, ref b, ib, jb, optypeb, beta, ref c, ic, jc);
-                    rmatrixgemm(s2, n, k, alpha, ref a, ia, ja+s1, optypea, ref b, ib, jb, optypeb, beta, ref c, ic+s1, jc);
-                }
-                return;
-            }
-            if( n>=m & n>=k )
-            {
-                
-                //
-                // A*B = A*(B1 B2)
-                //
-                ablassplitlength(ref a, n, ref s1, ref s2);
-                if( optypeb==0 )
-                {
-                    rmatrixgemm(m, s1, k, alpha, ref a, ia, ja, optypea, ref b, ib, jb, optypeb, beta, ref c, ic, jc);
-                    rmatrixgemm(m, s2, k, alpha, ref a, ia, ja, optypea, ref b, ib, jb+s1, optypeb, beta, ref c, ic, jc+s1);
-                }
-                else
-                {
-                    rmatrixgemm(m, s1, k, alpha, ref a, ia, ja, optypea, ref b, ib, jb, optypeb, beta, ref c, ic, jc);
-                    rmatrixgemm(m, s2, k, alpha, ref a, ia, ja, optypea, ref b, ib+s1, jb, optypeb, beta, ref c, ic, jc+s1);
-                }
-                return;
-            }
-            if( k>=m & k>=n )
-            {
-                
-                //
-                // A*B = (A1 A2)*(B1 B2)^T
-                //
-                ablassplitlength(ref a, k, ref s1, ref s2);
-                if( optypea==0 & optypeb==0 )
-                {
-                    rmatrixgemm(m, n, s1, alpha, ref a, ia, ja, optypea, ref b, ib, jb, optypeb, beta, ref c, ic, jc);
-                    rmatrixgemm(m, n, s2, alpha, ref a, ia, ja+s1, optypea, ref b, ib+s1, jb, optypeb, 1.0, ref c, ic, jc);
-                }
-                if( optypea==0 & optypeb!=0 )
-                {
-                    rmatrixgemm(m, n, s1, alpha, ref a, ia, ja, optypea, ref b, ib, jb, optypeb, beta, ref c, ic, jc);
-                    rmatrixgemm(m, n, s2, alpha, ref a, ia, ja+s1, optypea, ref b, ib, jb+s1, optypeb, 1.0, ref c, ic, jc);
-                }
-                if( optypea!=0 & optypeb==0 )
-                {
-                    rmatrixgemm(m, n, s1, alpha, ref a, ia, ja, optypea, ref b, ib, jb, optypeb, beta, ref c, ic, jc);
-                    rmatrixgemm(m, n, s2, alpha, ref a, ia+s1, ja, optypea, ref b, ib+s1, jb, optypeb, 1.0, ref c, ic, jc);
-                }
-                if( optypea!=0 & optypeb!=0 )
-                {
-                    rmatrixgemm(m, n, s1, alpha, ref a, ia, ja, optypea, ref b, ib, jb, optypeb, beta, ref c, ic, jc);
-                    rmatrixgemm(m, n, s2, alpha, ref a, ia+s1, ja, optypea, ref b, ib, jb+s1, optypeb, 1.0, ref c, ic, jc);
-                }
-                return;
-            }
-        }
-
-
-        /*************************************************************************
-        Complex ABLASSplitLength
-
-          -- ALGLIB routine --
-             15.12.2009
-             Bochkanov Sergey
-        *************************************************************************/
-        private static void ablasinternalsplitlength(int n,
-            int nb,
-            ref int n1,
-            ref int n2)
-        {
-            int r = 0;
-
-            if( n<=nb )
-            {
-                
-                //
-                // Block size, no further splitting
-                //
-                n1 = n;
-                n2 = 0;
-            }
-            else
-            {
-                
-                //
-                // Greater than block size
-                //
-                if( n%nb!=0 )
-                {
-                    
-                    //
-                    // Split remainder
-                    //
-                    n2 = n%nb;
-                    n1 = n-n2;
-                }
-                else
-                {
-                    
-                    //
-                    // Split on block boundaries
-                    //
-                    n2 = n/2;
-                    n1 = n-n2;
-                    if( n1%nb==0 )
-                    {
-                        return;
-                    }
-                    r = nb-n1%nb;
-                    n1 = n1+r;
-                    n2 = n2-r;
-                }
-            }
-        }
-
-
-        /*************************************************************************
-        Level 2 variant of CMatrixRightTRSM
-        *************************************************************************/
-        private static void cmatrixrighttrsm2(int m,
-            int n,
-            ref AP.Complex[,] a,
-            int i1,
-            int j1,
-            bool isupper,
-            bool isunit,
-            int optype,
-            ref AP.Complex[,] x,
-            int i2,
-            int j2)
-        {
-            int i = 0;
-            int j = 0;
-            AP.Complex vc = 0;
-            AP.Complex vd = 0;
-            int i_ = 0;
-            int i1_ = 0;
-
-            
-            //
-            // Special case
-            //
-            if( n*m==0 )
-            {
-                return;
-            }
-            
-            //
-            // Try to call fast TRSM
-            //
-            if( ablasf.cmatrixrighttrsmf(m, n, ref a, i1, j1, isupper, isunit, optype, ref x, i2, j2) )
-            {
-                return;
-            }
-            
-            //
-            // General case
-            //
-            if( isupper )
-            {
-                
-                //
-                // Upper triangular matrix
-                //
-                if( optype==0 )
-                {
-                    
-                    //
-                    // X*A^(-1)
-                    //
-                    for(i=0; i<=m-1; i++)
-                    {
-                        for(j=0; j<=n-1; j++)
-                        {
-                            if( isunit )
-                            {
-                                vd = 1;
-                            }
-                            else
-                            {
-                                vd = a[i1+j,j1+j];
-                            }
-                            x[i2+i,j2+j] = x[i2+i,j2+j]/vd;
-                            if( j<n-1 )
-                            {
-                                vc = x[i2+i,j2+j];
-                                i1_ = (j1+j+1) - (j2+j+1);
-                                for(i_=j2+j+1; i_<=j2+n-1;i_++)
-                                {
-                                    x[i2+i,i_] = x[i2+i,i_] - vc*a[i1+j,i_+i1_];
-                                }
-                            }
-                        }
-                    }
-                    return;
-                }
-                if( optype==1 )
-                {
-                    
-                    //
-                    // X*A^(-T)
-                    //
-                    for(i=0; i<=m-1; i++)
-                    {
-                        for(j=n-1; j>=0; j--)
-                        {
-                            vc = 0;
-                            vd = 1;
-                            if( j<n-1 )
-                            {
-                                i1_ = (j1+j+1)-(j2+j+1);
-                                vc = 0.0;
-                                for(i_=j2+j+1; i_<=j2+n-1;i_++)
-                                {
-                                    vc += x[i2+i,i_]*a[i1+j,i_+i1_];
-                                }
-                            }
-                            if( !isunit )
-                            {
-                                vd = a[i1+j,j1+j];
-                            }
-                            x[i2+i,j2+j] = (x[i2+i,j2+j]-vc)/vd;
-                        }
-                    }
-                    return;
-                }
-                if( optype==2 )
-                {
-                    
-                    //
-                    // X*A^(-H)
-                    //
-                    for(i=0; i<=m-1; i++)
-                    {
-                        for(j=n-1; j>=0; j--)
-                        {
-                            vc = 0;
-                            vd = 1;
-                            if( j<n-1 )
-                            {
-                                i1_ = (j1+j+1)-(j2+j+1);
-                                vc = 0.0;
-                                for(i_=j2+j+1; i_<=j2+n-1;i_++)
-                                {
-                                    vc += x[i2+i,i_]*AP.Math.Conj(a[i1+j,i_+i1_]);
-                                }
-                            }
-                            if( !isunit )
-                            {
-                                vd = AP.Math.Conj(a[i1+j,j1+j]);
-                            }
-                            x[i2+i,j2+j] = (x[i2+i,j2+j]-vc)/vd;
-                        }
-                    }
-                    return;
-                }
-            }
-            else
-            {
-                
-                //
-                // Lower triangular matrix
-                //
-                if( optype==0 )
-                {
-                    
-                    //
-                    // X*A^(-1)
-                    //
-                    for(i=0; i<=m-1; i++)
-                    {
-                        for(j=n-1; j>=0; j--)
-                        {
-                            if( isunit )
-                            {
-                                vd = 1;
-                            }
-                            else
-                            {
-                                vd = a[i1+j,j1+j];
-                            }
-                            x[i2+i,j2+j] = x[i2+i,j2+j]/vd;
-                            if( j>0 )
-                            {
-                                vc = x[i2+i,j2+j];
-                                i1_ = (j1) - (j2);
-                                for(i_=j2; i_<=j2+j-1;i_++)
-                                {
-                                    x[i2+i,i_] = x[i2+i,i_] - vc*a[i1+j,i_+i1_];
-                                }
-                            }
-                        }
-                    }
-                    return;
-                }
-                if( optype==1 )
-                {
-                    
-                    //
-                    // X*A^(-T)
-                    //
-                    for(i=0; i<=m-1; i++)
-                    {
-                        for(j=0; j<=n-1; j++)
-                        {
-                            vc = 0;
-                            vd = 1;
-                            if( j>0 )
-                            {
-                                i1_ = (j1)-(j2);
-                                vc = 0.0;
-                                for(i_=j2; i_<=j2+j-1;i_++)
-                                {
-                                    vc += x[i2+i,i_]*a[i1+j,i_+i1_];
-                                }
-                            }
-                            if( !isunit )
-                            {
-                                vd = a[i1+j,j1+j];
-                            }
-                            x[i2+i,j2+j] = (x[i2+i,j2+j]-vc)/vd;
-                        }
-                    }
-                    return;
-                }
-                if( optype==2 )
-                {
-                    
-                    //
-                    // X*A^(-H)
-                    //
-                    for(i=0; i<=m-1; i++)
-                    {
-                        for(j=0; j<=n-1; j++)
-                        {
-                            vc = 0;
-                            vd = 1;
-                            if( j>0 )
-                            {
-                                i1_ = (j1)-(j2);
-                                vc = 0.0;
-                                for(i_=j2; i_<=j2+j-1;i_++)
-                                {
-                                    vc += x[i2+i,i_]*AP.Math.Conj(a[i1+j,i_+i1_]);
-                                }
-                            }
-                            if( !isunit )
-                            {
-                                vd = AP.Math.Conj(a[i1+j,j1+j]);
-                            }
-                            x[i2+i,j2+j] = (x[i2+i,j2+j]-vc)/vd;
-                        }
-                    }
-                    return;
-                }
-            }
-        }
-
-
-        /*************************************************************************
-        Level-2 subroutine
-        *************************************************************************/
-        private static void cmatrixlefttrsm2(int m,
-            int n,
-            ref AP.Complex[,] a,
-            int i1,
-            int j1,
-            bool isupper,
-            bool isunit,
-            int optype,
-            ref AP.Complex[,] x,
-            int i2,
-            int j2)
-        {
-            int i = 0;
-            int j = 0;
-            AP.Complex vc = 0;
-            AP.Complex vd = 0;
-            int i_ = 0;
-
-            
-            //
-            // Special case
-            //
-            if( n*m==0 )
-            {
-                return;
-            }
-            
-            //
-            // Try to call fast TRSM
-            //
-            if( ablasf.cmatrixlefttrsmf(m, n, ref a, i1, j1, isupper, isunit, optype, ref x, i2, j2) )
-            {
-                return;
-            }
-            
-            //
-            // General case
-            //
-            if( isupper )
-            {
-                
-                //
-                // Upper triangular matrix
-                //
-                if( optype==0 )
-                {
-                    
-                    //
-                    // A^(-1)*X
-                    //
-                    for(i=m-1; i>=0; i--)
-                    {
-                        for(j=i+1; j<=m-1; j++)
-                        {
-                            vc = a[i1+i,j1+j];
-                            for(i_=j2; i_<=j2+n-1;i_++)
-                            {
-                                x[i2+i,i_] = x[i2+i,i_] - vc*x[i2+j,i_];
-                            }
-                        }
-                        if( !isunit )
-                        {
-                            vd = 1/a[i1+i,j1+i];
-                            for(i_=j2; i_<=j2+n-1;i_++)
-                            {
-                                x[i2+i,i_] = vd*x[i2+i,i_];
-                            }
-                        }
-                    }
-                    return;
-                }
-                if( optype==1 )
-                {
-                    
-                    //
-                    // A^(-T)*X
-                    //
-                    for(i=0; i<=m-1; i++)
-                    {
-                        if( isunit )
-                        {
-                            vd = 1;
-                        }
-                        else
-                        {
-                            vd = 1/a[i1+i,j1+i];
-                        }
-                        for(i_=j2; i_<=j2+n-1;i_++)
-                        {
-                            x[i2+i,i_] = vd*x[i2+i,i_];
-                        }
-                        for(j=i+1; j<=m-1; j++)
-                        {
-                            vc = a[i1+i,j1+j];
-                            for(i_=j2; i_<=j2+n-1;i_++)
-                            {
-                                x[i2+j,i_] = x[i2+j,i_] - vc*x[i2+i,i_];
-                            }
-                        }
-                    }
-                    return;
-                }
-                if( optype==2 )
-                {
-                    
-                    //
-                    // A^(-H)*X
-                    //
-                    for(i=0; i<=m-1; i++)
-                    {
-                        if( isunit )
-                        {
-                            vd = 1;
-                        }
-                        else
-                        {
-                            vd = 1/AP.Math.Conj(a[i1+i,j1+i]);
-                        }
-                        for(i_=j2; i_<=j2+n-1;i_++)
-                        {
-                            x[i2+i,i_] = vd*x[i2+i,i_];
-                        }
-                        for(j=i+1; j<=m-1; j++)
-                        {
-                            vc = AP.Math.Conj(a[i1+i,j1+j]);
-                            for(i_=j2; i_<=j2+n-1;i_++)
-                            {
-                                x[i2+j,i_] = x[i2+j,i_] - vc*x[i2+i,i_];
-                            }
-                        }
-                    }
-                    return;
-                }
-            }
-            else
-            {
-                
-                //
-                // Lower triangular matrix
-                //
-                if( optype==0 )
-                {
-                    
-                    //
-                    // A^(-1)*X
-                    //
-                    for(i=0; i<=m-1; i++)
-                    {
-                        for(j=0; j<=i-1; j++)
-                        {
-                            vc = a[i1+i,j1+j];
-                            for(i_=j2; i_<=j2+n-1;i_++)
-                            {
-                                x[i2+i,i_] = x[i2+i,i_] - vc*x[i2+j,i_];
-                            }
-                        }
-                        if( isunit )
-                        {
-                            vd = 1;
-                        }
-                        else
-                        {
-                            vd = 1/a[i1+j,j1+j];
-                        }
-                        for(i_=j2; i_<=j2+n-1;i_++)
-                        {
-                            x[i2+i,i_] = vd*x[i2+i,i_];
-                        }
-                    }
-                    return;
-                }
-                if( optype==1 )
-                {
-                    
-                    //
-                    // A^(-T)*X
-                    //
-                    for(i=m-1; i>=0; i--)
-                    {
-                        if( isunit )
-                        {
-                            vd = 1;
-                        }
-                        else
-                        {
-                            vd = 1/a[i1+i,j1+i];
-                        }
-                        for(i_=j2; i_<=j2+n-1;i_++)
-                        {
-                            x[i2+i,i_] = vd*x[i2+i,i_];
-                        }
-                        for(j=i-1; j>=0; j--)
-                        {
-                            vc = a[i1+i,j1+j];
-                            for(i_=j2; i_<=j2+n-1;i_++)
-                            {
-                                x[i2+j,i_] = x[i2+j,i_] - vc*x[i2+i,i_];
-                            }
-                        }
-                    }
-                    return;
-                }
-                if( optype==2 )
-                {
-                    
-                    //
-                    // A^(-H)*X
-                    //
-                    for(i=m-1; i>=0; i--)
-                    {
-                        if( isunit )
-                        {
-                            vd = 1;
-                        }
-                        else
-                        {
-                            vd = 1/AP.Math.Conj(a[i1+i,j1+i]);
-                        }
-                        for(i_=j2; i_<=j2+n-1;i_++)
-                        {
-                            x[i2+i,i_] = vd*x[i2+i,i_];
-                        }
-                        for(j=i-1; j>=0; j--)
-                        {
-                            vc = AP.Math.Conj(a[i1+i,j1+j]);
-                            for(i_=j2; i_<=j2+n-1;i_++)
-                            {
-                                x[i2+j,i_] = x[i2+j,i_] - vc*x[i2+i,i_];
-                            }
-                        }
-                    }
-                    return;
-                }
-            }
-        }
-
-
-        /*************************************************************************
-        Level 2 subroutine
-
-          -- ALGLIB routine --
-             15.12.2009
-             Bochkanov Sergey
-        *************************************************************************/
-        private static void rmatrixrighttrsm2(int m,
-            int n,
-            ref double[,] a,
-            int i1,
-            int j1,
-            bool isupper,
-            bool isunit,
-            int optype,
-            ref double[,] x,
-            int i2,
-            int j2)
-        {
-            int i = 0;
-            int j = 0;
-            double vr = 0;
-            double vd = 0;
-            int i_ = 0;
-            int i1_ = 0;
-
-            
-            //
-            // Special case
-            //
-            if( n*m==0 )
-            {
-                return;
-            }
-            
-            //
-            // Try to use "fast" code
-            //
-            if( ablasf.rmatrixrighttrsmf(m, n, ref a, i1, j1, isupper, isunit, optype, ref x, i2, j2) )
-            {
-                return;
-            }
-            
-            //
-            // General case
-            //
-            if( isupper )
-            {
-                
-                //
-                // Upper triangular matrix
-                //
-                if( optype==0 )
-                {
-                    
-                    //
-                    // X*A^(-1)
-                    //
-                    for(i=0; i<=m-1; i++)
-                    {
-                        for(j=0; j<=n-1; j++)
-                        {
-                            if( isunit )
-                            {
-                                vd = 1;
-                            }
-                            else
-                            {
-                                vd = a[i1+j,j1+j];
-                            }
-                            x[i2+i,j2+j] = x[i2+i,j2+j]/vd;
-                            if( j<n-1 )
-                            {
-                                vr = x[i2+i,j2+j];
-                                i1_ = (j1+j+1) - (j2+j+1);
-                                for(i_=j2+j+1; i_<=j2+n-1;i_++)
-                                {
-                                    x[i2+i,i_] = x[i2+i,i_] - vr*a[i1+j,i_+i1_];
-                                }
-                            }
-                        }
-                    }
-                    return;
-                }
-                if( optype==1 )
-                {
-                    
-                    //
-                    // X*A^(-T)
-                    //
-                    for(i=0; i<=m-1; i++)
-                    {
-                        for(j=n-1; j>=0; j--)
-                        {
-                            vr = 0;
-                            vd = 1;
-                            if( j<n-1 )
-                            {
-                                i1_ = (j1+j+1)-(j2+j+1);
-                                vr = 0.0;
-                                for(i_=j2+j+1; i_<=j2+n-1;i_++)
-                                {
-                                    vr += x[i2+i,i_]*a[i1+j,i_+i1_];
-                                }
-                            }
-                            if( !isunit )
-                            {
-                                vd = a[i1+j,j1+j];
-                            }
-                            x[i2+i,j2+j] = (x[i2+i,j2+j]-vr)/vd;
-                        }
-                    }
-                    return;
-                }
-            }
-            else
-            {
-                
-                //
-                // Lower triangular matrix
-                //
-                if( optype==0 )
-                {
-                    
-                    //
-                    // X*A^(-1)
-                    //
-                    for(i=0; i<=m-1; i++)
-                    {
-                        for(j=n-1; j>=0; j--)
-                        {
-                            if( isunit )
-                            {
-                                vd = 1;
-                            }
-                            else
-                            {
-                                vd = a[i1+j,j1+j];
-                            }
-                            x[i2+i,j2+j] = x[i2+i,j2+j]/vd;
-                            if( j>0 )
-                            {
-                                vr = x[i2+i,j2+j];
-                                i1_ = (j1) - (j2);
-                                for(i_=j2; i_<=j2+j-1;i_++)
-                                {
-                                    x[i2+i,i_] = x[i2+i,i_] - vr*a[i1+j,i_+i1_];
-                                }
-                            }
-                        }
-                    }
-                    return;
-                }
-                if( optype==1 )
-                {
-                    
-                    //
-                    // X*A^(-T)
-                    //
-                    for(i=0; i<=m-1; i++)
-                    {
-                        for(j=0; j<=n-1; j++)
-                        {
-                            vr = 0;
-                            vd = 1;
-                            if( j>0 )
-                            {
-                                i1_ = (j1)-(j2);
-                                vr = 0.0;
-                                for(i_=j2; i_<=j2+j-1;i_++)
-                                {
-                                    vr += x[i2+i,i_]*a[i1+j,i_+i1_];
-                                }
-                            }
-                            if( !isunit )
-                            {
-                                vd = a[i1+j,j1+j];
-                            }
-                            x[i2+i,j2+j] = (x[i2+i,j2+j]-vr)/vd;
-                        }
-                    }
-                    return;
-                }
-            }
-        }
-
-
-        /*************************************************************************
-        Level 2 subroutine
-        *************************************************************************/
-        private static void rmatrixlefttrsm2(int m,
-            int n,
-            ref double[,] a,
-            int i1,
-            int j1,
-            bool isupper,
-            bool isunit,
-            int optype,
-            ref double[,] x,
-            int i2,
-            int j2)
-        {
-            int i = 0;
-            int j = 0;
-            double vr = 0;
-            double vd = 0;
-            int i_ = 0;
-
-            
-            //
-            // Special case
-            //
-            if( n*m==0 )
-            {
-                return;
-            }
-            
-            //
-            // Try fast code
-            //
-            if( ablasf.rmatrixlefttrsmf(m, n, ref a, i1, j1, isupper, isunit, optype, ref x, i2, j2) )
-            {
-                return;
-            }
-            
-            //
-            // General case
-            //
-            if( isupper )
-            {
-                
-                //
-                // Upper triangular matrix
-                //
-                if( optype==0 )
-                {
-                    
-                    //
-                    // A^(-1)*X
-                    //
-                    for(i=m-1; i>=0; i--)
-                    {
-                        for(j=i+1; j<=m-1; j++)
-                        {
-                            vr = a[i1+i,j1+j];
-                            for(i_=j2; i_<=j2+n-1;i_++)
-                            {
-                                x[i2+i,i_] = x[i2+i,i_] - vr*x[i2+j,i_];
-                            }
-                        }
-                        if( !isunit )
-                        {
-                            vd = 1/a[i1+i,j1+i];
-                            for(i_=j2; i_<=j2+n-1;i_++)
-                            {
-                                x[i2+i,i_] = vd*x[i2+i,i_];
-                            }
-                        }
-                    }
-                    return;
-                }
-                if( optype==1 )
-                {
-                    
-                    //
-                    // A^(-T)*X
-                    //
-                    for(i=0; i<=m-1; i++)
-                    {
-                        if( isunit )
-                        {
-                            vd = 1;
-                        }
-                        else
-                        {
-                            vd = 1/a[i1+i,j1+i];
-                        }
-                        for(i_=j2; i_<=j2+n-1;i_++)
-                        {
-                            x[i2+i,i_] = vd*x[i2+i,i_];
-                        }
-                        for(j=i+1; j<=m-1; j++)
-                        {
-                            vr = a[i1+i,j1+j];
-                            for(i_=j2; i_<=j2+n-1;i_++)
-                            {
-                                x[i2+j,i_] = x[i2+j,i_] - vr*x[i2+i,i_];
-                            }
-                        }
-                    }
-                    return;
-                }
-            }
-            else
-            {
-                
-                //
-                // Lower triangular matrix
-                //
-                if( optype==0 )
-                {
-                    
-                    //
-                    // A^(-1)*X
-                    //
-                    for(i=0; i<=m-1; i++)
-                    {
-                        for(j=0; j<=i-1; j++)
-                        {
-                            vr = a[i1+i,j1+j];
-                            for(i_=j2; i_<=j2+n-1;i_++)
-                            {
-                                x[i2+i,i_] = x[i2+i,i_] - vr*x[i2+j,i_];
-                            }
-                        }
-                        if( isunit )
-                        {
-                            vd = 1;
-                        }
-                        else
-                        {
-                            vd = 1/a[i1+j,j1+j];
-                        }
-                        for(i_=j2; i_<=j2+n-1;i_++)
-                        {
-                            x[i2+i,i_] = vd*x[i2+i,i_];
-                        }
-                    }
-                    return;
-                }
-                if( optype==1 )
-                {
-                    
-                    //
-                    // A^(-T)*X
-                    //
-                    for(i=m-1; i>=0; i--)
-                    {
-                        if( isunit )
-                        {
-                            vd = 1;
-                        }
-                        else
-                        {
-                            vd = 1/a[i1+i,j1+i];
-                        }
-                        for(i_=j2; i_<=j2+n-1;i_++)
-                        {
-                            x[i2+i,i_] = vd*x[i2+i,i_];
-                        }
-                        for(j=i-1; j>=0; j--)
-                        {
-                            vr = a[i1+i,j1+j];
-                            for(i_=j2; i_<=j2+n-1;i_++)
-                            {
-                                x[i2+j,i_] = x[i2+j,i_] - vr*x[i2+i,i_];
-                            }
-                        }
-                    }
-                    return;
-                }
-            }
-        }
-
-
-        /*************************************************************************
-        Level 2 subroutine
-        *************************************************************************/
-        private static void cmatrixsyrk2(int n,
-            int k,
-            double alpha,
-            ref AP.Complex[,] a,
-            int ia,
-            int ja,
-            int optypea,
-            double beta,
-            ref AP.Complex[,] c,
-            int ic,
-            int jc,
-            bool isupper)
-        {
-            int i = 0;
-            int j = 0;
-            int j1 = 0;
-            int j2 = 0;
-            AP.Complex v = 0;
-            int i_ = 0;
-            int i1_ = 0;
-
-            
-            //
-            // Fast exit (nothing to be done)
-            //
-            if( ((double)(alpha)==(double)(0) | k==0) & (double)(beta)==(double)(1) )
-            {
-                return;
-            }
-            
-            //
-            // Try to call fast SYRK
-            //
-            if( ablasf.cmatrixsyrkf(n, k, alpha, ref a, ia, ja, optypea, beta, ref c, ic, jc, isupper) )
-            {
-                return;
-            }
-            
-            //
-            // SYRK
-            //
-            if( optypea==0 )
-            {
-                
-                //
-                // C=alpha*A*A^H+beta*C
-                //
-                for(i=0; i<=n-1; i++)
-                {
-                    if( isupper )
-                    {
-                        j1 = i;
-                        j2 = n-1;
-                    }
-                    else
-                    {
-                        j1 = 0;
-                        j2 = i;
-                    }
-                    for(j=j1; j<=j2; j++)
-                    {
-                        if( (double)(alpha)!=(double)(0) & k>0 )
-                        {
-                            v = 0.0;
-                            for(i_=ja; i_<=ja+k-1;i_++)
-                            {
-                                v += a[ia+i,i_]*AP.Math.Conj(a[ia+j,i_]);
-                            }
-                        }
-                        else
-                        {
-                            v = 0;
-                        }
-                        if( (double)(beta)==(double)(0) )
-                        {
-                            c[ic+i,jc+j] = alpha*v;
-                        }
-                        else
-                        {
-                            c[ic+i,jc+j] = beta*c[ic+i,jc+j]+alpha*v;
-                        }
-                    }
-                }
-                return;
-            }
-            else
-            {
-                
-                //
-                // C=alpha*A^H*A+beta*C
-                //
-                for(i=0; i<=n-1; i++)
-                {
-                    if( isupper )
-                    {
-                        j1 = i;
-                        j2 = n-1;
-                    }
-                    else
-                    {
-                        j1 = 0;
-                        j2 = i;
-                    }
-                    if( (double)(beta)==(double)(0) )
-                    {
-                        for(j=j1; j<=j2; j++)
-                        {
-                            c[ic+i,jc+j] = 0;
-                        }
-                    }
-                    else
-                    {
-                        for(i_=jc+j1; i_<=jc+j2;i_++)
-                        {
-                            c[ic+i,i_] = beta*c[ic+i,i_];
-                        }
-                    }
-                }
-                for(i=0; i<=k-1; i++)
-                {
-                    for(j=0; j<=n-1; j++)
-                    {
-                        if( isupper )
-                        {
-                            j1 = j;
-                            j2 = n-1;
-                        }
-                        else
-                        {
-                            j1 = 0;
-                            j2 = j;
-                        }
-                        v = alpha*AP.Math.Conj(a[ia+i,ja+j]);
-                        i1_ = (ja+j1) - (jc+j1);
-                        for(i_=jc+j1; i_<=jc+j2;i_++)
-                        {
-                            c[ic+j,i_] = c[ic+j,i_] + v*a[ia+i,i_+i1_];
-                        }
-                    }
-                }
-                return;
-            }
-        }
-
-
-        /*************************************************************************
-        Level 2 subrotuine
-        *************************************************************************/
-        private static void rmatrixsyrk2(int n,
-            int k,
-            double alpha,
-            ref double[,] a,
-            int ia,
-            int ja,
-            int optypea,
-            double beta,
-            ref double[,] c,
-            int ic,
-            int jc,
-            bool isupper)
-        {
-            int i = 0;
-            int j = 0;
-            int j1 = 0;
-            int j2 = 0;
-            double v = 0;
-            int i_ = 0;
-            int i1_ = 0;
-
-            
-            //
-            // Fast exit (nothing to be done)
-            //
-            if( ((double)(alpha)==(double)(0) | k==0) & (double)(beta)==(double)(1) )
-            {
-                return;
-            }
-            
-            //
-            // Try to call fast SYRK
-            //
-            if( ablasf.rmatrixsyrkf(n, k, alpha, ref a, ia, ja, optypea, beta, ref c, ic, jc, isupper) )
-            {
-                return;
-            }
-            
-            //
-            // SYRK
-            //
-            if( optypea==0 )
-            {
-                
-                //
-                // C=alpha*A*A^H+beta*C
-                //
-                for(i=0; i<=n-1; i++)
-                {
-                    if( isupper )
-                    {
-                        j1 = i;
-                        j2 = n-1;
-                    }
-                    else
-                    {
-                        j1 = 0;
-                        j2 = i;
-                    }
-                    for(j=j1; j<=j2; j++)
-                    {
-                        if( (double)(alpha)!=(double)(0) & k>0 )
-                        {
-                            v = 0.0;
-                            for(i_=ja; i_<=ja+k-1;i_++)
-                            {
-                                v += a[ia+i,i_]*a[ia+j,i_];
-                            }
-                        }
-                        else
-                        {
-                            v = 0;
-                        }
-                        if( (double)(beta)==(double)(0) )
-                        {
-                            c[ic+i,jc+j] = alpha*v;
-                        }
-                        else
-                        {
-                            c[ic+i,jc+j] = beta*c[ic+i,jc+j]+alpha*v;
-                        }
-                    }
-                }
-                return;
-            }
-            else
-            {
-                
-                //
-                // C=alpha*A^H*A+beta*C
-                //
-                for(i=0; i<=n-1; i++)
-                {
-                    if( isupper )
-                    {
-                        j1 = i;
-                        j2 = n-1;
-                    }
-                    else
-                    {
-                        j1 = 0;
-                        j2 = i;
-                    }
-                    if( (double)(beta)==(double)(0) )
-                    {
-                        for(j=j1; j<=j2; j++)
-                        {
-                            c[ic+i,jc+j] = 0;
-                        }
-                    }
-                    else
-                    {
-                        for(i_=jc+j1; i_<=jc+j2;i_++)
-                        {
-                            c[ic+i,i_] = beta*c[ic+i,i_];
-                        }
-                    }
-                }
-                for(i=0; i<=k-1; i++)
-                {
-                    for(j=0; j<=n-1; j++)
-                    {
-                        if( isupper )
-                        {
-                            j1 = j;
-                            j2 = n-1;
-                        }
-                        else
-                        {
-                            j1 = 0;
-                            j2 = j;
-                        }
-                        v = alpha*a[ia+i,ja+j];
-                        i1_ = (ja+j1) - (jc+j1);
-                        for(i_=jc+j1; i_<=jc+j2;i_++)
-                        {
-                            c[ic+j,i_] = c[ic+j,i_] + v*a[ia+i,i_+i1_];
-                        }
-                    }
-                }
-                return;
-            }
-        }
-
-
-        /*************************************************************************
-        GEMM kernel
-
-          -- ALGLIB routine --
-             16.12.2009
-             Bochkanov Sergey
-        *************************************************************************/
-        private static void cmatrixgemmk(int m,
-            int n,
-            int k,
-            AP.Complex alpha,
-            ref AP.Complex[,] a,
-            int ia,
-            int ja,
-            int optypea,
-            ref AP.Complex[,] b,
-            int ib,
-            int jb,
-            int optypeb,
-            AP.Complex beta,
-            ref AP.Complex[,] c,
-            int ic,
-            int jc)
-        {
-            int i = 0;
-            int j = 0;
-            AP.Complex v = 0;
-            int i_ = 0;
-            int i1_ = 0;
-
-            
-            //
-            // Special case
-            //
-            if( m*n==0 )
-            {
-                return;
-            }
-            
-            //
-            // Try optimized code
-            //
-            if( ablasf.cmatrixgemmf(m, n, k, alpha, ref a, ia, ja, optypea, ref b, ib, jb, optypeb, beta, ref c, ic, jc) )
-            {
-                return;
-            }
-            
-            //
-            // Another special case
-            //
-            if( k==0 )
-            {
-                if( beta!=0 )
-                {
-                    for(i=0; i<=m-1; i++)
-                    {
-                        for(j=0; j<=n-1; j++)
-                        {
-                            c[ic+i,jc+j] = beta*c[ic+i,jc+j];
-                        }
-                    }
-                }
-                else
-                {
-                    for(i=0; i<=m-1; i++)
-                    {
-                        for(j=0; j<=n-1; j++)
-                        {
-                            c[ic+i,jc+j] = 0;
-                        }
-                    }
-                }
-                return;
-            }
-            
-            //
-            // General case
-            //
-            if( optypea==0 & optypeb!=0 )
-            {
-                
-                //
-                // A*B'
-                //
-                for(i=0; i<=m-1; i++)
-                {
-                    for(j=0; j<=n-1; j++)
-                    {
-                        if( k==0 | alpha==0 )
-                        {
-                            v = 0;
-                        }
-                        else
-                        {
-                            if( optypeb==1 )
-                            {
-                                i1_ = (jb)-(ja);
-                                v = 0.0;
-                                for(i_=ja; i_<=ja+k-1;i_++)
-                                {
-                                    v += a[ia+i,i_]*b[ib+j,i_+i1_];
-                                }
-                            }
-                            else
-                            {
-                                i1_ = (jb)-(ja);
-                                v = 0.0;
-                                for(i_=ja; i_<=ja+k-1;i_++)
-                                {
-                                    v += a[ia+i,i_]*AP.Math.Conj(b[ib+j,i_+i1_]);
-                                }
-                            }
-                        }
-                        if( beta==0 )
-                        {
-                            c[ic+i,jc+j] = alpha*v;
-                        }
-                        else
-                        {
-                            c[ic+i,jc+j] = beta*c[ic+i,jc+j]+alpha*v;
-                        }
-                    }
-                }
-                return;
-            }
-            if( optypea==0 & optypeb==0 )
-            {
-                
-                //
-                // A*B
-                //
-                for(i=0; i<=m-1; i++)
-                {
-                    if( beta!=0 )
-                    {
-                        for(i_=jc; i_<=jc+n-1;i_++)
-                        {
-                            c[ic+i,i_] = beta*c[ic+i,i_];
-                        }
-                    }
-                    else
-                    {
-                        for(j=0; j<=n-1; j++)
-                        {
-                            c[ic+i,jc+j] = 0;
-                        }
-                    }
-                    if( alpha!=0 )
-                    {
-                        for(j=0; j<=k-1; j++)
-                        {
-                            v = alpha*a[ia+i,ja+j];
-                            i1_ = (jb) - (jc);
-                            for(i_=jc; i_<=jc+n-1;i_++)
-                            {
-                                c[ic+i,i_] = c[ic+i,i_] + v*b[ib+j,i_+i1_];
-                            }
-                        }
-                    }
-                }
-                return;
-            }
-            if( optypea!=0 & optypeb!=0 )
-            {
-                
-                //
-                // A'*B'
-                //
-                for(i=0; i<=m-1; i++)
-                {
-                    for(j=0; j<=n-1; j++)
-                    {
-                        if( alpha==0 )
-                        {
-                            v = 0;
-                        }
-                        else
-                        {
-                            if( optypea==1 )
-                            {
-                                if( optypeb==1 )
-                                {
-                                    i1_ = (jb)-(ia);
-                                    v = 0.0;
-                                    for(i_=ia; i_<=ia+k-1;i_++)
-                                    {
-                                        v += a[i_,ja+i]*b[ib+j,i_+i1_];
-                                    }
-                                }
-                                else
-                                {
-                                    i1_ = (jb)-(ia);
-                                    v = 0.0;
-                                    for(i_=ia; i_<=ia+k-1;i_++)
-                                    {
-                                        v += a[i_,ja+i]*AP.Math.Conj(b[ib+j,i_+i1_]);
-                                    }
-                                }
-                            }
-                            else
-                            {
-                                if( optypeb==1 )
-                                {
-                                    i1_ = (jb)-(ia);
-                                    v = 0.0;
-                                    for(i_=ia; i_<=ia+k-1;i_++)
-                                    {
-                                        v += AP.Math.Conj(a[i_,ja+i])*b[ib+j,i_+i1_];
-                                    }
-                                }
-                                else
-                                {
-                                    i1_ = (jb)-(ia);
-                                    v = 0.0;
-                                    for(i_=ia; i_<=ia+k-1;i_++)
-                                    {
-                                        v += AP.Math.Conj(a[i_,ja+i])*AP.Math.Conj(b[ib+j,i_+i1_]);
-                                    }
-                                }
-                            }
-                        }
-                        if( beta==0 )
-                        {
-                            c[ic+i,jc+j] = alpha*v;
-                        }
-                        else
-                        {
-                            c[ic+i,jc+j] = beta*c[ic+i,jc+j]+alpha*v;
-                        }
-                    }
-                }
-                return;
-            }
-            if( optypea!=0 & optypeb==0 )
-            {
-                
-                //
-                // A'*B
-                //
-                if( beta==0 )
-                {
-                    for(i=0; i<=m-1; i++)
-                    {
-                        for(j=0; j<=n-1; j++)
-                        {
-                            c[ic+i,jc+j] = 0;
-                        }
-                    }
-                }
-                else
-                {
-                    for(i=0; i<=m-1; i++)
-                    {
-                        for(i_=jc; i_<=jc+n-1;i_++)
-                        {
-                            c[ic+i,i_] = beta*c[ic+i,i_];
-                        }
-                    }
-                }
-                if( alpha!=0 )
-                {
-                    for(j=0; j<=k-1; j++)
-                    {
-                        for(i=0; i<=m-1; i++)
-                        {
-                            if( optypea==1 )
-                            {
-                                v = alpha*a[ia+j,ja+i];
-                            }
-                            else
-                            {
-                                v = alpha*AP.Math.Conj(a[ia+j,ja+i]);
-                            }
-                            i1_ = (jb) - (jc);
-                            for(i_=jc; i_<=jc+n-1;i_++)
-                            {
-                                c[ic+i,i_] = c[ic+i,i_] + v*b[ib+j,i_+i1_];
-                            }
-                        }
-                    }
-                }
-                return;
-            }
-        }
-
-
-        /*************************************************************************
-        GEMM kernel
-
-          -- ALGLIB routine --
-             16.12.2009
-             Bochkanov Sergey
-        *************************************************************************/
-        private static void rmatrixgemmk(int m,
-            int n,
-            int k,
-            double alpha,
-            ref double[,] a,
-            int ia,
-            int ja,
-            int optypea,
-            ref double[,] b,
-            int ib,
-            int jb,
-            int optypeb,
-            double beta,
-            ref double[,] c,
-            int ic,
-            int jc)
-        {
-            int i = 0;
-            int j = 0;
-            double v = 0;
-            int i_ = 0;
-            int i1_ = 0;
-
-            
-            //
-            // if matrix size is zero
-            //
-            if( m*n==0 )
-            {
-                return;
-            }
-            
-            //
-            // Try optimized code
-            //
-            if( ablasf.rmatrixgemmf(m, n, k, alpha, ref a, ia, ja, optypea, ref b, ib, jb, optypeb, beta, ref c, ic, jc) )
-            {
-                return;
-            }
-            
-            //
-            // if K=0, then C=Beta*C
-            //
-            if( k==0 )
-            {
-                if( (double)(beta)!=(double)(1) )
-                {
-                    if( (double)(beta)!=(double)(0) )
-                    {
-                        for(i=0; i<=m-1; i++)
-                        {
-                            for(j=0; j<=n-1; j++)
-                            {
-                                c[ic+i,jc+j] = beta*c[ic+i,jc+j];
-                            }
-                        }
-                    }
-                    else
-                    {
-                        for(i=0; i<=m-1; i++)
-                        {
-                            for(j=0; j<=n-1; j++)
-                            {
-                                c[ic+i,jc+j] = 0;
-                            }
-                        }
-                    }
-                }
-                return;
-            }
-            
-            //
-            // General case
-            //
-            if( optypea==0 & optypeb!=0 )
-            {
-                
-                //
-                // A*B'
-                //
-                for(i=0; i<=m-1; i++)
-                {
-                    for(j=0; j<=n-1; j++)
-                    {
-                        if( k==0 | (double)(alpha)==(double)(0) )
-                        {
-                            v = 0;
-                        }
-                        else
-                        {
-                            i1_ = (jb)-(ja);
-                            v = 0.0;
-                            for(i_=ja; i_<=ja+k-1;i_++)
-                            {
-                                v += a[ia+i,i_]*b[ib+j,i_+i1_];
-                            }
-                        }
-                        if( (double)(beta)==(double)(0) )
-                        {
-                            c[ic+i,jc+j] = alpha*v;
-                        }
-                        else
-                        {
-                            c[ic+i,jc+j] = beta*c[ic+i,jc+j]+alpha*v;
-                        }
-                    }
-                }
-                return;
-            }
-            if( optypea==0 & optypeb==0 )
-            {
-                
-                //
-                // A*B
-                //
-                for(i=0; i<=m-1; i++)
-                {
-                    if( (double)(beta)!=(double)(0) )
-                    {
-                        for(i_=jc; i_<=jc+n-1;i_++)
-                        {
-                            c[ic+i,i_] = beta*c[ic+i,i_];
-                        }
-                    }
-                    else
-                    {
-                        for(j=0; j<=n-1; j++)
-                        {
-                            c[ic+i,jc+j] = 0;
-                        }
-                    }
-                    if( (double)(alpha)!=(double)(0) )
-                    {
-                        for(j=0; j<=k-1; j++)
-                        {
-                            v = alpha*a[ia+i,ja+j];
-                            i1_ = (jb) - (jc);
-                            for(i_=jc; i_<=jc+n-1;i_++)
-                            {
-                                c[ic+i,i_] = c[ic+i,i_] + v*b[ib+j,i_+i1_];
-                            }
-                        }
-                    }
-                }
-                return;
-            }
-            if( optypea!=0 & optypeb!=0 )
-            {
-                
-                //
-                // A'*B'
-                //
-                for(i=0; i<=m-1; i++)
-                {
-                    for(j=0; j<=n-1; j++)
-                    {
-                        if( (double)(alpha)==(double)(0) )
-                        {
-                            v = 0;
-                        }
-                        else
-                        {
-                            i1_ = (jb)-(ia);
-                            v = 0.0;
-                            for(i_=ia; i_<=ia+k-1;i_++)
-                            {
-                                v += a[i_,ja+i]*b[ib+j,i_+i1_];
-                            }
-                        }
-                        if( (double)(beta)==(double)(0) )
-                        {
-                            c[ic+i,jc+j] = alpha*v;
-                        }
-                        else
-                        {
-                            c[ic+i,jc+j] = beta*c[ic+i,jc+j]+alpha*v;
-                        }
-                    }
-                }
-                return;
-            }
-            if( optypea!=0 & optypeb==0 )
-            {
-                
-                //
-                // A'*B
-                //
-                if( (double)(beta)==(double)(0) )
-                {
-                    for(i=0; i<=m-1; i++)
-                    {
-                        for(j=0; j<=n-1; j++)
-                        {
-                            c[ic+i,jc+j] = 0;
-                        }
-                    }
-                }
-                else
-                {
-                    for(i=0; i<=m-1; i++)
-                    {
-                        for(i_=jc; i_<=jc+n-1;i_++)
-                        {
-                            c[ic+i,i_] = beta*c[ic+i,i_];
-                        }
-                    }
-                }
-                if( (double)(alpha)!=(double)(0) )
-                {
-                    for(j=0; j<=k-1; j++)
-                    {
-                        for(i=0; i<=m-1; i++)
-                        {
-                            v = alpha*a[ia+j,ja+i];
-                            i1_ = (jb) - (jc);
-                            for(i_=jc; i_<=jc+n-1;i_++)
-                            {
-                                c[ic+i,i_] = c[ic+i,i_] + v*b[ib+j,i_+i1_];
-                            }
-                        }
-                    }
-                }
-                return;
-            }
-        }
-    }
+              }
+            }
+            if (beta == 0) {
+              c[ic + i, jc + j] = alpha * v;
+            } else {
+              c[ic + i, jc + j] = beta * c[ic + i, jc + j] + alpha * v;
+            }
+          }
+        }
+        return;
+      }
+      if (optypea != 0 & optypeb == 0) {
+
+        //
+        // A'*B
+        //
+        if (beta == 0) {
+          for (i = 0; i <= m - 1; i++) {
+            for (j = 0; j <= n - 1; j++) {
+              c[ic + i, jc + j] = 0;
+            }
+          }
+        } else {
+          for (i = 0; i <= m - 1; i++) {
+            for (i_ = jc; i_ <= jc + n - 1; i_++) {
+              c[ic + i, i_] = beta * c[ic + i, i_];
+            }
+          }
+        }
+        if (alpha != 0) {
+          for (j = 0; j <= k - 1; j++) {
+            for (i = 0; i <= m - 1; i++) {
+              if (optypea == 1) {
+                v = alpha * a[ia + j, ja + i];
+              } else {
+                v = alpha * AP.Math.Conj(a[ia + j, ja + i]);
+              }
+              i1_ = (jb) - (jc);
+              for (i_ = jc; i_ <= jc + n - 1; i_++) {
+                c[ic + i, i_] = c[ic + i, i_] + v * b[ib + j, i_ + i1_];
+              }
+            }
+          }
+        }
+        return;
+      }
+    }
+
+
+    /*************************************************************************
+    GEMM kernel
+
+      -- ALGLIB routine --
+         16.12.2009
+         Bochkanov Sergey
+    *************************************************************************/
+    private static void rmatrixgemmk(int m,
+        int n,
+        int k,
+        double alpha,
+        ref double[,] a,
+        int ia,
+        int ja,
+        int optypea,
+        ref double[,] b,
+        int ib,
+        int jb,
+        int optypeb,
+        double beta,
+        ref double[,] c,
+        int ic,
+        int jc) {
+      int i = 0;
+      int j = 0;
+      double v = 0;
+      int i_ = 0;
+      int i1_ = 0;
+
+
+      //
+      // if matrix size is zero
+      //
+      if (m * n == 0) {
+        return;
+      }
+
+      //
+      // Try optimized code
+      //
+      if (ablasf.rmatrixgemmf(m, n, k, alpha, ref a, ia, ja, optypea, ref b, ib, jb, optypeb, beta, ref c, ic, jc)) {
+        return;
+      }
+
+      //
+      // if K=0, then C=Beta*C
+      //
+      if (k == 0) {
+        if ((double)(beta) != (double)(1)) {
+          if ((double)(beta) != (double)(0)) {
+            for (i = 0; i <= m - 1; i++) {
+              for (j = 0; j <= n - 1; j++) {
+                c[ic + i, jc + j] = beta * c[ic + i, jc + j];
+              }
+            }
+          } else {
+            for (i = 0; i <= m - 1; i++) {
+              for (j = 0; j <= n - 1; j++) {
+                c[ic + i, jc + j] = 0;
+              }
+            }
+          }
+        }
+        return;
+      }
+
+      //
+      // General case
+      //
+      if (optypea == 0 & optypeb != 0) {
+
+        //
+        // A*B'
+        //
+        for (i = 0; i <= m - 1; i++) {
+          for (j = 0; j <= n - 1; j++) {
+            if (k == 0 | (double)(alpha) == (double)(0)) {
+              v = 0;
+            } else {
+              i1_ = (jb) - (ja);
+              v = 0.0;
+              for (i_ = ja; i_ <= ja + k - 1; i_++) {
+                v += a[ia + i, i_] * b[ib + j, i_ + i1_];
+              }
+            }
+            if ((double)(beta) == (double)(0)) {
+              c[ic + i, jc + j] = alpha * v;
+            } else {
+              c[ic + i, jc + j] = beta * c[ic + i, jc + j] + alpha * v;
+            }
+          }
+        }
+        return;
+      }
+      if (optypea == 0 & optypeb == 0) {
+
+        //
+        // A*B
+        //
+        for (i = 0; i <= m - 1; i++) {
+          if ((double)(beta) != (double)(0)) {
+            for (i_ = jc; i_ <= jc + n - 1; i_++) {
+              c[ic + i, i_] = beta * c[ic + i, i_];
+            }
+          } else {
+            for (j = 0; j <= n - 1; j++) {
+              c[ic + i, jc + j] = 0;
+            }
+          }
+          if ((double)(alpha) != (double)(0)) {
+            for (j = 0; j <= k - 1; j++) {
+              v = alpha * a[ia + i, ja + j];
+              i1_ = (jb) - (jc);
+              for (i_ = jc; i_ <= jc + n - 1; i_++) {
+                c[ic + i, i_] = c[ic + i, i_] + v * b[ib + j, i_ + i1_];
+              }
+            }
+          }
+        }
+        return;
+      }
+      if (optypea != 0 & optypeb != 0) {
+
+        //
+        // A'*B'
+        //
+        for (i = 0; i <= m - 1; i++) {
+          for (j = 0; j <= n - 1; j++) {
+            if ((double)(alpha) == (double)(0)) {
+              v = 0;
+            } else {
+              i1_ = (jb) - (ia);
+              v = 0.0;
+              for (i_ = ia; i_ <= ia + k - 1; i_++) {
+                v += a[i_, ja + i] * b[ib + j, i_ + i1_];
+              }
+            }
+            if ((double)(beta) == (double)(0)) {
+              c[ic + i, jc + j] = alpha * v;
+            } else {
+              c[ic + i, jc + j] = beta * c[ic + i, jc + j] + alpha * v;
+            }
+          }
+        }
+        return;
+      }
+      if (optypea != 0 & optypeb == 0) {
+
+        //
+        // A'*B
+        //
+        if ((double)(beta) == (double)(0)) {
+          for (i = 0; i <= m - 1; i++) {
+            for (j = 0; j <= n - 1; j++) {
+              c[ic + i, jc + j] = 0;
+            }
+          }
+        } else {
+          for (i = 0; i <= m - 1; i++) {
+            for (i_ = jc; i_ <= jc + n - 1; i_++) {
+              c[ic + i, i_] = beta * c[ic + i, i_];
+            }
+          }
+        }
+        if ((double)(alpha) != (double)(0)) {
+          for (j = 0; j <= k - 1; j++) {
+            for (i = 0; i <= m - 1; i++) {
+              v = alpha * a[ia + j, ja + i];
+              i1_ = (jb) - (jc);
+              for (i_ = jc; i_ <= jc + n - 1; i_++) {
+                c[ic + i, i_] = c[ic + i, i_] + v * b[ib + j, i_ + i1_];
+              }
+            }
+          }
+        }
+        return;
+      }
+    }
+  }
 }
Index: /trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.ALGLIB/2.5.0/ALGLIB-2.5.0/ablasf.cs
===================================================================
--- /trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.ALGLIB/2.5.0/ALGLIB-2.5.0/ablasf.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.ALGLIB/2.5.0/ALGLIB-2.5.0/ablasf.cs	(revision 4068)
@@ -19,326 +19,311 @@
 *************************************************************************/
 
-using System;
-
-namespace alglib
-{
-    public class ablasf
-    {
-        /*************************************************************************
-        Fast kernel
-
-          -- ALGLIB routine --
-             19.01.2010
-             Bochkanov Sergey
-        *************************************************************************/
-        public static bool cmatrixrank1f(int m,
-            int n,
-            ref AP.Complex[,] a,
-            int ia,
-            int ja,
-            ref AP.Complex[] u,
-            int iu,
-            ref AP.Complex[] v,
-            int iv)
-        {
-            bool result = new bool();
-
-            result = false;
-            return result;
-        }
-
-
-        /*************************************************************************
-        Fast kernel
-
-          -- ALGLIB routine --
-             19.01.2010
-             Bochkanov Sergey
-        *************************************************************************/
-        public static bool rmatrixrank1f(int m,
-            int n,
-            ref double[,] a,
-            int ia,
-            int ja,
-            ref double[] u,
-            int iu,
-            ref double[] v,
-            int iv)
-        {
-            bool result = new bool();
-
-            result = false;
-            return result;
-        }
-
-
-        /*************************************************************************
-        Fast kernel
-
-          -- ALGLIB routine --
-             19.01.2010
-             Bochkanov Sergey
-        *************************************************************************/
-        public static bool cmatrixmvf(int m,
-            int n,
-            ref AP.Complex[,] a,
-            int ia,
-            int ja,
-            int opa,
-            ref AP.Complex[] x,
-            int ix,
-            ref AP.Complex[] y,
-            int iy)
-        {
-            bool result = new bool();
-
-            result = false;
-            return result;
-        }
-
-
-        /*************************************************************************
-        Fast kernel
-
-          -- ALGLIB routine --
-             19.01.2010
-             Bochkanov Sergey
-        *************************************************************************/
-        public static bool rmatrixmvf(int m,
-            int n,
-            ref double[,] a,
-            int ia,
-            int ja,
-            int opa,
-            ref double[] x,
-            int ix,
-            ref double[] y,
-            int iy)
-        {
-            bool result = new bool();
-
-            result = false;
-            return result;
-        }
-
-
-        /*************************************************************************
-        Fast kernel
-
-          -- ALGLIB routine --
-             19.01.2010
-             Bochkanov Sergey
-        *************************************************************************/
-        public static bool cmatrixrighttrsmf(int m,
-            int n,
-            ref AP.Complex[,] a,
-            int i1,
-            int j1,
-            bool isupper,
-            bool isunit,
-            int optype,
-            ref AP.Complex[,] x,
-            int i2,
-            int j2)
-        {
-            bool result = new bool();
-
-            result = false;
-            return result;
-        }
-
-
-        /*************************************************************************
-        Fast kernel
-
-          -- ALGLIB routine --
-             19.01.2010
-             Bochkanov Sergey
-        *************************************************************************/
-        public static bool cmatrixlefttrsmf(int m,
-            int n,
-            ref AP.Complex[,] a,
-            int i1,
-            int j1,
-            bool isupper,
-            bool isunit,
-            int optype,
-            ref AP.Complex[,] x,
-            int i2,
-            int j2)
-        {
-            bool result = new bool();
-
-            result = false;
-            return result;
-        }
-
-
-        /*************************************************************************
-        Fast kernel
-
-          -- ALGLIB routine --
-             19.01.2010
-             Bochkanov Sergey
-        *************************************************************************/
-        public static bool rmatrixrighttrsmf(int m,
-            int n,
-            ref double[,] a,
-            int i1,
-            int j1,
-            bool isupper,
-            bool isunit,
-            int optype,
-            ref double[,] x,
-            int i2,
-            int j2)
-        {
-            bool result = new bool();
-
-            result = false;
-            return result;
-        }
-
-
-        /*************************************************************************
-        Fast kernel
-
-          -- ALGLIB routine --
-             19.01.2010
-             Bochkanov Sergey
-        *************************************************************************/
-        public static bool rmatrixlefttrsmf(int m,
-            int n,
-            ref double[,] a,
-            int i1,
-            int j1,
-            bool isupper,
-            bool isunit,
-            int optype,
-            ref double[,] x,
-            int i2,
-            int j2)
-        {
-            bool result = new bool();
-
-            result = false;
-            return result;
-        }
-
-
-        /*************************************************************************
-        Fast kernel
-
-          -- ALGLIB routine --
-             19.01.2010
-             Bochkanov Sergey
-        *************************************************************************/
-        public static bool cmatrixsyrkf(int n,
-            int k,
-            double alpha,
-            ref AP.Complex[,] a,
-            int ia,
-            int ja,
-            int optypea,
-            double beta,
-            ref AP.Complex[,] c,
-            int ic,
-            int jc,
-            bool isupper)
-        {
-            bool result = new bool();
-
-            result = false;
-            return result;
-        }
-
-
-        /*************************************************************************
-        Fast kernel
-
-          -- ALGLIB routine --
-             19.01.2010
-             Bochkanov Sergey
-        *************************************************************************/
-        public static bool rmatrixsyrkf(int n,
-            int k,
-            double alpha,
-            ref double[,] a,
-            int ia,
-            int ja,
-            int optypea,
-            double beta,
-            ref double[,] c,
-            int ic,
-            int jc,
-            bool isupper)
-        {
-            bool result = new bool();
-
-            result = false;
-            return result;
-        }
-
-
-        /*************************************************************************
-        Fast kernel
-
-          -- ALGLIB routine --
-             19.01.2010
-             Bochkanov Sergey
-        *************************************************************************/
-        public static bool rmatrixgemmf(int m,
-            int n,
-            int k,
-            double alpha,
-            ref double[,] a,
-            int ia,
-            int ja,
-            int optypea,
-            ref double[,] b,
-            int ib,
-            int jb,
-            int optypeb,
-            double beta,
-            ref double[,] c,
-            int ic,
-            int jc)
-        {
-            bool result = new bool();
-
-            result = false;
-            return result;
-        }
-
-
-        /*************************************************************************
-        Fast kernel
-
-          -- ALGLIB routine --
-             19.01.2010
-             Bochkanov Sergey
-        *************************************************************************/
-        public static bool cmatrixgemmf(int m,
-            int n,
-            int k,
-            AP.Complex alpha,
-            ref AP.Complex[,] a,
-            int ia,
-            int ja,
-            int optypea,
-            ref AP.Complex[,] b,
-            int ib,
-            int jb,
-            int optypeb,
-            AP.Complex beta,
-            ref AP.Complex[,] c,
-            int ic,
-            int jc)
-        {
-            bool result = new bool();
-
-            result = false;
-            return result;
-        }
-    }
+
+namespace alglib {
+  public class ablasf {
+    /*************************************************************************
+    Fast kernel
+
+      -- ALGLIB routine --
+         19.01.2010
+         Bochkanov Sergey
+    *************************************************************************/
+    public static bool cmatrixrank1f(int m,
+        int n,
+        ref AP.Complex[,] a,
+        int ia,
+        int ja,
+        ref AP.Complex[] u,
+        int iu,
+        ref AP.Complex[] v,
+        int iv) {
+      bool result = new bool();
+
+      result = false;
+      return result;
+    }
+
+
+    /*************************************************************************
+    Fast kernel
+
+      -- ALGLIB routine --
+         19.01.2010
+         Bochkanov Sergey
+    *************************************************************************/
+    public static bool rmatrixrank1f(int m,
+        int n,
+        ref double[,] a,
+        int ia,
+        int ja,
+        ref double[] u,
+        int iu,
+        ref double[] v,
+        int iv) {
+      bool result = new bool();
+
+      result = false;
+      return result;
+    }
+
+
+    /*************************************************************************
+    Fast kernel
+
+      -- ALGLIB routine --
+         19.01.2010
+         Bochkanov Sergey
+    *************************************************************************/
+    public static bool cmatrixmvf(int m,
+        int n,
+        ref AP.Complex[,] a,
+        int ia,
+        int ja,
+        int opa,
+        ref AP.Complex[] x,
+        int ix,
+        ref AP.Complex[] y,
+        int iy) {
+      bool result = new bool();
+
+      result = false;
+      return result;
+    }
+
+
+    /*************************************************************************
+    Fast kernel
+
+      -- ALGLIB routine --
+         19.01.2010
+         Bochkanov Sergey
+    *************************************************************************/
+    public static bool rmatrixmvf(int m,
+        int n,
+        ref double[,] a,
+        int ia,
+        int ja,
+        int opa,
+        ref double[] x,
+        int ix,
+        ref double[] y,
+        int iy) {
+      bool result = new bool();
+
+      result = false;
+      return result;
+    }
+
+
+    /*************************************************************************
+    Fast kernel
+
+      -- ALGLIB routine --
+         19.01.2010
+         Bochkanov Sergey
+    *************************************************************************/
+    public static bool cmatrixrighttrsmf(int m,
+        int n,
+        ref AP.Complex[,] a,
+        int i1,
+        int j1,
+        bool isupper,
+        bool isunit,
+        int optype,
+        ref AP.Complex[,] x,
+        int i2,
+        int j2) {
+      bool result = new bool();
+
+      result = false;
+      return result;
+    }
+
+
+    /*************************************************************************
+    Fast kernel
+
+      -- ALGLIB routine --
+         19.01.2010
+         Bochkanov Sergey
+    *************************************************************************/
+    public static bool cmatrixlefttrsmf(int m,
+        int n,
+        ref AP.Complex[,] a,
+        int i1,
+        int j1,
+        bool isupper,
+        bool isunit,
+        int optype,
+        ref AP.Complex[,] x,
+        int i2,
+        int j2) {
+      bool result = new bool();
+
+      result = false;
+      return result;
+    }
+
+
+    /*************************************************************************
+    Fast kernel
+
+      -- ALGLIB routine --
+         19.01.2010
+         Bochkanov Sergey
+    *************************************************************************/
+    public static bool rmatrixrighttrsmf(int m,
+        int n,
+        ref double[,] a,
+        int i1,
+        int j1,
+        bool isupper,
+        bool isunit,
+        int optype,
+        ref double[,] x,
+        int i2,
+        int j2) {
+      bool result = new bool();
+
+      result = false;
+      return result;
+    }
+
+
+    /*************************************************************************
+    Fast kernel
+
+      -- ALGLIB routine --
+         19.01.2010
+         Bochkanov Sergey
+    *************************************************************************/
+    public static bool rmatrixlefttrsmf(int m,
+        int n,
+        ref double[,] a,
+        int i1,
+        int j1,
+        bool isupper,
+        bool isunit,
+        int optype,
+        ref double[,] x,
+        int i2,
+        int j2) {
+      bool result = new bool();
+
+      result = false;
+      return result;
+    }
+
+
+    /*************************************************************************
+    Fast kernel
+
+      -- ALGLIB routine --
+         19.01.2010
+         Bochkanov Sergey
+    *************************************************************************/
+    public static bool cmatrixsyrkf(int n,
+        int k,
+        double alpha,
+        ref AP.Complex[,] a,
+        int ia,
+        int ja,
+        int optypea,
+        double beta,
+        ref AP.Complex[,] c,
+        int ic,
+        int jc,
+        bool isupper) {
+      bool result = new bool();
+
+      result = false;
+      return result;
+    }
+
+
+    /*************************************************************************
+    Fast kernel
+
+      -- ALGLIB routine --
+         19.01.2010
+         Bochkanov Sergey
+    *************************************************************************/
+    public static bool rmatrixsyrkf(int n,
+        int k,
+        double alpha,
+        ref double[,] a,
+        int ia,
+        int ja,
+        int optypea,
+        double beta,
+        ref double[,] c,
+        int ic,
+        int jc,
+        bool isupper) {
+      bool result = new bool();
+
+      result = false;
+      return result;
+    }
+
+
+    /*************************************************************************
+    Fast kernel
+
+      -- ALGLIB routine --
+         19.01.2010
+         Bochkanov Sergey
+    *************************************************************************/
+    public static bool rmatrixgemmf(int m,
+        int n,
+        int k,
+        double alpha,
+        ref double[,] a,
+        int ia,
+        int ja,
+        int optypea,
+        ref double[,] b,
+        int ib,
+        int jb,
+        int optypeb,
+        double beta,
+        ref double[,] c,
+        int ic,
+        int jc) {
+      bool result = new bool();
+
+      result = false;
+      return result;
+    }
+
+
+    /*************************************************************************
+    Fast kernel
+
+      -- ALGLIB routine --
+         19.01.2010
+         Bochkanov Sergey
+    *************************************************************************/
+    public static bool cmatrixgemmf(int m,
+        int n,
+        int k,
+        AP.Complex alpha,
+        ref AP.Complex[,] a,
+        int ia,
+        int ja,
+        int optypea,
+        ref AP.Complex[,] b,
+        int ib,
+        int jb,
+        int optypeb,
+        AP.Complex beta,
+        ref AP.Complex[,] c,
+        int ic,
+        int jc) {
+      bool result = new bool();
+
+      result = false;
+      return result;
+    }
+  }
 }
Index: /trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.ALGLIB/2.5.0/ALGLIB-2.5.0/chisquaredistr.cs
===================================================================
--- /trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.ALGLIB/2.5.0/ALGLIB-2.5.0/chisquaredistr.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.ALGLIB/2.5.0/ALGLIB-2.5.0/chisquaredistr.cs	(revision 4068)
@@ -26,125 +26,119 @@
 *************************************************************************/
 
-using System;
 
-namespace alglib
-{
-    public class chisquaredistr
-    {
-        /*************************************************************************
-        Chi-square distribution
+namespace alglib {
+  public class chisquaredistr {
+    /*************************************************************************
+    Chi-square distribution
 
-        Returns the area under the left hand tail (from 0 to x)
-        of the Chi square probability density function with
-        v degrees of freedom.
+    Returns the area under the left hand tail (from 0 to x)
+    of the Chi square probability density function with
+    v degrees of freedom.
 
 
-                                          x
-                                           -
-                               1          | |  v/2-1  -t/2
-         P( x | v )   =   -----------     |   t      e     dt
-                           v/2  -       | |
-                          2    | (v/2)   -
-                                          0
+                                      x
+                                       -
+                           1          | |  v/2-1  -t/2
+     P( x | v )   =   -----------     |   t      e     dt
+                       v/2  -       | |
+                      2    | (v/2)   -
+                                      0
 
-        where x is the Chi-square variable.
+    where x is the Chi-square variable.
 
-        The incomplete gamma integral is used, according to the
-        formula
+    The incomplete gamma integral is used, according to the
+    formula
 
-        y = chdtr( v, x ) = igam( v/2.0, x/2.0 ).
+    y = chdtr( v, x ) = igam( v/2.0, x/2.0 ).
 
-        The arguments must both be positive.
+    The arguments must both be positive.
 
-        ACCURACY:
+    ACCURACY:
 
-        See incomplete gamma function
+    See incomplete gamma function
 
 
-        Cephes Math Library Release 2.8:  June, 2000
-        Copyright 1984, 1987, 2000 by Stephen L. Moshier
-        *************************************************************************/
-        public static double chisquaredistribution(double v,
-            double x)
-        {
-            double result = 0;
+    Cephes Math Library Release 2.8:  June, 2000
+    Copyright 1984, 1987, 2000 by Stephen L. Moshier
+    *************************************************************************/
+    public static double chisquaredistribution(double v,
+        double x) {
+      double result = 0;
 
-            System.Diagnostics.Debug.Assert((double)(x)>=(double)(0) & (double)(v)>=(double)(1), "Domain error in ChiSquareDistribution");
-            result = igammaf.incompletegamma(v/2.0, x/2.0);
-            return result;
-        }
+      System.Diagnostics.Debug.Assert((double)(x) >= (double)(0) & (double)(v) >= (double)(1), "Domain error in ChiSquareDistribution");
+      result = igammaf.incompletegamma(v / 2.0, x / 2.0);
+      return result;
+    }
 
 
-        /*************************************************************************
-        Complemented Chi-square distribution
+    /*************************************************************************
+    Complemented Chi-square distribution
 
-        Returns the area under the right hand tail (from x to
-        infinity) of the Chi square probability density function
-        with v degrees of freedom:
+    Returns the area under the right hand tail (from x to
+    infinity) of the Chi square probability density function
+    with v degrees of freedom:
 
-                                         inf.
-                                           -
-                               1          | |  v/2-1  -t/2
-         P( x | v )   =   -----------     |   t      e     dt
-                           v/2  -       | |
-                          2    | (v/2)   -
-                                          x
+                                     inf.
+                                       -
+                           1          | |  v/2-1  -t/2
+     P( x | v )   =   -----------     |   t      e     dt
+                       v/2  -       | |
+                      2    | (v/2)   -
+                                      x
 
-        where x is the Chi-square variable.
+    where x is the Chi-square variable.
 
-        The incomplete gamma integral is used, according to the
-        formula
+    The incomplete gamma integral is used, according to the
+    formula
 
-        y = chdtr( v, x ) = igamc( v/2.0, x/2.0 ).
+    y = chdtr( v, x ) = igamc( v/2.0, x/2.0 ).
 
-        The arguments must both be positive.
+    The arguments must both be positive.
 
-        ACCURACY:
+    ACCURACY:
 
-        See incomplete gamma function
+    See incomplete gamma function
 
-        Cephes Math Library Release 2.8:  June, 2000
-        Copyright 1984, 1987, 2000 by Stephen L. Moshier
-        *************************************************************************/
-        public static double chisquarecdistribution(double v,
-            double x)
-        {
-            double result = 0;
+    Cephes Math Library Release 2.8:  June, 2000
+    Copyright 1984, 1987, 2000 by Stephen L. Moshier
+    *************************************************************************/
+    public static double chisquarecdistribution(double v,
+        double x) {
+      double result = 0;
 
-            System.Diagnostics.Debug.Assert((double)(x)>=(double)(0) & (double)(v)>=(double)(1), "Domain error in ChiSquareDistributionC");
-            result = igammaf.incompletegammac(v/2.0, x/2.0);
-            return result;
-        }
+      System.Diagnostics.Debug.Assert((double)(x) >= (double)(0) & (double)(v) >= (double)(1), "Domain error in ChiSquareDistributionC");
+      result = igammaf.incompletegammac(v / 2.0, x / 2.0);
+      return result;
+    }
 
 
-        /*************************************************************************
-        Inverse of complemented Chi-square distribution
+    /*************************************************************************
+    Inverse of complemented Chi-square distribution
 
-        Finds the Chi-square argument x such that the integral
-        from x to infinity of the Chi-square density is equal
-        to the given cumulative probability y.
+    Finds the Chi-square argument x such that the integral
+    from x to infinity of the Chi-square density is equal
+    to the given cumulative probability y.
 
-        This is accomplished using the inverse gamma integral
-        function and the relation
+    This is accomplished using the inverse gamma integral
+    function and the relation
 
-           x/2 = igami( df/2, y );
+       x/2 = igami( df/2, y );
 
-        ACCURACY:
+    ACCURACY:
 
-        See inverse incomplete gamma function
+    See inverse incomplete gamma function
 
 
-        Cephes Math Library Release 2.8:  June, 2000
-        Copyright 1984, 1987, 2000 by Stephen L. Moshier
-        *************************************************************************/
-        public static double invchisquaredistribution(double v,
-            double y)
-        {
-            double result = 0;
+    Cephes Math Library Release 2.8:  June, 2000
+    Copyright 1984, 1987, 2000 by Stephen L. Moshier
+    *************************************************************************/
+    public static double invchisquaredistribution(double v,
+        double y) {
+      double result = 0;
 
-            System.Diagnostics.Debug.Assert((double)(y)>=(double)(0) & (double)(y)<=(double)(1) & (double)(v)>=(double)(1), "Domain error in InvChiSquareDistribution");
-            result = 2*igammaf.invincompletegammac(0.5*v, y);
-            return result;
-        }
+      System.Diagnostics.Debug.Assert((double)(y) >= (double)(0) & (double)(y) <= (double)(1) & (double)(v) >= (double)(1), "Domain error in InvChiSquareDistribution");
+      result = 2 * igammaf.invincompletegammac(0.5 * v, y);
+      return result;
     }
+  }
 }
Index: /trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.ALGLIB/2.5.0/ALGLIB-2.5.0/dawson.cs
===================================================================
--- /trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.ALGLIB/2.5.0/ALGLIB-2.5.0/dawson.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.ALGLIB/2.5.0/ALGLIB-2.5.0/dawson.cs	(revision 4068)
@@ -26,131 +26,123 @@
 *************************************************************************/
 
-using System;
 
-namespace alglib
-{
-    public class dawson
-    {
-        /*************************************************************************
-        Dawson's Integral
+namespace alglib {
+  public class dawson {
+    /*************************************************************************
+    Dawson's Integral
 
-        Approximates the integral
+    Approximates the integral
 
-                                    x
-                                    -
-                             2     | |        2
-         dawsn(x)  =  exp( -x  )   |    exp( t  ) dt
-                                 | |
-                                  -
-                                  0
+                                x
+                                -
+                         2     | |        2
+     dawsn(x)  =  exp( -x  )   |    exp( t  ) dt
+                             | |
+                              -
+                              0
 
-        Three different rational approximations are employed, for
-        the intervals 0 to 3.25; 3.25 to 6.25; and 6.25 up.
+    Three different rational approximations are employed, for
+    the intervals 0 to 3.25; 3.25 to 6.25; and 6.25 up.
 
-        ACCURACY:
+    ACCURACY:
 
-                             Relative error:
-        arithmetic   domain     # trials      peak         rms
-           IEEE      0,10        10000       6.9e-16     1.0e-16
+                         Relative error:
+    arithmetic   domain     # trials      peak         rms
+       IEEE      0,10        10000       6.9e-16     1.0e-16
 
-        Cephes Math Library Release 2.8:  June, 2000
-        Copyright 1984, 1987, 1989, 2000 by Stephen L. Moshier
-        *************************************************************************/
-        public static double dawsonintegral(double x)
-        {
-            double result = 0;
-            double x2 = 0;
-            double y = 0;
-            int sg = 0;
-            double an = 0;
-            double ad = 0;
-            double bn = 0;
-            double bd = 0;
-            double cn = 0;
-            double cd = 0;
+    Cephes Math Library Release 2.8:  June, 2000
+    Copyright 1984, 1987, 1989, 2000 by Stephen L. Moshier
+    *************************************************************************/
+    public static double dawsonintegral(double x) {
+      double result = 0;
+      double x2 = 0;
+      double y = 0;
+      int sg = 0;
+      double an = 0;
+      double ad = 0;
+      double bn = 0;
+      double bd = 0;
+      double cn = 0;
+      double cd = 0;
 
-            sg = 1;
-            if( (double)(x)<(double)(0) )
-            {
-                sg = -1;
-                x = -x;
-            }
-            if( (double)(x)<(double)(3.25) )
-            {
-                x2 = x*x;
-                an = 1.13681498971755972054E-11;
-                an = an*x2+8.49262267667473811108E-10;
-                an = an*x2+1.94434204175553054283E-8;
-                an = an*x2+9.53151741254484363489E-7;
-                an = an*x2+3.07828309874913200438E-6;
-                an = an*x2+3.52513368520288738649E-4;
-                an = an*x2+-8.50149846724410912031E-4;
-                an = an*x2+4.22618223005546594270E-2;
-                an = an*x2+-9.17480371773452345351E-2;
-                an = an*x2+9.99999999999999994612E-1;
-                ad = 2.40372073066762605484E-11;
-                ad = ad*x2+1.48864681368493396752E-9;
-                ad = ad*x2+5.21265281010541664570E-8;
-                ad = ad*x2+1.27258478273186970203E-6;
-                ad = ad*x2+2.32490249820789513991E-5;
-                ad = ad*x2+3.25524741826057911661E-4;
-                ad = ad*x2+3.48805814657162590916E-3;
-                ad = ad*x2+2.79448531198828973716E-2;
-                ad = ad*x2+1.58874241960120565368E-1;
-                ad = ad*x2+5.74918629489320327824E-1;
-                ad = ad*x2+1.00000000000000000539E0;
-                y = x*an/ad;
-                result = sg*y;
-                return result;
-            }
-            x2 = 1.0/(x*x);
-            if( (double)(x)<(double)(6.25) )
-            {
-                bn = 5.08955156417900903354E-1;
-                bn = bn*x2-2.44754418142697847934E-1;
-                bn = bn*x2+9.41512335303534411857E-2;
-                bn = bn*x2-2.18711255142039025206E-2;
-                bn = bn*x2+3.66207612329569181322E-3;
-                bn = bn*x2-4.23209114460388756528E-4;
-                bn = bn*x2+3.59641304793896631888E-5;
-                bn = bn*x2-2.14640351719968974225E-6;
-                bn = bn*x2+9.10010780076391431042E-8;
-                bn = bn*x2-2.40274520828250956942E-9;
-                bn = bn*x2+3.59233385440928410398E-11;
-                bd = 1.00000000000000000000E0;
-                bd = bd*x2-6.31839869873368190192E-1;
-                bd = bd*x2+2.36706788228248691528E-1;
-                bd = bd*x2-5.31806367003223277662E-2;
-                bd = bd*x2+8.48041718586295374409E-3;
-                bd = bd*x2-9.47996768486665330168E-4;
-                bd = bd*x2+7.81025592944552338085E-5;
-                bd = bd*x2-4.55875153252442634831E-6;
-                bd = bd*x2+1.89100358111421846170E-7;
-                bd = bd*x2-4.91324691331920606875E-9;
-                bd = bd*x2+7.18466403235734541950E-11;
-                y = 1.0/x+x2*bn/(bd*x);
-                result = sg*0.5*y;
-                return result;
-            }
-            if( (double)(x)>(double)(1.0E9) )
-            {
-                result = sg*0.5/x;
-                return result;
-            }
-            cn = -5.90592860534773254987E-1;
-            cn = cn*x2+6.29235242724368800674E-1;
-            cn = cn*x2-1.72858975380388136411E-1;
-            cn = cn*x2+1.64837047825189632310E-2;
-            cn = cn*x2-4.86827613020462700845E-4;
-            cd = 1.00000000000000000000E0;
-            cd = cd*x2-2.69820057197544900361E0;
-            cd = cd*x2+1.73270799045947845857E0;
-            cd = cd*x2-3.93708582281939493482E-1;
-            cd = cd*x2+3.44278924041233391079E-2;
-            cd = cd*x2-9.73655226040941223894E-4;
-            y = 1.0/x+x2*cn/(cd*x);
-            result = sg*0.5*y;
-            return result;
-        }
+      sg = 1;
+      if ((double)(x) < (double)(0)) {
+        sg = -1;
+        x = -x;
+      }
+      if ((double)(x) < (double)(3.25)) {
+        x2 = x * x;
+        an = 1.13681498971755972054E-11;
+        an = an * x2 + 8.49262267667473811108E-10;
+        an = an * x2 + 1.94434204175553054283E-8;
+        an = an * x2 + 9.53151741254484363489E-7;
+        an = an * x2 + 3.07828309874913200438E-6;
+        an = an * x2 + 3.52513368520288738649E-4;
+        an = an * x2 + -8.50149846724410912031E-4;
+        an = an * x2 + 4.22618223005546594270E-2;
+        an = an * x2 + -9.17480371773452345351E-2;
+        an = an * x2 + 9.99999999999999994612E-1;
+        ad = 2.40372073066762605484E-11;
+        ad = ad * x2 + 1.48864681368493396752E-9;
+        ad = ad * x2 + 5.21265281010541664570E-8;
+        ad = ad * x2 + 1.27258478273186970203E-6;
+        ad = ad * x2 + 2.32490249820789513991E-5;
+        ad = ad * x2 + 3.25524741826057911661E-4;
+        ad = ad * x2 + 3.48805814657162590916E-3;
+        ad = ad * x2 + 2.79448531198828973716E-2;
+        ad = ad * x2 + 1.58874241960120565368E-1;
+        ad = ad * x2 + 5.74918629489320327824E-1;
+        ad = ad * x2 + 1.00000000000000000539E0;
+        y = x * an / ad;
+        result = sg * y;
+        return result;
+      }
+      x2 = 1.0 / (x * x);
+      if ((double)(x) < (double)(6.25)) {
+        bn = 5.08955156417900903354E-1;
+        bn = bn * x2 - 2.44754418142697847934E-1;
+        bn = bn * x2 + 9.41512335303534411857E-2;
+        bn = bn * x2 - 2.18711255142039025206E-2;
+        bn = bn * x2 + 3.66207612329569181322E-3;
+        bn = bn * x2 - 4.23209114460388756528E-4;
+        bn = bn * x2 + 3.59641304793896631888E-5;
+        bn = bn * x2 - 2.14640351719968974225E-6;
+        bn = bn * x2 + 9.10010780076391431042E-8;
+        bn = bn * x2 - 2.40274520828250956942E-9;
+        bn = bn * x2 + 3.59233385440928410398E-11;
+        bd = 1.00000000000000000000E0;
+        bd = bd * x2 - 6.31839869873368190192E-1;
+        bd = bd * x2 + 2.36706788228248691528E-1;
+        bd = bd * x2 - 5.31806367003223277662E-2;
+        bd = bd * x2 + 8.48041718586295374409E-3;
+        bd = bd * x2 - 9.47996768486665330168E-4;
+        bd = bd * x2 + 7.81025592944552338085E-5;
+        bd = bd * x2 - 4.55875153252442634831E-6;
+        bd = bd * x2 + 1.89100358111421846170E-7;
+        bd = bd * x2 - 4.91324691331920606875E-9;
+        bd = bd * x2 + 7.18466403235734541950E-11;
+        y = 1.0 / x + x2 * bn / (bd * x);
+        result = sg * 0.5 * y;
+        return result;
+      }
+      if ((double)(x) > (double)(1.0E9)) {
+        result = sg * 0.5 / x;
+        return result;
+      }
+      cn = -5.90592860534773254987E-1;
+      cn = cn * x2 + 6.29235242724368800674E-1;
+      cn = cn * x2 - 1.72858975380388136411E-1;
+      cn = cn * x2 + 1.64837047825189632310E-2;
+      cn = cn * x2 - 4.86827613020462700845E-4;
+      cd = 1.00000000000000000000E0;
+      cd = cd * x2 - 2.69820057197544900361E0;
+      cd = cd * x2 + 1.73270799045947845857E0;
+      cd = cd * x2 - 3.93708582281939493482E-1;
+      cd = cd * x2 + 3.44278924041233391079E-2;
+      cd = cd * x2 - 9.73655226040941223894E-4;
+      y = 1.0 / x + x2 * cn / (cd * x);
+      result = sg * 0.5 * y;
+      return result;
     }
+  }
 }
Index: /trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.ALGLIB/2.5.0/ALGLIB-2.5.0/fdistr.cs
===================================================================
--- /trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.ALGLIB/2.5.0/ALGLIB-2.5.0/fdistr.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.ALGLIB/2.5.0/ALGLIB-2.5.0/fdistr.cs	(revision 4068)
@@ -26,172 +26,163 @@
 *************************************************************************/
 
-using System;
 
-namespace alglib
-{
-    public class fdistr
-    {
-        /*************************************************************************
-        F distribution
+namespace alglib {
+  public class fdistr {
+    /*************************************************************************
+    F distribution
 
-        Returns the area from zero to x under the F density
-        function (also known as Snedcor's density or the
-        variance ratio density).  This is the density
-        of x = (u1/df1)/(u2/df2), where u1 and u2 are random
-        variables having Chi square distributions with df1
-        and df2 degrees of freedom, respectively.
-        The incomplete beta integral is used, according to the
-        formula
+    Returns the area from zero to x under the F density
+    function (also known as Snedcor's density or the
+    variance ratio density).  This is the density
+    of x = (u1/df1)/(u2/df2), where u1 and u2 are random
+    variables having Chi square distributions with df1
+    and df2 degrees of freedom, respectively.
+    The incomplete beta integral is used, according to the
+    formula
 
-        P(x) = incbet( df1/2, df2/2, (df1*x/(df2 + df1*x) ).
+    P(x) = incbet( df1/2, df2/2, (df1*x/(df2 + df1*x) ).
 
 
-        The arguments a and b are greater than zero, and x is
-        nonnegative.
+    The arguments a and b are greater than zero, and x is
+    nonnegative.
 
-        ACCURACY:
+    ACCURACY:
 
-        Tested at random points (a,b,x).
+    Tested at random points (a,b,x).
 
-                       x     a,b                     Relative error:
-        arithmetic  domain  domain     # trials      peak         rms
-           IEEE      0,1    0,100       100000      9.8e-15     1.7e-15
-           IEEE      1,5    0,100       100000      6.5e-15     3.5e-16
-           IEEE      0,1    1,10000     100000      2.2e-11     3.3e-12
-           IEEE      1,5    1,10000     100000      1.1e-11     1.7e-13
+                   x     a,b                     Relative error:
+    arithmetic  domain  domain     # trials      peak         rms
+       IEEE      0,1    0,100       100000      9.8e-15     1.7e-15
+       IEEE      1,5    0,100       100000      6.5e-15     3.5e-16
+       IEEE      0,1    1,10000     100000      2.2e-11     3.3e-12
+       IEEE      1,5    1,10000     100000      1.1e-11     1.7e-13
 
-        Cephes Math Library Release 2.8:  June, 2000
-        Copyright 1984, 1987, 1995, 2000 by Stephen L. Moshier
-        *************************************************************************/
-        public static double fdistribution(int a,
-            int b,
-            double x)
-        {
-            double result = 0;
-            double w = 0;
+    Cephes Math Library Release 2.8:  June, 2000
+    Copyright 1984, 1987, 1995, 2000 by Stephen L. Moshier
+    *************************************************************************/
+    public static double fdistribution(int a,
+        int b,
+        double x) {
+      double result = 0;
+      double w = 0;
 
-            System.Diagnostics.Debug.Assert(a>=1 & b>=1 & (double)(x)>=(double)(0), "Domain error in FDistribution");
-            w = a*x;
-            w = w/(b+w);
-            result = ibetaf.incompletebeta(0.5*a, 0.5*b, w);
-            return result;
-        }
+      System.Diagnostics.Debug.Assert(a >= 1 & b >= 1 & (double)(x) >= (double)(0), "Domain error in FDistribution");
+      w = a * x;
+      w = w / (b + w);
+      result = ibetaf.incompletebeta(0.5 * a, 0.5 * b, w);
+      return result;
+    }
 
 
-        /*************************************************************************
-        Complemented F distribution
+    /*************************************************************************
+    Complemented F distribution
 
-        Returns the area from x to infinity under the F density
-        function (also known as Snedcor's density or the
-        variance ratio density).
+    Returns the area from x to infinity under the F density
+    function (also known as Snedcor's density or the
+    variance ratio density).
 
 
-                             inf.
-                              -
-                     1       | |  a-1      b-1
-        1-P(x)  =  ------    |   t    (1-t)    dt
-                   B(a,b)  | |
-                            -
-                             x
+                         inf.
+                          -
+                 1       | |  a-1      b-1
+    1-P(x)  =  ------    |   t    (1-t)    dt
+               B(a,b)  | |
+                        -
+                         x
 
 
-        The incomplete beta integral is used, according to the
-        formula
+    The incomplete beta integral is used, according to the
+    formula
 
-        P(x) = incbet( df2/2, df1/2, (df2/(df2 + df1*x) ).
+    P(x) = incbet( df2/2, df1/2, (df2/(df2 + df1*x) ).
 
 
-        ACCURACY:
+    ACCURACY:
 
-        Tested at random points (a,b,x) in the indicated intervals.
-                       x     a,b                     Relative error:
-        arithmetic  domain  domain     # trials      peak         rms
-           IEEE      0,1    1,100       100000      3.7e-14     5.9e-16
-           IEEE      1,5    1,100       100000      8.0e-15     1.6e-15
-           IEEE      0,1    1,10000     100000      1.8e-11     3.5e-13
-           IEEE      1,5    1,10000     100000      2.0e-11     3.0e-12
+    Tested at random points (a,b,x) in the indicated intervals.
+                   x     a,b                     Relative error:
+    arithmetic  domain  domain     # trials      peak         rms
+       IEEE      0,1    1,100       100000      3.7e-14     5.9e-16
+       IEEE      1,5    1,100       100000      8.0e-15     1.6e-15
+       IEEE      0,1    1,10000     100000      1.8e-11     3.5e-13
+       IEEE      1,5    1,10000     100000      2.0e-11     3.0e-12
 
-        Cephes Math Library Release 2.8:  June, 2000
-        Copyright 1984, 1987, 1995, 2000 by Stephen L. Moshier
-        *************************************************************************/
-        public static double fcdistribution(int a,
-            int b,
-            double x)
-        {
-            double result = 0;
-            double w = 0;
+    Cephes Math Library Release 2.8:  June, 2000
+    Copyright 1984, 1987, 1995, 2000 by Stephen L. Moshier
+    *************************************************************************/
+    public static double fcdistribution(int a,
+        int b,
+        double x) {
+      double result = 0;
+      double w = 0;
 
-            System.Diagnostics.Debug.Assert(a>=1 & b>=1 & (double)(x)>=(double)(0), "Domain error in FCDistribution");
-            w = b/(b+a*x);
-            result = ibetaf.incompletebeta(0.5*b, 0.5*a, w);
-            return result;
-        }
+      System.Diagnostics.Debug.Assert(a >= 1 & b >= 1 & (double)(x) >= (double)(0), "Domain error in FCDistribution");
+      w = b / (b + a * x);
+      result = ibetaf.incompletebeta(0.5 * b, 0.5 * a, w);
+      return result;
+    }
 
 
-        /*************************************************************************
-        Inverse of complemented F distribution
+    /*************************************************************************
+    Inverse of complemented F distribution
 
-        Finds the F density argument x such that the integral
-        from x to infinity of the F density is equal to the
-        given probability p.
+    Finds the F density argument x such that the integral
+    from x to infinity of the F density is equal to the
+    given probability p.
 
-        This is accomplished using the inverse beta integral
-        function and the relations
+    This is accomplished using the inverse beta integral
+    function and the relations
 
-             z = incbi( df2/2, df1/2, p )
-             x = df2 (1-z) / (df1 z).
+         z = incbi( df2/2, df1/2, p )
+         x = df2 (1-z) / (df1 z).
 
-        Note: the following relations hold for the inverse of
-        the uncomplemented F distribution:
+    Note: the following relations hold for the inverse of
+    the uncomplemented F distribution:
 
-             z = incbi( df1/2, df2/2, p )
-             x = df2 z / (df1 (1-z)).
+         z = incbi( df1/2, df2/2, p )
+         x = df2 z / (df1 (1-z)).
 
-        ACCURACY:
+    ACCURACY:
 
-        Tested at random points (a,b,p).
+    Tested at random points (a,b,p).
 
-                     a,b                     Relative error:
-        arithmetic  domain     # trials      peak         rms
-         For p between .001 and 1:
-           IEEE     1,100       100000      8.3e-15     4.7e-16
-           IEEE     1,10000     100000      2.1e-11     1.4e-13
-         For p between 10^-6 and 10^-3:
-           IEEE     1,100        50000      1.3e-12     8.4e-15
-           IEEE     1,10000      50000      3.0e-12     4.8e-14
+                 a,b                     Relative error:
+    arithmetic  domain     # trials      peak         rms
+     For p between .001 and 1:
+       IEEE     1,100       100000      8.3e-15     4.7e-16
+       IEEE     1,10000     100000      2.1e-11     1.4e-13
+     For p between 10^-6 and 10^-3:
+       IEEE     1,100        50000      1.3e-12     8.4e-15
+       IEEE     1,10000      50000      3.0e-12     4.8e-14
 
-        Cephes Math Library Release 2.8:  June, 2000
-        Copyright 1984, 1987, 1995, 2000 by Stephen L. Moshier
-        *************************************************************************/
-        public static double invfdistribution(int a,
-            int b,
-            double y)
-        {
-            double result = 0;
-            double w = 0;
+    Cephes Math Library Release 2.8:  June, 2000
+    Copyright 1984, 1987, 1995, 2000 by Stephen L. Moshier
+    *************************************************************************/
+    public static double invfdistribution(int a,
+        int b,
+        double y) {
+      double result = 0;
+      double w = 0;
 
-            System.Diagnostics.Debug.Assert(a>=1 & b>=1 & (double)(y)>(double)(0) & (double)(y)<=(double)(1), "Domain error in InvFDistribution");
-            
-            //
-            // Compute probability for x = 0.5
-            //
-            w = ibetaf.incompletebeta(0.5*b, 0.5*a, 0.5);
-            
-            //
-            // If that is greater than y, then the solution w < .5
-            // Otherwise, solve at 1-y to remove cancellation in (b - b*w)
-            //
-            if( (double)(w)>(double)(y) | (double)(y)<(double)(0.001) )
-            {
-                w = ibetaf.invincompletebeta(0.5*b, 0.5*a, y);
-                result = (b-b*w)/(a*w);
-            }
-            else
-            {
-                w = ibetaf.invincompletebeta(0.5*a, 0.5*b, 1.0-y);
-                result = b*w/(a*(1.0-w));
-            }
-            return result;
-        }
+      System.Diagnostics.Debug.Assert(a >= 1 & b >= 1 & (double)(y) > (double)(0) & (double)(y) <= (double)(1), "Domain error in InvFDistribution");
+
+      //
+      // Compute probability for x = 0.5
+      //
+      w = ibetaf.incompletebeta(0.5 * b, 0.5 * a, 0.5);
+
+      //
+      // If that is greater than y, then the solution w < .5
+      // Otherwise, solve at 1-y to remove cancellation in (b - b*w)
+      //
+      if ((double)(w) > (double)(y) | (double)(y) < (double)(0.001)) {
+        w = ibetaf.invincompletebeta(0.5 * b, 0.5 * a, y);
+        result = (b - b * w) / (a * w);
+      } else {
+        w = ibetaf.invincompletebeta(0.5 * a, 0.5 * b, 1.0 - y);
+        result = b * w / (a * (1.0 - w));
+      }
+      return result;
     }
+  }
 }
Index: /trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.ALGLIB/2.5.0/ALGLIB-2.5.0/fht.cs
===================================================================
--- /trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.ALGLIB/2.5.0/ALGLIB-2.5.0/fht.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.ALGLIB/2.5.0/ALGLIB-2.5.0/fht.cs	(revision 4068)
@@ -19,99 +19,90 @@
 *************************************************************************/
 
-using System;
 
-namespace alglib
-{
-    public class fht
-    {
-        /*************************************************************************
-        1-dimensional Fast Hartley Transform.
+namespace alglib {
+  public class fht {
+    /*************************************************************************
+    1-dimensional Fast Hartley Transform.
 
-        Algorithm has O(N*logN) complexity for any N (composite or prime).
+    Algorithm has O(N*logN) complexity for any N (composite or prime).
 
-        INPUT PARAMETERS
-            A   -   array[0..N-1] - real function to be transformed
-            N   -   problem size
+    INPUT PARAMETERS
+        A   -   array[0..N-1] - real function to be transformed
+        N   -   problem size
             
-        OUTPUT PARAMETERS
-            A   -   FHT of a input array, array[0..N-1],
-                    A_out[k] = sum(A_in[j]*(cos(2*pi*j*k/N)+sin(2*pi*j*k/N)), j=0..N-1)
+    OUTPUT PARAMETERS
+        A   -   FHT of a input array, array[0..N-1],
+                A_out[k] = sum(A_in[j]*(cos(2*pi*j*k/N)+sin(2*pi*j*k/N)), j=0..N-1)
 
 
-          -- ALGLIB --
-             Copyright 04.06.2009 by Bochkanov Sergey
-        *************************************************************************/
-        public static void fhtr1d(ref double[] a,
-            int n)
-        {
-            ftbase.ftplan plan = new ftbase.ftplan();
-            int i = 0;
-            AP.Complex[] fa = new AP.Complex[0];
+      -- ALGLIB --
+         Copyright 04.06.2009 by Bochkanov Sergey
+    *************************************************************************/
+    public static void fhtr1d(ref double[] a,
+        int n) {
+      ftbase.ftplan plan = new ftbase.ftplan();
+      int i = 0;
+      AP.Complex[] fa = new AP.Complex[0];
 
-            System.Diagnostics.Debug.Assert(n>0, "FHTR1D: incorrect N!");
-            
-            //
-            // Special case: N=1, FHT is just identity transform.
-            // After this block we assume that N is strictly greater than 1.
-            //
-            if( n==1 )
-            {
-                return;
-            }
-            
-            //
-            // Reduce FHt to real FFT
-            //
-            fft.fftr1d(ref a, n, ref fa);
-            for(i=0; i<=n-1; i++)
-            {
-                a[i] = fa[i].x-fa[i].y;
-            }
-        }
+      System.Diagnostics.Debug.Assert(n > 0, "FHTR1D: incorrect N!");
+
+      //
+      // Special case: N=1, FHT is just identity transform.
+      // After this block we assume that N is strictly greater than 1.
+      //
+      if (n == 1) {
+        return;
+      }
+
+      //
+      // Reduce FHt to real FFT
+      //
+      fft.fftr1d(ref a, n, ref fa);
+      for (i = 0; i <= n - 1; i++) {
+        a[i] = fa[i].x - fa[i].y;
+      }
+    }
 
 
-        /*************************************************************************
-        1-dimensional inverse FHT.
+    /*************************************************************************
+    1-dimensional inverse FHT.
 
-        Algorithm has O(N*logN) complexity for any N (composite or prime).
+    Algorithm has O(N*logN) complexity for any N (composite or prime).
 
-        INPUT PARAMETERS
-            A   -   array[0..N-1] - complex array to be transformed
-            N   -   problem size
+    INPUT PARAMETERS
+        A   -   array[0..N-1] - complex array to be transformed
+        N   -   problem size
 
-        OUTPUT PARAMETERS
-            A   -   inverse FHT of a input array, array[0..N-1]
+    OUTPUT PARAMETERS
+        A   -   inverse FHT of a input array, array[0..N-1]
 
 
-          -- ALGLIB --
-             Copyright 29.05.2009 by Bochkanov Sergey
-        *************************************************************************/
-        public static void fhtr1dinv(ref double[] a,
-            int n)
-        {
-            int i = 0;
+      -- ALGLIB --
+         Copyright 29.05.2009 by Bochkanov Sergey
+    *************************************************************************/
+    public static void fhtr1dinv(ref double[] a,
+        int n) {
+      int i = 0;
 
-            System.Diagnostics.Debug.Assert(n>0, "FHTR1DInv: incorrect N!");
-            
-            //
-            // Special case: N=1, iFHT is just identity transform.
-            // After this block we assume that N is strictly greater than 1.
-            //
-            if( n==1 )
-            {
-                return;
-            }
-            
-            //
-            // Inverse FHT can be expressed in terms of the FHT as
-            //
-            //     invfht(x) = fht(x)/N
-            //
-            fhtr1d(ref a, n);
-            for(i=0; i<=n-1; i++)
-            {
-                a[i] = a[i]/n;
-            }
-        }
+      System.Diagnostics.Debug.Assert(n > 0, "FHTR1DInv: incorrect N!");
+
+      //
+      // Special case: N=1, iFHT is just identity transform.
+      // After this block we assume that N is strictly greater than 1.
+      //
+      if (n == 1) {
+        return;
+      }
+
+      //
+      // Inverse FHT can be expressed in terms of the FHT as
+      //
+      //     invfht(x) = fht(x)/N
+      //
+      fhtr1d(ref a, n);
+      for (i = 0; i <= n - 1; i++) {
+        a[i] = a[i] / n;
+      }
     }
+  }
 }
Index: /trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.ALGLIB/2.5.0/ALGLIB-2.5.0/hblas.cs
===================================================================
--- /trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.ALGLIB/2.5.0/ALGLIB-2.5.0/hblas.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.ALGLIB/2.5.0/ALGLIB-2.5.0/hblas.cs	(revision 4068)
@@ -25,194 +25,166 @@
 *************************************************************************/
 
-using System;
 
-namespace alglib
-{
-    public class hblas
-    {
-        public static void hermitianmatrixvectormultiply(ref AP.Complex[,] a,
-            bool isupper,
-            int i1,
-            int i2,
-            ref AP.Complex[] x,
-            AP.Complex alpha,
-            ref AP.Complex[] y)
-        {
-            int i = 0;
-            int ba1 = 0;
-            int ba2 = 0;
-            int by1 = 0;
-            int by2 = 0;
-            int bx1 = 0;
-            int bx2 = 0;
-            int n = 0;
-            AP.Complex v = 0;
-            int i_ = 0;
-            int i1_ = 0;
+namespace alglib {
+  public class hblas {
+    public static void hermitianmatrixvectormultiply(ref AP.Complex[,] a,
+        bool isupper,
+        int i1,
+        int i2,
+        ref AP.Complex[] x,
+        AP.Complex alpha,
+        ref AP.Complex[] y) {
+      int i = 0;
+      int ba1 = 0;
+      int ba2 = 0;
+      int by1 = 0;
+      int by2 = 0;
+      int bx1 = 0;
+      int bx2 = 0;
+      int n = 0;
+      AP.Complex v = 0;
+      int i_ = 0;
+      int i1_ = 0;
 
-            n = i2-i1+1;
-            if( n<=0 )
-            {
-                return;
-            }
-            
-            //
-            // Let A = L + D + U, where
-            //  L is strictly lower triangular (main diagonal is zero)
-            //  D is diagonal
-            //  U is strictly upper triangular (main diagonal is zero)
-            //
-            // A*x = L*x + D*x + U*x
-            //
-            // Calculate D*x first
-            //
-            for(i=i1; i<=i2; i++)
-            {
-                y[i-i1+1] = a[i,i]*x[i-i1+1];
-            }
-            
-            //
-            // Add L*x + U*x
-            //
-            if( isupper )
-            {
-                for(i=i1; i<=i2-1; i++)
-                {
-                    
-                    //
-                    // Add L*x to the result
-                    //
-                    v = x[i-i1+1];
-                    by1 = i-i1+2;
-                    by2 = n;
-                    ba1 = i+1;
-                    ba2 = i2;
-                    i1_ = (ba1) - (by1);
-                    for(i_=by1; i_<=by2;i_++)
-                    {
-                        y[i_] = y[i_] + v*AP.Math.Conj(a[i,i_+i1_]);
-                    }
-                    
-                    //
-                    // Add U*x to the result
-                    //
-                    bx1 = i-i1+2;
-                    bx2 = n;
-                    ba1 = i+1;
-                    ba2 = i2;
-                    i1_ = (ba1)-(bx1);
-                    v = 0.0;
-                    for(i_=bx1; i_<=bx2;i_++)
-                    {
-                        v += x[i_]*a[i,i_+i1_];
-                    }
-                    y[i-i1+1] = y[i-i1+1]+v;
-                }
-            }
-            else
-            {
-                for(i=i1+1; i<=i2; i++)
-                {
-                    
-                    //
-                    // Add L*x to the result
-                    //
-                    bx1 = 1;
-                    bx2 = i-i1;
-                    ba1 = i1;
-                    ba2 = i-1;
-                    i1_ = (ba1)-(bx1);
-                    v = 0.0;
-                    for(i_=bx1; i_<=bx2;i_++)
-                    {
-                        v += x[i_]*a[i,i_+i1_];
-                    }
-                    y[i-i1+1] = y[i-i1+1]+v;
-                    
-                    //
-                    // Add U*x to the result
-                    //
-                    v = x[i-i1+1];
-                    by1 = 1;
-                    by2 = i-i1;
-                    ba1 = i1;
-                    ba2 = i-1;
-                    i1_ = (ba1) - (by1);
-                    for(i_=by1; i_<=by2;i_++)
-                    {
-                        y[i_] = y[i_] + v*AP.Math.Conj(a[i,i_+i1_]);
-                    }
-                }
-            }
-            for(i_=1; i_<=n;i_++)
-            {
-                y[i_] = alpha*y[i_];
-            }
+      n = i2 - i1 + 1;
+      if (n <= 0) {
+        return;
+      }
+
+      //
+      // Let A = L + D + U, where
+      //  L is strictly lower triangular (main diagonal is zero)
+      //  D is diagonal
+      //  U is strictly upper triangular (main diagonal is zero)
+      //
+      // A*x = L*x + D*x + U*x
+      //
+      // Calculate D*x first
+      //
+      for (i = i1; i <= i2; i++) {
+        y[i - i1 + 1] = a[i, i] * x[i - i1 + 1];
+      }
+
+      //
+      // Add L*x + U*x
+      //
+      if (isupper) {
+        for (i = i1; i <= i2 - 1; i++) {
+
+          //
+          // Add L*x to the result
+          //
+          v = x[i - i1 + 1];
+          by1 = i - i1 + 2;
+          by2 = n;
+          ba1 = i + 1;
+          ba2 = i2;
+          i1_ = (ba1) - (by1);
+          for (i_ = by1; i_ <= by2; i_++) {
+            y[i_] = y[i_] + v * AP.Math.Conj(a[i, i_ + i1_]);
+          }
+
+          //
+          // Add U*x to the result
+          //
+          bx1 = i - i1 + 2;
+          bx2 = n;
+          ba1 = i + 1;
+          ba2 = i2;
+          i1_ = (ba1) - (bx1);
+          v = 0.0;
+          for (i_ = bx1; i_ <= bx2; i_++) {
+            v += x[i_] * a[i, i_ + i1_];
+          }
+          y[i - i1 + 1] = y[i - i1 + 1] + v;
         }
+      } else {
+        for (i = i1 + 1; i <= i2; i++) {
+
+          //
+          // Add L*x to the result
+          //
+          bx1 = 1;
+          bx2 = i - i1;
+          ba1 = i1;
+          ba2 = i - 1;
+          i1_ = (ba1) - (bx1);
+          v = 0.0;
+          for (i_ = bx1; i_ <= bx2; i_++) {
+            v += x[i_] * a[i, i_ + i1_];
+          }
+          y[i - i1 + 1] = y[i - i1 + 1] + v;
+
+          //
+          // Add U*x to the result
+          //
+          v = x[i - i1 + 1];
+          by1 = 1;
+          by2 = i - i1;
+          ba1 = i1;
+          ba2 = i - 1;
+          i1_ = (ba1) - (by1);
+          for (i_ = by1; i_ <= by2; i_++) {
+            y[i_] = y[i_] + v * AP.Math.Conj(a[i, i_ + i1_]);
+          }
+        }
+      }
+      for (i_ = 1; i_ <= n; i_++) {
+        y[i_] = alpha * y[i_];
+      }
+    }
 
 
-        public static void hermitianrank2update(ref AP.Complex[,] a,
-            bool isupper,
-            int i1,
-            int i2,
-            ref AP.Complex[] x,
-            ref AP.Complex[] y,
-            ref AP.Complex[] t,
-            AP.Complex alpha)
-        {
-            int i = 0;
-            int tp1 = 0;
-            int tp2 = 0;
-            AP.Complex v = 0;
-            int i_ = 0;
-            int i1_ = 0;
+    public static void hermitianrank2update(ref AP.Complex[,] a,
+        bool isupper,
+        int i1,
+        int i2,
+        ref AP.Complex[] x,
+        ref AP.Complex[] y,
+        ref AP.Complex[] t,
+        AP.Complex alpha) {
+      int i = 0;
+      int tp1 = 0;
+      int tp2 = 0;
+      AP.Complex v = 0;
+      int i_ = 0;
+      int i1_ = 0;
 
-            if( isupper )
-            {
-                for(i=i1; i<=i2; i++)
-                {
-                    tp1 = i+1-i1;
-                    tp2 = i2-i1+1;
-                    v = alpha*x[i+1-i1];
-                    for(i_=tp1; i_<=tp2;i_++)
-                    {
-                        t[i_] = v*AP.Math.Conj(y[i_]);
-                    }
-                    v = AP.Math.Conj(alpha)*y[i+1-i1];
-                    for(i_=tp1; i_<=tp2;i_++)
-                    {
-                        t[i_] = t[i_] + v*AP.Math.Conj(x[i_]);
-                    }
-                    i1_ = (tp1) - (i);
-                    for(i_=i; i_<=i2;i_++)
-                    {
-                        a[i,i_] = a[i,i_] + t[i_+i1_];
-                    }
-                }
-            }
-            else
-            {
-                for(i=i1; i<=i2; i++)
-                {
-                    tp1 = 1;
-                    tp2 = i+1-i1;
-                    v = alpha*x[i+1-i1];
-                    for(i_=tp1; i_<=tp2;i_++)
-                    {
-                        t[i_] = v*AP.Math.Conj(y[i_]);
-                    }
-                    v = AP.Math.Conj(alpha)*y[i+1-i1];
-                    for(i_=tp1; i_<=tp2;i_++)
-                    {
-                        t[i_] = t[i_] + v*AP.Math.Conj(x[i_]);
-                    }
-                    i1_ = (tp1) - (i1);
-                    for(i_=i1; i_<=i;i_++)
-                    {
-                        a[i,i_] = a[i,i_] + t[i_+i1_];
-                    }
-                }
-            }
+      if (isupper) {
+        for (i = i1; i <= i2; i++) {
+          tp1 = i + 1 - i1;
+          tp2 = i2 - i1 + 1;
+          v = alpha * x[i + 1 - i1];
+          for (i_ = tp1; i_ <= tp2; i_++) {
+            t[i_] = v * AP.Math.Conj(y[i_]);
+          }
+          v = AP.Math.Conj(alpha) * y[i + 1 - i1];
+          for (i_ = tp1; i_ <= tp2; i_++) {
+            t[i_] = t[i_] + v * AP.Math.Conj(x[i_]);
+          }
+          i1_ = (tp1) - (i);
+          for (i_ = i; i_ <= i2; i_++) {
+            a[i, i_] = a[i, i_] + t[i_ + i1_];
+          }
         }
+      } else {
+        for (i = i1; i <= i2; i++) {
+          tp1 = 1;
+          tp2 = i + 1 - i1;
+          v = alpha * x[i + 1 - i1];
+          for (i_ = tp1; i_ <= tp2; i_++) {
+            t[i_] = v * AP.Math.Conj(y[i_]);
+          }
+          v = AP.Math.Conj(alpha) * y[i + 1 - i1];
+          for (i_ = tp1; i_ <= tp2; i_++) {
+            t[i_] = t[i_] + v * AP.Math.Conj(x[i_]);
+          }
+          i1_ = (tp1) - (i1);
+          for (i_ = i1; i_ <= i; i_++) {
+            a[i, i_] = a[i, i_] + t[i_ + i1_];
+          }
+        }
+      }
     }
+  }
 }
Index: /trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.ALGLIB/2.5.0/ALGLIB-2.5.0/inverseupdate.cs
===================================================================
--- /trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.ALGLIB/2.5.0/ALGLIB-2.5.0/inverseupdate.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.ALGLIB/2.5.0/ALGLIB-2.5.0/inverseupdate.cs	(revision 4068)
@@ -19,532 +19,479 @@
 *************************************************************************/
 
-using System;
-
-namespace alglib
-{
-    public class inverseupdate
-    {
-        /*************************************************************************
-        Inverse matrix update by the Sherman-Morrison formula
-
-        The algorithm updates matrix A^-1 when adding a number to an element
-        of matrix A.
-
-        Input parameters:
-            InvA    -   inverse of matrix A.
+
+namespace alglib {
+  public class inverseupdate {
+    /*************************************************************************
+    Inverse matrix update by the Sherman-Morrison formula
+
+    The algorithm updates matrix A^-1 when adding a number to an element
+    of matrix A.
+
+    Input parameters:
+        InvA    -   inverse of matrix A.
+                    Array whose indexes range within [0..N-1, 0..N-1].
+        N       -   size of matrix A.
+        UpdRow  -   row where the element to be updated is stored.
+        UpdColumn - column where the element to be updated is stored.
+        UpdVal  -   a number to be added to the element.
+
+
+    Output parameters:
+        InvA    -   inverse of modified matrix A.
+
+      -- ALGLIB --
+         Copyright 2005 by Bochkanov Sergey
+    *************************************************************************/
+    public static void rmatrixinvupdatesimple(ref double[,] inva,
+        int n,
+        int updrow,
+        int updcolumn,
+        double updval) {
+      double[] t1 = new double[0];
+      double[] t2 = new double[0];
+      int i = 0;
+      double lambda = 0;
+      double vt = 0;
+      int i_ = 0;
+
+      System.Diagnostics.Debug.Assert(updrow >= 0 & updrow < n, "RMatrixInvUpdateSimple: incorrect UpdRow!");
+      System.Diagnostics.Debug.Assert(updcolumn >= 0 & updcolumn < n, "RMatrixInvUpdateSimple: incorrect UpdColumn!");
+      t1 = new double[n - 1 + 1];
+      t2 = new double[n - 1 + 1];
+
+      //
+      // T1 = InvA * U
+      //
+      for (i_ = 0; i_ <= n - 1; i_++) {
+        t1[i_] = inva[i_, updrow];
+      }
+
+      //
+      // T2 = v*InvA
+      //
+      for (i_ = 0; i_ <= n - 1; i_++) {
+        t2[i_] = inva[updcolumn, i_];
+      }
+
+      //
+      // Lambda = v * InvA * U
+      //
+      lambda = updval * inva[updcolumn, updrow];
+
+      //
+      // InvA = InvA - correction
+      //
+      for (i = 0; i <= n - 1; i++) {
+        vt = updval * t1[i];
+        vt = vt / (1 + lambda);
+        for (i_ = 0; i_ <= n - 1; i_++) {
+          inva[i, i_] = inva[i, i_] - vt * t2[i_];
+        }
+      }
+    }
+
+
+    /*************************************************************************
+    Inverse matrix update by the Sherman-Morrison formula
+
+    The algorithm updates matrix A^-1 when adding a vector to a row
+    of matrix A.
+
+    Input parameters:
+        InvA    -   inverse of matrix A.
+                    Array whose indexes range within [0..N-1, 0..N-1].
+        N       -   size of matrix A.
+        UpdRow  -   the row of A whose vector V was added.
+                    0 <= Row <= N-1
+        V       -   the vector to be added to a row.
+                    Array whose index ranges within [0..N-1].
+
+    Output parameters:
+        InvA    -   inverse of modified matrix A.
+
+      -- ALGLIB --
+         Copyright 2005 by Bochkanov Sergey
+    *************************************************************************/
+    public static void rmatrixinvupdaterow(ref double[,] inva,
+        int n,
+        int updrow,
+        ref double[] v) {
+      double[] t1 = new double[0];
+      double[] t2 = new double[0];
+      int i = 0;
+      int j = 0;
+      double lambda = 0;
+      double vt = 0;
+      int i_ = 0;
+
+      t1 = new double[n - 1 + 1];
+      t2 = new double[n - 1 + 1];
+
+      //
+      // T1 = InvA * U
+      //
+      for (i_ = 0; i_ <= n - 1; i_++) {
+        t1[i_] = inva[i_, updrow];
+      }
+
+      //
+      // T2 = v*InvA
+      // Lambda = v * InvA * U
+      //
+      for (j = 0; j <= n - 1; j++) {
+        vt = 0.0;
+        for (i_ = 0; i_ <= n - 1; i_++) {
+          vt += v[i_] * inva[i_, j];
+        }
+        t2[j] = vt;
+      }
+      lambda = t2[updrow];
+
+      //
+      // InvA = InvA - correction
+      //
+      for (i = 0; i <= n - 1; i++) {
+        vt = t1[i] / (1 + lambda);
+        for (i_ = 0; i_ <= n - 1; i_++) {
+          inva[i, i_] = inva[i, i_] - vt * t2[i_];
+        }
+      }
+    }
+
+
+    /*************************************************************************
+    Inverse matrix update by the Sherman-Morrison formula
+
+    The algorithm updates matrix A^-1 when adding a vector to a column
+    of matrix A.
+
+    Input parameters:
+        InvA        -   inverse of matrix A.
                         Array whose indexes range within [0..N-1, 0..N-1].
-            N       -   size of matrix A.
-            UpdRow  -   row where the element to be updated is stored.
-            UpdColumn - column where the element to be updated is stored.
-            UpdVal  -   a number to be added to the element.
-
-
-        Output parameters:
-            InvA    -   inverse of modified matrix A.
-
-          -- ALGLIB --
-             Copyright 2005 by Bochkanov Sergey
-        *************************************************************************/
-        public static void rmatrixinvupdatesimple(ref double[,] inva,
-            int n,
-            int updrow,
-            int updcolumn,
-            double updval)
-        {
-            double[] t1 = new double[0];
-            double[] t2 = new double[0];
-            int i = 0;
-            double lambda = 0;
-            double vt = 0;
-            int i_ = 0;
-
-            System.Diagnostics.Debug.Assert(updrow>=0 & updrow<n, "RMatrixInvUpdateSimple: incorrect UpdRow!");
-            System.Diagnostics.Debug.Assert(updcolumn>=0 & updcolumn<n, "RMatrixInvUpdateSimple: incorrect UpdColumn!");
-            t1 = new double[n-1+1];
-            t2 = new double[n-1+1];
-            
-            //
-            // T1 = InvA * U
-            //
-            for(i_=0; i_<=n-1;i_++)
-            {
-                t1[i_] = inva[i_,updrow];
-            }
-            
-            //
-            // T2 = v*InvA
-            //
-            for(i_=0; i_<=n-1;i_++)
-            {
-                t2[i_] = inva[updcolumn,i_];
-            }
-            
-            //
-            // Lambda = v * InvA * U
-            //
-            lambda = updval*inva[updcolumn,updrow];
-            
-            //
-            // InvA = InvA - correction
-            //
-            for(i=0; i<=n-1; i++)
-            {
-                vt = updval*t1[i];
-                vt = vt/(1+lambda);
-                for(i_=0; i_<=n-1;i_++)
-                {
-                    inva[i,i_] = inva[i,i_] - vt*t2[i_];
-                }
-            }
-        }
-
-
-        /*************************************************************************
-        Inverse matrix update by the Sherman-Morrison formula
-
-        The algorithm updates matrix A^-1 when adding a vector to a row
-        of matrix A.
-
-        Input parameters:
-            InvA    -   inverse of matrix A.
-                        Array whose indexes range within [0..N-1, 0..N-1].
-            N       -   size of matrix A.
-            UpdRow  -   the row of A whose vector V was added.
-                        0 <= Row <= N-1
-            V       -   the vector to be added to a row.
+        N           -   size of matrix A.
+        UpdColumn   -   the column of A whose vector U was added.
+                        0 <= UpdColumn <= N-1
+        U           -   the vector to be added to a column.
                         Array whose index ranges within [0..N-1].
 
-        Output parameters:
-            InvA    -   inverse of modified matrix A.
-
-          -- ALGLIB --
-             Copyright 2005 by Bochkanov Sergey
-        *************************************************************************/
-        public static void rmatrixinvupdaterow(ref double[,] inva,
-            int n,
-            int updrow,
-            ref double[] v)
-        {
-            double[] t1 = new double[0];
-            double[] t2 = new double[0];
-            int i = 0;
-            int j = 0;
-            double lambda = 0;
-            double vt = 0;
-            int i_ = 0;
-
-            t1 = new double[n-1+1];
-            t2 = new double[n-1+1];
-            
-            //
-            // T1 = InvA * U
-            //
-            for(i_=0; i_<=n-1;i_++)
-            {
-                t1[i_] = inva[i_,updrow];
-            }
-            
-            //
-            // T2 = v*InvA
-            // Lambda = v * InvA * U
-            //
-            for(j=0; j<=n-1; j++)
-            {
-                vt = 0.0;
-                for(i_=0; i_<=n-1;i_++)
-                {
-                    vt += v[i_]*inva[i_,j];
-                }
-                t2[j] = vt;
-            }
-            lambda = t2[updrow];
-            
-            //
-            // InvA = InvA - correction
-            //
-            for(i=0; i<=n-1; i++)
-            {
-                vt = t1[i]/(1+lambda);
-                for(i_=0; i_<=n-1;i_++)
-                {
-                    inva[i,i_] = inva[i,i_] - vt*t2[i_];
-                }
-            }
-        }
-
-
-        /*************************************************************************
-        Inverse matrix update by the Sherman-Morrison formula
-
-        The algorithm updates matrix A^-1 when adding a vector to a column
-        of matrix A.
-
-        Input parameters:
-            InvA        -   inverse of matrix A.
-                            Array whose indexes range within [0..N-1, 0..N-1].
-            N           -   size of matrix A.
-            UpdColumn   -   the column of A whose vector U was added.
-                            0 <= UpdColumn <= N-1
-            U           -   the vector to be added to a column.
-                            Array whose index ranges within [0..N-1].
-
-        Output parameters:
-            InvA        -   inverse of modified matrix A.
-
-          -- ALGLIB --
-             Copyright 2005 by Bochkanov Sergey
-        *************************************************************************/
-        public static void rmatrixinvupdatecolumn(ref double[,] inva,
-            int n,
-            int updcolumn,
-            ref double[] u)
-        {
-            double[] t1 = new double[0];
-            double[] t2 = new double[0];
-            int i = 0;
-            double lambda = 0;
-            double vt = 0;
-            int i_ = 0;
-
-            t1 = new double[n-1+1];
-            t2 = new double[n-1+1];
-            
-            //
-            // T1 = InvA * U
-            // Lambda = v * InvA * U
-            //
-            for(i=0; i<=n-1; i++)
-            {
-                vt = 0.0;
-                for(i_=0; i_<=n-1;i_++)
-                {
-                    vt += inva[i,i_]*u[i_];
-                }
-                t1[i] = vt;
-            }
-            lambda = t1[updcolumn];
-            
-            //
-            // T2 = v*InvA
-            //
-            for(i_=0; i_<=n-1;i_++)
-            {
-                t2[i_] = inva[updcolumn,i_];
-            }
-            
-            //
-            // InvA = InvA - correction
-            //
-            for(i=0; i<=n-1; i++)
-            {
-                vt = t1[i]/(1+lambda);
-                for(i_=0; i_<=n-1;i_++)
-                {
-                    inva[i,i_] = inva[i,i_] - vt*t2[i_];
-                }
-            }
-        }
-
-
-        /*************************************************************************
-        Inverse matrix update by the Sherman-Morrison formula
-
-        The algorithm computes the inverse of matrix A+u*v by using the given matrix
-        A^-1 and the vectors u and v.
-
-        Input parameters:
-            InvA    -   inverse of matrix A.
-                        Array whose indexes range within [0..N-1, 0..N-1].
-            N       -   size of matrix A.
-            U       -   the vector modifying the matrix.
-                        Array whose index ranges within [0..N-1].
-            V       -   the vector modifying the matrix.
-                        Array whose index ranges within [0..N-1].
-
-        Output parameters:
-            InvA - inverse of matrix A + u*v'.
-
-          -- ALGLIB --
-             Copyright 2005 by Bochkanov Sergey
-        *************************************************************************/
-        public static void rmatrixinvupdateuv(ref double[,] inva,
-            int n,
-            ref double[] u,
-            ref double[] v)
-        {
-            double[] t1 = new double[0];
-            double[] t2 = new double[0];
-            int i = 0;
-            int j = 0;
-            double lambda = 0;
-            double vt = 0;
-            int i_ = 0;
-
-            t1 = new double[n-1+1];
-            t2 = new double[n-1+1];
-            
-            //
-            // T1 = InvA * U
-            // Lambda = v * T1
-            //
-            for(i=0; i<=n-1; i++)
-            {
-                vt = 0.0;
-                for(i_=0; i_<=n-1;i_++)
-                {
-                    vt += inva[i,i_]*u[i_];
-                }
-                t1[i] = vt;
-            }
-            lambda = 0.0;
-            for(i_=0; i_<=n-1;i_++)
-            {
-                lambda += v[i_]*t1[i_];
-            }
-            
-            //
-            // T2 = v*InvA
-            //
-            for(j=0; j<=n-1; j++)
-            {
-                vt = 0.0;
-                for(i_=0; i_<=n-1;i_++)
-                {
-                    vt += v[i_]*inva[i_,j];
-                }
-                t2[j] = vt;
-            }
-            
-            //
-            // InvA = InvA - correction
-            //
-            for(i=0; i<=n-1; i++)
-            {
-                vt = t1[i]/(1+lambda);
-                for(i_=0; i_<=n-1;i_++)
-                {
-                    inva[i,i_] = inva[i,i_] - vt*t2[i_];
-                }
-            }
-        }
-
-
-        public static void shermanmorrisonsimpleupdate(ref double[,] inva,
-            int n,
-            int updrow,
-            int updcolumn,
-            double updval)
-        {
-            double[] t1 = new double[0];
-            double[] t2 = new double[0];
-            int i = 0;
-            double lambda = 0;
-            double vt = 0;
-            int i_ = 0;
-
-            t1 = new double[n+1];
-            t2 = new double[n+1];
-            
-            //
-            // T1 = InvA * U
-            //
-            for(i_=1; i_<=n;i_++)
-            {
-                t1[i_] = inva[i_,updrow];
-            }
-            
-            //
-            // T2 = v*InvA
-            //
-            for(i_=1; i_<=n;i_++)
-            {
-                t2[i_] = inva[updcolumn,i_];
-            }
-            
-            //
-            // Lambda = v * InvA * U
-            //
-            lambda = updval*inva[updcolumn,updrow];
-            
-            //
-            // InvA = InvA - correction
-            //
-            for(i=1; i<=n; i++)
-            {
-                vt = updval*t1[i];
-                vt = vt/(1+lambda);
-                for(i_=1; i_<=n;i_++)
-                {
-                    inva[i,i_] = inva[i,i_] - vt*t2[i_];
-                }
-            }
-        }
-
-
-        public static void shermanmorrisonupdaterow(ref double[,] inva,
-            int n,
-            int updrow,
-            ref double[] v)
-        {
-            double[] t1 = new double[0];
-            double[] t2 = new double[0];
-            int i = 0;
-            int j = 0;
-            double lambda = 0;
-            double vt = 0;
-            int i_ = 0;
-
-            t1 = new double[n+1];
-            t2 = new double[n+1];
-            
-            //
-            // T1 = InvA * U
-            //
-            for(i_=1; i_<=n;i_++)
-            {
-                t1[i_] = inva[i_,updrow];
-            }
-            
-            //
-            // T2 = v*InvA
-            // Lambda = v * InvA * U
-            //
-            for(j=1; j<=n; j++)
-            {
-                vt = 0.0;
-                for(i_=1; i_<=n;i_++)
-                {
-                    vt += v[i_]*inva[i_,j];
-                }
-                t2[j] = vt;
-            }
-            lambda = t2[updrow];
-            
-            //
-            // InvA = InvA - correction
-            //
-            for(i=1; i<=n; i++)
-            {
-                vt = t1[i]/(1+lambda);
-                for(i_=1; i_<=n;i_++)
-                {
-                    inva[i,i_] = inva[i,i_] - vt*t2[i_];
-                }
-            }
-        }
-
-
-        public static void shermanmorrisonupdatecolumn(ref double[,] inva,
-            int n,
-            int updcolumn,
-            ref double[] u)
-        {
-            double[] t1 = new double[0];
-            double[] t2 = new double[0];
-            int i = 0;
-            double lambda = 0;
-            double vt = 0;
-            int i_ = 0;
-
-            t1 = new double[n+1];
-            t2 = new double[n+1];
-            
-            //
-            // T1 = InvA * U
-            // Lambda = v * InvA * U
-            //
-            for(i=1; i<=n; i++)
-            {
-                vt = 0.0;
-                for(i_=1; i_<=n;i_++)
-                {
-                    vt += inva[i,i_]*u[i_];
-                }
-                t1[i] = vt;
-            }
-            lambda = t1[updcolumn];
-            
-            //
-            // T2 = v*InvA
-            //
-            for(i_=1; i_<=n;i_++)
-            {
-                t2[i_] = inva[updcolumn,i_];
-            }
-            
-            //
-            // InvA = InvA - correction
-            //
-            for(i=1; i<=n; i++)
-            {
-                vt = t1[i]/(1+lambda);
-                for(i_=1; i_<=n;i_++)
-                {
-                    inva[i,i_] = inva[i,i_] - vt*t2[i_];
-                }
-            }
-        }
-
-
-        public static void shermanmorrisonupdateuv(ref double[,] inva,
-            int n,
-            ref double[] u,
-            ref double[] v)
-        {
-            double[] t1 = new double[0];
-            double[] t2 = new double[0];
-            int i = 0;
-            int j = 0;
-            double lambda = 0;
-            double vt = 0;
-            int i_ = 0;
-
-            t1 = new double[n+1];
-            t2 = new double[n+1];
-            
-            //
-            // T1 = InvA * U
-            // Lambda = v * T1
-            //
-            for(i=1; i<=n; i++)
-            {
-                vt = 0.0;
-                for(i_=1; i_<=n;i_++)
-                {
-                    vt += inva[i,i_]*u[i_];
-                }
-                t1[i] = vt;
-            }
-            lambda = 0.0;
-            for(i_=1; i_<=n;i_++)
-            {
-                lambda += v[i_]*t1[i_];
-            }
-            
-            //
-            // T2 = v*InvA
-            //
-            for(j=1; j<=n; j++)
-            {
-                vt = 0.0;
-                for(i_=1; i_<=n;i_++)
-                {
-                    vt += v[i_]*inva[i_,j];
-                }
-                t2[j] = vt;
-            }
-            
-            //
-            // InvA = InvA - correction
-            //
-            for(i=1; i<=n; i++)
-            {
-                vt = t1[i]/(1+lambda);
-                for(i_=1; i_<=n;i_++)
-                {
-                    inva[i,i_] = inva[i,i_] - vt*t2[i_];
-                }
-            }
-        }
-    }
+    Output parameters:
+        InvA        -   inverse of modified matrix A.
+
+      -- ALGLIB --
+         Copyright 2005 by Bochkanov Sergey
+    *************************************************************************/
+    public static void rmatrixinvupdatecolumn(ref double[,] inva,
+        int n,
+        int updcolumn,
+        ref double[] u) {
+      double[] t1 = new double[0];
+      double[] t2 = new double[0];
+      int i = 0;
+      double lambda = 0;
+      double vt = 0;
+      int i_ = 0;
+
+      t1 = new double[n - 1 + 1];
+      t2 = new double[n - 1 + 1];
+
+      //
+      // T1 = InvA * U
+      // Lambda = v * InvA * U
+      //
+      for (i = 0; i <= n - 1; i++) {
+        vt = 0.0;
+        for (i_ = 0; i_ <= n - 1; i_++) {
+          vt += inva[i, i_] * u[i_];
+        }
+        t1[i] = vt;
+      }
+      lambda = t1[updcolumn];
+
+      //
+      // T2 = v*InvA
+      //
+      for (i_ = 0; i_ <= n - 1; i_++) {
+        t2[i_] = inva[updcolumn, i_];
+      }
+
+      //
+      // InvA = InvA - correction
+      //
+      for (i = 0; i <= n - 1; i++) {
+        vt = t1[i] / (1 + lambda);
+        for (i_ = 0; i_ <= n - 1; i_++) {
+          inva[i, i_] = inva[i, i_] - vt * t2[i_];
+        }
+      }
+    }
+
+
+    /*************************************************************************
+    Inverse matrix update by the Sherman-Morrison formula
+
+    The algorithm computes the inverse of matrix A+u*v by using the given matrix
+    A^-1 and the vectors u and v.
+
+    Input parameters:
+        InvA    -   inverse of matrix A.
+                    Array whose indexes range within [0..N-1, 0..N-1].
+        N       -   size of matrix A.
+        U       -   the vector modifying the matrix.
+                    Array whose index ranges within [0..N-1].
+        V       -   the vector modifying the matrix.
+                    Array whose index ranges within [0..N-1].
+
+    Output parameters:
+        InvA - inverse of matrix A + u*v'.
+
+      -- ALGLIB --
+         Copyright 2005 by Bochkanov Sergey
+    *************************************************************************/
+    public static void rmatrixinvupdateuv(ref double[,] inva,
+        int n,
+        ref double[] u,
+        ref double[] v) {
+      double[] t1 = new double[0];
+      double[] t2 = new double[0];
+      int i = 0;
+      int j = 0;
+      double lambda = 0;
+      double vt = 0;
+      int i_ = 0;
+
+      t1 = new double[n - 1 + 1];
+      t2 = new double[n - 1 + 1];
+
+      //
+      // T1 = InvA * U
+      // Lambda = v * T1
+      //
+      for (i = 0; i <= n - 1; i++) {
+        vt = 0.0;
+        for (i_ = 0; i_ <= n - 1; i_++) {
+          vt += inva[i, i_] * u[i_];
+        }
+        t1[i] = vt;
+      }
+      lambda = 0.0;
+      for (i_ = 0; i_ <= n - 1; i_++) {
+        lambda += v[i_] * t1[i_];
+      }
+
+      //
+      // T2 = v*InvA
+      //
+      for (j = 0; j <= n - 1; j++) {
+        vt = 0.0;
+        for (i_ = 0; i_ <= n - 1; i_++) {
+          vt += v[i_] * inva[i_, j];
+        }
+        t2[j] = vt;
+      }
+
+      //
+      // InvA = InvA - correction
+      //
+      for (i = 0; i <= n - 1; i++) {
+        vt = t1[i] / (1 + lambda);
+        for (i_ = 0; i_ <= n - 1; i_++) {
+          inva[i, i_] = inva[i, i_] - vt * t2[i_];
+        }
+      }
+    }
+
+
+    public static void shermanmorrisonsimpleupdate(ref double[,] inva,
+        int n,
+        int updrow,
+        int updcolumn,
+        double updval) {
+      double[] t1 = new double[0];
+      double[] t2 = new double[0];
+      int i = 0;
+      double lambda = 0;
+      double vt = 0;
+      int i_ = 0;
+
+      t1 = new double[n + 1];
+      t2 = new double[n + 1];
+
+      //
+      // T1 = InvA * U
+      //
+      for (i_ = 1; i_ <= n; i_++) {
+        t1[i_] = inva[i_, updrow];
+      }
+
+      //
+      // T2 = v*InvA
+      //
+      for (i_ = 1; i_ <= n; i_++) {
+        t2[i_] = inva[updcolumn, i_];
+      }
+
+      //
+      // Lambda = v * InvA * U
+      //
+      lambda = updval * inva[updcolumn, updrow];
+
+      //
+      // InvA = InvA - correction
+      //
+      for (i = 1; i <= n; i++) {
+        vt = updval * t1[i];
+        vt = vt / (1 + lambda);
+        for (i_ = 1; i_ <= n; i_++) {
+          inva[i, i_] = inva[i, i_] - vt * t2[i_];
+        }
+      }
+    }
+
+
+    public static void shermanmorrisonupdaterow(ref double[,] inva,
+        int n,
+        int updrow,
+        ref double[] v) {
+      double[] t1 = new double[0];
+      double[] t2 = new double[0];
+      int i = 0;
+      int j = 0;
+      double lambda = 0;
+      double vt = 0;
+      int i_ = 0;
+
+      t1 = new double[n + 1];
+      t2 = new double[n + 1];
+
+      //
+      // T1 = InvA * U
+      //
+      for (i_ = 1; i_ <= n; i_++) {
+        t1[i_] = inva[i_, updrow];
+      }
+
+      //
+      // T2 = v*InvA
+      // Lambda = v * InvA * U
+      //
+      for (j = 1; j <= n; j++) {
+        vt = 0.0;
+        for (i_ = 1; i_ <= n; i_++) {
+          vt += v[i_] * inva[i_, j];
+        }
+        t2[j] = vt;
+      }
+      lambda = t2[updrow];
+
+      //
+      // InvA = InvA - correction
+      //
+      for (i = 1; i <= n; i++) {
+        vt = t1[i] / (1 + lambda);
+        for (i_ = 1; i_ <= n; i_++) {
+          inva[i, i_] = inva[i, i_] - vt * t2[i_];
+        }
+      }
+    }
+
+
+    public static void shermanmorrisonupdatecolumn(ref double[,] inva,
+        int n,
+        int updcolumn,
+        ref double[] u) {
+      double[] t1 = new double[0];
+      double[] t2 = new double[0];
+      int i = 0;
+      double lambda = 0;
+      double vt = 0;
+      int i_ = 0;
+
+      t1 = new double[n + 1];
+      t2 = new double[n + 1];
+
+      //
+      // T1 = InvA * U
+      // Lambda = v * InvA * U
+      //
+      for (i = 1; i <= n; i++) {
+        vt = 0.0;
+        for (i_ = 1; i_ <= n; i_++) {
+          vt += inva[i, i_] * u[i_];
+        }
+        t1[i] = vt;
+      }
+      lambda = t1[updcolumn];
+
+      //
+      // T2 = v*InvA
+      //
+      for (i_ = 1; i_ <= n; i_++) {
+        t2[i_] = inva[updcolumn, i_];
+      }
+
+      //
+      // InvA = InvA - correction
+      //
+      for (i = 1; i <= n; i++) {
+        vt = t1[i] / (1 + lambda);
+        for (i_ = 1; i_ <= n; i_++) {
+          inva[i, i_] = inva[i, i_] - vt * t2[i_];
+        }
+      }
+    }
+
+
+    public static void shermanmorrisonupdateuv(ref double[,] inva,
+        int n,
+        ref double[] u,
+        ref double[] v) {
+      double[] t1 = new double[0];
+      double[] t2 = new double[0];
+      int i = 0;
+      int j = 0;
+      double lambda = 0;
+      double vt = 0;
+      int i_ = 0;
+
+      t1 = new double[n + 1];
+      t2 = new double[n + 1];
+
+      //
+      // T1 = InvA * U
+      // Lambda = v * T1
+      //
+      for (i = 1; i <= n; i++) {
+        vt = 0.0;
+        for (i_ = 1; i_ <= n; i_++) {
+          vt += inva[i, i_] * u[i_];
+        }
+        t1[i] = vt;
+      }
+      lambda = 0.0;
+      for (i_ = 1; i_ <= n; i_++) {
+        lambda += v[i_] * t1[i_];
+      }
+
+      //
+      // T2 = v*InvA
+      //
+      for (j = 1; j <= n; j++) {
+        vt = 0.0;
+        for (i_ = 1; i_ <= n; i_++) {
+          vt += v[i_] * inva[i_, j];
+        }
+        t2[j] = vt;
+      }
+
+      //
+      // InvA = InvA - correction
+      //
+      for (i = 1; i <= n; i++) {
+        vt = t1[i] / (1 + lambda);
+        for (i_ = 1; i_ <= n; i_++) {
+          inva[i, i_] = inva[i, i_] - vt * t2[i_];
+        }
+      }
+    }
+  }
 }
Index: /trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.ALGLIB/2.5.0/ALGLIB-2.5.0/kmeans.cs
===================================================================
--- /trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.ALGLIB/2.5.0/ALGLIB-2.5.0/kmeans.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.ALGLIB/2.5.0/ALGLIB-2.5.0/kmeans.cs	(revision 4068)
@@ -19,365 +19,316 @@
 *************************************************************************/
 
-using System;
-
-namespace alglib
-{
-    public class kmeans
-    {
-        /*************************************************************************
-        k-means++ clusterization
-
-        INPUT PARAMETERS:
-            XY          -   dataset, array [0..NPoints-1,0..NVars-1].
-            NPoints     -   dataset size, NPoints>=K
-            NVars       -   number of variables, NVars>=1
-            K           -   desired number of clusters, K>=1
-            Restarts    -   number of restarts, Restarts>=1
-
-        OUTPUT PARAMETERS:
-            Info        -   return code:
-                            * -3, if taskis degenerate (number of distinct points is
-                                  less than K)
-                            * -1, if incorrect NPoints/NFeatures/K/Restarts was passed
-                            *  1, if subroutine finished successfully
-            C           -   array[0..NVars-1,0..K-1].matrix whose columns store
-                            cluster's centers
-            XYC         -   array which contains number of clusters dataset points
-                            belong to.
-
-          -- ALGLIB --
-             Copyright 21.03.2009 by Bochkanov Sergey
-        *************************************************************************/
-        public static void kmeansgenerate(ref double[,] xy,
-            int npoints,
-            int nvars,
-            int k,
-            int restarts,
-            ref int info,
-            ref double[,] c,
-            ref int[] xyc)
-        {
-            int i = 0;
-            int j = 0;
-            double[,] ct = new double[0,0];
-            double[,] ctbest = new double[0,0];
-            double e = 0;
-            double ebest = 0;
-            double[] x = new double[0];
-            double[] tmp = new double[0];
-            double[] d2 = new double[0];
-            double[] p = new double[0];
-            int[] csizes = new int[0];
-            bool[] cbusy = new bool[0];
-            double v = 0;
-            int cclosest = 0;
-            double dclosest = 0;
-            double[] work = new double[0];
-            bool waschanges = new bool();
-            bool zerosizeclusters = new bool();
-            int pass = 0;
-            int i_ = 0;
-
-            
+
+namespace alglib {
+  public class kmeans {
+    /*************************************************************************
+    k-means++ clusterization
+
+    INPUT PARAMETERS:
+        XY          -   dataset, array [0..NPoints-1,0..NVars-1].
+        NPoints     -   dataset size, NPoints>=K
+        NVars       -   number of variables, NVars>=1
+        K           -   desired number of clusters, K>=1
+        Restarts    -   number of restarts, Restarts>=1
+
+    OUTPUT PARAMETERS:
+        Info        -   return code:
+                        * -3, if taskis degenerate (number of distinct points is
+                              less than K)
+                        * -1, if incorrect NPoints/NFeatures/K/Restarts was passed
+                        *  1, if subroutine finished successfully
+        C           -   array[0..NVars-1,0..K-1].matrix whose columns store
+                        cluster's centers
+        XYC         -   array which contains number of clusters dataset points
+                        belong to.
+
+      -- ALGLIB --
+         Copyright 21.03.2009 by Bochkanov Sergey
+    *************************************************************************/
+    public static void kmeansgenerate(ref double[,] xy,
+        int npoints,
+        int nvars,
+        int k,
+        int restarts,
+        ref int info,
+        ref double[,] c,
+        ref int[] xyc) {
+      int i = 0;
+      int j = 0;
+      double[,] ct = new double[0, 0];
+      double[,] ctbest = new double[0, 0];
+      double e = 0;
+      double ebest = 0;
+      double[] x = new double[0];
+      double[] tmp = new double[0];
+      double[] d2 = new double[0];
+      double[] p = new double[0];
+      int[] csizes = new int[0];
+      bool[] cbusy = new bool[0];
+      double v = 0;
+      int cclosest = 0;
+      double dclosest = 0;
+      double[] work = new double[0];
+      bool waschanges = new bool();
+      bool zerosizeclusters = new bool();
+      int pass = 0;
+      int i_ = 0;
+
+
+      //
+      // Test parameters
+      //
+      if (npoints < k | nvars < 1 | k < 1 | restarts < 1) {
+        info = -1;
+        return;
+      }
+
+      //
+      // TODO: special case K=1
+      // TODO: special case K=NPoints
+      //
+      info = 1;
+
+      //
+      // Multiple passes of k-means++ algorithm
+      //
+      ct = new double[k - 1 + 1, nvars - 1 + 1];
+      ctbest = new double[k - 1 + 1, nvars - 1 + 1];
+      xyc = new int[npoints - 1 + 1];
+      d2 = new double[npoints - 1 + 1];
+      p = new double[npoints - 1 + 1];
+      tmp = new double[nvars - 1 + 1];
+      csizes = new int[k - 1 + 1];
+      cbusy = new bool[k - 1 + 1];
+      ebest = AP.Math.MaxRealNumber;
+      for (pass = 1; pass <= restarts; pass++) {
+
+        //
+        // Select initial centers  using k-means++ algorithm
+        // 1. Choose first center at random
+        // 2. Choose next centers using their distance from centers already chosen
+        //
+        // Note that for performance reasons centers are stored in ROWS of CT, not
+        // in columns. We'll transpose CT in the end and store it in the C.
+        //
+        i = AP.Math.RandomInteger(npoints);
+        for (i_ = 0; i_ <= nvars - 1; i_++) {
+          ct[0, i_] = xy[i, i_];
+        }
+        cbusy[0] = true;
+        for (i = 1; i <= k - 1; i++) {
+          cbusy[i] = false;
+        }
+        if (!selectcenterpp(ref xy, npoints, nvars, ref ct, cbusy, k, ref d2, ref p, ref tmp)) {
+          info = -3;
+          return;
+        }
+
+        //
+        // Update centers:
+        // 2. update center positions
+        //
+        while (true) {
+
+          //
+          // fill XYC with center numbers
+          //
+          waschanges = false;
+          for (i = 0; i <= npoints - 1; i++) {
+            cclosest = -1;
+            dclosest = AP.Math.MaxRealNumber;
+            for (j = 0; j <= k - 1; j++) {
+              for (i_ = 0; i_ <= nvars - 1; i_++) {
+                tmp[i_] = xy[i, i_];
+              }
+              for (i_ = 0; i_ <= nvars - 1; i_++) {
+                tmp[i_] = tmp[i_] - ct[j, i_];
+              }
+              v = 0.0;
+              for (i_ = 0; i_ <= nvars - 1; i_++) {
+                v += tmp[i_] * tmp[i_];
+              }
+              if ((double)(v) < (double)(dclosest)) {
+                cclosest = j;
+                dclosest = v;
+              }
+            }
+            if (xyc[i] != cclosest) {
+              waschanges = true;
+            }
+            xyc[i] = cclosest;
+          }
+
+          //
+          // Update centers
+          //
+          for (j = 0; j <= k - 1; j++) {
+            csizes[j] = 0;
+          }
+          for (i = 0; i <= k - 1; i++) {
+            for (j = 0; j <= nvars - 1; j++) {
+              ct[i, j] = 0;
+            }
+          }
+          for (i = 0; i <= npoints - 1; i++) {
+            csizes[xyc[i]] = csizes[xyc[i]] + 1;
+            for (i_ = 0; i_ <= nvars - 1; i_++) {
+              ct[xyc[i], i_] = ct[xyc[i], i_] + xy[i, i_];
+            }
+          }
+          zerosizeclusters = false;
+          for (i = 0; i <= k - 1; i++) {
+            cbusy[i] = csizes[i] != 0;
+            zerosizeclusters = zerosizeclusters | csizes[i] == 0;
+          }
+          if (zerosizeclusters) {
+
             //
-            // Test parameters
+            // Some clusters have zero size - rare, but possible.
+            // We'll choose new centers for such clusters using k-means++ rule
+            // and restart algorithm
             //
-            if( npoints<k | nvars<1 | k<1 | restarts<1 )
-            {
-                info = -1;
-                return;
-            }
-            
-            //
-            // TODO: special case K=1
-            // TODO: special case K=NPoints
-            //
-            info = 1;
-            
-            //
-            // Multiple passes of k-means++ algorithm
-            //
-            ct = new double[k-1+1, nvars-1+1];
-            ctbest = new double[k-1+1, nvars-1+1];
-            xyc = new int[npoints-1+1];
-            d2 = new double[npoints-1+1];
-            p = new double[npoints-1+1];
-            tmp = new double[nvars-1+1];
-            csizes = new int[k-1+1];
-            cbusy = new bool[k-1+1];
-            ebest = AP.Math.MaxRealNumber;
-            for(pass=1; pass<=restarts; pass++)
-            {
-                
-                //
-                // Select initial centers  using k-means++ algorithm
-                // 1. Choose first center at random
-                // 2. Choose next centers using their distance from centers already chosen
-                //
-                // Note that for performance reasons centers are stored in ROWS of CT, not
-                // in columns. We'll transpose CT in the end and store it in the C.
-                //
-                i = AP.Math.RandomInteger(npoints);
-                for(i_=0; i_<=nvars-1;i_++)
-                {
-                    ct[0,i_] = xy[i,i_];
+            if (!selectcenterpp(ref xy, npoints, nvars, ref ct, cbusy, k, ref d2, ref p, ref tmp)) {
+              info = -3;
+              return;
+            }
+            continue;
+          }
+          for (j = 0; j <= k - 1; j++) {
+            v = (double)(1) / (double)(csizes[j]);
+            for (i_ = 0; i_ <= nvars - 1; i_++) {
+              ct[j, i_] = v * ct[j, i_];
+            }
+          }
+
+          //
+          // if nothing has changed during iteration
+          //
+          if (!waschanges) {
+            break;
+          }
+        }
+
+        //
+        // 3. Calculate E, compare with best centers found so far
+        //
+        e = 0;
+        for (i = 0; i <= npoints - 1; i++) {
+          for (i_ = 0; i_ <= nvars - 1; i_++) {
+            tmp[i_] = xy[i, i_];
+          }
+          for (i_ = 0; i_ <= nvars - 1; i_++) {
+            tmp[i_] = tmp[i_] - ct[xyc[i], i_];
+          }
+          v = 0.0;
+          for (i_ = 0; i_ <= nvars - 1; i_++) {
+            v += tmp[i_] * tmp[i_];
+          }
+          e = e + v;
+        }
+        if ((double)(e) < (double)(ebest)) {
+
+          //
+          // store partition
+          //
+          blas.copymatrix(ref ct, 0, k - 1, 0, nvars - 1, ref ctbest, 0, k - 1, 0, nvars - 1);
+        }
+      }
+
+      //
+      // Copy and transpose
+      //
+      c = new double[nvars - 1 + 1, k - 1 + 1];
+      blas.copyandtranspose(ref ctbest, 0, k - 1, 0, nvars - 1, ref c, 0, nvars - 1, 0, k - 1);
+    }
+
+
+    /*************************************************************************
+    Select center for a new cluster using k-means++ rule
+    *************************************************************************/
+    private static bool selectcenterpp(ref double[,] xy,
+        int npoints,
+        int nvars,
+        ref double[,] centers,
+        bool[] busycenters,
+        int ccnt,
+        ref double[] d2,
+        ref double[] p,
+        ref double[] tmp) {
+      bool result = new bool();
+      int i = 0;
+      int j = 0;
+      int cc = 0;
+      double v = 0;
+      double s = 0;
+      int i_ = 0;
+
+      busycenters = (bool[])busycenters.Clone();
+
+      result = true;
+      for (cc = 0; cc <= ccnt - 1; cc++) {
+        if (!busycenters[cc]) {
+
+          //
+          // fill D2
+          //
+          for (i = 0; i <= npoints - 1; i++) {
+            d2[i] = AP.Math.MaxRealNumber;
+            for (j = 0; j <= ccnt - 1; j++) {
+              if (busycenters[j]) {
+                for (i_ = 0; i_ <= nvars - 1; i_++) {
+                  tmp[i_] = xy[i, i_];
                 }
-                cbusy[0] = true;
-                for(i=1; i<=k-1; i++)
-                {
-                    cbusy[i] = false;
+                for (i_ = 0; i_ <= nvars - 1; i_++) {
+                  tmp[i_] = tmp[i_] - centers[j, i_];
                 }
-                if( !selectcenterpp(ref xy, npoints, nvars, ref ct, cbusy, k, ref d2, ref p, ref tmp) )
-                {
-                    info = -3;
-                    return;
+                v = 0.0;
+                for (i_ = 0; i_ <= nvars - 1; i_++) {
+                  v += tmp[i_] * tmp[i_];
                 }
-                
-                //
-                // Update centers:
-                // 2. update center positions
-                //
-                while( true )
-                {
-                    
-                    //
-                    // fill XYC with center numbers
-                    //
-                    waschanges = false;
-                    for(i=0; i<=npoints-1; i++)
-                    {
-                        cclosest = -1;
-                        dclosest = AP.Math.MaxRealNumber;
-                        for(j=0; j<=k-1; j++)
-                        {
-                            for(i_=0; i_<=nvars-1;i_++)
-                            {
-                                tmp[i_] = xy[i,i_];
-                            }
-                            for(i_=0; i_<=nvars-1;i_++)
-                            {
-                                tmp[i_] = tmp[i_] - ct[j,i_];
-                            }
-                            v = 0.0;
-                            for(i_=0; i_<=nvars-1;i_++)
-                            {
-                                v += tmp[i_]*tmp[i_];
-                            }
-                            if( (double)(v)<(double)(dclosest) )
-                            {
-                                cclosest = j;
-                                dclosest = v;
-                            }
-                        }
-                        if( xyc[i]!=cclosest )
-                        {
-                            waschanges = true;
-                        }
-                        xyc[i] = cclosest;
-                    }
-                    
-                    //
-                    // Update centers
-                    //
-                    for(j=0; j<=k-1; j++)
-                    {
-                        csizes[j] = 0;
-                    }
-                    for(i=0; i<=k-1; i++)
-                    {
-                        for(j=0; j<=nvars-1; j++)
-                        {
-                            ct[i,j] = 0;
-                        }
-                    }
-                    for(i=0; i<=npoints-1; i++)
-                    {
-                        csizes[xyc[i]] = csizes[xyc[i]]+1;
-                        for(i_=0; i_<=nvars-1;i_++)
-                        {
-                            ct[xyc[i],i_] = ct[xyc[i],i_] + xy[i,i_];
-                        }
-                    }
-                    zerosizeclusters = false;
-                    for(i=0; i<=k-1; i++)
-                    {
-                        cbusy[i] = csizes[i]!=0;
-                        zerosizeclusters = zerosizeclusters | csizes[i]==0;
-                    }
-                    if( zerosizeclusters )
-                    {
-                        
-                        //
-                        // Some clusters have zero size - rare, but possible.
-                        // We'll choose new centers for such clusters using k-means++ rule
-                        // and restart algorithm
-                        //
-                        if( !selectcenterpp(ref xy, npoints, nvars, ref ct, cbusy, k, ref d2, ref p, ref tmp) )
-                        {
-                            info = -3;
-                            return;
-                        }
-                        continue;
-                    }
-                    for(j=0; j<=k-1; j++)
-                    {
-                        v = (double)(1)/(double)(csizes[j]);
-                        for(i_=0; i_<=nvars-1;i_++)
-                        {
-                            ct[j,i_] = v*ct[j,i_];
-                        }
-                    }
-                    
-                    //
-                    // if nothing has changed during iteration
-                    //
-                    if( !waschanges )
-                    {
-                        break;
-                    }
+                if ((double)(v) < (double)(d2[i])) {
+                  d2[i] = v;
                 }
-                
-                //
-                // 3. Calculate E, compare with best centers found so far
-                //
-                e = 0;
-                for(i=0; i<=npoints-1; i++)
-                {
-                    for(i_=0; i_<=nvars-1;i_++)
-                    {
-                        tmp[i_] = xy[i,i_];
-                    }
-                    for(i_=0; i_<=nvars-1;i_++)
-                    {
-                        tmp[i_] = tmp[i_] - ct[xyc[i],i_];
-                    }
-                    v = 0.0;
-                    for(i_=0; i_<=nvars-1;i_++)
-                    {
-                        v += tmp[i_]*tmp[i_];
-                    }
-                    e = e+v;
-                }
-                if( (double)(e)<(double)(ebest) )
-                {
-                    
-                    //
-                    // store partition
-                    //
-                    blas.copymatrix(ref ct, 0, k-1, 0, nvars-1, ref ctbest, 0, k-1, 0, nvars-1);
-                }
-            }
-            
-            //
-            // Copy and transpose
-            //
-            c = new double[nvars-1+1, k-1+1];
-            blas.copyandtranspose(ref ctbest, 0, k-1, 0, nvars-1, ref c, 0, nvars-1, 0, k-1);
-        }
-
-
-        /*************************************************************************
-        Select center for a new cluster using k-means++ rule
-        *************************************************************************/
-        private static bool selectcenterpp(ref double[,] xy,
-            int npoints,
-            int nvars,
-            ref double[,] centers,
-            bool[] busycenters,
-            int ccnt,
-            ref double[] d2,
-            ref double[] p,
-            ref double[] tmp)
-        {
-            bool result = new bool();
-            int i = 0;
-            int j = 0;
-            int cc = 0;
-            double v = 0;
-            double s = 0;
-            int i_ = 0;
-
-            busycenters = (bool[])busycenters.Clone();
-
-            result = true;
-            for(cc=0; cc<=ccnt-1; cc++)
-            {
-                if( !busycenters[cc] )
-                {
-                    
-                    //
-                    // fill D2
-                    //
-                    for(i=0; i<=npoints-1; i++)
-                    {
-                        d2[i] = AP.Math.MaxRealNumber;
-                        for(j=0; j<=ccnt-1; j++)
-                        {
-                            if( busycenters[j] )
-                            {
-                                for(i_=0; i_<=nvars-1;i_++)
-                                {
-                                    tmp[i_] = xy[i,i_];
-                                }
-                                for(i_=0; i_<=nvars-1;i_++)
-                                {
-                                    tmp[i_] = tmp[i_] - centers[j,i_];
-                                }
-                                v = 0.0;
-                                for(i_=0; i_<=nvars-1;i_++)
-                                {
-                                    v += tmp[i_]*tmp[i_];
-                                }
-                                if( (double)(v)<(double)(d2[i]) )
-                                {
-                                    d2[i] = v;
-                                }
-                            }
-                        }
-                    }
-                    
-                    //
-                    // calculate P (non-cumulative)
-                    //
-                    s = 0;
-                    for(i=0; i<=npoints-1; i++)
-                    {
-                        s = s+d2[i];
-                    }
-                    if( (double)(s)==(double)(0) )
-                    {
-                        result = false;
-                        return result;
-                    }
-                    s = 1/s;
-                    for(i_=0; i_<=npoints-1;i_++)
-                    {
-                        p[i_] = s*d2[i_];
-                    }
-                    
-                    //
-                    // choose one of points with probability P
-                    // random number within (0,1) is generated and
-                    // inverse empirical CDF is used to randomly choose a point.
-                    //
-                    s = 0;
-                    v = AP.Math.RandomReal();
-                    for(i=0; i<=npoints-1; i++)
-                    {
-                        s = s+p[i];
-                        if( (double)(v)<=(double)(s) | i==npoints-1 )
-                        {
-                            for(i_=0; i_<=nvars-1;i_++)
-                            {
-                                centers[cc,i_] = xy[i,i_];
-                            }
-                            busycenters[cc] = true;
-                            break;
-                        }
-                    }
-                }
-            }
+              }
+            }
+          }
+
+          //
+          // calculate P (non-cumulative)
+          //
+          s = 0;
+          for (i = 0; i <= npoints - 1; i++) {
+            s = s + d2[i];
+          }
+          if ((double)(s) == (double)(0)) {
+            result = false;
             return result;
-        }
+          }
+          s = 1 / s;
+          for (i_ = 0; i_ <= npoints - 1; i_++) {
+            p[i_] = s * d2[i_];
+          }
+
+          //
+          // choose one of points with probability P
+          // random number within (0,1) is generated and
+          // inverse empirical CDF is used to randomly choose a point.
+          //
+          s = 0;
+          v = AP.Math.RandomReal();
+          for (i = 0; i <= npoints - 1; i++) {
+            s = s + p[i];
+            if ((double)(v) <= (double)(s) | i == npoints - 1) {
+              for (i_ = 0; i_ <= nvars - 1; i_++) {
+                centers[cc, i_] = xy[i, i_];
+              }
+              busycenters[cc] = true;
+              break;
+            }
+          }
+        }
+      }
+      return result;
     }
+  }
 }
Index: /trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.ALGLIB/2.5.0/ALGLIB-2.5.0/laguerre.cs
===================================================================
--- /trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.ALGLIB/2.5.0/ALGLIB-2.5.0/laguerre.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.ALGLIB/2.5.0/ALGLIB-2.5.0/laguerre.cs	(revision 4068)
@@ -17,101 +17,91 @@
 *************************************************************************/
 
-using System;
 
-namespace alglib
-{
-    public class laguerre
-    {
-        /*************************************************************************
-        Calculation of the value of the Laguerre polynomial.
+namespace alglib {
+  public class laguerre {
+    /*************************************************************************
+    Calculation of the value of the Laguerre polynomial.
 
-        Parameters:
-            n   -   degree, n>=0
-            x   -   argument
+    Parameters:
+        n   -   degree, n>=0
+        x   -   argument
 
-        Result:
-            the value of the Laguerre polynomial Ln at x
-        *************************************************************************/
-        public static double laguerrecalculate(int n,
-            double x)
-        {
-            double result = 0;
-            double a = 0;
-            double b = 0;
-            double i = 0;
+    Result:
+        the value of the Laguerre polynomial Ln at x
+    *************************************************************************/
+    public static double laguerrecalculate(int n,
+        double x) {
+      double result = 0;
+      double a = 0;
+      double b = 0;
+      double i = 0;
 
-            result = 1;
-            a = 1;
-            b = 1-x;
-            if( n==1 )
-            {
-                result = b;
-            }
-            i = 2;
-            while( (double)(i)<=(double)(n) )
-            {
-                result = ((2*i-1-x)*b-(i-1)*a)/i;
-                a = b;
-                b = result;
-                i = i+1;
-            }
-            return result;
-        }
+      result = 1;
+      a = 1;
+      b = 1 - x;
+      if (n == 1) {
+        result = b;
+      }
+      i = 2;
+      while ((double)(i) <= (double)(n)) {
+        result = ((2 * i - 1 - x) * b - (i - 1) * a) / i;
+        a = b;
+        b = result;
+        i = i + 1;
+      }
+      return result;
+    }
 
 
-        /*************************************************************************
-        Summation of Laguerre polynomials using Clenshaws recurrence formula.
+    /*************************************************************************
+    Summation of Laguerre polynomials using Clenshaws recurrence formula.
 
-        This routine calculates c[0]*L0(x) + c[1]*L1(x) + ... + c[N]*LN(x)
+    This routine calculates c[0]*L0(x) + c[1]*L1(x) + ... + c[N]*LN(x)
 
-        Parameters:
-            n   -   degree, n>=0
-            x   -   argument
+    Parameters:
+        n   -   degree, n>=0
+        x   -   argument
 
-        Result:
-            the value of the Laguerre polynomial at x
-        *************************************************************************/
-        public static double laguerresum(ref double[] c,
-            int n,
-            double x)
-        {
-            double result = 0;
-            double b1 = 0;
-            double b2 = 0;
-            int i = 0;
+    Result:
+        the value of the Laguerre polynomial at x
+    *************************************************************************/
+    public static double laguerresum(ref double[] c,
+        int n,
+        double x) {
+      double result = 0;
+      double b1 = 0;
+      double b2 = 0;
+      int i = 0;
 
-            b1 = 0;
-            b2 = 0;
-            for(i=n; i>=0; i--)
-            {
-                result = (2*i+1-x)*b1/(i+1)-(i+1)*b2/(i+2)+c[i];
-                b2 = b1;
-                b1 = result;
-            }
-            return result;
-        }
+      b1 = 0;
+      b2 = 0;
+      for (i = n; i >= 0; i--) {
+        result = (2 * i + 1 - x) * b1 / (i + 1) - (i + 1) * b2 / (i + 2) + c[i];
+        b2 = b1;
+        b1 = result;
+      }
+      return result;
+    }
 
 
-        /*************************************************************************
-        Representation of Ln as C[0] + C[1]*X + ... + C[N]*X^N
+    /*************************************************************************
+    Representation of Ln as C[0] + C[1]*X + ... + C[N]*X^N
 
-        Input parameters:
-            N   -   polynomial degree, n>=0
+    Input parameters:
+        N   -   polynomial degree, n>=0
 
-        Output parameters:
-            C   -   coefficients
-        *************************************************************************/
-        public static void laguerrecoefficients(int n,
-            ref double[] c)
-        {
-            int i = 0;
+    Output parameters:
+        C   -   coefficients
+    *************************************************************************/
+    public static void laguerrecoefficients(int n,
+        ref double[] c) {
+      int i = 0;
 
-            c = new double[n+1];
-            c[0] = 1;
-            for(i=0; i<=n-1; i++)
-            {
-                c[i+1] = -(c[i]*(n-i)/(i+1)/(i+1));
-            }
-        }
+      c = new double[n + 1];
+      c[0] = 1;
+      for (i = 0; i <= n - 1; i++) {
+        c[i + 1] = -(c[i] * (n - i) / (i + 1) / (i + 1));
+      }
     }
+  }
 }
Index: /trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.ALGLIB/2.5.0/ALGLIB-2.5.0/legendre.cs
===================================================================
--- /trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.ALGLIB/2.5.0/ALGLIB-2.5.0/legendre.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.ALGLIB/2.5.0/ALGLIB-2.5.0/legendre.cs	(revision 4068)
@@ -17,114 +17,101 @@
 *************************************************************************/
 
-using System;
 
-namespace alglib
-{
-    public class legendre
-    {
-        /*************************************************************************
-        Calculation of the value of the Legendre polynomial Pn.
+namespace alglib {
+  public class legendre {
+    /*************************************************************************
+    Calculation of the value of the Legendre polynomial Pn.
 
-        Parameters:
-            n   -   degree, n>=0
-            x   -   argument
+    Parameters:
+        n   -   degree, n>=0
+        x   -   argument
 
-        Result:
-            the value of the Legendre polynomial Pn at x
-        *************************************************************************/
-        public static double legendrecalculate(int n,
-            double x)
-        {
-            double result = 0;
-            double a = 0;
-            double b = 0;
-            int i = 0;
+    Result:
+        the value of the Legendre polynomial Pn at x
+    *************************************************************************/
+    public static double legendrecalculate(int n,
+        double x) {
+      double result = 0;
+      double a = 0;
+      double b = 0;
+      int i = 0;
 
-            result = 1;
-            a = 1;
-            b = x;
-            if( n==0 )
-            {
-                result = a;
-                return result;
-            }
-            if( n==1 )
-            {
-                result = b;
-                return result;
-            }
-            for(i=2; i<=n; i++)
-            {
-                result = ((2*i-1)*x*b-(i-1)*a)/i;
-                a = b;
-                b = result;
-            }
-            return result;
-        }
+      result = 1;
+      a = 1;
+      b = x;
+      if (n == 0) {
+        result = a;
+        return result;
+      }
+      if (n == 1) {
+        result = b;
+        return result;
+      }
+      for (i = 2; i <= n; i++) {
+        result = ((2 * i - 1) * x * b - (i - 1) * a) / i;
+        a = b;
+        b = result;
+      }
+      return result;
+    }
 
 
-        /*************************************************************************
-        Summation of Legendre polynomials using Clenshaws recurrence formula.
+    /*************************************************************************
+    Summation of Legendre polynomials using Clenshaws recurrence formula.
 
-        This routine calculates
-            c[0]*P0(x) + c[1]*P1(x) + ... + c[N]*PN(x)
+    This routine calculates
+        c[0]*P0(x) + c[1]*P1(x) + ... + c[N]*PN(x)
 
-        Parameters:
-            n   -   degree, n>=0
-            x   -   argument
+    Parameters:
+        n   -   degree, n>=0
+        x   -   argument
 
-        Result:
-            the value of the Legendre polynomial at x
-        *************************************************************************/
-        public static double legendresum(ref double[] c,
-            int n,
-            double x)
-        {
-            double result = 0;
-            double b1 = 0;
-            double b2 = 0;
-            int i = 0;
+    Result:
+        the value of the Legendre polynomial at x
+    *************************************************************************/
+    public static double legendresum(ref double[] c,
+        int n,
+        double x) {
+      double result = 0;
+      double b1 = 0;
+      double b2 = 0;
+      int i = 0;
 
-            b1 = 0;
-            b2 = 0;
-            for(i=n; i>=0; i--)
-            {
-                result = (2*i+1)*x*b1/(i+1)-(i+1)*b2/(i+2)+c[i];
-                b2 = b1;
-                b1 = result;
-            }
-            return result;
-        }
+      b1 = 0;
+      b2 = 0;
+      for (i = n; i >= 0; i--) {
+        result = (2 * i + 1) * x * b1 / (i + 1) - (i + 1) * b2 / (i + 2) + c[i];
+        b2 = b1;
+        b1 = result;
+      }
+      return result;
+    }
 
 
-        /*************************************************************************
-        Representation of Pn as C[0] + C[1]*X + ... + C[N]*X^N
+    /*************************************************************************
+    Representation of Pn as C[0] + C[1]*X + ... + C[N]*X^N
 
-        Input parameters:
-            N   -   polynomial degree, n>=0
+    Input parameters:
+        N   -   polynomial degree, n>=0
 
-        Output parameters:
-            C   -   coefficients
-        *************************************************************************/
-        public static void legendrecoefficients(int n,
-            ref double[] c)
-        {
-            int i = 0;
+    Output parameters:
+        C   -   coefficients
+    *************************************************************************/
+    public static void legendrecoefficients(int n,
+        ref double[] c) {
+      int i = 0;
 
-            c = new double[n+1];
-            for(i=0; i<=n; i++)
-            {
-                c[i] = 0;
-            }
-            c[n] = 1;
-            for(i=1; i<=n; i++)
-            {
-                c[n] = c[n]*(n+i)/2/i;
-            }
-            for(i=0; i<=n/2-1; i++)
-            {
-                c[n-2*(i+1)] = -(c[n-2*i]*(n-2*i)*(n-2*i-1)/2/(i+1)/(2*(n-i)-1));
-            }
-        }
+      c = new double[n + 1];
+      for (i = 0; i <= n; i++) {
+        c[i] = 0;
+      }
+      c[n] = 1;
+      for (i = 1; i <= n; i++) {
+        c[n] = c[n] * (n + i) / 2 / i;
+      }
+      for (i = 0; i <= n / 2 - 1; i++) {
+        c[n - 2 * (i + 1)] = -(c[n - 2 * i] * (n - 2 * i) * (n - 2 * i - 1) / 2 / (i + 1) / (2 * (n - i) - 1));
+      }
     }
+  }
 }
Index: /trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.ALGLIB/2.5.0/ALGLIB-2.5.0/matdet.cs
===================================================================
--- /trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.ALGLIB/2.5.0/ALGLIB-2.5.0/matdet.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.ALGLIB/2.5.0/ALGLIB-2.5.0/matdet.cs	(revision 4068)
@@ -19,209 +19,192 @@
 *************************************************************************/
 
-using System;
-
-namespace alglib
-{
-    public class matdet
-    {
-        /*************************************************************************
-        Determinant calculation of the matrix given by its LU decomposition.
-
-        Input parameters:
-            A       -   LU decomposition of the matrix (output of
-                        RMatrixLU subroutine).
-            Pivots  -   table of permutations which were made during
-                        the LU decomposition.
-                        Output of RMatrixLU subroutine.
-            N       -   size of matrix A.
-
-        Result: matrix determinant.
-
-          -- ALGLIB --
-             Copyright 2005 by Bochkanov Sergey
-        *************************************************************************/
-        public static double rmatrixludet(ref double[,] a,
-            ref int[] pivots,
-            int n)
-        {
-            double result = 0;
-            int i = 0;
-            int s = 0;
-
-            result = 1;
-            s = 1;
-            for(i=0; i<=n-1; i++)
-            {
-                result = result*a[i,i];
-                if( pivots[i]!=i )
-                {
-                    s = -s;
-                }
-            }
-            result = result*s;
-            return result;
+
+namespace alglib {
+  public class matdet {
+    /*************************************************************************
+    Determinant calculation of the matrix given by its LU decomposition.
+
+    Input parameters:
+        A       -   LU decomposition of the matrix (output of
+                    RMatrixLU subroutine).
+        Pivots  -   table of permutations which were made during
+                    the LU decomposition.
+                    Output of RMatrixLU subroutine.
+        N       -   size of matrix A.
+
+    Result: matrix determinant.
+
+      -- ALGLIB --
+         Copyright 2005 by Bochkanov Sergey
+    *************************************************************************/
+    public static double rmatrixludet(ref double[,] a,
+        ref int[] pivots,
+        int n) {
+      double result = 0;
+      int i = 0;
+      int s = 0;
+
+      result = 1;
+      s = 1;
+      for (i = 0; i <= n - 1; i++) {
+        result = result * a[i, i];
+        if (pivots[i] != i) {
+          s = -s;
         }
-
-
-        /*************************************************************************
-        Calculation of the determinant of a general matrix
-
-        Input parameters:
-            A       -   matrix, array[0..N-1, 0..N-1]
-            N       -   size of matrix A.
-
-        Result: determinant of matrix A.
-
-          -- ALGLIB --
-             Copyright 2005 by Bochkanov Sergey
-        *************************************************************************/
-        public static double rmatrixdet(double[,] a,
-            int n)
-        {
-            double result = 0;
-            int[] pivots = new int[0];
-
-            a = (double[,])a.Clone();
-
-            trfac.rmatrixlu(ref a, n, n, ref pivots);
-            result = rmatrixludet(ref a, ref pivots, n);
-            return result;
+      }
+      result = result * s;
+      return result;
+    }
+
+
+    /*************************************************************************
+    Calculation of the determinant of a general matrix
+
+    Input parameters:
+        A       -   matrix, array[0..N-1, 0..N-1]
+        N       -   size of matrix A.
+
+    Result: determinant of matrix A.
+
+      -- ALGLIB --
+         Copyright 2005 by Bochkanov Sergey
+    *************************************************************************/
+    public static double rmatrixdet(double[,] a,
+        int n) {
+      double result = 0;
+      int[] pivots = new int[0];
+
+      a = (double[,])a.Clone();
+
+      trfac.rmatrixlu(ref a, n, n, ref pivots);
+      result = rmatrixludet(ref a, ref pivots, n);
+      return result;
+    }
+
+
+    /*************************************************************************
+    Determinant calculation of the matrix given by its LU decomposition.
+
+    Input parameters:
+        A       -   LU decomposition of the matrix (output of
+                    RMatrixLU subroutine).
+        Pivots  -   table of permutations which were made during
+                    the LU decomposition.
+                    Output of RMatrixLU subroutine.
+        N       -   size of matrix A.
+
+    Result: matrix determinant.
+
+      -- ALGLIB --
+         Copyright 2005 by Bochkanov Sergey
+    *************************************************************************/
+    public static AP.Complex cmatrixludet(ref AP.Complex[,] a,
+        ref int[] pivots,
+        int n) {
+      AP.Complex result = 0;
+      int i = 0;
+      int s = 0;
+
+      result = 1;
+      s = 1;
+      for (i = 0; i <= n - 1; i++) {
+        result = result * a[i, i];
+        if (pivots[i] != i) {
+          s = -s;
         }
-
-
-        /*************************************************************************
-        Determinant calculation of the matrix given by its LU decomposition.
-
-        Input parameters:
-            A       -   LU decomposition of the matrix (output of
-                        RMatrixLU subroutine).
-            Pivots  -   table of permutations which were made during
-                        the LU decomposition.
-                        Output of RMatrixLU subroutine.
-            N       -   size of matrix A.
-
-        Result: matrix determinant.
-
-          -- ALGLIB --
-             Copyright 2005 by Bochkanov Sergey
-        *************************************************************************/
-        public static AP.Complex cmatrixludet(ref AP.Complex[,] a,
-            ref int[] pivots,
-            int n)
-        {
-            AP.Complex result = 0;
-            int i = 0;
-            int s = 0;
-
-            result = 1;
-            s = 1;
-            for(i=0; i<=n-1; i++)
-            {
-                result = result*a[i,i];
-                if( pivots[i]!=i )
-                {
-                    s = -s;
-                }
-            }
-            result = result*s;
-            return result;
-        }
-
-
-        /*************************************************************************
-        Calculation of the determinant of a general matrix
-
-        Input parameters:
-            A       -   matrix, array[0..N-1, 0..N-1]
-            N       -   size of matrix A.
-
-        Result: determinant of matrix A.
-
-          -- ALGLIB --
-             Copyright 2005 by Bochkanov Sergey
-        *************************************************************************/
-        public static AP.Complex cmatrixdet(AP.Complex[,] a,
-            int n)
-        {
-            AP.Complex result = 0;
-            int[] pivots = new int[0];
-
-            a = (AP.Complex[,])a.Clone();
-
-            trfac.cmatrixlu(ref a, n, n, ref pivots);
-            result = cmatrixludet(ref a, ref pivots, n);
-            return result;
-        }
-
-
-        /*************************************************************************
-        Determinant calculation of the matrix given by the Cholesky decomposition.
-
-        Input parameters:
-            A   -   Cholesky decomposition,
-                    output of SMatrixCholesky subroutine.
-            N   -   size of matrix A.
-
-        As the determinant is equal to the product of squares of diagonal elements,
-        its not necessary to specify which triangle - lower or upper - the matrix
-        is stored in.
-
-        Result:
-            matrix determinant.
-
-          -- ALGLIB --
-             Copyright 2005-2008 by Bochkanov Sergey
-        *************************************************************************/
-        public static double spdmatrixcholeskydet(ref double[,] a,
-            int n)
-        {
-            double result = 0;
-            int i = 0;
-
-            result = 1;
-            for(i=0; i<=n-1; i++)
-            {
-                result = result*AP.Math.Sqr(a[i,i]);
-            }
-            return result;
-        }
-
-
-        /*************************************************************************
-        Determinant calculation of the symmetric positive definite matrix.
-
-        Input parameters:
-            A       -   matrix. Array with elements [0..N-1, 0..N-1].
-            N       -   size of matrix A.
-            IsUpper -   if IsUpper = True, then the symmetric matrix A is given by
-                        its upper triangle, and the lower triangle isnt used by
-                        subroutine. Similarly, if IsUpper = False, then A is given
-                        by its lower triangle.
-
-        Result:
-            determinant of matrix A.
-            If matrix A is not positive definite, then subroutine returns -1.
-
-          -- ALGLIB --
-             Copyright 2005-2008 by Bochkanov Sergey
-        *************************************************************************/
-        public static double spdmatrixdet(double[,] a,
-            int n,
-            bool isupper)
-        {
-            double result = 0;
-
-            a = (double[,])a.Clone();
-
-            if( !trfac.spdmatrixcholesky(ref a, n, isupper) )
-            {
-                result = -1;
-            }
-            else
-            {
-                result = spdmatrixcholeskydet(ref a, n);
-            }
-            return result;
-        }
-    }
+      }
+      result = result * s;
+      return result;
+    }
+
+
+    /*************************************************************************
+    Calculation of the determinant of a general matrix
+
+    Input parameters:
+        A       -   matrix, array[0..N-1, 0..N-1]
+        N       -   size of matrix A.
+
+    Result: determinant of matrix A.
+
+      -- ALGLIB --
+         Copyright 2005 by Bochkanov Sergey
+    *************************************************************************/
+    public static AP.Complex cmatrixdet(AP.Complex[,] a,
+        int n) {
+      AP.Complex result = 0;
+      int[] pivots = new int[0];
+
+      a = (AP.Complex[,])a.Clone();
+
+      trfac.cmatrixlu(ref a, n, n, ref pivots);
+      result = cmatrixludet(ref a, ref pivots, n);
+      return result;
+    }
+
+
+    /*************************************************************************
+    Determinant calculation of the matrix given by the Cholesky decomposition.
+
+    Input parameters:
+        A   -   Cholesky decomposition,
+                output of SMatrixCholesky subroutine.
+        N   -   size of matrix A.
+
+    As the determinant is equal to the product of squares of diagonal elements,
+    its not necessary to specify which triangle - lower or upper - the matrix
+    is stored in.
+
+    Result:
+        matrix determinant.
+
+      -- ALGLIB --
+         Copyright 2005-2008 by Bochkanov Sergey
+    *************************************************************************/
+    public static double spdmatrixcholeskydet(ref double[,] a,
+        int n) {
+      double result = 0;
+      int i = 0;
+
+      result = 1;
+      for (i = 0; i <= n - 1; i++) {
+        result = result * AP.Math.Sqr(a[i, i]);
+      }
+      return result;
+    }
+
+
+    /*************************************************************************
+    Determinant calculation of the symmetric positive definite matrix.
+
+    Input parameters:
+        A       -   matrix. Array with elements [0..N-1, 0..N-1].
+        N       -   size of matrix A.
+        IsUpper -   if IsUpper = True, then the symmetric matrix A is given by
+                    its upper triangle, and the lower triangle isnt used by
+                    subroutine. Similarly, if IsUpper = False, then A is given
+                    by its lower triangle.
+
+    Result:
+        determinant of matrix A.
+        If matrix A is not positive definite, then subroutine returns -1.
+
+      -- ALGLIB --
+         Copyright 2005-2008 by Bochkanov Sergey
+    *************************************************************************/
+    public static double spdmatrixdet(double[,] a,
+        int n,
+        bool isupper) {
+      double result = 0;
+
+      a = (double[,])a.Clone();
+
+      if (!trfac.spdmatrixcholesky(ref a, n, isupper)) {
+        result = -1;
+      } else {
+        result = spdmatrixcholeskydet(ref a, n);
+      }
+      return result;
+    }
+  }
 }
Index: /trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.ALGLIB/2.5.0/ALGLIB-2.5.0/matinv.cs
===================================================================
--- /trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.ALGLIB/2.5.0/ALGLIB-2.5.0/matinv.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.ALGLIB/2.5.0/ALGLIB-2.5.0/matinv.cs	(revision 4068)
@@ -25,1782 +25,1534 @@
 *************************************************************************/
 
-using System;
-
-namespace alglib
-{
-    public class matinv
-    {
-        public struct matinvreport
-        {
-            public double r1;
-            public double rinf;
-        };
-
-
-
-
-        /*************************************************************************
-        Inversion of a matrix given by its LU decomposition.
-
-        INPUT PARAMETERS:
-            A       -   LU decomposition of the matrix (output of RMatrixLU subroutine).
-            Pivots  -   table of permutations which were made during the LU decomposition
-                        (the output of RMatrixLU subroutine).
-            N       -   size of matrix A.
-
-        OUTPUT PARAMETERS:
-            Info    -   return code:
-                        * -3    A is singular, or VERY close to singular.
-                                it is filled by zeros in such cases.
-                        * -1    N<=0 was passed, or incorrect Pivots was passed
-                        *  1    task is solved (but matrix A may be ill-conditioned,
-                                check R1/RInf parameters for condition numbers).
-            Rep     -   solver report, see below for more info
-            A       -   inverse of matrix A.
-                        Array whose indexes range within [0..N-1, 0..N-1].
-
-        SOLVER REPORT
-
-        Subroutine sets following fields of the Rep structure:
-        * R1        reciprocal of condition number: 1/cond(A), 1-norm.
-        * RInf      reciprocal of condition number: 1/cond(A), inf-norm.
-
-          -- ALGLIB routine --
-             05.02.2010
-             Bochkanov Sergey
-        *************************************************************************/
-        public static void rmatrixluinverse(ref double[,] a,
-            ref int[] pivots,
-            int n,
-            ref int info,
-            ref matinvreport rep)
-        {
-            double[] work = new double[0];
-            int i = 0;
-            int j = 0;
-            int k = 0;
-            double v = 0;
-
-            info = 1;
-            
-            //
-            // Quick return if possible
-            //
-            if( n==0 )
-            {
-                info = -1;
-                return;
-            }
-            for(i=0; i<=n-1; i++)
-            {
-                if( pivots[i]>n-1 | pivots[i]<i )
-                {
-                    info = -1;
-                    return;
-                }
-            }
-            
-            //
-            // calculate condition numbers
-            //
-            rep.r1 = rcond.rmatrixlurcond1(ref a, n);
-            rep.rinf = rcond.rmatrixlurcondinf(ref a, n);
-            if( (double)(rep.r1)<(double)(rcond.rcondthreshold()) | (double)(rep.rinf)<(double)(rcond.rcondthreshold()) )
-            {
-                for(i=0; i<=n-1; i++)
-                {
-                    for(j=0; j<=n-1; j++)
-                    {
-                        a[i,j] = 0;
-                    }
-                }
-                rep.r1 = 0;
-                rep.rinf = 0;
+
+namespace alglib {
+  public class matinv {
+    public struct matinvreport {
+      public double r1;
+      public double rinf;
+    };
+
+
+
+
+    /*************************************************************************
+    Inversion of a matrix given by its LU decomposition.
+
+    INPUT PARAMETERS:
+        A       -   LU decomposition of the matrix (output of RMatrixLU subroutine).
+        Pivots  -   table of permutations which were made during the LU decomposition
+                    (the output of RMatrixLU subroutine).
+        N       -   size of matrix A.
+
+    OUTPUT PARAMETERS:
+        Info    -   return code:
+                    * -3    A is singular, or VERY close to singular.
+                            it is filled by zeros in such cases.
+                    * -1    N<=0 was passed, or incorrect Pivots was passed
+                    *  1    task is solved (but matrix A may be ill-conditioned,
+                            check R1/RInf parameters for condition numbers).
+        Rep     -   solver report, see below for more info
+        A       -   inverse of matrix A.
+                    Array whose indexes range within [0..N-1, 0..N-1].
+
+    SOLVER REPORT
+
+    Subroutine sets following fields of the Rep structure:
+    * R1        reciprocal of condition number: 1/cond(A), 1-norm.
+    * RInf      reciprocal of condition number: 1/cond(A), inf-norm.
+
+      -- ALGLIB routine --
+         05.02.2010
+         Bochkanov Sergey
+    *************************************************************************/
+    public static void rmatrixluinverse(ref double[,] a,
+        ref int[] pivots,
+        int n,
+        ref int info,
+        ref matinvreport rep) {
+      double[] work = new double[0];
+      int i = 0;
+      int j = 0;
+      int k = 0;
+      double v = 0;
+
+      info = 1;
+
+      //
+      // Quick return if possible
+      //
+      if (n == 0) {
+        info = -1;
+        return;
+      }
+      for (i = 0; i <= n - 1; i++) {
+        if (pivots[i] > n - 1 | pivots[i] < i) {
+          info = -1;
+          return;
+        }
+      }
+
+      //
+      // calculate condition numbers
+      //
+      rep.r1 = rcond.rmatrixlurcond1(ref a, n);
+      rep.rinf = rcond.rmatrixlurcondinf(ref a, n);
+      if ((double)(rep.r1) < (double)(rcond.rcondthreshold()) | (double)(rep.rinf) < (double)(rcond.rcondthreshold())) {
+        for (i = 0; i <= n - 1; i++) {
+          for (j = 0; j <= n - 1; j++) {
+            a[i, j] = 0;
+          }
+        }
+        rep.r1 = 0;
+        rep.rinf = 0;
+        info = -3;
+        return;
+      }
+
+      //
+      // Call cache-oblivious code
+      //
+      work = new double[n];
+      rmatrixluinverserec(ref a, 0, n, ref work, ref info, ref rep);
+
+      //
+      // apply permutations
+      //
+      for (i = 0; i <= n - 1; i++) {
+        for (j = n - 2; j >= 0; j--) {
+          k = pivots[j];
+          v = a[i, j];
+          a[i, j] = a[i, k];
+          a[i, k] = v;
+        }
+      }
+    }
+
+
+    /*************************************************************************
+    Inversion of a general matrix.
+
+    Input parameters:
+        A   -   matrix. Array whose indexes range within [0..N-1, 0..N-1].
+        N   -   size of matrix A.
+
+    Output parameters:
+        Info    -   return code, same as in RMatrixLUInverse
+        Rep     -   solver report, same as in RMatrixLUInverse
+        A       -   inverse of matrix A, same as in RMatrixLUInverse
+
+    Result:
+        True, if the matrix is not singular.
+        False, if the matrix is singular.
+
+      -- ALGLIB --
+         Copyright 2005 by Bochkanov Sergey
+    *************************************************************************/
+    public static void rmatrixinverse(ref double[,] a,
+        int n,
+        ref int info,
+        ref matinvreport rep) {
+      int[] pivots = new int[0];
+
+      trfac.rmatrixlu(ref a, n, n, ref pivots);
+      rmatrixluinverse(ref a, ref pivots, n, ref info, ref rep);
+    }
+
+
+    /*************************************************************************
+    Inversion of a matrix given by its LU decomposition.
+
+    INPUT PARAMETERS:
+        A       -   LU decomposition of the matrix (output of CMatrixLU subroutine).
+        Pivots  -   table of permutations which were made during the LU decomposition
+                    (the output of CMatrixLU subroutine).
+        N       -   size of matrix A.
+
+    OUTPUT PARAMETERS:
+        Info    -   return code, same as in RMatrixLUInverse
+        Rep     -   solver report, same as in RMatrixLUInverse
+        A       -   inverse of matrix A, same as in RMatrixLUInverse
+
+      -- ALGLIB routine --
+         05.02.2010
+         Bochkanov Sergey
+    *************************************************************************/
+    public static void cmatrixluinverse(ref AP.Complex[,] a,
+        ref int[] pivots,
+        int n,
+        ref int info,
+        ref matinvreport rep) {
+      AP.Complex[] work = new AP.Complex[0];
+      int i = 0;
+      int j = 0;
+      int k = 0;
+      AP.Complex v = 0;
+
+      info = 1;
+
+      //
+      // Quick return if possible
+      //
+      if (n == 0) {
+        info = -1;
+        return;
+      }
+      for (i = 0; i <= n - 1; i++) {
+        if (pivots[i] > n - 1 | pivots[i] < i) {
+          info = -1;
+          return;
+        }
+      }
+
+      //
+      // calculate condition numbers
+      //
+      rep.r1 = rcond.cmatrixlurcond1(ref a, n);
+      rep.rinf = rcond.cmatrixlurcondinf(ref a, n);
+      if ((double)(rep.r1) < (double)(rcond.rcondthreshold()) | (double)(rep.rinf) < (double)(rcond.rcondthreshold())) {
+        for (i = 0; i <= n - 1; i++) {
+          for (j = 0; j <= n - 1; j++) {
+            a[i, j] = 0;
+          }
+        }
+        rep.r1 = 0;
+        rep.rinf = 0;
+        info = -3;
+        return;
+      }
+
+      //
+      // Call cache-oblivious code
+      //
+      work = new AP.Complex[n];
+      cmatrixluinverserec(ref a, 0, n, ref work, ref info, ref rep);
+
+      //
+      // apply permutations
+      //
+      for (i = 0; i <= n - 1; i++) {
+        for (j = n - 2; j >= 0; j--) {
+          k = pivots[j];
+          v = a[i, j];
+          a[i, j] = a[i, k];
+          a[i, k] = v;
+        }
+      }
+    }
+
+
+    /*************************************************************************
+    Inversion of a general matrix.
+
+    Input parameters:
+        A   -   matrix, array[0..N-1,0..N-1].
+        N   -   size of A.
+
+    Output parameters:
+        Info    -   return code, same as in RMatrixLUInverse
+        Rep     -   solver report, same as in RMatrixLUInverse
+        A       -   inverse of matrix A, same as in RMatrixLUInverse
+
+      -- ALGLIB --
+         Copyright 2005 by Bochkanov Sergey
+    *************************************************************************/
+    public static void cmatrixinverse(ref AP.Complex[,] a,
+        int n,
+        ref int info,
+        ref matinvreport rep) {
+      int[] pivots = new int[0];
+
+      trfac.cmatrixlu(ref a, n, n, ref pivots);
+      cmatrixluinverse(ref a, ref pivots, n, ref info, ref rep);
+    }
+
+
+    /*************************************************************************
+    Inversion of a symmetric positive definite matrix which is given
+    by Cholesky decomposition.
+
+    Input parameters:
+        A       -   Cholesky decomposition of the matrix to be inverted:
+                    A=U*U or A = L*L'.
+                    Output of  SPDMatrixCholesky subroutine.
+        N       -   size of matrix A.
+        IsUpper    storage format.
+                    If IsUpper = True, then matrix A is given as A = U'*U
+                    (matrix contains upper triangle).
+                    Similarly, if IsUpper = False, then A = L*L'.
+
+    Output parameters:
+        Info    -   return code, same as in RMatrixLUInverse
+        Rep     -   solver report, same as in RMatrixLUInverse
+        A       -   inverse of matrix A, same as in RMatrixLUInverse
+
+      -- ALGLIB routine --
+         10.02.2010
+         Bochkanov Sergey
+    *************************************************************************/
+    public static void spdmatrixcholeskyinverse(ref double[,] a,
+        int n,
+        bool isupper,
+        ref int info,
+        ref matinvreport rep) {
+      int i = 0;
+      int j = 0;
+      int k = 0;
+      double v = 0;
+      double ajj = 0;
+      double aii = 0;
+      double[] tmp = new double[0];
+      int info2 = 0;
+      matinvreport rep2 = new matinvreport();
+
+      if (n < 1) {
+        info = -1;
+        return;
+      }
+      info = 1;
+
+      //
+      // calculate condition numbers
+      //
+      rep.r1 = rcond.spdmatrixcholeskyrcond(ref a, n, isupper);
+      rep.rinf = rep.r1;
+      if ((double)(rep.r1) < (double)(rcond.rcondthreshold()) | (double)(rep.rinf) < (double)(rcond.rcondthreshold())) {
+        if (isupper) {
+          for (i = 0; i <= n - 1; i++) {
+            for (j = i; j <= n - 1; j++) {
+              a[i, j] = 0;
+            }
+          }
+        } else {
+          for (i = 0; i <= n - 1; i++) {
+            for (j = 0; j <= i; j++) {
+              a[i, j] = 0;
+            }
+          }
+        }
+        rep.r1 = 0;
+        rep.rinf = 0;
+        info = -3;
+        return;
+      }
+
+      //
+      // Inverse
+      //
+      tmp = new double[n];
+      spdmatrixcholeskyinverserec(ref a, 0, n, isupper, ref tmp);
+    }
+
+
+    /*************************************************************************
+    Inversion of a symmetric positive definite matrix.
+
+    Given an upper or lower triangle of a symmetric positive definite matrix,
+    the algorithm generates matrix A^-1 and saves the upper or lower triangle
+    depending on the input.
+
+    Input parameters:
+        A       -   matrix to be inverted (upper or lower triangle).
+                    Array with elements [0..N-1,0..N-1].
+        N       -   size of matrix A.
+        IsUpper -   storage format.
+                    If IsUpper = True, then the upper triangle of matrix A is
+                    given, otherwise the lower triangle is given.
+
+    Output parameters:
+        Info    -   return code, same as in RMatrixLUInverse
+        Rep     -   solver report, same as in RMatrixLUInverse
+        A       -   inverse of matrix A, same as in RMatrixLUInverse
+
+      -- ALGLIB routine --
+         10.02.2010
+         Bochkanov Sergey
+    *************************************************************************/
+    public static void spdmatrixinverse(ref double[,] a,
+        int n,
+        bool isupper,
+        ref int info,
+        ref matinvreport rep) {
+      if (n < 1) {
+        info = -1;
+        return;
+      }
+      info = 1;
+      if (trfac.spdmatrixcholesky(ref a, n, isupper)) {
+        spdmatrixcholeskyinverse(ref a, n, isupper, ref info, ref rep);
+      } else {
+        info = -3;
+      }
+    }
+
+
+    /*************************************************************************
+    Inversion of a Hermitian positive definite matrix which is given
+    by Cholesky decomposition.
+
+    Input parameters:
+        A       -   Cholesky decomposition of the matrix to be inverted:
+                    A=U*U or A = L*L'.
+                    Output of  HPDMatrixCholesky subroutine.
+        N       -   size of matrix A.
+        IsUpper    storage format.
+                    If IsUpper = True, then matrix A is given as A = U'*U
+                    (matrix contains upper triangle).
+                    Similarly, if IsUpper = False, then A = L*L'.
+
+    Output parameters:
+        Info    -   return code, same as in RMatrixLUInverse
+        Rep     -   solver report, same as in RMatrixLUInverse
+        A       -   inverse of matrix A, same as in RMatrixLUInverse
+
+      -- ALGLIB routine --
+         10.02.2010
+         Bochkanov Sergey
+    *************************************************************************/
+    public static void hpdmatrixcholeskyinverse(ref AP.Complex[,] a,
+        int n,
+        bool isupper,
+        ref int info,
+        ref matinvreport rep) {
+      int i = 0;
+      int j = 0;
+      int info2 = 0;
+      matinvreport rep2 = new matinvreport();
+      AP.Complex[] tmp = new AP.Complex[0];
+      AP.Complex v = 0;
+
+      if (n < 1) {
+        info = -1;
+        return;
+      }
+      info = 1;
+
+      //
+      // calculate condition numbers
+      //
+      rep.r1 = rcond.hpdmatrixcholeskyrcond(ref a, n, isupper);
+      rep.rinf = rep.r1;
+      if ((double)(rep.r1) < (double)(rcond.rcondthreshold()) | (double)(rep.rinf) < (double)(rcond.rcondthreshold())) {
+        if (isupper) {
+          for (i = 0; i <= n - 1; i++) {
+            for (j = i; j <= n - 1; j++) {
+              a[i, j] = 0;
+            }
+          }
+        } else {
+          for (i = 0; i <= n - 1; i++) {
+            for (j = 0; j <= i; j++) {
+              a[i, j] = 0;
+            }
+          }
+        }
+        rep.r1 = 0;
+        rep.rinf = 0;
+        info = -3;
+        return;
+      }
+
+      //
+      // Inverse
+      //
+      tmp = new AP.Complex[n];
+      hpdmatrixcholeskyinverserec(ref a, 0, n, isupper, ref tmp);
+    }
+
+
+    /*************************************************************************
+    Inversion of a Hermitian positive definite matrix.
+
+    Given an upper or lower triangle of a Hermitian positive definite matrix,
+    the algorithm generates matrix A^-1 and saves the upper or lower triangle
+    depending on the input.
+
+    Input parameters:
+        A       -   matrix to be inverted (upper or lower triangle).
+                    Array with elements [0..N-1,0..N-1].
+        N       -   size of matrix A.
+        IsUpper -   storage format.
+                    If IsUpper = True, then the upper triangle of matrix A is
+                    given, otherwise the lower triangle is given.
+
+    Output parameters:
+        Info    -   return code, same as in RMatrixLUInverse
+        Rep     -   solver report, same as in RMatrixLUInverse
+        A       -   inverse of matrix A, same as in RMatrixLUInverse
+
+      -- ALGLIB routine --
+         10.02.2010
+         Bochkanov Sergey
+    *************************************************************************/
+    public static void hpdmatrixinverse(ref AP.Complex[,] a,
+        int n,
+        bool isupper,
+        ref int info,
+        ref matinvreport rep) {
+      if (n < 1) {
+        info = -1;
+        return;
+      }
+      info = 1;
+      if (trfac.hpdmatrixcholesky(ref a, n, isupper)) {
+        hpdmatrixcholeskyinverse(ref a, n, isupper, ref info, ref rep);
+      } else {
+        info = -3;
+      }
+    }
+
+
+    /*************************************************************************
+    Triangular matrix inverse (real)
+
+    The subroutine inverts the following types of matrices:
+        * upper triangular
+        * upper triangular with unit diagonal
+        * lower triangular
+        * lower triangular with unit diagonal
+
+    In case of an upper (lower) triangular matrix,  the  inverse  matrix  will
+    also be upper (lower) triangular, and after the end of the algorithm,  the
+    inverse matrix replaces the source matrix. The elements  below (above) the
+    main diagonal are not changed by the algorithm.
+
+    If  the matrix  has a unit diagonal, the inverse matrix also  has  a  unit
+    diagonal, and the diagonal elements are not passed to the algorithm.
+
+    Input parameters:
+        A       -   matrix, array[0..N-1, 0..N-1].
+        N       -   size of A.
+        IsUpper -   True, if the matrix is upper triangular.
+        IsUnit  -   True, if the matrix has a unit diagonal.
+
+    Output parameters:
+        Info    -   same as for RMatrixLUInverse
+        Rep     -   same as for RMatrixLUInverse
+        A       -   same as for RMatrixLUInverse.
+
+      -- ALGLIB --
+         Copyright 05.02.2010 by Bochkanov Sergey
+    *************************************************************************/
+    public static void rmatrixtrinverse(ref double[,] a,
+        int n,
+        bool isupper,
+        bool isunit,
+        ref int info,
+        ref matinvreport rep) {
+      int i = 0;
+      int j = 0;
+      double[] tmp = new double[0];
+
+      if (n < 1) {
+        info = -1;
+        return;
+      }
+      info = 1;
+
+      //
+      // calculate condition numbers
+      //
+      rep.r1 = rcond.rmatrixtrrcond1(ref a, n, isupper, isunit);
+      rep.rinf = rcond.rmatrixtrrcondinf(ref a, n, isupper, isunit);
+      if ((double)(rep.r1) < (double)(rcond.rcondthreshold()) | (double)(rep.rinf) < (double)(rcond.rcondthreshold())) {
+        for (i = 0; i <= n - 1; i++) {
+          for (j = 0; j <= n - 1; j++) {
+            a[i, j] = 0;
+          }
+        }
+        rep.r1 = 0;
+        rep.rinf = 0;
+        info = -3;
+        return;
+      }
+
+      //
+      // Invert
+      //
+      tmp = new double[n];
+      rmatrixtrinverserec(ref a, 0, n, isupper, isunit, ref tmp, ref info, ref rep);
+    }
+
+
+    /*************************************************************************
+    Triangular matrix inverse (complex)
+
+    The subroutine inverts the following types of matrices:
+        * upper triangular
+        * upper triangular with unit diagonal
+        * lower triangular
+        * lower triangular with unit diagonal
+
+    In case of an upper (lower) triangular matrix,  the  inverse  matrix  will
+    also be upper (lower) triangular, and after the end of the algorithm,  the
+    inverse matrix replaces the source matrix. The elements  below (above) the
+    main diagonal are not changed by the algorithm.
+
+    If  the matrix  has a unit diagonal, the inverse matrix also  has  a  unit
+    diagonal, and the diagonal elements are not passed to the algorithm.
+
+    Input parameters:
+        A       -   matrix, array[0..N-1, 0..N-1].
+        N       -   size of A.
+        IsUpper -   True, if the matrix is upper triangular.
+        IsUnit  -   True, if the matrix has a unit diagonal.
+
+    Output parameters:
+        Info    -   same as for RMatrixLUInverse
+        Rep     -   same as for RMatrixLUInverse
+        A       -   same as for RMatrixLUInverse.
+
+      -- ALGLIB --
+         Copyright 05.02.2010 by Bochkanov Sergey
+    *************************************************************************/
+    public static void cmatrixtrinverse(ref AP.Complex[,] a,
+        int n,
+        bool isupper,
+        bool isunit,
+        ref int info,
+        ref matinvreport rep) {
+      int i = 0;
+      int j = 0;
+      AP.Complex[] tmp = new AP.Complex[0];
+
+      if (n < 1) {
+        info = -1;
+        return;
+      }
+      info = 1;
+
+      //
+      // calculate condition numbers
+      //
+      rep.r1 = rcond.cmatrixtrrcond1(ref a, n, isupper, isunit);
+      rep.rinf = rcond.cmatrixtrrcondinf(ref a, n, isupper, isunit);
+      if ((double)(rep.r1) < (double)(rcond.rcondthreshold()) | (double)(rep.rinf) < (double)(rcond.rcondthreshold())) {
+        for (i = 0; i <= n - 1; i++) {
+          for (j = 0; j <= n - 1; j++) {
+            a[i, j] = 0;
+          }
+        }
+        rep.r1 = 0;
+        rep.rinf = 0;
+        info = -3;
+        return;
+      }
+
+      //
+      // Invert
+      //
+      tmp = new AP.Complex[n];
+      cmatrixtrinverserec(ref a, 0, n, isupper, isunit, ref tmp, ref info, ref rep);
+    }
+
+
+    /*************************************************************************
+    Triangular matrix inversion, recursive subroutine
+
+      -- ALGLIB --
+         05.02.2010, Bochkanov Sergey.
+         Univ. of Tennessee, Univ. of California Berkeley, NAG Ltd.,
+         Courant Institute, Argonne National Lab, and Rice University
+         February 29, 1992.
+    *************************************************************************/
+    private static void rmatrixtrinverserec(ref double[,] a,
+        int offs,
+        int n,
+        bool isupper,
+        bool isunit,
+        ref double[] tmp,
+        ref int info,
+        ref matinvreport rep) {
+      int n1 = 0;
+      int n2 = 0;
+      int i = 0;
+      int j = 0;
+      double v = 0;
+      double ajj = 0;
+      int i_ = 0;
+      int i1_ = 0;
+
+      if (n < 1) {
+        info = -1;
+        return;
+      }
+
+      //
+      // Base case
+      //
+      if (n <= ablas.ablasblocksize(ref a)) {
+        if (isupper) {
+
+          //
+          // Compute inverse of upper triangular matrix.
+          //
+          for (j = 0; j <= n - 1; j++) {
+            if (!isunit) {
+              if ((double)(a[offs + j, offs + j]) == (double)(0)) {
                 info = -3;
                 return;
-            }
-            
+              }
+              a[offs + j, offs + j] = 1 / a[offs + j, offs + j];
+              ajj = -a[offs + j, offs + j];
+            } else {
+              ajj = -1;
+            }
+
             //
-            // Call cache-oblivious code
+            // Compute elements 1:j-1 of j-th column.
             //
-            work = new double[n];
-            rmatrixluinverserec(ref a, 0, n, ref work, ref info, ref rep);
-            
-            //
-            // apply permutations
-            //
-            for(i=0; i<=n-1; i++)
-            {
-                for(j=n-2; j>=0; j--)
-                {
-                    k = pivots[j];
-                    v = a[i,j];
-                    a[i,j] = a[i,k];
-                    a[i,k] = v;
+            if (j > 0) {
+              i1_ = (offs + 0) - (0);
+              for (i_ = 0; i_ <= j - 1; i_++) {
+                tmp[i_] = a[i_ + i1_, offs + j];
+              }
+              for (i = 0; i <= j - 1; i++) {
+                if (i < j - 1) {
+                  i1_ = (i + 1) - (offs + i + 1);
+                  v = 0.0;
+                  for (i_ = offs + i + 1; i_ <= offs + j - 1; i_++) {
+                    v += a[offs + i, i_] * tmp[i_ + i1_];
+                  }
+                } else {
+                  v = 0;
                 }
-            }
-        }
-
-
-        /*************************************************************************
-        Inversion of a general matrix.
-
-        Input parameters:
-            A   -   matrix. Array whose indexes range within [0..N-1, 0..N-1].
-            N   -   size of matrix A.
-
-        Output parameters:
-            Info    -   return code, same as in RMatrixLUInverse
-            Rep     -   solver report, same as in RMatrixLUInverse
-            A       -   inverse of matrix A, same as in RMatrixLUInverse
-
-        Result:
-            True, if the matrix is not singular.
-            False, if the matrix is singular.
-
-          -- ALGLIB --
-             Copyright 2005 by Bochkanov Sergey
-        *************************************************************************/
-        public static void rmatrixinverse(ref double[,] a,
-            int n,
-            ref int info,
-            ref matinvreport rep)
-        {
-            int[] pivots = new int[0];
-
-            trfac.rmatrixlu(ref a, n, n, ref pivots);
-            rmatrixluinverse(ref a, ref pivots, n, ref info, ref rep);
-        }
-
-
-        /*************************************************************************
-        Inversion of a matrix given by its LU decomposition.
-
-        INPUT PARAMETERS:
-            A       -   LU decomposition of the matrix (output of CMatrixLU subroutine).
-            Pivots  -   table of permutations which were made during the LU decomposition
-                        (the output of CMatrixLU subroutine).
-            N       -   size of matrix A.
-
-        OUTPUT PARAMETERS:
-            Info    -   return code, same as in RMatrixLUInverse
-            Rep     -   solver report, same as in RMatrixLUInverse
-            A       -   inverse of matrix A, same as in RMatrixLUInverse
-
-          -- ALGLIB routine --
-             05.02.2010
-             Bochkanov Sergey
-        *************************************************************************/
-        public static void cmatrixluinverse(ref AP.Complex[,] a,
-            ref int[] pivots,
-            int n,
-            ref int info,
-            ref matinvreport rep)
-        {
-            AP.Complex[] work = new AP.Complex[0];
-            int i = 0;
-            int j = 0;
-            int k = 0;
-            AP.Complex v = 0;
-
-            info = 1;
-            
-            //
-            // Quick return if possible
-            //
-            if( n==0 )
-            {
-                info = -1;
-                return;
-            }
-            for(i=0; i<=n-1; i++)
-            {
-                if( pivots[i]>n-1 | pivots[i]<i )
-                {
-                    info = -1;
-                    return;
+                if (!isunit) {
+                  a[offs + i, offs + j] = v + a[offs + i, offs + i] * tmp[i];
+                } else {
+                  a[offs + i, offs + j] = v + tmp[i];
                 }
-            }
-            
-            //
-            // calculate condition numbers
-            //
-            rep.r1 = rcond.cmatrixlurcond1(ref a, n);
-            rep.rinf = rcond.cmatrixlurcondinf(ref a, n);
-            if( (double)(rep.r1)<(double)(rcond.rcondthreshold()) | (double)(rep.rinf)<(double)(rcond.rcondthreshold()) )
-            {
-                for(i=0; i<=n-1; i++)
-                {
-                    for(j=0; j<=n-1; j++)
-                    {
-                        a[i,j] = 0;
-                    }
-                }
-                rep.r1 = 0;
-                rep.rinf = 0;
+              }
+              for (i_ = offs + 0; i_ <= offs + j - 1; i_++) {
+                a[i_, offs + j] = ajj * a[i_, offs + j];
+              }
+            }
+          }
+        } else {
+
+          //
+          // Compute inverse of lower triangular matrix.
+          //
+          for (j = n - 1; j >= 0; j--) {
+            if (!isunit) {
+              if ((double)(a[offs + j, offs + j]) == (double)(0)) {
                 info = -3;
                 return;
-            }
-            
-            //
-            // Call cache-oblivious code
-            //
-            work = new AP.Complex[n];
-            cmatrixluinverserec(ref a, 0, n, ref work, ref info, ref rep);
-            
-            //
-            // apply permutations
-            //
-            for(i=0; i<=n-1; i++)
-            {
-                for(j=n-2; j>=0; j--)
-                {
-                    k = pivots[j];
-                    v = a[i,j];
-                    a[i,j] = a[i,k];
-                    a[i,k] = v;
+              }
+              a[offs + j, offs + j] = 1 / a[offs + j, offs + j];
+              ajj = -a[offs + j, offs + j];
+            } else {
+              ajj = -1;
+            }
+            if (j < n - 1) {
+
+              //
+              // Compute elements j+1:n of j-th column.
+              //
+              i1_ = (offs + j + 1) - (j + 1);
+              for (i_ = j + 1; i_ <= n - 1; i_++) {
+                tmp[i_] = a[i_ + i1_, offs + j];
+              }
+              for (i = j + 1; i <= n - 1; i++) {
+                if (i > j + 1) {
+                  i1_ = (j + 1) - (offs + j + 1);
+                  v = 0.0;
+                  for (i_ = offs + j + 1; i_ <= offs + i - 1; i_++) {
+                    v += a[offs + i, i_] * tmp[i_ + i1_];
+                  }
+                } else {
+                  v = 0;
                 }
-            }
-        }
-
-
-        /*************************************************************************
-        Inversion of a general matrix.
-
-        Input parameters:
-            A   -   matrix, array[0..N-1,0..N-1].
-            N   -   size of A.
-
-        Output parameters:
-            Info    -   return code, same as in RMatrixLUInverse
-            Rep     -   solver report, same as in RMatrixLUInverse
-            A       -   inverse of matrix A, same as in RMatrixLUInverse
-
-          -- ALGLIB --
-             Copyright 2005 by Bochkanov Sergey
-        *************************************************************************/
-        public static void cmatrixinverse(ref AP.Complex[,] a,
-            int n,
-            ref int info,
-            ref matinvreport rep)
-        {
-            int[] pivots = new int[0];
-
-            trfac.cmatrixlu(ref a, n, n, ref pivots);
-            cmatrixluinverse(ref a, ref pivots, n, ref info, ref rep);
-        }
-
-
-        /*************************************************************************
-        Inversion of a symmetric positive definite matrix which is given
-        by Cholesky decomposition.
-
-        Input parameters:
-            A       -   Cholesky decomposition of the matrix to be inverted:
-                        A=U*U or A = L*L'.
-                        Output of  SPDMatrixCholesky subroutine.
-            N       -   size of matrix A.
-            IsUpper    storage format.
-                        If IsUpper = True, then matrix A is given as A = U'*U
-                        (matrix contains upper triangle).
-                        Similarly, if IsUpper = False, then A = L*L'.
-
-        Output parameters:
-            Info    -   return code, same as in RMatrixLUInverse
-            Rep     -   solver report, same as in RMatrixLUInverse
-            A       -   inverse of matrix A, same as in RMatrixLUInverse
-
-          -- ALGLIB routine --
-             10.02.2010
-             Bochkanov Sergey
-        *************************************************************************/
-        public static void spdmatrixcholeskyinverse(ref double[,] a,
-            int n,
-            bool isupper,
-            ref int info,
-            ref matinvreport rep)
-        {
-            int i = 0;
-            int j = 0;
-            int k = 0;
-            double v = 0;
-            double ajj = 0;
-            double aii = 0;
-            double[] tmp = new double[0];
-            int info2 = 0;
-            matinvreport rep2 = new matinvreport();
-
-            if( n<1 )
-            {
-                info = -1;
-                return;
-            }
-            info = 1;
-            
-            //
-            // calculate condition numbers
-            //
-            rep.r1 = rcond.spdmatrixcholeskyrcond(ref a, n, isupper);
-            rep.rinf = rep.r1;
-            if( (double)(rep.r1)<(double)(rcond.rcondthreshold()) | (double)(rep.rinf)<(double)(rcond.rcondthreshold()) )
-            {
-                if( isupper )
-                {
-                    for(i=0; i<=n-1; i++)
-                    {
-                        for(j=i; j<=n-1; j++)
-                        {
-                            a[i,j] = 0;
-                        }
-                    }
+                if (!isunit) {
+                  a[offs + i, offs + j] = v + a[offs + i, offs + i] * tmp[i];
+                } else {
+                  a[offs + i, offs + j] = v + tmp[i];
                 }
-                else
-                {
-                    for(i=0; i<=n-1; i++)
-                    {
-                        for(j=0; j<=i; j++)
-                        {
-                            a[i,j] = 0;
-                        }
-                    }
-                }
-                rep.r1 = 0;
-                rep.rinf = 0;
+              }
+              for (i_ = offs + j + 1; i_ <= offs + n - 1; i_++) {
+                a[i_, offs + j] = ajj * a[i_, offs + j];
+              }
+            }
+          }
+        }
+        return;
+      }
+
+      //
+      // Recursive case
+      //
+      ablas.ablassplitlength(ref a, n, ref n1, ref n2);
+      if (n2 > 0) {
+        if (isupper) {
+          for (i = 0; i <= n1 - 1; i++) {
+            for (i_ = offs + n1; i_ <= offs + n - 1; i_++) {
+              a[offs + i, i_] = -1 * a[offs + i, i_];
+            }
+          }
+          ablas.rmatrixlefttrsm(n1, n2, ref a, offs, offs, isupper, isunit, 0, ref a, offs, offs + n1);
+          ablas.rmatrixrighttrsm(n1, n2, ref a, offs + n1, offs + n1, isupper, isunit, 0, ref a, offs, offs + n1);
+        } else {
+          for (i = 0; i <= n2 - 1; i++) {
+            for (i_ = offs; i_ <= offs + n1 - 1; i_++) {
+              a[offs + n1 + i, i_] = -1 * a[offs + n1 + i, i_];
+            }
+          }
+          ablas.rmatrixrighttrsm(n2, n1, ref a, offs, offs, isupper, isunit, 0, ref a, offs + n1, offs);
+          ablas.rmatrixlefttrsm(n2, n1, ref a, offs + n1, offs + n1, isupper, isunit, 0, ref a, offs + n1, offs);
+        }
+        rmatrixtrinverserec(ref a, offs + n1, n2, isupper, isunit, ref tmp, ref info, ref rep);
+      }
+      rmatrixtrinverserec(ref a, offs, n1, isupper, isunit, ref tmp, ref info, ref rep);
+    }
+
+
+    /*************************************************************************
+    Triangular matrix inversion, recursive subroutine
+
+      -- ALGLIB --
+         05.02.2010, Bochkanov Sergey.
+         Univ. of Tennessee, Univ. of California Berkeley, NAG Ltd.,
+         Courant Institute, Argonne National Lab, and Rice University
+         February 29, 1992.
+    *************************************************************************/
+    private static void cmatrixtrinverserec(ref AP.Complex[,] a,
+        int offs,
+        int n,
+        bool isupper,
+        bool isunit,
+        ref AP.Complex[] tmp,
+        ref int info,
+        ref matinvreport rep) {
+      int n1 = 0;
+      int n2 = 0;
+      int i = 0;
+      int j = 0;
+      AP.Complex v = 0;
+      AP.Complex ajj = 0;
+      int i_ = 0;
+      int i1_ = 0;
+
+      if (n < 1) {
+        info = -1;
+        return;
+      }
+
+      //
+      // Base case
+      //
+      if (n <= ablas.ablascomplexblocksize(ref a)) {
+        if (isupper) {
+
+          //
+          // Compute inverse of upper triangular matrix.
+          //
+          for (j = 0; j <= n - 1; j++) {
+            if (!isunit) {
+              if (a[offs + j, offs + j] == 0) {
                 info = -3;
                 return;
-            }
-            
+              }
+              a[offs + j, offs + j] = 1 / a[offs + j, offs + j];
+              ajj = -a[offs + j, offs + j];
+            } else {
+              ajj = -1;
+            }
+
             //
-            // Inverse
+            // Compute elements 1:j-1 of j-th column.
             //
-            tmp = new double[n];
-            spdmatrixcholeskyinverserec(ref a, 0, n, isupper, ref tmp);
-        }
-
-
-        /*************************************************************************
-        Inversion of a symmetric positive definite matrix.
-
-        Given an upper or lower triangle of a symmetric positive definite matrix,
-        the algorithm generates matrix A^-1 and saves the upper or lower triangle
-        depending on the input.
-
-        Input parameters:
-            A       -   matrix to be inverted (upper or lower triangle).
-                        Array with elements [0..N-1,0..N-1].
-            N       -   size of matrix A.
-            IsUpper -   storage format.
-                        If IsUpper = True, then the upper triangle of matrix A is
-                        given, otherwise the lower triangle is given.
-
-        Output parameters:
-            Info    -   return code, same as in RMatrixLUInverse
-            Rep     -   solver report, same as in RMatrixLUInverse
-            A       -   inverse of matrix A, same as in RMatrixLUInverse
-
-          -- ALGLIB routine --
-             10.02.2010
-             Bochkanov Sergey
-        *************************************************************************/
-        public static void spdmatrixinverse(ref double[,] a,
-            int n,
-            bool isupper,
-            ref int info,
-            ref matinvreport rep)
-        {
-            if( n<1 )
-            {
-                info = -1;
-                return;
-            }
-            info = 1;
-            if( trfac.spdmatrixcholesky(ref a, n, isupper) )
-            {
-                spdmatrixcholeskyinverse(ref a, n, isupper, ref info, ref rep);
-            }
-            else
-            {
-                info = -3;
-            }
-        }
-
-
-        /*************************************************************************
-        Inversion of a Hermitian positive definite matrix which is given
-        by Cholesky decomposition.
-
-        Input parameters:
-            A       -   Cholesky decomposition of the matrix to be inverted:
-                        A=U*U or A = L*L'.
-                        Output of  HPDMatrixCholesky subroutine.
-            N       -   size of matrix A.
-            IsUpper    storage format.
-                        If IsUpper = True, then matrix A is given as A = U'*U
-                        (matrix contains upper triangle).
-                        Similarly, if IsUpper = False, then A = L*L'.
-
-        Output parameters:
-            Info    -   return code, same as in RMatrixLUInverse
-            Rep     -   solver report, same as in RMatrixLUInverse
-            A       -   inverse of matrix A, same as in RMatrixLUInverse
-
-          -- ALGLIB routine --
-             10.02.2010
-             Bochkanov Sergey
-        *************************************************************************/
-        public static void hpdmatrixcholeskyinverse(ref AP.Complex[,] a,
-            int n,
-            bool isupper,
-            ref int info,
-            ref matinvreport rep)
-        {
-            int i = 0;
-            int j = 0;
-            int info2 = 0;
-            matinvreport rep2 = new matinvreport();
-            AP.Complex[] tmp = new AP.Complex[0];
-            AP.Complex v = 0;
-
-            if( n<1 )
-            {
-                info = -1;
-                return;
-            }
-            info = 1;
-            
-            //
-            // calculate condition numbers
-            //
-            rep.r1 = rcond.hpdmatrixcholeskyrcond(ref a, n, isupper);
-            rep.rinf = rep.r1;
-            if( (double)(rep.r1)<(double)(rcond.rcondthreshold()) | (double)(rep.rinf)<(double)(rcond.rcondthreshold()) )
-            {
-                if( isupper )
-                {
-                    for(i=0; i<=n-1; i++)
-                    {
-                        for(j=i; j<=n-1; j++)
-                        {
-                            a[i,j] = 0;
-                        }
-                    }
+            if (j > 0) {
+              i1_ = (offs + 0) - (0);
+              for (i_ = 0; i_ <= j - 1; i_++) {
+                tmp[i_] = a[i_ + i1_, offs + j];
+              }
+              for (i = 0; i <= j - 1; i++) {
+                if (i < j - 1) {
+                  i1_ = (i + 1) - (offs + i + 1);
+                  v = 0.0;
+                  for (i_ = offs + i + 1; i_ <= offs + j - 1; i_++) {
+                    v += a[offs + i, i_] * tmp[i_ + i1_];
+                  }
+                } else {
+                  v = 0;
                 }
-                else
-                {
-                    for(i=0; i<=n-1; i++)
-                    {
-                        for(j=0; j<=i; j++)
-                        {
-                            a[i,j] = 0;
-                        }
-                    }
+                if (!isunit) {
+                  a[offs + i, offs + j] = v + a[offs + i, offs + i] * tmp[i];
+                } else {
+                  a[offs + i, offs + j] = v + tmp[i];
                 }
-                rep.r1 = 0;
-                rep.rinf = 0;
+              }
+              for (i_ = offs + 0; i_ <= offs + j - 1; i_++) {
+                a[i_, offs + j] = ajj * a[i_, offs + j];
+              }
+            }
+          }
+        } else {
+
+          //
+          // Compute inverse of lower triangular matrix.
+          //
+          for (j = n - 1; j >= 0; j--) {
+            if (!isunit) {
+              if (a[offs + j, offs + j] == 0) {
                 info = -3;
                 return;
-            }
-            
-            //
-            // Inverse
-            //
-            tmp = new AP.Complex[n];
-            hpdmatrixcholeskyinverserec(ref a, 0, n, isupper, ref tmp);
-        }
-
-
-        /*************************************************************************
-        Inversion of a Hermitian positive definite matrix.
-
-        Given an upper or lower triangle of a Hermitian positive definite matrix,
-        the algorithm generates matrix A^-1 and saves the upper or lower triangle
-        depending on the input.
-
-        Input parameters:
-            A       -   matrix to be inverted (upper or lower triangle).
-                        Array with elements [0..N-1,0..N-1].
-            N       -   size of matrix A.
-            IsUpper -   storage format.
-                        If IsUpper = True, then the upper triangle of matrix A is
-                        given, otherwise the lower triangle is given.
-
-        Output parameters:
-            Info    -   return code, same as in RMatrixLUInverse
-            Rep     -   solver report, same as in RMatrixLUInverse
-            A       -   inverse of matrix A, same as in RMatrixLUInverse
-
-          -- ALGLIB routine --
-             10.02.2010
-             Bochkanov Sergey
-        *************************************************************************/
-        public static void hpdmatrixinverse(ref AP.Complex[,] a,
-            int n,
-            bool isupper,
-            ref int info,
-            ref matinvreport rep)
-        {
-            if( n<1 )
-            {
-                info = -1;
-                return;
-            }
-            info = 1;
-            if( trfac.hpdmatrixcholesky(ref a, n, isupper) )
-            {
-                hpdmatrixcholeskyinverse(ref a, n, isupper, ref info, ref rep);
-            }
-            else
-            {
-                info = -3;
-            }
-        }
-
-
-        /*************************************************************************
-        Triangular matrix inverse (real)
-
-        The subroutine inverts the following types of matrices:
-            * upper triangular
-            * upper triangular with unit diagonal
-            * lower triangular
-            * lower triangular with unit diagonal
-
-        In case of an upper (lower) triangular matrix,  the  inverse  matrix  will
-        also be upper (lower) triangular, and after the end of the algorithm,  the
-        inverse matrix replaces the source matrix. The elements  below (above) the
-        main diagonal are not changed by the algorithm.
-
-        If  the matrix  has a unit diagonal, the inverse matrix also  has  a  unit
-        diagonal, and the diagonal elements are not passed to the algorithm.
-
-        Input parameters:
-            A       -   matrix, array[0..N-1, 0..N-1].
-            N       -   size of A.
-            IsUpper -   True, if the matrix is upper triangular.
-            IsUnit  -   True, if the matrix has a unit diagonal.
-
-        Output parameters:
-            Info    -   same as for RMatrixLUInverse
-            Rep     -   same as for RMatrixLUInverse
-            A       -   same as for RMatrixLUInverse.
-
-          -- ALGLIB --
-             Copyright 05.02.2010 by Bochkanov Sergey
-        *************************************************************************/
-        public static void rmatrixtrinverse(ref double[,] a,
-            int n,
-            bool isupper,
-            bool isunit,
-            ref int info,
-            ref matinvreport rep)
-        {
-            int i = 0;
-            int j = 0;
-            double[] tmp = new double[0];
-
-            if( n<1 )
-            {
-                info = -1;
-                return;
-            }
-            info = 1;
-            
-            //
-            // calculate condition numbers
-            //
-            rep.r1 = rcond.rmatrixtrrcond1(ref a, n, isupper, isunit);
-            rep.rinf = rcond.rmatrixtrrcondinf(ref a, n, isupper, isunit);
-            if( (double)(rep.r1)<(double)(rcond.rcondthreshold()) | (double)(rep.rinf)<(double)(rcond.rcondthreshold()) )
-            {
-                for(i=0; i<=n-1; i++)
-                {
-                    for(j=0; j<=n-1; j++)
-                    {
-                        a[i,j] = 0;
-                    }
+              }
+              a[offs + j, offs + j] = 1 / a[offs + j, offs + j];
+              ajj = -a[offs + j, offs + j];
+            } else {
+              ajj = -1;
+            }
+            if (j < n - 1) {
+
+              //
+              // Compute elements j+1:n of j-th column.
+              //
+              i1_ = (offs + j + 1) - (j + 1);
+              for (i_ = j + 1; i_ <= n - 1; i_++) {
+                tmp[i_] = a[i_ + i1_, offs + j];
+              }
+              for (i = j + 1; i <= n - 1; i++) {
+                if (i > j + 1) {
+                  i1_ = (j + 1) - (offs + j + 1);
+                  v = 0.0;
+                  for (i_ = offs + j + 1; i_ <= offs + i - 1; i_++) {
+                    v += a[offs + i, i_] * tmp[i_ + i1_];
+                  }
+                } else {
+                  v = 0;
                 }
-                rep.r1 = 0;
-                rep.rinf = 0;
-                info = -3;
-                return;
-            }
-            
-            //
-            // Invert
-            //
-            tmp = new double[n];
-            rmatrixtrinverserec(ref a, 0, n, isupper, isunit, ref tmp, ref info, ref rep);
-        }
-
-
-        /*************************************************************************
-        Triangular matrix inverse (complex)
-
-        The subroutine inverts the following types of matrices:
-            * upper triangular
-            * upper triangular with unit diagonal
-            * lower triangular
-            * lower triangular with unit diagonal
-
-        In case of an upper (lower) triangular matrix,  the  inverse  matrix  will
-        also be upper (lower) triangular, and after the end of the algorithm,  the
-        inverse matrix replaces the source matrix. The elements  below (above) the
-        main diagonal are not changed by the algorithm.
-
-        If  the matrix  has a unit diagonal, the inverse matrix also  has  a  unit
-        diagonal, and the diagonal elements are not passed to the algorithm.
-
-        Input parameters:
-            A       -   matrix, array[0..N-1, 0..N-1].
-            N       -   size of A.
-            IsUpper -   True, if the matrix is upper triangular.
-            IsUnit  -   True, if the matrix has a unit diagonal.
-
-        Output parameters:
-            Info    -   same as for RMatrixLUInverse
-            Rep     -   same as for RMatrixLUInverse
-            A       -   same as for RMatrixLUInverse.
-
-          -- ALGLIB --
-             Copyright 05.02.2010 by Bochkanov Sergey
-        *************************************************************************/
-        public static void cmatrixtrinverse(ref AP.Complex[,] a,
-            int n,
-            bool isupper,
-            bool isunit,
-            ref int info,
-            ref matinvreport rep)
-        {
-            int i = 0;
-            int j = 0;
-            AP.Complex[] tmp = new AP.Complex[0];
-
-            if( n<1 )
-            {
-                info = -1;
-                return;
-            }
-            info = 1;
-            
-            //
-            // calculate condition numbers
-            //
-            rep.r1 = rcond.cmatrixtrrcond1(ref a, n, isupper, isunit);
-            rep.rinf = rcond.cmatrixtrrcondinf(ref a, n, isupper, isunit);
-            if( (double)(rep.r1)<(double)(rcond.rcondthreshold()) | (double)(rep.rinf)<(double)(rcond.rcondthreshold()) )
-            {
-                for(i=0; i<=n-1; i++)
-                {
-                    for(j=0; j<=n-1; j++)
-                    {
-                        a[i,j] = 0;
-                    }
+                if (!isunit) {
+                  a[offs + i, offs + j] = v + a[offs + i, offs + i] * tmp[i];
+                } else {
+                  a[offs + i, offs + j] = v + tmp[i];
                 }
-                rep.r1 = 0;
-                rep.rinf = 0;
-                info = -3;
-                return;
-            }
-            
-            //
-            // Invert
-            //
-            tmp = new AP.Complex[n];
-            cmatrixtrinverserec(ref a, 0, n, isupper, isunit, ref tmp, ref info, ref rep);
-        }
-
-
-        /*************************************************************************
-        Triangular matrix inversion, recursive subroutine
-
-          -- ALGLIB --
-             05.02.2010, Bochkanov Sergey.
-             Univ. of Tennessee, Univ. of California Berkeley, NAG Ltd.,
-             Courant Institute, Argonne National Lab, and Rice University
-             February 29, 1992.
-        *************************************************************************/
-        private static void rmatrixtrinverserec(ref double[,] a,
-            int offs,
-            int n,
-            bool isupper,
-            bool isunit,
-            ref double[] tmp,
-            ref int info,
-            ref matinvreport rep)
-        {
-            int n1 = 0;
-            int n2 = 0;
-            int i = 0;
-            int j = 0;
-            double v = 0;
-            double ajj = 0;
-            int i_ = 0;
-            int i1_ = 0;
-
-            if( n<1 )
-            {
-                info = -1;
-                return;
-            }
-            
-            //
-            // Base case
-            //
-            if( n<=ablas.ablasblocksize(ref a) )
-            {
-                if( isupper )
-                {
-                    
-                    //
-                    // Compute inverse of upper triangular matrix.
-                    //
-                    for(j=0; j<=n-1; j++)
-                    {
-                        if( !isunit )
-                        {
-                            if( (double)(a[offs+j,offs+j])==(double)(0) )
-                            {
-                                info = -3;
-                                return;
-                            }
-                            a[offs+j,offs+j] = 1/a[offs+j,offs+j];
-                            ajj = -a[offs+j,offs+j];
-                        }
-                        else
-                        {
-                            ajj = -1;
-                        }
-                        
-                        //
-                        // Compute elements 1:j-1 of j-th column.
-                        //
-                        if( j>0 )
-                        {
-                            i1_ = (offs+0) - (0);
-                            for(i_=0; i_<=j-1;i_++)
-                            {
-                                tmp[i_] = a[i_+i1_,offs+j];
-                            }
-                            for(i=0; i<=j-1; i++)
-                            {
-                                if( i<j-1 )
-                                {
-                                    i1_ = (i+1)-(offs+i+1);
-                                    v = 0.0;
-                                    for(i_=offs+i+1; i_<=offs+j-1;i_++)
-                                    {
-                                        v += a[offs+i,i_]*tmp[i_+i1_];
-                                    }
-                                }
-                                else
-                                {
-                                    v = 0;
-                                }
-                                if( !isunit )
-                                {
-                                    a[offs+i,offs+j] = v+a[offs+i,offs+i]*tmp[i];
-                                }
-                                else
-                                {
-                                    a[offs+i,offs+j] = v+tmp[i];
-                                }
-                            }
-                            for(i_=offs+0; i_<=offs+j-1;i_++)
-                            {
-                                a[i_,offs+j] = ajj*a[i_,offs+j];
-                            }
-                        }
-                    }
+              }
+              for (i_ = offs + j + 1; i_ <= offs + n - 1; i_++) {
+                a[i_, offs + j] = ajj * a[i_, offs + j];
+              }
+            }
+          }
+        }
+        return;
+      }
+
+      //
+      // Recursive case
+      //
+      ablas.ablascomplexsplitlength(ref a, n, ref n1, ref n2);
+      if (n2 > 0) {
+        if (isupper) {
+          for (i = 0; i <= n1 - 1; i++) {
+            for (i_ = offs + n1; i_ <= offs + n - 1; i_++) {
+              a[offs + i, i_] = -1 * a[offs + i, i_];
+            }
+          }
+          ablas.cmatrixlefttrsm(n1, n2, ref a, offs, offs, isupper, isunit, 0, ref a, offs, offs + n1);
+          ablas.cmatrixrighttrsm(n1, n2, ref a, offs + n1, offs + n1, isupper, isunit, 0, ref a, offs, offs + n1);
+        } else {
+          for (i = 0; i <= n2 - 1; i++) {
+            for (i_ = offs; i_ <= offs + n1 - 1; i_++) {
+              a[offs + n1 + i, i_] = -1 * a[offs + n1 + i, i_];
+            }
+          }
+          ablas.cmatrixrighttrsm(n2, n1, ref a, offs, offs, isupper, isunit, 0, ref a, offs + n1, offs);
+          ablas.cmatrixlefttrsm(n2, n1, ref a, offs + n1, offs + n1, isupper, isunit, 0, ref a, offs + n1, offs);
+        }
+        cmatrixtrinverserec(ref a, offs + n1, n2, isupper, isunit, ref tmp, ref info, ref rep);
+      }
+      cmatrixtrinverserec(ref a, offs, n1, isupper, isunit, ref tmp, ref info, ref rep);
+    }
+
+
+    private static void rmatrixluinverserec(ref double[,] a,
+        int offs,
+        int n,
+        ref double[] work,
+        ref int info,
+        ref matinvreport rep) {
+      int i = 0;
+      int iws = 0;
+      int j = 0;
+      int jb = 0;
+      int jj = 0;
+      int jp = 0;
+      int k = 0;
+      double v = 0;
+      int n1 = 0;
+      int n2 = 0;
+      int i_ = 0;
+      int i1_ = 0;
+
+      if (n < 1) {
+        info = -1;
+        return;
+      }
+
+      //
+      // Base case
+      //
+      if (n <= ablas.ablasblocksize(ref a)) {
+
+        //
+        // Form inv(U)
+        //
+        rmatrixtrinverserec(ref a, offs, n, true, false, ref work, ref info, ref rep);
+        if (info <= 0) {
+          return;
+        }
+
+        //
+        // Solve the equation inv(A)*L = inv(U) for inv(A).
+        //
+        for (j = n - 1; j >= 0; j--) {
+
+          //
+          // Copy current column of L to WORK and replace with zeros.
+          //
+          for (i = j + 1; i <= n - 1; i++) {
+            work[i] = a[offs + i, offs + j];
+            a[offs + i, offs + j] = 0;
+          }
+
+          //
+          // Compute current column of inv(A).
+          //
+          if (j < n - 1) {
+            for (i = 0; i <= n - 1; i++) {
+              i1_ = (j + 1) - (offs + j + 1);
+              v = 0.0;
+              for (i_ = offs + j + 1; i_ <= offs + n - 1; i_++) {
+                v += a[offs + i, i_] * work[i_ + i1_];
+              }
+              a[offs + i, offs + j] = a[offs + i, offs + j] - v;
+            }
+          }
+        }
+        return;
+      }
+
+      //
+      // Recursive code:
+      //
+      //         ( L1      )   ( U1  U12 )
+      // A    =  (         ) * (         )
+      //         ( L12  L2 )   (     U2  )
+      //
+      //         ( W   X )
+      // A^-1 =  (       )
+      //         ( Y   Z )
+      //
+      ablas.ablassplitlength(ref a, n, ref n1, ref n2);
+      System.Diagnostics.Debug.Assert(n2 > 0, "LUInverseRec: internal error!");
+
+      //
+      // X := inv(U1)*U12*inv(U2)
+      //
+      ablas.rmatrixlefttrsm(n1, n2, ref a, offs, offs, true, false, 0, ref a, offs, offs + n1);
+      ablas.rmatrixrighttrsm(n1, n2, ref a, offs + n1, offs + n1, true, false, 0, ref a, offs, offs + n1);
+
+      //
+      // Y := inv(L2)*L12*inv(L1)
+      //
+      ablas.rmatrixlefttrsm(n2, n1, ref a, offs + n1, offs + n1, false, true, 0, ref a, offs + n1, offs);
+      ablas.rmatrixrighttrsm(n2, n1, ref a, offs, offs, false, true, 0, ref a, offs + n1, offs);
+
+      //
+      // W := inv(L1*U1)+X*Y
+      //
+      rmatrixluinverserec(ref a, offs, n1, ref work, ref info, ref rep);
+      if (info <= 0) {
+        return;
+      }
+      ablas.rmatrixgemm(n1, n1, n2, 1.0, ref a, offs, offs + n1, 0, ref a, offs + n1, offs, 0, 1.0, ref a, offs, offs);
+
+      //
+      // X := -X*inv(L2)
+      // Y := -inv(U2)*Y
+      //
+      ablas.rmatrixrighttrsm(n1, n2, ref a, offs + n1, offs + n1, false, true, 0, ref a, offs, offs + n1);
+      for (i = 0; i <= n1 - 1; i++) {
+        for (i_ = offs + n1; i_ <= offs + n - 1; i_++) {
+          a[offs + i, i_] = -1 * a[offs + i, i_];
+        }
+      }
+      ablas.rmatrixlefttrsm(n2, n1, ref a, offs + n1, offs + n1, true, false, 0, ref a, offs + n1, offs);
+      for (i = 0; i <= n2 - 1; i++) {
+        for (i_ = offs; i_ <= offs + n1 - 1; i_++) {
+          a[offs + n1 + i, i_] = -1 * a[offs + n1 + i, i_];
+        }
+      }
+
+      //
+      // Z := inv(L2*U2)
+      //
+      rmatrixluinverserec(ref a, offs + n1, n2, ref work, ref info, ref rep);
+    }
+
+
+    private static void cmatrixluinverserec(ref AP.Complex[,] a,
+        int offs,
+        int n,
+        ref AP.Complex[] work,
+        ref int info,
+        ref matinvreport rep) {
+      int i = 0;
+      int iws = 0;
+      int j = 0;
+      int jb = 0;
+      int jj = 0;
+      int jp = 0;
+      int k = 0;
+      AP.Complex v = 0;
+      int n1 = 0;
+      int n2 = 0;
+      int i_ = 0;
+      int i1_ = 0;
+
+      if (n < 1) {
+        info = -1;
+        return;
+      }
+
+      //
+      // Base case
+      //
+      if (n <= ablas.ablascomplexblocksize(ref a)) {
+
+        //
+        // Form inv(U)
+        //
+        cmatrixtrinverserec(ref a, offs, n, true, false, ref work, ref info, ref rep);
+        if (info <= 0) {
+          return;
+        }
+
+        //
+        // Solve the equation inv(A)*L = inv(U) for inv(A).
+        //
+        for (j = n - 1; j >= 0; j--) {
+
+          //
+          // Copy current column of L to WORK and replace with zeros.
+          //
+          for (i = j + 1; i <= n - 1; i++) {
+            work[i] = a[offs + i, offs + j];
+            a[offs + i, offs + j] = 0;
+          }
+
+          //
+          // Compute current column of inv(A).
+          //
+          if (j < n - 1) {
+            for (i = 0; i <= n - 1; i++) {
+              i1_ = (j + 1) - (offs + j + 1);
+              v = 0.0;
+              for (i_ = offs + j + 1; i_ <= offs + n - 1; i_++) {
+                v += a[offs + i, i_] * work[i_ + i1_];
+              }
+              a[offs + i, offs + j] = a[offs + i, offs + j] - v;
+            }
+          }
+        }
+        return;
+      }
+
+      //
+      // Recursive code:
+      //
+      //         ( L1      )   ( U1  U12 )
+      // A    =  (         ) * (         )
+      //         ( L12  L2 )   (     U2  )
+      //
+      //         ( W   X )
+      // A^-1 =  (       )
+      //         ( Y   Z )
+      //
+      ablas.ablascomplexsplitlength(ref a, n, ref n1, ref n2);
+      System.Diagnostics.Debug.Assert(n2 > 0, "LUInverseRec: internal error!");
+
+      //
+      // X := inv(U1)*U12*inv(U2)
+      //
+      ablas.cmatrixlefttrsm(n1, n2, ref a, offs, offs, true, false, 0, ref a, offs, offs + n1);
+      ablas.cmatrixrighttrsm(n1, n2, ref a, offs + n1, offs + n1, true, false, 0, ref a, offs, offs + n1);
+
+      //
+      // Y := inv(L2)*L12*inv(L1)
+      //
+      ablas.cmatrixlefttrsm(n2, n1, ref a, offs + n1, offs + n1, false, true, 0, ref a, offs + n1, offs);
+      ablas.cmatrixrighttrsm(n2, n1, ref a, offs, offs, false, true, 0, ref a, offs + n1, offs);
+
+      //
+      // W := inv(L1*U1)+X*Y
+      //
+      cmatrixluinverserec(ref a, offs, n1, ref work, ref info, ref rep);
+      if (info <= 0) {
+        return;
+      }
+      ablas.cmatrixgemm(n1, n1, n2, 1.0, ref a, offs, offs + n1, 0, ref a, offs + n1, offs, 0, 1.0, ref a, offs, offs);
+
+      //
+      // X := -X*inv(L2)
+      // Y := -inv(U2)*Y
+      //
+      ablas.cmatrixrighttrsm(n1, n2, ref a, offs + n1, offs + n1, false, true, 0, ref a, offs, offs + n1);
+      for (i = 0; i <= n1 - 1; i++) {
+        for (i_ = offs + n1; i_ <= offs + n - 1; i_++) {
+          a[offs + i, i_] = -1 * a[offs + i, i_];
+        }
+      }
+      ablas.cmatrixlefttrsm(n2, n1, ref a, offs + n1, offs + n1, true, false, 0, ref a, offs + n1, offs);
+      for (i = 0; i <= n2 - 1; i++) {
+        for (i_ = offs; i_ <= offs + n1 - 1; i_++) {
+          a[offs + n1 + i, i_] = -1 * a[offs + n1 + i, i_];
+        }
+      }
+
+      //
+      // Z := inv(L2*U2)
+      //
+      cmatrixluinverserec(ref a, offs + n1, n2, ref work, ref info, ref rep);
+    }
+
+
+    /*************************************************************************
+    Recursive subroutine for SPD inversion.
+
+      -- ALGLIB routine --
+         10.02.2010
+         Bochkanov Sergey
+    *************************************************************************/
+    private static void spdmatrixcholeskyinverserec(ref double[,] a,
+        int offs,
+        int n,
+        bool isupper,
+        ref double[] tmp) {
+      int i = 0;
+      int j = 0;
+      double v = 0;
+      int n1 = 0;
+      int n2 = 0;
+      int info2 = 0;
+      matinvreport rep2 = new matinvreport();
+      int i_ = 0;
+      int i1_ = 0;
+
+      if (n < 1) {
+        return;
+      }
+
+      //
+      // Base case
+      //
+      if (n <= ablas.ablasblocksize(ref a)) {
+        rmatrixtrinverserec(ref a, offs, n, isupper, false, ref tmp, ref info2, ref rep2);
+        if (isupper) {
+
+          //
+          // Compute the product U * U'.
+          // NOTE: we never assume that diagonal of U is real
+          //
+          for (i = 0; i <= n - 1; i++) {
+            if (i == 0) {
+
+              //
+              // 1x1 matrix
+              //
+              a[offs + i, offs + i] = AP.Math.Sqr(a[offs + i, offs + i]);
+            } else {
+
+              //
+              // (I+1)x(I+1) matrix,
+              //
+              // ( A11  A12 )   ( A11^H        )   ( A11*A11^H+A12*A12^H  A12*A22^H )
+              // (          ) * (              ) = (                                )
+              // (      A22 )   ( A12^H  A22^H )   ( A22*A12^H            A22*A22^H )
+              //
+              // A11 is IxI, A22 is 1x1.
+              //
+              i1_ = (offs) - (0);
+              for (i_ = 0; i_ <= i - 1; i_++) {
+                tmp[i_] = a[i_ + i1_, offs + i];
+              }
+              for (j = 0; j <= i - 1; j++) {
+                v = a[offs + j, offs + i];
+                i1_ = (j) - (offs + j);
+                for (i_ = offs + j; i_ <= offs + i - 1; i_++) {
+                  a[offs + j, i_] = a[offs + j, i_] + v * tmp[i_ + i1_];
                 }
-                else
-                {
-                    
-                    //
-                    // Compute inverse of lower triangular matrix.
-                    //
-                    for(j=n-1; j>=0; j--)
-                    {
-                        if( !isunit )
-                        {
-                            if( (double)(a[offs+j,offs+j])==(double)(0) )
-                            {
-                                info = -3;
-                                return;
-                            }
-                            a[offs+j,offs+j] = 1/a[offs+j,offs+j];
-                            ajj = -a[offs+j,offs+j];
-                        }
-                        else
-                        {
-                            ajj = -1;
-                        }
-                        if( j<n-1 )
-                        {
-                            
-                            //
-                            // Compute elements j+1:n of j-th column.
-                            //
-                            i1_ = (offs+j+1) - (j+1);
-                            for(i_=j+1; i_<=n-1;i_++)
-                            {
-                                tmp[i_] = a[i_+i1_,offs+j];
-                            }
-                            for(i=j+1; i<=n-1; i++)
-                            {
-                                if( i>j+1 )
-                                {
-                                    i1_ = (j+1)-(offs+j+1);
-                                    v = 0.0;
-                                    for(i_=offs+j+1; i_<=offs+i-1;i_++)
-                                    {
-                                        v += a[offs+i,i_]*tmp[i_+i1_];
-                                    }
-                                }
-                                else
-                                {
-                                    v = 0;
-                                }
-                                if( !isunit )
-                                {
-                                    a[offs+i,offs+j] = v+a[offs+i,offs+i]*tmp[i];
-                                }
-                                else
-                                {
-                                    a[offs+i,offs+j] = v+tmp[i];
-                                }
-                            }
-                            for(i_=offs+j+1; i_<=offs+n-1;i_++)
-                            {
-                                a[i_,offs+j] = ajj*a[i_,offs+j];
-                            }
-                        }
-                    }
+              }
+              v = a[offs + i, offs + i];
+              for (i_ = offs; i_ <= offs + i - 1; i_++) {
+                a[i_, offs + i] = v * a[i_, offs + i];
+              }
+              a[offs + i, offs + i] = AP.Math.Sqr(a[offs + i, offs + i]);
+            }
+          }
+        } else {
+
+          //
+          // Compute the product L' * L
+          // NOTE: we never assume that diagonal of L is real
+          //
+          for (i = 0; i <= n - 1; i++) {
+            if (i == 0) {
+
+              //
+              // 1x1 matrix
+              //
+              a[offs + i, offs + i] = AP.Math.Sqr(a[offs + i, offs + i]);
+            } else {
+
+              //
+              // (I+1)x(I+1) matrix,
+              //
+              // ( A11^H  A21^H )   ( A11      )   ( A11^H*A11+A21^H*A21  A21^H*A22 )
+              // (              ) * (          ) = (                                )
+              // (        A22^H )   ( A21  A22 )   ( A22^H*A21            A22^H*A22 )
+              //
+              // A11 is IxI, A22 is 1x1.
+              //
+              i1_ = (offs) - (0);
+              for (i_ = 0; i_ <= i - 1; i_++) {
+                tmp[i_] = a[offs + i, i_ + i1_];
+              }
+              for (j = 0; j <= i - 1; j++) {
+                v = a[offs + i, offs + j];
+                i1_ = (0) - (offs);
+                for (i_ = offs; i_ <= offs + j; i_++) {
+                  a[offs + j, i_] = a[offs + j, i_] + v * tmp[i_ + i1_];
                 }
-                return;
-            }
-            
-            //
-            // Recursive case
-            //
-            ablas.ablassplitlength(ref a, n, ref n1, ref n2);
-            if( n2>0 )
-            {
-                if( isupper )
-                {
-                    for(i=0; i<=n1-1; i++)
-                    {
-                        for(i_=offs+n1; i_<=offs+n-1;i_++)
-                        {
-                            a[offs+i,i_] = -1*a[offs+i,i_];
-                        }
-                    }
-                    ablas.rmatrixlefttrsm(n1, n2, ref a, offs, offs, isupper, isunit, 0, ref a, offs, offs+n1);
-                    ablas.rmatrixrighttrsm(n1, n2, ref a, offs+n1, offs+n1, isupper, isunit, 0, ref a, offs, offs+n1);
+              }
+              v = a[offs + i, offs + i];
+              for (i_ = offs; i_ <= offs + i - 1; i_++) {
+                a[offs + i, i_] = v * a[offs + i, i_];
+              }
+              a[offs + i, offs + i] = AP.Math.Sqr(a[offs + i, offs + i]);
+            }
+          }
+        }
+        return;
+      }
+
+      //
+      // Recursive code: triangular factor inversion merged with
+      // UU' or L'L multiplication
+      //
+      ablas.ablassplitlength(ref a, n, ref n1, ref n2);
+
+      //
+      // form off-diagonal block of trangular inverse
+      //
+      if (isupper) {
+        for (i = 0; i <= n1 - 1; i++) {
+          for (i_ = offs + n1; i_ <= offs + n - 1; i_++) {
+            a[offs + i, i_] = -1 * a[offs + i, i_];
+          }
+        }
+        ablas.rmatrixlefttrsm(n1, n2, ref a, offs, offs, isupper, false, 0, ref a, offs, offs + n1);
+        ablas.rmatrixrighttrsm(n1, n2, ref a, offs + n1, offs + n1, isupper, false, 0, ref a, offs, offs + n1);
+      } else {
+        for (i = 0; i <= n2 - 1; i++) {
+          for (i_ = offs; i_ <= offs + n1 - 1; i_++) {
+            a[offs + n1 + i, i_] = -1 * a[offs + n1 + i, i_];
+          }
+        }
+        ablas.rmatrixrighttrsm(n2, n1, ref a, offs, offs, isupper, false, 0, ref a, offs + n1, offs);
+        ablas.rmatrixlefttrsm(n2, n1, ref a, offs + n1, offs + n1, isupper, false, 0, ref a, offs + n1, offs);
+      }
+
+      //
+      // invert first diagonal block
+      //
+      spdmatrixcholeskyinverserec(ref a, offs, n1, isupper, ref tmp);
+
+      //
+      // update first diagonal block with off-diagonal block,
+      // update off-diagonal block
+      //
+      if (isupper) {
+        ablas.rmatrixsyrk(n1, n2, 1.0, ref a, offs, offs + n1, 0, 1.0, ref a, offs, offs, isupper);
+        ablas.rmatrixrighttrsm(n1, n2, ref a, offs + n1, offs + n1, isupper, false, 1, ref a, offs, offs + n1);
+      } else {
+        ablas.rmatrixsyrk(n1, n2, 1.0, ref a, offs + n1, offs, 1, 1.0, ref a, offs, offs, isupper);
+        ablas.rmatrixlefttrsm(n2, n1, ref a, offs + n1, offs + n1, isupper, false, 1, ref a, offs + n1, offs);
+      }
+
+      //
+      // invert second diagonal block
+      //
+      spdmatrixcholeskyinverserec(ref a, offs + n1, n2, isupper, ref tmp);
+    }
+
+
+    /*************************************************************************
+    Recursive subroutine for HPD inversion.
+
+      -- ALGLIB routine --
+         10.02.2010
+         Bochkanov Sergey
+    *************************************************************************/
+    private static void hpdmatrixcholeskyinverserec(ref AP.Complex[,] a,
+        int offs,
+        int n,
+        bool isupper,
+        ref AP.Complex[] tmp) {
+      int i = 0;
+      int j = 0;
+      AP.Complex v = 0;
+      int n1 = 0;
+      int n2 = 0;
+      int info2 = 0;
+      matinvreport rep2 = new matinvreport();
+      int i_ = 0;
+      int i1_ = 0;
+
+      if (n < 1) {
+        return;
+      }
+
+      //
+      // Base case
+      //
+      if (n <= ablas.ablascomplexblocksize(ref a)) {
+        cmatrixtrinverserec(ref a, offs, n, isupper, false, ref tmp, ref info2, ref rep2);
+        if (isupper) {
+
+          //
+          // Compute the product U * U'.
+          // NOTE: we never assume that diagonal of U is real
+          //
+          for (i = 0; i <= n - 1; i++) {
+            if (i == 0) {
+
+              //
+              // 1x1 matrix
+              //
+              a[offs + i, offs + i] = AP.Math.Sqr(a[offs + i, offs + i].x) + AP.Math.Sqr(a[offs + i, offs + i].y);
+            } else {
+
+              //
+              // (I+1)x(I+1) matrix,
+              //
+              // ( A11  A12 )   ( A11^H        )   ( A11*A11^H+A12*A12^H  A12*A22^H )
+              // (          ) * (              ) = (                                )
+              // (      A22 )   ( A12^H  A22^H )   ( A22*A12^H            A22*A22^H )
+              //
+              // A11 is IxI, A22 is 1x1.
+              //
+              i1_ = (offs) - (0);
+              for (i_ = 0; i_ <= i - 1; i_++) {
+                tmp[i_] = AP.Math.Conj(a[i_ + i1_, offs + i]);
+              }
+              for (j = 0; j <= i - 1; j++) {
+                v = a[offs + j, offs + i];
+                i1_ = (j) - (offs + j);
+                for (i_ = offs + j; i_ <= offs + i - 1; i_++) {
+                  a[offs + j, i_] = a[offs + j, i_] + v * tmp[i_ + i1_];
                 }
-                else
-                {
-                    for(i=0; i<=n2-1; i++)
-                    {
-                        for(i_=offs; i_<=offs+n1-1;i_++)
-                        {
-                            a[offs+n1+i,i_] = -1*a[offs+n1+i,i_];
-                        }
-                    }
-                    ablas.rmatrixrighttrsm(n2, n1, ref a, offs, offs, isupper, isunit, 0, ref a, offs+n1, offs);
-                    ablas.rmatrixlefttrsm(n2, n1, ref a, offs+n1, offs+n1, isupper, isunit, 0, ref a, offs+n1, offs);
+              }
+              v = AP.Math.Conj(a[offs + i, offs + i]);
+              for (i_ = offs; i_ <= offs + i - 1; i_++) {
+                a[i_, offs + i] = v * a[i_, offs + i];
+              }
+              a[offs + i, offs + i] = AP.Math.Sqr(a[offs + i, offs + i].x) + AP.Math.Sqr(a[offs + i, offs + i].y);
+            }
+          }
+        } else {
+
+          //
+          // Compute the product L' * L
+          // NOTE: we never assume that diagonal of L is real
+          //
+          for (i = 0; i <= n - 1; i++) {
+            if (i == 0) {
+
+              //
+              // 1x1 matrix
+              //
+              a[offs + i, offs + i] = AP.Math.Sqr(a[offs + i, offs + i].x) + AP.Math.Sqr(a[offs + i, offs + i].y);
+            } else {
+
+              //
+              // (I+1)x(I+1) matrix,
+              //
+              // ( A11^H  A21^H )   ( A11      )   ( A11^H*A11+A21^H*A21  A21^H*A22 )
+              // (              ) * (          ) = (                                )
+              // (        A22^H )   ( A21  A22 )   ( A22^H*A21            A22^H*A22 )
+              //
+              // A11 is IxI, A22 is 1x1.
+              //
+              i1_ = (offs) - (0);
+              for (i_ = 0; i_ <= i - 1; i_++) {
+                tmp[i_] = a[offs + i, i_ + i1_];
+              }
+              for (j = 0; j <= i - 1; j++) {
+                v = AP.Math.Conj(a[offs + i, offs + j]);
+                i1_ = (0) - (offs);
+                for (i_ = offs; i_ <= offs + j; i_++) {
+                  a[offs + j, i_] = a[offs + j, i_] + v * tmp[i_ + i1_];
                 }
-                rmatrixtrinverserec(ref a, offs+n1, n2, isupper, isunit, ref tmp, ref info, ref rep);
-            }
-            rmatrixtrinverserec(ref a, offs, n1, isupper, isunit, ref tmp, ref info, ref rep);
-        }
-
-
-        /*************************************************************************
-        Triangular matrix inversion, recursive subroutine
-
-          -- ALGLIB --
-             05.02.2010, Bochkanov Sergey.
-             Univ. of Tennessee, Univ. of California Berkeley, NAG Ltd.,
-             Courant Institute, Argonne National Lab, and Rice University
-             February 29, 1992.
-        *************************************************************************/
-        private static void cmatrixtrinverserec(ref AP.Complex[,] a,
-            int offs,
-            int n,
-            bool isupper,
-            bool isunit,
-            ref AP.Complex[] tmp,
-            ref int info,
-            ref matinvreport rep)
-        {
-            int n1 = 0;
-            int n2 = 0;
-            int i = 0;
-            int j = 0;
-            AP.Complex v = 0;
-            AP.Complex ajj = 0;
-            int i_ = 0;
-            int i1_ = 0;
-
-            if( n<1 )
-            {
-                info = -1;
-                return;
-            }
-            
-            //
-            // Base case
-            //
-            if( n<=ablas.ablascomplexblocksize(ref a) )
-            {
-                if( isupper )
-                {
-                    
-                    //
-                    // Compute inverse of upper triangular matrix.
-                    //
-                    for(j=0; j<=n-1; j++)
-                    {
-                        if( !isunit )
-                        {
-                            if( a[offs+j,offs+j]==0 )
-                            {
-                                info = -3;
-                                return;
-                            }
-                            a[offs+j,offs+j] = 1/a[offs+j,offs+j];
-                            ajj = -a[offs+j,offs+j];
-                        }
-                        else
-                        {
-                            ajj = -1;
-                        }
-                        
-                        //
-                        // Compute elements 1:j-1 of j-th column.
-                        //
-                        if( j>0 )
-                        {
-                            i1_ = (offs+0) - (0);
-                            for(i_=0; i_<=j-1;i_++)
-                            {
-                                tmp[i_] = a[i_+i1_,offs+j];
-                            }
-                            for(i=0; i<=j-1; i++)
-                            {
-                                if( i<j-1 )
-                                {
-                                    i1_ = (i+1)-(offs+i+1);
-                                    v = 0.0;
-                                    for(i_=offs+i+1; i_<=offs+j-1;i_++)
-                                    {
-                                        v += a[offs+i,i_]*tmp[i_+i1_];
-                                    }
-                                }
-                                else
-                                {
-                                    v = 0;
-                                }
-                                if( !isunit )
-                                {
-                                    a[offs+i,offs+j] = v+a[offs+i,offs+i]*tmp[i];
-                                }
-                                else
-                                {
-                                    a[offs+i,offs+j] = v+tmp[i];
-                                }
-                            }
-                            for(i_=offs+0; i_<=offs+j-1;i_++)
-                            {
-                                a[i_,offs+j] = ajj*a[i_,offs+j];
-                            }
-                        }
-                    }
-                }
-                else
-                {
-                    
-                    //
-                    // Compute inverse of lower triangular matrix.
-                    //
-                    for(j=n-1; j>=0; j--)
-                    {
-                        if( !isunit )
-                        {
-                            if( a[offs+j,offs+j]==0 )
-                            {
-                                info = -3;
-                                return;
-                            }
-                            a[offs+j,offs+j] = 1/a[offs+j,offs+j];
-                            ajj = -a[offs+j,offs+j];
-                        }
-                        else
-                        {
-                            ajj = -1;
-                        }
-                        if( j<n-1 )
-                        {
-                            
-                            //
-                            // Compute elements j+1:n of j-th column.
-                            //
-                            i1_ = (offs+j+1) - (j+1);
-                            for(i_=j+1; i_<=n-1;i_++)
-                            {
-                                tmp[i_] = a[i_+i1_,offs+j];
-                            }
-                            for(i=j+1; i<=n-1; i++)
-                            {
-                                if( i>j+1 )
-                                {
-                                    i1_ = (j+1)-(offs+j+1);
-                                    v = 0.0;
-                                    for(i_=offs+j+1; i_<=offs+i-1;i_++)
-                                    {
-                                        v += a[offs+i,i_]*tmp[i_+i1_];
-                                    }
-                                }
-                                else
-                                {
-                                    v = 0;
-                                }
-                                if( !isunit )
-                                {
-                                    a[offs+i,offs+j] = v+a[offs+i,offs+i]*tmp[i];
-                                }
-                                else
-                                {
-                                    a[offs+i,offs+j] = v+tmp[i];
-                                }
-                            }
-                            for(i_=offs+j+1; i_<=offs+n-1;i_++)
-                            {
-                                a[i_,offs+j] = ajj*a[i_,offs+j];
-                            }
-                        }
-                    }
-                }
-                return;
-            }
-            
-            //
-            // Recursive case
-            //
-            ablas.ablascomplexsplitlength(ref a, n, ref n1, ref n2);
-            if( n2>0 )
-            {
-                if( isupper )
-                {
-                    for(i=0; i<=n1-1; i++)
-                    {
-                        for(i_=offs+n1; i_<=offs+n-1;i_++)
-                        {
-                            a[offs+i,i_] = -1*a[offs+i,i_];
-                        }
-                    }
-                    ablas.cmatrixlefttrsm(n1, n2, ref a, offs, offs, isupper, isunit, 0, ref a, offs, offs+n1);
-                    ablas.cmatrixrighttrsm(n1, n2, ref a, offs+n1, offs+n1, isupper, isunit, 0, ref a, offs, offs+n1);
-                }
-                else
-                {
-                    for(i=0; i<=n2-1; i++)
-                    {
-                        for(i_=offs; i_<=offs+n1-1;i_++)
-                        {
-                            a[offs+n1+i,i_] = -1*a[offs+n1+i,i_];
-                        }
-                    }
-                    ablas.cmatrixrighttrsm(n2, n1, ref a, offs, offs, isupper, isunit, 0, ref a, offs+n1, offs);
-                    ablas.cmatrixlefttrsm(n2, n1, ref a, offs+n1, offs+n1, isupper, isunit, 0, ref a, offs+n1, offs);
-                }
-                cmatrixtrinverserec(ref a, offs+n1, n2, isupper, isunit, ref tmp, ref info, ref rep);
-            }
-            cmatrixtrinverserec(ref a, offs, n1, isupper, isunit, ref tmp, ref info, ref rep);
-        }
-
-
-        private static void rmatrixluinverserec(ref double[,] a,
-            int offs,
-            int n,
-            ref double[] work,
-            ref int info,
-            ref matinvreport rep)
-        {
-            int i = 0;
-            int iws = 0;
-            int j = 0;
-            int jb = 0;
-            int jj = 0;
-            int jp = 0;
-            int k = 0;
-            double v = 0;
-            int n1 = 0;
-            int n2 = 0;
-            int i_ = 0;
-            int i1_ = 0;
-
-            if( n<1 )
-            {
-                info = -1;
-                return;
-            }
-            
-            //
-            // Base case
-            //
-            if( n<=ablas.ablasblocksize(ref a) )
-            {
-                
-                //
-                // Form inv(U)
-                //
-                rmatrixtrinverserec(ref a, offs, n, true, false, ref work, ref info, ref rep);
-                if( info<=0 )
-                {
-                    return;
-                }
-                
-                //
-                // Solve the equation inv(A)*L = inv(U) for inv(A).
-                //
-                for(j=n-1; j>=0; j--)
-                {
-                    
-                    //
-                    // Copy current column of L to WORK and replace with zeros.
-                    //
-                    for(i=j+1; i<=n-1; i++)
-                    {
-                        work[i] = a[offs+i,offs+j];
-                        a[offs+i,offs+j] = 0;
-                    }
-                    
-                    //
-                    // Compute current column of inv(A).
-                    //
-                    if( j<n-1 )
-                    {
-                        for(i=0; i<=n-1; i++)
-                        {
-                            i1_ = (j+1)-(offs+j+1);
-                            v = 0.0;
-                            for(i_=offs+j+1; i_<=offs+n-1;i_++)
-                            {
-                                v += a[offs+i,i_]*work[i_+i1_];
-                            }
-                            a[offs+i,offs+j] = a[offs+i,offs+j]-v;
-                        }
-                    }
-                }
-                return;
-            }
-            
-            //
-            // Recursive code:
-            //
-            //         ( L1      )   ( U1  U12 )
-            // A    =  (         ) * (         )
-            //         ( L12  L2 )   (     U2  )
-            //
-            //         ( W   X )
-            // A^-1 =  (       )
-            //         ( Y   Z )
-            //
-            ablas.ablassplitlength(ref a, n, ref n1, ref n2);
-            System.Diagnostics.Debug.Assert(n2>0, "LUInverseRec: internal error!");
-            
-            //
-            // X := inv(U1)*U12*inv(U2)
-            //
-            ablas.rmatrixlefttrsm(n1, n2, ref a, offs, offs, true, false, 0, ref a, offs, offs+n1);
-            ablas.rmatrixrighttrsm(n1, n2, ref a, offs+n1, offs+n1, true, false, 0, ref a, offs, offs+n1);
-            
-            //
-            // Y := inv(L2)*L12*inv(L1)
-            //
-            ablas.rmatrixlefttrsm(n2, n1, ref a, offs+n1, offs+n1, false, true, 0, ref a, offs+n1, offs);
-            ablas.rmatrixrighttrsm(n2, n1, ref a, offs, offs, false, true, 0, ref a, offs+n1, offs);
-            
-            //
-            // W := inv(L1*U1)+X*Y
-            //
-            rmatrixluinverserec(ref a, offs, n1, ref work, ref info, ref rep);
-            if( info<=0 )
-            {
-                return;
-            }
-            ablas.rmatrixgemm(n1, n1, n2, 1.0, ref a, offs, offs+n1, 0, ref a, offs+n1, offs, 0, 1.0, ref a, offs, offs);
-            
-            //
-            // X := -X*inv(L2)
-            // Y := -inv(U2)*Y
-            //
-            ablas.rmatrixrighttrsm(n1, n2, ref a, offs+n1, offs+n1, false, true, 0, ref a, offs, offs+n1);
-            for(i=0; i<=n1-1; i++)
-            {
-                for(i_=offs+n1; i_<=offs+n-1;i_++)
-                {
-                    a[offs+i,i_] = -1*a[offs+i,i_];
-                }
-            }
-            ablas.rmatrixlefttrsm(n2, n1, ref a, offs+n1, offs+n1, true, false, 0, ref a, offs+n1, offs);
-            for(i=0; i<=n2-1; i++)
-            {
-                for(i_=offs; i_<=offs+n1-1;i_++)
-                {
-                    a[offs+n1+i,i_] = -1*a[offs+n1+i,i_];
-                }
-            }
-            
-            //
-            // Z := inv(L2*U2)
-            //
-            rmatrixluinverserec(ref a, offs+n1, n2, ref work, ref info, ref rep);
-        }
-
-
-        private static void cmatrixluinverserec(ref AP.Complex[,] a,
-            int offs,
-            int n,
-            ref AP.Complex[] work,
-            ref int info,
-            ref matinvreport rep)
-        {
-            int i = 0;
-            int iws = 0;
-            int j = 0;
-            int jb = 0;
-            int jj = 0;
-            int jp = 0;
-            int k = 0;
-            AP.Complex v = 0;
-            int n1 = 0;
-            int n2 = 0;
-            int i_ = 0;
-            int i1_ = 0;
-
-            if( n<1 )
-            {
-                info = -1;
-                return;
-            }
-            
-            //
-            // Base case
-            //
-            if( n<=ablas.ablascomplexblocksize(ref a) )
-            {
-                
-                //
-                // Form inv(U)
-                //
-                cmatrixtrinverserec(ref a, offs, n, true, false, ref work, ref info, ref rep);
-                if( info<=0 )
-                {
-                    return;
-                }
-                
-                //
-                // Solve the equation inv(A)*L = inv(U) for inv(A).
-                //
-                for(j=n-1; j>=0; j--)
-                {
-                    
-                    //
-                    // Copy current column of L to WORK and replace with zeros.
-                    //
-                    for(i=j+1; i<=n-1; i++)
-                    {
-                        work[i] = a[offs+i,offs+j];
-                        a[offs+i,offs+j] = 0;
-                    }
-                    
-                    //
-                    // Compute current column of inv(A).
-                    //
-                    if( j<n-1 )
-                    {
-                        for(i=0; i<=n-1; i++)
-                        {
-                            i1_ = (j+1)-(offs+j+1);
-                            v = 0.0;
-                            for(i_=offs+j+1; i_<=offs+n-1;i_++)
-                            {
-                                v += a[offs+i,i_]*work[i_+i1_];
-                            }
-                            a[offs+i,offs+j] = a[offs+i,offs+j]-v;
-                        }
-                    }
-                }
-                return;
-            }
-            
-            //
-            // Recursive code:
-            //
-            //         ( L1      )   ( U1  U12 )
-            // A    =  (         ) * (         )
-            //         ( L12  L2 )   (     U2  )
-            //
-            //         ( W   X )
-            // A^-1 =  (       )
-            //         ( Y   Z )
-            //
-            ablas.ablascomplexsplitlength(ref a, n, ref n1, ref n2);
-            System.Diagnostics.Debug.Assert(n2>0, "LUInverseRec: internal error!");
-            
-            //
-            // X := inv(U1)*U12*inv(U2)
-            //
-            ablas.cmatrixlefttrsm(n1, n2, ref a, offs, offs, true, false, 0, ref a, offs, offs+n1);
-            ablas.cmatrixrighttrsm(n1, n2, ref a, offs+n1, offs+n1, true, false, 0, ref a, offs, offs+n1);
-            
-            //
-            // Y := inv(L2)*L12*inv(L1)
-            //
-            ablas.cmatrixlefttrsm(n2, n1, ref a, offs+n1, offs+n1, false, true, 0, ref a, offs+n1, offs);
-            ablas.cmatrixrighttrsm(n2, n1, ref a, offs, offs, false, true, 0, ref a, offs+n1, offs);
-            
-            //
-            // W := inv(L1*U1)+X*Y
-            //
-            cmatrixluinverserec(ref a, offs, n1, ref work, ref info, ref rep);
-            if( info<=0 )
-            {
-                return;
-            }
-            ablas.cmatrixgemm(n1, n1, n2, 1.0, ref a, offs, offs+n1, 0, ref a, offs+n1, offs, 0, 1.0, ref a, offs, offs);
-            
-            //
-            // X := -X*inv(L2)
-            // Y := -inv(U2)*Y
-            //
-            ablas.cmatrixrighttrsm(n1, n2, ref a, offs+n1, offs+n1, false, true, 0, ref a, offs, offs+n1);
-            for(i=0; i<=n1-1; i++)
-            {
-                for(i_=offs+n1; i_<=offs+n-1;i_++)
-                {
-                    a[offs+i,i_] = -1*a[offs+i,i_];
-                }
-            }
-            ablas.cmatrixlefttrsm(n2, n1, ref a, offs+n1, offs+n1, true, false, 0, ref a, offs+n1, offs);
-            for(i=0; i<=n2-1; i++)
-            {
-                for(i_=offs; i_<=offs+n1-1;i_++)
-                {
-                    a[offs+n1+i,i_] = -1*a[offs+n1+i,i_];
-                }
-            }
-            
-            //
-            // Z := inv(L2*U2)
-            //
-            cmatrixluinverserec(ref a, offs+n1, n2, ref work, ref info, ref rep);
-        }
-
-
-        /*************************************************************************
-        Recursive subroutine for SPD inversion.
-
-          -- ALGLIB routine --
-             10.02.2010
-             Bochkanov Sergey
-        *************************************************************************/
-        private static void spdmatrixcholeskyinverserec(ref double[,] a,
-            int offs,
-            int n,
-            bool isupper,
-            ref double[] tmp)
-        {
-            int i = 0;
-            int j = 0;
-            double v = 0;
-            int n1 = 0;
-            int n2 = 0;
-            int info2 = 0;
-            matinvreport rep2 = new matinvreport();
-            int i_ = 0;
-            int i1_ = 0;
-
-            if( n<1 )
-            {
-                return;
-            }
-            
-            //
-            // Base case
-            //
-            if( n<=ablas.ablasblocksize(ref a) )
-            {
-                rmatrixtrinverserec(ref a, offs, n, isupper, false, ref tmp, ref info2, ref rep2);
-                if( isupper )
-                {
-                    
-                    //
-                    // Compute the product U * U'.
-                    // NOTE: we never assume that diagonal of U is real
-                    //
-                    for(i=0; i<=n-1; i++)
-                    {
-                        if( i==0 )
-                        {
-                            
-                            //
-                            // 1x1 matrix
-                            //
-                            a[offs+i,offs+i] = AP.Math.Sqr(a[offs+i,offs+i]);
-                        }
-                        else
-                        {
-                            
-                            //
-                            // (I+1)x(I+1) matrix,
-                            //
-                            // ( A11  A12 )   ( A11^H        )   ( A11*A11^H+A12*A12^H  A12*A22^H )
-                            // (          ) * (              ) = (                                )
-                            // (      A22 )   ( A12^H  A22^H )   ( A22*A12^H            A22*A22^H )
-                            //
-                            // A11 is IxI, A22 is 1x1.
-                            //
-                            i1_ = (offs) - (0);
-                            for(i_=0; i_<=i-1;i_++)
-                            {
-                                tmp[i_] = a[i_+i1_,offs+i];
-                            }
-                            for(j=0; j<=i-1; j++)
-                            {
-                                v = a[offs+j,offs+i];
-                                i1_ = (j) - (offs+j);
-                                for(i_=offs+j; i_<=offs+i-1;i_++)
-                                {
-                                    a[offs+j,i_] = a[offs+j,i_] + v*tmp[i_+i1_];
-                                }
-                            }
-                            v = a[offs+i,offs+i];
-                            for(i_=offs; i_<=offs+i-1;i_++)
-                            {
-                                a[i_,offs+i] = v*a[i_,offs+i];
-                            }
-                            a[offs+i,offs+i] = AP.Math.Sqr(a[offs+i,offs+i]);
-                        }
-                    }
-                }
-                else
-                {
-                    
-                    //
-                    // Compute the product L' * L
-                    // NOTE: we never assume that diagonal of L is real
-                    //
-                    for(i=0; i<=n-1; i++)
-                    {
-                        if( i==0 )
-                        {
-                            
-                            //
-                            // 1x1 matrix
-                            //
-                            a[offs+i,offs+i] = AP.Math.Sqr(a[offs+i,offs+i]);
-                        }
-                        else
-                        {
-                            
-                            //
-                            // (I+1)x(I+1) matrix,
-                            //
-                            // ( A11^H  A21^H )   ( A11      )   ( A11^H*A11+A21^H*A21  A21^H*A22 )
-                            // (              ) * (          ) = (                                )
-                            // (        A22^H )   ( A21  A22 )   ( A22^H*A21            A22^H*A22 )
-                            //
-                            // A11 is IxI, A22 is 1x1.
-                            //
-                            i1_ = (offs) - (0);
-                            for(i_=0; i_<=i-1;i_++)
-                            {
-                                tmp[i_] = a[offs+i,i_+i1_];
-                            }
-                            for(j=0; j<=i-1; j++)
-                            {
-                                v = a[offs+i,offs+j];
-                                i1_ = (0) - (offs);
-                                for(i_=offs; i_<=offs+j;i_++)
-                                {
-                                    a[offs+j,i_] = a[offs+j,i_] + v*tmp[i_+i1_];
-                                }
-                            }
-                            v = a[offs+i,offs+i];
-                            for(i_=offs; i_<=offs+i-1;i_++)
-                            {
-                                a[offs+i,i_] = v*a[offs+i,i_];
-                            }
-                            a[offs+i,offs+i] = AP.Math.Sqr(a[offs+i,offs+i]);
-                        }
-                    }
-                }
-                return;
-            }
-            
-            //
-            // Recursive code: triangular factor inversion merged with
-            // UU' or L'L multiplication
-            //
-            ablas.ablassplitlength(ref a, n, ref n1, ref n2);
-            
-            //
-            // form off-diagonal block of trangular inverse
-            //
-            if( isupper )
-            {
-                for(i=0; i<=n1-1; i++)
-                {
-                    for(i_=offs+n1; i_<=offs+n-1;i_++)
-                    {
-                        a[offs+i,i_] = -1*a[offs+i,i_];
-                    }
-                }
-                ablas.rmatrixlefttrsm(n1, n2, ref a, offs, offs, isupper, false, 0, ref a, offs, offs+n1);
-                ablas.rmatrixrighttrsm(n1, n2, ref a, offs+n1, offs+n1, isupper, false, 0, ref a, offs, offs+n1);
-            }
-            else
-            {
-                for(i=0; i<=n2-1; i++)
-                {
-                    for(i_=offs; i_<=offs+n1-1;i_++)
-                    {
-                        a[offs+n1+i,i_] = -1*a[offs+n1+i,i_];
-                    }
-                }
-                ablas.rmatrixrighttrsm(n2, n1, ref a, offs, offs, isupper, false, 0, ref a, offs+n1, offs);
-                ablas.rmatrixlefttrsm(n2, n1, ref a, offs+n1, offs+n1, isupper, false, 0, ref a, offs+n1, offs);
-            }
-            
-            //
-            // invert first diagonal block
-            //
-            spdmatrixcholeskyinverserec(ref a, offs, n1, isupper, ref tmp);
-            
-            //
-            // update first diagonal block with off-diagonal block,
-            // update off-diagonal block
-            //
-            if( isupper )
-            {
-                ablas.rmatrixsyrk(n1, n2, 1.0, ref a, offs, offs+n1, 0, 1.0, ref a, offs, offs, isupper);
-                ablas.rmatrixrighttrsm(n1, n2, ref a, offs+n1, offs+n1, isupper, false, 1, ref a, offs, offs+n1);
-            }
-            else
-            {
-                ablas.rmatrixsyrk(n1, n2, 1.0, ref a, offs+n1, offs, 1, 1.0, ref a, offs, offs, isupper);
-                ablas.rmatrixlefttrsm(n2, n1, ref a, offs+n1, offs+n1, isupper, false, 1, ref a, offs+n1, offs);
-            }
-            
-            //
-            // invert second diagonal block
-            //
-            spdmatrixcholeskyinverserec(ref a, offs+n1, n2, isupper, ref tmp);
-        }
-
-
-        /*************************************************************************
-        Recursive subroutine for HPD inversion.
-
-          -- ALGLIB routine --
-             10.02.2010
-             Bochkanov Sergey
-        *************************************************************************/
-        private static void hpdmatrixcholeskyinverserec(ref AP.Complex[,] a,
-            int offs,
-            int n,
-            bool isupper,
-            ref AP.Complex[] tmp)
-        {
-            int i = 0;
-            int j = 0;
-            AP.Complex v = 0;
-            int n1 = 0;
-            int n2 = 0;
-            int info2 = 0;
-            matinvreport rep2 = new matinvreport();
-            int i_ = 0;
-            int i1_ = 0;
-
-            if( n<1 )
-            {
-                return;
-            }
-            
-            //
-            // Base case
-            //
-            if( n<=ablas.ablascomplexblocksize(ref a) )
-            {
-                cmatrixtrinverserec(ref a, offs, n, isupper, false, ref tmp, ref info2, ref rep2);
-                if( isupper )
-                {
-                    
-                    //
-                    // Compute the product U * U'.
-                    // NOTE: we never assume that diagonal of U is real
-                    //
-                    for(i=0; i<=n-1; i++)
-                    {
-                        if( i==0 )
-                        {
-                            
-                            //
-                            // 1x1 matrix
-                            //
-                            a[offs+i,offs+i] = AP.Math.Sqr(a[offs+i,offs+i].x)+AP.Math.Sqr(a[offs+i,offs+i].y);
-                        }
-                        else
-                        {
-                            
-                            //
-                            // (I+1)x(I+1) matrix,
-                            //
-                            // ( A11  A12 )   ( A11^H        )   ( A11*A11^H+A12*A12^H  A12*A22^H )
-                            // (          ) * (              ) = (                                )
-                            // (      A22 )   ( A12^H  A22^H )   ( A22*A12^H            A22*A22^H )
-                            //
-                            // A11 is IxI, A22 is 1x1.
-                            //
-                            i1_ = (offs) - (0);
-                            for(i_=0; i_<=i-1;i_++)
-                            {
-                                tmp[i_] = AP.Math.Conj(a[i_+i1_,offs+i]);
-                            }
-                            for(j=0; j<=i-1; j++)
-                            {
-                                v = a[offs+j,offs+i];
-                                i1_ = (j) - (offs+j);
-                                for(i_=offs+j; i_<=offs+i-1;i_++)
-                                {
-                                    a[offs+j,i_] = a[offs+j,i_] + v*tmp[i_+i1_];
-                                }
-                            }
-                            v = AP.Math.Conj(a[offs+i,offs+i]);
-                            for(i_=offs; i_<=offs+i-1;i_++)
-                            {
-                                a[i_,offs+i] = v*a[i_,offs+i];
-                            }
-                            a[offs+i,offs+i] = AP.Math.Sqr(a[offs+i,offs+i].x)+AP.Math.Sqr(a[offs+i,offs+i].y);
-                        }
-                    }
-                }
-                else
-                {
-                    
-                    //
-                    // Compute the product L' * L
-                    // NOTE: we never assume that diagonal of L is real
-                    //
-                    for(i=0; i<=n-1; i++)
-                    {
-                        if( i==0 )
-                        {
-                            
-                            //
-                            // 1x1 matrix
-                            //
-                            a[offs+i,offs+i] = AP.Math.Sqr(a[offs+i,offs+i].x)+AP.Math.Sqr(a[offs+i,offs+i].y);
-                        }
-                        else
-                        {
-                            
-                            //
-                            // (I+1)x(I+1) matrix,
-                            //
-                            // ( A11^H  A21^H )   ( A11      )   ( A11^H*A11+A21^H*A21  A21^H*A22 )
-                            // (              ) * (          ) = (                                )
-                            // (        A22^H )   ( A21  A22 )   ( A22^H*A21            A22^H*A22 )
-                            //
-                            // A11 is IxI, A22 is 1x1.
-                            //
-                            i1_ = (offs) - (0);
-                            for(i_=0; i_<=i-1;i_++)
-                            {
-                                tmp[i_] = a[offs+i,i_+i1_];
-                            }
-                            for(j=0; j<=i-1; j++)
-                            {
-                                v = AP.Math.Conj(a[offs+i,offs+j]);
-                                i1_ = (0) - (offs);
-                                for(i_=offs; i_<=offs+j;i_++)
-                                {
-                                    a[offs+j,i_] = a[offs+j,i_] + v*tmp[i_+i1_];
-                                }
-                            }
-                            v = AP.Math.Conj(a[offs+i,offs+i]);
-                            for(i_=offs; i_<=offs+i-1;i_++)
-                            {
-                                a[offs+i,i_] = v*a[offs+i,i_];
-                            }
-                            a[offs+i,offs+i] = AP.Math.Sqr(a[offs+i,offs+i].x)+AP.Math.Sqr(a[offs+i,offs+i].y);
-                        }
-                    }
-                }
-                return;
-            }
-            
-            //
-            // Recursive code: triangular factor inversion merged with
-            // UU' or L'L multiplication
-            //
-            ablas.ablascomplexsplitlength(ref a, n, ref n1, ref n2);
-            
-            //
-            // form off-diagonal block of trangular inverse
-            //
-            if( isupper )
-            {
-                for(i=0; i<=n1-1; i++)
-                {
-                    for(i_=offs+n1; i_<=offs+n-1;i_++)
-                    {
-                        a[offs+i,i_] = -1*a[offs+i,i_];
-                    }
-                }
-                ablas.cmatrixlefttrsm(n1, n2, ref a, offs, offs, isupper, false, 0, ref a, offs, offs+n1);
-                ablas.cmatrixrighttrsm(n1, n2, ref a, offs+n1, offs+n1, isupper, false, 0, ref a, offs, offs+n1);
-            }
-            else
-            {
-                for(i=0; i<=n2-1; i++)
-                {
-                    for(i_=offs; i_<=offs+n1-1;i_++)
-                    {
-                        a[offs+n1+i,i_] = -1*a[offs+n1+i,i_];
-                    }
-                }
-                ablas.cmatrixrighttrsm(n2, n1, ref a, offs, offs, isupper, false, 0, ref a, offs+n1, offs);
-                ablas.cmatrixlefttrsm(n2, n1, ref a, offs+n1, offs+n1, isupper, false, 0, ref a, offs+n1, offs);
-            }
-            
-            //
-            // invert first diagonal block
-            //
-            hpdmatrixcholeskyinverserec(ref a, offs, n1, isupper, ref tmp);
-            
-            //
-            // update first diagonal block with off-diagonal block,
-            // update off-diagonal block
-            //
-            if( isupper )
-            {
-                ablas.cmatrixsyrk(n1, n2, 1.0, ref a, offs, offs+n1, 0, 1.0, ref a, offs, offs, isupper);
-                ablas.cmatrixrighttrsm(n1, n2, ref a, offs+n1, offs+n1, isupper, false, 2, ref a, offs, offs+n1);
-            }
-            else
-            {
-                ablas.cmatrixsyrk(n1, n2, 1.0, ref a, offs+n1, offs, 2, 1.0, ref a, offs, offs, isupper);
-                ablas.cmatrixlefttrsm(n2, n1, ref a, offs+n1, offs+n1, isupper, false, 2, ref a, offs+n1, offs);
-            }
-            
-            //
-            // invert second diagonal block
-            //
-            hpdmatrixcholeskyinverserec(ref a, offs+n1, n2, isupper, ref tmp);
-        }
+              }
+              v = AP.Math.Conj(a[offs + i, offs + i]);
+              for (i_ = offs; i_ <= offs + i - 1; i_++) {
+                a[offs + i, i_] = v * a[offs + i, i_];
+              }
+              a[offs + i, offs + i] = AP.Math.Sqr(a[offs + i, offs + i].x) + AP.Math.Sqr(a[offs + i, offs + i].y);
+            }
+          }
+        }
+        return;
+      }
+
+      //
+      // Recursive code: triangular factor inversion merged with
+      // UU' or L'L multiplication
+      //
+      ablas.ablascomplexsplitlength(ref a, n, ref n1, ref n2);
+
+      //
+      // form off-diagonal block of trangular inverse
+      //
+      if (isupper) {
+        for (i = 0; i <= n1 - 1; i++) {
+          for (i_ = offs + n1; i_ <= offs + n - 1; i_++) {
+            a[offs + i, i_] = -1 * a[offs + i, i_];
+          }
+        }
+        ablas.cmatrixlefttrsm(n1, n2, ref a, offs, offs, isupper, false, 0, ref a, offs, offs + n1);
+        ablas.cmatrixrighttrsm(n1, n2, ref a, offs + n1, offs + n1, isupper, false, 0, ref a, offs, offs + n1);
+      } else {
+        for (i = 0; i <= n2 - 1; i++) {
+          for (i_ = offs; i_ <= offs + n1 - 1; i_++) {
+            a[offs + n1 + i, i_] = -1 * a[offs + n1 + i, i_];
+          }
+        }
+        ablas.cmatrixrighttrsm(n2, n1, ref a, offs, offs, isupper, false, 0, ref a, offs + n1, offs);
+        ablas.cmatrixlefttrsm(n2, n1, ref a, offs + n1, offs + n1, isupper, false, 0, ref a, offs + n1, offs);
+      }
+
+      //
+      // invert first diagonal block
+      //
+      hpdmatrixcholeskyinverserec(ref a, offs, n1, isupper, ref tmp);
+
+      //
+      // update first diagonal block with off-diagonal block,
+      // update off-diagonal block
+      //
+      if (isupper) {
+        ablas.cmatrixsyrk(n1, n2, 1.0, ref a, offs, offs + n1, 0, 1.0, ref a, offs, offs, isupper);
+        ablas.cmatrixrighttrsm(n1, n2, ref a, offs + n1, offs + n1, isupper, false, 2, ref a, offs, offs + n1);
+      } else {
+        ablas.cmatrixsyrk(n1, n2, 1.0, ref a, offs + n1, offs, 2, 1.0, ref a, offs, offs, isupper);
+        ablas.cmatrixlefttrsm(n2, n1, ref a, offs + n1, offs + n1, isupper, false, 2, ref a, offs + n1, offs);
+      }
+
+      //
+      // invert second diagonal block
+      //
+      hpdmatrixcholeskyinverserec(ref a, offs + n1, n2, isupper, ref tmp);
     }
+  }
 }
Index: /trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.ALGLIB/2.5.0/ALGLIB-2.5.0/poissondistr.cs
===================================================================
--- /trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.ALGLIB/2.5.0/ALGLIB-2.5.0/poissondistr.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.ALGLIB/2.5.0/ALGLIB-2.5.0/poissondistr.cs	(revision 4068)
@@ -26,111 +26,105 @@
 *************************************************************************/
 
-using System;
 
-namespace alglib
-{
-    public class poissondistr
-    {
-        /*************************************************************************
-        Poisson distribution
+namespace alglib {
+  public class poissondistr {
+    /*************************************************************************
+    Poisson distribution
 
-        Returns the sum of the first k+1 terms of the Poisson
-        distribution:
+    Returns the sum of the first k+1 terms of the Poisson
+    distribution:
 
-          k         j
-          --   -m  m
-          >   e    --
-          --       j!
-         j=0
+      k         j
+      --   -m  m
+      >   e    --
+      --       j!
+     j=0
 
-        The terms are not summed directly; instead the incomplete
-        gamma integral is employed, according to the relation
+    The terms are not summed directly; instead the incomplete
+    gamma integral is employed, according to the relation
 
-        y = pdtr( k, m ) = igamc( k+1, m ).
+    y = pdtr( k, m ) = igamc( k+1, m ).
 
-        The arguments must both be positive.
-        ACCURACY:
+    The arguments must both be positive.
+    ACCURACY:
 
-        See incomplete gamma function
+    See incomplete gamma function
 
-        Cephes Math Library Release 2.8:  June, 2000
-        Copyright 1984, 1987, 1995, 2000 by Stephen L. Moshier
-        *************************************************************************/
-        public static double poissondistribution(int k,
-            double m)
-        {
-            double result = 0;
+    Cephes Math Library Release 2.8:  June, 2000
+    Copyright 1984, 1987, 1995, 2000 by Stephen L. Moshier
+    *************************************************************************/
+    public static double poissondistribution(int k,
+        double m) {
+      double result = 0;
 
-            System.Diagnostics.Debug.Assert(k>=0 & (double)(m)>(double)(0), "Domain error in PoissonDistribution");
-            result = igammaf.incompletegammac(k+1, m);
-            return result;
-        }
+      System.Diagnostics.Debug.Assert(k >= 0 & (double)(m) > (double)(0), "Domain error in PoissonDistribution");
+      result = igammaf.incompletegammac(k + 1, m);
+      return result;
+    }
 
 
-        /*************************************************************************
-        Complemented Poisson distribution
+    /*************************************************************************
+    Complemented Poisson distribution
 
-        Returns the sum of the terms k+1 to infinity of the Poisson
-        distribution:
+    Returns the sum of the terms k+1 to infinity of the Poisson
+    distribution:
 
-         inf.       j
-          --   -m  m
-          >   e    --
-          --       j!
-         j=k+1
+     inf.       j
+      --   -m  m
+      >   e    --
+      --       j!
+     j=k+1
 
-        The terms are not summed directly; instead the incomplete
-        gamma integral is employed, according to the formula
+    The terms are not summed directly; instead the incomplete
+    gamma integral is employed, according to the formula
 
-        y = pdtrc( k, m ) = igam( k+1, m ).
+    y = pdtrc( k, m ) = igam( k+1, m ).
 
-        The arguments must both be positive.
+    The arguments must both be positive.
 
-        ACCURACY:
+    ACCURACY:
 
-        See incomplete gamma function
+    See incomplete gamma function
 
-        Cephes Math Library Release 2.8:  June, 2000
-        Copyright 1984, 1987, 1995, 2000 by Stephen L. Moshier
-        *************************************************************************/
-        public static double poissoncdistribution(int k,
-            double m)
-        {
-            double result = 0;
+    Cephes Math Library Release 2.8:  June, 2000
+    Copyright 1984, 1987, 1995, 2000 by Stephen L. Moshier
+    *************************************************************************/
+    public static double poissoncdistribution(int k,
+        double m) {
+      double result = 0;
 
-            System.Diagnostics.Debug.Assert(k>=0 & (double)(m)>(double)(0), "Domain error in PoissonDistributionC");
-            result = igammaf.incompletegamma(k+1, m);
-            return result;
-        }
+      System.Diagnostics.Debug.Assert(k >= 0 & (double)(m) > (double)(0), "Domain error in PoissonDistributionC");
+      result = igammaf.incompletegamma(k + 1, m);
+      return result;
+    }
 
 
-        /*************************************************************************
-        Inverse Poisson distribution
+    /*************************************************************************
+    Inverse Poisson distribution
 
-        Finds the Poisson variable x such that the integral
-        from 0 to x of the Poisson density is equal to the
-        given probability y.
+    Finds the Poisson variable x such that the integral
+    from 0 to x of the Poisson density is equal to the
+    given probability y.
 
-        This is accomplished using the inverse gamma integral
-        function and the relation
+    This is accomplished using the inverse gamma integral
+    function and the relation
 
-           m = igami( k+1, y ).
+       m = igami( k+1, y ).
 
-        ACCURACY:
+    ACCURACY:
 
-        See inverse incomplete gamma function
+    See inverse incomplete gamma function
 
-        Cephes Math Library Release 2.8:  June, 2000
-        Copyright 1984, 1987, 1995, 2000 by Stephen L. Moshier
-        *************************************************************************/
-        public static double invpoissondistribution(int k,
-            double y)
-        {
-            double result = 0;
+    Cephes Math Library Release 2.8:  June, 2000
+    Copyright 1984, 1987, 1995, 2000 by Stephen L. Moshier
+    *************************************************************************/
+    public static double invpoissondistribution(int k,
+        double y) {
+      double result = 0;
 
-            System.Diagnostics.Debug.Assert(k>=0 & (double)(y)>=(double)(0) & (double)(y)<(double)(1), "Domain error in InvPoissonDistribution");
-            result = igammaf.invincompletegammac(k+1, y);
-            return result;
-        }
+      System.Diagnostics.Debug.Assert(k >= 0 & (double)(y) >= (double)(0) & (double)(y) < (double)(1), "Domain error in InvPoissonDistribution");
+      result = igammaf.invincompletegammac(k + 1, y);
+      return result;
     }
+  }
 }
Index: /trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.ALGLIB/2.5.0/ALGLIB-2.5.0/sblas.cs
===================================================================
--- /trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.ALGLIB/2.5.0/ALGLIB-2.5.0/sblas.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.ALGLIB/2.5.0/ALGLIB-2.5.0/sblas.cs	(revision 4068)
@@ -25,202 +25,172 @@
 *************************************************************************/
 
-using System;
 
-namespace alglib
-{
-    public class sblas
-    {
-        public static void symmetricmatrixvectormultiply(ref double[,] a,
-            bool isupper,
-            int i1,
-            int i2,
-            ref double[] x,
-            double alpha,
-            ref double[] y)
-        {
-            int i = 0;
-            int ba1 = 0;
-            int ba2 = 0;
-            int by1 = 0;
-            int by2 = 0;
-            int bx1 = 0;
-            int bx2 = 0;
-            int n = 0;
-            double v = 0;
-            int i_ = 0;
-            int i1_ = 0;
+namespace alglib {
+  public class sblas {
+    public static void symmetricmatrixvectormultiply(ref double[,] a,
+        bool isupper,
+        int i1,
+        int i2,
+        ref double[] x,
+        double alpha,
+        ref double[] y) {
+      int i = 0;
+      int ba1 = 0;
+      int ba2 = 0;
+      int by1 = 0;
+      int by2 = 0;
+      int bx1 = 0;
+      int bx2 = 0;
+      int n = 0;
+      double v = 0;
+      int i_ = 0;
+      int i1_ = 0;
 
-            n = i2-i1+1;
-            if( n<=0 )
-            {
-                return;
-            }
-            
-            //
-            // Let A = L + D + U, where
-            //  L is strictly lower triangular (main diagonal is zero)
-            //  D is diagonal
-            //  U is strictly upper triangular (main diagonal is zero)
-            //
-            // A*x = L*x + D*x + U*x
-            //
-            // Calculate D*x first
-            //
-            for(i=i1; i<=i2; i++)
-            {
-                y[i-i1+1] = a[i,i]*x[i-i1+1];
-            }
-            
-            //
-            // Add L*x + U*x
-            //
-            if( isupper )
-            {
-                for(i=i1; i<=i2-1; i++)
-                {
-                    
-                    //
-                    // Add L*x to the result
-                    //
-                    v = x[i-i1+1];
-                    by1 = i-i1+2;
-                    by2 = n;
-                    ba1 = i+1;
-                    ba2 = i2;
-                    i1_ = (ba1) - (by1);
-                    for(i_=by1; i_<=by2;i_++)
-                    {
-                        y[i_] = y[i_] + v*a[i,i_+i1_];
-                    }
-                    
-                    //
-                    // Add U*x to the result
-                    //
-                    bx1 = i-i1+2;
-                    bx2 = n;
-                    ba1 = i+1;
-                    ba2 = i2;
-                    i1_ = (ba1)-(bx1);
-                    v = 0.0;
-                    for(i_=bx1; i_<=bx2;i_++)
-                    {
-                        v += x[i_]*a[i,i_+i1_];
-                    }
-                    y[i-i1+1] = y[i-i1+1]+v;
-                }
-            }
-            else
-            {
-                for(i=i1+1; i<=i2; i++)
-                {
-                    
-                    //
-                    // Add L*x to the result
-                    //
-                    bx1 = 1;
-                    bx2 = i-i1;
-                    ba1 = i1;
-                    ba2 = i-1;
-                    i1_ = (ba1)-(bx1);
-                    v = 0.0;
-                    for(i_=bx1; i_<=bx2;i_++)
-                    {
-                        v += x[i_]*a[i,i_+i1_];
-                    }
-                    y[i-i1+1] = y[i-i1+1]+v;
-                    
-                    //
-                    // Add U*x to the result
-                    //
-                    v = x[i-i1+1];
-                    by1 = 1;
-                    by2 = i-i1;
-                    ba1 = i1;
-                    ba2 = i-1;
-                    i1_ = (ba1) - (by1);
-                    for(i_=by1; i_<=by2;i_++)
-                    {
-                        y[i_] = y[i_] + v*a[i,i_+i1_];
-                    }
-                }
-            }
-            for(i_=1; i_<=n;i_++)
-            {
-                y[i_] = alpha*y[i_];
-            }
+      n = i2 - i1 + 1;
+      if (n <= 0) {
+        return;
+      }
+
+      //
+      // Let A = L + D + U, where
+      //  L is strictly lower triangular (main diagonal is zero)
+      //  D is diagonal
+      //  U is strictly upper triangular (main diagonal is zero)
+      //
+      // A*x = L*x + D*x + U*x
+      //
+      // Calculate D*x first
+      //
+      for (i = i1; i <= i2; i++) {
+        y[i - i1 + 1] = a[i, i] * x[i - i1 + 1];
+      }
+
+      //
+      // Add L*x + U*x
+      //
+      if (isupper) {
+        for (i = i1; i <= i2 - 1; i++) {
+
+          //
+          // Add L*x to the result
+          //
+          v = x[i - i1 + 1];
+          by1 = i - i1 + 2;
+          by2 = n;
+          ba1 = i + 1;
+          ba2 = i2;
+          i1_ = (ba1) - (by1);
+          for (i_ = by1; i_ <= by2; i_++) {
+            y[i_] = y[i_] + v * a[i, i_ + i1_];
+          }
+
+          //
+          // Add U*x to the result
+          //
+          bx1 = i - i1 + 2;
+          bx2 = n;
+          ba1 = i + 1;
+          ba2 = i2;
+          i1_ = (ba1) - (bx1);
+          v = 0.0;
+          for (i_ = bx1; i_ <= bx2; i_++) {
+            v += x[i_] * a[i, i_ + i1_];
+          }
+          y[i - i1 + 1] = y[i - i1 + 1] + v;
         }
+      } else {
+        for (i = i1 + 1; i <= i2; i++) {
+
+          //
+          // Add L*x to the result
+          //
+          bx1 = 1;
+          bx2 = i - i1;
+          ba1 = i1;
+          ba2 = i - 1;
+          i1_ = (ba1) - (bx1);
+          v = 0.0;
+          for (i_ = bx1; i_ <= bx2; i_++) {
+            v += x[i_] * a[i, i_ + i1_];
+          }
+          y[i - i1 + 1] = y[i - i1 + 1] + v;
+
+          //
+          // Add U*x to the result
+          //
+          v = x[i - i1 + 1];
+          by1 = 1;
+          by2 = i - i1;
+          ba1 = i1;
+          ba2 = i - 1;
+          i1_ = (ba1) - (by1);
+          for (i_ = by1; i_ <= by2; i_++) {
+            y[i_] = y[i_] + v * a[i, i_ + i1_];
+          }
+        }
+      }
+      for (i_ = 1; i_ <= n; i_++) {
+        y[i_] = alpha * y[i_];
+      }
+    }
 
 
-        public static void symmetricrank2update(ref double[,] a,
-            bool isupper,
-            int i1,
-            int i2,
-            ref double[] x,
-            ref double[] y,
-            ref double[] t,
-            double alpha)
-        {
-            int i = 0;
-            int tp1 = 0;
-            int tp2 = 0;
-            double v = 0;
-            int i_ = 0;
-            int i1_ = 0;
+    public static void symmetricrank2update(ref double[,] a,
+        bool isupper,
+        int i1,
+        int i2,
+        ref double[] x,
+        ref double[] y,
+        ref double[] t,
+        double alpha) {
+      int i = 0;
+      int tp1 = 0;
+      int tp2 = 0;
+      double v = 0;
+      int i_ = 0;
+      int i1_ = 0;
 
-            if( isupper )
-            {
-                for(i=i1; i<=i2; i++)
-                {
-                    tp1 = i+1-i1;
-                    tp2 = i2-i1+1;
-                    v = x[i+1-i1];
-                    for(i_=tp1; i_<=tp2;i_++)
-                    {
-                        t[i_] = v*y[i_];
-                    }
-                    v = y[i+1-i1];
-                    for(i_=tp1; i_<=tp2;i_++)
-                    {
-                        t[i_] = t[i_] + v*x[i_];
-                    }
-                    for(i_=tp1; i_<=tp2;i_++)
-                    {
-                        t[i_] = alpha*t[i_];
-                    }
-                    i1_ = (tp1) - (i);
-                    for(i_=i; i_<=i2;i_++)
-                    {
-                        a[i,i_] = a[i,i_] + t[i_+i1_];
-                    }
-                }
-            }
-            else
-            {
-                for(i=i1; i<=i2; i++)
-                {
-                    tp1 = 1;
-                    tp2 = i+1-i1;
-                    v = x[i+1-i1];
-                    for(i_=tp1; i_<=tp2;i_++)
-                    {
-                        t[i_] = v*y[i_];
-                    }
-                    v = y[i+1-i1];
-                    for(i_=tp1; i_<=tp2;i_++)
-                    {
-                        t[i_] = t[i_] + v*x[i_];
-                    }
-                    for(i_=tp1; i_<=tp2;i_++)
-                    {
-                        t[i_] = alpha*t[i_];
-                    }
-                    i1_ = (tp1) - (i1);
-                    for(i_=i1; i_<=i;i_++)
-                    {
-                        a[i,i_] = a[i,i_] + t[i_+i1_];
-                    }
-                }
-            }
+      if (isupper) {
+        for (i = i1; i <= i2; i++) {
+          tp1 = i + 1 - i1;
+          tp2 = i2 - i1 + 1;
+          v = x[i + 1 - i1];
+          for (i_ = tp1; i_ <= tp2; i_++) {
+            t[i_] = v * y[i_];
+          }
+          v = y[i + 1 - i1];
+          for (i_ = tp1; i_ <= tp2; i_++) {
+            t[i_] = t[i_] + v * x[i_];
+          }
+          for (i_ = tp1; i_ <= tp2; i_++) {
+            t[i_] = alpha * t[i_];
+          }
+          i1_ = (tp1) - (i);
+          for (i_ = i; i_ <= i2; i_++) {
+            a[i, i_] = a[i, i_] + t[i_ + i1_];
+          }
         }
+      } else {
+        for (i = i1; i <= i2; i++) {
+          tp1 = 1;
+          tp2 = i + 1 - i1;
+          v = x[i + 1 - i1];
+          for (i_ = tp1; i_ <= tp2; i_++) {
+            t[i_] = v * y[i_];
+          }
+          v = y[i + 1 - i1];
+          for (i_ = tp1; i_ <= tp2; i_++) {
+            t[i_] = t[i_] + v * x[i_];
+          }
+          for (i_ = tp1; i_ <= tp2; i_++) {
+            t[i_] = alpha * t[i_];
+          }
+          i1_ = (tp1) - (i1);
+          for (i_ = i1; i_ <= i; i_++) {
+            a[i, i_] = a[i, i_] + t[i_ + i1_];
+          }
+        }
+      }
     }
+  }
 }
Index: /trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.ALGLIB/2.5.0/ALGLIB-2.5.0/schur.cs
===================================================================
--- /trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.ALGLIB/2.5.0/ALGLIB-2.5.0/schur.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.ALGLIB/2.5.0/ALGLIB-2.5.0/schur.cs	(revision 4068)
@@ -25,104 +25,96 @@
 *************************************************************************/
 
-using System;
 
-namespace alglib
-{
-    public class schur
-    {
-        /*************************************************************************
-        Subroutine performing the Schur decomposition of a general matrix by using
-        the QR algorithm with multiple shifts.
+namespace alglib {
+  public class schur {
+    /*************************************************************************
+    Subroutine performing the Schur decomposition of a general matrix by using
+    the QR algorithm with multiple shifts.
 
-        The source matrix A is represented as S'*A*S = T, where S is an orthogonal
-        matrix (Schur vectors), T - upper quasi-triangular matrix (with blocks of
-        sizes 1x1 and 2x2 on the main diagonal).
+    The source matrix A is represented as S'*A*S = T, where S is an orthogonal
+    matrix (Schur vectors), T - upper quasi-triangular matrix (with blocks of
+    sizes 1x1 and 2x2 on the main diagonal).
 
-        Input parameters:
-            A   -   matrix to be decomposed.
-                    Array whose indexes range within [0..N-1, 0..N-1].
-            N   -   size of A, N>=0.
+    Input parameters:
+        A   -   matrix to be decomposed.
+                Array whose indexes range within [0..N-1, 0..N-1].
+        N   -   size of A, N>=0.
 
 
-        Output parameters:
-            A   -   contains matrix T.
-                    Array whose indexes range within [0..N-1, 0..N-1].
-            S   -   contains Schur vectors.
-                    Array whose indexes range within [0..N-1, 0..N-1].
+    Output parameters:
+        A   -   contains matrix T.
+                Array whose indexes range within [0..N-1, 0..N-1].
+        S   -   contains Schur vectors.
+                Array whose indexes range within [0..N-1, 0..N-1].
 
-        Note 1:
-            The block structure of matrix T can be easily recognized: since all
-            the elements below the blocks are zeros, the elements a[i+1,i] which
-            are equal to 0 show the block border.
+    Note 1:
+        The block structure of matrix T can be easily recognized: since all
+        the elements below the blocks are zeros, the elements a[i+1,i] which
+        are equal to 0 show the block border.
 
-        Note 2:
-            The algorithm performance depends on the value of the internal parameter
-            NS of the InternalSchurDecomposition subroutine which defines the number
-            of shifts in the QR algorithm (similarly to the block width in block-matrix
-            algorithms in linear algebra). If you require maximum performance on
-            your machine, it is recommended to adjust this parameter manually.
+    Note 2:
+        The algorithm performance depends on the value of the internal parameter
+        NS of the InternalSchurDecomposition subroutine which defines the number
+        of shifts in the QR algorithm (similarly to the block width in block-matrix
+        algorithms in linear algebra). If you require maximum performance on
+        your machine, it is recommended to adjust this parameter manually.
 
-        Result:
-            True,
-                if the algorithm has converged and parameters A and S contain the result.
-            False,
-                if the algorithm has not converged.
+    Result:
+        True,
+            if the algorithm has converged and parameters A and S contain the result.
+        False,
+            if the algorithm has not converged.
 
-        Algorithm implemented on the basis of the DHSEQR subroutine (LAPACK 3.0 library).
-        *************************************************************************/
-        public static bool rmatrixschur(ref double[,] a,
-            int n,
-            ref double[,] s)
-        {
-            bool result = new bool();
-            double[] tau = new double[0];
-            double[] wi = new double[0];
-            double[] wr = new double[0];
-            double[,] a1 = new double[0,0];
-            double[,] s1 = new double[0,0];
-            int info = 0;
-            int i = 0;
-            int j = 0;
+    Algorithm implemented on the basis of the DHSEQR subroutine (LAPACK 3.0 library).
+    *************************************************************************/
+    public static bool rmatrixschur(ref double[,] a,
+        int n,
+        ref double[,] s) {
+      bool result = new bool();
+      double[] tau = new double[0];
+      double[] wi = new double[0];
+      double[] wr = new double[0];
+      double[,] a1 = new double[0, 0];
+      double[,] s1 = new double[0, 0];
+      int info = 0;
+      int i = 0;
+      int j = 0;
 
-            
-            //
-            // Upper Hessenberg form of the 0-based matrix
-            //
-            ortfac.rmatrixhessenberg(ref a, n, ref tau);
-            ortfac.rmatrixhessenbergunpackq(ref a, n, ref tau, ref s);
-            
-            //
-            // Convert from 0-based arrays to 1-based,
-            // then call InternalSchurDecomposition
-            // Awkward, of course, but Schur decompisiton subroutine
-            // is too complex to fix it.
-            //
-            //
-            a1 = new double[n+1, n+1];
-            s1 = new double[n+1, n+1];
-            for(i=1; i<=n; i++)
-            {
-                for(j=1; j<=n; j++)
-                {
-                    a1[i,j] = a[i-1,j-1];
-                    s1[i,j] = s[i-1,j-1];
-                }
-            }
-            hsschur.internalschurdecomposition(ref a1, n, 1, 1, ref wr, ref wi, ref s1, ref info);
-            result = info==0;
-            
-            //
-            // convert from 1-based arrays to -based
-            //
-            for(i=1; i<=n; i++)
-            {
-                for(j=1; j<=n; j++)
-                {
-                    a[i-1,j-1] = a1[i,j];
-                    s[i-1,j-1] = s1[i,j];
-                }
-            }
-            return result;
+
+      //
+      // Upper Hessenberg form of the 0-based matrix
+      //
+      ortfac.rmatrixhessenberg(ref a, n, ref tau);
+      ortfac.rmatrixhessenbergunpackq(ref a, n, ref tau, ref s);
+
+      //
+      // Convert from 0-based arrays to 1-based,
+      // then call InternalSchurDecomposition
+      // Awkward, of course, but Schur decompisiton subroutine
+      // is too complex to fix it.
+      //
+      //
+      a1 = new double[n + 1, n + 1];
+      s1 = new double[n + 1, n + 1];
+      for (i = 1; i <= n; i++) {
+        for (j = 1; j <= n; j++) {
+          a1[i, j] = a[i - 1, j - 1];
+          s1[i, j] = s[i - 1, j - 1];
         }
+      }
+      hsschur.internalschurdecomposition(ref a1, n, 1, 1, ref wr, ref wi, ref s1, ref info);
+      result = info == 0;
+
+      //
+      // convert from 1-based arrays to -based
+      //
+      for (i = 1; i <= n; i++) {
+        for (j = 1; j <= n; j++) {
+          a[i - 1, j - 1] = a1[i, j];
+          s[i - 1, j - 1] = s1[i, j];
+        }
+      }
+      return result;
     }
+  }
 }
Index: /trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.ALGLIB/2.5.0/ALGLIB-2.5.0/sdet.cs
===================================================================
--- /trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.ALGLIB/2.5.0/ALGLIB-2.5.0/sdet.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.ALGLIB/2.5.0/ALGLIB-2.5.0/sdet.cs	(revision 4068)
@@ -19,167 +19,138 @@
 *************************************************************************/
 
-using System;
 
-namespace alglib
-{
-    public class sdet
-    {
-        /*************************************************************************
-        Determinant calculation of the matrix given by LDLT decomposition.
+namespace alglib {
+  public class sdet {
+    /*************************************************************************
+    Determinant calculation of the matrix given by LDLT decomposition.
 
-        Input parameters:
-            A       -   LDLT-decomposition of the matrix,
-                        output of subroutine SMatrixLDLT.
-            Pivots  -   table of permutations which were made during
-                        LDLT decomposition, output of subroutine SMatrixLDLT.
-            N       -   size of matrix A.
-            IsUpper -   matrix storage format. The value is equal to the input
-                        parameter of subroutine SMatrixLDLT.
+    Input parameters:
+        A       -   LDLT-decomposition of the matrix,
+                    output of subroutine SMatrixLDLT.
+        Pivots  -   table of permutations which were made during
+                    LDLT decomposition, output of subroutine SMatrixLDLT.
+        N       -   size of matrix A.
+        IsUpper -   matrix storage format. The value is equal to the input
+                    parameter of subroutine SMatrixLDLT.
 
-        Result:
-            matrix determinant.
+    Result:
+        matrix determinant.
 
-          -- ALGLIB --
-             Copyright 2005-2008 by Bochkanov Sergey
-        *************************************************************************/
-        public static double smatrixldltdet(ref double[,] a,
-            ref int[] pivots,
-            int n,
-            bool isupper)
-        {
-            double result = 0;
-            int k = 0;
+      -- ALGLIB --
+         Copyright 2005-2008 by Bochkanov Sergey
+    *************************************************************************/
+    public static double smatrixldltdet(ref double[,] a,
+        ref int[] pivots,
+        int n,
+        bool isupper) {
+      double result = 0;
+      int k = 0;
 
-            result = 1;
-            if( isupper )
-            {
-                k = 0;
-                while( k<n )
-                {
-                    if( pivots[k]>=0 )
-                    {
-                        result = result*a[k,k];
-                        k = k+1;
-                    }
-                    else
-                    {
-                        result = result*(a[k,k]*a[k+1,k+1]-a[k,k+1]*a[k,k+1]);
-                        k = k+2;
-                    }
-                }
-            }
-            else
-            {
-                k = n-1;
-                while( k>=0 )
-                {
-                    if( pivots[k]>=0 )
-                    {
-                        result = result*a[k,k];
-                        k = k-1;
-                    }
-                    else
-                    {
-                        result = result*(a[k-1,k-1]*a[k,k]-a[k,k-1]*a[k,k-1]);
-                        k = k-2;
-                    }
-                }
-            }
-            return result;
+      result = 1;
+      if (isupper) {
+        k = 0;
+        while (k < n) {
+          if (pivots[k] >= 0) {
+            result = result * a[k, k];
+            k = k + 1;
+          } else {
+            result = result * (a[k, k] * a[k + 1, k + 1] - a[k, k + 1] * a[k, k + 1]);
+            k = k + 2;
+          }
         }
+      } else {
+        k = n - 1;
+        while (k >= 0) {
+          if (pivots[k] >= 0) {
+            result = result * a[k, k];
+            k = k - 1;
+          } else {
+            result = result * (a[k - 1, k - 1] * a[k, k] - a[k, k - 1] * a[k, k - 1]);
+            k = k - 2;
+          }
+        }
+      }
+      return result;
+    }
 
 
-        /*************************************************************************
-        Determinant calculation of the symmetric matrix
+    /*************************************************************************
+    Determinant calculation of the symmetric matrix
 
-        Input parameters:
-            A       -   matrix. Array with elements [0..N-1, 0..N-1].
-            N       -   size of matrix A.
-            IsUpper -   if IsUpper = True, then symmetric matrix A is given by its
-                        upper triangle, and the lower triangle isnt used by
-                        subroutine. Similarly, if IsUpper = False, then A is given
-                        by its lower triangle.
+    Input parameters:
+        A       -   matrix. Array with elements [0..N-1, 0..N-1].
+        N       -   size of matrix A.
+        IsUpper -   if IsUpper = True, then symmetric matrix A is given by its
+                    upper triangle, and the lower triangle isnt used by
+                    subroutine. Similarly, if IsUpper = False, then A is given
+                    by its lower triangle.
 
-        Result:
-            determinant of matrix A.
+    Result:
+        determinant of matrix A.
 
-          -- ALGLIB --
-             Copyright 2005-2008 by Bochkanov Sergey
-        *************************************************************************/
-        public static double smatrixdet(double[,] a,
-            int n,
-            bool isupper)
-        {
-            double result = 0;
-            int[] pivots = new int[0];
+      -- ALGLIB --
+         Copyright 2005-2008 by Bochkanov Sergey
+    *************************************************************************/
+    public static double smatrixdet(double[,] a,
+        int n,
+        bool isupper) {
+      double result = 0;
+      int[] pivots = new int[0];
 
-            a = (double[,])a.Clone();
+      a = (double[,])a.Clone();
 
-            ldlt.smatrixldlt(ref a, n, isupper, ref pivots);
-            result = smatrixldltdet(ref a, ref pivots, n, isupper);
-            return result;
-        }
+      ldlt.smatrixldlt(ref a, n, isupper, ref pivots);
+      result = smatrixldltdet(ref a, ref pivots, n, isupper);
+      return result;
+    }
 
 
-        public static double determinantldlt(ref double[,] a,
-            ref int[] pivots,
-            int n,
-            bool isupper)
-        {
-            double result = 0;
-            int k = 0;
+    public static double determinantldlt(ref double[,] a,
+        ref int[] pivots,
+        int n,
+        bool isupper) {
+      double result = 0;
+      int k = 0;
 
-            result = 1;
-            if( isupper )
-            {
-                k = 1;
-                while( k<=n )
-                {
-                    if( pivots[k]>0 )
-                    {
-                        result = result*a[k,k];
-                        k = k+1;
-                    }
-                    else
-                    {
-                        result = result*(a[k,k]*a[k+1,k+1]-a[k,k+1]*a[k,k+1]);
-                        k = k+2;
-                    }
-                }
-            }
-            else
-            {
-                k = n;
-                while( k>=1 )
-                {
-                    if( pivots[k]>0 )
-                    {
-                        result = result*a[k,k];
-                        k = k-1;
-                    }
-                    else
-                    {
-                        result = result*(a[k-1,k-1]*a[k,k]-a[k,k-1]*a[k,k-1]);
-                        k = k-2;
-                    }
-                }
-            }
-            return result;
+      result = 1;
+      if (isupper) {
+        k = 1;
+        while (k <= n) {
+          if (pivots[k] > 0) {
+            result = result * a[k, k];
+            k = k + 1;
+          } else {
+            result = result * (a[k, k] * a[k + 1, k + 1] - a[k, k + 1] * a[k, k + 1]);
+            k = k + 2;
+          }
         }
+      } else {
+        k = n;
+        while (k >= 1) {
+          if (pivots[k] > 0) {
+            result = result * a[k, k];
+            k = k - 1;
+          } else {
+            result = result * (a[k - 1, k - 1] * a[k, k] - a[k, k - 1] * a[k, k - 1]);
+            k = k - 2;
+          }
+        }
+      }
+      return result;
+    }
 
 
-        public static double determinantsymmetric(double[,] a,
-            int n,
-            bool isupper)
-        {
-            double result = 0;
-            int[] pivots = new int[0];
+    public static double determinantsymmetric(double[,] a,
+        int n,
+        bool isupper) {
+      double result = 0;
+      int[] pivots = new int[0];
 
-            a = (double[,])a.Clone();
+      a = (double[,])a.Clone();
 
-            ldlt.ldltdecomposition(ref a, n, isupper, ref pivots);
-            result = determinantldlt(ref a, ref pivots, n, isupper);
-            return result;
-        }
+      ldlt.ldltdecomposition(ref a, n, isupper, ref pivots);
+      result = determinantldlt(ref a, ref pivots, n, isupper);
+      return result;
     }
+  }
 }
Index: /trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.ALGLIB/2.5.0/ALGLIB-2.5.0/spdgevd.cs
===================================================================
--- /trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.ALGLIB/2.5.0/ALGLIB-2.5.0/spdgevd.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.ALGLIB/2.5.0/ALGLIB-2.5.0/spdgevd.cs	(revision 4068)
@@ -19,527 +19,455 @@
 *************************************************************************/
 
-using System;
-
-namespace alglib
-{
-    public class spdgevd
-    {
-        /*************************************************************************
-        Algorithm for solving the following generalized symmetric positive-definite
-        eigenproblem:
-            A*x = lambda*B*x (1) or
-            A*B*x = lambda*x (2) or
-            B*A*x = lambda*x (3).
-        where A is a symmetric matrix, B - symmetric positive-definite matrix.
-        The problem is solved by reducing it to an ordinary  symmetric  eigenvalue
-        problem.
-
-        Input parameters:
-            A           -   symmetric matrix which is given by its upper or lower
-                            triangular part.
-                            Array whose indexes range within [0..N-1, 0..N-1].
-            N           -   size of matrices A and B.
-            IsUpperA    -   storage format of matrix A.
-            B           -   symmetric positive-definite matrix which is given by
-                            its upper or lower triangular part.
-                            Array whose indexes range within [0..N-1, 0..N-1].
-            IsUpperB    -   storage format of matrix B.
-            ZNeeded     -   if ZNeeded is equal to:
-                             * 0, the eigenvectors are not returned;
-                             * 1, the eigenvectors are returned.
-            ProblemType -   if ProblemType is equal to:
-                             * 1, the following problem is solved: A*x = lambda*B*x;
-                             * 2, the following problem is solved: A*B*x = lambda*x;
-                             * 3, the following problem is solved: B*A*x = lambda*x.
-
-        Output parameters:
-            D           -   eigenvalues in ascending order.
-                            Array whose index ranges within [0..N-1].
-            Z           -   if ZNeeded is equal to:
-                             * 0, Z hasnt changed;
-                             * 1, Z contains eigenvectors.
-                            Array whose indexes range within [0..N-1, 0..N-1].
-                            The eigenvectors are stored in matrix columns. It should
-                            be noted that the eigenvectors in such problems do not
-                            form an orthogonal system.
-
-        Result:
-            True, if the problem was solved successfully.
-            False, if the error occurred during the Cholesky decomposition of matrix
-            B (the matrix isnt positive-definite) or during the work of the iterative
-            algorithm for solving the symmetric eigenproblem.
-
-        See also the GeneralizedSymmetricDefiniteEVDReduce subroutine.
-
-          -- ALGLIB --
-             Copyright 1.28.2006 by Bochkanov Sergey
-        *************************************************************************/
-        public static bool smatrixgevd(double[,] a,
-            int n,
-            bool isuppera,
-            ref double[,] b,
-            bool isupperb,
-            int zneeded,
-            int problemtype,
-            ref double[] d,
-            ref double[,] z)
-        {
-            bool result = new bool();
-            double[,] r = new double[0,0];
-            double[,] t = new double[0,0];
-            bool isupperr = new bool();
-            int j1 = 0;
-            int j2 = 0;
-            int j1inc = 0;
-            int j2inc = 0;
-            int i = 0;
-            int j = 0;
-            double v = 0;
-            int i_ = 0;
-
-            a = (double[,])a.Clone();
-
-            
-            //
-            // Reduce and solve
-            //
-            result = smatrixgevdreduce(ref a, n, isuppera, ref b, isupperb, problemtype, ref r, ref isupperr);
-            if( !result )
-            {
-                return result;
-            }
-            result = evd.smatrixevd(a, n, zneeded, isuppera, ref d, ref t);
-            if( !result )
-            {
-                return result;
-            }
-            
-            //
-            // Transform eigenvectors if needed
-            //
-            if( zneeded!=0 )
-            {
-                
-                //
-                // fill Z with zeros
-                //
-                z = new double[n-1+1, n-1+1];
-                for(j=0; j<=n-1; j++)
-                {
-                    z[0,j] = 0.0;
-                }
-                for(i=1; i<=n-1; i++)
-                {
-                    for(i_=0; i_<=n-1;i_++)
-                    {
-                        z[i,i_] = z[0,i_];
-                    }
-                }
-                
-                //
-                // Setup R properties
-                //
-                if( isupperr )
-                {
-                    j1 = 0;
-                    j2 = n-1;
-                    j1inc = +1;
-                    j2inc = 0;
-                }
-                else
-                {
-                    j1 = 0;
-                    j2 = 0;
-                    j1inc = 0;
-                    j2inc = +1;
-                }
-                
-                //
-                // Calculate R*Z
-                //
-                for(i=0; i<=n-1; i++)
-                {
-                    for(j=j1; j<=j2; j++)
-                    {
-                        v = r[i,j];
-                        for(i_=0; i_<=n-1;i_++)
-                        {
-                            z[i,i_] = z[i,i_] + v*t[j,i_];
-                        }
-                    }
-                    j1 = j1+j1inc;
-                    j2 = j2+j2inc;
-                }
-            }
+
+namespace alglib {
+  public class spdgevd {
+    /*************************************************************************
+    Algorithm for solving the following generalized symmetric positive-definite
+    eigenproblem:
+        A*x = lambda*B*x (1) or
+        A*B*x = lambda*x (2) or
+        B*A*x = lambda*x (3).
+    where A is a symmetric matrix, B - symmetric positive-definite matrix.
+    The problem is solved by reducing it to an ordinary  symmetric  eigenvalue
+    problem.
+
+    Input parameters:
+        A           -   symmetric matrix which is given by its upper or lower
+                        triangular part.
+                        Array whose indexes range within [0..N-1, 0..N-1].
+        N           -   size of matrices A and B.
+        IsUpperA    -   storage format of matrix A.
+        B           -   symmetric positive-definite matrix which is given by
+                        its upper or lower triangular part.
+                        Array whose indexes range within [0..N-1, 0..N-1].
+        IsUpperB    -   storage format of matrix B.
+        ZNeeded     -   if ZNeeded is equal to:
+                         * 0, the eigenvectors are not returned;
+                         * 1, the eigenvectors are returned.
+        ProblemType -   if ProblemType is equal to:
+                         * 1, the following problem is solved: A*x = lambda*B*x;
+                         * 2, the following problem is solved: A*B*x = lambda*x;
+                         * 3, the following problem is solved: B*A*x = lambda*x.
+
+    Output parameters:
+        D           -   eigenvalues in ascending order.
+                        Array whose index ranges within [0..N-1].
+        Z           -   if ZNeeded is equal to:
+                         * 0, Z hasnt changed;
+                         * 1, Z contains eigenvectors.
+                        Array whose indexes range within [0..N-1, 0..N-1].
+                        The eigenvectors are stored in matrix columns. It should
+                        be noted that the eigenvectors in such problems do not
+                        form an orthogonal system.
+
+    Result:
+        True, if the problem was solved successfully.
+        False, if the error occurred during the Cholesky decomposition of matrix
+        B (the matrix isnt positive-definite) or during the work of the iterative
+        algorithm for solving the symmetric eigenproblem.
+
+    See also the GeneralizedSymmetricDefiniteEVDReduce subroutine.
+
+      -- ALGLIB --
+         Copyright 1.28.2006 by Bochkanov Sergey
+    *************************************************************************/
+    public static bool smatrixgevd(double[,] a,
+        int n,
+        bool isuppera,
+        ref double[,] b,
+        bool isupperb,
+        int zneeded,
+        int problemtype,
+        ref double[] d,
+        ref double[,] z) {
+      bool result = new bool();
+      double[,] r = new double[0, 0];
+      double[,] t = new double[0, 0];
+      bool isupperr = new bool();
+      int j1 = 0;
+      int j2 = 0;
+      int j1inc = 0;
+      int j2inc = 0;
+      int i = 0;
+      int j = 0;
+      double v = 0;
+      int i_ = 0;
+
+      a = (double[,])a.Clone();
+
+
+      //
+      // Reduce and solve
+      //
+      result = smatrixgevdreduce(ref a, n, isuppera, ref b, isupperb, problemtype, ref r, ref isupperr);
+      if (!result) {
+        return result;
+      }
+      result = evd.smatrixevd(a, n, zneeded, isuppera, ref d, ref t);
+      if (!result) {
+        return result;
+      }
+
+      //
+      // Transform eigenvectors if needed
+      //
+      if (zneeded != 0) {
+
+        //
+        // fill Z with zeros
+        //
+        z = new double[n - 1 + 1, n - 1 + 1];
+        for (j = 0; j <= n - 1; j++) {
+          z[0, j] = 0.0;
+        }
+        for (i = 1; i <= n - 1; i++) {
+          for (i_ = 0; i_ <= n - 1; i_++) {
+            z[i, i_] = z[0, i_];
+          }
+        }
+
+        //
+        // Setup R properties
+        //
+        if (isupperr) {
+          j1 = 0;
+          j2 = n - 1;
+          j1inc = +1;
+          j2inc = 0;
+        } else {
+          j1 = 0;
+          j2 = 0;
+          j1inc = 0;
+          j2inc = +1;
+        }
+
+        //
+        // Calculate R*Z
+        //
+        for (i = 0; i <= n - 1; i++) {
+          for (j = j1; j <= j2; j++) {
+            v = r[i, j];
+            for (i_ = 0; i_ <= n - 1; i_++) {
+              z[i, i_] = z[i, i_] + v * t[j, i_];
+            }
+          }
+          j1 = j1 + j1inc;
+          j2 = j2 + j2inc;
+        }
+      }
+      return result;
+    }
+
+
+    /*************************************************************************
+    Algorithm for reduction of the following generalized symmetric positive-
+    definite eigenvalue problem:
+        A*x = lambda*B*x (1) or
+        A*B*x = lambda*x (2) or
+        B*A*x = lambda*x (3)
+    to the symmetric eigenvalues problem C*y = lambda*y (eigenvalues of this and
+    the given problems are the same, and the eigenvectors of the given problem
+    could be obtained by multiplying the obtained eigenvectors by the
+    transformation matrix x = R*y).
+
+    Here A is a symmetric matrix, B - symmetric positive-definite matrix.
+
+    Input parameters:
+        A           -   symmetric matrix which is given by its upper or lower
+                        triangular part.
+                        Array whose indexes range within [0..N-1, 0..N-1].
+        N           -   size of matrices A and B.
+        IsUpperA    -   storage format of matrix A.
+        B           -   symmetric positive-definite matrix which is given by
+                        its upper or lower triangular part.
+                        Array whose indexes range within [0..N-1, 0..N-1].
+        IsUpperB    -   storage format of matrix B.
+        ProblemType -   if ProblemType is equal to:
+                         * 1, the following problem is solved: A*x = lambda*B*x;
+                         * 2, the following problem is solved: A*B*x = lambda*x;
+                         * 3, the following problem is solved: B*A*x = lambda*x.
+
+    Output parameters:
+        A           -   symmetric matrix which is given by its upper or lower
+                        triangle depending on IsUpperA. Contains matrix C.
+                        Array whose indexes range within [0..N-1, 0..N-1].
+        R           -   upper triangular or low triangular transformation matrix
+                        which is used to obtain the eigenvectors of a given problem
+                        as the product of eigenvectors of C (from the right) and
+                        matrix R (from the left). If the matrix is upper
+                        triangular, the elements below the main diagonal
+                        are equal to 0 (and vice versa). Thus, we can perform
+                        the multiplication without taking into account the
+                        internal structure (which is an easier though less
+                        effective way).
+                        Array whose indexes range within [0..N-1, 0..N-1].
+        IsUpperR    -   type of matrix R (upper or lower triangular).
+
+    Result:
+        True, if the problem was reduced successfully.
+        False, if the error occurred during the Cholesky decomposition of
+            matrix B (the matrix is not positive-definite).
+
+      -- ALGLIB --
+         Copyright 1.28.2006 by Bochkanov Sergey
+    *************************************************************************/
+    public static bool smatrixgevdreduce(ref double[,] a,
+        int n,
+        bool isuppera,
+        ref double[,] b,
+        bool isupperb,
+        int problemtype,
+        ref double[,] r,
+        ref bool isupperr) {
+      bool result = new bool();
+      double[,] t = new double[0, 0];
+      double[] w1 = new double[0];
+      double[] w2 = new double[0];
+      double[] w3 = new double[0];
+      int i = 0;
+      int j = 0;
+      double v = 0;
+      matinv.matinvreport rep = new matinv.matinvreport();
+      int info = 0;
+      int i_ = 0;
+      int i1_ = 0;
+
+      System.Diagnostics.Debug.Assert(n > 0, "SMatrixGEVDReduce: N<=0!");
+      System.Diagnostics.Debug.Assert(problemtype == 1 | problemtype == 2 | problemtype == 3, "SMatrixGEVDReduce: incorrect ProblemType!");
+      result = true;
+
+      //
+      // Problem 1:  A*x = lambda*B*x
+      //
+      // Reducing to:
+      //     C*y = lambda*y
+      //     C = L^(-1) * A * L^(-T)
+      //     x = L^(-T) * y
+      //
+      if (problemtype == 1) {
+
+        //
+        // Factorize B in T: B = LL'
+        //
+        t = new double[n - 1 + 1, n - 1 + 1];
+        if (isupperb) {
+          for (i = 0; i <= n - 1; i++) {
+            for (i_ = i; i_ <= n - 1; i_++) {
+              t[i_, i] = b[i, i_];
+            }
+          }
+        } else {
+          for (i = 0; i <= n - 1; i++) {
+            for (i_ = 0; i_ <= i; i_++) {
+              t[i, i_] = b[i, i_];
+            }
+          }
+        }
+        if (!trfac.spdmatrixcholesky(ref t, n, false)) {
+          result = false;
+          return result;
+        }
+
+        //
+        // Invert L in T
+        //
+        matinv.rmatrixtrinverse(ref t, n, false, false, ref info, ref rep);
+        if (info <= 0) {
+          result = false;
+          return result;
+        }
+
+        //
+        // Build L^(-1) * A * L^(-T) in R
+        //
+        w1 = new double[n + 1];
+        w2 = new double[n + 1];
+        r = new double[n - 1 + 1, n - 1 + 1];
+        for (j = 1; j <= n; j++) {
+
+          //
+          // Form w2 = A * l'(j) (here l'(j) is j-th column of L^(-T))
+          //
+          i1_ = (0) - (1);
+          for (i_ = 1; i_ <= j; i_++) {
+            w1[i_] = t[j - 1, i_ + i1_];
+          }
+          sblas.symmetricmatrixvectormultiply(ref a, isuppera, 0, j - 1, ref w1, 1.0, ref w2);
+          if (isuppera) {
+            blas.matrixvectormultiply(ref a, 0, j - 1, j, n - 1, true, ref w1, 1, j, 1.0, ref w2, j + 1, n, 0.0);
+          } else {
+            blas.matrixvectormultiply(ref a, j, n - 1, 0, j - 1, false, ref w1, 1, j, 1.0, ref w2, j + 1, n, 0.0);
+          }
+
+          //
+          // Form l(i)*w2 (here l(i) is i-th row of L^(-1))
+          //
+          for (i = 1; i <= n; i++) {
+            i1_ = (1) - (0);
+            v = 0.0;
+            for (i_ = 0; i_ <= i - 1; i_++) {
+              v += t[i - 1, i_] * w2[i_ + i1_];
+            }
+            r[i - 1, j - 1] = v;
+          }
+        }
+
+        //
+        // Copy R to A
+        //
+        for (i = 0; i <= n - 1; i++) {
+          for (i_ = 0; i_ <= n - 1; i_++) {
+            a[i, i_] = r[i, i_];
+          }
+        }
+
+        //
+        // Copy L^(-1) from T to R and transpose
+        //
+        isupperr = true;
+        for (i = 0; i <= n - 1; i++) {
+          for (j = 0; j <= i - 1; j++) {
+            r[i, j] = 0;
+          }
+        }
+        for (i = 0; i <= n - 1; i++) {
+          for (i_ = i; i_ <= n - 1; i_++) {
+            r[i, i_] = t[i_, i];
+          }
+        }
+        return result;
+      }
+
+      //
+      // Problem 2:  A*B*x = lambda*x
+      // or
+      // problem 3:  B*A*x = lambda*x
+      //
+      // Reducing to:
+      //     C*y = lambda*y
+      //     C = U * A * U'
+      //     B = U'* U
+      //
+      if (problemtype == 2 | problemtype == 3) {
+
+        //
+        // Factorize B in T: B = U'*U
+        //
+        t = new double[n - 1 + 1, n - 1 + 1];
+        if (isupperb) {
+          for (i = 0; i <= n - 1; i++) {
+            for (i_ = i; i_ <= n - 1; i_++) {
+              t[i, i_] = b[i, i_];
+            }
+          }
+        } else {
+          for (i = 0; i <= n - 1; i++) {
+            for (i_ = i; i_ <= n - 1; i_++) {
+              t[i, i_] = b[i_, i];
+            }
+          }
+        }
+        if (!trfac.spdmatrixcholesky(ref t, n, true)) {
+          result = false;
+          return result;
+        }
+
+        //
+        // Build U * A * U' in R
+        //
+        w1 = new double[n + 1];
+        w2 = new double[n + 1];
+        w3 = new double[n + 1];
+        r = new double[n - 1 + 1, n - 1 + 1];
+        for (j = 1; j <= n; j++) {
+
+          //
+          // Form w2 = A * u'(j) (here u'(j) is j-th column of U')
+          //
+          i1_ = (j - 1) - (1);
+          for (i_ = 1; i_ <= n - j + 1; i_++) {
+            w1[i_] = t[j - 1, i_ + i1_];
+          }
+          sblas.symmetricmatrixvectormultiply(ref a, isuppera, j - 1, n - 1, ref w1, 1.0, ref w3);
+          i1_ = (1) - (j);
+          for (i_ = j; i_ <= n; i_++) {
+            w2[i_] = w3[i_ + i1_];
+          }
+          i1_ = (j - 1) - (j);
+          for (i_ = j; i_ <= n; i_++) {
+            w1[i_] = t[j - 1, i_ + i1_];
+          }
+          if (isuppera) {
+            blas.matrixvectormultiply(ref a, 0, j - 2, j - 1, n - 1, false, ref w1, j, n, 1.0, ref w2, 1, j - 1, 0.0);
+          } else {
+            blas.matrixvectormultiply(ref a, j - 1, n - 1, 0, j - 2, true, ref w1, j, n, 1.0, ref w2, 1, j - 1, 0.0);
+          }
+
+          //
+          // Form u(i)*w2 (here u(i) is i-th row of U)
+          //
+          for (i = 1; i <= n; i++) {
+            i1_ = (i) - (i - 1);
+            v = 0.0;
+            for (i_ = i - 1; i_ <= n - 1; i_++) {
+              v += t[i - 1, i_] * w2[i_ + i1_];
+            }
+            r[i - 1, j - 1] = v;
+          }
+        }
+
+        //
+        // Copy R to A
+        //
+        for (i = 0; i <= n - 1; i++) {
+          for (i_ = 0; i_ <= n - 1; i_++) {
+            a[i, i_] = r[i, i_];
+          }
+        }
+        if (problemtype == 2) {
+
+          //
+          // Invert U in T
+          //
+          matinv.rmatrixtrinverse(ref t, n, true, false, ref info, ref rep);
+          if (info <= 0) {
+            result = false;
             return result;
-        }
-
-
-        /*************************************************************************
-        Algorithm for reduction of the following generalized symmetric positive-
-        definite eigenvalue problem:
-            A*x = lambda*B*x (1) or
-            A*B*x = lambda*x (2) or
-            B*A*x = lambda*x (3)
-        to the symmetric eigenvalues problem C*y = lambda*y (eigenvalues of this and
-        the given problems are the same, and the eigenvectors of the given problem
-        could be obtained by multiplying the obtained eigenvectors by the
-        transformation matrix x = R*y).
-
-        Here A is a symmetric matrix, B - symmetric positive-definite matrix.
-
-        Input parameters:
-            A           -   symmetric matrix which is given by its upper or lower
-                            triangular part.
-                            Array whose indexes range within [0..N-1, 0..N-1].
-            N           -   size of matrices A and B.
-            IsUpperA    -   storage format of matrix A.
-            B           -   symmetric positive-definite matrix which is given by
-                            its upper or lower triangular part.
-                            Array whose indexes range within [0..N-1, 0..N-1].
-            IsUpperB    -   storage format of matrix B.
-            ProblemType -   if ProblemType is equal to:
-                             * 1, the following problem is solved: A*x = lambda*B*x;
-                             * 2, the following problem is solved: A*B*x = lambda*x;
-                             * 3, the following problem is solved: B*A*x = lambda*x.
-
-        Output parameters:
-            A           -   symmetric matrix which is given by its upper or lower
-                            triangle depending on IsUpperA. Contains matrix C.
-                            Array whose indexes range within [0..N-1, 0..N-1].
-            R           -   upper triangular or low triangular transformation matrix
-                            which is used to obtain the eigenvectors of a given problem
-                            as the product of eigenvectors of C (from the right) and
-                            matrix R (from the left). If the matrix is upper
-                            triangular, the elements below the main diagonal
-                            are equal to 0 (and vice versa). Thus, we can perform
-                            the multiplication without taking into account the
-                            internal structure (which is an easier though less
-                            effective way).
-                            Array whose indexes range within [0..N-1, 0..N-1].
-            IsUpperR    -   type of matrix R (upper or lower triangular).
-
-        Result:
-            True, if the problem was reduced successfully.
-            False, if the error occurred during the Cholesky decomposition of
-                matrix B (the matrix is not positive-definite).
-
-          -- ALGLIB --
-             Copyright 1.28.2006 by Bochkanov Sergey
-        *************************************************************************/
-        public static bool smatrixgevdreduce(ref double[,] a,
-            int n,
-            bool isuppera,
-            ref double[,] b,
-            bool isupperb,
-            int problemtype,
-            ref double[,] r,
-            ref bool isupperr)
-        {
-            bool result = new bool();
-            double[,] t = new double[0,0];
-            double[] w1 = new double[0];
-            double[] w2 = new double[0];
-            double[] w3 = new double[0];
-            int i = 0;
-            int j = 0;
-            double v = 0;
-            matinv.matinvreport rep = new matinv.matinvreport();
-            int info = 0;
-            int i_ = 0;
-            int i1_ = 0;
-
-            System.Diagnostics.Debug.Assert(n>0, "SMatrixGEVDReduce: N<=0!");
-            System.Diagnostics.Debug.Assert(problemtype==1 | problemtype==2 | problemtype==3, "SMatrixGEVDReduce: incorrect ProblemType!");
-            result = true;
-            
-            //
-            // Problem 1:  A*x = lambda*B*x
-            //
-            // Reducing to:
-            //     C*y = lambda*y
-            //     C = L^(-1) * A * L^(-T)
-            //     x = L^(-T) * y
-            //
-            if( problemtype==1 )
-            {
-                
-                //
-                // Factorize B in T: B = LL'
-                //
-                t = new double[n-1+1, n-1+1];
-                if( isupperb )
-                {
-                    for(i=0; i<=n-1; i++)
-                    {
-                        for(i_=i; i_<=n-1;i_++)
-                        {
-                            t[i_,i] = b[i,i_];
-                        }
-                    }
-                }
-                else
-                {
-                    for(i=0; i<=n-1; i++)
-                    {
-                        for(i_=0; i_<=i;i_++)
-                        {
-                            t[i,i_] = b[i,i_];
-                        }
-                    }
-                }
-                if( !trfac.spdmatrixcholesky(ref t, n, false) )
-                {
-                    result = false;
-                    return result;
-                }
-                
-                //
-                // Invert L in T
-                //
-                matinv.rmatrixtrinverse(ref t, n, false, false, ref info, ref rep);
-                if( info<=0 )
-                {
-                    result = false;
-                    return result;
-                }
-                
-                //
-                // Build L^(-1) * A * L^(-T) in R
-                //
-                w1 = new double[n+1];
-                w2 = new double[n+1];
-                r = new double[n-1+1, n-1+1];
-                for(j=1; j<=n; j++)
-                {
-                    
-                    //
-                    // Form w2 = A * l'(j) (here l'(j) is j-th column of L^(-T))
-                    //
-                    i1_ = (0) - (1);
-                    for(i_=1; i_<=j;i_++)
-                    {
-                        w1[i_] = t[j-1,i_+i1_];
-                    }
-                    sblas.symmetricmatrixvectormultiply(ref a, isuppera, 0, j-1, ref w1, 1.0, ref w2);
-                    if( isuppera )
-                    {
-                        blas.matrixvectormultiply(ref a, 0, j-1, j, n-1, true, ref w1, 1, j, 1.0, ref w2, j+1, n, 0.0);
-                    }
-                    else
-                    {
-                        blas.matrixvectormultiply(ref a, j, n-1, 0, j-1, false, ref w1, 1, j, 1.0, ref w2, j+1, n, 0.0);
-                    }
-                    
-                    //
-                    // Form l(i)*w2 (here l(i) is i-th row of L^(-1))
-                    //
-                    for(i=1; i<=n; i++)
-                    {
-                        i1_ = (1)-(0);
-                        v = 0.0;
-                        for(i_=0; i_<=i-1;i_++)
-                        {
-                            v += t[i-1,i_]*w2[i_+i1_];
-                        }
-                        r[i-1,j-1] = v;
-                    }
-                }
-                
-                //
-                // Copy R to A
-                //
-                for(i=0; i<=n-1; i++)
-                {
-                    for(i_=0; i_<=n-1;i_++)
-                    {
-                        a[i,i_] = r[i,i_];
-                    }
-                }
-                
-                //
-                // Copy L^(-1) from T to R and transpose
-                //
-                isupperr = true;
-                for(i=0; i<=n-1; i++)
-                {
-                    for(j=0; j<=i-1; j++)
-                    {
-                        r[i,j] = 0;
-                    }
-                }
-                for(i=0; i<=n-1; i++)
-                {
-                    for(i_=i; i_<=n-1;i_++)
-                    {
-                        r[i,i_] = t[i_,i];
-                    }
-                }
-                return result;
-            }
-            
-            //
-            // Problem 2:  A*B*x = lambda*x
-            // or
-            // problem 3:  B*A*x = lambda*x
-            //
-            // Reducing to:
-            //     C*y = lambda*y
-            //     C = U * A * U'
-            //     B = U'* U
-            //
-            if( problemtype==2 | problemtype==3 )
-            {
-                
-                //
-                // Factorize B in T: B = U'*U
-                //
-                t = new double[n-1+1, n-1+1];
-                if( isupperb )
-                {
-                    for(i=0; i<=n-1; i++)
-                    {
-                        for(i_=i; i_<=n-1;i_++)
-                        {
-                            t[i,i_] = b[i,i_];
-                        }
-                    }
-                }
-                else
-                {
-                    for(i=0; i<=n-1; i++)
-                    {
-                        for(i_=i; i_<=n-1;i_++)
-                        {
-                            t[i,i_] = b[i_,i];
-                        }
-                    }
-                }
-                if( !trfac.spdmatrixcholesky(ref t, n, true) )
-                {
-                    result = false;
-                    return result;
-                }
-                
-                //
-                // Build U * A * U' in R
-                //
-                w1 = new double[n+1];
-                w2 = new double[n+1];
-                w3 = new double[n+1];
-                r = new double[n-1+1, n-1+1];
-                for(j=1; j<=n; j++)
-                {
-                    
-                    //
-                    // Form w2 = A * u'(j) (here u'(j) is j-th column of U')
-                    //
-                    i1_ = (j-1) - (1);
-                    for(i_=1; i_<=n-j+1;i_++)
-                    {
-                        w1[i_] = t[j-1,i_+i1_];
-                    }
-                    sblas.symmetricmatrixvectormultiply(ref a, isuppera, j-1, n-1, ref w1, 1.0, ref w3);
-                    i1_ = (1) - (j);
-                    for(i_=j; i_<=n;i_++)
-                    {
-                        w2[i_] = w3[i_+i1_];
-                    }
-                    i1_ = (j-1) - (j);
-                    for(i_=j; i_<=n;i_++)
-                    {
-                        w1[i_] = t[j-1,i_+i1_];
-                    }
-                    if( isuppera )
-                    {
-                        blas.matrixvectormultiply(ref a, 0, j-2, j-1, n-1, false, ref w1, j, n, 1.0, ref w2, 1, j-1, 0.0);
-                    }
-                    else
-                    {
-                        blas.matrixvectormultiply(ref a, j-1, n-1, 0, j-2, true, ref w1, j, n, 1.0, ref w2, 1, j-1, 0.0);
-                    }
-                    
-                    //
-                    // Form u(i)*w2 (here u(i) is i-th row of U)
-                    //
-                    for(i=1; i<=n; i++)
-                    {
-                        i1_ = (i)-(i-1);
-                        v = 0.0;
-                        for(i_=i-1; i_<=n-1;i_++)
-                        {
-                            v += t[i-1,i_]*w2[i_+i1_];
-                        }
-                        r[i-1,j-1] = v;
-                    }
-                }
-                
-                //
-                // Copy R to A
-                //
-                for(i=0; i<=n-1; i++)
-                {
-                    for(i_=0; i_<=n-1;i_++)
-                    {
-                        a[i,i_] = r[i,i_];
-                    }
-                }
-                if( problemtype==2 )
-                {
-                    
-                    //
-                    // Invert U in T
-                    //
-                    matinv.rmatrixtrinverse(ref t, n, true, false, ref info, ref rep);
-                    if( info<=0 )
-                    {
-                        result = false;
-                        return result;
-                    }
-                    
-                    //
-                    // Copy U^-1 from T to R
-                    //
-                    isupperr = true;
-                    for(i=0; i<=n-1; i++)
-                    {
-                        for(j=0; j<=i-1; j++)
-                        {
-                            r[i,j] = 0;
-                        }
-                    }
-                    for(i=0; i<=n-1; i++)
-                    {
-                        for(i_=i; i_<=n-1;i_++)
-                        {
-                            r[i,i_] = t[i,i_];
-                        }
-                    }
-                }
-                else
-                {
-                    
-                    //
-                    // Copy U from T to R and transpose
-                    //
-                    isupperr = false;
-                    for(i=0; i<=n-1; i++)
-                    {
-                        for(j=i+1; j<=n-1; j++)
-                        {
-                            r[i,j] = 0;
-                        }
-                    }
-                    for(i=0; i<=n-1; i++)
-                    {
-                        for(i_=i; i_<=n-1;i_++)
-                        {
-                            r[i_,i] = t[i,i_];
-                        }
-                    }
-                }
-            }
-            return result;
-        }
+          }
+
+          //
+          // Copy U^-1 from T to R
+          //
+          isupperr = true;
+          for (i = 0; i <= n - 1; i++) {
+            for (j = 0; j <= i - 1; j++) {
+              r[i, j] = 0;
+            }
+          }
+          for (i = 0; i <= n - 1; i++) {
+            for (i_ = i; i_ <= n - 1; i_++) {
+              r[i, i_] = t[i, i_];
+            }
+          }
+        } else {
+
+          //
+          // Copy U from T to R and transpose
+          //
+          isupperr = false;
+          for (i = 0; i <= n - 1; i++) {
+            for (j = i + 1; j <= n - 1; j++) {
+              r[i, j] = 0;
+            }
+          }
+          for (i = 0; i <= n - 1; i++) {
+            for (i_ = i; i_ <= n - 1; i_++) {
+              r[i_, i] = t[i, i_];
+            }
+          }
+        }
+      }
+      return result;
     }
+  }
 }
Index: /trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.ALGLIB/2.5.0/ALGLIB-2.5.0/ssolve.cs
===================================================================
--- /trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.ALGLIB/2.5.0/ALGLIB-2.5.0/ssolve.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.ALGLIB/2.5.0/ALGLIB-2.5.0/ssolve.cs	(revision 4068)
@@ -25,954 +25,843 @@
 *************************************************************************/
 
-using System;
-
-namespace alglib
-{
-    public class ssolve
-    {
-        /*************************************************************************
-        Solving  a system  of linear equations  with a system matrix  given by its
-        LDLT decomposition
-
-        The algorithm solves systems with a square matrix only.
-
-        Input parameters:
-            A       -   LDLT decomposition of the matrix (the result of the
-                        SMatrixLDLT subroutine).
-            Pivots  -   row permutation table (the result of the SMatrixLDLT subroutine).
-            B       -   right side of a system.
-                        Array whose index ranges within [0..N-1].
-            N       -   size of matrix A.
-            IsUpper -   points to the triangle of matrix A in which the LDLT
-                        decomposition is stored.
-                        If IsUpper=True, the decomposition has the form of U*D*U',
-                        matrix U is stored in the upper triangle of  matrix A  (in
-                        that case, the lower triangle isn't used and isn't changed
-                        by the subroutine).
-                        Similarly, if IsUpper=False, the decomposition has the form
-                        of L*D*L' and the lower triangle stores matrix L.
-
-        Output parameters:
-            X       -   solution of a system.
-                        Array whose index ranges within [0..N-1].
-
-        Result:
-            True, if the matrix is not singular. X contains the solution.
-            False, if the matrix is singular (the determinant of matrix D is equal
-        to 0). In this case, X doesn't contain a solution.
-        *************************************************************************/
-        public static bool smatrixldltsolve(ref double[,] a,
-            ref int[] pivots,
-            double[] b,
-            int n,
-            bool isupper,
-            ref double[] x)
-        {
-            bool result = new bool();
-            int i = 0;
-            int k = 0;
-            int kp = 0;
-            double ak = 0;
-            double akm1 = 0;
-            double akm1k = 0;
-            double bk = 0;
-            double bkm1 = 0;
-            double denom = 0;
-            double v = 0;
-            int i_ = 0;
-
-            b = (double[])b.Clone();
-
-            
-            //
-            // Quick return if possible
-            //
-            result = true;
-            if( n==0 )
-            {
-                return result;
-            }
-            
-            //
-            // Check that the diagonal matrix D is nonsingular
-            //
-            if( isupper )
-            {
-                
-                //
-                // Upper triangular storage: examine D from bottom to top
-                //
-                for(i=n-1; i>=0; i--)
-                {
-                    if( pivots[i]>=0 & (double)(a[i,i])==(double)(0) )
-                    {
-                        result = false;
-                        return result;
-                    }
-                }
-            }
-            else
-            {
-                
-                //
-                // Lower triangular storage: examine D from top to bottom.
-                //
-                for(i=0; i<=n-1; i++)
-                {
-                    if( pivots[i]>=0 & (double)(a[i,i])==(double)(0) )
-                    {
-                        result = false;
-                        return result;
-                    }
-                }
-            }
-            
-            //
-            // Solve Ax = b
-            //
-            if( isupper )
-            {
-                
-                //
-                // Solve A*X = B, where A = U*D*U'.
-                //
-                // First solve U*D*X = B, overwriting B with X.
-                //
-                // K+1 is the main loop index, decreasing from N to 1 in steps of
-                // 1 or 2, depending on the size of the diagonal blocks.
-                //
-                k = n-1;
-                while( k>=0 )
-                {
-                    if( pivots[k]>=0 )
-                    {
-                        
-                        //
-                        // 1 x 1 diagonal block
-                        //
-                        // Interchange rows K+1 and IPIV(K+1).
-                        //
-                        kp = pivots[k];
-                        if( kp!=k )
-                        {
-                            v = b[k];
-                            b[k] = b[kp];
-                            b[kp] = v;
-                        }
-                        
-                        //
-                        // Multiply by inv(U(K+1)), where U(K+1) is the transformation
-                        // stored in column K+1 of A.
-                        //
-                        v = b[k];
-                        for(i_=0; i_<=k-1;i_++)
-                        {
-                            b[i_] = b[i_] - v*a[i_,k];
-                        }
-                        
-                        //
-                        // Multiply by the inverse of the diagonal block.
-                        //
-                        b[k] = b[k]/a[k,k];
-                        k = k-1;
-                    }
-                    else
-                    {
-                        
-                        //
-                        // 2 x 2 diagonal block
-                        //
-                        // Interchange rows K+1-1 and -IPIV(K+1).
-                        //
-                        kp = pivots[k]+n;
-                        if( kp!=k-1 )
-                        {
-                            v = b[k-1];
-                            b[k-1] = b[kp];
-                            b[kp] = v;
-                        }
-                        
-                        //
-                        // Multiply by inv(U(K+1)), where U(K+1) is the transformation
-                        // stored in columns K+1-1 and K+1 of A.
-                        //
-                        v = b[k];
-                        for(i_=0; i_<=k-2;i_++)
-                        {
-                            b[i_] = b[i_] - v*a[i_,k];
-                        }
-                        v = b[k-1];
-                        for(i_=0; i_<=k-2;i_++)
-                        {
-                            b[i_] = b[i_] - v*a[i_,k-1];
-                        }
-                        
-                        //
-                        // Multiply by the inverse of the diagonal block.
-                        //
-                        akm1k = a[k-1,k];
-                        akm1 = a[k-1,k-1]/akm1k;
-                        ak = a[k,k]/akm1k;
-                        denom = akm1*ak-1;
-                        bkm1 = b[k-1]/akm1k;
-                        bk = b[k]/akm1k;
-                        b[k-1] = (ak*bkm1-bk)/denom;
-                        b[k] = (akm1*bk-bkm1)/denom;
-                        k = k-2;
-                    }
-                }
-                
-                //
-                // Next solve U'*X = B, overwriting B with X.
-                //
-                // K+1 is the main loop index, increasing from 1 to N in steps of
-                // 1 or 2, depending on the size of the diagonal blocks.
-                //
-                k = 0;
-                while( k<=n-1 )
-                {
-                    if( pivots[k]>=0 )
-                    {
-                        
-                        //
-                        // 1 x 1 diagonal block
-                        //
-                        // Multiply by inv(U'(K+1)), where U(K+1) is the transformation
-                        // stored in column K+1 of A.
-                        //
-                        v = 0.0;
-                        for(i_=0; i_<=k-1;i_++)
-                        {
-                            v += b[i_]*a[i_,k];
-                        }
-                        b[k] = b[k]-v;
-                        
-                        //
-                        // Interchange rows K+1 and IPIV(K+1).
-                        //
-                        kp = pivots[k];
-                        if( kp!=k )
-                        {
-                            v = b[k];
-                            b[k] = b[kp];
-                            b[kp] = v;
-                        }
-                        k = k+1;
-                    }
-                    else
-                    {
-                        
-                        //
-                        // 2 x 2 diagonal block
-                        //
-                        // Multiply by inv(U'(K+1+1)), where U(K+1+1) is the transformation
-                        // stored in columns K+1 and K+1+1 of A.
-                        //
-                        v = 0.0;
-                        for(i_=0; i_<=k-1;i_++)
-                        {
-                            v += b[i_]*a[i_,k];
-                        }
-                        b[k] = b[k]-v;
-                        v = 0.0;
-                        for(i_=0; i_<=k-1;i_++)
-                        {
-                            v += b[i_]*a[i_,k+1];
-                        }
-                        b[k+1] = b[k+1]-v;
-                        
-                        //
-                        // Interchange rows K+1 and -IPIV(K+1).
-                        //
-                        kp = pivots[k]+n;
-                        if( kp!=k )
-                        {
-                            v = b[k];
-                            b[k] = b[kp];
-                            b[kp] = v;
-                        }
-                        k = k+2;
-                    }
-                }
-            }
-            else
-            {
-                
-                //
-                // Solve A*X = B, where A = L*D*L'.
-                //
-                // First solve L*D*X = B, overwriting B with X.
-                //
-                // K+1 is the main loop index, increasing from 1 to N in steps of
-                // 1 or 2, depending on the size of the diagonal blocks.
-                //
-                k = 0;
-                while( k<=n-1 )
-                {
-                    if( pivots[k]>=0 )
-                    {
-                        
-                        //
-                        // 1 x 1 diagonal block
-                        //
-                        // Interchange rows K+1 and IPIV(K+1).
-                        //
-                        kp = pivots[k];
-                        if( kp!=k )
-                        {
-                            v = b[k];
-                            b[k] = b[kp];
-                            b[kp] = v;
-                        }
-                        
-                        //
-                        // Multiply by inv(L(K+1)), where L(K+1) is the transformation
-                        // stored in column K+1 of A.
-                        //
-                        if( k+1<n )
-                        {
-                            v = b[k];
-                            for(i_=k+1; i_<=n-1;i_++)
-                            {
-                                b[i_] = b[i_] - v*a[i_,k];
-                            }
-                        }
-                        
-                        //
-                        // Multiply by the inverse of the diagonal block.
-                        //
-                        b[k] = b[k]/a[k,k];
-                        k = k+1;
-                    }
-                    else
-                    {
-                        
-                        //
-                        // 2 x 2 diagonal block
-                        //
-                        // Interchange rows K+1+1 and -IPIV(K+1).
-                        //
-                        kp = pivots[k]+n;
-                        if( kp!=k+1 )
-                        {
-                            v = b[k+1];
-                            b[k+1] = b[kp];
-                            b[kp] = v;
-                        }
-                        
-                        //
-                        // Multiply by inv(L(K+1)), where L(K+1) is the transformation
-                        // stored in columns K+1 and K+1+1 of A.
-                        //
-                        if( k+1<n-1 )
-                        {
-                            v = b[k];
-                            for(i_=k+2; i_<=n-1;i_++)
-                            {
-                                b[i_] = b[i_] - v*a[i_,k];
-                            }
-                            v = b[k+1];
-                            for(i_=k+2; i_<=n-1;i_++)
-                            {
-                                b[i_] = b[i_] - v*a[i_,k+1];
-                            }
-                        }
-                        
-                        //
-                        // Multiply by the inverse of the diagonal block.
-                        //
-                        akm1k = a[k+1,k];
-                        akm1 = a[k,k]/akm1k;
-                        ak = a[k+1,k+1]/akm1k;
-                        denom = akm1*ak-1;
-                        bkm1 = b[k]/akm1k;
-                        bk = b[k+1]/akm1k;
-                        b[k] = (ak*bkm1-bk)/denom;
-                        b[k+1] = (akm1*bk-bkm1)/denom;
-                        k = k+2;
-                    }
-                }
-                
-                //
-                // Next solve L'*X = B, overwriting B with X.
-                //
-                // K+1 is the main loop index, decreasing from N to 1 in steps of
-                // 1 or 2, depending on the size of the diagonal blocks.
-                //
-                k = n-1;
-                while( k>=0 )
-                {
-                    if( pivots[k]>=0 )
-                    {
-                        
-                        //
-                        // 1 x 1 diagonal block
-                        //
-                        // Multiply by inv(L'(K+1)), where L(K+1) is the transformation
-                        // stored in column K+1 of A.
-                        //
-                        if( k+1<n )
-                        {
-                            v = 0.0;
-                            for(i_=k+1; i_<=n-1;i_++)
-                            {
-                                v += b[i_]*a[i_,k];
-                            }
-                            b[k] = b[k]-v;
-                        }
-                        
-                        //
-                        // Interchange rows K+1 and IPIV(K+1).
-                        //
-                        kp = pivots[k];
-                        if( kp!=k )
-                        {
-                            v = b[k];
-                            b[k] = b[kp];
-                            b[kp] = v;
-                        }
-                        k = k-1;
-                    }
-                    else
-                    {
-                        
-                        //
-                        // 2 x 2 diagonal block
-                        //
-                        // Multiply by inv(L'(K+1-1)), where L(K+1-1) is the transformation
-                        // stored in columns K+1-1 and K+1 of A.
-                        //
-                        if( k+1<n )
-                        {
-                            v = 0.0;
-                            for(i_=k+1; i_<=n-1;i_++)
-                            {
-                                v += b[i_]*a[i_,k];
-                            }
-                            b[k] = b[k]-v;
-                            v = 0.0;
-                            for(i_=k+1; i_<=n-1;i_++)
-                            {
-                                v += b[i_]*a[i_,k-1];
-                            }
-                            b[k-1] = b[k-1]-v;
-                        }
-                        
-                        //
-                        // Interchange rows K+1 and -IPIV(K+1).
-                        //
-                        kp = pivots[k]+n;
-                        if( kp!=k )
-                        {
-                            v = b[k];
-                            b[k] = b[kp];
-                            b[kp] = v;
-                        }
-                        k = k-2;
-                    }
-                }
-            }
-            x = new double[n-1+1];
-            for(i_=0; i_<=n-1;i_++)
-            {
-                x[i_] = b[i_];
-            }
+
+namespace alglib {
+  public class ssolve {
+    /*************************************************************************
+    Solving  a system  of linear equations  with a system matrix  given by its
+    LDLT decomposition
+
+    The algorithm solves systems with a square matrix only.
+
+    Input parameters:
+        A       -   LDLT decomposition of the matrix (the result of the
+                    SMatrixLDLT subroutine).
+        Pivots  -   row permutation table (the result of the SMatrixLDLT subroutine).
+        B       -   right side of a system.
+                    Array whose index ranges within [0..N-1].
+        N       -   size of matrix A.
+        IsUpper -   points to the triangle of matrix A in which the LDLT
+                    decomposition is stored.
+                    If IsUpper=True, the decomposition has the form of U*D*U',
+                    matrix U is stored in the upper triangle of  matrix A  (in
+                    that case, the lower triangle isn't used and isn't changed
+                    by the subroutine).
+                    Similarly, if IsUpper=False, the decomposition has the form
+                    of L*D*L' and the lower triangle stores matrix L.
+
+    Output parameters:
+        X       -   solution of a system.
+                    Array whose index ranges within [0..N-1].
+
+    Result:
+        True, if the matrix is not singular. X contains the solution.
+        False, if the matrix is singular (the determinant of matrix D is equal
+    to 0). In this case, X doesn't contain a solution.
+    *************************************************************************/
+    public static bool smatrixldltsolve(ref double[,] a,
+        ref int[] pivots,
+        double[] b,
+        int n,
+        bool isupper,
+        ref double[] x) {
+      bool result = new bool();
+      int i = 0;
+      int k = 0;
+      int kp = 0;
+      double ak = 0;
+      double akm1 = 0;
+      double akm1k = 0;
+      double bk = 0;
+      double bkm1 = 0;
+      double denom = 0;
+      double v = 0;
+      int i_ = 0;
+
+      b = (double[])b.Clone();
+
+
+      //
+      // Quick return if possible
+      //
+      result = true;
+      if (n == 0) {
+        return result;
+      }
+
+      //
+      // Check that the diagonal matrix D is nonsingular
+      //
+      if (isupper) {
+
+        //
+        // Upper triangular storage: examine D from bottom to top
+        //
+        for (i = n - 1; i >= 0; i--) {
+          if (pivots[i] >= 0 & (double)(a[i, i]) == (double)(0)) {
+            result = false;
             return result;
-        }
-
-
-        /*************************************************************************
-        Solving a system of linear equations with a symmetric system matrix
-
-        Input parameters:
-            A       -   system matrix (upper or lower triangle).
-                        Array whose indexes range within [0..N-1, 0..N-1].
-            B       -   right side of a system.
-                        Array whose index ranges within [0..N-1].
-            N       -   size of matrix A.
-            IsUpper -   If IsUpper = True, A contains the upper triangle,
-                        otherwise A contains the lower triangle.
-
-        Output parameters:
-            X       -   solution of a system.
-                        Array whose index ranges within [0..N-1].
-
-        Result:
-            True, if the matrix is not singular. X contains the solution.
-            False, if the matrix is singular (the determinant of the matrix is equal
-        to 0). In this case, X doesn't contain a solution.
-
-          -- ALGLIB --
-             Copyright 2005 by Bochkanov Sergey
-        *************************************************************************/
-        public static bool smatrixsolve(double[,] a,
-            ref double[] b,
-            int n,
-            bool isupper,
-            ref double[] x)
-        {
-            bool result = new bool();
-            int[] pivots = new int[0];
-
-            a = (double[,])a.Clone();
-
-            ldlt.smatrixldlt(ref a, n, isupper, ref pivots);
-            result = smatrixldltsolve(ref a, ref pivots, b, n, isupper, ref x);
+          }
+        }
+      } else {
+
+        //
+        // Lower triangular storage: examine D from top to bottom.
+        //
+        for (i = 0; i <= n - 1; i++) {
+          if (pivots[i] >= 0 & (double)(a[i, i]) == (double)(0)) {
+            result = false;
             return result;
-        }
-
-
-        public static bool solvesystemldlt(ref double[,] a,
-            ref int[] pivots,
-            double[] b,
-            int n,
-            bool isupper,
-            ref double[] x)
-        {
-            bool result = new bool();
-            int i = 0;
-            int k = 0;
-            int kp = 0;
-            int km1 = 0;
-            int km2 = 0;
-            int kp1 = 0;
-            int kp2 = 0;
-            double ak = 0;
-            double akm1 = 0;
-            double akm1k = 0;
-            double bk = 0;
-            double bkm1 = 0;
-            double denom = 0;
-            double v = 0;
-            int i_ = 0;
-
-            b = (double[])b.Clone();
-
-            
-            //
-            // Quick return if possible
-            //
-            result = true;
-            if( n==0 )
-            {
-                return result;
-            }
-            
-            //
-            // Check that the diagonal matrix D is nonsingular
-            //
-            if( isupper )
-            {
-                
-                //
-                // Upper triangular storage: examine D from bottom to top
-                //
-                for(i=n; i>=1; i--)
-                {
-                    if( pivots[i]>0 & (double)(a[i,i])==(double)(0) )
-                    {
-                        result = false;
-                        return result;
-                    }
-                }
-            }
-            else
-            {
-                
-                //
-                // Lower triangular storage: examine D from top to bottom.
-                //
-                for(i=1; i<=n; i++)
-                {
-                    if( pivots[i]>0 & (double)(a[i,i])==(double)(0) )
-                    {
-                        result = false;
-                        return result;
-                    }
-                }
-            }
-            
-            //
-            // Solve Ax = b
-            //
-            if( isupper )
-            {
-                
-                //
-                // Solve A*X = B, where A = U*D*U'.
-                //
-                // First solve U*D*X = B, overwriting B with X.
-                //
-                // K is the main loop index, decreasing from N to 1 in steps of
-                // 1 or 2, depending on the size of the diagonal blocks.
-                //
-                k = n;
-                while( k>=1 )
-                {
-                    if( pivots[k]>0 )
-                    {
-                        
-                        //
-                        // 1 x 1 diagonal block
-                        //
-                        // Interchange rows K and IPIV(K).
-                        //
-                        kp = pivots[k];
-                        if( kp!=k )
-                        {
-                            v = b[k];
-                            b[k] = b[kp];
-                            b[kp] = v;
-                        }
-                        
-                        //
-                        // Multiply by inv(U(K)), where U(K) is the transformation
-                        // stored in column K of A.
-                        //
-                        km1 = k-1;
-                        v = b[k];
-                        for(i_=1; i_<=km1;i_++)
-                        {
-                            b[i_] = b[i_] - v*a[i_,k];
-                        }
-                        
-                        //
-                        // Multiply by the inverse of the diagonal block.
-                        //
-                        b[k] = b[k]/a[k,k];
-                        k = k-1;
-                    }
-                    else
-                    {
-                        
-                        //
-                        // 2 x 2 diagonal block
-                        //
-                        // Interchange rows K-1 and -IPIV(K).
-                        //
-                        kp = -pivots[k];
-                        if( kp!=k-1 )
-                        {
-                            v = b[k-1];
-                            b[k-1] = b[kp];
-                            b[kp] = v;
-                        }
-                        
-                        //
-                        // Multiply by inv(U(K)), where U(K) is the transformation
-                        // stored in columns K-1 and K of A.
-                        //
-                        km2 = k-2;
-                        km1 = k-1;
-                        v = b[k];
-                        for(i_=1; i_<=km2;i_++)
-                        {
-                            b[i_] = b[i_] - v*a[i_,k];
-                        }
-                        v = b[k-1];
-                        for(i_=1; i_<=km2;i_++)
-                        {
-                            b[i_] = b[i_] - v*a[i_,km1];
-                        }
-                        
-                        //
-                        // Multiply by the inverse of the diagonal block.
-                        //
-                        akm1k = a[k-1,k];
-                        akm1 = a[k-1,k-1]/akm1k;
-                        ak = a[k,k]/akm1k;
-                        denom = akm1*ak-1;
-                        bkm1 = b[k-1]/akm1k;
-                        bk = b[k]/akm1k;
-                        b[k-1] = (ak*bkm1-bk)/denom;
-                        b[k] = (akm1*bk-bkm1)/denom;
-                        k = k-2;
-                    }
-                }
-                
-                //
-                // Next solve U'*X = B, overwriting B with X.
-                //
-                // K is the main loop index, increasing from 1 to N in steps of
-                // 1 or 2, depending on the size of the diagonal blocks.
-                //
-                k = 1;
-                while( k<=n )
-                {
-                    if( pivots[k]>0 )
-                    {
-                        
-                        //
-                        // 1 x 1 diagonal block
-                        //
-                        // Multiply by inv(U'(K)), where U(K) is the transformation
-                        // stored in column K of A.
-                        //
-                        km1 = k-1;
-                        v = 0.0;
-                        for(i_=1; i_<=km1;i_++)
-                        {
-                            v += b[i_]*a[i_,k];
-                        }
-                        b[k] = b[k]-v;
-                        
-                        //
-                        // Interchange rows K and IPIV(K).
-                        //
-                        kp = pivots[k];
-                        if( kp!=k )
-                        {
-                            v = b[k];
-                            b[k] = b[kp];
-                            b[kp] = v;
-                        }
-                        k = k+1;
-                    }
-                    else
-                    {
-                        
-                        //
-                        // 2 x 2 diagonal block
-                        //
-                        // Multiply by inv(U'(K+1)), where U(K+1) is the transformation
-                        // stored in columns K and K+1 of A.
-                        //
-                        km1 = k-1;
-                        kp1 = k+1;
-                        v = 0.0;
-                        for(i_=1; i_<=km1;i_++)
-                        {
-                            v += b[i_]*a[i_,k];
-                        }
-                        b[k] = b[k]-v;
-                        v = 0.0;
-                        for(i_=1; i_<=km1;i_++)
-                        {
-                            v += b[i_]*a[i_,kp1];
-                        }
-                        b[k+1] = b[k+1]-v;
-                        
-                        //
-                        // Interchange rows K and -IPIV(K).
-                        //
-                        kp = -pivots[k];
-                        if( kp!=k )
-                        {
-                            v = b[k];
-                            b[k] = b[kp];
-                            b[kp] = v;
-                        }
-                        k = k+2;
-                    }
-                }
-            }
-            else
-            {
-                
-                //
-                // Solve A*X = B, where A = L*D*L'.
-                //
-                // First solve L*D*X = B, overwriting B with X.
-                //
-                // K is the main loop index, increasing from 1 to N in steps of
-                // 1 or 2, depending on the size of the diagonal blocks.
-                //
-                k = 1;
-                while( k<=n )
-                {
-                    if( pivots[k]>0 )
-                    {
-                        
-                        //
-                        // 1 x 1 diagonal block
-                        //
-                        // Interchange rows K and IPIV(K).
-                        //
-                        kp = pivots[k];
-                        if( kp!=k )
-                        {
-                            v = b[k];
-                            b[k] = b[kp];
-                            b[kp] = v;
-                        }
-                        
-                        //
-                        // Multiply by inv(L(K)), where L(K) is the transformation
-                        // stored in column K of A.
-                        //
-                        if( k<n )
-                        {
-                            kp1 = k+1;
-                            v = b[k];
-                            for(i_=kp1; i_<=n;i_++)
-                            {
-                                b[i_] = b[i_] - v*a[i_,k];
-                            }
-                        }
-                        
-                        //
-                        // Multiply by the inverse of the diagonal block.
-                        //
-                        b[k] = b[k]/a[k,k];
-                        k = k+1;
-                    }
-                    else
-                    {
-                        
-                        //
-                        // 2 x 2 diagonal block
-                        //
-                        // Interchange rows K+1 and -IPIV(K).
-                        //
-                        kp = -pivots[k];
-                        if( kp!=k+1 )
-                        {
-                            v = b[k+1];
-                            b[k+1] = b[kp];
-                            b[kp] = v;
-                        }
-                        
-                        //
-                        // Multiply by inv(L(K)), where L(K) is the transformation
-                        // stored in columns K and K+1 of A.
-                        //
-                        if( k<n-1 )
-                        {
-                            kp1 = k+1;
-                            kp2 = k+2;
-                            v = b[k];
-                            for(i_=kp2; i_<=n;i_++)
-                            {
-                                b[i_] = b[i_] - v*a[i_,k];
-                            }
-                            v = b[k+1];
-                            for(i_=kp2; i_<=n;i_++)
-                            {
-                                b[i_] = b[i_] - v*a[i_,kp1];
-                            }
-                        }
-                        
-                        //
-                        // Multiply by the inverse of the diagonal block.
-                        //
-                        akm1k = a[k+1,k];
-                        akm1 = a[k,k]/akm1k;
-                        ak = a[k+1,k+1]/akm1k;
-                        denom = akm1*ak-1;
-                        bkm1 = b[k]/akm1k;
-                        bk = b[k+1]/akm1k;
-                        b[k] = (ak*bkm1-bk)/denom;
-                        b[k+1] = (akm1*bk-bkm1)/denom;
-                        k = k+2;
-                    }
-                }
-                
-                //
-                // Next solve L'*X = B, overwriting B with X.
-                //
-                // K is the main loop index, decreasing from N to 1 in steps of
-                // 1 or 2, depending on the size of the diagonal blocks.
-                //
-                k = n;
-                while( k>=1 )
-                {
-                    if( pivots[k]>0 )
-                    {
-                        
-                        //
-                        // 1 x 1 diagonal block
-                        //
-                        // Multiply by inv(L'(K)), where L(K) is the transformation
-                        // stored in column K of A.
-                        //
-                        if( k<n )
-                        {
-                            kp1 = k+1;
-                            v = 0.0;
-                            for(i_=kp1; i_<=n;i_++)
-                            {
-                                v += b[i_]*a[i_,k];
-                            }
-                            b[k] = b[k]-v;
-                        }
-                        
-                        //
-                        // Interchange rows K and IPIV(K).
-                        //
-                        kp = pivots[k];
-                        if( kp!=k )
-                        {
-                            v = b[k];
-                            b[k] = b[kp];
-                            b[kp] = v;
-                        }
-                        k = k-1;
-                    }
-                    else
-                    {
-                        
-                        //
-                        // 2 x 2 diagonal block
-                        //
-                        // Multiply by inv(L'(K-1)), where L(K-1) is the transformation
-                        // stored in columns K-1 and K of A.
-                        //
-                        if( k<n )
-                        {
-                            kp1 = k+1;
-                            km1 = k-1;
-                            v = 0.0;
-                            for(i_=kp1; i_<=n;i_++)
-                            {
-                                v += b[i_]*a[i_,k];
-                            }
-                            b[k] = b[k]-v;
-                            v = 0.0;
-                            for(i_=kp1; i_<=n;i_++)
-                            {
-                                v += b[i_]*a[i_,km1];
-                            }
-                            b[k-1] = b[k-1]-v;
-                        }
-                        
-                        //
-                        // Interchange rows K and -IPIV(K).
-                        //
-                        kp = -pivots[k];
-                        if( kp!=k )
-                        {
-                            v = b[k];
-                            b[k] = b[kp];
-                            b[kp] = v;
-                        }
-                        k = k-2;
-                    }
-                }
-            }
-            x = new double[n+1];
-            for(i_=1; i_<=n;i_++)
-            {
-                x[i_] = b[i_];
-            }
+          }
+        }
+      }
+
+      //
+      // Solve Ax = b
+      //
+      if (isupper) {
+
+        //
+        // Solve A*X = B, where A = U*D*U'.
+        //
+        // First solve U*D*X = B, overwriting B with X.
+        //
+        // K+1 is the main loop index, decreasing from N to 1 in steps of
+        // 1 or 2, depending on the size of the diagonal blocks.
+        //
+        k = n - 1;
+        while (k >= 0) {
+          if (pivots[k] >= 0) {
+
+            //
+            // 1 x 1 diagonal block
+            //
+            // Interchange rows K+1 and IPIV(K+1).
+            //
+            kp = pivots[k];
+            if (kp != k) {
+              v = b[k];
+              b[k] = b[kp];
+              b[kp] = v;
+            }
+
+            //
+            // Multiply by inv(U(K+1)), where U(K+1) is the transformation
+            // stored in column K+1 of A.
+            //
+            v = b[k];
+            for (i_ = 0; i_ <= k - 1; i_++) {
+              b[i_] = b[i_] - v * a[i_, k];
+            }
+
+            //
+            // Multiply by the inverse of the diagonal block.
+            //
+            b[k] = b[k] / a[k, k];
+            k = k - 1;
+          } else {
+
+            //
+            // 2 x 2 diagonal block
+            //
+            // Interchange rows K+1-1 and -IPIV(K+1).
+            //
+            kp = pivots[k] + n;
+            if (kp != k - 1) {
+              v = b[k - 1];
+              b[k - 1] = b[kp];
+              b[kp] = v;
+            }
+
+            //
+            // Multiply by inv(U(K+1)), where U(K+1) is the transformation
+            // stored in columns K+1-1 and K+1 of A.
+            //
+            v = b[k];
+            for (i_ = 0; i_ <= k - 2; i_++) {
+              b[i_] = b[i_] - v * a[i_, k];
+            }
+            v = b[k - 1];
+            for (i_ = 0; i_ <= k - 2; i_++) {
+              b[i_] = b[i_] - v * a[i_, k - 1];
+            }
+
+            //
+            // Multiply by the inverse of the diagonal block.
+            //
+            akm1k = a[k - 1, k];
+            akm1 = a[k - 1, k - 1] / akm1k;
+            ak = a[k, k] / akm1k;
+            denom = akm1 * ak - 1;
+            bkm1 = b[k - 1] / akm1k;
+            bk = b[k] / akm1k;
+            b[k - 1] = (ak * bkm1 - bk) / denom;
+            b[k] = (akm1 * bk - bkm1) / denom;
+            k = k - 2;
+          }
+        }
+
+        //
+        // Next solve U'*X = B, overwriting B with X.
+        //
+        // K+1 is the main loop index, increasing from 1 to N in steps of
+        // 1 or 2, depending on the size of the diagonal blocks.
+        //
+        k = 0;
+        while (k <= n - 1) {
+          if (pivots[k] >= 0) {
+
+            //
+            // 1 x 1 diagonal block
+            //
+            // Multiply by inv(U'(K+1)), where U(K+1) is the transformation
+            // stored in column K+1 of A.
+            //
+            v = 0.0;
+            for (i_ = 0; i_ <= k - 1; i_++) {
+              v += b[i_] * a[i_, k];
+            }
+            b[k] = b[k] - v;
+
+            //
+            // Interchange rows K+1 and IPIV(K+1).
+            //
+            kp = pivots[k];
+            if (kp != k) {
+              v = b[k];
+              b[k] = b[kp];
+              b[kp] = v;
+            }
+            k = k + 1;
+          } else {
+
+            //
+            // 2 x 2 diagonal block
+            //
+            // Multiply by inv(U'(K+1+1)), where U(K+1+1) is the transformation
+            // stored in columns K+1 and K+1+1 of A.
+            //
+            v = 0.0;
+            for (i_ = 0; i_ <= k - 1; i_++) {
+              v += b[i_] * a[i_, k];
+            }
+            b[k] = b[k] - v;
+            v = 0.0;
+            for (i_ = 0; i_ <= k - 1; i_++) {
+              v += b[i_] * a[i_, k + 1];
+            }
+            b[k + 1] = b[k + 1] - v;
+
+            //
+            // Interchange rows K+1 and -IPIV(K+1).
+            //
+            kp = pivots[k] + n;
+            if (kp != k) {
+              v = b[k];
+              b[k] = b[kp];
+              b[kp] = v;
+            }
+            k = k + 2;
+          }
+        }
+      } else {
+
+        //
+        // Solve A*X = B, where A = L*D*L'.
+        //
+        // First solve L*D*X = B, overwriting B with X.
+        //
+        // K+1 is the main loop index, increasing from 1 to N in steps of
+        // 1 or 2, depending on the size of the diagonal blocks.
+        //
+        k = 0;
+        while (k <= n - 1) {
+          if (pivots[k] >= 0) {
+
+            //
+            // 1 x 1 diagonal block
+            //
+            // Interchange rows K+1 and IPIV(K+1).
+            //
+            kp = pivots[k];
+            if (kp != k) {
+              v = b[k];
+              b[k] = b[kp];
+              b[kp] = v;
+            }
+
+            //
+            // Multiply by inv(L(K+1)), where L(K+1) is the transformation
+            // stored in column K+1 of A.
+            //
+            if (k + 1 < n) {
+              v = b[k];
+              for (i_ = k + 1; i_ <= n - 1; i_++) {
+                b[i_] = b[i_] - v * a[i_, k];
+              }
+            }
+
+            //
+            // Multiply by the inverse of the diagonal block.
+            //
+            b[k] = b[k] / a[k, k];
+            k = k + 1;
+          } else {
+
+            //
+            // 2 x 2 diagonal block
+            //
+            // Interchange rows K+1+1 and -IPIV(K+1).
+            //
+            kp = pivots[k] + n;
+            if (kp != k + 1) {
+              v = b[k + 1];
+              b[k + 1] = b[kp];
+              b[kp] = v;
+            }
+
+            //
+            // Multiply by inv(L(K+1)), where L(K+1) is the transformation
+            // stored in columns K+1 and K+1+1 of A.
+            //
+            if (k + 1 < n - 1) {
+              v = b[k];
+              for (i_ = k + 2; i_ <= n - 1; i_++) {
+                b[i_] = b[i_] - v * a[i_, k];
+              }
+              v = b[k + 1];
+              for (i_ = k + 2; i_ <= n - 1; i_++) {
+                b[i_] = b[i_] - v * a[i_, k + 1];
+              }
+            }
+
+            //
+            // Multiply by the inverse of the diagonal block.
+            //
+            akm1k = a[k + 1, k];
+            akm1 = a[k, k] / akm1k;
+            ak = a[k + 1, k + 1] / akm1k;
+            denom = akm1 * ak - 1;
+            bkm1 = b[k] / akm1k;
+            bk = b[k + 1] / akm1k;
+            b[k] = (ak * bkm1 - bk) / denom;
+            b[k + 1] = (akm1 * bk - bkm1) / denom;
+            k = k + 2;
+          }
+        }
+
+        //
+        // Next solve L'*X = B, overwriting B with X.
+        //
+        // K+1 is the main loop index, decreasing from N to 1 in steps of
+        // 1 or 2, depending on the size of the diagonal blocks.
+        //
+        k = n - 1;
+        while (k >= 0) {
+          if (pivots[k] >= 0) {
+
+            //
+            // 1 x 1 diagonal block
+            //
+            // Multiply by inv(L'(K+1)), where L(K+1) is the transformation
+            // stored in column K+1 of A.
+            //
+            if (k + 1 < n) {
+              v = 0.0;
+              for (i_ = k + 1; i_ <= n - 1; i_++) {
+                v += b[i_] * a[i_, k];
+              }
+              b[k] = b[k] - v;
+            }
+
+            //
+            // Interchange rows K+1 and IPIV(K+1).
+            //
+            kp = pivots[k];
+            if (kp != k) {
+              v = b[k];
+              b[k] = b[kp];
+              b[kp] = v;
+            }
+            k = k - 1;
+          } else {
+
+            //
+            // 2 x 2 diagonal block
+            //
+            // Multiply by inv(L'(K+1-1)), where L(K+1-1) is the transformation
+            // stored in columns K+1-1 and K+1 of A.
+            //
+            if (k + 1 < n) {
+              v = 0.0;
+              for (i_ = k + 1; i_ <= n - 1; i_++) {
+                v += b[i_] * a[i_, k];
+              }
+              b[k] = b[k] - v;
+              v = 0.0;
+              for (i_ = k + 1; i_ <= n - 1; i_++) {
+                v += b[i_] * a[i_, k - 1];
+              }
+              b[k - 1] = b[k - 1] - v;
+            }
+
+            //
+            // Interchange rows K+1 and -IPIV(K+1).
+            //
+            kp = pivots[k] + n;
+            if (kp != k) {
+              v = b[k];
+              b[k] = b[kp];
+              b[kp] = v;
+            }
+            k = k - 2;
+          }
+        }
+      }
+      x = new double[n - 1 + 1];
+      for (i_ = 0; i_ <= n - 1; i_++) {
+        x[i_] = b[i_];
+      }
+      return result;
+    }
+
+
+    /*************************************************************************
+    Solving a system of linear equations with a symmetric system matrix
+
+    Input parameters:
+        A       -   system matrix (upper or lower triangle).
+                    Array whose indexes range within [0..N-1, 0..N-1].
+        B       -   right side of a system.
+                    Array whose index ranges within [0..N-1].
+        N       -   size of matrix A.
+        IsUpper -   If IsUpper = True, A contains the upper triangle,
+                    otherwise A contains the lower triangle.
+
+    Output parameters:
+        X       -   solution of a system.
+                    Array whose index ranges within [0..N-1].
+
+    Result:
+        True, if the matrix is not singular. X contains the solution.
+        False, if the matrix is singular (the determinant of the matrix is equal
+    to 0). In this case, X doesn't contain a solution.
+
+      -- ALGLIB --
+         Copyright 2005 by Bochkanov Sergey
+    *************************************************************************/
+    public static bool smatrixsolve(double[,] a,
+        ref double[] b,
+        int n,
+        bool isupper,
+        ref double[] x) {
+      bool result = new bool();
+      int[] pivots = new int[0];
+
+      a = (double[,])a.Clone();
+
+      ldlt.smatrixldlt(ref a, n, isupper, ref pivots);
+      result = smatrixldltsolve(ref a, ref pivots, b, n, isupper, ref x);
+      return result;
+    }
+
+
+    public static bool solvesystemldlt(ref double[,] a,
+        ref int[] pivots,
+        double[] b,
+        int n,
+        bool isupper,
+        ref double[] x) {
+      bool result = new bool();
+      int i = 0;
+      int k = 0;
+      int kp = 0;
+      int km1 = 0;
+      int km2 = 0;
+      int kp1 = 0;
+      int kp2 = 0;
+      double ak = 0;
+      double akm1 = 0;
+      double akm1k = 0;
+      double bk = 0;
+      double bkm1 = 0;
+      double denom = 0;
+      double v = 0;
+      int i_ = 0;
+
+      b = (double[])b.Clone();
+
+
+      //
+      // Quick return if possible
+      //
+      result = true;
+      if (n == 0) {
+        return result;
+      }
+
+      //
+      // Check that the diagonal matrix D is nonsingular
+      //
+      if (isupper) {
+
+        //
+        // Upper triangular storage: examine D from bottom to top
+        //
+        for (i = n; i >= 1; i--) {
+          if (pivots[i] > 0 & (double)(a[i, i]) == (double)(0)) {
+            result = false;
             return result;
-        }
-
-
-        public static bool solvesymmetricsystem(double[,] a,
-            double[] b,
-            int n,
-            bool isupper,
-            ref double[] x)
-        {
-            bool result = new bool();
-            int[] pivots = new int[0];
-
-            a = (double[,])a.Clone();
-            b = (double[])b.Clone();
-
-            ldlt.ldltdecomposition(ref a, n, isupper, ref pivots);
-            result = solvesystemldlt(ref a, ref pivots, b, n, isupper, ref x);
+          }
+        }
+      } else {
+
+        //
+        // Lower triangular storage: examine D from top to bottom.
+        //
+        for (i = 1; i <= n; i++) {
+          if (pivots[i] > 0 & (double)(a[i, i]) == (double)(0)) {
+            result = false;
             return result;
-        }
+          }
+        }
+      }
+
+      //
+      // Solve Ax = b
+      //
+      if (isupper) {
+
+        //
+        // Solve A*X = B, where A = U*D*U'.
+        //
+        // First solve U*D*X = B, overwriting B with X.
+        //
+        // K is the main loop index, decreasing from N to 1 in steps of
+        // 1 or 2, depending on the size of the diagonal blocks.
+        //
+        k = n;
+        while (k >= 1) {
+          if (pivots[k] > 0) {
+
+            //
+            // 1 x 1 diagonal block
+            //
+            // Interchange rows K and IPIV(K).
+            //
+            kp = pivots[k];
+            if (kp != k) {
+              v = b[k];
+              b[k] = b[kp];
+              b[kp] = v;
+            }
+
+            //
+            // Multiply by inv(U(K)), where U(K) is the transformation
+            // stored in column K of A.
+            //
+            km1 = k - 1;
+            v = b[k];
+            for (i_ = 1; i_ <= km1; i_++) {
+              b[i_] = b[i_] - v * a[i_, k];
+            }
+
+            //
+            // Multiply by the inverse of the diagonal block.
+            //
+            b[k] = b[k] / a[k, k];
+            k = k - 1;
+          } else {
+
+            //
+            // 2 x 2 diagonal block
+            //
+            // Interchange rows K-1 and -IPIV(K).
+            //
+            kp = -pivots[k];
+            if (kp != k - 1) {
+              v = b[k - 1];
+              b[k - 1] = b[kp];
+              b[kp] = v;
+            }
+
+            //
+            // Multiply by inv(U(K)), where U(K) is the transformation
+            // stored in columns K-1 and K of A.
+            //
+            km2 = k - 2;
+            km1 = k - 1;
+            v = b[k];
+            for (i_ = 1; i_ <= km2; i_++) {
+              b[i_] = b[i_] - v * a[i_, k];
+            }
+            v = b[k - 1];
+            for (i_ = 1; i_ <= km2; i_++) {
+              b[i_] = b[i_] - v * a[i_, km1];
+            }
+
+            //
+            // Multiply by the inverse of the diagonal block.
+            //
+            akm1k = a[k - 1, k];
+            akm1 = a[k - 1, k - 1] / akm1k;
+            ak = a[k, k] / akm1k;
+            denom = akm1 * ak - 1;
+            bkm1 = b[k - 1] / akm1k;
+            bk = b[k] / akm1k;
+            b[k - 1] = (ak * bkm1 - bk) / denom;
+            b[k] = (akm1 * bk - bkm1) / denom;
+            k = k - 2;
+          }
+        }
+
+        //
+        // Next solve U'*X = B, overwriting B with X.
+        //
+        // K is the main loop index, increasing from 1 to N in steps of
+        // 1 or 2, depending on the size of the diagonal blocks.
+        //
+        k = 1;
+        while (k <= n) {
+          if (pivots[k] > 0) {
+
+            //
+            // 1 x 1 diagonal block
+            //
+            // Multiply by inv(U'(K)), where U(K) is the transformation
+            // stored in column K of A.
+            //
+            km1 = k - 1;
+            v = 0.0;
+            for (i_ = 1; i_ <= km1; i_++) {
+              v += b[i_] * a[i_, k];
+            }
+            b[k] = b[k] - v;
+
+            //
+            // Interchange rows K and IPIV(K).
+            //
+            kp = pivots[k];
+            if (kp != k) {
+              v = b[k];
+              b[k] = b[kp];
+              b[kp] = v;
+            }
+            k = k + 1;
+          } else {
+
+            //
+            // 2 x 2 diagonal block
+            //
+            // Multiply by inv(U'(K+1)), where U(K+1) is the transformation
+            // stored in columns K and K+1 of A.
+            //
+            km1 = k - 1;
+            kp1 = k + 1;
+            v = 0.0;
+            for (i_ = 1; i_ <= km1; i_++) {
+              v += b[i_] * a[i_, k];
+            }
+            b[k] = b[k] - v;
+            v = 0.0;
+            for (i_ = 1; i_ <= km1; i_++) {
+              v += b[i_] * a[i_, kp1];
+            }
+            b[k + 1] = b[k + 1] - v;
+
+            //
+            // Interchange rows K and -IPIV(K).
+            //
+            kp = -pivots[k];
+            if (kp != k) {
+              v = b[k];
+              b[k] = b[kp];
+              b[kp] = v;
+            }
+            k = k + 2;
+          }
+        }
+      } else {
+
+        //
+        // Solve A*X = B, where A = L*D*L'.
+        //
+        // First solve L*D*X = B, overwriting B with X.
+        //
+        // K is the main loop index, increasing from 1 to N in steps of
+        // 1 or 2, depending on the size of the diagonal blocks.
+        //
+        k = 1;
+        while (k <= n) {
+          if (pivots[k] > 0) {
+
+            //
+            // 1 x 1 diagonal block
+            //
+            // Interchange rows K and IPIV(K).
+            //
+            kp = pivots[k];
+            if (kp != k) {
+              v = b[k];
+              b[k] = b[kp];
+              b[kp] = v;
+            }
+
+            //
+            // Multiply by inv(L(K)), where L(K) is the transformation
+            // stored in column K of A.
+            //
+            if (k < n) {
+              kp1 = k + 1;
+              v = b[k];
+              for (i_ = kp1; i_ <= n; i_++) {
+                b[i_] = b[i_] - v * a[i_, k];
+              }
+            }
+
+            //
+            // Multiply by the inverse of the diagonal block.
+            //
+            b[k] = b[k] / a[k, k];
+            k = k + 1;
+          } else {
+
+            //
+            // 2 x 2 diagonal block
+            //
+            // Interchange rows K+1 and -IPIV(K).
+            //
+            kp = -pivots[k];
+            if (kp != k + 1) {
+              v = b[k + 1];
+              b[k + 1] = b[kp];
+              b[kp] = v;
+            }
+
+            //
+            // Multiply by inv(L(K)), where L(K) is the transformation
+            // stored in columns K and K+1 of A.
+            //
+            if (k < n - 1) {
+              kp1 = k + 1;
+              kp2 = k + 2;
+              v = b[k];
+              for (i_ = kp2; i_ <= n; i_++) {
+                b[i_] = b[i_] - v * a[i_, k];
+              }
+              v = b[k + 1];
+              for (i_ = kp2; i_ <= n; i_++) {
+                b[i_] = b[i_] - v * a[i_, kp1];
+              }
+            }
+
+            //
+            // Multiply by the inverse of the diagonal block.
+            //
+            akm1k = a[k + 1, k];
+            akm1 = a[k, k] / akm1k;
+            ak = a[k + 1, k + 1] / akm1k;
+            denom = akm1 * ak - 1;
+            bkm1 = b[k] / akm1k;
+            bk = b[k + 1] / akm1k;
+            b[k] = (ak * bkm1 - bk) / denom;
+            b[k + 1] = (akm1 * bk - bkm1) / denom;
+            k = k + 2;
+          }
+        }
+
+        //
+        // Next solve L'*X = B, overwriting B with X.
+        //
+        // K is the main loop index, decreasing from N to 1 in steps of
+        // 1 or 2, depending on the size of the diagonal blocks.
+        //
+        k = n;
+        while (k >= 1) {
+          if (pivots[k] > 0) {
+
+            //
+            // 1 x 1 diagonal block
+            //
+            // Multiply by inv(L'(K)), where L(K) is the transformation
+            // stored in column K of A.
+            //
+            if (k < n) {
+              kp1 = k + 1;
+              v = 0.0;
+              for (i_ = kp1; i_ <= n; i_++) {
+                v += b[i_] * a[i_, k];
+              }
+              b[k] = b[k] - v;
+            }
+
+            //
+            // Interchange rows K and IPIV(K).
+            //
+            kp = pivots[k];
+            if (kp != k) {
+              v = b[k];
+              b[k] = b[kp];
+              b[kp] = v;
+            }
+            k = k - 1;
+          } else {
+
+            //
+            // 2 x 2 diagonal block
+            //
+            // Multiply by inv(L'(K-1)), where L(K-1) is the transformation
+            // stored in columns K-1 and K of A.
+            //
+            if (k < n) {
+              kp1 = k + 1;
+              km1 = k - 1;
+              v = 0.0;
+              for (i_ = kp1; i_ <= n; i_++) {
+                v += b[i_] * a[i_, k];
+              }
+              b[k] = b[k] - v;
+              v = 0.0;
+              for (i_ = kp1; i_ <= n; i_++) {
+                v += b[i_] * a[i_, km1];
+              }
+              b[k - 1] = b[k - 1] - v;
+            }
+
+            //
+            // Interchange rows K and -IPIV(K).
+            //
+            kp = -pivots[k];
+            if (kp != k) {
+              v = b[k];
+              b[k] = b[kp];
+              b[kp] = v;
+            }
+            k = k - 2;
+          }
+        }
+      }
+      x = new double[n + 1];
+      for (i_ = 1; i_ <= n; i_++) {
+        x[i_] = b[i_];
+      }
+      return result;
     }
+
+
+    public static bool solvesymmetricsystem(double[,] a,
+        double[] b,
+        int n,
+        bool isupper,
+        ref double[] x) {
+      bool result = new bool();
+      int[] pivots = new int[0];
+
+      a = (double[,])a.Clone();
+      b = (double[])b.Clone();
+
+      ldlt.ldltdecomposition(ref a, n, isupper, ref pivots);
+      result = solvesystemldlt(ref a, ref pivots, b, n, isupper, ref x);
+      return result;
+    }
+  }
 }
Index: /trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.ALGLIB/2.5.0/ALGLIB-2.5.0/tsort.cs
===================================================================
--- /trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.ALGLIB/2.5.0/ALGLIB-2.5.0/tsort.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.ALGLIB/2.5.0/ALGLIB-2.5.0/tsort.cs	(revision 4068)
@@ -19,620 +19,533 @@
 *************************************************************************/
 
-using System;
-
-namespace alglib
-{
-    public class tsort
-    {
-        public static void tagsort(ref double[] a,
-            int n,
-            ref int[] p1,
-            ref int[] p2)
-        {
-            int i = 0;
-            int[] pv = new int[0];
-            int[] vp = new int[0];
-            int lv = 0;
-            int lp = 0;
-            int rv = 0;
-            int rp = 0;
-
-            
-            //
-            // Special cases
-            //
-            if( n<=0 )
-            {
-                return;
-            }
-            if( n==1 )
-            {
-                p1 = new int[0+1];
-                p2 = new int[0+1];
-                p1[0] = 0;
-                p2[0] = 0;
-                return;
-            }
-            
-            //
-            // General case, N>1: prepare permutations table P1
-            //
-            p1 = new int[n-1+1];
-            for(i=0; i<=n-1; i++)
-            {
-                p1[i] = i;
-            }
-            
-            //
-            // General case, N>1: sort, update P1
-            //
-            tagsortfasti(ref a, ref p1, n);
-            
-            //
-            // General case, N>1: fill permutations table P2
-            //
-            // To fill P2 we maintain two arrays:
-            // * PV, Position(Value). PV[i] contains position of I-th key at the moment
-            // * VP, Value(Position). VP[i] contains key which has position I at the moment
-            //
-            // At each step we making permutation of two items:
-            //   Left, which is given by position/value pair LP/LV
-            //   and Right, which is given by RP/RV
-            // and updating PV[] and VP[] correspondingly.
-            //
-            pv = new int[n-1+1];
-            vp = new int[n-1+1];
-            p2 = new int[n-1+1];
-            for(i=0; i<=n-1; i++)
-            {
-                pv[i] = i;
-                vp[i] = i;
-            }
-            for(i=0; i<=n-1; i++)
-            {
-                
-                //
-                // calculate LP, LV, RP, RV
-                //
-                lp = i;
-                lv = vp[lp];
-                rv = p1[i];
-                rp = pv[rv];
-                
-                //
-                // Fill P2
-                //
-                p2[i] = rp;
-                
-                //
-                // update PV and VP
-                //
-                vp[lp] = rv;
-                vp[rp] = lv;
-                pv[lv] = rp;
-                pv[rv] = lp;
-            }
-        }
-
-
-        public static void tagsortfasti(ref double[] a,
-            ref int[] b,
-            int n)
-        {
-            int i = 0;
-            int k = 0;
-            int t = 0;
-            double tmp = 0;
-            int tmpi = 0;
-
-            
-            //
-            // Special cases
-            //
-            if( n<=1 )
-            {
-                return;
-            }
-            
-            //
-            // General case, N>1: sort, update B
-            //
-            i = 2;
-            do
-            {
-                t = i;
-                while( t!=1 )
-                {
-                    k = t/2;
-                    if( (double)(a[k-1])>=(double)(a[t-1]) )
-                    {
-                        t = 1;
-                    }
-                    else
-                    {
-                        tmp = a[k-1];
-                        a[k-1] = a[t-1];
-                        a[t-1] = tmp;
-                        tmpi = b[k-1];
-                        b[k-1] = b[t-1];
-                        b[t-1] = tmpi;
-                        t = k;
-                    }
-                }
-                i = i+1;
-            }
-            while( i<=n );
-            i = n-1;
-            do
-            {
-                tmp = a[i];
-                a[i] = a[0];
-                a[0] = tmp;
-                tmpi = b[i];
-                b[i] = b[0];
-                b[0] = tmpi;
-                t = 1;
-                while( t!=0 )
-                {
-                    k = 2*t;
-                    if( k>i )
-                    {
-                        t = 0;
-                    }
-                    else
-                    {
-                        if( k<i )
-                        {
-                            if( (double)(a[k])>(double)(a[k-1]) )
-                            {
-                                k = k+1;
-                            }
-                        }
-                        if( (double)(a[t-1])>=(double)(a[k-1]) )
-                        {
-                            t = 0;
-                        }
-                        else
-                        {
-                            tmp = a[k-1];
-                            a[k-1] = a[t-1];
-                            a[t-1] = tmp;
-                            tmpi = b[k-1];
-                            b[k-1] = b[t-1];
-                            b[t-1] = tmpi;
-                            t = k;
-                        }
-                    }
-                }
-                i = i-1;
-            }
-            while( i>=1 );
-        }
-
-
-        public static void tagsortfastr(ref double[] a,
-            ref double[] b,
-            int n)
-        {
-            int i = 0;
-            int k = 0;
-            int t = 0;
-            double tmp = 0;
-            double tmpr = 0;
-
-            
-            //
-            // Special cases
-            //
-            if( n<=1 )
-            {
-                return;
-            }
-            
-            //
-            // General case, N>1: sort, update B
-            //
-            i = 2;
-            do
-            {
-                t = i;
-                while( t!=1 )
-                {
-                    k = t/2;
-                    if( (double)(a[k-1])>=(double)(a[t-1]) )
-                    {
-                        t = 1;
-                    }
-                    else
-                    {
-                        tmp = a[k-1];
-                        a[k-1] = a[t-1];
-                        a[t-1] = tmp;
-                        tmpr = b[k-1];
-                        b[k-1] = b[t-1];
-                        b[t-1] = tmpr;
-                        t = k;
-                    }
-                }
-                i = i+1;
-            }
-            while( i<=n );
-            i = n-1;
-            do
-            {
-                tmp = a[i];
-                a[i] = a[0];
-                a[0] = tmp;
-                tmpr = b[i];
-                b[i] = b[0];
-                b[0] = tmpr;
-                t = 1;
-                while( t!=0 )
-                {
-                    k = 2*t;
-                    if( k>i )
-                    {
-                        t = 0;
-                    }
-                    else
-                    {
-                        if( k<i )
-                        {
-                            if( (double)(a[k])>(double)(a[k-1]) )
-                            {
-                                k = k+1;
-                            }
-                        }
-                        if( (double)(a[t-1])>=(double)(a[k-1]) )
-                        {
-                            t = 0;
-                        }
-                        else
-                        {
-                            tmp = a[k-1];
-                            a[k-1] = a[t-1];
-                            a[t-1] = tmp;
-                            tmpr = b[k-1];
-                            b[k-1] = b[t-1];
-                            b[t-1] = tmpr;
-                            t = k;
-                        }
-                    }
-                }
-                i = i-1;
-            }
-            while( i>=1 );
-        }
-
-
-        public static void tagsortfast(ref double[] a,
-            int n)
-        {
-            int i = 0;
-            int k = 0;
-            int t = 0;
-            double tmp = 0;
-
-            
-            //
-            // Special cases
-            //
-            if( n<=1 )
-            {
-                return;
-            }
-            
-            //
-            // General case, N>1: sort, update B
-            //
-            i = 2;
-            do
-            {
-                t = i;
-                while( t!=1 )
-                {
-                    k = t/2;
-                    if( (double)(a[k-1])>=(double)(a[t-1]) )
-                    {
-                        t = 1;
-                    }
-                    else
-                    {
-                        tmp = a[k-1];
-                        a[k-1] = a[t-1];
-                        a[t-1] = tmp;
-                        t = k;
-                    }
-                }
-                i = i+1;
-            }
-            while( i<=n );
-            i = n-1;
-            do
-            {
-                tmp = a[i];
-                a[i] = a[0];
-                a[0] = tmp;
-                t = 1;
-                while( t!=0 )
-                {
-                    k = 2*t;
-                    if( k>i )
-                    {
-                        t = 0;
-                    }
-                    else
-                    {
-                        if( k<i )
-                        {
-                            if( (double)(a[k])>(double)(a[k-1]) )
-                            {
-                                k = k+1;
-                            }
-                        }
-                        if( (double)(a[t-1])>=(double)(a[k-1]) )
-                        {
-                            t = 0;
-                        }
-                        else
-                        {
-                            tmp = a[k-1];
-                            a[k-1] = a[t-1];
-                            a[t-1] = tmp;
-                            t = k;
-                        }
-                    }
-                }
-                i = i-1;
-            }
-            while( i>=1 );
-        }
-
-
-        /*************************************************************************
-        Heap operations: adds element to the heap
-
-        PARAMETERS:
-            A       -   heap itself, must be at least array[0..N]
-            B       -   array of integer tags, which are updated according to
-                        permutations in the heap
-            N       -   size of the heap (without new element).
-                        updated on output
-            VA      -   value of the element being added
-            VB      -   value of the tag
-
-          -- ALGLIB --
-             Copyright 28.02.2010 by Bochkanov Sergey
-        *************************************************************************/
-        public static void tagheappushi(ref double[] a,
-            ref int[] b,
-            ref int n,
-            double va,
-            int vb)
-        {
-            int j = 0;
-            int k = 0;
-            double v = 0;
-
-            if( n<0 )
-            {
-                return;
-            }
-            
-            //
-            // N=0 is a special case
-            //
-            if( n==0 )
-            {
-                a[0] = va;
-                b[0] = vb;
-                n = n+1;
-                return;
-            }
-            
-            //
-            // add current point to the heap
-            // (add to the bottom, then move up)
-            //
-            // we don't write point to the heap
-            // until its final position is determined
-            // (it allow us to reduce number of array access operations)
-            //
-            j = n;
-            n = n+1;
-            while( j>0 )
-            {
-                k = (j-1)/2;
-                v = a[k];
-                if( (double)(v)<(double)(va) )
-                {
-                    
-                    //
-                    // swap with higher element
-                    //
-                    a[j] = v;
-                    b[j] = b[k];
-                    j = k;
-                }
-                else
-                {
-                    
-                    //
-                    // element in its place. terminate.
-                    //
-                    break;
-                }
-            }
-            a[j] = va;
-            b[j] = vb;
-        }
-
-
-        /*************************************************************************
-        Heap operations: replaces top element with new element
-        (which is moved down)
-
-        PARAMETERS:
-            A       -   heap itself, must be at least array[0..N-1]
-            B       -   array of integer tags, which are updated according to
-                        permutations in the heap
-            N       -   size of the heap
-            VA      -   value of the element which replaces top element
-            VB      -   value of the tag
-
-          -- ALGLIB --
-             Copyright 28.02.2010 by Bochkanov Sergey
-        *************************************************************************/
-        public static void tagheapreplacetopi(ref double[] a,
-            ref int[] b,
-            int n,
-            double va,
-            int vb)
-        {
-            int j = 0;
-            int k1 = 0;
-            int k2 = 0;
-            double v = 0;
-            double v1 = 0;
-            double v2 = 0;
-
-            if( n<1 )
-            {
-                return;
-            }
-            
-            //
-            // N=1 is a special case
-            //
-            if( n==1 )
-            {
-                a[0] = va;
-                b[0] = vb;
-                return;
-            }
-            
-            //
-            // move down through heap:
-            // * J  -   current element
-            // * K1 -   first child (always exists)
-            // * K2 -   second child (may not exists)
-            //
-            // we don't write point to the heap
-            // until its final position is determined
-            // (it allow us to reduce number of array access operations)
-            //
-            j = 0;
-            k1 = 1;
-            k2 = 2;
-            while( k1<n )
-            {
-                if( k2>=n )
-                {
-                    
-                    //
-                    // only one child.
-                    //
-                    // swap and terminate (because this child
-                    // have no siblings due to heap structure)
-                    //
-                    v = a[k1];
-                    if( (double)(v)>(double)(va) )
-                    {
-                        a[j] = v;
-                        b[j] = b[k1];
-                        j = k1;
-                    }
-                    break;
-                }
-                else
-                {
-                    
-                    //
-                    // two childs
-                    //
-                    v1 = a[k1];
-                    v2 = a[k2];
-                    if( (double)(v1)>(double)(v2) )
-                    {
-                        if( (double)(va)<(double)(v1) )
-                        {
-                            a[j] = v1;
-                            b[j] = b[k1];
-                            j = k1;
-                        }
-                        else
-                        {
-                            break;
-                        }
-                    }
-                    else
-                    {
-                        if( (double)(va)<(double)(v2) )
-                        {
-                            a[j] = v2;
-                            b[j] = b[k2];
-                            j = k2;
-                        }
-                        else
-                        {
-                            break;
-                        }
-                    }
-                    k1 = 2*j+1;
-                    k2 = 2*j+2;
-                }
-            }
-            a[j] = va;
-            b[j] = vb;
-        }
-
-
-        /*************************************************************************
-        Heap operations: pops top element from the heap
-
-        PARAMETERS:
-            A       -   heap itself, must be at least array[0..N-1]
-            B       -   array of integer tags, which are updated according to
-                        permutations in the heap
-            N       -   size of the heap, N>=1
-
-        On output top element is moved to A[N-1], B[N-1], heap is reordered, N is
-        decreased by 1.
-
-          -- ALGLIB --
-             Copyright 28.02.2010 by Bochkanov Sergey
-        *************************************************************************/
-        public static void tagheappopi(ref double[] a,
-            ref int[] b,
-            ref int n)
-        {
-            double va = 0;
-            int vb = 0;
-
-            if( n<1 )
-            {
-                return;
-            }
-            
-            //
-            // N=1 is a special case
-            //
-            if( n==1 )
-            {
-                n = 0;
-                return;
-            }
-            
-            //
-            // swap top element and last element,
-            // then reorder heap
-            //
-            va = a[n-1];
-            vb = b[n-1];
-            a[n-1] = a[0];
-            b[n-1] = b[0];
-            n = n-1;
-            tagheapreplacetopi(ref a, ref b, n, va, vb);
-        }
-    }
+
+namespace alglib {
+  public class tsort {
+    public static void tagsort(ref double[] a,
+        int n,
+        ref int[] p1,
+        ref int[] p2) {
+      int i = 0;
+      int[] pv = new int[0];
+      int[] vp = new int[0];
+      int lv = 0;
+      int lp = 0;
+      int rv = 0;
+      int rp = 0;
+
+
+      //
+      // Special cases
+      //
+      if (n <= 0) {
+        return;
+      }
+      if (n == 1) {
+        p1 = new int[0 + 1];
+        p2 = new int[0 + 1];
+        p1[0] = 0;
+        p2[0] = 0;
+        return;
+      }
+
+      //
+      // General case, N>1: prepare permutations table P1
+      //
+      p1 = new int[n - 1 + 1];
+      for (i = 0; i <= n - 1; i++) {
+        p1[i] = i;
+      }
+
+      //
+      // General case, N>1: sort, update P1
+      //
+      tagsortfasti(ref a, ref p1, n);
+
+      //
+      // General case, N>1: fill permutations table P2
+      //
+      // To fill P2 we maintain two arrays:
+      // * PV, Position(Value). PV[i] contains position of I-th key at the moment
+      // * VP, Value(Position). VP[i] contains key which has position I at the moment
+      //
+      // At each step we making permutation of two items:
+      //   Left, which is given by position/value pair LP/LV
+      //   and Right, which is given by RP/RV
+      // and updating PV[] and VP[] correspondingly.
+      //
+      pv = new int[n - 1 + 1];
+      vp = new int[n - 1 + 1];
+      p2 = new int[n - 1 + 1];
+      for (i = 0; i <= n - 1; i++) {
+        pv[i] = i;
+        vp[i] = i;
+      }
+      for (i = 0; i <= n - 1; i++) {
+
+        //
+        // calculate LP, LV, RP, RV
+        //
+        lp = i;
+        lv = vp[lp];
+        rv = p1[i];
+        rp = pv[rv];
+
+        //
+        // Fill P2
+        //
+        p2[i] = rp;
+
+        //
+        // update PV and VP
+        //
+        vp[lp] = rv;
+        vp[rp] = lv;
+        pv[lv] = rp;
+        pv[rv] = lp;
+      }
+    }
+
+
+    public static void tagsortfasti(ref double[] a,
+        ref int[] b,
+        int n) {
+      int i = 0;
+      int k = 0;
+      int t = 0;
+      double tmp = 0;
+      int tmpi = 0;
+
+
+      //
+      // Special cases
+      //
+      if (n <= 1) {
+        return;
+      }
+
+      //
+      // General case, N>1: sort, update B
+      //
+      i = 2;
+      do {
+        t = i;
+        while (t != 1) {
+          k = t / 2;
+          if ((double)(a[k - 1]) >= (double)(a[t - 1])) {
+            t = 1;
+          } else {
+            tmp = a[k - 1];
+            a[k - 1] = a[t - 1];
+            a[t - 1] = tmp;
+            tmpi = b[k - 1];
+            b[k - 1] = b[t - 1];
+            b[t - 1] = tmpi;
+            t = k;
+          }
+        }
+        i = i + 1;
+      }
+      while (i <= n);
+      i = n - 1;
+      do {
+        tmp = a[i];
+        a[i] = a[0];
+        a[0] = tmp;
+        tmpi = b[i];
+        b[i] = b[0];
+        b[0] = tmpi;
+        t = 1;
+        while (t != 0) {
+          k = 2 * t;
+          if (k > i) {
+            t = 0;
+          } else {
+            if (k < i) {
+              if ((double)(a[k]) > (double)(a[k - 1])) {
+                k = k + 1;
+              }
+            }
+            if ((double)(a[t - 1]) >= (double)(a[k - 1])) {
+              t = 0;
+            } else {
+              tmp = a[k - 1];
+              a[k - 1] = a[t - 1];
+              a[t - 1] = tmp;
+              tmpi = b[k - 1];
+              b[k - 1] = b[t - 1];
+              b[t - 1] = tmpi;
+              t = k;
+            }
+          }
+        }
+        i = i - 1;
+      }
+      while (i >= 1);
+    }
+
+
+    public static void tagsortfastr(ref double[] a,
+        ref double[] b,
+        int n) {
+      int i = 0;
+      int k = 0;
+      int t = 0;
+      double tmp = 0;
+      double tmpr = 0;
+
+
+      //
+      // Special cases
+      //
+      if (n <= 1) {
+        return;
+      }
+
+      //
+      // General case, N>1: sort, update B
+      //
+      i = 2;
+      do {
+        t = i;
+        while (t != 1) {
+          k = t / 2;
+          if ((double)(a[k - 1]) >= (double)(a[t - 1])) {
+            t = 1;
+          } else {
+            tmp = a[k - 1];
+            a[k - 1] = a[t - 1];
+            a[t - 1] = tmp;
+            tmpr = b[k - 1];
+            b[k - 1] = b[t - 1];
+            b[t - 1] = tmpr;
+            t = k;
+          }
+        }
+        i = i + 1;
+      }
+      while (i <= n);
+      i = n - 1;
+      do {
+        tmp = a[i];
+        a[i] = a[0];
+        a[0] = tmp;
+        tmpr = b[i];
+        b[i] = b[0];
+        b[0] = tmpr;
+        t = 1;
+        while (t != 0) {
+          k = 2 * t;
+          if (k > i) {
+            t = 0;
+          } else {
+            if (k < i) {
+              if ((double)(a[k]) > (double)(a[k - 1])) {
+                k = k + 1;
+              }
+            }
+            if ((double)(a[t - 1]) >= (double)(a[k - 1])) {
+              t = 0;
+            } else {
+              tmp = a[k - 1];
+              a[k - 1] = a[t - 1];
+              a[t - 1] = tmp;
+              tmpr = b[k - 1];
+              b[k - 1] = b[t - 1];
+              b[t - 1] = tmpr;
+              t = k;
+            }
+          }
+        }
+        i = i - 1;
+      }
+      while (i >= 1);
+    }
+
+
+    public static void tagsortfast(ref double[] a,
+        int n) {
+      int i = 0;
+      int k = 0;
+      int t = 0;
+      double tmp = 0;
+
+
+      //
+      // Special cases
+      //
+      if (n <= 1) {
+        return;
+      }
+
+      //
+      // General case, N>1: sort, update B
+      //
+      i = 2;
+      do {
+        t = i;
+        while (t != 1) {
+          k = t / 2;
+          if ((double)(a[k - 1]) >= (double)(a[t - 1])) {
+            t = 1;
+          } else {
+            tmp = a[k - 1];
+            a[k - 1] = a[t - 1];
+            a[t - 1] = tmp;
+            t = k;
+          }
+        }
+        i = i + 1;
+      }
+      while (i <= n);
+      i = n - 1;
+      do {
+        tmp = a[i];
+        a[i] = a[0];
+        a[0] = tmp;
+        t = 1;
+        while (t != 0) {
+          k = 2 * t;
+          if (k > i) {
+            t = 0;
+          } else {
+            if (k < i) {
+              if ((double)(a[k]) > (double)(a[k - 1])) {
+                k = k + 1;
+              }
+            }
+            if ((double)(a[t - 1]) >= (double)(a[k - 1])) {
+              t = 0;
+            } else {
+              tmp = a[k - 1];
+              a[k - 1] = a[t - 1];
+              a[t - 1] = tmp;
+              t = k;
+            }
+          }
+        }
+        i = i - 1;
+      }
+      while (i >= 1);
+    }
+
+
+    /*************************************************************************
+    Heap operations: adds element to the heap
+
+    PARAMETERS:
+        A       -   heap itself, must be at least array[0..N]
+        B       -   array of integer tags, which are updated according to
+                    permutations in the heap
+        N       -   size of the heap (without new element).
+                    updated on output
+        VA      -   value of the element being added
+        VB      -   value of the tag
+
+      -- ALGLIB --
+         Copyright 28.02.2010 by Bochkanov Sergey
+    *************************************************************************/
+    public static void tagheappushi(ref double[] a,
+        ref int[] b,
+        ref int n,
+        double va,
+        int vb) {
+      int j = 0;
+      int k = 0;
+      double v = 0;
+
+      if (n < 0) {
+        return;
+      }
+
+      //
+      // N=0 is a special case
+      //
+      if (n == 0) {
+        a[0] = va;
+        b[0] = vb;
+        n = n + 1;
+        return;
+      }
+
+      //
+      // add current point to the heap
+      // (add to the bottom, then move up)
+      //
+      // we don't write point to the heap
+      // until its final position is determined
+      // (it allow us to reduce number of array access operations)
+      //
+      j = n;
+      n = n + 1;
+      while (j > 0) {
+        k = (j - 1) / 2;
+        v = a[k];
+        if ((double)(v) < (double)(va)) {
+
+          //
+          // swap with higher element
+          //
+          a[j] = v;
+          b[j] = b[k];
+          j = k;
+        } else {
+
+          //
+          // element in its place. terminate.
+          //
+          break;
+        }
+      }
+      a[j] = va;
+      b[j] = vb;
+    }
+
+
+    /*************************************************************************
+    Heap operations: replaces top element with new element
+    (which is moved down)
+
+    PARAMETERS:
+        A       -   heap itself, must be at least array[0..N-1]
+        B       -   array of integer tags, which are updated according to
+                    permutations in the heap
+        N       -   size of the heap
+        VA      -   value of the element which replaces top element
+        VB      -   value of the tag
+
+      -- ALGLIB --
+         Copyright 28.02.2010 by Bochkanov Sergey
+    *************************************************************************/
+    public static void tagheapreplacetopi(ref double[] a,
+        ref int[] b,
+        int n,
+        double va,
+        int vb) {
+      int j = 0;
+      int k1 = 0;
+      int k2 = 0;
+      double v = 0;
+      double v1 = 0;
+      double v2 = 0;
+
+      if (n < 1) {
+        return;
+      }
+
+      //
+      // N=1 is a special case
+      //
+      if (n == 1) {
+        a[0] = va;
+        b[0] = vb;
+        return;
+      }
+
+      //
+      // move down through heap:
+      // * J  -   current element
+      // * K1 -   first child (always exists)
+      // * K2 -   second child (may not exists)
+      //
+      // we don't write point to the heap
+      // until its final position is determined
+      // (it allow us to reduce number of array access operations)
+      //
+      j = 0;
+      k1 = 1;
+      k2 = 2;
+      while (k1 < n) {
+        if (k2 >= n) {
+
+          //
+          // only one child.
+          //
+          // swap and terminate (because this child
+          // have no siblings due to heap structure)
+          //
+          v = a[k1];
+          if ((double)(v) > (double)(va)) {
+            a[j] = v;
+            b[j] = b[k1];
+            j = k1;
+          }
+          break;
+        } else {
+
+          //
+          // two childs
+          //
+          v1 = a[k1];
+          v2 = a[k2];
+          if ((double)(v1) > (double)(v2)) {
+            if ((double)(va) < (double)(v1)) {
+              a[j] = v1;
+              b[j] = b[k1];
+              j = k1;
+            } else {
+              break;
+            }
+          } else {
+            if ((double)(va) < (double)(v2)) {
+              a[j] = v2;
+              b[j] = b[k2];
+              j = k2;
+            } else {
+              break;
+            }
+          }
+          k1 = 2 * j + 1;
+          k2 = 2 * j + 2;
+        }
+      }
+      a[j] = va;
+      b[j] = vb;
+    }
+
+
+    /*************************************************************************
+    Heap operations: pops top element from the heap
+
+    PARAMETERS:
+        A       -   heap itself, must be at least array[0..N-1]
+        B       -   array of integer tags, which are updated according to
+                    permutations in the heap
+        N       -   size of the heap, N>=1
+
+    On output top element is moved to A[N-1], B[N-1], heap is reordered, N is
+    decreased by 1.
+
+      -- ALGLIB --
+         Copyright 28.02.2010 by Bochkanov Sergey
+    *************************************************************************/
+    public static void tagheappopi(ref double[] a,
+        ref int[] b,
+        ref int n) {
+      double va = 0;
+      int vb = 0;
+
+      if (n < 1) {
+        return;
+      }
+
+      //
+      // N=1 is a special case
+      //
+      if (n == 1) {
+        n = 0;
+        return;
+      }
+
+      //
+      // swap top element and last element,
+      // then reorder heap
+      //
+      va = a[n - 1];
+      vb = b[n - 1];
+      a[n - 1] = a[0];
+      b[n - 1] = b[0];
+      n = n - 1;
+      tagheapreplacetopi(ref a, ref b, n, va, vb);
+    }
+  }
 }
Index: /trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.LibSVM/1.6.3/LibSVM-1.6.3/GaussianTransform.cs
===================================================================
--- /trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.LibSVM/1.6.3/LibSVM-1.6.3/GaussianTransform.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.LibSVM/1.6.3/LibSVM-1.6.3/GaussianTransform.cs	(revision 4068)
@@ -19,191 +19,167 @@
 
 using System;
-using System.Collections.Generic;
+using System.Globalization;
 using System.IO;
-using System.Globalization;
-using System.Threading;
 
-namespace SVM
-{
+namespace SVM {
+  /// <summary>
+  /// A transform which learns the mean and variance of a sample set and uses these to transform new data
+  /// so that it has zero mean and unit variance.
+  /// </summary>
+  public class GaussianTransform : IRangeTransform {
+    private double[] _means;
+    private double[] _stddevs;
+
     /// <summary>
-    /// A transform which learns the mean and variance of a sample set and uses these to transform new data
-    /// so that it has zero mean and unit variance.
+    /// Determines the Gaussian transform for the provided problem.
     /// </summary>
-    public class GaussianTransform : IRangeTransform
-    {
-        private double[] _means;
-        private double[] _stddevs;
+    /// <param name="prob">The Problem to analyze</param>
+    /// <returns>The Gaussian transform for the problem</returns>
+    public static GaussianTransform Compute(Problem prob) {
+      int[] counts = new int[prob.MaxIndex];
+      double[] means = new double[prob.MaxIndex];
+      foreach (Node[] sample in prob.X) {
+        for (int i = 0; i < sample.Length; i++) {
+          means[sample[i].Index - 1] += sample[i].Value;
+          counts[sample[i].Index - 1]++;
+        }
+      }
+      for (int i = 0; i < prob.MaxIndex; i++) {
+        if (counts[i] == 0)
+          counts[i] = 2;
+        means[i] /= counts[i];
+      }
 
-        /// <summary>
-        /// Determines the Gaussian transform for the provided problem.
-        /// </summary>
-        /// <param name="prob">The Problem to analyze</param>
-        /// <returns>The Gaussian transform for the problem</returns>
-        public static GaussianTransform Compute(Problem prob)
-        {
-            int[] counts = new int[prob.MaxIndex];
-            double[] means = new double[prob.MaxIndex];
-            foreach (Node[] sample in prob.X)
-            {
-                for (int i = 0; i < sample.Length; i++)
-                {
-                    means[sample[i].Index-1] += sample[i].Value;
-                    counts[sample[i].Index-1]++;
-                }
-            }
-            for (int i = 0; i < prob.MaxIndex; i++)
-            {
-                if (counts[i] == 0)
-                    counts[i] = 2;
-                means[i] /= counts[i];
-            }
+      double[] stddevs = new double[prob.MaxIndex];
+      foreach (Node[] sample in prob.X) {
+        for (int i = 0; i < sample.Length; i++) {
+          double diff = sample[i].Value - means[sample[i].Index - 1];
+          stddevs[sample[i].Index - 1] += diff * diff;
+        }
+      }
+      for (int i = 0; i < prob.MaxIndex; i++) {
+        if (stddevs[i] == 0)
+          continue;
+        stddevs[i] /= (counts[i] - 1);
+        stddevs[i] = Math.Sqrt(stddevs[i]);
+      }
 
-            double[] stddevs = new double[prob.MaxIndex];
-            foreach (Node[] sample in prob.X)
-            {
-                for (int i = 0; i < sample.Length; i++)
-                {
-                    double diff = sample[i].Value - means[sample[i].Index - 1];
-                    stddevs[sample[i].Index - 1] += diff * diff;
-                }
-            }
-            for (int i = 0; i < prob.MaxIndex; i++)
-            {
-                if (stddevs[i] == 0)
-                    continue;
-                stddevs[i] /= (counts[i] - 1);
-                stddevs[i] = Math.Sqrt(stddevs[i]);
-            }
+      return new GaussianTransform(means, stddevs);
+    }
 
-            return new GaussianTransform(means, stddevs);
-        }
+    /// <summary>
+    /// Constructor.
+    /// </summary>
+    /// <param name="means">Means in each dimension</param>
+    /// <param name="stddevs">Standard deviation in each dimension</param>
+    public GaussianTransform(double[] means, double[] stddevs) {
+      _means = means;
+      _stddevs = stddevs;
+    }
 
-        /// <summary>
-        /// Constructor.
-        /// </summary>
-        /// <param name="means">Means in each dimension</param>
-        /// <param name="stddevs">Standard deviation in each dimension</param>
-        public GaussianTransform(double[] means, double[] stddevs)
-        {
-            _means = means;
-            _stddevs = stddevs;
-        }
+    /// <summary>
+    /// Saves the transform to the disk.  The samples are not stored, only the 
+    /// statistics.
+    /// </summary>
+    /// <param name="stream">The destination stream</param>
+    /// <param name="transform">The transform</param>
+    public static void Write(Stream stream, GaussianTransform transform) {
+      TemporaryCulture.Start();
 
-        /// <summary>
-        /// Saves the transform to the disk.  The samples are not stored, only the 
-        /// statistics.
-        /// </summary>
-        /// <param name="stream">The destination stream</param>
-        /// <param name="transform">The transform</param>
-        public static void Write(Stream stream, GaussianTransform transform)
-        {
-            TemporaryCulture.Start();
+      StreamWriter output = new StreamWriter(stream);
+      output.WriteLine(transform._means.Length);
+      for (int i = 0; i < transform._means.Length; i++)
+        output.WriteLine("{0} {1}", transform._means[i], transform._stddevs[i]);
+      output.Flush();
 
-            StreamWriter output = new StreamWriter(stream);
-            output.WriteLine(transform._means.Length);
-            for (int i = 0; i < transform._means.Length; i++)
-                output.WriteLine("{0} {1}", transform._means[i], transform._stddevs[i]);
-            output.Flush();
+      TemporaryCulture.Stop();
+    }
 
-            TemporaryCulture.Stop();
-        }
+    /// <summary>
+    /// Reads a GaussianTransform from the provided stream.
+    /// </summary>
+    /// <param name="stream">The source stream</param>
+    /// <returns>The transform</returns>
+    public static GaussianTransform Read(Stream stream) {
+      TemporaryCulture.Start();
 
-        /// <summary>
-        /// Reads a GaussianTransform from the provided stream.
-        /// </summary>
-        /// <param name="stream">The source stream</param>
-        /// <returns>The transform</returns>
-        public static GaussianTransform Read(Stream stream)
-        {
-            TemporaryCulture.Start();
+      StreamReader input = new StreamReader(stream);
+      int length = int.Parse(input.ReadLine(), CultureInfo.InvariantCulture);
+      double[] means = new double[length];
+      double[] stddevs = new double[length];
+      for (int i = 0; i < length; i++) {
+        string[] parts = input.ReadLine().Split();
+        means[i] = double.Parse(parts[0], CultureInfo.InvariantCulture);
+        stddevs[i] = double.Parse(parts[1], CultureInfo.InvariantCulture);
+      }
 
-            StreamReader input = new StreamReader(stream);
-            int length = int.Parse(input.ReadLine(), CultureInfo.InvariantCulture);
-            double[] means = new double[length];
-            double[] stddevs = new double[length];
-            for (int i = 0; i < length; i++)
-            {
-                string[] parts = input.ReadLine().Split();
-                means[i] = double.Parse(parts[0], CultureInfo.InvariantCulture);
-                stddevs[i] = double.Parse(parts[1], CultureInfo.InvariantCulture);
-            }
+      TemporaryCulture.Stop();
 
-            TemporaryCulture.Stop();
+      return new GaussianTransform(means, stddevs);
+    }
 
-            return new GaussianTransform(means, stddevs);
-        }
+    /// <summary>
+    /// Saves the transform to the disk.  The samples are not stored, only the 
+    /// statistics.
+    /// </summary>
+    /// <param name="filename">The destination filename</param>
+    /// <param name="transform">The transform</param>
+    public static void Write(string filename, GaussianTransform transform) {
+      FileStream output = File.Open(filename, FileMode.Create);
+      try {
+        Write(output, transform);
+      }
+      finally {
+        output.Close();
+      }
+    }
 
-        /// <summary>
-        /// Saves the transform to the disk.  The samples are not stored, only the 
-        /// statistics.
-        /// </summary>
-        /// <param name="filename">The destination filename</param>
-        /// <param name="transform">The transform</param>
-        public static void Write(string filename, GaussianTransform transform)
-        {
-            FileStream output = File.Open(filename, FileMode.Create);
-            try
-            {
-                Write(output, transform);
-            }
-            finally
-            {
-                output.Close();
-            }
-        }
+    /// <summary>
+    /// Reads a GaussianTransform from the provided stream.
+    /// </summary>
+    /// <param name="filename">The source filename</param>
+    /// <returns>The transform</returns>
+    public static GaussianTransform Read(string filename) {
+      FileStream input = File.Open(filename, FileMode.Open);
+      try {
+        return Read(input);
+      }
+      finally {
+        input.Close();
+      }
+    }
 
-        /// <summary>
-        /// Reads a GaussianTransform from the provided stream.
-        /// </summary>
-        /// <param name="filename">The source filename</param>
-        /// <returns>The transform</returns>
-        public static GaussianTransform Read(string filename)
-        {
-            FileStream input = File.Open(filename, FileMode.Open);
-            try
-            {
-                return Read(input);
-            }
-            finally
-            {
-                input.Close();
-            }
-        }
+    #region IRangeTransform Members
 
-        #region IRangeTransform Members
+    /// <summary>
+    /// Transform the input value using the transform stored for the provided index.
+    /// </summary>
+    /// <param name="input">Input value</param>
+    /// <param name="index">Index of the transform to use</param>
+    /// <returns>The transformed value</returns>
+    public double Transform(double input, int index) {
+      index--;
+      if (_stddevs[index] == 0)
+        return 0;
+      double diff = input - _means[index];
+      diff /= _stddevs[index];
+      return diff;
+    }
+    /// <summary>
+    /// Transforms the input array.
+    /// </summary>
+    /// <param name="input">The array to transform</param>
+    /// <returns>The transformed array</returns>
+    public Node[] Transform(Node[] input) {
+      Node[] output = new Node[input.Length];
+      for (int i = 0; i < output.Length; i++) {
+        int index = input[i].Index;
+        double value = input[i].Value;
+        output[i] = new Node(index, Transform(value, index));
+      }
+      return output;
+    }
 
-        /// <summary>
-        /// Transform the input value using the transform stored for the provided index.
-        /// </summary>
-        /// <param name="input">Input value</param>
-        /// <param name="index">Index of the transform to use</param>
-        /// <returns>The transformed value</returns>
-        public double Transform(double input, int index)
-        {
-            index--;
-            if (_stddevs[index] == 0)
-                return 0;
-            double diff = input - _means[index];
-            diff /= _stddevs[index];
-            return diff;
-        }
-        /// <summary>
-        /// Transforms the input array.
-        /// </summary>
-        /// <param name="input">The array to transform</param>
-        /// <returns>The transformed array</returns>
-        public Node[] Transform(Node[] input)
-        {
-            Node[] output = new Node[input.Length];
-            for (int i = 0; i < output.Length; i++)
-            {
-                int index = input[i].Index;
-                double value = input[i].Value;
-                output[i] = new Node(index, Transform(value, index));
-            }
-            return output;
-        }
-
-        #endregion
-    }
+    #endregion
+  }
 }
Index: /trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.LibSVM/1.6.3/LibSVM-1.6.3/Kernel.cs
===================================================================
--- /trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.LibSVM/1.6.3/LibSVM-1.6.3/Kernel.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.LibSVM/1.6.3/LibSVM-1.6.3/Kernel.cs	(revision 4068)
@@ -1,226 +1,182 @@
 ﻿using System;
-using System.Collections.Generic;
-using System.Linq;
-using System.Text;
 
-namespace SVM
-{
-    internal interface IQMatrix
-    {
-        float[] GetQ(int column, int len);
-        float[] GetQD();
-        void SwapIndex(int i, int j);
+namespace SVM {
+  internal interface IQMatrix {
+    float[] GetQ(int column, int len);
+    float[] GetQD();
+    void SwapIndex(int i, int j);
+  }
+
+  internal abstract class Kernel : IQMatrix {
+    private Node[][] _x;
+    private double[] _xSquare;
+
+    private KernelType _kernelType;
+    private int _degree;
+    private double _gamma;
+    private double _coef0;
+
+    public abstract float[] GetQ(int column, int len);
+    public abstract float[] GetQD();
+
+    public virtual void SwapIndex(int i, int j) {
+      _x.SwapIndex(i, j);
+
+      if (_xSquare != null) {
+        _xSquare.SwapIndex(i, j);
+      }
     }
 
-    internal abstract class Kernel : IQMatrix
-    {
-        private Node[][] _x;
-        private double[] _xSquare;
+    private static double powi(double value, int times) {
+      double tmp = value, ret = 1.0;
 
-        private KernelType _kernelType;
-        private int _degree;
-        private double _gamma;
-        private double _coef0;
+      for (int t = times; t > 0; t /= 2) {
+        if (t % 2 == 1) ret *= tmp;
+        tmp = tmp * tmp;
+      }
+      return ret;
+    }
 
-        public abstract float[] GetQ(int column, int len);
-        public abstract float[] GetQD();
+    public double KernelFunction(int i, int j) {
+      switch (_kernelType) {
+        case KernelType.LINEAR:
+          return dot(_x[i], _x[j]);
+        case KernelType.POLY:
+          return powi(_gamma * dot(_x[i], _x[j]) + _coef0, _degree);
+        case KernelType.RBF:
+          return Math.Exp(-_gamma * (_xSquare[i] + _xSquare[j] - 2 * dot(_x[i], _x[j])));
+        case KernelType.SIGMOID:
+          return Math.Tanh(_gamma * dot(_x[i], _x[j]) + _coef0);
+        case KernelType.PRECOMPUTED:
+          return _x[i][(int)(_x[j][0].Value)].Value;
+        default:
+          return 0;
+      }
+    }
 
-        public virtual void SwapIndex(int i, int j)
-        {
-            _x.SwapIndex(i, j);
+    public Kernel(int l, Node[][] x_, Parameter param) {
+      _kernelType = param.KernelType;
+      _degree = param.Degree;
+      _gamma = param.Gamma;
+      _coef0 = param.Coefficient0;
 
-            if (_xSquare != null)
-            {
-                _xSquare.SwapIndex(i, j);
-            }
+      _x = (Node[][])x_.Clone();
+
+      if (_kernelType == KernelType.RBF) {
+        _xSquare = new double[l];
+        for (int i = 0; i < l; i++)
+          _xSquare[i] = dot(_x[i], _x[i]);
+      } else _xSquare = null;
+    }
+
+    private static double dot(Node[] xNodes, Node[] yNodes) {
+      double sum = 0;
+      int xlen = xNodes.Length;
+      int ylen = yNodes.Length;
+      int i = 0;
+      int j = 0;
+      Node x = xNodes[0];
+      Node y = yNodes[0];
+      while (true) {
+        if (x._index == y._index) {
+          sum += x._value * y._value;
+          i++;
+          j++;
+          if (i < xlen && j < ylen) {
+            x = xNodes[i];
+            y = yNodes[j];
+          } else if (i < xlen) {
+            x = xNodes[i];
+            break;
+          } else if (j < ylen) {
+            y = yNodes[j];
+            break;
+          } else break;
+        } else {
+          if (x._index > y._index) {
+            ++j;
+            if (j < ylen)
+              y = yNodes[j];
+            else break;
+          } else {
+            ++i;
+            if (i < xlen)
+              x = xNodes[i];
+            else break;
+          }
         }
+      }
+      return sum;
+    }
 
-        private static double powi(double value, int times)
-        {
-            double tmp = value, ret = 1.0;
+    private static double computeSquaredDistance(Node[] xNodes, Node[] yNodes) {
+      Node x = xNodes[0];
+      Node y = yNodes[0];
+      int xLength = xNodes.Length;
+      int yLength = yNodes.Length;
+      int xIndex = 0;
+      int yIndex = 0;
+      double sum = 0;
 
-            for (int t = times; t > 0; t /= 2)
-            {
-                if (t % 2 == 1) ret *= tmp;
-                tmp = tmp * tmp;
-            }
-            return ret;
+      while (true) {
+        if (x._index == y._index) {
+          double d = x._value - y._value;
+          sum += d * d;
+          xIndex++;
+          yIndex++;
+          if (xIndex < xLength && yIndex < yLength) {
+            x = xNodes[xIndex];
+            y = yNodes[yIndex];
+          } else if (xIndex < xLength) {
+            x = xNodes[xIndex];
+            break;
+          } else if (yIndex < yLength) {
+            y = yNodes[yIndex];
+            break;
+          } else break;
+        } else if (x._index > y._index) {
+          sum += y._value * y._value;
+          if (++yIndex < yLength)
+            y = yNodes[yIndex];
+          else break;
+        } else {
+          sum += x._value * x._value;
+          if (++xIndex < xLength)
+            x = xNodes[xIndex];
+          else break;
         }
+      }
 
-        public double KernelFunction(int i, int j)
-        {
-            switch (_kernelType)
-            {
-                case KernelType.LINEAR:
-                    return dot(_x[i], _x[j]);
-                case KernelType.POLY:
-                    return powi(_gamma * dot(_x[i], _x[j]) + _coef0, _degree);
-                case KernelType.RBF:
-                    return Math.Exp(-_gamma * (_xSquare[i] + _xSquare[j] - 2 * dot(_x[i], _x[j])));
-                case KernelType.SIGMOID:
-                    return Math.Tanh(_gamma * dot(_x[i], _x[j]) + _coef0);
-                case KernelType.PRECOMPUTED:
-                    return _x[i][(int)(_x[j][0].Value)].Value;
-                default:
-                    return 0;
-            }
-        }
+      for (; xIndex < xLength; xIndex++) {
+        double d = xNodes[xIndex]._value;
+        sum += d * d;
+      }
 
-        public Kernel(int l, Node[][] x_, Parameter param)
-        {
-            _kernelType = param.KernelType;
-            _degree = param.Degree;
-            _gamma = param.Gamma;
-            _coef0 = param.Coefficient0;
+      for (; yIndex < yLength; yIndex++) {
+        double d = yNodes[yIndex]._value;
+        sum += d * d;
+      }
 
-            _x = (Node[][])x_.Clone();
+      return sum;
+    }
 
-            if (_kernelType == KernelType.RBF)
-            {
-                _xSquare = new double[l];
-                for (int i = 0; i < l; i++)
-                    _xSquare[i] = dot(_x[i], _x[i]);
-            }
-            else _xSquare = null;
-        }
-
-        private static double dot(Node[] xNodes, Node[] yNodes)
-        {
-            double sum = 0;
-            int xlen = xNodes.Length;
-            int ylen = yNodes.Length;
-            int i = 0;
-            int j = 0;
-            Node x = xNodes[0];
-            Node y = yNodes[0];
-            while (true)
-            {
-                if (x._index == y._index)
-                {
-                    sum += x._value * y._value;
-                    i++;
-                    j++;
-                    if (i < xlen && j < ylen)
-                    {
-                        x = xNodes[i];
-                        y = yNodes[j];
-                    }
-                    else if (i < xlen)
-                    {
-                        x = xNodes[i];
-                        break;
-                    }
-                    else if (j < ylen)
-                    {
-                        y = yNodes[j];
-                        break;
-                    }
-                    else break;
-                }
-                else
-                {
-                    if (x._index > y._index)
-                    {
-                        ++j;
-                        if (j < ylen)
-                            y = yNodes[j];
-                        else break;
-                    }
-                    else
-                    {
-                        ++i;
-                        if (i < xlen)
-                            x = xNodes[i];
-                        else break;
-                    }
-                }
-            }
-            return sum;
-        }
-
-        private static double computeSquaredDistance(Node[] xNodes, Node[] yNodes)
-        {
-            Node x = xNodes[0];
-            Node y = yNodes[0];
-            int xLength = xNodes.Length;
-            int yLength = yNodes.Length;
-            int xIndex = 0;
-            int yIndex = 0;
-            double sum = 0;
-
-            while (true)
-            {
-                if (x._index == y._index)
-                {
-                    double d = x._value - y._value;
-                    sum += d * d;
-                    xIndex++;
-                    yIndex++;
-                    if (xIndex < xLength && yIndex < yLength)
-                    {
-                        x = xNodes[xIndex];
-                        y = yNodes[yIndex];
-                    }
-                    else if(xIndex < xLength){
-                        x = xNodes[xIndex];
-                        break;
-                    }
-                    else if(yIndex < yLength){
-                        y = yNodes[yIndex];
-                        break;
-                    }else break;
-                }
-                else if (x._index > y._index)
-                {
-                    sum += y._value * y._value;
-                    if (++yIndex < yLength)
-                        y = yNodes[yIndex];
-                    else break;
-                }
-                else
-                {
-                    sum += x._value * x._value;
-                    if (++xIndex < xLength)
-                        x = xNodes[xIndex];
-                    else break;
-                }
-            }
-
-            for (; xIndex < xLength; xIndex++)
-            {
-                double d = xNodes[xIndex]._value;
-                sum += d * d;
-            }
-
-            for (; yIndex < yLength; yIndex++)
-            {
-                double d = yNodes[yIndex]._value;
-                sum += d * d;
-            }
-
-            return sum;
-        }
-
-        public static double KernelFunction(Node[] x, Node[] y, Parameter param)
-        {
-            switch (param.KernelType)
-            {
-                case KernelType.LINEAR:
-                    return dot(x, y);
-                case KernelType.POLY:
-                    return powi(param.Degree * dot(x, y) + param.Coefficient0, param.Degree);
-                case KernelType.RBF:
-                    {
-                        double sum = computeSquaredDistance(x, y);
-                        return Math.Exp(-param.Gamma * sum);
-                    }
-                case KernelType.SIGMOID:
-                    return Math.Tanh(param.Gamma * dot(x, y) + param.Coefficient0);
-                case KernelType.PRECOMPUTED:
-                    return x[(int)(y[0].Value)].Value;
-                default:
-                    return 0;
-            }
-        }
+    public static double KernelFunction(Node[] x, Node[] y, Parameter param) {
+      switch (param.KernelType) {
+        case KernelType.LINEAR:
+          return dot(x, y);
+        case KernelType.POLY:
+          return powi(param.Degree * dot(x, y) + param.Coefficient0, param.Degree);
+        case KernelType.RBF: {
+            double sum = computeSquaredDistance(x, y);
+            return Math.Exp(-param.Gamma * sum);
+          }
+        case KernelType.SIGMOID:
+          return Math.Tanh(param.Gamma * dot(x, y) + param.Coefficient0);
+        case KernelType.PRECOMPUTED:
+          return x[(int)(y[0].Value)].Value;
+        default:
+          return 0;
+      }
     }
+  }
 }
Index: /trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.LibSVM/1.6.3/LibSVM-1.6.3/Model.cs
===================================================================
--- /trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.LibSVM/1.6.3/LibSVM-1.6.3/Model.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.LibSVM/1.6.3/LibSVM-1.6.3/Model.cs	(revision 4068)
@@ -21,6 +21,4 @@
 using System;
 using System.IO;
-using System.Threading;
-using System.Globalization;
 
 namespace SVM {
Index: /trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.LibSVM/1.6.3/LibSVM-1.6.3/Parameter.cs
===================================================================
--- /trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.LibSVM/1.6.3/LibSVM-1.6.3/Parameter.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.LibSVM/1.6.3/LibSVM-1.6.3/Parameter.cs	(revision 4068)
@@ -19,297 +19,255 @@
 
 using System;
-using System.Linq;
 using System.Collections.Generic;
 
-namespace SVM
-{
-    /// <summary>
-    /// Contains all of the types of SVM this library can model.
-    /// </summary>
-    public enum SvmType { 
-        /// <summary>
-        /// C-SVC.
-        /// </summary>
-        C_SVC, 
-        /// <summary>
-        /// nu-SVC.
-        /// </summary>
-        NU_SVC, 
-        /// <summary>
-        /// one-class SVM
-        /// </summary>
-        ONE_CLASS, 
-        /// <summary>
-        /// epsilon-SVR
-        /// </summary>
-        EPSILON_SVR, 
-        /// <summary>
-        /// nu-SVR
-        /// </summary>
-        NU_SVR 
-    };
-    /// <summary>
-    /// Contains the various kernel types this library can use.
-    /// </summary>
-    public enum KernelType { 
-        /// <summary>
-        /// Linear: u'*v
-        /// </summary>
-        LINEAR, 
-        /// <summary>
-        /// Polynomial: (gamma*u'*v + coef0)^degree
-        /// </summary>
-        POLY, 
-        /// <summary>
-        /// Radial basis function: exp(-gamma*|u-v|^2)
-        /// </summary>
-        RBF, 
-        /// <summary>
-        /// Sigmoid: tanh(gamma*u'*v + coef0)
-        /// </summary>
-        SIGMOID,
-        /// <summary>
-        /// Precomputed kernel
-        /// </summary>
-        PRECOMPUTED,
-    };
-
-    /// <summary>
-    /// This class contains the various parameters which can affect the way in which an SVM
-    /// is learned.  Unless you know what you are doing, chances are you are best off using
-    /// the default values.
-    /// </summary>
-	[Serializable]
-	public class Parameter : ICloneable
-	{
-        private SvmType _svmType;
-        private KernelType _kernelType;
-        private int _degree;
-        private double _gamma;
-        private double _coef0;
-
-        private double _cacheSize;
-        private double _C;
-        private double _eps;
-
-        private Dictionary<int, double> _weights;
-        private double _nu;
-        private double _p;
-        private bool _shrinking;
-        private bool _probability;
-
-        /// <summary>
-        /// Default Constructor.  Gives good default values to all parameters.
-        /// </summary>
-        public Parameter()
-        {
-            _svmType = SvmType.C_SVC;
-            _kernelType = KernelType.RBF;
-            _degree = 3;
-            _gamma = 0; // 1/k
-            _coef0 = 0;
-            _nu = 0.5;
-            _cacheSize = 40;
-            _C = 1;
-            _eps = 1e-3;
-            _p = 0.1;
-            _shrinking = true;
-            _probability = false;
-            _weights = new Dictionary<int, double>();
-        }
-
-        /// <summary>
-        /// Type of SVM (default C-SVC)
-        /// </summary>
-        public SvmType SvmType
-        {
-            get
-            {
-                return _svmType;
-            }
-            set
-            {
-                _svmType = value;
-            }
-        }
-        /// <summary>
-        /// Type of kernel function (default Polynomial)
-        /// </summary>
-        public KernelType KernelType
-        {
-            get
-            {
-                return _kernelType;
-            }
-            set
-            {
-                _kernelType = value;
-            }
-        }
-        /// <summary>
-        /// Degree in kernel function (default 3).
-        /// </summary>
-        public int Degree
-        {
-            get
-            {
-                return _degree;
-            }
-            set
-            {
-                _degree = value;
-            }
-        }
-        /// <summary>
-        /// Gamma in kernel function (default 1/k)
-        /// </summary>
-        public double Gamma
-        {
-            get
-            {
-                return _gamma;
-            }
-            set
-            {
-                _gamma = value;
-            }
-        }
-        /// <summary>
-        /// Zeroeth coefficient in kernel function (default 0)
-        /// </summary>
-        public double Coefficient0
-        {
-            get
-            {
-                return _coef0;
-            }
-            set
-            {
-                _coef0 = value;
-            }
-        }
-		
-        /// <summary>
-        /// Cache memory size in MB (default 100)
-        /// </summary>
-        public double CacheSize
-        {
-            get
-            {
-                return _cacheSize;
-            }
-            set
-            {
-                _cacheSize = value;
-            }
-        }
-        /// <summary>
-        /// Tolerance of termination criterion (default 0.001)
-        /// </summary>
-        public double EPS
-        {
-            get
-            {
-                return _eps;
-            }
-            set
-            {
-                _eps = value;
-            }
-        }
-        /// <summary>
-        /// The parameter C of C-SVC, epsilon-SVR, and nu-SVR (default 1)
-        /// </summary>
-        public double C
-        {
-            get
-            {
-                return _C;
-            }
-            set
-            {
-                _C = value;
-            }
-        }
-
-        /// <summary>
-        /// Contains custom weights for class labels.  Default weight value is 1.
-        /// </summary>
-        public Dictionary<int,double> Weights
-        {
-            get{
-                return _weights;
-            }
-        }
-
-        /// <summary>
-        /// The parameter nu of nu-SVC, one-class SVM, and nu-SVR (default 0.5)
-        /// </summary>
-        public double Nu
-        {
-            get
-            {
-                return _nu;
-            }
-            set
-            {
-                _nu = value;
-            }
-        }
-        /// <summary>
-        /// The epsilon in loss function of epsilon-SVR (default 0.1)
-        /// </summary>
-        public double P
-        {
-            get
-            {
-                return _p;
-            }
-            set
-            {
-                _p = value;
-            }
-        }
-        /// <summary>
-        /// Whether to use the shrinking heuristics, (default True)
-        /// </summary>
-        public bool Shrinking
-        {
-            get
-            {
-                return _shrinking;
-            }
-            set
-            {
-                _shrinking = value;
-            }
-        }
-        /// <summary>
-        /// Whether to train an SVC or SVR model for probability estimates, (default False)
-        /// </summary>
-        public bool Probability
-        {
-            get
-            {
-                return _probability;
-            }
-            set
-            {
-                _probability = value;
-            }
-        }
-
-
-        #region ICloneable Members
-        /// <summary>
-        /// Creates a memberwise clone of this parameters object.
-        /// </summary>
-        /// <returns>The clone (as type Parameter)</returns>
-        public object Clone()
-        {
-            return base.MemberwiseClone();
-        }
-
-        #endregion
-    }
+namespace SVM {
+  /// <summary>
+  /// Contains all of the types of SVM this library can model.
+  /// </summary>
+  public enum SvmType {
+    /// <summary>
+    /// C-SVC.
+    /// </summary>
+    C_SVC,
+    /// <summary>
+    /// nu-SVC.
+    /// </summary>
+    NU_SVC,
+    /// <summary>
+    /// one-class SVM
+    /// </summary>
+    ONE_CLASS,
+    /// <summary>
+    /// epsilon-SVR
+    /// </summary>
+    EPSILON_SVR,
+    /// <summary>
+    /// nu-SVR
+    /// </summary>
+    NU_SVR
+  };
+  /// <summary>
+  /// Contains the various kernel types this library can use.
+  /// </summary>
+  public enum KernelType {
+    /// <summary>
+    /// Linear: u'*v
+    /// </summary>
+    LINEAR,
+    /// <summary>
+    /// Polynomial: (gamma*u'*v + coef0)^degree
+    /// </summary>
+    POLY,
+    /// <summary>
+    /// Radial basis function: exp(-gamma*|u-v|^2)
+    /// </summary>
+    RBF,
+    /// <summary>
+    /// Sigmoid: tanh(gamma*u'*v + coef0)
+    /// </summary>
+    SIGMOID,
+    /// <summary>
+    /// Precomputed kernel
+    /// </summary>
+    PRECOMPUTED,
+  };
+
+  /// <summary>
+  /// This class contains the various parameters which can affect the way in which an SVM
+  /// is learned.  Unless you know what you are doing, chances are you are best off using
+  /// the default values.
+  /// </summary>
+  [Serializable]
+  public class Parameter : ICloneable {
+    private SvmType _svmType;
+    private KernelType _kernelType;
+    private int _degree;
+    private double _gamma;
+    private double _coef0;
+
+    private double _cacheSize;
+    private double _C;
+    private double _eps;
+
+    private Dictionary<int, double> _weights;
+    private double _nu;
+    private double _p;
+    private bool _shrinking;
+    private bool _probability;
+
+    /// <summary>
+    /// Default Constructor.  Gives good default values to all parameters.
+    /// </summary>
+    public Parameter() {
+      _svmType = SvmType.C_SVC;
+      _kernelType = KernelType.RBF;
+      _degree = 3;
+      _gamma = 0; // 1/k
+      _coef0 = 0;
+      _nu = 0.5;
+      _cacheSize = 40;
+      _C = 1;
+      _eps = 1e-3;
+      _p = 0.1;
+      _shrinking = true;
+      _probability = false;
+      _weights = new Dictionary<int, double>();
+    }
+
+    /// <summary>
+    /// Type of SVM (default C-SVC)
+    /// </summary>
+    public SvmType SvmType {
+      get {
+        return _svmType;
+      }
+      set {
+        _svmType = value;
+      }
+    }
+    /// <summary>
+    /// Type of kernel function (default Polynomial)
+    /// </summary>
+    public KernelType KernelType {
+      get {
+        return _kernelType;
+      }
+      set {
+        _kernelType = value;
+      }
+    }
+    /// <summary>
+    /// Degree in kernel function (default 3).
+    /// </summary>
+    public int Degree {
+      get {
+        return _degree;
+      }
+      set {
+        _degree = value;
+      }
+    }
+    /// <summary>
+    /// Gamma in kernel function (default 1/k)
+    /// </summary>
+    public double Gamma {
+      get {
+        return _gamma;
+      }
+      set {
+        _gamma = value;
+      }
+    }
+    /// <summary>
+    /// Zeroeth coefficient in kernel function (default 0)
+    /// </summary>
+    public double Coefficient0 {
+      get {
+        return _coef0;
+      }
+      set {
+        _coef0 = value;
+      }
+    }
+
+    /// <summary>
+    /// Cache memory size in MB (default 100)
+    /// </summary>
+    public double CacheSize {
+      get {
+        return _cacheSize;
+      }
+      set {
+        _cacheSize = value;
+      }
+    }
+    /// <summary>
+    /// Tolerance of termination criterion (default 0.001)
+    /// </summary>
+    public double EPS {
+      get {
+        return _eps;
+      }
+      set {
+        _eps = value;
+      }
+    }
+    /// <summary>
+    /// The parameter C of C-SVC, epsilon-SVR, and nu-SVR (default 1)
+    /// </summary>
+    public double C {
+      get {
+        return _C;
+      }
+      set {
+        _C = value;
+      }
+    }
+
+    /// <summary>
+    /// Contains custom weights for class labels.  Default weight value is 1.
+    /// </summary>
+    public Dictionary<int, double> Weights {
+      get {
+        return _weights;
+      }
+    }
+
+    /// <summary>
+    /// The parameter nu of nu-SVC, one-class SVM, and nu-SVR (default 0.5)
+    /// </summary>
+    public double Nu {
+      get {
+        return _nu;
+      }
+      set {
+        _nu = value;
+      }
+    }
+    /// <summary>
+    /// The epsilon in loss function of epsilon-SVR (default 0.1)
+    /// </summary>
+    public double P {
+      get {
+        return _p;
+      }
+      set {
+        _p = value;
+      }
+    }
+    /// <summary>
+    /// Whether to use the shrinking heuristics, (default True)
+    /// </summary>
+    public bool Shrinking {
+      get {
+        return _shrinking;
+      }
+      set {
+        _shrinking = value;
+      }
+    }
+    /// <summary>
+    /// Whether to train an SVC or SVR model for probability estimates, (default False)
+    /// </summary>
+    public bool Probability {
+      get {
+        return _probability;
+      }
+      set {
+        _probability = value;
+      }
+    }
+
+
+    #region ICloneable Members
+    /// <summary>
+    /// Creates a memberwise clone of this parameters object.
+    /// </summary>
+    /// <returns>The clone (as type Parameter)</returns>
+    public object Clone() {
+      return base.MemberwiseClone();
+    }
+
+    #endregion
+  }
 }
Index: /trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.LibSVM/1.6.3/LibSVM-1.6.3/PerformanceEvaluator.cs
===================================================================
--- /trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.LibSVM/1.6.3/LibSVM-1.6.3/PerformanceEvaluator.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.LibSVM/1.6.3/LibSVM-1.6.3/PerformanceEvaluator.cs	(revision 4068)
@@ -20,396 +20,342 @@
 using System;
 using System.Collections.Generic;
+using System.Globalization;
 using System.IO;
-using System.Globalization;
-
-namespace SVM
-{
-    /// <summary>
-    /// Class encoding a member of a ranked set of labels.
-    /// </summary>
-    public class RankPair : IComparable<RankPair>
-    {
-        private double _score, _label;
-
-        /// <summary>
-        /// Constructor.
-        /// </summary>
-        /// <param name="score">Score for this pair</param>
-        /// <param name="label">Label associated with the given score</param>
-        public RankPair(double score, double label)
-        {
-            _score = score;
-            _label = label;
+
+namespace SVM {
+  /// <summary>
+  /// Class encoding a member of a ranked set of labels.
+  /// </summary>
+  public class RankPair : IComparable<RankPair> {
+    private double _score, _label;
+
+    /// <summary>
+    /// Constructor.
+    /// </summary>
+    /// <param name="score">Score for this pair</param>
+    /// <param name="label">Label associated with the given score</param>
+    public RankPair(double score, double label) {
+      _score = score;
+      _label = label;
+    }
+
+    /// <summary>
+    /// The score for this pair.
+    /// </summary>
+    public double Score {
+      get {
+        return _score;
+      }
+    }
+
+    /// <summary>
+    /// The Label for this pair.
+    /// </summary>
+    public double Label {
+      get {
+        return _label;
+      }
+    }
+
+    #region IComparable<RankPair> Members
+
+    /// <summary>
+    /// Compares this pair to another.  It will end up in a sorted list in decending score order.
+    /// </summary>
+    /// <param name="other">The pair to compare to</param>
+    /// <returns>Whether this should come before or after the argument</returns>
+    public int CompareTo(RankPair other) {
+      return other.Score.CompareTo(Score);
+    }
+
+    #endregion
+
+    /// <summary>
+    /// Returns a string representation of this pair.
+    /// </summary>
+    /// <returns>A string in the for Score:Label</returns>
+    public override string ToString() {
+      return string.Format("{0}:{1}", Score, Label);
+    }
+  }
+
+  /// <summary>
+  /// Class encoding the point on a 2D curve.
+  /// </summary>
+  public class CurvePoint {
+    private float _x, _y;
+
+    /// <summary>
+    /// Constructor.
+    /// </summary>
+    /// <param name="x">X coordinate</param>
+    /// <param name="y">Y coordinate</param>
+    public CurvePoint(float x, float y) {
+      _x = x;
+      _y = y;
+    }
+
+    /// <summary>
+    /// X coordinate
+    /// </summary>
+    public float X {
+      get {
+        return _x;
+      }
+    }
+
+    /// <summary>
+    /// Y coordinate
+    /// </summary>
+    public float Y {
+      get {
+        return _y;
+      }
+    }
+
+    /// <summary>
+    /// Creates a string representation of this point.
+    /// </summary>
+    /// <returns>string in the form (x, y)</returns>
+    public override string ToString() {
+      return string.Format("({0}, {1})", _x, _y);
+    }
+  }
+
+  /// <summary>
+  /// Class which evaluates an SVM model using several standard techniques.
+  /// </summary>
+  public class PerformanceEvaluator {
+    private class ChangePoint {
+      public ChangePoint(int tp, int fp, int tn, int fn) {
+        TP = tp;
+        FP = fp;
+        TN = tn;
+        FN = fn;
+      }
+
+      public int TP, FP, TN, FN;
+
+      public override string ToString() {
+        return string.Format("{0}:{1}:{2}:{3}", TP, FP, TN, FN);
+      }
+    }
+
+    private List<CurvePoint> _prCurve;
+    private double _ap;
+
+    private List<CurvePoint> _rocCurve;
+    private double _auc;
+
+    private List<RankPair> _data;
+    private List<ChangePoint> _changes;
+
+    /// <summary>
+    /// Constructor.
+    /// </summary>
+    /// <param name="set">A pre-computed ranked pair set</param>
+    public PerformanceEvaluator(List<RankPair> set) {
+      _data = set;
+      computeStatistics();
+    }
+
+    /// <summary>
+    /// Constructor.
+    /// </summary>
+    /// <param name="model">Model to evaluate</param>
+    /// <param name="problem">Problem to evaluate</param>
+    /// <param name="category">Label to be evaluate for</param>
+    public PerformanceEvaluator(Model model, Problem problem, double category) : this(model, problem, category, "tmp.results") { }
+    /// <summary>
+    /// Constructor.
+    /// </summary>
+    /// <param name="model">Model to evaluate</param>
+    /// <param name="problem">Problem to evaluate</param>
+    /// <param name="resultsFile">Results file for output</param>
+    /// <param name="category">Category to evaluate for</param>
+    public PerformanceEvaluator(Model model, Problem problem, double category, string resultsFile) {
+      Prediction.Predict(problem, resultsFile, model, true);
+      parseResultsFile(resultsFile, problem.Y, category);
+
+      computeStatistics();
+    }
+
+    /// <summary>
+    /// Constructor.
+    /// </summary>
+    /// <param name="resultsFile">Results file</param>
+    /// <param name="correctLabels">The correct labels of each data item</param>
+    /// <param name="category">The category to evaluate for</param>
+    public PerformanceEvaluator(string resultsFile, double[] correctLabels, double category) {
+      parseResultsFile(resultsFile, correctLabels, category);
+      computeStatistics();
+    }
+
+    private void parseResultsFile(string resultsFile, double[] labels, double category) {
+      StreamReader input = new StreamReader(resultsFile);
+      string[] parts = input.ReadLine().Split(new char[] { ' ' }, StringSplitOptions.RemoveEmptyEntries);
+      int confidenceIndex = -1;
+      for (int i = 1; i < parts.Length; i++)
+        if (double.Parse(parts[i], CultureInfo.InvariantCulture) == category) {
+          confidenceIndex = i;
+          break;
         }
-
-        /// <summary>
-        /// The score for this pair.
-        /// </summary>
-        public double Score
-        {
-            get
-            {
-                return _score;
-            }
+      _data = new List<RankPair>();
+      for (int i = 0; i < labels.Length; i++) {
+        parts = input.ReadLine().Split(new char[] { ' ' }, StringSplitOptions.RemoveEmptyEntries);
+        double confidence = double.Parse(parts[confidenceIndex], CultureInfo.InvariantCulture);
+        _data.Add(new RankPair(confidence, labels[i] == category ? 1 : 0));
+      }
+      input.Close();
+    }
+
+    private void computeStatistics() {
+      _data.Sort();
+
+      findChanges();
+      computePR();
+      computeRoC();
+    }
+
+    private void findChanges() {
+      int tp, fp, tn, fn;
+      tp = fp = tn = fn = 0;
+      for (int i = 0; i < _data.Count; i++) {
+        if (_data[i].Label == 1)
+          fn++;
+        else tn++;
+      }
+      _changes = new List<ChangePoint>();
+      for (int i = 0; i < _data.Count; i++) {
+        if (_data[i].Label == 1) {
+          tp++;
+          fn--;
+        } else {
+          fp++;
+          tn--;
         }
-
-        /// <summary>
-        /// The Label for this pair.
-        /// </summary>
-        public double Label
-        {
-            get
-            {
-                return _label;
-            }
+        _changes.Add(new ChangePoint(tp, fp, tn, fn));
+      }
+    }
+
+    private float computePrecision(ChangePoint p) {
+      return (float)p.TP / (p.TP + p.FP);
+    }
+
+    private float computeRecall(ChangePoint p) {
+      return (float)p.TP / (p.TP + p.FN);
+    }
+
+    private void computePR() {
+      _prCurve = new List<CurvePoint>();
+      _prCurve.Add(new CurvePoint(0, 1));
+      float precision = computePrecision(_changes[0]);
+      float recall = computeRecall(_changes[0]);
+      float precisionSum = 0;
+      if (_changes[0].TP > 0) {
+        precisionSum += precision;
+        _prCurve.Add(new CurvePoint(recall, precision));
+      }
+      for (int i = 1; i < _changes.Count; i++) {
+        precision = computePrecision(_changes[i]);
+        recall = computeRecall(_changes[i]);
+        if (_changes[i].TP > _changes[i - 1].TP) {
+          precisionSum += precision;
+          _prCurve.Add(new CurvePoint(recall, precision));
         }
-
-        #region IComparable<RankPair> Members
-
-        /// <summary>
-        /// Compares this pair to another.  It will end up in a sorted list in decending score order.
-        /// </summary>
-        /// <param name="other">The pair to compare to</param>
-        /// <returns>Whether this should come before or after the argument</returns>
-        public int CompareTo(RankPair other)
-        {
-            return other.Score.CompareTo(Score);
+      }
+      _prCurve.Add(new CurvePoint(1, (float)(_changes[0].TP + _changes[0].FN) / (_changes[0].FP + _changes[0].TN)));
+      _ap = precisionSum / (_changes[0].FN + _changes[0].TP);
+    }
+
+    /// <summary>
+    /// Writes the Precision-Recall curve to a tab-delimited file.
+    /// </summary>
+    /// <param name="filename">Filename for output</param>
+    public void WritePRCurve(string filename) {
+      StreamWriter output = new StreamWriter(filename);
+      output.WriteLine(_ap);
+      for (int i = 0; i < _prCurve.Count; i++)
+        output.WriteLine("{0}\t{1}", _prCurve[i].X, _prCurve[i].Y);
+      output.Close();
+    }
+
+    /// <summary>
+    /// Writes the Receiver Operating Characteristic curve to a tab-delimited file.
+    /// </summary>
+    /// <param name="filename">Filename for output</param>
+    public void WriteROCCurve(string filename) {
+      StreamWriter output = new StreamWriter(filename);
+      output.WriteLine(_auc);
+      for (int i = 0; i < _rocCurve.Count; i++)
+        output.WriteLine("{0}\t{1}", _rocCurve[i].X, _rocCurve[i].Y);
+      output.Close();
+    }
+
+    /// <summary>
+    /// Receiver Operating Characteristic curve
+    /// </summary>
+    public List<CurvePoint> ROCCurve {
+      get {
+        return _rocCurve;
+      }
+    }
+
+    /// <summary>
+    /// Returns the area under the ROC Curve
+    /// </summary>
+    public double AuC {
+      get {
+        return _auc;
+      }
+    }
+
+    /// <summary>
+    /// Precision-Recall curve
+    /// </summary>
+    public List<CurvePoint> PRCurve {
+      get {
+        return _prCurve;
+      }
+    }
+
+    /// <summary>
+    /// The average precision
+    /// </summary>
+    public double AP {
+      get {
+        return _ap;
+      }
+    }
+
+    private float computeTPR(ChangePoint cp) {
+      return computeRecall(cp);
+    }
+
+    private float computeFPR(ChangePoint cp) {
+      return (float)cp.FP / (cp.FP + cp.TN);
+    }
+
+    private void computeRoC() {
+      _rocCurve = new List<CurvePoint>();
+      _rocCurve.Add(new CurvePoint(0, 0));
+      float tpr = computeTPR(_changes[0]);
+      float fpr = computeFPR(_changes[0]);
+      _rocCurve.Add(new CurvePoint(fpr, tpr));
+      _auc = 0;
+      for (int i = 1; i < _changes.Count; i++) {
+        float newTPR = computeTPR(_changes[i]);
+        float newFPR = computeFPR(_changes[i]);
+        if (_changes[i].TP > _changes[i - 1].TP) {
+          _auc += tpr * (newFPR - fpr) + .5 * (newTPR - tpr) * (newFPR - fpr);
+          tpr = newTPR;
+          fpr = newFPR;
+          _rocCurve.Add(new CurvePoint(fpr, tpr));
         }
-
-        #endregion
-
-        /// <summary>
-        /// Returns a string representation of this pair.
-        /// </summary>
-        /// <returns>A string in the for Score:Label</returns>
-        public override string ToString()
-        {
-            return string.Format("{0}:{1}", Score, Label);
-        }
-    }
-
-    /// <summary>
-    /// Class encoding the point on a 2D curve.
-    /// </summary>
-    public class CurvePoint
-    {
-        private float _x, _y;
-
-        /// <summary>
-        /// Constructor.
-        /// </summary>
-        /// <param name="x">X coordinate</param>
-        /// <param name="y">Y coordinate</param>
-        public CurvePoint(float x, float y)
-        {
-            _x = x;
-            _y = y;
-        }
-
-        /// <summary>
-        /// X coordinate
-        /// </summary>
-        public float X
-        {
-            get
-            {
-                return _x;
-            }
-        }
-
-        /// <summary>
-        /// Y coordinate
-        /// </summary>
-        public float Y
-        {
-            get
-            {
-                return _y;
-            }
-        }
-
-        /// <summary>
-        /// Creates a string representation of this point.
-        /// </summary>
-        /// <returns>string in the form (x, y)</returns>
-        public override string ToString()
-        {
-            return string.Format("({0}, {1})", _x, _y);
-        }
-    }
-
-    /// <summary>
-    /// Class which evaluates an SVM model using several standard techniques.
-    /// </summary>
-    public class PerformanceEvaluator
-    {
-        private class ChangePoint
-        {
-            public ChangePoint(int tp, int fp, int tn, int fn)
-            {
-                TP = tp;
-                FP = fp;
-                TN = tn;
-                FN = fn;
-            }
-
-            public int TP, FP, TN, FN;
-
-            public override string ToString()
-            {
-                return string.Format("{0}:{1}:{2}:{3}", TP, FP, TN, FN);
-            }
-        }
-
-        private List<CurvePoint> _prCurve;
-        private double _ap;
-
-        private List<CurvePoint> _rocCurve;
-        private double _auc;
-
-        private List<RankPair> _data;
-        private List<ChangePoint> _changes;
-
-        /// <summary>
-        /// Constructor.
-        /// </summary>
-        /// <param name="set">A pre-computed ranked pair set</param>
-        public PerformanceEvaluator(List<RankPair> set)
-        {
-            _data = set;
-            computeStatistics();
-        }
-
-        /// <summary>
-        /// Constructor.
-        /// </summary>
-        /// <param name="model">Model to evaluate</param>
-        /// <param name="problem">Problem to evaluate</param>
-        /// <param name="category">Label to be evaluate for</param>
-        public PerformanceEvaluator(Model model, Problem problem, double category) : this(model, problem, category, "tmp.results") { }
-        /// <summary>
-        /// Constructor.
-        /// </summary>
-        /// <param name="model">Model to evaluate</param>
-        /// <param name="problem">Problem to evaluate</param>
-        /// <param name="resultsFile">Results file for output</param>
-        /// <param name="category">Category to evaluate for</param>
-        public PerformanceEvaluator(Model model, Problem problem, double category, string resultsFile)
-        {
-            Prediction.Predict(problem, resultsFile, model, true);
-            parseResultsFile(resultsFile, problem.Y, category);
-
-            computeStatistics();
-        }
-
-        /// <summary>
-        /// Constructor.
-        /// </summary>
-        /// <param name="resultsFile">Results file</param>
-        /// <param name="correctLabels">The correct labels of each data item</param>
-        /// <param name="category">The category to evaluate for</param>
-        public PerformanceEvaluator(string resultsFile, double[] correctLabels, double category)
-        {
-            parseResultsFile(resultsFile, correctLabels, category);
-            computeStatistics();
-        }
-
-        private void parseResultsFile(string resultsFile, double[] labels, double category)
-        {
-            StreamReader input = new StreamReader(resultsFile);
-            string[] parts = input.ReadLine().Split(new char[] { ' ' }, StringSplitOptions.RemoveEmptyEntries);
-            int confidenceIndex = -1;
-            for (int i = 1; i < parts.Length; i++)
-                if (double.Parse(parts[i], CultureInfo.InvariantCulture) == category)
-                {
-                    confidenceIndex = i;
-                    break;
-                }
-            _data = new List<RankPair>();
-            for (int i = 0; i < labels.Length; i++)
-            {
-                parts = input.ReadLine().Split(new char[] { ' ' }, StringSplitOptions.RemoveEmptyEntries);
-                double confidence = double.Parse(parts[confidenceIndex], CultureInfo.InvariantCulture);
-                _data.Add(new RankPair(confidence, labels[i] == category ? 1 : 0));
-            }
-            input.Close();
-        }
-
-        private void computeStatistics()
-        {
-            _data.Sort();
-
-            findChanges();
-            computePR();
-            computeRoC();
-        }
-
-        private void findChanges()
-        {
-            int tp, fp, tn, fn;
-            tp = fp = tn = fn = 0;
-            for (int i = 0; i < _data.Count; i++)
-            {
-                if (_data[i].Label == 1)
-                    fn++;
-                else tn++;
-            }
-            _changes = new List<ChangePoint>();
-            for (int i = 0; i < _data.Count; i++)
-            {
-                if (_data[i].Label == 1)
-                {
-                    tp++;
-                    fn--;
-                }
-                else
-                {
-                    fp++;
-                    tn--;
-                }
-                _changes.Add(new ChangePoint(tp, fp, tn, fn));
-            }
-        }
-
-        private float computePrecision(ChangePoint p)
-        {
-            return (float)p.TP / (p.TP + p.FP);
-        }
-
-        private float computeRecall(ChangePoint p)
-        {
-            return (float)p.TP / (p.TP + p.FN);
-        }
-
-        private void computePR()
-        {
-            _prCurve = new List<CurvePoint>();
-            _prCurve.Add(new CurvePoint(0, 1));
-            float precision = computePrecision(_changes[0]);
-            float recall = computeRecall(_changes[0]);
-            float precisionSum = 0;
-            if (_changes[0].TP > 0)
-            {
-                precisionSum += precision;
-                _prCurve.Add(new CurvePoint(recall, precision));
-            }
-            for (int i = 1; i < _changes.Count; i++)
-            {
-                precision = computePrecision(_changes[i]);
-                recall = computeRecall(_changes[i]);
-                if (_changes[i].TP > _changes[i - 1].TP)
-                {
-                    precisionSum += precision;
-                    _prCurve.Add(new CurvePoint(recall, precision));
-                }
-            }
-            _prCurve.Add(new CurvePoint(1, (float)(_changes[0].TP + _changes[0].FN) / (_changes[0].FP + _changes[0].TN)));
-            _ap = precisionSum / (_changes[0].FN + _changes[0].TP);
-        }
-
-        /// <summary>
-        /// Writes the Precision-Recall curve to a tab-delimited file.
-        /// </summary>
-        /// <param name="filename">Filename for output</param>
-        public void WritePRCurve(string filename)
-        {
-            StreamWriter output = new StreamWriter(filename);
-            output.WriteLine(_ap);
-            for (int i = 0; i < _prCurve.Count; i++)
-                output.WriteLine("{0}\t{1}", _prCurve[i].X, _prCurve[i].Y);
-            output.Close();
-        }
-
-        /// <summary>
-        /// Writes the Receiver Operating Characteristic curve to a tab-delimited file.
-        /// </summary>
-        /// <param name="filename">Filename for output</param>
-        public void WriteROCCurve(string filename)
-        {
-            StreamWriter output = new StreamWriter(filename);
-            output.WriteLine(_auc);
-            for (int i = 0; i < _rocCurve.Count; i++)
-                output.WriteLine("{0}\t{1}", _rocCurve[i].X, _rocCurve[i].Y);
-            output.Close();
-        }
-
-        /// <summary>
-        /// Receiver Operating Characteristic curve
-        /// </summary>
-        public List<CurvePoint> ROCCurve
-        {
-            get
-            {
-                return _rocCurve;
-            }
-        }
-
-        /// <summary>
-        /// Returns the area under the ROC Curve
-        /// </summary>
-        public double AuC
-        {
-            get
-            {
-                return _auc;
-            }
-        }
-
-        /// <summary>
-        /// Precision-Recall curve
-        /// </summary>
-        public List<CurvePoint> PRCurve
-        {
-            get
-            {
-                return _prCurve;
-            }
-        }
-
-        /// <summary>
-        /// The average precision
-        /// </summary>
-        public double AP
-        {
-            get
-            {
-                return _ap;
-            }
-        }
-
-        private float computeTPR(ChangePoint cp)
-        {
-            return computeRecall(cp);
-        }
-
-        private float computeFPR(ChangePoint cp)
-        {
-            return (float)cp.FP / (cp.FP + cp.TN);
-        }
-
-        private void computeRoC()
-        {
-            _rocCurve = new List<CurvePoint>();
-            _rocCurve.Add(new CurvePoint(0, 0));
-            float tpr = computeTPR(_changes[0]);
-            float fpr = computeFPR(_changes[0]);
-            _rocCurve.Add(new CurvePoint(fpr, tpr));
-            _auc = 0;
-            for (int i = 1; i < _changes.Count; i++)
-            {
-                float newTPR = computeTPR(_changes[i]);
-                float newFPR = computeFPR(_changes[i]);
-                if (_changes[i].TP > _changes[i - 1].TP)
-                {
-                    _auc += tpr * (newFPR - fpr) + .5 * (newTPR - tpr) * (newFPR - fpr);
-                    tpr = newTPR;
-                    fpr = newFPR;
-                    _rocCurve.Add(new CurvePoint(fpr, tpr));
-                }
-            }
-            _rocCurve.Add(new CurvePoint(1, 1));
-            _auc += tpr * (1 - fpr) + .5 * (1 - tpr) * (1 - fpr);
-        }
-
-    }
+      }
+      _rocCurve.Add(new CurvePoint(1, 1));
+      _auc += tpr * (1 - fpr) + .5 * (1 - tpr) * (1 - fpr);
+    }
+
+  }
 }
Index: /trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.LibSVM/1.6.3/LibSVM-1.6.3/Prediction.cs
===================================================================
--- /trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.LibSVM/1.6.3/LibSVM-1.6.3/Prediction.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.LibSVM/1.6.3/LibSVM-1.6.3/Prediction.cs	(revision 4068)
@@ -19,170 +19,149 @@
 
 using System;
+using System.Diagnostics;
 using System.IO;
-using System.Diagnostics;
 
-namespace SVM
-{
+namespace SVM {
+  /// <summary>
+  /// Class containing the routines to perform class membership prediction using a trained SVM.
+  /// </summary>
+  public static class Prediction {
     /// <summary>
-    /// Class containing the routines to perform class membership prediction using a trained SVM.
+    /// Predicts the class memberships of all the vectors in the problem.
     /// </summary>
-    public static class Prediction
-    {
-        /// <summary>
-        /// Predicts the class memberships of all the vectors in the problem.
-        /// </summary>
-        /// <param name="problem">The SVM Problem to solve</param>
-        /// <param name="outputFile">File for result output</param>
-        /// <param name="model">The Model to use</param>
-        /// <param name="predict_probability">Whether to output a distribution over the classes</param>
-        /// <returns>Percentage correctly labelled</returns>
-        public static double Predict(
-            Problem problem,
-            string outputFile,
-            Model model,
-            bool predict_probability)
-        {
-            int correct = 0;
-            int total = 0;
-            double error = 0;
-            double sumv = 0, sumy = 0, sumvv = 0, sumyy = 0, sumvy = 0;
-            StreamWriter output = outputFile != null ? new StreamWriter(outputFile) : null;
+    /// <param name="problem">The SVM Problem to solve</param>
+    /// <param name="outputFile">File for result output</param>
+    /// <param name="model">The Model to use</param>
+    /// <param name="predict_probability">Whether to output a distribution over the classes</param>
+    /// <returns>Percentage correctly labelled</returns>
+    public static double Predict(
+        Problem problem,
+        string outputFile,
+        Model model,
+        bool predict_probability) {
+      int correct = 0;
+      int total = 0;
+      double error = 0;
+      double sumv = 0, sumy = 0, sumvv = 0, sumyy = 0, sumvy = 0;
+      StreamWriter output = outputFile != null ? new StreamWriter(outputFile) : null;
 
-            SvmType svm_type = Procedures.svm_get_svm_type(model);
-            int nr_class = Procedures.svm_get_nr_class(model);
-            int[] labels = new int[nr_class];
-            double[] prob_estimates = null;
+      SvmType svm_type = Procedures.svm_get_svm_type(model);
+      int nr_class = Procedures.svm_get_nr_class(model);
+      int[] labels = new int[nr_class];
+      double[] prob_estimates = null;
 
-            if (predict_probability)
-            {
-                if (svm_type == SvmType.EPSILON_SVR || svm_type == SvmType.NU_SVR)
-                {
-                    Console.WriteLine("Prob. model for test data: target value = predicted value + z,\nz: Laplace distribution e^(-|z|/sigma)/(2sigma),sigma=" + Procedures.svm_get_svr_probability(model));
-                }
-                else
-                {
-                    Procedures.svm_get_labels(model, labels);
-                    prob_estimates = new double[nr_class];
-                    if (output != null)
-                    {
-                        output.Write("labels");
-                        for (int j = 0; j < nr_class; j++)
-                        {
-                            output.Write(" " + labels[j]);
-                        }
-                        output.Write("\n");
-                    }
-                }
+      if (predict_probability) {
+        if (svm_type == SvmType.EPSILON_SVR || svm_type == SvmType.NU_SVR) {
+          Console.WriteLine("Prob. model for test data: target value = predicted value + z,\nz: Laplace distribution e^(-|z|/sigma)/(2sigma),sigma=" + Procedures.svm_get_svr_probability(model));
+        } else {
+          Procedures.svm_get_labels(model, labels);
+          prob_estimates = new double[nr_class];
+          if (output != null) {
+            output.Write("labels");
+            for (int j = 0; j < nr_class; j++) {
+              output.Write(" " + labels[j]);
             }
-            for (int i = 0; i < problem.Count; i++)
-            {
-                double target = problem.Y[i];
-                Node[] x = problem.X[i];
+            output.Write("\n");
+          }
+        }
+      }
+      for (int i = 0; i < problem.Count; i++) {
+        double target = problem.Y[i];
+        Node[] x = problem.X[i];
 
-                double v;
-                if (predict_probability && (svm_type == SvmType.C_SVC || svm_type == SvmType.NU_SVC))
-                {
-                    v = Procedures.svm_predict_probability(model, x, prob_estimates);
-                    if (output != null)
-                    {
-                        output.Write(v + " ");
-                        for (int j = 0; j < nr_class; j++)
-                        {
-                            output.Write(prob_estimates[j] + " ");
-                        }
-                        output.Write("\n");
-                    }
-                }
-                else
-                {
-                    v = Procedures.svm_predict(model, x);
-                    if(output != null)
-                        output.Write(v + "\n");
-                }
-
-                if (v == target)
-                    ++correct;
-                error += (v - target) * (v - target);
-                sumv += v;
-                sumy += target;
-                sumvv += v * v;
-                sumyy += target * target;
-                sumvy += v * target;
-                ++total;
+        double v;
+        if (predict_probability && (svm_type == SvmType.C_SVC || svm_type == SvmType.NU_SVC)) {
+          v = Procedures.svm_predict_probability(model, x, prob_estimates);
+          if (output != null) {
+            output.Write(v + " ");
+            for (int j = 0; j < nr_class; j++) {
+              output.Write(prob_estimates[j] + " ");
             }
-            if(output != null)
-                output.Close();
-            return (double)correct / total;
+            output.Write("\n");
+          }
+        } else {
+          v = Procedures.svm_predict(model, x);
+          if (output != null)
+            output.Write(v + "\n");
         }
 
-        /// <summary>
-        /// Predict the class for a single input vector.
-        /// </summary>
-        /// <param name="model">The Model to use for prediction</param>
-        /// <param name="x">The vector for which to predict class</param>
-        /// <returns>The result</returns>
-        public static double Predict(Model model, Node[] x)
-        {
-            return Procedures.svm_predict(model, x);
+        if (v == target)
+          ++correct;
+        error += (v - target) * (v - target);
+        sumv += v;
+        sumy += target;
+        sumvv += v * v;
+        sumyy += target * target;
+        sumvy += v * target;
+        ++total;
+      }
+      if (output != null)
+        output.Close();
+      return (double)correct / total;
+    }
+
+    /// <summary>
+    /// Predict the class for a single input vector.
+    /// </summary>
+    /// <param name="model">The Model to use for prediction</param>
+    /// <param name="x">The vector for which to predict class</param>
+    /// <returns>The result</returns>
+    public static double Predict(Model model, Node[] x) {
+      return Procedures.svm_predict(model, x);
+    }
+
+    /// <summary>
+    /// Predicts a class distribution for the single input vector.
+    /// </summary>
+    /// <param name="model">Model to use for prediction</param>
+    /// <param name="x">The vector for which to predict the class distribution</param>
+    /// <returns>A probability distribtion over classes</returns>
+    public static double[] PredictProbability(Model model, Node[] x) {
+      SvmType svm_type = Procedures.svm_get_svm_type(model);
+      if (svm_type != SvmType.C_SVC && svm_type != SvmType.NU_SVC)
+        throw new Exception("Model type " + svm_type + " unable to predict probabilities.");
+      int nr_class = Procedures.svm_get_nr_class(model);
+      double[] probEstimates = new double[nr_class];
+      Procedures.svm_predict_probability(model, x, probEstimates);
+      return probEstimates;
+    }
+
+    private static void exit_with_help() {
+      Debug.Write("usage: svm_predict [options] test_file model_file output_file\n" + "options:\n" + "-b probability_estimates: whether to predict probability estimates, 0 or 1 (default 0); one-class SVM not supported yet\n");
+      Environment.Exit(1);
+    }
+
+    /// <summary>
+    /// Legacy method, provided to allow usage as though this were the command line version of libsvm.
+    /// </summary>
+    /// <param name="args">Standard arguments passed to the svm_predict exectutable.  See libsvm documentation for details.</param>
+    [Obsolete("Use the other version of Predict() instead")]
+    public static void Predict(params string[] args) {
+      int i = 0;
+      bool predictProbability = false;
+
+      // parse options
+      for (i = 0; i < args.Length; i++) {
+        if (args[i][0] != '-')
+          break;
+        ++i;
+        switch (args[i - 1][1]) {
+
+          case 'b':
+            predictProbability = int.Parse(args[i]) == 1;
+            break;
+
+          default:
+            throw new ArgumentException("Unknown option");
+
         }
+      }
+      if (i >= args.Length)
+        throw new ArgumentException("No input, model and output files provided");
 
-        /// <summary>
-        /// Predicts a class distribution for the single input vector.
-        /// </summary>
-        /// <param name="model">Model to use for prediction</param>
-        /// <param name="x">The vector for which to predict the class distribution</param>
-        /// <returns>A probability distribtion over classes</returns>
-        public static double[] PredictProbability(Model model, Node[] x)
-        {
-            SvmType svm_type = Procedures.svm_get_svm_type(model);
-            if (svm_type != SvmType.C_SVC && svm_type != SvmType.NU_SVC)
-                throw new Exception("Model type " + svm_type + " unable to predict probabilities.");
-            int nr_class = Procedures.svm_get_nr_class(model);
-            double[] probEstimates = new double[nr_class];
-            Procedures.svm_predict_probability(model, x, probEstimates);
-            return probEstimates;
-        }
-
-        private static void exit_with_help()
-        {
-            Debug.Write("usage: svm_predict [options] test_file model_file output_file\n" + "options:\n" + "-b probability_estimates: whether to predict probability estimates, 0 or 1 (default 0); one-class SVM not supported yet\n");
-            Environment.Exit(1);
-        }
-
-        /// <summary>
-        /// Legacy method, provided to allow usage as though this were the command line version of libsvm.
-        /// </summary>
-        /// <param name="args">Standard arguments passed to the svm_predict exectutable.  See libsvm documentation for details.</param>
-        [Obsolete("Use the other version of Predict() instead")]
-        public static void Predict(params string[] args)
-        {
-            int i = 0;
-            bool predictProbability = false;
-
-            // parse options
-            for (i = 0; i < args.Length; i++)
-            {
-                if (args[i][0] != '-')
-                    break;
-                ++i;
-                switch (args[i - 1][1])
-                {
-
-                    case 'b':
-                        predictProbability = int.Parse(args[i]) == 1;
-                        break;
-
-                    default:
-                        throw new ArgumentException("Unknown option");
-
-                }
-            }
-            if (i >= args.Length)
-                throw new ArgumentException("No input, model and output files provided");
-
-            Problem problem = Problem.Read(args[i]);
-            Model model = Model.Read(args[i + 1]);
-            Predict(problem, args[i + 2], model, predictProbability);
-        }
+      Problem problem = Problem.Read(args[i]);
+      Model model = Model.Read(args[i + 1]);
+      Predict(problem, args[i + 2], model, predictProbability);
     }
+  }
 }
Index: /trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.LibSVM/1.6.3/LibSVM-1.6.3/Problem.cs
===================================================================
--- /trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.LibSVM/1.6.3/LibSVM-1.6.3/Problem.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.LibSVM/1.6.3/LibSVM-1.6.3/Problem.cs	(revision 4068)
@@ -19,194 +19,165 @@
 
 using System;
+using System.Collections.Generic;
 using System.IO;
-using System.Collections.Generic;
-using System.Threading;
-using System.Globalization;
 
-namespace SVM
-{
+namespace SVM {
+  /// <summary>
+  /// Encapsulates a problem, or set of vectors which must be classified.
+  /// </summary>
+  [Serializable]
+  public class Problem {
+    private int _count;
+    private double[] _Y;
+    private Node[][] _X;
+    private int _maxIndex;
+
     /// <summary>
-    /// Encapsulates a problem, or set of vectors which must be classified.
+    /// Constructor.
     /// </summary>
-	[Serializable]
-	public class Problem
-	{
-        private int _count;
-        private double[] _Y;
-        private Node[][] _X;
-        private int _maxIndex;
+    /// <param name="count">Number of vectors</param>
+    /// <param name="y">The class labels</param>
+    /// <param name="x">Vector data.</param>
+    /// <param name="maxIndex">Maximum index for a vector</param>
+    public Problem(int count, double[] y, Node[][] x, int maxIndex) {
+      _count = count;
+      _Y = y;
+      _X = x;
+      _maxIndex = maxIndex;
+    }
+    /// <summary>
+    /// Empty Constructor.  Nothing is initialized.
+    /// </summary>
+    public Problem() {
+    }
+    /// <summary>
+    /// Number of vectors.
+    /// </summary>
+    public int Count {
+      get {
+        return _count;
+      }
+      set {
+        _count = value;
+      }
+    }
+    /// <summary>
+    /// Class labels.
+    /// </summary>
+    public double[] Y {
+      get {
+        return _Y;
+      }
+      set {
+        _Y = value;
+      }
+    }
+    /// <summary>
+    /// Vector data.
+    /// </summary>
+    public Node[][] X {
+      get {
+        return _X;
+      }
+      set {
+        _X = value;
+      }
+    }
+    /// <summary>
+    /// Maximum index for a vector.
+    /// </summary>
+    public int MaxIndex {
+      get {
+        return _maxIndex;
+      }
+      set {
+        _maxIndex = value;
+      }
+    }
 
-        /// <summary>
-        /// Constructor.
-        /// </summary>
-        /// <param name="count">Number of vectors</param>
-        /// <param name="y">The class labels</param>
-        /// <param name="x">Vector data.</param>
-        /// <param name="maxIndex">Maximum index for a vector</param>
-        public Problem(int count, double[] y, Node[][] x, int maxIndex)
-        {
-            _count = count;
-            _Y = y;
-            _X = x;
-            _maxIndex = maxIndex;
+    /// <summary>
+    /// Reads a problem from a stream.
+    /// </summary>
+    /// <param name="stream">Stream to read from</param>
+    /// <returns>The problem</returns>
+    public static Problem Read(Stream stream) {
+      TemporaryCulture.Start();
+
+      StreamReader input = new StreamReader(stream);
+      List<double> vy = new List<double>();
+      List<Node[]> vx = new List<Node[]>();
+      int max_index = 0;
+
+      while (input.Peek() > -1) {
+        string[] parts = input.ReadLine().Trim().Split();
+
+        vy.Add(double.Parse(parts[0]));
+        int m = parts.Length - 1;
+        Node[] x = new Node[m];
+        for (int j = 0; j < m; j++) {
+          x[j] = new Node();
+          string[] nodeParts = parts[j + 1].Split(':');
+          x[j].Index = int.Parse(nodeParts[0]);
+          x[j].Value = double.Parse(nodeParts[1]);
         }
-        /// <summary>
-        /// Empty Constructor.  Nothing is initialized.
-        /// </summary>
-        public Problem()
-        {
-        }
-        /// <summary>
-        /// Number of vectors.
-        /// </summary>
-        public int Count
-        {
-            get
-            {
-                return _count;
-            }
-            set
-            {
-                _count = value;
-            }
-        }
-        /// <summary>
-        /// Class labels.
-        /// </summary>
-        public double[] Y
-        {
-            get
-            {
-                return _Y;
-            }
-            set
-            {
-                _Y = value;
-            }
-        }
-        /// <summary>
-        /// Vector data.
-        /// </summary>
-        public Node[][] X
-        {
-            get
-            {
-                return _X;
-            }
-            set
-            {
-                _X = value;
-            }
-        }
-        /// <summary>
-        /// Maximum index for a vector.
-        /// </summary>
-        public int MaxIndex
-        {
-            get
-            {
-                return _maxIndex;
-            }
-            set
-            {
-                _maxIndex = value;
-            }
-        }
+        if (m > 0)
+          max_index = Math.Max(max_index, x[m - 1].Index);
+        vx.Add(x);
+      }
 
-        /// <summary>
-        /// Reads a problem from a stream.
-        /// </summary>
-        /// <param name="stream">Stream to read from</param>
-        /// <returns>The problem</returns>
-        public static Problem Read(Stream stream)
-        {
-            TemporaryCulture.Start();
+      TemporaryCulture.Stop();
 
-            StreamReader input = new StreamReader(stream);
-            List<double> vy = new List<double>();
-            List<Node[]> vx = new List<Node[]>();
-            int max_index = 0;
+      return new Problem(vy.Count, vy.ToArray(), vx.ToArray(), max_index);
+    }
 
-            while (input.Peek() > -1)
-            {
-                string[] parts = input.ReadLine().Trim().Split();
+    /// <summary>
+    /// Writes a problem to a stream.
+    /// </summary>
+    /// <param name="stream">The stream to write the problem to.</param>
+    /// <param name="problem">The problem to write.</param>
+    public static void Write(Stream stream, Problem problem) {
+      TemporaryCulture.Start();
 
-                vy.Add(double.Parse(parts[0]));
-                int m = parts.Length - 1;
-                Node[] x = new Node[m];
-                for (int j = 0; j < m; j++)
-                {
-                    x[j] = new Node();
-                    string[] nodeParts = parts[j + 1].Split(':');
-                    x[j].Index = int.Parse(nodeParts[0]);
-                    x[j].Value = double.Parse(nodeParts[1]);
-                }
-                if (m > 0)
-                    max_index = Math.Max(max_index, x[m - 1].Index);
-                vx.Add(x);
-            }
+      StreamWriter output = new StreamWriter(stream);
+      for (int i = 0; i < problem.Count; i++) {
+        output.Write(problem.Y[i]);
+        for (int j = 0; j < problem.X[i].Length; j++)
+          output.Write(" {0}:{1}", problem.X[i][j].Index, problem.X[i][j].Value);
+        output.WriteLine();
+      }
+      output.Flush();
 
-            TemporaryCulture.Stop();
+      TemporaryCulture.Stop();
+    }
 
-            return new Problem(vy.Count, vy.ToArray(), vx.ToArray(), max_index);
-        }
+    /// <summary>
+    /// Reads a Problem from a file.
+    /// </summary>
+    /// <param name="filename">The file to read from.</param>
+    /// <returns>the Probem</returns>
+    public static Problem Read(string filename) {
+      FileStream input = File.OpenRead(filename);
+      try {
+        return Read(input);
+      }
+      finally {
+        input.Close();
+      }
+    }
 
-        /// <summary>
-        /// Writes a problem to a stream.
-        /// </summary>
-        /// <param name="stream">The stream to write the problem to.</param>
-        /// <param name="problem">The problem to write.</param>
-        public static void Write(Stream stream, Problem problem)
-        {
-            TemporaryCulture.Start();
-
-            StreamWriter output = new StreamWriter(stream);
-            for (int i = 0; i < problem.Count; i++)
-            {
-                output.Write(problem.Y[i]);
-                for (int j = 0; j < problem.X[i].Length; j++)
-                    output.Write(" {0}:{1}", problem.X[i][j].Index, problem.X[i][j].Value);
-                output.WriteLine();
-            }
-            output.Flush();
-
-            TemporaryCulture.Stop();
-        }
-
-        /// <summary>
-        /// Reads a Problem from a file.
-        /// </summary>
-        /// <param name="filename">The file to read from.</param>
-        /// <returns>the Probem</returns>
-        public static Problem Read(string filename)
-        {
-            FileStream input = File.OpenRead(filename);
-            try
-            {
-                return Read(input);
-            }
-            finally
-            {
-                input.Close();
-            }
-        }
-
-        /// <summary>
-        /// Writes a problem to a file.   This will overwrite any previous data in the file.
-        /// </summary>
-        /// <param name="filename">The file to write to</param>
-        /// <param name="problem">The problem to write</param>
-        public static void Write(string filename, Problem problem)
-        {
-            FileStream output = File.Open(filename, FileMode.Create);
-            try
-            {
-                Write(output, problem);
-            }
-            finally
-            {
-                output.Close();
-            }
-        }
+    /// <summary>
+    /// Writes a problem to a file.   This will overwrite any previous data in the file.
+    /// </summary>
+    /// <param name="filename">The file to write to</param>
+    /// <param name="problem">The problem to write</param>
+    public static void Write(string filename, Problem problem) {
+      FileStream output = File.Open(filename, FileMode.Create);
+      try {
+        Write(output, problem);
+      }
+      finally {
+        output.Close();
+      }
     }
+  }
 }
Index: /trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.LibSVM/1.6.3/LibSVM-1.6.3/Properties/AssemblyInfo.cs
===================================================================
--- /trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.LibSVM/1.6.3/LibSVM-1.6.3/Properties/AssemblyInfo.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.LibSVM/1.6.3/LibSVM-1.6.3/Properties/AssemblyInfo.cs	(revision 4068)
@@ -1,4 +1,3 @@
 ﻿using System.Reflection;
-using System.Runtime.CompilerServices;
 using System.Runtime.InteropServices;
 
Index: /trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.LibSVM/1.6.3/LibSVM-1.6.3/RangeTransform.cs
===================================================================
--- /trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.LibSVM/1.6.3/LibSVM-1.6.3/RangeTransform.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.LibSVM/1.6.3/LibSVM-1.6.3/RangeTransform.cs	(revision 4068)
@@ -20,6 +20,4 @@
 using System;
 using System.IO;
-using System.Threading;
-using System.Globalization;
 
 namespace SVM {
Index: /trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.LibSVM/1.6.3/LibSVM-1.6.3/SVMExtensions.cs
===================================================================
--- /trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.LibSVM/1.6.3/LibSVM-1.6.3/SVMExtensions.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.LibSVM/1.6.3/LibSVM-1.6.3/SVMExtensions.cs	(revision 4068)
@@ -1,17 +1,10 @@
-﻿using System;
-using System.Collections.Generic;
-using System.Linq;
-using System.Text;
-
-namespace SVM
-{
-    internal static class SVMExtensions
-    {
-        public static void SwapIndex<T>(this T[] list, int i, int j)
-        {
-            T tmp = list[i];
-            list[i] = list[j];
-            list[j] = tmp;
-        }
+﻿
+namespace SVM {
+  internal static class SVMExtensions {
+    public static void SwapIndex<T>(this T[] list, int i, int j) {
+      T tmp = list[i];
+      list[i] = list[j];
+      list[j] = tmp;
     }
+  }
 }
Index: /trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.LibSVM/1.6.3/LibSVM-1.6.3/Scaling.cs
===================================================================
--- /trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.LibSVM/1.6.3/LibSVM-1.6.3/Scaling.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.LibSVM/1.6.3/LibSVM-1.6.3/Scaling.cs	(revision 4068)
@@ -18,32 +18,27 @@
 
 
-using System;
 
-namespace SVM
-{
+namespace SVM {
+  /// <summary>
+  /// Deals with the scaling of Problems so they have uniform ranges across all dimensions in order to
+  /// result in better SVM performance.
+  /// </summary>
+  public static class Scaling {
     /// <summary>
-    /// Deals with the scaling of Problems so they have uniform ranges across all dimensions in order to
-    /// result in better SVM performance.
+    /// Scales a problem using the provided range.  This will not affect the parameter.
     /// </summary>
-    public static class Scaling
-    {
-        /// <summary>
-        /// Scales a problem using the provided range.  This will not affect the parameter.
-        /// </summary>
-        /// <param name="prob">The problem to scale</param>
-        /// <param name="range">The Range transform to use in scaling</param>
-        /// <returns>The Scaled problem</returns>
-        public static Problem Scale(this IRangeTransform range, Problem prob)
-        {
-            Problem scaledProblem = new Problem(prob.Count, new double[prob.Count], new Node[prob.Count][], prob.MaxIndex);
-            for (int i = 0; i < scaledProblem.Count; i++)
-            {
-                scaledProblem.X[i] = new Node[prob.X[i].Length];
-                for (int j = 0; j < scaledProblem.X[i].Length; j++)
-                    scaledProblem.X[i][j] = new Node(prob.X[i][j].Index, range.Transform(prob.X[i][j].Value, prob.X[i][j].Index));
-                scaledProblem.Y[i] = prob.Y[i];
-            }
-            return scaledProblem;
-        }
+    /// <param name="prob">The problem to scale</param>
+    /// <param name="range">The Range transform to use in scaling</param>
+    /// <returns>The Scaled problem</returns>
+    public static Problem Scale(this IRangeTransform range, Problem prob) {
+      Problem scaledProblem = new Problem(prob.Count, new double[prob.Count], new Node[prob.Count][], prob.MaxIndex);
+      for (int i = 0; i < scaledProblem.Count; i++) {
+        scaledProblem.X[i] = new Node[prob.X[i].Length];
+        for (int j = 0; j < scaledProblem.X[i].Length; j++)
+          scaledProblem.X[i][j] = new Node(prob.X[i][j].Index, range.Transform(prob.X[i][j].Value, prob.X[i][j].Index));
+        scaledProblem.Y[i] = prob.Y[i];
+      }
+      return scaledProblem;
     }
+  }
 }
Index: /trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.LibSVM/1.6.3/LibSVM-1.6.3/Solver.cs
===================================================================
--- /trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.LibSVM/1.6.3/LibSVM-1.6.3/Solver.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.LibSVM/1.6.3/LibSVM-1.6.3/Solver.cs	(revision 4068)
@@ -19,2238 +19,1967 @@
 
 using System;
-using System.Linq;
-using System.Collections.Generic;
-using System.Diagnostics;
 using System.IO;
 
-namespace SVM
-{
-
-    // An SMO algorithm in Fan et al., JMLR 6(2005), p. 1889--1918
-    // Solves:
+namespace SVM {
+
+  // An SMO algorithm in Fan et al., JMLR 6(2005), p. 1889--1918
+  // Solves:
+  //
+  //	Min 0.5(\alpha^T Q \alpha) + p^T \alpha
+  //
+  //		y^T \alpha = \delta
+  //		y_i = +1 or -1
+  //		0 <= alpha_i <= Cp for y_i = 1
+  //		0 <= alpha_i <= Cn for y_i = -1
+  //
+  // Given:
+  //
+  //	Q, p, y, Cp, Cn, and an initial feasible point \alpha
+  //	l is the size of vectors and matrices
+  //	eps is the stopping tolerance
+  //
+  // solution will be put in \alpha, objective value will be put in obj
+  //
+  internal class Solver {
+    protected int active_size;
+    protected sbyte[] y;
+    protected double[] G;		// gradient of objective function
+    private const byte LOWER_BOUND = 0;
+    private const byte UPPER_BOUND = 1;
+    private const byte FREE = 2;
+    private byte[] alpha_status;	// LOWER_BOUND, UPPER_BOUND, FREE
+    private double[] alpha;
+    protected IQMatrix Q;
+    protected float[] QD;
+    protected double EPS;
+    private double Cp, Cn;
+    private double[] p;
+    private int[] active_set;
+    private double[] G_bar;		// gradient, if we treat free variables as 0
+    protected int l;
+    protected bool unshrink;	// XXX
+
+    protected const double INF = double.PositiveInfinity;
+
+    private double get_C(int i) {
+      return (y[i] > 0) ? Cp : Cn;
+    }
+
+    private void update_alpha_status(int i) {
+      if (alpha[i] >= get_C(i))
+        alpha_status[i] = UPPER_BOUND;
+      else if (alpha[i] <= 0)
+        alpha_status[i] = LOWER_BOUND;
+      else alpha_status[i] = FREE;
+    }
+
+    protected bool is_upper_bound(int i) { return alpha_status[i] == UPPER_BOUND; }
+    protected bool is_lower_bound(int i) { return alpha_status[i] == LOWER_BOUND; }
+
+    private bool is_free(int i) { return alpha_status[i] == FREE; }
+
+    public class SolutionInfo {
+      public double obj;
+      public double rho;
+      public double upper_bound_p;
+      public double upper_bound_n;
+      public double r;	// for Solver_NU
+    }
+
+    protected void swap_index(int i, int j) {
+      Q.SwapIndex(i, j);
+      y.SwapIndex(i, j);
+      G.SwapIndex(i, j);
+      alpha_status.SwapIndex(i, j);
+      alpha.SwapIndex(i, j);
+      p.SwapIndex(i, j);
+      active_set.SwapIndex(i, j);
+      G_bar.SwapIndex(i, j);
+    }
+
+    protected void reconstruct_gradient() {
+      // reconstruct inactive elements of G from G_bar and free variables
+
+      if (active_size == l) return;
+
+      int i, j;
+      int nr_free = 0;
+
+      for (j = active_size; j < l; j++)
+        G[j] = G_bar[j] + p[j];
+
+      for (j = 0; j < active_size; j++)
+        if (is_free(j))
+          nr_free++;
+
+      if (2 * nr_free < active_size)
+        Procedures.info("\nWarning: using -h 0 may be faster\n");
+
+      if (nr_free * l > 2 * active_size * (l - active_size)) {
+        for (i = active_size; i < l; i++) {
+          float[] Q_i = Q.GetQ(i, active_size);
+          for (j = 0; j < active_size; j++)
+            if (is_free(j))
+              G[i] += alpha[j] * Q_i[j];
+        }
+      } else {
+        for (i = 0; i < active_size; i++)
+          if (is_free(i)) {
+            float[] Q_i = Q.GetQ(i, l);
+            double alpha_i = alpha[i];
+            for (j = active_size; j < l; j++)
+              G[j] += alpha_i * Q_i[j];
+          }
+      }
+    }
+
+    public virtual void Solve(int l, IQMatrix Q, double[] p_, sbyte[] y_, double[] alpha_, double Cp, double Cn, double eps, SolutionInfo si, bool shrinking) {
+      this.l = l;
+      this.Q = Q;
+      QD = Q.GetQD();
+      p = (double[])p_.Clone();
+      y = (sbyte[])y_.Clone();
+      alpha = (double[])alpha_.Clone();
+      this.Cp = Cp;
+      this.Cn = Cn;
+      this.EPS = eps;
+      this.unshrink = false;
+
+      // initialize alpha_status
+      {
+        alpha_status = new byte[l];
+        for (int i = 0; i < l; i++)
+          update_alpha_status(i);
+      }
+
+      // initialize active set (for shrinking)
+      {
+        active_set = new int[l];
+        for (int i = 0; i < l; i++)
+          active_set[i] = i;
+        active_size = l;
+      }
+
+      // initialize gradient
+      {
+        G = new double[l];
+        G_bar = new double[l];
+        int i;
+        for (i = 0; i < l; i++) {
+          G[i] = p[i];
+          G_bar[i] = 0;
+        }
+        for (i = 0; i < l; i++)
+          if (!is_lower_bound(i)) {
+            float[] Q_i = Q.GetQ(i, l);
+            double alpha_i = alpha[i];
+            int j;
+            for (j = 0; j < l; j++)
+              G[j] += alpha_i * Q_i[j];
+            if (is_upper_bound(i))
+              for (j = 0; j < l; j++)
+                G_bar[j] += get_C(i) * Q_i[j];
+          }
+      }
+
+      // optimization step
+
+      int iter = 0;
+      int counter = Math.Min(l, 1000) + 1;
+      int[] working_set = new int[2];
+
+      while (true) {
+        // show progress and do shrinking
+
+        if (--counter == 0) {
+          counter = Math.Min(l, 1000);
+          if (shrinking) do_shrinking();
+          Procedures.info(".");
+        }
+
+        if (select_working_set(working_set) != 0) {
+          // reconstruct the whole gradient
+          reconstruct_gradient();
+          // reset active set size and check
+          active_size = l;
+          Procedures.info("*");
+          if (select_working_set(working_set) != 0)
+            break;
+          else
+            counter = 1;	// do shrinking next iteration
+        }
+
+        int i = working_set[0];
+        int j = working_set[1];
+
+        ++iter;
+
+        // update alpha[i] and alpha[j], handle bounds carefully
+
+        float[] Q_i = Q.GetQ(i, active_size);
+        float[] Q_j = Q.GetQ(j, active_size);
+
+        double C_i = get_C(i);
+        double C_j = get_C(j);
+
+        double old_alpha_i = alpha[i];
+        double old_alpha_j = alpha[j];
+
+        if (y[i] != y[j]) {
+          double quad_coef = Q_i[i] + Q_j[j] + 2 * Q_i[j];
+          if (quad_coef <= 0)
+            quad_coef = 1e-12;
+          double delta = (-G[i] - G[j]) / quad_coef;
+          double diff = alpha[i] - alpha[j];
+          alpha[i] += delta;
+          alpha[j] += delta;
+
+          if (diff > 0) {
+            if (alpha[j] < 0) {
+              alpha[j] = 0;
+              alpha[i] = diff;
+            }
+          } else {
+            if (alpha[i] < 0) {
+              alpha[i] = 0;
+              alpha[j] = -diff;
+            }
+          }
+          if (diff > C_i - C_j) {
+            if (alpha[i] > C_i) {
+              alpha[i] = C_i;
+              alpha[j] = C_i - diff;
+            }
+          } else {
+            if (alpha[j] > C_j) {
+              alpha[j] = C_j;
+              alpha[i] = C_j + diff;
+            }
+          }
+        } else {
+          double quad_coef = Q_i[i] + Q_j[j] - 2 * Q_i[j];
+          if (quad_coef <= 0)
+            quad_coef = 1e-12;
+          double delta = (G[i] - G[j]) / quad_coef;
+          double sum = alpha[i] + alpha[j];
+          alpha[i] -= delta;
+          alpha[j] += delta;
+
+          if (sum > C_i) {
+            if (alpha[i] > C_i) {
+              alpha[i] = C_i;
+              alpha[j] = sum - C_i;
+            }
+          } else {
+            if (alpha[j] < 0) {
+              alpha[j] = 0;
+              alpha[i] = sum;
+            }
+          }
+          if (sum > C_j) {
+            if (alpha[j] > C_j) {
+              alpha[j] = C_j;
+              alpha[i] = sum - C_j;
+            }
+          } else {
+            if (alpha[i] < 0) {
+              alpha[i] = 0;
+              alpha[j] = sum;
+            }
+          }
+        }
+
+        // update G
+
+        double delta_alpha_i = alpha[i] - old_alpha_i;
+        double delta_alpha_j = alpha[j] - old_alpha_j;
+
+        for (int k = 0; k < active_size; k++) {
+          G[k] += Q_i[k] * delta_alpha_i + Q_j[k] * delta_alpha_j;
+        }
+
+        // update alpha_status and G_bar
+
+        {
+          bool ui = is_upper_bound(i);
+          bool uj = is_upper_bound(j);
+          update_alpha_status(i);
+          update_alpha_status(j);
+          int k;
+          if (ui != is_upper_bound(i)) {
+            Q_i = Q.GetQ(i, l);
+            if (ui)
+              for (k = 0; k < l; k++)
+                G_bar[k] -= C_i * Q_i[k];
+            else
+              for (k = 0; k < l; k++)
+                G_bar[k] += C_i * Q_i[k];
+          }
+
+          if (uj != is_upper_bound(j)) {
+            Q_j = Q.GetQ(j, l);
+            if (uj)
+              for (k = 0; k < l; k++)
+                G_bar[k] -= C_j * Q_j[k];
+            else
+              for (k = 0; k < l; k++)
+                G_bar[k] += C_j * Q_j[k];
+          }
+        }
+
+      }
+
+      // calculate rho
+
+      si.rho = calculate_rho();
+
+      // calculate objective value
+      {
+        double v = 0;
+        int i;
+        for (i = 0; i < l; i++)
+          v += alpha[i] * (G[i] + p[i]);
+
+        si.obj = v / 2;
+      }
+
+      // put back the solution
+      {
+        for (int i = 0; i < l; i++)
+          alpha_[active_set[i]] = alpha[i];
+      }
+
+      si.upper_bound_p = Cp;
+      si.upper_bound_n = Cn;
+
+      Procedures.info("\noptimization finished, #iter = " + iter + "\n");
+    }
+
+    // return 1 if already optimal, return 0 otherwise
+    protected virtual int select_working_set(int[] working_set) {
+      // return i,j such that
+      // i: Maximizes -y_i * grad(f)_i, i in I_up(\alpha)
+      // j: mimimizes the decrease of obj value
+      //    (if quadratic coefficeint <= 0, replace it with tau)
+      //    -y_j*grad(f)_j < -y_i*grad(f)_i, j in I_low(\alpha)
+
+      double GMax = -INF;
+      double GMax2 = -INF;
+      int GMax_idx = -1;
+      int GMin_idx = -1;
+      double obj_diff_Min = INF;
+
+      for (int t = 0; t < active_size; t++)
+        if (y[t] == +1) {
+          if (!is_upper_bound(t))
+            if (-G[t] >= GMax) {
+              GMax = -G[t];
+              GMax_idx = t;
+            }
+        } else {
+          if (!is_lower_bound(t))
+            if (G[t] >= GMax) {
+              GMax = G[t];
+              GMax_idx = t;
+            }
+        }
+
+      int i = GMax_idx;
+      float[] Q_i = null;
+      if (i != -1) // null Q_i not accessed: GMax=-INF if i=-1
+        Q_i = Q.GetQ(i, active_size);
+
+      for (int j = 0; j < active_size; j++) {
+        if (y[j] == +1) {
+          if (!is_lower_bound(j)) {
+            double grad_diff = GMax + G[j];
+            if (G[j] >= GMax2)
+              GMax2 = G[j];
+            if (grad_diff > 0) {
+              double obj_diff;
+              double quad_coef = Q_i[i] + QD[j] - 2.0 * y[i] * Q_i[j];
+              if (quad_coef > 0)
+                obj_diff = -(grad_diff * grad_diff) / quad_coef;
+              else
+                obj_diff = -(grad_diff * grad_diff) / 1e-12;
+
+              if (obj_diff <= obj_diff_Min) {
+                GMin_idx = j;
+                obj_diff_Min = obj_diff;
+              }
+            }
+          }
+        } else {
+          if (!is_upper_bound(j)) {
+            double grad_diff = GMax - G[j];
+            if (-G[j] >= GMax2)
+              GMax2 = -G[j];
+            if (grad_diff > 0) {
+              double obj_diff;
+              double quad_coef = Q_i[i] + QD[j] + 2.0 * y[i] * Q_i[j];
+              if (quad_coef > 0)
+                obj_diff = -(grad_diff * grad_diff) / quad_coef;
+              else
+                obj_diff = -(grad_diff * grad_diff) / 1e-12;
+
+              if (obj_diff <= obj_diff_Min) {
+                GMin_idx = j;
+                obj_diff_Min = obj_diff;
+              }
+            }
+          }
+        }
+      }
+
+      if (GMax + GMax2 < EPS)
+        return 1;
+
+      working_set[0] = GMax_idx;
+      working_set[1] = GMin_idx;
+      return 0;
+    }
+
+    private bool be_shrunk(int i, double GMax1, double GMax2) {
+      if (is_upper_bound(i)) {
+        if (y[i] == +1)
+          return (-G[i] > GMax1);
+        else
+          return (-G[i] > GMax2);
+      } else if (is_lower_bound(i)) {
+        if (y[i] == +1)
+          return (G[i] > GMax2);
+        else
+          return (G[i] > GMax1);
+      } else
+        return (false);
+    }
+
+    protected virtual void do_shrinking() {
+      int i;
+      double GMax1 = -INF;		// Max { -y_i * grad(f)_i | i in I_up(\alpha) }
+      double GMax2 = -INF;		// Max { y_i * grad(f)_i | i in I_low(\alpha) }
+
+      // find Maximal violating pair first
+      for (i = 0; i < active_size; i++) {
+        if (y[i] == +1) {
+          if (!is_upper_bound(i)) {
+            if (-G[i] >= GMax1)
+              GMax1 = -G[i];
+          }
+          if (!is_lower_bound(i)) {
+            if (G[i] >= GMax2)
+              GMax2 = G[i];
+          }
+        } else {
+          if (!is_upper_bound(i)) {
+            if (-G[i] >= GMax2)
+              GMax2 = -G[i];
+          }
+          if (!is_lower_bound(i)) {
+            if (G[i] >= GMax1)
+              GMax1 = G[i];
+          }
+        }
+      }
+
+      if (unshrink == false && GMax1 + GMax2 <= EPS * 10) {
+        unshrink = true;
+        reconstruct_gradient();
+        active_size = l;
+      }
+
+      for (i = 0; i < active_size; i++)
+        if (be_shrunk(i, GMax1, GMax2)) {
+          active_size--;
+          while (active_size > i) {
+            if (!be_shrunk(active_size, GMax1, GMax2)) {
+              swap_index(i, active_size);
+              break;
+            }
+            active_size--;
+          }
+        }
+    }
+
+    protected virtual double calculate_rho() {
+      double r;
+      int nr_free = 0;
+      double ub = INF, lb = -INF, sum_free = 0;
+      for (int i = 0; i < active_size; i++) {
+        double yG = y[i] * G[i];
+
+        if (is_lower_bound(i)) {
+          if (y[i] > 0)
+            ub = Math.Min(ub, yG);
+          else
+            lb = Math.Max(lb, yG);
+        } else if (is_upper_bound(i)) {
+          if (y[i] < 0)
+            ub = Math.Min(ub, yG);
+          else
+            lb = Math.Max(lb, yG);
+        } else {
+          ++nr_free;
+          sum_free += yG;
+        }
+      }
+
+      if (nr_free > 0)
+        r = sum_free / nr_free;
+      else
+        r = (ub + lb) / 2;
+
+      return r;
+    }
+
+  }
+
+  //
+  // Solver for nu-svm classification and regression
+  //
+  // additional constraint: e^T \alpha = constant
+  //
+  class Solver_NU : Solver {
+    private SolutionInfo si;
+
+    public sealed override void Solve(int l, IQMatrix Q, double[] p, sbyte[] y,
+           double[] alpha, double Cp, double Cn, double eps,
+           SolutionInfo si, bool shrinking) {
+      this.si = si;
+      base.Solve(l, Q, p, y, alpha, Cp, Cn, eps, si, shrinking);
+    }
+
+    // return 1 if already optimal, return 0 otherwise
+    protected override sealed int select_working_set(int[] working_set) {
+      // return i,j such that y_i = y_j and
+      // i: Maximizes -y_i * grad(f)_i, i in I_up(\alpha)
+      // j: Minimizes the decrease of obj value
+      //    (if quadratic coefficeint <= 0, replace it with tau)
+      //    -y_j*grad(f)_j < -y_i*grad(f)_i, j in I_low(\alpha)
+
+      double GMaxp = -INF;
+      double GMaxp2 = -INF;
+      int GMaxp_idx = -1;
+
+      double GMaxn = -INF;
+      double GMaxn2 = -INF;
+      int GMaxn_idx = -1;
+
+      int GMin_idx = -1;
+      double obj_diff_Min = INF;
+
+      for (int t = 0; t < active_size; t++)
+        if (y[t] == +1) {
+          if (!is_upper_bound(t))
+            if (-G[t] >= GMaxp) {
+              GMaxp = -G[t];
+              GMaxp_idx = t;
+            }
+        } else {
+          if (!is_lower_bound(t))
+            if (G[t] >= GMaxn) {
+              GMaxn = G[t];
+              GMaxn_idx = t;
+            }
+        }
+
+      int ip = GMaxp_idx;
+      int iN = GMaxn_idx;
+      float[] Q_ip = null;
+      float[] Q_in = null;
+      if (ip != -1) // null Q_ip not accessed: GMaxp=-INF if ip=-1
+        Q_ip = Q.GetQ(ip, active_size);
+      if (iN != -1)
+        Q_in = Q.GetQ(iN, active_size);
+
+      for (int j = 0; j < active_size; j++) {
+        if (y[j] == +1) {
+          if (!is_lower_bound(j)) {
+            double grad_diff = GMaxp + G[j];
+            if (G[j] >= GMaxp2)
+              GMaxp2 = G[j];
+            if (grad_diff > 0) {
+              double obj_diff;
+              double quad_coef = Q_ip[ip] + QD[j] - 2 * Q_ip[j];
+              if (quad_coef > 0)
+                obj_diff = -(grad_diff * grad_diff) / quad_coef;
+              else
+                obj_diff = -(grad_diff * grad_diff) / 1e-12;
+
+              if (obj_diff <= obj_diff_Min) {
+                GMin_idx = j;
+                obj_diff_Min = obj_diff;
+              }
+            }
+          }
+        } else {
+          if (!is_upper_bound(j)) {
+            double grad_diff = GMaxn - G[j];
+            if (-G[j] >= GMaxn2)
+              GMaxn2 = -G[j];
+            if (grad_diff > 0) {
+              double obj_diff;
+              double quad_coef = Q_in[iN] + QD[j] - 2 * Q_in[j];
+              if (quad_coef > 0)
+                obj_diff = -(grad_diff * grad_diff) / quad_coef;
+              else
+                obj_diff = -(grad_diff * grad_diff) / 1e-12;
+
+              if (obj_diff <= obj_diff_Min) {
+                GMin_idx = j;
+                obj_diff_Min = obj_diff;
+              }
+            }
+          }
+        }
+      }
+
+      if (Math.Max(GMaxp + GMaxp2, GMaxn + GMaxn2) < EPS)
+        return 1;
+
+      if (y[GMin_idx] == +1)
+        working_set[0] = GMaxp_idx;
+      else
+        working_set[0] = GMaxn_idx;
+      working_set[1] = GMin_idx;
+
+      return 0;
+    }
+
+    private bool be_shrunk(int i, double GMax1, double GMax2, double GMax3, double GMax4) {
+      if (is_upper_bound(i)) {
+        if (y[i] == +1)
+          return (-G[i] > GMax1);
+        else
+          return (-G[i] > GMax4);
+      } else if (is_lower_bound(i)) {
+        if (y[i] == +1)
+          return (G[i] > GMax2);
+        else
+          return (G[i] > GMax3);
+      } else
+        return (false);
+    }
+
+    protected override sealed void do_shrinking() {
+      double GMax1 = -INF;	// Max { -y_i * grad(f)_i | y_i = +1, i in I_up(\alpha) }
+      double GMax2 = -INF;	// Max { y_i * grad(f)_i | y_i = +1, i in I_low(\alpha) }
+      double GMax3 = -INF;	// Max { -y_i * grad(f)_i | y_i = -1, i in I_up(\alpha) }
+      double GMax4 = -INF;	// Max { y_i * grad(f)_i | y_i = -1, i in I_low(\alpha) }
+
+      // find Maximal violating pair first
+      int i;
+      for (i = 0; i < active_size; i++) {
+        if (!is_upper_bound(i)) {
+          if (y[i] == +1) {
+            if (-G[i] > GMax1) GMax1 = -G[i];
+          } else if (-G[i] > GMax4) GMax4 = -G[i];
+        }
+        if (!is_lower_bound(i)) {
+          if (y[i] == +1) {
+            if (G[i] > GMax2) GMax2 = G[i];
+          } else if (G[i] > GMax3) GMax3 = G[i];
+        }
+      }
+
+      if (unshrink == false && Math.Max(GMax1 + GMax2, GMax3 + GMax4) <= EPS * 10) {
+        unshrink = true;
+        reconstruct_gradient();
+        active_size = l;
+      }
+
+      for (i = 0; i < active_size; i++)
+        if (be_shrunk(i, GMax1, GMax2, GMax3, GMax4)) {
+          active_size--;
+          while (active_size > i) {
+            if (!be_shrunk(active_size, GMax1, GMax2, GMax3, GMax4)) {
+              swap_index(i, active_size);
+              break;
+            }
+            active_size--;
+          }
+        }
+    }
+
+    protected override sealed double calculate_rho() {
+      int nr_free1 = 0, nr_free2 = 0;
+      double ub1 = INF, ub2 = INF;
+      double lb1 = -INF, lb2 = -INF;
+      double sum_free1 = 0, sum_free2 = 0;
+
+      for (int i = 0; i < active_size; i++) {
+        if (y[i] == +1) {
+          if (is_lower_bound(i))
+            ub1 = Math.Min(ub1, G[i]);
+          else if (is_upper_bound(i))
+            lb1 = Math.Max(lb1, G[i]);
+          else {
+            ++nr_free1;
+            sum_free1 += G[i];
+          }
+        } else {
+          if (is_lower_bound(i))
+            ub2 = Math.Min(ub2, G[i]);
+          else if (is_upper_bound(i))
+            lb2 = Math.Max(lb2, G[i]);
+          else {
+            ++nr_free2;
+            sum_free2 += G[i];
+          }
+        }
+      }
+
+      double r1, r2;
+      if (nr_free1 > 0)
+        r1 = sum_free1 / nr_free1;
+      else
+        r1 = (ub1 + lb1) / 2;
+
+      if (nr_free2 > 0)
+        r2 = sum_free2 / nr_free2;
+      else
+        r2 = (ub2 + lb2) / 2;
+
+      si.r = (r1 + r2) / 2;
+      return (r1 - r2) / 2;
+    }
+  }
+
+  //
+  // Q matrices for various formulations
+  //
+  class SVC_Q : Kernel {
+    private sbyte[] y;
+    private Cache cache;
+    private float[] QD;
+
+    public SVC_Q(Problem prob, Parameter param, sbyte[] y_)
+      : base(prob.Count, prob.X, param) {
+      y = (sbyte[])y_.Clone();
+      cache = new Cache(prob.Count, (long)(param.CacheSize * (1 << 20)));
+      QD = new float[prob.Count];
+      for (int i = 0; i < prob.Count; i++)
+        QD[i] = (float)KernelFunction(i, i);
+    }
+
+    public override sealed float[] GetQ(int i, int len) {
+      float[] data = null;
+      int start, j;
+      if ((start = cache.GetData(i, ref data, len)) < len) {
+        for (j = start; j < len; j++)
+          data[j] = (float)(y[i] * y[j] * KernelFunction(i, j));
+      }
+      return data;
+    }
+
+    public override sealed float[] GetQD() {
+      return QD;
+    }
+
+    public override sealed void SwapIndex(int i, int j) {
+      cache.SwapIndex(i, j);
+      base.SwapIndex(i, j);
+      y.SwapIndex(i, j);
+      QD.SwapIndex(i, j);
+    }
+  }
+
+  class ONE_CLASS_Q : Kernel {
+    private Cache cache;
+    private float[] QD;
+
+    public ONE_CLASS_Q(Problem prob, Parameter param)
+      : base(prob.Count, prob.X, param) {
+      cache = new Cache(prob.Count, (long)(param.CacheSize * (1 << 20)));
+      QD = new float[prob.Count];
+      for (int i = 0; i < prob.Count; i++)
+        QD[i] = (float)KernelFunction(i, i);
+    }
+
+    public override sealed float[] GetQ(int i, int len) {
+      float[] data = null;
+      int start, j;
+      if ((start = cache.GetData(i, ref data, len)) < len) {
+        for (j = start; j < len; j++)
+          data[j] = (float)KernelFunction(i, j);
+      }
+      return data;
+    }
+
+    public override sealed float[] GetQD() {
+      return QD;
+    }
+
+    public override sealed void SwapIndex(int i, int j) {
+      cache.SwapIndex(i, j);
+      base.SwapIndex(i, j);
+      QD.SwapIndex(i, j);
+    }
+  }
+
+  class SVR_Q : Kernel {
+    private int l;
+    private Cache cache;
+    private sbyte[] sign;
+    private int[] index;
+    private int next_buffer;
+    private float[][] buffer;
+    private float[] QD;
+
+    public SVR_Q(Problem prob, Parameter param)
+      : base(prob.Count, prob.X, param) {
+      l = prob.Count;
+      cache = new Cache(l, (long)(param.CacheSize * (1 << 20)));
+      QD = new float[2 * l];
+      sign = new sbyte[2 * l];
+      index = new int[2 * l];
+      for (int k = 0; k < l; k++) {
+        sign[k] = 1;
+        sign[k + l] = -1;
+        index[k] = k;
+        index[k + l] = k;
+        QD[k] = (float)KernelFunction(k, k);
+        QD[k + l] = QD[k];
+      }
+      buffer = new float[2][];
+      buffer[0] = new float[2 * l];
+      buffer[1] = new float[2 * l];
+      next_buffer = 0;
+    }
+
+    public override sealed void SwapIndex(int i, int j) {
+      sign.SwapIndex(i, j);
+      index.SwapIndex(i, j);
+      QD.SwapIndex(i, j);
+    }
+
+    public override sealed float[] GetQ(int i, int len) {
+      float[] data = null;
+      int j, real_i = index[i];
+      if (cache.GetData(real_i, ref data, l) < l) {
+        for (j = 0; j < l; j++)
+          data[j] = (float)KernelFunction(real_i, j);
+      }
+
+      // reorder and copy
+      float[] buf = buffer[next_buffer];
+      next_buffer = 1 - next_buffer;
+      sbyte si = sign[i];
+      for (j = 0; j < len; j++)
+        buf[j] = (float)si * sign[j] * data[index[j]];
+      return buf;
+    }
+
+    public override sealed float[] GetQD() {
+      return QD;
+    }
+  }
+
+  internal class Procedures {
+    private static bool _verbose;
+    public static bool IsVerbose {
+      get {
+        return _verbose;
+      }
+      set {
+        _verbose = value;
+      }
+    }
     //
-    //	Min 0.5(\alpha^T Q \alpha) + p^T \alpha
+    // construct and solve various formulations
     //
-    //		y^T \alpha = \delta
-    //		y_i = +1 or -1
-    //		0 <= alpha_i <= Cp for y_i = 1
-    //		0 <= alpha_i <= Cn for y_i = -1
+    public const int LIBSVM_VERSION = 289;
+
+    public static TextWriter svm_print_string = Console.Out;
+
+    public static void info(string s) {
+      if (_verbose)
+        svm_print_string.Write(s);
+    }
+
+    private static void solve_c_svc(Problem prob, Parameter param,
+                    double[] alpha, Solver.SolutionInfo si,
+                    double Cp, double Cn) {
+      int l = prob.Count;
+      double[] Minus_ones = new double[l];
+      sbyte[] y = new sbyte[l];
+
+      int i;
+
+      for (i = 0; i < l; i++) {
+        alpha[i] = 0;
+        Minus_ones[i] = -1;
+        if (prob.Y[i] > 0) y[i] = +1; else y[i] = -1;
+      }
+
+      Solver s = new Solver();
+      s.Solve(l, new SVC_Q(prob, param, y), Minus_ones, y,
+          alpha, Cp, Cn, param.EPS, si, param.Shrinking);
+
+      double sum_alpha = 0;
+      for (i = 0; i < l; i++)
+        sum_alpha += alpha[i];
+
+      if (Cp == Cn)
+        Procedures.info("nu = " + sum_alpha / (Cp * prob.Count) + "\n");
+
+      for (i = 0; i < l; i++)
+        alpha[i] *= y[i];
+    }
+
+    private static void solve_nu_svc(Problem prob, Parameter param,
+                    double[] alpha, Solver.SolutionInfo si) {
+      int i;
+      int l = prob.Count;
+      double nu = param.Nu;
+
+      sbyte[] y = new sbyte[l];
+
+      for (i = 0; i < l; i++)
+        if (prob.Y[i] > 0)
+          y[i] = +1;
+        else
+          y[i] = -1;
+
+      double sum_pos = nu * l / 2;
+      double sum_neg = nu * l / 2;
+
+      for (i = 0; i < l; i++)
+        if (y[i] == +1) {
+          alpha[i] = Math.Min(1.0, sum_pos);
+          sum_pos -= alpha[i];
+        } else {
+          alpha[i] = Math.Min(1.0, sum_neg);
+          sum_neg -= alpha[i];
+        }
+
+      double[] zeros = new double[l];
+
+      for (i = 0; i < l; i++)
+        zeros[i] = 0;
+
+      Solver_NU s = new Solver_NU();
+      s.Solve(l, new SVC_Q(prob, param, y), zeros, y, alpha, 1.0, 1.0, param.EPS, si, param.Shrinking);
+      double r = si.r;
+
+      Procedures.info("C = " + 1 / r + "\n");
+
+      for (i = 0; i < l; i++)
+        alpha[i] *= y[i] / r;
+
+      si.rho /= r;
+      si.obj /= (r * r);
+      si.upper_bound_p = 1 / r;
+      si.upper_bound_n = 1 / r;
+    }
+
+    private static void solve_one_class(Problem prob, Parameter param,
+                    double[] alpha, Solver.SolutionInfo si) {
+      int l = prob.Count;
+      double[] zeros = new double[l];
+      sbyte[] ones = new sbyte[l];
+      int i;
+
+      int n = (int)(param.Nu * prob.Count);	// # of alpha's at upper bound
+
+      for (i = 0; i < n; i++)
+        alpha[i] = 1;
+      if (n < prob.Count)
+        alpha[n] = param.Nu * prob.Count - n;
+      for (i = n + 1; i < l; i++)
+        alpha[i] = 0;
+
+      for (i = 0; i < l; i++) {
+        zeros[i] = 0;
+        ones[i] = 1;
+      }
+
+      Solver s = new Solver();
+      s.Solve(l, new ONE_CLASS_Q(prob, param), zeros, ones, alpha, 1.0, 1.0, param.EPS, si, param.Shrinking);
+    }
+
+    private static void solve_epsilon_svr(Problem prob, Parameter param, double[] alpha, Solver.SolutionInfo si) {
+      int l = prob.Count;
+      double[] alpha2 = new double[2 * l];
+      double[] linear_term = new double[2 * l];
+      sbyte[] y = new sbyte[2 * l];
+      int i;
+
+      for (i = 0; i < l; i++) {
+        alpha2[i] = 0;
+        linear_term[i] = param.P - prob.Y[i];
+        y[i] = 1;
+
+        alpha2[i + l] = 0;
+        linear_term[i + l] = param.P + prob.Y[i];
+        y[i + l] = -1;
+      }
+
+      Solver s = new Solver();
+      s.Solve(2 * l, new SVR_Q(prob, param), linear_term, y, alpha2, param.C, param.C, param.EPS, si, param.Shrinking);
+
+      double sum_alpha = 0;
+      for (i = 0; i < l; i++) {
+        alpha[i] = alpha2[i] - alpha2[i + l];
+        sum_alpha += Math.Abs(alpha[i]);
+      }
+      Procedures.info("nu = " + sum_alpha / (param.C * l) + "\n");
+    }
+
+    private static void solve_nu_svr(Problem prob, Parameter param,
+                    double[] alpha, Solver.SolutionInfo si) {
+      int l = prob.Count;
+      double C = param.C;
+      double[] alpha2 = new double[2 * l];
+      double[] linear_term = new double[2 * l];
+      sbyte[] y = new sbyte[2 * l];
+      int i;
+
+      double sum = C * param.Nu * l / 2;
+      for (i = 0; i < l; i++) {
+        alpha2[i] = alpha2[i + l] = Math.Min(sum, C);
+        sum -= alpha2[i];
+
+        linear_term[i] = -prob.Y[i];
+        y[i] = 1;
+
+        linear_term[i + l] = prob.Y[i];
+        y[i + l] = -1;
+      }
+
+      Solver_NU s = new Solver_NU();
+      s.Solve(2 * l, new SVR_Q(prob, param), linear_term, y, alpha2, C, C, param.EPS, si, param.Shrinking);
+
+      Procedures.info("epsilon = " + (-si.r) + "\n");
+
+      for (i = 0; i < l; i++)
+        alpha[i] = alpha2[i] - alpha2[i + l];
+    }
+
     //
-    // Given:
+    // decision_function
     //
-    //	Q, p, y, Cp, Cn, and an initial feasible point \alpha
-    //	l is the size of vectors and matrices
-    //	eps is the stopping tolerance
+    internal class decision_function {
+      public double[] alpha;
+      public double rho;
+    };
+
+    static decision_function svm_train_one(Problem prob, Parameter param, double Cp, double Cn) {
+      double[] alpha = new double[prob.Count];
+      Solver.SolutionInfo si = new Solver.SolutionInfo();
+      switch (param.SvmType) {
+        case SvmType.C_SVC:
+          solve_c_svc(prob, param, alpha, si, Cp, Cn);
+          break;
+        case SvmType.NU_SVC:
+          solve_nu_svc(prob, param, alpha, si);
+          break;
+        case SvmType.ONE_CLASS:
+          solve_one_class(prob, param, alpha, si);
+          break;
+        case SvmType.EPSILON_SVR:
+          solve_epsilon_svr(prob, param, alpha, si);
+          break;
+        case SvmType.NU_SVR:
+          solve_nu_svr(prob, param, alpha, si);
+          break;
+      }
+
+      Procedures.info("obj = " + si.obj + ", rho = " + si.rho + "\n");
+
+      // output SVs
+
+      int nSV = 0;
+      int nBSV = 0;
+      for (int i = 0; i < prob.Count; i++) {
+        if (Math.Abs(alpha[i]) > 0) {
+          ++nSV;
+          if (prob.Y[i] > 0) {
+            if (Math.Abs(alpha[i]) >= si.upper_bound_p)
+              ++nBSV;
+          } else {
+            if (Math.Abs(alpha[i]) >= si.upper_bound_n)
+              ++nBSV;
+          }
+        }
+      }
+
+      Procedures.info("nSV = " + nSV + ", nBSV = " + nBSV + "\n");
+
+      decision_function f = new decision_function();
+      f.alpha = alpha;
+      f.rho = si.rho;
+      return f;
+    }
+
+    // Platt's binary SVM Probablistic Output: an improvement from Lin et al.
+    private static void sigmoid_train(int l, double[] dec_values, double[] labels,
+                  double[] probAB) {
+      double A, B;
+      double prior1 = 0, prior0 = 0;
+      int i;
+
+      for (i = 0; i < l; i++)
+        if (labels[i] > 0) prior1 += 1;
+        else prior0 += 1;
+
+      int Max_iter = 100;	// Maximal number of iterations
+      double Min_step = 1e-10;	// Minimal step taken in line search
+      double sigma = 1e-12;	// For numerically strict PD of Hessian
+      double eps = 1e-5;
+      double hiTarget = (prior1 + 1.0) / (prior1 + 2.0);
+      double loTarget = 1 / (prior0 + 2.0);
+      double[] t = new double[l];
+      double fApB, p, q, h11, h22, h21, g1, g2, det, dA, dB, gd, stepsize;
+      double newA, newB, newf, d1, d2;
+      int iter;
+
+      // Initial Point and Initial Fun Value
+      A = 0.0; B = Math.Log((prior0 + 1.0) / (prior1 + 1.0));
+      double fval = 0.0;
+
+      for (i = 0; i < l; i++) {
+        if (labels[i] > 0) t[i] = hiTarget;
+        else t[i] = loTarget;
+        fApB = dec_values[i] * A + B;
+        if (fApB >= 0)
+          fval += t[i] * fApB + Math.Log(1 + Math.Exp(-fApB));
+        else
+          fval += (t[i] - 1) * fApB + Math.Log(1 + Math.Exp(fApB));
+      }
+      for (iter = 0; iter < Max_iter; iter++) {
+        // Update Gradient and Hessian (use H' = H + sigma I)
+        h11 = sigma; // numerically ensures strict PD
+        h22 = sigma;
+        h21 = 0.0; g1 = 0.0; g2 = 0.0;
+        for (i = 0; i < l; i++) {
+          fApB = dec_values[i] * A + B;
+          if (fApB >= 0) {
+            p = Math.Exp(-fApB) / (1.0 + Math.Exp(-fApB));
+            q = 1.0 / (1.0 + Math.Exp(-fApB));
+          } else {
+            p = 1.0 / (1.0 + Math.Exp(fApB));
+            q = Math.Exp(fApB) / (1.0 + Math.Exp(fApB));
+          }
+          d2 = p * q;
+          h11 += dec_values[i] * dec_values[i] * d2;
+          h22 += d2;
+          h21 += dec_values[i] * d2;
+          d1 = t[i] - p;
+          g1 += dec_values[i] * d1;
+          g2 += d1;
+        }
+
+        // Stopping Criteria
+        if (Math.Abs(g1) < eps && Math.Abs(g2) < eps)
+          break;
+
+        // Finding Newton direction: -inv(H') * g
+        det = h11 * h22 - h21 * h21;
+        dA = -(h22 * g1 - h21 * g2) / det;
+        dB = -(-h21 * g1 + h11 * g2) / det;
+        gd = g1 * dA + g2 * dB;
+
+
+        stepsize = 1;		// Line Search
+        while (stepsize >= Min_step) {
+          newA = A + stepsize * dA;
+          newB = B + stepsize * dB;
+
+          // New function value
+          newf = 0.0;
+          for (i = 0; i < l; i++) {
+            fApB = dec_values[i] * newA + newB;
+            if (fApB >= 0)
+              newf += t[i] * fApB + Math.Log(1 + Math.Exp(-fApB));
+            else
+              newf += (t[i] - 1) * fApB + Math.Log(1 + Math.Exp(fApB));
+          }
+          // Check sufficient decrease
+          if (newf < fval + 0.0001 * stepsize * gd) {
+            A = newA; B = newB; fval = newf;
+            break;
+          } else
+            stepsize = stepsize / 2.0;
+        }
+
+        if (stepsize < Min_step) {
+          Procedures.info("Line search fails in two-class probability estimates\n");
+          break;
+        }
+      }
+
+      if (iter >= Max_iter)
+        Procedures.info("Reaching Maximal iterations in two-class probability estimates\n");
+      probAB[0] = A; probAB[1] = B;
+    }
+
+    private static double sigmoid_predict(double decision_value, double A, double B) {
+      double fApB = decision_value * A + B;
+      if (fApB >= 0)
+        return Math.Exp(-fApB) / (1.0 + Math.Exp(-fApB));
+      else
+        return 1.0 / (1 + Math.Exp(fApB));
+    }
+
+    // Method 2 from the multiclass_prob paper by Wu, Lin, and Weng
+    private static void multiclass_probability(int k, double[,] r, double[] p) {
+      int t, j;
+      int iter = 0, Max_iter = Math.Max(100, k);
+      double[,] Q = new double[k, k];
+      double[] Qp = new double[k];
+      double pQp, eps = 0.005 / k;
+
+      for (t = 0; t < k; t++) {
+        p[t] = 1.0 / k;  // Valid if k = 1
+        Q[t, t] = 0;
+        for (j = 0; j < t; j++) {
+          Q[t, t] += r[j, t] * r[j, t];
+          Q[t, j] = Q[j, t];
+        }
+        for (j = t + 1; j < k; j++) {
+          Q[t, t] += r[j, t] * r[j, t];
+          Q[t, j] = -r[j, t] * r[t, j];
+        }
+      }
+      for (iter = 0; iter < Max_iter; iter++) {
+        // stopping condition, recalculate QP,pQP for numerical accuracy
+        pQp = 0;
+        for (t = 0; t < k; t++) {
+          Qp[t] = 0;
+          for (j = 0; j < k; j++)
+            Qp[t] += Q[t, j] * p[j];
+          pQp += p[t] * Qp[t];
+        }
+        double Max_error = 0;
+        for (t = 0; t < k; t++) {
+          double error = Math.Abs(Qp[t] - pQp);
+          if (error > Max_error)
+            Max_error = error;
+        }
+        if (Max_error < eps) break;
+
+        for (t = 0; t < k; t++) {
+          double diff = (-Qp[t] + pQp) / Q[t, t];
+          p[t] += diff;
+          pQp = (pQp + diff * (diff * Q[t, t] + 2 * Qp[t])) / (1 + diff) / (1 + diff);
+          for (j = 0; j < k; j++) {
+            Qp[j] = (Qp[j] + diff * Q[t, j]) / (1 + diff);
+            p[j] /= (1 + diff);
+          }
+        }
+      }
+      if (iter >= Max_iter)
+        Procedures.info("Exceeds Max_iter in multiclass_prob\n");
+    }
+
+    // Cross-validation decision values for probability estimates
+    private static void svm_binary_svc_probability(Problem prob, Parameter param, double Cp, double Cn, double[] probAB) {
+      int i;
+      int nr_fold = 5;
+      int[] perm = new int[prob.Count];
+      double[] dec_values = new double[prob.Count];
+
+      // random shuffle
+      Random rand = new Random();
+      for (i = 0; i < prob.Count; i++) perm[i] = i;
+      for (i = 0; i < prob.Count; i++) {
+        int j = i + (int)(rand.NextDouble() * (prob.Count - i));
+        do { int _ = perm[i]; perm[i] = perm[j]; perm[j] = _; } while (false);
+      }
+      for (i = 0; i < nr_fold; i++) {
+        int begin = i * prob.Count / nr_fold;
+        int end = (i + 1) * prob.Count / nr_fold;
+        int j, k;
+        Problem subprob = new Problem();
+
+        subprob.Count = prob.Count - (end - begin);
+        subprob.X = new Node[subprob.Count][];
+        subprob.Y = new double[subprob.Count];
+
+        k = 0;
+        for (j = 0; j < begin; j++) {
+          subprob.X[k] = prob.X[perm[j]];
+          subprob.Y[k] = prob.Y[perm[j]];
+          ++k;
+        }
+        for (j = end; j < prob.Count; j++) {
+          subprob.X[k] = prob.X[perm[j]];
+          subprob.Y[k] = prob.Y[perm[j]];
+          ++k;
+        }
+        int p_count = 0, n_count = 0;
+        for (j = 0; j < k; j++)
+          if (subprob.Y[j] > 0)
+            p_count++;
+          else
+            n_count++;
+
+        if (p_count == 0 && n_count == 0)
+          for (j = begin; j < end; j++)
+            dec_values[perm[j]] = 0;
+        else if (p_count > 0 && n_count == 0)
+          for (j = begin; j < end; j++)
+            dec_values[perm[j]] = 1;
+        else if (p_count == 0 && n_count > 0)
+          for (j = begin; j < end; j++)
+            dec_values[perm[j]] = -1;
+        else {
+          Parameter subparam = (Parameter)param.Clone();
+          subparam.Probability = false;
+          subparam.C = 1.0;
+          subparam.Weights[1] = Cp;
+          subparam.Weights[-1] = Cn;
+          Model submodel = svm_train(subprob, subparam);
+          for (j = begin; j < end; j++) {
+            double[] dec_value = new double[1];
+            svm_predict_values(submodel, prob.X[perm[j]], dec_value);
+            dec_values[perm[j]] = dec_value[0];
+            // ensure +1 -1 order; reason not using CV subroutine
+            dec_values[perm[j]] *= submodel.ClassLabels[0];
+          }
+        }
+      }
+      sigmoid_train(prob.Count, dec_values, prob.Y, probAB);
+    }
+
+    // Return parameter of a Laplace distribution 
+    private static double svm_svr_probability(Problem prob, Parameter param) {
+      int i;
+      int nr_fold = 5;
+      double[] ymv = new double[prob.Count];
+      double mae = 0;
+
+      Parameter newparam = (Parameter)param.Clone();
+      newparam.Probability = false;
+      svm_cross_validation(prob, newparam, nr_fold, ymv, true);
+      for (i = 0; i < prob.Count; i++) {
+        ymv[i] = prob.Y[i] - ymv[i];
+        mae += Math.Abs(ymv[i]);
+      }
+      mae /= prob.Count;
+      double std = Math.Sqrt(2 * mae * mae);
+      int count = 0;
+      mae = 0;
+      for (i = 0; i < prob.Count; i++)
+        if (Math.Abs(ymv[i]) > 5 * std)
+          count = count + 1;
+        else
+          mae += Math.Abs(ymv[i]);
+      mae /= (prob.Count - count);
+      Procedures.info("Prob. model for test data: target value = predicted value + z,\nz: Laplace distribution e^(-|z|/sigma)/(2sigma),sigma=" + mae + "\n");
+      return mae;
+    }
+
+    // label: label name, start: begin of each class, count: #data of classes, perm: indices to the original data
+    // perm, length l, must be allocated before calling this subroutine
+    private static void svm_group_classes(Problem prob, int[] nr_class_ret, int[][] label_ret, int[][] start_ret, int[][] count_ret, int[] perm) {
+      int l = prob.Count;
+      int Max_nr_class = 16;
+      int nr_class = 0;
+      int[] label = new int[Max_nr_class];
+      int[] count = new int[Max_nr_class];
+      int[] data_label = new int[l];
+      int i;
+
+      for (i = 0; i < l; i++) {
+        int this_label = (int)(prob.Y[i]);
+        int j;
+        for (j = 0; j < nr_class; j++) {
+          if (this_label == label[j]) {
+            ++count[j];
+            break;
+          }
+        }
+        data_label[i] = j;
+        if (j == nr_class) {
+          if (nr_class == Max_nr_class) {
+            Max_nr_class *= 2;
+            int[] new_data = new int[Max_nr_class];
+            Array.Copy(label, 0, new_data, 0, label.Length);
+            label = new_data;
+            new_data = new int[Max_nr_class];
+            Array.Copy(count, 0, new_data, 0, count.Length);
+            count = new_data;
+          }
+          label[nr_class] = this_label;
+          count[nr_class] = 1;
+          ++nr_class;
+        }
+      }
+
+      int[] start = new int[nr_class];
+      start[0] = 0;
+      for (i = 1; i < nr_class; i++)
+        start[i] = start[i - 1] + count[i - 1];
+      for (i = 0; i < l; i++) {
+        perm[start[data_label[i]]] = i;
+        ++start[data_label[i]];
+      }
+      start[0] = 0;
+      for (i = 1; i < nr_class; i++)
+        start[i] = start[i - 1] + count[i - 1];
+
+      nr_class_ret[0] = nr_class;
+      label_ret[0] = label;
+      start_ret[0] = start;
+      count_ret[0] = count;
+    }
+
     //
-    // solution will be put in \alpha, objective value will be put in obj
+    // Interface functions
     //
-    internal class Solver
-    {
-        protected int active_size;
-        protected sbyte[] y;
-        protected double[] G;		// gradient of objective function
-        private const byte LOWER_BOUND = 0;
-        private const byte UPPER_BOUND = 1;
-        private const byte FREE = 2;
-        private byte[] alpha_status;	// LOWER_BOUND, UPPER_BOUND, FREE
-        private double[] alpha;
-        protected IQMatrix Q;
-        protected float[] QD;
-        protected double EPS;
-        private double Cp, Cn;
-        private double[] p;
-        private int[] active_set;
-        private double[] G_bar;		// gradient, if we treat free variables as 0
-        protected int l;
-        protected bool unshrink;	// XXX
-
-        protected const double INF = double.PositiveInfinity;
-
-        private double get_C(int i)
-        {
-            return (y[i] > 0) ? Cp : Cn;
-        }
-
-        private void update_alpha_status(int i)
-        {
-            if (alpha[i] >= get_C(i))
-                alpha_status[i] = UPPER_BOUND;
-            else if (alpha[i] <= 0)
-                alpha_status[i] = LOWER_BOUND;
-            else alpha_status[i] = FREE;
-        }
-
-        protected bool is_upper_bound(int i) { return alpha_status[i] == UPPER_BOUND; }
-        protected bool is_lower_bound(int i) { return alpha_status[i] == LOWER_BOUND; }
-
-        private bool is_free(int i) { return alpha_status[i] == FREE; }
-
-        public class SolutionInfo
-        {
-            public double obj;
-            public double rho;
-            public double upper_bound_p;
-            public double upper_bound_n;
-            public double r;	// for Solver_NU
-        }
-
-        protected void swap_index(int i, int j)
-        {
-            Q.SwapIndex(i, j);
-            y.SwapIndex(i, j);
-            G.SwapIndex(i, j);
-            alpha_status.SwapIndex(i, j);
-            alpha.SwapIndex(i, j);
-            p.SwapIndex(i, j);
-            active_set.SwapIndex(i, j);
-            G_bar.SwapIndex(i, j);
-        }
-
-        protected void reconstruct_gradient()
-        {
-            // reconstruct inactive elements of G from G_bar and free variables
-
-            if (active_size == l) return;
-
-            int i, j;
-            int nr_free = 0;
-
-            for (j = active_size; j < l; j++)
-                G[j] = G_bar[j] + p[j];
-
-            for (j = 0; j < active_size; j++)
-                if (is_free(j))
-                    nr_free++;
-
-            if (2 * nr_free < active_size)
-                Procedures.info("\nWarning: using -h 0 may be faster\n");
-
-            if (nr_free * l > 2 * active_size * (l - active_size))
-            {
-                for (i = active_size; i < l; i++)
-                {
-                    float[] Q_i = Q.GetQ(i, active_size);
-                    for (j = 0; j < active_size; j++)
-                        if (is_free(j))
-                            G[i] += alpha[j] * Q_i[j];
-                }
-            }
+    public static Model svm_train(Problem prob, Parameter param) {
+      Model model = new Model();
+      model.Parameter = param;
+
+      if (param.SvmType == SvmType.ONE_CLASS ||
+         param.SvmType == SvmType.EPSILON_SVR ||
+         param.SvmType == SvmType.NU_SVR) {
+        // regression or one-class-svm
+        model.NumberOfClasses = 2;
+        model.ClassLabels = null;
+        model.NumberOfSVPerClass = null;
+        model.PairwiseProbabilityA = null; model.PairwiseProbabilityB = null;
+        model.SupportVectorCoefficients = new double[1][];
+
+        if (param.Probability &&
+           (param.SvmType == SvmType.EPSILON_SVR ||
+            param.SvmType == SvmType.NU_SVR)) {
+          model.PairwiseProbabilityA = new double[1];
+          model.PairwiseProbabilityA[0] = svm_svr_probability(prob, param);
+        }
+
+        decision_function f = svm_train_one(prob, param, 0, 0);
+        model.Rho = new double[1];
+        model.Rho[0] = f.rho;
+
+        int nSV = 0;
+        int i;
+        for (i = 0; i < prob.Count; i++)
+          if (Math.Abs(f.alpha[i]) > 0) ++nSV;
+        model.SupportVectorCount = nSV;
+        model.SupportVectorIndizes = new int[nSV];
+        model.SupportVectors = new Node[nSV][];
+        model.SupportVectorCoefficients[0] = new double[nSV];
+
+        int j = 0;
+        for (i = 0; i < prob.Count; i++)
+          if (Math.Abs(f.alpha[i]) > 0) {
+            model.SupportVectors[j] = prob.X[i];
+            model.SupportVectorIndizes[j] = i;
+            model.SupportVectorCoefficients[0][j] = f.alpha[i];
+
+            ++j;
+          }
+      } else {
+        // classification
+        int l = prob.Count;
+        int[] tmp_nr_class = new int[1];
+        int[][] tmp_label = new int[1][];
+        int[][] tmp_start = new int[1][];
+        int[][] tmp_count = new int[1][];
+        int[] perm = new int[l];
+
+        // group training data of the same class
+        svm_group_classes(prob, tmp_nr_class, tmp_label, tmp_start, tmp_count, perm);
+        int nr_class = tmp_nr_class[0];
+        int[] label = tmp_label[0];
+        int[] start = tmp_start[0];
+        int[] count = tmp_count[0];
+        Node[][] x = new Node[l][];
+        int i;
+        for (i = 0; i < l; i++)
+          x[i] = prob.X[perm[i]];
+
+        // calculate weighted C
+
+        double[] weighted_C = new double[nr_class];
+        for (i = 0; i < nr_class; i++)
+          weighted_C[i] = param.C;
+        foreach (int weightedLabel in param.Weights.Keys) {
+          int index = Array.IndexOf<int>(label, weightedLabel);
+          if (index < 0)
+            Console.Error.WriteLine("warning: class label " + weightedLabel + " specified in weight is not found");
+          else weighted_C[index] *= param.Weights[weightedLabel];
+        }
+
+        // train k*(k-1)/2 models
+
+        bool[] nonzero = new bool[l];
+        for (i = 0; i < l; i++)
+          nonzero[i] = false;
+        decision_function[] f = new decision_function[nr_class * (nr_class - 1) / 2];
+
+        double[] probA = null, probB = null;
+        if (param.Probability) {
+          probA = new double[nr_class * (nr_class - 1) / 2];
+          probB = new double[nr_class * (nr_class - 1) / 2];
+        }
+
+        int p = 0;
+        for (i = 0; i < nr_class; i++)
+          for (int j = i + 1; j < nr_class; j++) {
+            Problem sub_prob = new Problem();
+            int si = start[i], sj = start[j];
+            int ci = count[i], cj = count[j];
+            sub_prob.Count = ci + cj;
+            sub_prob.X = new Node[sub_prob.Count][];
+            sub_prob.Y = new double[sub_prob.Count];
+            int k;
+            for (k = 0; k < ci; k++) {
+              sub_prob.X[k] = x[si + k];
+              sub_prob.Y[k] = +1;
+            }
+            for (k = 0; k < cj; k++) {
+              sub_prob.X[ci + k] = x[sj + k];
+              sub_prob.Y[ci + k] = -1;
+            }
+
+            if (param.Probability) {
+              double[] probAB = new double[2];
+              svm_binary_svc_probability(sub_prob, param, weighted_C[i], weighted_C[j], probAB);
+              probA[p] = probAB[0];
+              probB[p] = probAB[1];
+            }
+
+            f[p] = svm_train_one(sub_prob, param, weighted_C[i], weighted_C[j]);
+            for (k = 0; k < ci; k++)
+              if (!nonzero[si + k] && Math.Abs(f[p].alpha[k]) > 0)
+                nonzero[si + k] = true;
+            for (k = 0; k < cj; k++)
+              if (!nonzero[sj + k] && Math.Abs(f[p].alpha[ci + k]) > 0)
+                nonzero[sj + k] = true;
+            ++p;
+          }
+
+        // build output
+
+        model.NumberOfClasses = nr_class;
+
+        model.ClassLabels = new int[nr_class];
+        for (i = 0; i < nr_class; i++)
+          model.ClassLabels[i] = label[i];
+
+        model.Rho = new double[nr_class * (nr_class - 1) / 2];
+        for (i = 0; i < nr_class * (nr_class - 1) / 2; i++)
+          model.Rho[i] = f[i].rho;
+
+        if (param.Probability) {
+          model.PairwiseProbabilityA = new double[nr_class * (nr_class - 1) / 2];
+          model.PairwiseProbabilityB = new double[nr_class * (nr_class - 1) / 2];
+          for (i = 0; i < nr_class * (nr_class - 1) / 2; i++) {
+            model.PairwiseProbabilityA[i] = probA[i];
+            model.PairwiseProbabilityB[i] = probB[i];
+          }
+        } else {
+          model.PairwiseProbabilityA = null;
+          model.PairwiseProbabilityB = null;
+        }
+
+        int nnz = 0;
+        int[] nz_count = new int[nr_class];
+        model.NumberOfSVPerClass = new int[nr_class];
+        for (i = 0; i < nr_class; i++) {
+          int nSV = 0;
+          for (int j = 0; j < count[i]; j++)
+            if (nonzero[start[i] + j]) {
+              ++nSV;
+              ++nnz;
+            }
+          model.NumberOfSVPerClass[i] = nSV;
+          nz_count[i] = nSV;
+        }
+
+        Procedures.info("Total nSV = " + nnz + "\n");
+
+        model.SupportVectorCount = nnz;
+        model.SupportVectors = new Node[nnz][];
+        model.SupportVectorIndizes = new int[nnz];
+        p = 0;
+        for (i = 0; i < l; i++) {
+          if (nonzero[i]) {
+            model.SupportVectors[p] = x[i];
+            model.SupportVectorIndizes[p] = i;
+            p++;
+          }
+        }
+
+        int[] nz_start = new int[nr_class];
+        nz_start[0] = 0;
+        for (i = 1; i < nr_class; i++)
+          nz_start[i] = nz_start[i - 1] + nz_count[i - 1];
+
+        model.SupportVectorCoefficients = new double[nr_class - 1][];
+        for (i = 0; i < nr_class - 1; i++)
+          model.SupportVectorCoefficients[i] = new double[nnz];
+
+        p = 0;
+        for (i = 0; i < nr_class; i++)
+          for (int j = i + 1; j < nr_class; j++) {
+            // classifier (i,j): coefficients with
+            // i are in sv_coef[j-1][nz_start[i]...],
+            // j are in sv_coef[i][nz_start[j]...]
+
+            int si = start[i];
+            int sj = start[j];
+            int ci = count[i];
+            int cj = count[j];
+
+            int q = nz_start[i];
+            int k;
+            for (k = 0; k < ci; k++)
+              if (nonzero[si + k])
+                model.SupportVectorCoefficients[j - 1][q++] = f[p].alpha[k];
+            q = nz_start[j];
+            for (k = 0; k < cj; k++)
+              if (nonzero[sj + k])
+                model.SupportVectorCoefficients[i][q++] = f[p].alpha[ci + k];
+            ++p;
+          }
+      }
+      return model;
+    }
+
+    // Stratified cross validation
+    public static void svm_cross_validation(Problem prob, Parameter param, int nr_fold, double[] target, bool shuffleTraining) {
+      Random rand = new Random();
+      int i;
+      int[] fold_start = new int[nr_fold + 1];
+      int l = prob.Count;
+      int[] perm = new int[l];
+
+      // stratified cv may not give leave-one-out rate
+      // Each class to l folds -> some folds may have zero elements
+      if ((param.SvmType == SvmType.C_SVC ||
+          param.SvmType == SvmType.NU_SVC) && nr_fold < l) {
+        int[] tmp_nr_class = new int[1];
+        int[][] tmp_label = new int[1][];
+        int[][] tmp_start = new int[1][];
+        int[][] tmp_count = new int[1][];
+
+        svm_group_classes(prob, tmp_nr_class, tmp_label, tmp_start, tmp_count, perm);
+
+        int nr_class = tmp_nr_class[0];
+        int[] label = tmp_label[0];
+        int[] start = tmp_start[0];
+        int[] count = tmp_count[0];
+
+        // random shuffle and then data grouped by fold using the array perm
+        int[] fold_count = new int[nr_fold];
+        int c;
+        int[] index = new int[l];
+        for (i = 0; i < l; i++)
+          index[i] = perm[i];
+        for (c = 0; c < nr_class; c++)
+          for (i = 0; i < count[c]; i++) {
+            int j = i + (int)(rand.NextDouble() * (count[c] - i));
+            do { int _ = index[start[c] + j]; index[start[c] + j] = index[start[c] + i]; index[start[c] + i] = _; } while (false);
+          }
+        for (i = 0; i < nr_fold; i++) {
+          fold_count[i] = 0;
+          for (c = 0; c < nr_class; c++)
+            fold_count[i] += (i + 1) * count[c] / nr_fold - i * count[c] / nr_fold;
+        }
+        fold_start[0] = 0;
+        for (i = 1; i <= nr_fold; i++)
+          fold_start[i] = fold_start[i - 1] + fold_count[i - 1];
+        for (c = 0; c < nr_class; c++)
+          for (i = 0; i < nr_fold; i++) {
+            int begin = start[c] + i * count[c] / nr_fold;
+            int end = start[c] + (i + 1) * count[c] / nr_fold;
+            for (int j = begin; j < end; j++) {
+              perm[fold_start[i]] = index[j];
+              fold_start[i]++;
+            }
+          }
+        fold_start[0] = 0;
+        for (i = 1; i <= nr_fold; i++)
+          fold_start[i] = fold_start[i - 1] + fold_count[i - 1];
+      } else {
+        for (i = 0; i < l; i++) perm[i] = i;
+        if (shuffleTraining) {
+          for (i = 0; i < l; i++) {
+            int j = i + (int)(rand.NextDouble() * (l - i));
+            do { int _ = perm[i]; perm[i] = perm[j]; perm[j] = _; } while (false);
+          }
+        }
+        for (i = 0; i <= nr_fold; i++)
+          fold_start[i] = i * l / nr_fold;
+      }
+
+      for (i = 0; i < nr_fold; i++) {
+        int begin = fold_start[i];
+        int end = fold_start[i + 1];
+        int j, k;
+        Problem subprob = new Problem();
+
+        subprob.Count = l - (end - begin);
+        subprob.X = new Node[subprob.Count][];
+        subprob.Y = new double[subprob.Count];
+
+        k = 0;
+        for (j = 0; j < begin; j++) {
+          subprob.X[k] = prob.X[perm[j]];
+          subprob.Y[k] = prob.Y[perm[j]];
+          ++k;
+        }
+        for (j = end; j < l; j++) {
+          subprob.X[k] = prob.X[perm[j]];
+          subprob.Y[k] = prob.Y[perm[j]];
+          ++k;
+        }
+        Model submodel = svm_train(subprob, param);
+        if (param.Probability &&
+           (param.SvmType == SvmType.C_SVC ||
+            param.SvmType == SvmType.NU_SVC)) {
+          double[] prob_estimates = new double[svm_get_nr_class(submodel)];
+          for (j = begin; j < end; j++)
+            target[perm[j]] = svm_predict_probability(submodel, prob.X[perm[j]], prob_estimates);
+        } else
+          for (j = begin; j < end; j++)
+            target[perm[j]] = svm_predict(submodel, prob.X[perm[j]]);
+      }
+    }
+
+    public static SvmType svm_get_svm_type(Model model) {
+      return model.Parameter.SvmType;
+    }
+
+    public static int svm_get_nr_class(Model model) {
+      return model.NumberOfClasses;
+    }
+
+    public static void svm_get_labels(Model model, int[] label) {
+      if (model.ClassLabels != null)
+        for (int i = 0; i < model.NumberOfClasses; i++)
+          label[i] = model.ClassLabels[i];
+    }
+
+    public static double svm_get_svr_probability(Model model) {
+      if ((model.Parameter.SvmType == SvmType.EPSILON_SVR || model.Parameter.SvmType == SvmType.NU_SVR) &&
+          model.PairwiseProbabilityA != null)
+        return model.PairwiseProbabilityA[0];
+      else {
+        Console.Error.WriteLine("Model doesn't contain information for SVR probability inference");
+        return 0;
+      }
+    }
+
+    public static void svm_predict_values(Model model, Node[] x, double[] dec_values) {
+      if (model.Parameter.SvmType == SvmType.ONE_CLASS ||
+         model.Parameter.SvmType == SvmType.EPSILON_SVR ||
+         model.Parameter.SvmType == SvmType.NU_SVR) {
+        double[] sv_coef = model.SupportVectorCoefficients[0];
+        double sum = 0;
+        for (int i = 0; i < model.SupportVectorCount; i++)
+          sum += sv_coef[i] * Kernel.KernelFunction(x, model.SupportVectors[i], model.Parameter);
+        sum -= model.Rho[0];
+        dec_values[0] = sum;
+      } else {
+        int i;
+        int nr_class = model.NumberOfClasses;
+        int l = model.SupportVectorCount;
+
+        double[] kvalue = new double[l];
+        for (i = 0; i < l; i++)
+          kvalue[i] = Kernel.KernelFunction(x, model.SupportVectors[i], model.Parameter);
+
+        int[] start = new int[nr_class];
+        start[0] = 0;
+        for (i = 1; i < nr_class; i++)
+          start[i] = start[i - 1] + model.NumberOfSVPerClass[i - 1];
+
+        int p = 0;
+        for (i = 0; i < nr_class; i++)
+          for (int j = i + 1; j < nr_class; j++) {
+            double sum = 0;
+            int si = start[i];
+            int sj = start[j];
+            int ci = model.NumberOfSVPerClass[i];
+            int cj = model.NumberOfSVPerClass[j];
+
+            int k;
+            double[] coef1 = model.SupportVectorCoefficients[j - 1];
+            double[] coef2 = model.SupportVectorCoefficients[i];
+            for (k = 0; k < ci; k++)
+              sum += coef1[si + k] * kvalue[si + k];
+            for (k = 0; k < cj; k++)
+              sum += coef2[sj + k] * kvalue[sj + k];
+            sum -= model.Rho[p];
+            dec_values[p] = sum;
+            p++;
+          }
+      }
+    }
+
+    public static double svm_predict(Model model, Node[] x) {
+      if (model.Parameter.SvmType == SvmType.ONE_CLASS ||
+         model.Parameter.SvmType == SvmType.EPSILON_SVR ||
+         model.Parameter.SvmType == SvmType.NU_SVR) {
+        double[] res = new double[1];
+        svm_predict_values(model, x, res);
+
+        if (model.Parameter.SvmType == SvmType.ONE_CLASS)
+          return (res[0] > 0) ? 1 : -1;
+        else
+          return res[0];
+      } else {
+        int i;
+        int nr_class = model.NumberOfClasses;
+        double[] dec_values = new double[nr_class * (nr_class - 1) / 2];
+        svm_predict_values(model, x, dec_values);
+
+        int[] vote = new int[nr_class];
+        for (i = 0; i < nr_class; i++)
+          vote[i] = 0;
+        int pos = 0;
+        for (i = 0; i < nr_class; i++)
+          for (int j = i + 1; j < nr_class; j++) {
+            if (dec_values[pos++] > 0)
+              ++vote[i];
             else
-            {
-                for (i = 0; i < active_size; i++)
-                    if (is_free(i))
-                    {
-                        float[] Q_i = Q.GetQ(i, l);
-                        double alpha_i = alpha[i];
-                        for (j = active_size; j < l; j++)
-                            G[j] += alpha_i * Q_i[j];
-                    }
-            }
-        }
-
-        public virtual void Solve(int l, IQMatrix Q, double[] p_, sbyte[] y_, double[] alpha_, double Cp, double Cn, double eps, SolutionInfo si, bool shrinking)
-        {
-            this.l = l;
-            this.Q = Q;
-            QD = Q.GetQD();
-            p = (double[])p_.Clone();
-            y = (sbyte[])y_.Clone();
-            alpha = (double[])alpha_.Clone();
-            this.Cp = Cp;
-            this.Cn = Cn;
-            this.EPS = eps;
-            this.unshrink = false;
-
-            // initialize alpha_status
-            {
-                alpha_status = new byte[l];
-                for (int i = 0; i < l; i++)
-                    update_alpha_status(i);
-            }
-
-            // initialize active set (for shrinking)
-            {
-                active_set = new int[l];
-                for (int i = 0; i < l; i++)
-                    active_set[i] = i;
-                active_size = l;
-            }
-
-            // initialize gradient
-            {
-                G = new double[l];
-                G_bar = new double[l];
-                int i;
-                for (i = 0; i < l; i++)
-                {
-                    G[i] = p[i];
-                    G_bar[i] = 0;
-                }
-                for (i = 0; i < l; i++)
-                    if (!is_lower_bound(i))
-                    {
-                        float[] Q_i = Q.GetQ(i, l);
-                        double alpha_i = alpha[i];
-                        int j;
-                        for (j = 0; j < l; j++)
-                            G[j] += alpha_i * Q_i[j];
-                        if (is_upper_bound(i))
-                            for (j = 0; j < l; j++)
-                                G_bar[j] += get_C(i) * Q_i[j];
-                    }
-            }
-
-            // optimization step
-
-            int iter = 0;
-            int counter = Math.Min(l, 1000) + 1;
-            int[] working_set = new int[2];
-
-            while (true)
-            {
-                // show progress and do shrinking
-
-                if (--counter == 0)
-                {
-                    counter = Math.Min(l, 1000);
-                    if (shrinking) do_shrinking();
-                    Procedures.info(".");
-                }
-
-                if (select_working_set(working_set) != 0)
-                {
-                    // reconstruct the whole gradient
-                    reconstruct_gradient();
-                    // reset active set size and check
-                    active_size = l;
-                    Procedures.info("*");
-                    if (select_working_set(working_set) != 0)
-                        break;
-                    else
-                        counter = 1;	// do shrinking next iteration
-                }
-
-                int i = working_set[0];
-                int j = working_set[1];
-
-                ++iter;
-
-                // update alpha[i] and alpha[j], handle bounds carefully
-
-                float[] Q_i = Q.GetQ(i, active_size);
-                float[] Q_j = Q.GetQ(j, active_size);
-
-                double C_i = get_C(i);
-                double C_j = get_C(j);
-
-                double old_alpha_i = alpha[i];
-                double old_alpha_j = alpha[j];
-
-                if (y[i] != y[j])
-                {
-                    double quad_coef = Q_i[i] + Q_j[j] + 2 * Q_i[j];
-                    if (quad_coef <= 0)
-                        quad_coef = 1e-12;
-                    double delta = (-G[i] - G[j]) / quad_coef;
-                    double diff = alpha[i] - alpha[j];
-                    alpha[i] += delta;
-                    alpha[j] += delta;
-
-                    if (diff > 0)
-                    {
-                        if (alpha[j] < 0)
-                        {
-                            alpha[j] = 0;
-                            alpha[i] = diff;
-                        }
-                    }
-                    else
-                    {
-                        if (alpha[i] < 0)
-                        {
-                            alpha[i] = 0;
-                            alpha[j] = -diff;
-                        }
-                    }
-                    if (diff > C_i - C_j)
-                    {
-                        if (alpha[i] > C_i)
-                        {
-                            alpha[i] = C_i;
-                            alpha[j] = C_i - diff;
-                        }
-                    }
-                    else
-                    {
-                        if (alpha[j] > C_j)
-                        {
-                            alpha[j] = C_j;
-                            alpha[i] = C_j + diff;
-                        }
-                    }
-                }
-                else
-                {
-                    double quad_coef = Q_i[i] + Q_j[j] - 2 * Q_i[j];
-                    if (quad_coef <= 0)
-                        quad_coef = 1e-12;
-                    double delta = (G[i] - G[j]) / quad_coef;
-                    double sum = alpha[i] + alpha[j];
-                    alpha[i] -= delta;
-                    alpha[j] += delta;
-
-                    if (sum > C_i)
-                    {
-                        if (alpha[i] > C_i)
-                        {
-                            alpha[i] = C_i;
-                            alpha[j] = sum - C_i;
-                        }
-                    }
-                    else
-                    {
-                        if (alpha[j] < 0)
-                        {
-                            alpha[j] = 0;
-                            alpha[i] = sum;
-                        }
-                    }
-                    if (sum > C_j)
-                    {
-                        if (alpha[j] > C_j)
-                        {
-                            alpha[j] = C_j;
-                            alpha[i] = sum - C_j;
-                        }
-                    }
-                    else
-                    {
-                        if (alpha[i] < 0)
-                        {
-                            alpha[i] = 0;
-                            alpha[j] = sum;
-                        }
-                    }
-                }
-
-                // update G
-
-                double delta_alpha_i = alpha[i] - old_alpha_i;
-                double delta_alpha_j = alpha[j] - old_alpha_j;
-
-                for (int k = 0; k < active_size; k++)
-                {
-                    G[k] += Q_i[k] * delta_alpha_i + Q_j[k] * delta_alpha_j;
-                }
-
-                // update alpha_status and G_bar
-
-                {
-                    bool ui = is_upper_bound(i);
-                    bool uj = is_upper_bound(j);
-                    update_alpha_status(i);
-                    update_alpha_status(j);
-                    int k;
-                    if (ui != is_upper_bound(i))
-                    {
-                        Q_i = Q.GetQ(i, l);
-                        if (ui)
-                            for (k = 0; k < l; k++)
-                                G_bar[k] -= C_i * Q_i[k];
-                        else
-                            for (k = 0; k < l; k++)
-                                G_bar[k] += C_i * Q_i[k];
-                    }
-
-                    if (uj != is_upper_bound(j))
-                    {
-                        Q_j = Q.GetQ(j, l);
-                        if (uj)
-                            for (k = 0; k < l; k++)
-                                G_bar[k] -= C_j * Q_j[k];
-                        else
-                            for (k = 0; k < l; k++)
-                                G_bar[k] += C_j * Q_j[k];
-                    }
-                }
-
-            }
-
-            // calculate rho
-
-            si.rho = calculate_rho();
-
-            // calculate objective value
-            {
-                double v = 0;
-                int i;
-                for (i = 0; i < l; i++)
-                    v += alpha[i] * (G[i] + p[i]);
-
-                si.obj = v / 2;
-            }
-
-            // put back the solution
-            {
-                for (int i = 0; i < l; i++)
-                    alpha_[active_set[i]] = alpha[i];
-            }
-
-            si.upper_bound_p = Cp;
-            si.upper_bound_n = Cn;
-
-            Procedures.info("\noptimization finished, #iter = " + iter + "\n");
-        }
-
-        // return 1 if already optimal, return 0 otherwise
-        protected virtual int select_working_set(int[] working_set)
-        {
-            // return i,j such that
-            // i: Maximizes -y_i * grad(f)_i, i in I_up(\alpha)
-            // j: mimimizes the decrease of obj value
-            //    (if quadratic coefficeint <= 0, replace it with tau)
-            //    -y_j*grad(f)_j < -y_i*grad(f)_i, j in I_low(\alpha)
-
-            double GMax = -INF;
-            double GMax2 = -INF;
-            int GMax_idx = -1;
-            int GMin_idx = -1;
-            double obj_diff_Min = INF;
-
-            for (int t = 0; t < active_size; t++)
-                if (y[t] == +1)
-                {
-                    if (!is_upper_bound(t))
-                        if (-G[t] >= GMax)
-                        {
-                            GMax = -G[t];
-                            GMax_idx = t;
-                        }
-                }
-                else
-                {
-                    if (!is_lower_bound(t))
-                        if (G[t] >= GMax)
-                        {
-                            GMax = G[t];
-                            GMax_idx = t;
-                        }
-                }
-
-            int i = GMax_idx;
-            float[] Q_i = null;
-            if (i != -1) // null Q_i not accessed: GMax=-INF if i=-1
-                Q_i = Q.GetQ(i, active_size);
-
-            for (int j = 0; j < active_size; j++)
-            {
-                if (y[j] == +1)
-                {
-                    if (!is_lower_bound(j))
-                    {
-                        double grad_diff = GMax + G[j];
-                        if (G[j] >= GMax2)
-                            GMax2 = G[j];
-                        if (grad_diff > 0)
-                        {
-                            double obj_diff;
-                            double quad_coef = Q_i[i] + QD[j] - 2.0 * y[i] * Q_i[j];
-                            if (quad_coef > 0)
-                                obj_diff = -(grad_diff * grad_diff) / quad_coef;
-                            else
-                                obj_diff = -(grad_diff * grad_diff) / 1e-12;
-
-                            if (obj_diff <= obj_diff_Min)
-                            {
-                                GMin_idx = j;
-                                obj_diff_Min = obj_diff;
-                            }
-                        }
-                    }
-                }
-                else
-                {
-                    if (!is_upper_bound(j))
-                    {
-                        double grad_diff = GMax - G[j];
-                        if (-G[j] >= GMax2)
-                            GMax2 = -G[j];
-                        if (grad_diff > 0)
-                        {
-                            double obj_diff;
-                            double quad_coef = Q_i[i] + QD[j] + 2.0 * y[i] * Q_i[j];
-                            if (quad_coef > 0)
-                                obj_diff = -(grad_diff * grad_diff) / quad_coef;
-                            else
-                                obj_diff = -(grad_diff * grad_diff) / 1e-12;
-
-                            if (obj_diff <= obj_diff_Min)
-                            {
-                                GMin_idx = j;
-                                obj_diff_Min = obj_diff;
-                            }
-                        }
-                    }
-                }
-            }
-
-            if (GMax + GMax2 < EPS)
-                return 1;
-
-            working_set[0] = GMax_idx;
-            working_set[1] = GMin_idx;
-            return 0;
-        }
-
-        private bool be_shrunk(int i, double GMax1, double GMax2)
-        {
-            if (is_upper_bound(i))
-            {
-                if (y[i] == +1)
-                    return (-G[i] > GMax1);
-                else
-                    return (-G[i] > GMax2);
-            }
-            else if (is_lower_bound(i))
-            {
-                if (y[i] == +1)
-                    return (G[i] > GMax2);
-                else
-                    return (G[i] > GMax1);
-            }
-            else
-                return (false);
-        }
-
-        protected virtual void do_shrinking()
-        {
-            int i;
-            double GMax1 = -INF;		// Max { -y_i * grad(f)_i | i in I_up(\alpha) }
-            double GMax2 = -INF;		// Max { y_i * grad(f)_i | i in I_low(\alpha) }
-
-            // find Maximal violating pair first
-            for (i = 0; i < active_size; i++)
-            {
-                if (y[i] == +1)
-                {
-                    if (!is_upper_bound(i))
-                    {
-                        if (-G[i] >= GMax1)
-                            GMax1 = -G[i];
-                    }
-                    if (!is_lower_bound(i))
-                    {
-                        if (G[i] >= GMax2)
-                            GMax2 = G[i];
-                    }
-                }
-                else
-                {
-                    if (!is_upper_bound(i))
-                    {
-                        if (-G[i] >= GMax2)
-                            GMax2 = -G[i];
-                    }
-                    if (!is_lower_bound(i))
-                    {
-                        if (G[i] >= GMax1)
-                            GMax1 = G[i];
-                    }
-                }
-            }
-
-            if (unshrink == false && GMax1 + GMax2 <= EPS * 10)
-            {
-                unshrink = true;
-                reconstruct_gradient();
-                active_size = l;
-            }
-
-            for (i = 0; i < active_size; i++)
-                if (be_shrunk(i, GMax1, GMax2))
-                {
-                    active_size--;
-                    while (active_size > i)
-                    {
-                        if (!be_shrunk(active_size, GMax1, GMax2))
-                        {
-                            swap_index(i, active_size);
-                            break;
-                        }
-                        active_size--;
-                    }
-                }
-        }
-
-        protected virtual double calculate_rho()
-        {
-            double r;
-            int nr_free = 0;
-            double ub = INF, lb = -INF, sum_free = 0;
-            for (int i = 0; i < active_size; i++)
-            {
-                double yG = y[i] * G[i];
-
-                if (is_lower_bound(i))
-                {
-                    if (y[i] > 0)
-                        ub = Math.Min(ub, yG);
-                    else
-                        lb = Math.Max(lb, yG);
-                }
-                else if (is_upper_bound(i))
-                {
-                    if (y[i] < 0)
-                        ub = Math.Min(ub, yG);
-                    else
-                        lb = Math.Max(lb, yG);
-                }
-                else
-                {
-                    ++nr_free;
-                    sum_free += yG;
-                }
-            }
-
-            if (nr_free > 0)
-                r = sum_free / nr_free;
-            else
-                r = (ub + lb) / 2;
-
-            return r;
-        }
-
-    }
-
-    //
-    // Solver for nu-svm classification and regression
-    //
-    // additional constraint: e^T \alpha = constant
-    //
-    class Solver_NU : Solver
-    {
-        private SolutionInfo si;
-
-        public sealed override void Solve(int l, IQMatrix Q, double[] p, sbyte[] y,
-               double[] alpha, double Cp, double Cn, double eps,
-               SolutionInfo si, bool shrinking)
-        {
-            this.si = si;
-            base.Solve(l, Q, p, y, alpha, Cp, Cn, eps, si, shrinking);
-        }
-
-        // return 1 if already optimal, return 0 otherwise
-        protected override sealed int select_working_set(int[] working_set)
-        {
-            // return i,j such that y_i = y_j and
-            // i: Maximizes -y_i * grad(f)_i, i in I_up(\alpha)
-            // j: Minimizes the decrease of obj value
-            //    (if quadratic coefficeint <= 0, replace it with tau)
-            //    -y_j*grad(f)_j < -y_i*grad(f)_i, j in I_low(\alpha)
-
-            double GMaxp = -INF;
-            double GMaxp2 = -INF;
-            int GMaxp_idx = -1;
-
-            double GMaxn = -INF;
-            double GMaxn2 = -INF;
-            int GMaxn_idx = -1;
-
-            int GMin_idx = -1;
-            double obj_diff_Min = INF;
-
-            for (int t = 0; t < active_size; t++)
-                if (y[t] == +1)
-                {
-                    if (!is_upper_bound(t))
-                        if (-G[t] >= GMaxp)
-                        {
-                            GMaxp = -G[t];
-                            GMaxp_idx = t;
-                        }
-                }
-                else
-                {
-                    if (!is_lower_bound(t))
-                        if (G[t] >= GMaxn)
-                        {
-                            GMaxn = G[t];
-                            GMaxn_idx = t;
-                        }
-                }
-
-            int ip = GMaxp_idx;
-            int iN = GMaxn_idx;
-            float[] Q_ip = null;
-            float[] Q_in = null;
-            if (ip != -1) // null Q_ip not accessed: GMaxp=-INF if ip=-1
-                Q_ip = Q.GetQ(ip, active_size);
-            if (iN != -1)
-                Q_in = Q.GetQ(iN, active_size);
-
-            for (int j = 0; j < active_size; j++)
-            {
-                if (y[j] == +1)
-                {
-                    if (!is_lower_bound(j))
-                    {
-                        double grad_diff = GMaxp + G[j];
-                        if (G[j] >= GMaxp2)
-                            GMaxp2 = G[j];
-                        if (grad_diff > 0)
-                        {
-                            double obj_diff;
-                            double quad_coef = Q_ip[ip] + QD[j] - 2 * Q_ip[j];
-                            if (quad_coef > 0)
-                                obj_diff = -(grad_diff * grad_diff) / quad_coef;
-                            else
-                                obj_diff = -(grad_diff * grad_diff) / 1e-12;
-
-                            if (obj_diff <= obj_diff_Min)
-                            {
-                                GMin_idx = j;
-                                obj_diff_Min = obj_diff;
-                            }
-                        }
-                    }
-                }
-                else
-                {
-                    if (!is_upper_bound(j))
-                    {
-                        double grad_diff = GMaxn - G[j];
-                        if (-G[j] >= GMaxn2)
-                            GMaxn2 = -G[j];
-                        if (grad_diff > 0)
-                        {
-                            double obj_diff;
-                            double quad_coef = Q_in[iN] + QD[j] - 2 * Q_in[j];
-                            if (quad_coef > 0)
-                                obj_diff = -(grad_diff * grad_diff) / quad_coef;
-                            else
-                                obj_diff = -(grad_diff * grad_diff) / 1e-12;
-
-                            if (obj_diff <= obj_diff_Min)
-                            {
-                                GMin_idx = j;
-                                obj_diff_Min = obj_diff;
-                            }
-                        }
-                    }
-                }
-            }
-
-            if (Math.Max(GMaxp + GMaxp2, GMaxn + GMaxn2) < EPS)
-                return 1;
-
-            if (y[GMin_idx] == +1)
-                working_set[0] = GMaxp_idx;
-            else
-                working_set[0] = GMaxn_idx;
-            working_set[1] = GMin_idx;
-
-            return 0;
-        }
-
-        private bool be_shrunk(int i, double GMax1, double GMax2, double GMax3, double GMax4)
-        {
-            if (is_upper_bound(i))
-            {
-                if (y[i] == +1)
-                    return (-G[i] > GMax1);
-                else
-                    return (-G[i] > GMax4);
-            }
-            else if (is_lower_bound(i))
-            {
-                if (y[i] == +1)
-                    return (G[i] > GMax2);
-                else
-                    return (G[i] > GMax3);
-            }
-            else
-                return (false);
-        }
-
-        protected override sealed void do_shrinking()
-        {
-            double GMax1 = -INF;	// Max { -y_i * grad(f)_i | y_i = +1, i in I_up(\alpha) }
-            double GMax2 = -INF;	// Max { y_i * grad(f)_i | y_i = +1, i in I_low(\alpha) }
-            double GMax3 = -INF;	// Max { -y_i * grad(f)_i | y_i = -1, i in I_up(\alpha) }
-            double GMax4 = -INF;	// Max { y_i * grad(f)_i | y_i = -1, i in I_low(\alpha) }
-
-            // find Maximal violating pair first
-            int i;
-            for (i = 0; i < active_size; i++)
-            {
-                if (!is_upper_bound(i))
-                {
-                    if (y[i] == +1)
-                    {
-                        if (-G[i] > GMax1) GMax1 = -G[i];
-                    }
-                    else if (-G[i] > GMax4) GMax4 = -G[i];
-                }
-                if (!is_lower_bound(i))
-                {
-                    if (y[i] == +1)
-                    {
-                        if (G[i] > GMax2) GMax2 = G[i];
-                    }
-                    else if (G[i] > GMax3) GMax3 = G[i];
-                }
-            }
-
-            if (unshrink == false && Math.Max(GMax1 + GMax2, GMax3 + GMax4) <= EPS * 10)
-            {
-                unshrink = true;
-                reconstruct_gradient();
-                active_size = l;
-            }
-
-            for (i = 0; i < active_size; i++)
-                if (be_shrunk(i, GMax1, GMax2, GMax3, GMax4))
-                {
-                    active_size--;
-                    while (active_size > i)
-                    {
-                        if (!be_shrunk(active_size, GMax1, GMax2, GMax3, GMax4))
-                        {
-                            swap_index(i, active_size);
-                            break;
-                        }
-                        active_size--;
-                    }
-                }
-        }
-
-        protected override sealed double calculate_rho()
-        {
-            int nr_free1 = 0, nr_free2 = 0;
-            double ub1 = INF, ub2 = INF;
-            double lb1 = -INF, lb2 = -INF;
-            double sum_free1 = 0, sum_free2 = 0;
-
-            for (int i = 0; i < active_size; i++)
-            {
-                if (y[i] == +1)
-                {
-                    if (is_lower_bound(i))
-                        ub1 = Math.Min(ub1, G[i]);
-                    else if (is_upper_bound(i))
-                        lb1 = Math.Max(lb1, G[i]);
-                    else
-                    {
-                        ++nr_free1;
-                        sum_free1 += G[i];
-                    }
-                }
-                else
-                {
-                    if (is_lower_bound(i))
-                        ub2 = Math.Min(ub2, G[i]);
-                    else if (is_upper_bound(i))
-                        lb2 = Math.Max(lb2, G[i]);
-                    else
-                    {
-                        ++nr_free2;
-                        sum_free2 += G[i];
-                    }
-                }
-            }
-
-            double r1, r2;
-            if (nr_free1 > 0)
-                r1 = sum_free1 / nr_free1;
-            else
-                r1 = (ub1 + lb1) / 2;
-
-            if (nr_free2 > 0)
-                r2 = sum_free2 / nr_free2;
-            else
-                r2 = (ub2 + lb2) / 2;
-
-            si.r = (r1 + r2) / 2;
-            return (r1 - r2) / 2;
-        }
-    }
-
-    //
-    // Q matrices for various formulations
-    //
-    class SVC_Q : Kernel
-    {
-        private sbyte[] y;
-        private Cache cache;
-        private float[] QD;
-
-        public SVC_Q(Problem prob, Parameter param, sbyte[] y_) : base(prob.Count, prob.X, param)
-        {
-            y = (sbyte[])y_.Clone();
-            cache = new Cache(prob.Count, (long)(param.CacheSize * (1 << 20)));
-            QD = new float[prob.Count];
-            for (int i = 0; i < prob.Count; i++)
-                QD[i] = (float)KernelFunction(i, i);
-        }
-
-        public override sealed float[] GetQ(int i, int len)
-        {
-            float[] data = null;
-            int start, j;
-            if ((start = cache.GetData(i, ref data, len)) < len)
-            {
-                for (j = start; j < len; j++)
-                    data[j] = (float)(y[i] * y[j] * KernelFunction(i, j));
-            }
-            return data;
-        }
-
-        public override sealed float[] GetQD()
-        {
-            return QD;
-        }
-
-        public override sealed void SwapIndex(int i, int j)
-        {
-            cache.SwapIndex(i, j);
-            base.SwapIndex(i, j);
-            y.SwapIndex(i, j);
-            QD.SwapIndex(i, j);
-        }
-    }
-
-    class ONE_CLASS_Q : Kernel
-    {
-        private Cache cache;
-        private float[] QD;
-
-        public ONE_CLASS_Q(Problem prob, Parameter param) :  base(prob.Count, prob.X, param)
-        {
-            cache = new Cache(prob.Count, (long)(param.CacheSize * (1 << 20)));
-            QD = new float[prob.Count];
-            for (int i = 0; i < prob.Count; i++)
-                QD[i] = (float)KernelFunction(i, i);
-        }
-
-        public override sealed float[] GetQ(int i, int len)
-        {
-            float[] data = null;
-            int start, j;
-            if ((start = cache.GetData(i, ref data, len)) < len)
-            {
-                for (j = start; j < len; j++)
-                    data[j] = (float)KernelFunction(i, j);
-            }
-            return data;
-        }
-
-        public override sealed float[] GetQD()
-        {
-            return QD;
-        }
-
-        public override sealed void SwapIndex(int i, int j)
-        {
-            cache.SwapIndex(i, j);
-            base.SwapIndex(i, j);
-            QD.SwapIndex(i, j);
-        }
-    }
-
-    class SVR_Q : Kernel
-    {
-        private int l;
-        private Cache cache;
-        private sbyte[] sign;
-        private int[] index;
-        private int next_buffer;
-        private float[][] buffer;
-        private float[] QD;
-
-        public SVR_Q(Problem prob, Parameter param) : base(prob.Count, prob.X, param)
-        {
-            l = prob.Count;
-            cache = new Cache(l, (long)(param.CacheSize * (1 << 20)));
-            QD = new float[2 * l];
-            sign = new sbyte[2 * l];
-            index = new int[2 * l];
-            for (int k = 0; k < l; k++)
-            {
-                sign[k] = 1;
-                sign[k + l] = -1;
-                index[k] = k;
-                index[k + l] = k;
-                QD[k] = (float)KernelFunction(k, k);
-                QD[k + l] = QD[k];
-            }
-            buffer = new float[2][];
-            buffer[0] = new float[2 * l];
-            buffer[1] = new float[2 * l];
-            next_buffer = 0;
-        }
-
-        public override sealed void SwapIndex(int i, int j)
-        {
-            sign.SwapIndex(i, j);
-            index.SwapIndex(i, j);
-            QD.SwapIndex(i, j);
-        }
-
-        public override sealed float[] GetQ(int i, int len)
-        {
-            float[] data = null;
-            int j, real_i = index[i];
-            if (cache.GetData(real_i, ref data, l) < l)
-            {
-                for (j = 0; j < l; j++)
-                    data[j] = (float)KernelFunction(real_i, j);
-            }
-
-            // reorder and copy
-            float[] buf = buffer[next_buffer];
-            next_buffer = 1 - next_buffer;
-            sbyte si = sign[i];
-            for (j = 0; j < len; j++)
-                buf[j] = (float)si * sign[j] * data[index[j]];
-            return buf;
-        }
-
-        public override sealed float[] GetQD()
-        {
-            return QD;
-        }
-    }
-
-    internal class Procedures
-    {
-        private static bool _verbose;
-        public static bool IsVerbose
-        {
-            get
-            {
-                return _verbose;
-            }
-            set
-            {
-                _verbose = value;
-            }
-        }
-        //
-        // construct and solve various formulations
-        //
-        public const int LIBSVM_VERSION = 289;
-
-        public static TextWriter svm_print_string = Console.Out;
-
-        public static void info(string s)
-        {
-            if(_verbose)
-                svm_print_string.Write(s);
-        }
-
-        private static void solve_c_svc(Problem prob, Parameter param,
-                        double[] alpha, Solver.SolutionInfo si,
-                        double Cp, double Cn)
-        {
-            int l = prob.Count;
-            double[] Minus_ones = new double[l];
-            sbyte[] y = new sbyte[l];
-
-            int i;
-
-            for (i = 0; i < l; i++)
-            {
-                alpha[i] = 0;
-                Minus_ones[i] = -1;
-                if (prob.Y[i] > 0) y[i] = +1; else y[i] = -1;
-            }
-
-            Solver s = new Solver();
-            s.Solve(l, new SVC_Q(prob, param, y), Minus_ones, y,
-                alpha, Cp, Cn, param.EPS, si, param.Shrinking);
-
-            double sum_alpha = 0;
-            for (i = 0; i < l; i++)
-                sum_alpha += alpha[i];
-
-            if (Cp == Cn)
-                Procedures.info("nu = " + sum_alpha / (Cp * prob.Count) + "\n");
-
-            for (i = 0; i < l; i++)
-                alpha[i] *= y[i];
-        }
-
-        private static void solve_nu_svc(Problem prob, Parameter param,
-                        double[] alpha, Solver.SolutionInfo si)
-        {
-            int i;
-            int l = prob.Count;
-            double nu = param.Nu;
-
-            sbyte[] y = new sbyte[l];
-
-            for (i = 0; i < l; i++)
-                if (prob.Y[i] > 0)
-                    y[i] = +1;
-                else
-                    y[i] = -1;
-
-            double sum_pos = nu * l / 2;
-            double sum_neg = nu * l / 2;
-
-            for (i = 0; i < l; i++)
-                if (y[i] == +1)
-                {
-                    alpha[i] = Math.Min(1.0, sum_pos);
-                    sum_pos -= alpha[i];
-                }
-                else
-                {
-                    alpha[i] = Math.Min(1.0, sum_neg);
-                    sum_neg -= alpha[i];
-                }
-
-            double[] zeros = new double[l];
-
-            for (i = 0; i < l; i++)
-                zeros[i] = 0;
-
-            Solver_NU s = new Solver_NU();
-            s.Solve(l, new SVC_Q(prob, param, y), zeros, y, alpha, 1.0, 1.0, param.EPS, si, param.Shrinking);
-            double r = si.r;
-
-            Procedures.info("C = " + 1 / r + "\n");
-
-            for (i = 0; i < l; i++)
-                alpha[i] *= y[i] / r;
-
-            si.rho /= r;
-            si.obj /= (r * r);
-            si.upper_bound_p = 1 / r;
-            si.upper_bound_n = 1 / r;
-        }
-
-        private static void solve_one_class(Problem prob, Parameter param,
-                        double[] alpha, Solver.SolutionInfo si)
-        {
-            int l = prob.Count;
-            double[] zeros = new double[l];
-            sbyte[] ones = new sbyte[l];
-            int i;
-
-            int n = (int)(param.Nu * prob.Count);	// # of alpha's at upper bound
-
-            for (i = 0; i < n; i++)
-                alpha[i] = 1;
-            if (n < prob.Count)
-                alpha[n] = param.Nu * prob.Count - n;
-            for (i = n + 1; i < l; i++)
-                alpha[i] = 0;
-
-            for (i = 0; i < l; i++)
-            {
-                zeros[i] = 0;
-                ones[i] = 1;
-            }
-
-            Solver s = new Solver();
-            s.Solve(l, new ONE_CLASS_Q(prob, param), zeros, ones, alpha, 1.0, 1.0, param.EPS, si, param.Shrinking);
-        }
-
-        private static void solve_epsilon_svr(Problem prob, Parameter param, double[] alpha, Solver.SolutionInfo si)
-        {
-            int l = prob.Count;
-            double[] alpha2 = new double[2 * l];
-            double[] linear_term = new double[2 * l];
-            sbyte[] y = new sbyte[2 * l];
-            int i;
-
-            for (i = 0; i < l; i++)
-            {
-                alpha2[i] = 0;
-                linear_term[i] = param.P - prob.Y[i];
-                y[i] = 1;
-
-                alpha2[i + l] = 0;
-                linear_term[i + l] = param.P + prob.Y[i];
-                y[i + l] = -1;
-            }
-
-            Solver s = new Solver();
-            s.Solve(2 * l, new SVR_Q(prob, param), linear_term, y, alpha2, param.C, param.C, param.EPS, si, param.Shrinking);
-
-            double sum_alpha = 0;
-            for (i = 0; i < l; i++)
-            {
-                alpha[i] = alpha2[i] - alpha2[i + l];
-                sum_alpha += Math.Abs(alpha[i]);
-            }
-            Procedures.info("nu = " + sum_alpha / (param.C * l) + "\n");
-        }
-
-        private static void solve_nu_svr(Problem prob, Parameter param,
-                        double[] alpha, Solver.SolutionInfo si)
-        {
-            int l = prob.Count;
-            double C = param.C;
-            double[] alpha2 = new double[2 * l];
-            double[] linear_term = new double[2 * l];
-            sbyte[] y = new sbyte[2 * l];
-            int i;
-
-            double sum = C * param.Nu * l / 2;
-            for (i = 0; i < l; i++)
-            {
-                alpha2[i] = alpha2[i + l] = Math.Min(sum, C);
-                sum -= alpha2[i];
-
-                linear_term[i] = -prob.Y[i];
-                y[i] = 1;
-
-                linear_term[i + l] = prob.Y[i];
-                y[i + l] = -1;
-            }
-
-            Solver_NU s = new Solver_NU();
-            s.Solve(2 * l, new SVR_Q(prob, param), linear_term, y, alpha2, C, C, param.EPS, si, param.Shrinking);
-
-            Procedures.info("epsilon = " + (-si.r) + "\n");
-
-            for (i = 0; i < l; i++)
-                alpha[i] = alpha2[i] - alpha2[i + l];
-        }
-
-        //
-        // decision_function
-        //
-        internal class decision_function
-        {
-            public double[] alpha;
-            public double rho;
-        };
-
-        static decision_function svm_train_one(Problem prob, Parameter param, double Cp, double Cn)
-        {
-            double[] alpha = new double[prob.Count];
-            Solver.SolutionInfo si = new Solver.SolutionInfo();
-            switch (param.SvmType)
-            {
-                case SvmType.C_SVC:
-                    solve_c_svc(prob, param, alpha, si, Cp, Cn);
-                    break;
-                case SvmType.NU_SVC:
-                    solve_nu_svc(prob, param, alpha, si);
-                    break;
-                case SvmType.ONE_CLASS:
-                    solve_one_class(prob, param, alpha, si);
-                    break;
-                case SvmType.EPSILON_SVR:
-                    solve_epsilon_svr(prob, param, alpha, si);
-                    break;
-                case SvmType.NU_SVR:
-                    solve_nu_svr(prob, param, alpha, si);
-                    break;
-            }
-
-            Procedures.info("obj = " + si.obj + ", rho = " + si.rho + "\n");
-
-            // output SVs
-
-            int nSV = 0;
-            int nBSV = 0;
-            for (int i = 0; i < prob.Count; i++)
-            {
-                if (Math.Abs(alpha[i]) > 0)
-                {
-                    ++nSV;
-                    if (prob.Y[i] > 0)
-                    {
-                        if (Math.Abs(alpha[i]) >= si.upper_bound_p)
-                            ++nBSV;
-                    }
-                    else
-                    {
-                        if (Math.Abs(alpha[i]) >= si.upper_bound_n)
-                            ++nBSV;
-                    }
-                }
-            }
-
-            Procedures.info("nSV = " + nSV + ", nBSV = " + nBSV + "\n");
-
-            decision_function f = new decision_function();
-            f.alpha = alpha;
-            f.rho = si.rho;
-            return f;
-        }
-
-        // Platt's binary SVM Probablistic Output: an improvement from Lin et al.
-        private static void sigmoid_train(int l, double[] dec_values, double[] labels,
-                      double[] probAB)
-        {
-            double A, B;
-            double prior1 = 0, prior0 = 0;
-            int i;
-
-            for (i = 0; i < l; i++)
-                if (labels[i] > 0) prior1 += 1;
-                else prior0 += 1;
-
-            int Max_iter = 100;	// Maximal number of iterations
-            double Min_step = 1e-10;	// Minimal step taken in line search
-            double sigma = 1e-12;	// For numerically strict PD of Hessian
-            double eps = 1e-5;
-            double hiTarget = (prior1 + 1.0) / (prior1 + 2.0);
-            double loTarget = 1 / (prior0 + 2.0);
-            double[] t = new double[l];
-            double fApB, p, q, h11, h22, h21, g1, g2, det, dA, dB, gd, stepsize;
-            double newA, newB, newf, d1, d2;
-            int iter;
-
-            // Initial Point and Initial Fun Value
-            A = 0.0; B = Math.Log((prior0 + 1.0) / (prior1 + 1.0));
-            double fval = 0.0;
-
-            for (i = 0; i < l; i++)
-            {
-                if (labels[i] > 0) t[i] = hiTarget;
-                else t[i] = loTarget;
-                fApB = dec_values[i] * A + B;
-                if (fApB >= 0)
-                    fval += t[i] * fApB + Math.Log(1 + Math.Exp(-fApB));
-                else
-                    fval += (t[i] - 1) * fApB + Math.Log(1 + Math.Exp(fApB));
-            }
-            for (iter = 0; iter < Max_iter; iter++)
-            {
-                // Update Gradient and Hessian (use H' = H + sigma I)
-                h11 = sigma; // numerically ensures strict PD
-                h22 = sigma;
-                h21 = 0.0; g1 = 0.0; g2 = 0.0;
-                for (i = 0; i < l; i++)
-                {
-                    fApB = dec_values[i] * A + B;
-                    if (fApB >= 0)
-                    {
-                        p = Math.Exp(-fApB) / (1.0 + Math.Exp(-fApB));
-                        q = 1.0 / (1.0 + Math.Exp(-fApB));
-                    }
-                    else
-                    {
-                        p = 1.0 / (1.0 + Math.Exp(fApB));
-                        q = Math.Exp(fApB) / (1.0 + Math.Exp(fApB));
-                    }
-                    d2 = p * q;
-                    h11 += dec_values[i] * dec_values[i] * d2;
-                    h22 += d2;
-                    h21 += dec_values[i] * d2;
-                    d1 = t[i] - p;
-                    g1 += dec_values[i] * d1;
-                    g2 += d1;
-                }
-
-                // Stopping Criteria
-                if (Math.Abs(g1) < eps && Math.Abs(g2) < eps)
-                    break;
-
-                // Finding Newton direction: -inv(H') * g
-                det = h11 * h22 - h21 * h21;
-                dA = -(h22 * g1 - h21 * g2) / det;
-                dB = -(-h21 * g1 + h11 * g2) / det;
-                gd = g1 * dA + g2 * dB;
-
-
-                stepsize = 1;		// Line Search
-                while (stepsize >= Min_step)
-                {
-                    newA = A + stepsize * dA;
-                    newB = B + stepsize * dB;
-
-                    // New function value
-                    newf = 0.0;
-                    for (i = 0; i < l; i++)
-                    {
-                        fApB = dec_values[i] * newA + newB;
-                        if (fApB >= 0)
-                            newf += t[i] * fApB + Math.Log(1 + Math.Exp(-fApB));
-                        else
-                            newf += (t[i] - 1) * fApB + Math.Log(1 + Math.Exp(fApB));
-                    }
-                    // Check sufficient decrease
-                    if (newf < fval + 0.0001 * stepsize * gd)
-                    {
-                        A = newA; B = newB; fval = newf;
-                        break;
-                    }
-                    else
-                        stepsize = stepsize / 2.0;
-                }
-
-                if (stepsize < Min_step)
-                {
-                    Procedures.info("Line search fails in two-class probability estimates\n");
-                    break;
-                }
-            }
-
-            if (iter >= Max_iter)
-                Procedures.info("Reaching Maximal iterations in two-class probability estimates\n");
-            probAB[0] = A; probAB[1] = B;
-        }
-
-        private static double sigmoid_predict(double decision_value, double A, double B)
-        {
-            double fApB = decision_value * A + B;
-            if (fApB >= 0)
-                return Math.Exp(-fApB) / (1.0 + Math.Exp(-fApB));
-            else
-                return 1.0 / (1 + Math.Exp(fApB));
-        }
-
-        // Method 2 from the multiclass_prob paper by Wu, Lin, and Weng
-        private static void multiclass_probability(int k, double[,] r, double[] p)
-        {
-            int t, j;
-            int iter = 0, Max_iter = Math.Max(100, k);
-            double[,] Q = new double[k,k];
-            double[] Qp = new double[k];
-            double pQp, eps = 0.005 / k;
-
-            for (t = 0; t < k; t++)
-            {
-                p[t] = 1.0 / k;  // Valid if k = 1
-                Q[t,t] = 0;
-                for (j = 0; j < t; j++)
-                {
-                    Q[t,t] += r[j,t] * r[j,t];
-                    Q[t,j] = Q[j,t];
-                }
-                for (j = t + 1; j < k; j++)
-                {
-                    Q[t,t] += r[j,t] * r[j,t];
-                    Q[t,j] = -r[j,t] * r[t,j];
-                }
-            }
-            for (iter = 0; iter < Max_iter; iter++)
-            {
-                // stopping condition, recalculate QP,pQP for numerical accuracy
-                pQp = 0;
-                for (t = 0; t < k; t++)
-                {
-                    Qp[t] = 0;
-                    for (j = 0; j < k; j++)
-                        Qp[t] += Q[t,j] * p[j];
-                    pQp += p[t] * Qp[t];
-                }
-                double Max_error = 0;
-                for (t = 0; t < k; t++)
-                {
-                    double error = Math.Abs(Qp[t] - pQp);
-                    if (error > Max_error)
-                        Max_error = error;
-                }
-                if (Max_error < eps) break;
-
-                for (t = 0; t < k; t++)
-                {
-                    double diff = (-Qp[t] + pQp) / Q[t,t];
-                    p[t] += diff;
-                    pQp = (pQp + diff * (diff * Q[t,t] + 2 * Qp[t])) / (1 + diff) / (1 + diff);
-                    for (j = 0; j < k; j++)
-                    {
-                        Qp[j] = (Qp[j] + diff * Q[t,j]) / (1 + diff);
-                        p[j] /= (1 + diff);
-                    }
-                }
-            }
-            if (iter >= Max_iter)
-                Procedures.info("Exceeds Max_iter in multiclass_prob\n");
-        }
-
-        // Cross-validation decision values for probability estimates
-        private static void svm_binary_svc_probability(Problem prob, Parameter param, double Cp, double Cn, double[] probAB)
-        {
-            int i;
-            int nr_fold = 5;
-            int[] perm = new int[prob.Count];
-            double[] dec_values = new double[prob.Count];
-
-            // random shuffle
-            Random rand = new Random();
-            for (i = 0; i < prob.Count; i++) perm[i] = i;
-            for (i = 0; i < prob.Count; i++)
-            {
-                int j = i + (int)(rand.NextDouble() * (prob.Count - i));
-                do { int _ = perm[i]; perm[i] = perm[j]; perm[j] = _; } while (false);
-            }
-            for (i = 0; i < nr_fold; i++)
-            {
-                int begin = i * prob.Count / nr_fold;
-                int end = (i + 1) * prob.Count / nr_fold;
-                int j, k;
-                Problem subprob = new Problem();
-
-                subprob.Count = prob.Count - (end - begin);
-                subprob.X = new Node[subprob.Count][];
-                subprob.Y = new double[subprob.Count];
-
-                k = 0;
-                for (j = 0; j < begin; j++)
-                {
-                    subprob.X[k] = prob.X[perm[j]];
-                    subprob.Y[k] = prob.Y[perm[j]];
-                    ++k;
-                }
-                for (j = end; j < prob.Count; j++)
-                {
-                    subprob.X[k] = prob.X[perm[j]];
-                    subprob.Y[k] = prob.Y[perm[j]];
-                    ++k;
-                }
-                int p_count = 0, n_count = 0;
-                for (j = 0; j < k; j++)
-                    if (subprob.Y[j] > 0)
-                        p_count++;
-                    else
-                        n_count++;
-
-                if (p_count == 0 && n_count == 0)
-                    for (j = begin; j < end; j++)
-                        dec_values[perm[j]] = 0;
-                else if (p_count > 0 && n_count == 0)
-                    for (j = begin; j < end; j++)
-                        dec_values[perm[j]] = 1;
-                else if (p_count == 0 && n_count > 0)
-                    for (j = begin; j < end; j++)
-                        dec_values[perm[j]] = -1;
-                else
-                {
-                    Parameter subparam = (Parameter)param.Clone();
-                    subparam.Probability = false;
-                    subparam.C = 1.0;
-                    subparam.Weights[1] = Cp;
-                    subparam.Weights[-1] = Cn;
-                    Model submodel = svm_train(subprob, subparam);
-                    for (j = begin; j < end; j++)
-                    {
-                        double[] dec_value = new double[1];
-                        svm_predict_values(submodel, prob.X[perm[j]], dec_value);
-                        dec_values[perm[j]] = dec_value[0];
-                        // ensure +1 -1 order; reason not using CV subroutine
-                        dec_values[perm[j]] *= submodel.ClassLabels[0];
-                    }
-                }
-            }
-            sigmoid_train(prob.Count, dec_values, prob.Y, probAB);
-        }
-
-        // Return parameter of a Laplace distribution 
-        private static double svm_svr_probability(Problem prob, Parameter param)
-        {
-            int i;
-            int nr_fold = 5;
-            double[] ymv = new double[prob.Count];
-            double mae = 0;
-
-            Parameter newparam = (Parameter)param.Clone();
-            newparam.Probability = false;
-            svm_cross_validation(prob, newparam, nr_fold, ymv, true);
-            for (i = 0; i < prob.Count; i++)
-            {
-                ymv[i] = prob.Y[i] - ymv[i];
-                mae += Math.Abs(ymv[i]);
-            }
-            mae /= prob.Count;
-            double std = Math.Sqrt(2 * mae * mae);
-            int count = 0;
-            mae = 0;
-            for (i = 0; i < prob.Count; i++)
-                if (Math.Abs(ymv[i]) > 5 * std)
-                    count = count + 1;
-                else
-                    mae += Math.Abs(ymv[i]);
-            mae /= (prob.Count - count);
-            Procedures.info("Prob. model for test data: target value = predicted value + z,\nz: Laplace distribution e^(-|z|/sigma)/(2sigma),sigma=" + mae + "\n");
-            return mae;
-        }
-
-        // label: label name, start: begin of each class, count: #data of classes, perm: indices to the original data
-        // perm, length l, must be allocated before calling this subroutine
-        private static void svm_group_classes(Problem prob, int[] nr_class_ret, int[][] label_ret, int[][] start_ret, int[][] count_ret, int[] perm)
-        {
-            int l = prob.Count;
-            int Max_nr_class = 16;
-            int nr_class = 0;
-            int[] label = new int[Max_nr_class];
-            int[] count = new int[Max_nr_class];
-            int[] data_label = new int[l];
-            int i;
-
-            for (i = 0; i < l; i++)
-            {
-                int this_label = (int)(prob.Y[i]);
-                int j;
-                for (j = 0; j < nr_class; j++)
-                {
-                    if (this_label == label[j])
-                    {
-                        ++count[j];
-                        break;
-                    }
-                }
-                data_label[i] = j;
-                if (j == nr_class)
-                {
-                    if (nr_class == Max_nr_class)
-                    {
-                        Max_nr_class *= 2;
-                        int[] new_data = new int[Max_nr_class];
-                        Array.Copy(label, 0, new_data, 0, label.Length);
-                        label = new_data;
-                        new_data = new int[Max_nr_class];
-                        Array.Copy(count, 0, new_data, 0, count.Length);
-                        count = new_data;
-                    }
-                    label[nr_class] = this_label;
-                    count[nr_class] = 1;
-                    ++nr_class;
-                }
-            }
-
-            int[] start = new int[nr_class];
-            start[0] = 0;
-            for (i = 1; i < nr_class; i++)
-                start[i] = start[i - 1] + count[i - 1];
-            for (i = 0; i < l; i++)
-            {
-                perm[start[data_label[i]]] = i;
-                ++start[data_label[i]];
-            }
-            start[0] = 0;
-            for (i = 1; i < nr_class; i++)
-                start[i] = start[i - 1] + count[i - 1];
-
-            nr_class_ret[0] = nr_class;
-            label_ret[0] = label;
-            start_ret[0] = start;
-            count_ret[0] = count;
-        }
-
-        //
-        // Interface functions
-        //
-        public static Model svm_train(Problem prob, Parameter param)
-        {
-            Model model = new Model();
-            model.Parameter = param;
-
-            if (param.SvmType == SvmType.ONE_CLASS || 
-               param.SvmType == SvmType.EPSILON_SVR ||
-               param.SvmType == SvmType.NU_SVR)
-            {
-                // regression or one-class-svm
-                model.NumberOfClasses = 2;                
-                model.ClassLabels = null;
-                model.NumberOfSVPerClass = null;
-                model.PairwiseProbabilityA = null; model.PairwiseProbabilityB = null;
-                model.SupportVectorCoefficients = new double[1][];
-                
-                if (param.Probability &&
-                   (param.SvmType == SvmType.EPSILON_SVR ||
-                    param.SvmType == SvmType.NU_SVR))
-                {
-                    model.PairwiseProbabilityA = new double[1];
-                    model.PairwiseProbabilityA[0] = svm_svr_probability(prob, param);
-                }
-
-                decision_function f = svm_train_one(prob, param, 0, 0);
-                model.Rho = new double[1];
-                model.Rho[0] = f.rho;
-
-                int nSV = 0;
-                int i;
-                for (i = 0; i < prob.Count; i++)
-                    if (Math.Abs(f.alpha[i]) > 0) ++nSV;                
-                model.SupportVectorCount = nSV;
-                model.SupportVectorIndizes = new int[nSV];
-                model.SupportVectors = new Node[nSV][];
-                model.SupportVectorCoefficients[0] = new double[nSV];
-                
-                int j = 0;
-                for (i = 0; i < prob.Count; i++)
-                    if (Math.Abs(f.alpha[i]) > 0)
-                    {
-                        model.SupportVectors[j] = prob.X[i];
-                        model.SupportVectorIndizes[j] = i;
-                        model.SupportVectorCoefficients[0][j] = f.alpha[i];
-                       
-                        ++j;
-                    }
-            }
-            else
-            {
-                // classification
-                int l = prob.Count;
-                int[] tmp_nr_class = new int[1];
-                int[][] tmp_label = new int[1][];
-                int[][] tmp_start = new int[1][];
-                int[][] tmp_count = new int[1][];
-                int[] perm = new int[l];
-
-                // group training data of the same class
-                svm_group_classes(prob, tmp_nr_class, tmp_label, tmp_start, tmp_count, perm);
-                int nr_class = tmp_nr_class[0];
-                int[] label = tmp_label[0];
-                int[] start = tmp_start[0];
-                int[] count = tmp_count[0];
-                Node[][] x = new Node[l][];
-                int i;
-                for (i = 0; i < l; i++)
-                    x[i] = prob.X[perm[i]];
-
-                // calculate weighted C
-
-                double[] weighted_C = new double[nr_class];
-                for (i = 0; i < nr_class; i++)
-                    weighted_C[i] = param.C;
-                foreach (int weightedLabel in param.Weights.Keys)
-                {
-                    int index = Array.IndexOf<int>(label, weightedLabel);
-                    if (index < 0)
-                        Console.Error.WriteLine("warning: class label " + weightedLabel + " specified in weight is not found");
-                    else weighted_C[index] *= param.Weights[weightedLabel];
-                }
-
-                // train k*(k-1)/2 models
-
-                bool[] nonzero = new bool[l];
-                for (i = 0; i < l; i++)
-                    nonzero[i] = false;
-                decision_function[] f = new decision_function[nr_class * (nr_class - 1) / 2];
-
-                double[] probA = null, probB = null;
-                if (param.Probability)
-                {
-                    probA = new double[nr_class * (nr_class - 1) / 2];
-                    probB = new double[nr_class * (nr_class - 1) / 2];
-                }
-
-                int p = 0;
-                for (i = 0; i < nr_class; i++)
-                    for (int j = i + 1; j < nr_class; j++)
-                    {
-                        Problem sub_prob = new Problem();
-                        int si = start[i], sj = start[j];
-                        int ci = count[i], cj = count[j];
-                        sub_prob.Count = ci + cj;
-                        sub_prob.X = new Node[sub_prob.Count][];
-                        sub_prob.Y = new double[sub_prob.Count];
-                        int k;
-                        for (k = 0; k < ci; k++)
-                        {
-                            sub_prob.X[k] = x[si + k];
-                            sub_prob.Y[k] = +1;
-                        }
-                        for (k = 0; k < cj; k++)
-                        {
-                            sub_prob.X[ci + k] = x[sj + k];
-                            sub_prob.Y[ci + k] = -1;
-                        }
-
-                        if (param.Probability)
-                        {
-                            double[] probAB = new double[2];
-                            svm_binary_svc_probability(sub_prob, param, weighted_C[i], weighted_C[j], probAB);
-                            probA[p] = probAB[0];
-                            probB[p] = probAB[1];
-                        }
-
-                        f[p] = svm_train_one(sub_prob, param, weighted_C[i], weighted_C[j]);
-                        for (k = 0; k < ci; k++)
-                            if (!nonzero[si + k] && Math.Abs(f[p].alpha[k]) > 0)
-                                nonzero[si + k] = true;
-                        for (k = 0; k < cj; k++)
-                            if (!nonzero[sj + k] && Math.Abs(f[p].alpha[ci + k]) > 0)
-                                nonzero[sj + k] = true;
-                        ++p;
-                    }
-
-                // build output
-
-                model.NumberOfClasses = nr_class;
-
-                model.ClassLabels = new int[nr_class];
-                for (i = 0; i < nr_class; i++)
-                    model.ClassLabels[i] = label[i];
-
-                model.Rho = new double[nr_class * (nr_class - 1) / 2];
-                for (i = 0; i < nr_class * (nr_class - 1) / 2; i++)
-                    model.Rho[i] = f[i].rho;
-
-                if (param.Probability)
-                {
-                    model.PairwiseProbabilityA = new double[nr_class * (nr_class - 1) / 2];
-                    model.PairwiseProbabilityB = new double[nr_class * (nr_class - 1) / 2];
-                    for (i = 0; i < nr_class * (nr_class - 1) / 2; i++)
-                    {
-                        model.PairwiseProbabilityA[i] = probA[i];
-                        model.PairwiseProbabilityB[i] = probB[i];
-                    }
-                }
-                else
-                {
-                    model.PairwiseProbabilityA = null;
-                    model.PairwiseProbabilityB = null;
-                }
-
-                int nnz = 0;
-                int[] nz_count = new int[nr_class];
-                model.NumberOfSVPerClass = new int[nr_class];
-                for (i = 0; i < nr_class; i++)
-                {
-                    int nSV = 0;
-                    for (int j = 0; j < count[i]; j++)
-                        if (nonzero[start[i] + j])
-                        {
-                            ++nSV;
-                            ++nnz;
-                        }
-                    model.NumberOfSVPerClass[i] = nSV;
-                    nz_count[i] = nSV;
-                }
-
-                Procedures.info("Total nSV = " + nnz + "\n");
-
-                model.SupportVectorCount = nnz;
-                model.SupportVectors = new Node[nnz][];
-                model.SupportVectorIndizes = new int[nnz];
-                p = 0;
-                for (i = 0; i < l; i++) {
-                  if (nonzero[i]) {
-                    model.SupportVectors[p] = x[i];
-                    model.SupportVectorIndizes[p] = i;
-                    p++;
-                  }
-                }
-
-                int[] nz_start = new int[nr_class];
-                nz_start[0] = 0;
-                for (i = 1; i < nr_class; i++)
-                    nz_start[i] = nz_start[i - 1] + nz_count[i - 1];
-
-                model.SupportVectorCoefficients = new double[nr_class - 1][];
-                for (i = 0; i < nr_class - 1; i++)
-                    model.SupportVectorCoefficients[i] = new double[nnz];
-
-                p = 0;
-                for (i = 0; i < nr_class; i++)
-                    for (int j = i + 1; j < nr_class; j++)
-                    {
-                        // classifier (i,j): coefficients with
-                        // i are in sv_coef[j-1][nz_start[i]...],
-                        // j are in sv_coef[i][nz_start[j]...]
-
-                        int si = start[i];
-                        int sj = start[j];
-                        int ci = count[i];
-                        int cj = count[j];
-
-                        int q = nz_start[i];
-                        int k;
-                        for (k = 0; k < ci; k++)
-                            if (nonzero[si + k])
-                                model.SupportVectorCoefficients[j - 1][q++] = f[p].alpha[k];
-                        q = nz_start[j];
-                        for (k = 0; k < cj; k++)
-                            if (nonzero[sj + k])
-                                model.SupportVectorCoefficients[i][q++] = f[p].alpha[ci + k];
-                        ++p;
-                    }
-            }
-            return model;
-        }
-
-        // Stratified cross validation
-        public static void svm_cross_validation(Problem prob, Parameter param, int nr_fold, double[] target, bool shuffleTraining)
-        {
-            Random rand = new Random();
-            int i;
-            int[] fold_start = new int[nr_fold + 1];
-            int l = prob.Count;
-            int[] perm = new int[l];
-
-            // stratified cv may not give leave-one-out rate
-            // Each class to l folds -> some folds may have zero elements
-            if ((param.SvmType == SvmType.C_SVC ||
-                param.SvmType == SvmType.NU_SVC) && nr_fold < l)
-            {
-                int[] tmp_nr_class = new int[1];
-                int[][] tmp_label = new int[1][];
-                int[][] tmp_start = new int[1][];
-                int[][] tmp_count = new int[1][];
-
-                svm_group_classes(prob, tmp_nr_class, tmp_label, tmp_start, tmp_count, perm);
-
-                int nr_class = tmp_nr_class[0];
-                int[] label = tmp_label[0];
-                int[] start = tmp_start[0];
-                int[] count = tmp_count[0];
-
-                // random shuffle and then data grouped by fold using the array perm
-                int[] fold_count = new int[nr_fold];
-                int c;
-                int[] index = new int[l];
-                for (i = 0; i < l; i++)
-                    index[i] = perm[i];
-                for (c = 0; c < nr_class; c++)
-                    for (i = 0; i < count[c]; i++)
-                    {
-                        int j = i + (int)(rand.NextDouble() * (count[c] - i));
-                        do { int _ = index[start[c] + j]; index[start[c] + j] = index[start[c] + i]; index[start[c] + i] = _; } while (false);
-                    }
-                for (i = 0; i < nr_fold; i++)
-                {
-                    fold_count[i] = 0;
-                    for (c = 0; c < nr_class; c++)
-                        fold_count[i] += (i + 1) * count[c] / nr_fold - i * count[c] / nr_fold;
-                }
-                fold_start[0] = 0;
-                for (i = 1; i <= nr_fold; i++)
-                    fold_start[i] = fold_start[i - 1] + fold_count[i - 1];
-                for (c = 0; c < nr_class; c++)
-                    for (i = 0; i < nr_fold; i++)
-                    {
-                        int begin = start[c] + i * count[c] / nr_fold;
-                        int end = start[c] + (i + 1) * count[c] / nr_fold;
-                        for (int j = begin; j < end; j++)
-                        {
-                            perm[fold_start[i]] = index[j];
-                            fold_start[i]++;
-                        }
-                    }
-                fold_start[0] = 0;
-                for (i = 1; i <= nr_fold; i++)
-                    fold_start[i] = fold_start[i - 1] + fold_count[i - 1];
-            }
-            else
-            {
-                for (i = 0; i < l; i++) perm[i] = i;
-                if (shuffleTraining) {
-                  for (i = 0; i < l; i++) {
-                    int j = i + (int)(rand.NextDouble() * (l - i));
-                    do { int _ = perm[i]; perm[i] = perm[j]; perm[j] = _; } while (false);
-                  }
-                }
-                for (i = 0; i <= nr_fold; i++)
-                    fold_start[i] = i * l / nr_fold;
-            }
-
-            for (i = 0; i < nr_fold; i++)
-            {
-                int begin = fold_start[i];
-                int end = fold_start[i + 1];
-                int j, k;
-                Problem subprob = new Problem();
-
-                subprob.Count = l - (end - begin);
-                subprob.X = new Node[subprob.Count][];
-                subprob.Y = new double[subprob.Count];
-
-                k = 0;
-                for (j = 0; j < begin; j++)
-                {
-                    subprob.X[k] = prob.X[perm[j]];
-                    subprob.Y[k] = prob.Y[perm[j]];
-                    ++k;
-                }
-                for (j = end; j < l; j++)
-                {
-                    subprob.X[k] = prob.X[perm[j]];
-                    subprob.Y[k] = prob.Y[perm[j]];
-                    ++k;
-                }
-                Model submodel = svm_train(subprob, param);
-                if (param.Probability &&
-                   (param.SvmType == SvmType.C_SVC ||
-                    param.SvmType == SvmType.NU_SVC))
-                {
-                    double[] prob_estimates = new double[svm_get_nr_class(submodel)];
-                    for (j = begin; j < end; j++)
-                        target[perm[j]] = svm_predict_probability(submodel, prob.X[perm[j]], prob_estimates);
-                }
-                else
-                    for (j = begin; j < end; j++)
-                        target[perm[j]] = svm_predict(submodel, prob.X[perm[j]]);
-            }
-        }
-
-        public static SvmType svm_get_svm_type(Model model)
-        {
-            return model.Parameter.SvmType;
-        }
-
-        public static int svm_get_nr_class(Model model)
-        {
-            return model.NumberOfClasses;
-        }
-
-        public static void svm_get_labels(Model model, int[] label)
-        {
-            if (model.ClassLabels != null)
-                for (int i = 0; i < model.NumberOfClasses; i++)
-                    label[i] = model.ClassLabels[i];
-        }
-
-        public static double svm_get_svr_probability(Model model)
-        {
-            if ((model.Parameter.SvmType == SvmType.EPSILON_SVR || model.Parameter.SvmType == SvmType.NU_SVR) &&
-                model.PairwiseProbabilityA != null)
-                return model.PairwiseProbabilityA[0];
-            else
-            {
-                Console.Error.WriteLine("Model doesn't contain information for SVR probability inference");
-                return 0;
-            }
-        }
-
-        public static void svm_predict_values(Model model, Node[] x, double[] dec_values)
-        {
-            if (model.Parameter.SvmType == SvmType.ONE_CLASS ||
-               model.Parameter.SvmType == SvmType.EPSILON_SVR ||
-               model.Parameter.SvmType == SvmType.NU_SVR)
-            {
-                double[] sv_coef = model.SupportVectorCoefficients[0];
-                double sum = 0;
-                for (int i = 0; i < model.SupportVectorCount; i++)
-                    sum += sv_coef[i] * Kernel.KernelFunction(x, model.SupportVectors[i], model.Parameter);
-                sum -= model.Rho[0];
-                dec_values[0] = sum;
-            }
-            else
-            {
-                int i;
-                int nr_class = model.NumberOfClasses;
-                int l = model.SupportVectorCount;
-
-                double[] kvalue = new double[l];
-                for (i = 0; i < l; i++)
-                    kvalue[i] = Kernel.KernelFunction(x, model.SupportVectors[i], model.Parameter);
-
-                int[] start = new int[nr_class];
-                start[0] = 0;
-                for (i = 1; i < nr_class; i++)
-                    start[i] = start[i - 1] + model.NumberOfSVPerClass[i - 1];
-
-                int p = 0;
-                for (i = 0; i < nr_class; i++)
-                    for (int j = i + 1; j < nr_class; j++)
-                    {
-                        double sum = 0;
-                        int si = start[i];
-                        int sj = start[j];
-                        int ci = model.NumberOfSVPerClass[i];
-                        int cj = model.NumberOfSVPerClass[j];
-
-                        int k;
-                        double[] coef1 = model.SupportVectorCoefficients[j - 1];
-                        double[] coef2 = model.SupportVectorCoefficients[i];
-                        for (k = 0; k < ci; k++)
-                            sum += coef1[si + k] * kvalue[si + k];
-                        for (k = 0; k < cj; k++)
-                            sum += coef2[sj + k] * kvalue[sj + k];
-                        sum -= model.Rho[p];
-                        dec_values[p] = sum;
-                        p++;
-                    }
-            }
-        }
-
-        public static double svm_predict(Model model, Node[] x)
-        {
-            if (model.Parameter.SvmType == SvmType.ONE_CLASS ||
-               model.Parameter.SvmType == SvmType.EPSILON_SVR ||
-               model.Parameter.SvmType == SvmType.NU_SVR)
-            {
-                double[] res = new double[1];
-                svm_predict_values(model, x, res);
-
-                if (model.Parameter.SvmType == SvmType.ONE_CLASS)
-                    return (res[0] > 0) ? 1 : -1;
-                else
-                    return res[0];
-            }
-            else
-            {
-                int i;
-                int nr_class = model.NumberOfClasses;
-                double[] dec_values = new double[nr_class * (nr_class - 1) / 2];
-                svm_predict_values(model, x, dec_values);
-
-                int[] vote = new int[nr_class];
-                for (i = 0; i < nr_class; i++)
-                    vote[i] = 0;
-                int pos = 0;
-                for (i = 0; i < nr_class; i++)
-                    for (int j = i + 1; j < nr_class; j++)
-                    {
-                        if (dec_values[pos++] > 0)
-                            ++vote[i];
-                        else
-                            ++vote[j];
-                    }
-
-                int vote_Max_idx = 0;
-                for (i = 1; i < nr_class; i++)
-                    if (vote[i] > vote[vote_Max_idx])
-                        vote_Max_idx = i;
-                return model.ClassLabels[vote_Max_idx];
-            }
-        }
-
-        public static double svm_predict_probability(Model model, Node[] x, double[] prob_estimates)
-        {
-            if ((model.Parameter.SvmType == SvmType.C_SVC || model.Parameter.SvmType == SvmType.NU_SVC) &&
-                model.PairwiseProbabilityA != null && model.PairwiseProbabilityB != null)
-            {
-                int i;
-                int nr_class = model.NumberOfClasses;
-                double[] dec_values = new double[nr_class * (nr_class - 1) / 2];
-                svm_predict_values(model, x, dec_values);
-
-                double Min_prob = 1e-7;
-                double[,] pairwise_prob = new double[nr_class, nr_class];
-
-                int k = 0;
-                for (i = 0; i < nr_class; i++)
-                {
-                    for (int j = i + 1; j < nr_class; j++)
-                    {
-                        pairwise_prob[i, j] = Math.Min(Math.Max(sigmoid_predict(dec_values[k], model.PairwiseProbabilityA[k], model.PairwiseProbabilityB[k]), Min_prob), 1 - Min_prob);
-                        pairwise_prob[j, i] = 1 - pairwise_prob[i, j];
-                        k++;
-                    }
-                }
-                multiclass_probability(nr_class, pairwise_prob, prob_estimates);
-
-                int prob_Max_idx = 0;
-                for (i = 1; i < nr_class; i++)
-                    if (prob_estimates[i] > prob_estimates[prob_Max_idx])
-                        prob_Max_idx = i;
-                return model.ClassLabels[prob_Max_idx];
-            }
-            else
-                return svm_predict(model, x);
-        }
-
-        public static string svm_check_parameter(Problem prob, Parameter param)
-        {
-            // svm_type
-
-            SvmType svm_type = param.SvmType;
-
-            // kernel_type, degree
-
-            KernelType kernel_type = param.KernelType;
-
-            if (param.Degree < 0)
-                return "degree of polynomial kernel < 0";
-
-            // cache_size,eps,C,nu,p,shrinking
-
-            if (param.CacheSize <= 0)
-                return "cache_size <= 0";
-
-            if (param.EPS <= 0)
-                return "eps <= 0";
-
-            if (param.Gamma == 0)
-                param.Gamma = 1.0 / prob.MaxIndex;
-
-            if (svm_type == SvmType.C_SVC ||
-               svm_type == SvmType.EPSILON_SVR ||
-               svm_type == SvmType.NU_SVR)
-                if (param.C <= 0)
-                    return "C <= 0";
-
-            if (svm_type == SvmType.NU_SVC ||
-               svm_type == SvmType.ONE_CLASS ||
-               svm_type == SvmType.NU_SVR)
-                if (param.Nu <= 0 || param.Nu > 1)
-                    return "nu <= 0 or nu > 1";
-
-            if (svm_type == SvmType.EPSILON_SVR)
-                if (param.P < 0)
-                    return "p < 0";
-
-            if (param.Probability &&
-               svm_type == SvmType.ONE_CLASS)
-                return "one-class SVM probability output not supported yet";
-
-            // check whether nu-svc is feasible
-
-            if (svm_type == SvmType.NU_SVC)
-            {
-                int l = prob.Count;
-                int Max_nr_class = 16;
-                int nr_class = 0;
-                int[] label = new int[Max_nr_class];
-                int[] count = new int[Max_nr_class];
-
-                int i;
-                for (i = 0; i < l; i++)
-                {
-                    int this_label = (int)prob.Y[i];
-                    int j;
-                    for (j = 0; j < nr_class; j++)
-                        if (this_label == label[j])
-                        {
-                            ++count[j];
-                            break;
-                        }
-
-                    if (j == nr_class)
-                    {
-                        if (nr_class == Max_nr_class)
-                        {
-                            Max_nr_class *= 2;
-                            int[] new_data = new int[Max_nr_class];
-                            Array.Copy(label, 0, new_data, 0, label.Length);
-                            label = new_data;
-
-                            new_data = new int[Max_nr_class];
-                            Array.Copy(count, 0, new_data, 0, count.Length);
-                            count = new_data;
-                        }
-                        label[nr_class] = this_label;
-                        count[nr_class] = 1;
-                        ++nr_class;
-                    }
-                }
-
-                for (i = 0; i < nr_class; i++)
-                {
-                    int n1 = count[i];
-                    for (int j = i + 1; j < nr_class; j++)
-                    {
-                        int n2 = count[j];
-                        if (param.Nu * (n1 + n2) / 2 > Math.Min(n1, n2))
-                            return "specified nu is infeasible";
-                    }
-                }
-            }
-
-            return null;
-        }
-
-        public static int svm_check_probability_model(Model model)
-        {
-            if (((model.Parameter.SvmType == SvmType.C_SVC || model.Parameter.SvmType == SvmType.NU_SVC) &&
-            model.PairwiseProbabilityA != null && model.PairwiseProbabilityB != null) ||
-            ((model.Parameter.SvmType == SvmType.EPSILON_SVR || model.Parameter.SvmType == SvmType.NU_SVR) &&
-             model.PairwiseProbabilityA != null))
-                return 1;
-            else
-                return 0;
-        }
-    }
+              ++vote[j];
+          }
+
+        int vote_Max_idx = 0;
+        for (i = 1; i < nr_class; i++)
+          if (vote[i] > vote[vote_Max_idx])
+            vote_Max_idx = i;
+        return model.ClassLabels[vote_Max_idx];
+      }
+    }
+
+    public static double svm_predict_probability(Model model, Node[] x, double[] prob_estimates) {
+      if ((model.Parameter.SvmType == SvmType.C_SVC || model.Parameter.SvmType == SvmType.NU_SVC) &&
+          model.PairwiseProbabilityA != null && model.PairwiseProbabilityB != null) {
+        int i;
+        int nr_class = model.NumberOfClasses;
+        double[] dec_values = new double[nr_class * (nr_class - 1) / 2];
+        svm_predict_values(model, x, dec_values);
+
+        double Min_prob = 1e-7;
+        double[,] pairwise_prob = new double[nr_class, nr_class];
+
+        int k = 0;
+        for (i = 0; i < nr_class; i++) {
+          for (int j = i + 1; j < nr_class; j++) {
+            pairwise_prob[i, j] = Math.Min(Math.Max(sigmoid_predict(dec_values[k], model.PairwiseProbabilityA[k], model.PairwiseProbabilityB[k]), Min_prob), 1 - Min_prob);
+            pairwise_prob[j, i] = 1 - pairwise_prob[i, j];
+            k++;
+          }
+        }
+        multiclass_probability(nr_class, pairwise_prob, prob_estimates);
+
+        int prob_Max_idx = 0;
+        for (i = 1; i < nr_class; i++)
+          if (prob_estimates[i] > prob_estimates[prob_Max_idx])
+            prob_Max_idx = i;
+        return model.ClassLabels[prob_Max_idx];
+      } else
+        return svm_predict(model, x);
+    }
+
+    public static string svm_check_parameter(Problem prob, Parameter param) {
+      // svm_type
+
+      SvmType svm_type = param.SvmType;
+
+      // kernel_type, degree
+
+      KernelType kernel_type = param.KernelType;
+
+      if (param.Degree < 0)
+        return "degree of polynomial kernel < 0";
+
+      // cache_size,eps,C,nu,p,shrinking
+
+      if (param.CacheSize <= 0)
+        return "cache_size <= 0";
+
+      if (param.EPS <= 0)
+        return "eps <= 0";
+
+      if (param.Gamma == 0)
+        param.Gamma = 1.0 / prob.MaxIndex;
+
+      if (svm_type == SvmType.C_SVC ||
+         svm_type == SvmType.EPSILON_SVR ||
+         svm_type == SvmType.NU_SVR)
+        if (param.C <= 0)
+          return "C <= 0";
+
+      if (svm_type == SvmType.NU_SVC ||
+         svm_type == SvmType.ONE_CLASS ||
+         svm_type == SvmType.NU_SVR)
+        if (param.Nu <= 0 || param.Nu > 1)
+          return "nu <= 0 or nu > 1";
+
+      if (svm_type == SvmType.EPSILON_SVR)
+        if (param.P < 0)
+          return "p < 0";
+
+      if (param.Probability &&
+         svm_type == SvmType.ONE_CLASS)
+        return "one-class SVM probability output not supported yet";
+
+      // check whether nu-svc is feasible
+
+      if (svm_type == SvmType.NU_SVC) {
+        int l = prob.Count;
+        int Max_nr_class = 16;
+        int nr_class = 0;
+        int[] label = new int[Max_nr_class];
+        int[] count = new int[Max_nr_class];
+
+        int i;
+        for (i = 0; i < l; i++) {
+          int this_label = (int)prob.Y[i];
+          int j;
+          for (j = 0; j < nr_class; j++)
+            if (this_label == label[j]) {
+              ++count[j];
+              break;
+            }
+
+          if (j == nr_class) {
+            if (nr_class == Max_nr_class) {
+              Max_nr_class *= 2;
+              int[] new_data = new int[Max_nr_class];
+              Array.Copy(label, 0, new_data, 0, label.Length);
+              label = new_data;
+
+              new_data = new int[Max_nr_class];
+              Array.Copy(count, 0, new_data, 0, count.Length);
+              count = new_data;
+            }
+            label[nr_class] = this_label;
+            count[nr_class] = 1;
+            ++nr_class;
+          }
+        }
+
+        for (i = 0; i < nr_class; i++) {
+          int n1 = count[i];
+          for (int j = i + 1; j < nr_class; j++) {
+            int n2 = count[j];
+            if (param.Nu * (n1 + n2) / 2 > Math.Min(n1, n2))
+              return "specified nu is infeasible";
+          }
+        }
+      }
+
+      return null;
+    }
+
+    public static int svm_check_probability_model(Model model) {
+      if (((model.Parameter.SvmType == SvmType.C_SVC || model.Parameter.SvmType == SvmType.NU_SVC) &&
+      model.PairwiseProbabilityA != null && model.PairwiseProbabilityB != null) ||
+      ((model.Parameter.SvmType == SvmType.EPSILON_SVR || model.Parameter.SvmType == SvmType.NU_SVR) &&
+       model.PairwiseProbabilityA != null))
+        return 1;
+      else
+        return 0;
+    }
+  }
 }
Index: /trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.LibSVM/1.6.3/LibSVM-1.6.3/TemporaryCulture.cs
===================================================================
--- /trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.LibSVM/1.6.3/LibSVM-1.6.3/TemporaryCulture.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.LibSVM/1.6.3/LibSVM-1.6.3/TemporaryCulture.cs	(revision 4068)
@@ -1,25 +1,17 @@
-﻿using System;
-using System.Collections.Generic;
-using System.Linq;
-using System.Text;
-using System.Globalization;
+﻿using System.Globalization;
 using System.Threading;
 
-namespace SVM
-{
-    internal static class TemporaryCulture
-    {
-        private static CultureInfo _culture;
+namespace SVM {
+  internal static class TemporaryCulture {
+    private static CultureInfo _culture;
 
-        public static void Start()
-        {
-            _culture = Thread.CurrentThread.CurrentCulture;
-            Thread.CurrentThread.CurrentCulture = CultureInfo.InvariantCulture;
-        }
+    public static void Start() {
+      _culture = Thread.CurrentThread.CurrentCulture;
+      Thread.CurrentThread.CurrentCulture = CultureInfo.InvariantCulture;
+    }
 
-        public static void Stop()
-        {
-            Thread.CurrentThread.CurrentCulture = _culture;
-        }
+    public static void Stop() {
+      Thread.CurrentThread.CurrentCulture = _culture;
     }
+  }
 }
Index: /trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.LibSVM/1.6.3/LibSVM-1.6.3/Training.cs
===================================================================
--- /trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.LibSVM/1.6.3/LibSVM-1.6.3/Training.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.LibSVM/1.6.3/LibSVM-1.6.3/Training.cs	(revision 4068)
@@ -19,209 +19,191 @@
 
 using System;
-using System.Collections.Generic;
-
-namespace SVM
-{
-    /// <summary>
-    /// Class containing the routines to train SVM models.
-    /// </summary>
-    public static class Training
-    {
-        /// <summary>
-        /// Whether the system will output information to the console during the training process.
-        /// </summary>
-        public static bool IsVerbose
-        {
-            get
-            {
-                return Procedures.IsVerbose;
+
+namespace SVM {
+  /// <summary>
+  /// Class containing the routines to train SVM models.
+  /// </summary>
+  public static class Training {
+    /// <summary>
+    /// Whether the system will output information to the console during the training process.
+    /// </summary>
+    public static bool IsVerbose {
+      get {
+        return Procedures.IsVerbose;
+      }
+      set {
+        Procedures.IsVerbose = value;
+      }
+    }
+
+    private static double doCrossValidation(Problem problem, Parameter parameters, int nr_fold, bool shuffleTraining) {
+      int i;
+      double[] target = new double[problem.Count];
+      Procedures.svm_cross_validation(problem, parameters, nr_fold, target, shuffleTraining);
+      int total_correct = 0;
+      double total_error = 0;
+      //double sumv = 0, sumy = 0, sumvv = 0, sumyy = 0, sumvy = 0;
+      if (parameters.SvmType == SvmType.EPSILON_SVR || parameters.SvmType == SvmType.NU_SVR) {
+        for (i = 0; i < problem.Count; i++) {
+          double y = problem.Y[i];
+          double v = target[i];
+          total_error += (v - y) * (v - y);
+          //sumv += v;
+          //sumy += y;
+          //sumvv += v * v;
+          //sumyy += y * y;
+          //sumvy += v * y;
+        }
+        return total_error / problem.Count; // return MSE
+        // (problem.Count * sumvy - sumv * sumy) / (Math.Sqrt(problem.Count * sumvv - sumv * sumv) * Math.Sqrt(problem.Count * sumyy - sumy * sumy));
+      } else
+        for (i = 0; i < problem.Count; i++)
+          if (target[i] == problem.Y[i])
+            ++total_correct;
+      return (double)total_correct / problem.Count;
+    }
+    /// <summary>
+    /// Legacy.  Allows use as if this was svm_train.  See libsvm documentation for details on which arguments to pass.
+    /// </summary>
+    /// <param name="args"></param>
+    [Obsolete("Provided only for legacy compatibility, use the other Train() methods")]
+    public static void Train(params string[] args) {
+      Parameter parameters;
+      Problem problem;
+      bool crossValidation;
+      int nrfold;
+      string modelFilename;
+      parseCommandLine(args, out parameters, out problem, out crossValidation, out nrfold, out modelFilename);
+      if (crossValidation)
+        PerformCrossValidation(problem, parameters, nrfold, true);
+      else Model.Write(modelFilename, Train(problem, parameters));
+    }
+
+    /// <summary>
+    /// Performs cross validation.
+    /// </summary>
+    /// <param name="problem">The training data</param>
+    /// <param name="parameters">The parameters to test</param>
+    /// <param name="nrfold">The number of cross validations to use</param>
+    /// <returns>The cross validation score</returns>
+    public static double PerformCrossValidation(Problem problem, Parameter parameters, int nrfold, bool shuffleTraining) {
+      string error = Procedures.svm_check_parameter(problem, parameters);
+      if (error == null)
+        return doCrossValidation(problem, parameters, nrfold, shuffleTraining);
+      else throw new Exception(error);
+    }
+
+    /// <summary>
+    /// Trains a model using the provided training data and parameters.
+    /// </summary>
+    /// <param name="problem">The training data</param>
+    /// <param name="parameters">The parameters to use</param>
+    /// <returns>A trained SVM Model</returns>
+    public static Model Train(Problem problem, Parameter parameters) {
+      string error = Procedures.svm_check_parameter(problem, parameters);
+
+      if (error == null)
+        return Procedures.svm_train(problem, parameters);
+      else throw new Exception(error);
+    }
+
+    private static void parseCommandLine(string[] args, out Parameter parameters, out Problem problem, out bool crossValidation, out int nrfold, out string modelFilename) {
+      int i;
+
+      parameters = new Parameter();
+      // default values
+
+      crossValidation = false;
+      nrfold = 0;
+
+      // parse options
+      for (i = 0; i < args.Length; i++) {
+        if (args[i][0] != '-')
+          break;
+        ++i;
+        switch (args[i - 1][1]) {
+
+          case 's':
+            parameters.SvmType = (SvmType)int.Parse(args[i]);
+            break;
+
+          case 't':
+            parameters.KernelType = (KernelType)int.Parse(args[i]);
+            break;
+
+          case 'd':
+            parameters.Degree = int.Parse(args[i]);
+            break;
+
+          case 'g':
+            parameters.Gamma = double.Parse(args[i]);
+            break;
+
+          case 'r':
+            parameters.Coefficient0 = double.Parse(args[i]);
+            break;
+
+          case 'n':
+            parameters.Nu = double.Parse(args[i]);
+            break;
+
+          case 'm':
+            parameters.CacheSize = double.Parse(args[i]);
+            break;
+
+          case 'c':
+            parameters.C = double.Parse(args[i]);
+            break;
+
+          case 'e':
+            parameters.EPS = double.Parse(args[i]);
+            break;
+
+          case 'p':
+            parameters.P = double.Parse(args[i]);
+            break;
+
+          case 'h':
+            parameters.Shrinking = int.Parse(args[i]) == 1;
+            break;
+
+          case 'b':
+            parameters.Probability = int.Parse(args[i]) == 1;
+            break;
+
+          case 'v':
+            crossValidation = true;
+            nrfold = int.Parse(args[i]);
+            if (nrfold < 2) {
+              throw new ArgumentException("n-fold cross validation: n must >= 2");
             }
-            set
-            {
-                Procedures.IsVerbose = value;
-            }
+            break;
+
+          case 'w':
+            parameters.Weights[int.Parse(args[i - 1].Substring(2))] = double.Parse(args[1]);
+            break;
+
+          default:
+            throw new ArgumentException("Unknown Parameter");
         }
-
-        private static double doCrossValidation(Problem problem, Parameter parameters, int nr_fold, bool shuffleTraining)
-        {
-            int i;
-            double[] target = new double[problem.Count];
-            Procedures.svm_cross_validation(problem, parameters, nr_fold, target, shuffleTraining);
-            int total_correct = 0;
-            double total_error = 0;
-            //double sumv = 0, sumy = 0, sumvv = 0, sumyy = 0, sumvy = 0;
-            if (parameters.SvmType == SvmType.EPSILON_SVR || parameters.SvmType == SvmType.NU_SVR)
-            {
-                for (i = 0; i < problem.Count; i++)
-                {
-                    double y = problem.Y[i];
-                    double v = target[i];
-                    total_error += (v - y) * (v - y);
-                    //sumv += v;
-                    //sumy += y;
-                    //sumvv += v * v;
-                    //sumyy += y * y;
-                    //sumvy += v * y;
-                }
-                return total_error / problem.Count; // return MSE
-              // (problem.Count * sumvy - sumv * sumy) / (Math.Sqrt(problem.Count * sumvv - sumv * sumv) * Math.Sqrt(problem.Count * sumyy - sumy * sumy));
-            }
-            else
-                for (i = 0; i < problem.Count; i++)
-                    if (target[i] == problem.Y[i])
-                        ++total_correct;
-            return (double)total_correct / problem.Count;
-        }
-        /// <summary>
-        /// Legacy.  Allows use as if this was svm_train.  See libsvm documentation for details on which arguments to pass.
-        /// </summary>
-        /// <param name="args"></param>
-        [Obsolete("Provided only for legacy compatibility, use the other Train() methods")]
-        public static void Train(params string[] args)
-        {
-            Parameter parameters;
-            Problem problem;
-            bool crossValidation;
-            int nrfold;
-            string modelFilename;
-            parseCommandLine(args, out parameters, out problem, out crossValidation, out nrfold, out modelFilename);
-            if (crossValidation)
-                PerformCrossValidation(problem, parameters, nrfold, true);
-            else Model.Write(modelFilename, Train(problem, parameters));
-        }
-
-        /// <summary>
-        /// Performs cross validation.
-        /// </summary>
-        /// <param name="problem">The training data</param>
-        /// <param name="parameters">The parameters to test</param>
-        /// <param name="nrfold">The number of cross validations to use</param>
-        /// <returns>The cross validation score</returns>
-        public static double PerformCrossValidation(Problem problem, Parameter parameters, int nrfold, bool shuffleTraining)
-        {
-            string error = Procedures.svm_check_parameter(problem, parameters);
-            if (error == null)
-                return doCrossValidation(problem, parameters, nrfold, shuffleTraining);
-            else throw new Exception(error);
-        }
-
-        /// <summary>
-        /// Trains a model using the provided training data and parameters.
-        /// </summary>
-        /// <param name="problem">The training data</param>
-        /// <param name="parameters">The parameters to use</param>
-        /// <returns>A trained SVM Model</returns>
-        public static Model Train(Problem problem, Parameter parameters)
-        {
-            string error = Procedures.svm_check_parameter(problem, parameters);
-
-            if (error == null)
-                return Procedures.svm_train(problem, parameters);
-            else throw new Exception(error);
-        }
-
-        private static void parseCommandLine(string[] args, out Parameter parameters, out Problem problem, out bool crossValidation, out int nrfold, out string modelFilename)
-        {
-            int i;
-
-            parameters = new Parameter();
-            // default values
-
-            crossValidation = false;
-            nrfold = 0;
-
-            // parse options
-            for (i = 0; i < args.Length; i++)
-            {
-                if (args[i][0] != '-')
-                    break;
-                ++i;
-                switch (args[i - 1][1])
-                {
-
-                    case 's':
-                        parameters.SvmType = (SvmType)int.Parse(args[i]);
-                        break;
-
-                    case 't':
-                        parameters.KernelType = (KernelType)int.Parse(args[i]);
-                        break;
-
-                    case 'd':
-                        parameters.Degree = int.Parse(args[i]);
-                        break;
-
-                    case 'g':
-                        parameters.Gamma = double.Parse(args[i]);
-                        break;
-
-                    case 'r':
-                        parameters.Coefficient0 = double.Parse(args[i]);
-                        break;
-
-                    case 'n':
-                        parameters.Nu = double.Parse(args[i]);
-                        break;
-
-                    case 'm':
-                        parameters.CacheSize = double.Parse(args[i]);
-                        break;
-
-                    case 'c':
-                        parameters.C = double.Parse(args[i]);
-                        break;
-
-                    case 'e':
-                        parameters.EPS = double.Parse(args[i]);
-                        break;
-
-                    case 'p':
-                        parameters.P = double.Parse(args[i]);
-                        break;
-
-                    case 'h':
-                        parameters.Shrinking = int.Parse(args[i]) == 1;
-                        break;
-
-                    case 'b':
-                        parameters.Probability = int.Parse(args[i]) == 1;
-                        break;
-
-                    case 'v':
-                        crossValidation = true;
-                        nrfold = int.Parse(args[i]);
-                        if (nrfold < 2)
-                        {
-                            throw new ArgumentException("n-fold cross validation: n must >= 2");
-                        }
-                        break;
-
-                    case 'w':
-                        parameters.Weights[int.Parse(args[i - 1].Substring(2))] = double.Parse(args[1]);
-                        break;
-
-                    default:
-                        throw new ArgumentException("Unknown Parameter");
-                }
-            }
-
-            // determine filenames
-
-            if (i >= args.Length)
-                throw new ArgumentException("No input file specified");
-
-            problem = Problem.Read(args[i]);
-
-            if (parameters.Gamma == 0)
-                parameters.Gamma = 1.0 / problem.MaxIndex;
-
-            if (i < args.Length - 1)
-                modelFilename = args[i + 1];
-            else
-            {
-                int p = args[i].LastIndexOf('/') + 1;
-                modelFilename = args[i].Substring(p) + ".model";
-            }
-        }
-    }
+      }
+
+      // determine filenames
+
+      if (i >= args.Length)
+        throw new ArgumentException("No input file specified");
+
+      problem = Problem.Read(args[i]);
+
+      if (parameters.Gamma == 0)
+        parameters.Gamma = 1.0 / problem.MaxIndex;
+
+      if (i < args.Length - 1)
+        modelFilename = args[i + 1];
+      else {
+        int p = args[i].LastIndexOf('/') + 1;
+        modelFilename = args[i].Substring(p) + ".model";
+      }
+    }
+  }
 }
Index: /trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.Netron/3.0.2672.12446/HeuristicLab.Netron-3.0.2672.12446/Ants.cs
===================================================================
--- /trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.Netron/3.0.2672.12446/HeuristicLab.Netron-3.0.2672.12446/Ants.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.Netron/3.0.2672.12446/HeuristicLab.Netron-3.0.2672.12446/Ants.cs	(revision 4068)
@@ -29,10 +29,6 @@
 #endregion
 
-using System;
-using System.Collections.Generic;
-using System.Linq;
-using System.Text;
+using System.Drawing;
 using System.Drawing.Drawing2D;
-using System.Drawing;
 using Netron.Diagramming.Core;
 
Index: /trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.Netron/3.0.2672.12446/HeuristicLab.Netron-3.0.2672.12446/Controller.cs
===================================================================
--- /trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.Netron/3.0.2672.12446/HeuristicLab.Netron-3.0.2672.12446/Controller.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.Netron/3.0.2672.12446/HeuristicLab.Netron-3.0.2672.12446/Controller.cs	(revision 4068)
@@ -30,7 +30,4 @@
 
 using System;
-using System.Collections.Generic;
-using System.Linq;
-using System.Text;
 using Netron.Diagramming.Core;
 
Index: /trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.Netron/3.0.2672.12446/HeuristicLab.Netron-3.0.2672.12446/ExpandableIconMaterial.cs
===================================================================
--- /trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.Netron/3.0.2672.12446/HeuristicLab.Netron-3.0.2672.12446/ExpandableIconMaterial.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.Netron/3.0.2672.12446/HeuristicLab.Netron-3.0.2672.12446/ExpandableIconMaterial.cs	(revision 4068)
@@ -1,9 +1,6 @@
 ﻿using System;
-using System.Collections.Generic;
-using System.Linq;
-using System.Text;
-using Netron.Diagramming.Core;
 using System.Drawing;
 using System.Windows.Forms;
+using Netron.Diagramming.Core;
 
 namespace HeuristicLab.Netron {
@@ -31,5 +28,5 @@
           if (value) {
             this.Icon = this.collapsedBitmap;
-          } else 
+          } else
             this.Icon = this.expandedBitmap;
           collapsed = value;
Index: /trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.Netron/3.0.2672.12446/HeuristicLab.Netron-3.0.2672.12446/Ghosts.cs
===================================================================
--- /trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.Netron/3.0.2672.12446/HeuristicLab.Netron-3.0.2672.12446/Ghosts.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.Netron/3.0.2672.12446/HeuristicLab.Netron-3.0.2672.12446/Ghosts.cs	(revision 4068)
@@ -30,9 +30,6 @@
 
 using System;
-using System.Collections.Generic;
-using System.Linq;
-using System.Text;
+using System.Drawing;
 using Netron.Diagramming.Core;
-using System.Drawing;
 
 namespace HeuristicLab.Netron {
@@ -203,5 +200,5 @@
         return Rectangle.FromLTRB(Math.Min(mStart.X, mEnd.X), Math.Min(mStart.Y, mEnd.Y), Math.Max(mStart.X, mEnd.X), Math.Max(mStart.Y, mEnd.Y));
       }
-      set { 
+      set {
         //was orginally empty
         throw new NotImplementedException();
Index: /trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.Netron/3.0.2672.12446/HeuristicLab.Netron-3.0.2672.12446/HeuristicLabNetronPlugin.cs
===================================================================
--- /trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.Netron/3.0.2672.12446/HeuristicLab.Netron-3.0.2672.12446/HeuristicLabNetronPlugin.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.Netron/3.0.2672.12446/HeuristicLab.Netron-3.0.2672.12446/HeuristicLabNetronPlugin.cs	(revision 4068)
@@ -20,8 +20,4 @@
 #endregion
 
-using System;
-using System.Collections.Generic;
-using System.Linq;
-using System.Text;
 
 using HeuristicLab.PluginInfrastructure;
@@ -31,5 +27,5 @@
   [PluginFile("HeuristicLab.Netron-3.0.2672.12446.dll", PluginFileType.Assembly)]
   [PluginFile("Netron.Diagramming.Core-3.0.2672.12446.dll", PluginFileType.Assembly)]
-  [PluginFile("Netron.Diagramming.Core License.txt",PluginFileType.License)]
+  [PluginFile("Netron.Diagramming.Core License.txt", PluginFileType.License)]
   public class HeuristicLabNetronPlugin : PluginBase {
   }
Index: /trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.Netron/3.0.2672.12446/HeuristicLab.Netron-3.0.2672.12446/NetronVisualization.cs
===================================================================
--- /trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.Netron/3.0.2672.12446/HeuristicLab.Netron-3.0.2672.12446/NetronVisualization.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.Netron/3.0.2672.12446/HeuristicLab.Netron-3.0.2672.12446/NetronVisualization.cs	(revision 4068)
@@ -21,10 +21,6 @@
 
 using System;
-using System.Collections.Generic;
 using System.ComponentModel;
 using System.Drawing;
-using System.Data;
-using System.Linq;
-using System.Text;
 using System.Windows.Forms;
 
Index: /trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.Netron/3.0.2672.12446/HeuristicLab.Netron-3.0.2672.12446/Properties/AssemblyInfo.cs
===================================================================
--- /trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.Netron/3.0.2672.12446/HeuristicLab.Netron-3.0.2672.12446/Properties/AssemblyInfo.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.Netron/3.0.2672.12446/HeuristicLab.Netron-3.0.2672.12446/Properties/AssemblyInfo.cs	(revision 4068)
@@ -1,4 +1,3 @@
 ﻿using System.Reflection;
-using System.Runtime.CompilerServices;
 using System.Runtime.InteropServices;
 
Index: /trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.Netron/3.0.2672.12446/HeuristicLab.Netron-3.0.2672.12446/TextEditor.cs
===================================================================
--- /trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.Netron/3.0.2672.12446/HeuristicLab.Netron-3.0.2672.12446/TextEditor.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.Netron/3.0.2672.12446/HeuristicLab.Netron-3.0.2672.12446/TextEditor.cs	(revision 4068)
@@ -30,10 +30,7 @@
 
 using System;
-using System.Collections.Generic;
-using System.Linq;
-using System.Text;
+using System.Drawing;
+using System.Windows.Forms;
 using Netron.Diagramming.Core;
-using System.Windows.Forms;
-using System.Drawing;
 
 namespace HeuristicLab.Netron {
Index: /trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.Netron/3.0.2672.12446/HeuristicLab.Netron-3.0.2672.12446/View.cs
===================================================================
--- /trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.Netron/3.0.2672.12446/HeuristicLab.Netron-3.0.2672.12446/View.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.Netron/3.0.2672.12446/HeuristicLab.Netron-3.0.2672.12446/View.cs	(revision 4068)
@@ -30,10 +30,6 @@
 
 using System;
-using System.Collections.Generic;
-using System.Linq;
-using System.Text;
+using System.Drawing;
 using Netron.Diagramming.Core;
-using System.Drawing;
-using System.Drawing.Drawing2D;
 
 namespace HeuristicLab.Netron {
Index: /trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.Netron/3.0.2672.12446/Netron.Diagramming.Core-3.0.2672.12446/Analysis/Connection.Analysis.cs
===================================================================
--- /trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.Netron/3.0.2672.12446/Netron.Diagramming.Core-3.0.2672.12446/Analysis/Connection.Analysis.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.Netron/3.0.2672.12446/Netron.Diagramming.Core-3.0.2672.12446/Analysis/Connection.Analysis.cs	(revision 4068)
@@ -1,62 +1,49 @@
-using System;
-using System.Collections.Generic;
-using System.Text;
 using Netron.Diagramming.Core.Analysis;
-namespace Netron.Diagramming.Core
-{
-    public partial class Connection : IEdge
-    {
-        #region Fields
-        private bool mIsDirected = false;
+namespace Netron.Diagramming.Core {
+  public partial class Connection : IEdge {
+    #region Fields
+    private bool mIsDirected = false;
 
-        #endregion
+    #endregion
 
 
-        bool IEdge.IsDirected
-        {
-            get { return mIsDirected; }
-            set { mIsDirected = value; }
-        }
+    bool IEdge.IsDirected {
+      get { return mIsDirected; }
+      set { mIsDirected = value; }
+    }
 
-        INode IEdge.SourceNode
-        {
-            get {
-                if (From.AttachedTo == null)
-                    return null;
-                else
-                    return From.AttachedTo.Parent as INode;
-            }
-        }
+    INode IEdge.SourceNode {
+      get {
+        if (From.AttachedTo == null)
+          return null;
+        else
+          return From.AttachedTo.Parent as INode;
+      }
+    }
 
-        INode IEdge.TargetNode
-        {
-            get {
-                if (To.AttachedTo == null)
-                    return null;
-                else
-                    return To.AttachedTo.Parent as INode; 
-            }
-        }
+    INode IEdge.TargetNode {
+      get {
+        if (To.AttachedTo == null)
+          return null;
+        else
+          return To.AttachedTo.Parent as INode;
+      }
+    }
 
-        INode IEdge.AdjacentNode(INode node)
-        {
-            if (From.AttachedTo != null && (node as IShape) == From.AttachedTo.Parent)
-            {
-                if (To.AttachedTo == null)
-                    return null;
-                else
-                    return To.AttachedTo.Parent as INode;
-            }
-            else if (To.AttachedTo.Parent != null && (node as IShape) == To.AttachedTo.Parent)
-            {
-                if (From.AttachedTo == null)
-                    return null;
-                else
-                    return From.AttachedTo.Parent as INode;
-            }
-            else
-                throw new InconsistencyException("The given node is not part of the edge.");
+    INode IEdge.AdjacentNode(INode node) {
+      if (From.AttachedTo != null && (node as IShape) == From.AttachedTo.Parent) {
+        if (To.AttachedTo == null)
+          return null;
+        else
+          return To.AttachedTo.Parent as INode;
+      } else if (To.AttachedTo.Parent != null && (node as IShape) == To.AttachedTo.Parent) {
+        if (From.AttachedTo == null)
+          return null;
+        else
+          return From.AttachedTo.Parent as INode;
+      } else
+        throw new InconsistencyException("The given node is not part of the edge.");
 
-        }
     }
+  }
 }
Index: /trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.Netron/3.0.2672.12446/Netron.Diagramming.Core-3.0.2672.12446/Analysis/IEdge.cs
===================================================================
--- /trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.Netron/3.0.2672.12446/Netron.Diagramming.Core-3.0.2672.12446/Analysis/IEdge.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.Netron/3.0.2672.12446/Netron.Diagramming.Core-3.0.2672.12446/Analysis/IEdge.cs	(revision 4068)
@@ -1,31 +1,26 @@
-using System;
-using System.Collections.Generic;
-using System.Text;
 
-namespace Netron.Diagramming.Core.Analysis
-{
+namespace Netron.Diagramming.Core.Analysis {
+  /// <summary>
+  /// Describes a connection from the point of view of graph analysis.
+  /// </summary>
+  public interface IEdge {
     /// <summary>
-    /// Describes a connection from the point of view of graph analysis.
+    /// Indicates if this edge is directed or undirected.
     /// </summary>
-    public interface IEdge
-    {
-        /// <summary>
-        /// Indicates if this edge is directed or undirected.
-        /// </summary>
-        bool IsDirected { get; set;}
-        /// <summary>
-        /// Returns the first, or source, node upon which this Edge is incident.
-        /// </summary>
-        INode SourceNode { get;}
-        /// <summary>
-        /// Returns the second, or target, node upon which this Edge is incident.
-        /// </summary>
-        INode TargetNode { get;}
-        /// <summary>
-        /// Given a Node upon which this Edge is incident, the opposite incident
-        /// Node is returned. Throws an exception if the input node is not incident
-        /// on this Edge.
-        /// </summary>
-        INode AdjacentNode(INode node);
-    }
+    bool IsDirected { get; set; }
+    /// <summary>
+    /// Returns the first, or source, node upon which this Edge is incident.
+    /// </summary>
+    INode SourceNode { get; }
+    /// <summary>
+    /// Returns the second, or target, node upon which this Edge is incident.
+    /// </summary>
+    INode TargetNode { get; }
+    /// <summary>
+    /// Given a Node upon which this Edge is incident, the opposite incident
+    /// Node is returned. Throws an exception if the input node is not incident
+    /// on this Edge.
+    /// </summary>
+    INode AdjacentNode(INode node);
+  }
 }
Index: /trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.Netron/3.0.2672.12446/Netron.Diagramming.Core-3.0.2672.12446/Analysis/IGraph.cs
===================================================================
--- /trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.Netron/3.0.2672.12446/Netron.Diagramming.Core-3.0.2672.12446/Analysis/IGraph.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.Netron/3.0.2672.12446/Netron.Diagramming.Core-3.0.2672.12446/Analysis/IGraph.cs	(revision 4068)
@@ -1,120 +1,115 @@
-using System;
-using System.Collections.Generic;
-using System.Text;
 
-namespace Netron.Diagramming.Core.Analysis
-{
+namespace Netron.Diagramming.Core.Analysis {
+  /// <summary>
+  /// This interface describes the <see cref="Model"/> from the point of view of graph analysis.
+  /// </summary>
+  public interface IGraph {
     /// <summary>
-    /// This interface describes the <see cref="Model"/> from the point of view of graph analysis.
+    /// Get the in-degree of a node, the number of edges for which the node
+    /// is the target.
     /// </summary>
-    public interface IGraph
-    {
-        /// <summary>
-        /// Get the in-degree of a node, the number of edges for which the node
-        /// is the target.
-        /// </summary>
-        /// <param name="node"></param>
-        /// <returns></returns>
-        int InDegree(INode node);
-        /// <summary>
-        /// Get the out-degree of a node, the number of edges for which the node
-        /// is the source.
-        /// </summary>
-        /// <param name="node"></param>
-        /// <returns></returns>
-        int OutDegree(INode node);
-        /// <summary>
-        /// Get the degree of a node, the number of edges for which a node
-        /// is either the source or the target.
-        /// </summary>
-        /// <param name="node"></param>
-        /// <returns></returns>
-        int Degree(INode node);
-        /// <summary>
-        /// Indicates if the edges of this graph are directed or undirected.
-        /// </summary>
-        bool IsDirected { get;}
-        /// <summary>
-        /// Returns the nodes for the current page. This is the same as the <see cref="Model.Shapes"/> property except that the return type is
-        /// here <see cref="INode"/> rather than <see cref="IShape"/> type.
-        /// </summary>
-        CollectionBase<INode> Nodes { get;}
-        /// <summary>
-        /// Get the source Node for the given Edge instance.
-        /// </summary>
-        /// <param name="edge"></param>
-        /// <returns></returns>
-        INode FromNode(IEdge edge);
-        /// <summary>
-        /// Get the target Node for the given Edge instance.
-        /// </summary>
-        /// <param name="edge"></param>
-        /// <returns></returns>
-        INode ToNode(IEdge edge);
-        /// <summary>
-        ///  Given an Edge and an incident Node, return the other Node
-        /// connected to the edge.
-        /// </summary>
-        /// <param name="edge"></param>
-        /// <param name="node"></param>
-        /// <returns></returns>
-        INode AdjacentNode(IEdge edge, INode node);
-        /// <summary>
-        /// Gets the collection of all adjacent nodes connected to the given node by an
-        /// incoming edge (i.e., all nodes that "point" at this one).
-        /// </summary>
-        CollectionBase<INode> InNeighbors(INode node);
-        /// <summary>
-        /// Gets the collection of adjacent nodes connected to the given node by an
-        /// outgoing edge (i.e., all nodes "pointed" to by this one).
-        /// </summary>
-        CollectionBase<INode> OutNeighbors(INode node);
+    /// <param name="node"></param>
+    /// <returns></returns>
+    int InDegree(INode node);
+    /// <summary>
+    /// Get the out-degree of a node, the number of edges for which the node
+    /// is the source.
+    /// </summary>
+    /// <param name="node"></param>
+    /// <returns></returns>
+    int OutDegree(INode node);
+    /// <summary>
+    /// Get the degree of a node, the number of edges for which a node
+    /// is either the source or the target.
+    /// </summary>
+    /// <param name="node"></param>
+    /// <returns></returns>
+    int Degree(INode node);
+    /// <summary>
+    /// Indicates if the edges of this graph are directed or undirected.
+    /// </summary>
+    bool IsDirected { get; }
+    /// <summary>
+    /// Returns the nodes for the current page. This is the same as the <see cref="Model.Shapes"/> property except that the return type is
+    /// here <see cref="INode"/> rather than <see cref="IShape"/> type.
+    /// </summary>
+    CollectionBase<INode> Nodes { get; }
+    /// <summary>
+    /// Get the source Node for the given Edge instance.
+    /// </summary>
+    /// <param name="edge"></param>
+    /// <returns></returns>
+    INode FromNode(IEdge edge);
+    /// <summary>
+    /// Get the target Node for the given Edge instance.
+    /// </summary>
+    /// <param name="edge"></param>
+    /// <returns></returns>
+    INode ToNode(IEdge edge);
+    /// <summary>
+    ///  Given an Edge and an incident Node, return the other Node
+    /// connected to the edge.
+    /// </summary>
+    /// <param name="edge"></param>
+    /// <param name="node"></param>
+    /// <returns></returns>
+    INode AdjacentNode(IEdge edge, INode node);
+    /// <summary>
+    /// Gets the collection of all adjacent nodes connected to the given node by an
+    /// incoming edge (i.e., all nodes that "point" at this one).
+    /// </summary>
+    CollectionBase<INode> InNeighbors(INode node);
+    /// <summary>
+    /// Gets the collection of adjacent nodes connected to the given node by an
+    /// outgoing edge (i.e., all nodes "pointed" to by this one).
+    /// </summary>
+    CollectionBase<INode> OutNeighbors(INode node);
 
-        /// <summary>
-        /// Get an iterator over all nodes connected to the given node.
-        /// </summary>
-        CollectionBase<INode> Neighbors(INode node);
-        /// <summary>
-        /// Gets the edges.
-        /// </summary>
-        /// <value>The edges.</value>
-        CollectionBase<IEdge> Edges { get;}
-        /// <summary>
-        /// Returns the edges connected to the given node.
-        /// </summary>
-        /// <param name="node">The node.</param>
-        /// <returns></returns>
-        CollectionBase<IEdge> EdgesOf(INode node);
+    /// <summary>
+    /// Get an iterator over all nodes connected to the given node.
+    /// </summary>
+    CollectionBase<INode> Neighbors(INode node);
+    /// <summary>
+    /// Gets the edges.
+    /// </summary>
+    /// <value>The edges.</value>
+    CollectionBase<IEdge> Edges { get; }
+    /// <summary>
+    /// Returns the edges connected to the given node.
+    /// </summary>
+    /// <param name="node">The node.</param>
+    /// <returns></returns>
+    CollectionBase<IEdge> EdgesOf(INode node);
 
-        /// <summary>
-        /// Returns the incoming edges of the given node.
-        /// </summary>
-        /// <param name="node">The node.</param>
-        /// <returns></returns>
-        CollectionBase<IEdge> InEdges(INode node);
+    /// <summary>
+    /// Returns the incoming edges of the given node.
+    /// </summary>
+    /// <param name="node">The node.</param>
+    /// <returns></returns>
+    CollectionBase<IEdge> InEdges(INode node);
 
-        /// <summary>
-        /// Returns the outgoing edges attached to the given node.
-        /// </summary>
-        /// <param name="node">The node.</param>
-        /// <returns></returns>
-        CollectionBase<IEdge> OutEdges(INode node);
+    /// <summary>
+    /// Returns the outgoing edges attached to the given node.
+    /// </summary>
+    /// <param name="node">The node.</param>
+    /// <returns></returns>
+    CollectionBase<IEdge> OutEdges(INode node);
 
-        /// <summary>
-        /// Gets a spanning tree of the model or graph.
-        /// </summary>
-        /// <value>The spanning tree.</value>
-        ITree SpanningTree { get;}
+    /// <summary>
+    /// Gets a spanning tree of the model or graph.
+    /// </summary>
+    /// <value>The spanning tree.</value>
+    ITree SpanningTree { get; }
 
-        /// <summary>
-        /// Makes the spanning tree.
-        /// </summary>
-        /// <param name="node">The node.</param>
-        void MakeSpanningTree(INode node);
+    /// <summary>
+    /// Makes the spanning tree.
+    /// </summary>
+    /// <param name="node">The node.</param>
+    void MakeSpanningTree(INode node);
 
-        /// <summary>
-        /// Clears the spanning tree.
-        /// </summary>
-        void ClearSpanningTree();
+    /// <summary>
+    /// Clears the spanning tree.
+    /// </summary>
+    void ClearSpanningTree();
 
 
@@ -124,4 +119,4 @@
 
 
-    }
+  }
 }
Index: /trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.Netron/3.0.2672.12446/Netron.Diagramming.Core-3.0.2672.12446/Analysis/INode.cs
===================================================================
--- /trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.Netron/3.0.2672.12446/Netron.Diagramming.Core-3.0.2672.12446/Analysis/INode.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.Netron/3.0.2672.12446/Netron.Diagramming.Core-3.0.2672.12446/Analysis/INode.cs	(revision 4068)
@@ -1,148 +1,144 @@
 using System;
 using System.Drawing;
-using System.Collections.Generic;
-using System.Text;
 
-namespace Netron.Diagramming.Core.Analysis
-{
+namespace Netron.Diagramming.Core.Analysis {
+  /// <summary>
+  /// This interface describes the <see cref="IShape"/> from the point of view of graph analysis.
+  /// </summary>
+  public interface INode {
     /// <summary>
-    /// This interface describes the <see cref="IShape"/> from the point of view of graph analysis.
+    /// Get the in-degree of the node, the number of edges for which this node
+    /// is the target.
     /// </summary>
-    public interface INode
-    {
-        /// <summary>
-        /// Get the in-degree of the node, the number of edges for which this node
-        /// is the target.
-        /// </summary>
-        int InDegree { get;}
-        /// <summary>
-        /// Get the out-degree of the node, the number of edges for which this node
-        /// is the source.
-        /// </summary>
-        int OutDegree { get;}
-        /// <summary>
-        /// Get the degree of the node, the number of edges for which this node
-        /// is either the source or the target.
-        /// </summary>
-        int Degree { get;}
-        /// <summary>
-        /// Gets the collection of all incoming edges, those for which this node
-        /// is the target.
-        /// </summary>
-        CollectionBase<IEdge> InEdges { get;}
-        /// <summary>
-        /// Gets or sets whether this shape is fixed with respect to diagram layout
-        /// </summary>           
-        bool IsFixed { get; set;}
-        /// <summary>
-        /// Gets or sets a value indicating whether this instance is expanded.
-        /// </summary>
-        /// <value>
-        /// 	<c>true</c> if this instance is expanded; otherwise, <c>false</c>.
-        /// </value>
-        bool IsExpanded { get; set;}
-        /// <summary>
-        /// Gets the unique identifier of this node.
-        /// </summary>
-        /// <value>The uid.</value>
-        Guid Uid { get;}
-        /// <summary>
-        /// Gets the collection of all outgoing edges, those for which this node
-        /// is the source.
-        /// </summary>
-        CollectionBase<IEdge> OutEdges { get;}
-        /// <summary>
-        ///Gets the collection of all incident edges, those for which this node
-        /// is either the source or the target.
-        /// </summary>
-        CollectionBase<IEdge> Edges { get;}
-        /// <summary>
-        /// Gets the collection of all adjacent nodes connected to this node by an
-        /// incoming edge (i.e., all nodes that "point" at this one).
-        /// </summary>
-        CollectionBase<INode> InNeighbors { get;}
-        /// <summary>
-        /// Gets the collection of adjacent nodes connected to this node by an
-        /// outgoing edge (i.e., all nodes "pointed" to by this one).
-        /// </summary>
-        CollectionBase<INode> OutNeighbors { get;}
+    int InDegree { get; }
+    /// <summary>
+    /// Get the out-degree of the node, the number of edges for which this node
+    /// is the source.
+    /// </summary>
+    int OutDegree { get; }
+    /// <summary>
+    /// Get the degree of the node, the number of edges for which this node
+    /// is either the source or the target.
+    /// </summary>
+    int Degree { get; }
+    /// <summary>
+    /// Gets the collection of all incoming edges, those for which this node
+    /// is the target.
+    /// </summary>
+    CollectionBase<IEdge> InEdges { get; }
+    /// <summary>
+    /// Gets or sets whether this shape is fixed with respect to diagram layout
+    /// </summary>           
+    bool IsFixed { get; set; }
+    /// <summary>
+    /// Gets or sets a value indicating whether this instance is expanded.
+    /// </summary>
+    /// <value>
+    /// 	<c>true</c> if this instance is expanded; otherwise, <c>false</c>.
+    /// </value>
+    bool IsExpanded { get; set; }
+    /// <summary>
+    /// Gets the unique identifier of this node.
+    /// </summary>
+    /// <value>The uid.</value>
+    Guid Uid { get; }
+    /// <summary>
+    /// Gets the collection of all outgoing edges, those for which this node
+    /// is the source.
+    /// </summary>
+    CollectionBase<IEdge> OutEdges { get; }
+    /// <summary>
+    ///Gets the collection of all incident edges, those for which this node
+    /// is either the source or the target.
+    /// </summary>
+    CollectionBase<IEdge> Edges { get; }
+    /// <summary>
+    /// Gets the collection of all adjacent nodes connected to this node by an
+    /// incoming edge (i.e., all nodes that "point" at this one).
+    /// </summary>
+    CollectionBase<INode> InNeighbors { get; }
+    /// <summary>
+    /// Gets the collection of adjacent nodes connected to this node by an
+    /// outgoing edge (i.e., all nodes "pointed" to by this one).
+    /// </summary>
+    CollectionBase<INode> OutNeighbors { get; }
 
-        /// <summary>
-        /// Get an iterator over all nodes connected to this node.
-        /// </summary>
-        CollectionBase<INode> Neighbors { get;}
+    /// <summary>
+    /// Get an iterator over all nodes connected to this node.
+    /// </summary>
+    CollectionBase<INode> Neighbors { get; }
 
-        /// <summary>
-        /// Get the parent node of this node in a tree structure.
-        /// </summary>
-        INode ParentNode { get; set;}
-        /// <summary>
-        /// Get the edge between this node and its parent node in a tree
-        /// structure.
-        /// </summary>
-        IEdge ParentEdge { get; set;}
-        /// <summary>
-        /// Get the tree depth of this node.
-        ///<remarks>The root's tree depth is
-        /// zero, and each level of the tree is one depth level greater.
-        /// </remarks> 
-        /// </summary>
-        int Depth { get; set;}
-        /// <summary>
-        /// Get the number of tree children of this node.
-        /// </summary>
-        int ChildCount { get;}
-        /// <summary>
-        /// Get this node's first tree child.
-        /// </summary>
-        INode FirstChild { get;}
-        /// <summary>
-        /// Get this node's last tree child.
-        /// </summary>
-        INode LastChild { get;}
+    /// <summary>
+    /// Get the parent node of this node in a tree structure.
+    /// </summary>
+    INode ParentNode { get; set; }
+    /// <summary>
+    /// Get the edge between this node and its parent node in a tree
+    /// structure.
+    /// </summary>
+    IEdge ParentEdge { get; set; }
+    /// <summary>
+    /// Get the tree depth of this node.
+    ///<remarks>The root's tree depth is
+    /// zero, and each level of the tree is one depth level greater.
+    /// </remarks> 
+    /// </summary>
+    int Depth { get; set; }
+    /// <summary>
+    /// Get the number of tree children of this node.
+    /// </summary>
+    int ChildCount { get; }
+    /// <summary>
+    /// Get this node's first tree child.
+    /// </summary>
+    INode FirstChild { get; }
+    /// <summary>
+    /// Get this node's last tree child.
+    /// </summary>
+    INode LastChild { get; }
 
-        /// <summary>
-        /// Gets the X coordinate.
-        /// </summary>
-        /// <value>The X.</value>
-        int X { get;}
-        /// <summary>
-        /// Gets the Y coordinate.
-        /// </summary>
-        /// <value>The Y.</value>
-        int Y { get;}
+    /// <summary>
+    /// Gets the X coordinate.
+    /// </summary>
+    /// <value>The X.</value>
+    int X { get; }
+    /// <summary>
+    /// Gets the Y coordinate.
+    /// </summary>
+    /// <value>The Y.</value>
+    int Y { get; }
 
-        /// <summary>
-        /// Get this node's previous tree sibling.
-        /// </summary>
-        INode PreviousSibling { get;}
-         /// <summary>
-        /// Get this node's next tree sibling.
-         /// </summary>
-        INode NextSibling { get;}
+    /// <summary>
+    /// Get this node's previous tree sibling.
+    /// </summary>
+    INode PreviousSibling { get; }
+    /// <summary>
+    /// Get this node's next tree sibling.
+    /// </summary>
+    INode NextSibling { get; }
 
-        /// <summary>
-        /// Gets the rectangle.
-        /// </summary>
-        /// <value>The rectangle.</value>
-        Rectangle Rectangle { get;}
-        /// <summary>
-        /// Get an iterator over this node's tree children.
-        /// </summary>
-        CollectionBase<INode> Children { get; set;}
-        /// <summary>
-        /// Get an iterator over the edges from this node to its tree children.
-        /// </summary>
-        CollectionBase<IEdge> ChildEdges { get;}
+    /// <summary>
+    /// Gets the rectangle.
+    /// </summary>
+    /// <value>The rectangle.</value>
+    Rectangle Rectangle { get; }
+    /// <summary>
+    /// Get an iterator over this node's tree children.
+    /// </summary>
+    CollectionBase<INode> Children { get; set; }
+    /// <summary>
+    /// Get an iterator over the edges from this node to its tree children.
+    /// </summary>
+    CollectionBase<IEdge> ChildEdges { get; }
 
-        /// <summary>
-        /// Moves the node, the argument being the motion vector.
-        /// </summary>
-        /// <param name="p">The p.</param>
-        void MoveBy(Point p);
-    }
-  
-   
-  
-  
+    /// <summary>
+    /// Moves the node, the argument being the motion vector.
+    /// </summary>
+    /// <param name="p">The p.</param>
+    void MoveBy(Point p);
+  }
+
+
+
+
 }
Index: /trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.Netron/3.0.2672.12446/Netron.Diagramming.Core-3.0.2672.12446/Analysis/ITree.cs
===================================================================
--- /trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.Netron/3.0.2672.12446/Netron.Diagramming.Core-3.0.2672.12446/Analysis/ITree.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.Netron/3.0.2672.12446/Netron.Diagramming.Core-3.0.2672.12446/Analysis/ITree.cs	(revision 4068)
@@ -1,89 +1,85 @@
 using System;
-using System.Collections.Generic;
-using System.Text;
 
-namespace Netron.Diagramming.Core.Analysis
-{
+namespace Netron.Diagramming.Core.Analysis {
+  /// <summary>
+  /// This interface describes the additional members useful if the underlying graph is a tree.
+  /// </summary>
+  public interface ITree : IGraph {
+
     /// <summary>
-    /// This interface describes the additional members useful if the underlying graph is a tree.
+    /// Gets or sets a value indicating whether this tree is directed.
     /// </summary>
-    public interface ITree : IGraph
-    {
+    /// <value>
+    /// 	<c>true</c> if this instance is directed; otherwise, <c>false</c>.
+    /// </value>
+    new bool IsDirected { get; set; }
+    /// <summary>
+    /// Gets or sets the root of the tree
+    /// </summary>
+    INode Root { get; set; }
+    /// <summary>
+    /// Gets the children of the given node in the tree hierarchy.
+    /// </summary>
+    /// <param name="node"></param>
+    /// <returns></returns>
+    CollectionBase<INode> Children(INode node);
+    /// <summary>
+    /// Gets the edges connecting the children of the given node.
+    /// </summary>
+    /// <param name="node"></param>
+    /// <returns></returns>
+    CollectionBase<IEdge> ChildEdges(INode node);
 
-        /// <summary>
-        /// Gets or sets a value indicating whether this tree is directed.
-        /// </summary>
-        /// <value>
-        /// 	<c>true</c> if this instance is directed; otherwise, <c>false</c>.
-        /// </value>
-        new bool IsDirected { get; set;}
-        /// <summary>
-        /// Gets or sets the root of the tree
-        /// </summary>
-        INode Root { get;set;}
-        /// <summary>
-        /// Gets the children of the given node in the tree hierarchy.
-        /// </summary>
-        /// <param name="node"></param>
-        /// <returns></returns>
-        CollectionBase<INode> Children(INode node);
-        /// <summary>
-        /// Gets the edges connecting the children of the given node.
-        /// </summary>
-        /// <param name="node"></param>
-        /// <returns></returns>
-        CollectionBase<IEdge> ChildEdges(INode node);
+    /// <summary>
+    /// Returns the next sibling node of the given node.
+    /// </summary>
+    /// <param name="node">The node.</param>
+    /// <returns></returns>
+    INode NextSibling(INode node);
 
-        /// <summary>
-        /// Returns the next sibling node of the given node.
-        /// </summary>
-        /// <param name="node">The node.</param>
-        /// <returns></returns>
-        INode NextSibling(INode node);
+    /// <summary>
+    /// Returns the previous sibling node of the given node.
+    /// </summary>
+    /// <param name="node">The node.</param>
+    /// <returns></returns>
+    INode PreviousSibling(INode node);
 
-        /// <summary>
-        /// Returns the previous sibling node of the given node.
-        /// </summary>
-        /// <param name="node">The node.</param>
-        /// <returns></returns>
-        INode PreviousSibling(INode node);
+    /// <summary>
+    /// Returns the last child of the given node.
+    /// </summary>
+    /// <param name="node">The node.</param>
+    /// <returns></returns>
+    INode LastChild(INode node);
 
-        /// <summary>
-        /// Returns the last child of the given node.
-        /// </summary>
-        /// <param name="node">The node.</param>
-        /// <returns></returns>
-        INode LastChild(INode node);
-
-        /// <summary>
-        /// Returns the first child of the given node.
-        /// </summary>
-        /// <param name="node">The node.</param>
-        /// <returns></returns>
-        INode FirstChild(INode node);
-        /// <summary>
-        /// Returns how many children the given node has.
-        /// </summary>
-        /// <param name="node">The node.</param>
-        /// <returns></returns>
-        int ChildCount(INode node);
-        /// <summary>
-        /// Returns the depth the specified node.
-        /// </summary>
-        /// <param name="node">The node.</param>
-        /// <returns></returns>
-        int Depth(INode node);
-        /// <summary>
-        /// Returns the parent edge of the given node.
-        /// </summary>
-        /// <param name="node">The node.</param>
-        /// <returns></returns>
-        IEdge ParentEdge(INode node);
-        /// <summary>
-        /// Executes a the given <see cref="System.Action"/> on each node, starting from the given node, by means of a traversal
-        /// </summary>
-        /// <param name="action">The action.</param>
-        /// <param name="startNode">The start node.</param>
-        void ForEach<T>(Action<T> action, INode startNode) where T : INode;
-    }
+    /// <summary>
+    /// Returns the first child of the given node.
+    /// </summary>
+    /// <param name="node">The node.</param>
+    /// <returns></returns>
+    INode FirstChild(INode node);
+    /// <summary>
+    /// Returns how many children the given node has.
+    /// </summary>
+    /// <param name="node">The node.</param>
+    /// <returns></returns>
+    int ChildCount(INode node);
+    /// <summary>
+    /// Returns the depth the specified node.
+    /// </summary>
+    /// <param name="node">The node.</param>
+    /// <returns></returns>
+    int Depth(INode node);
+    /// <summary>
+    /// Returns the parent edge of the given node.
+    /// </summary>
+    /// <param name="node">The node.</param>
+    /// <returns></returns>
+    IEdge ParentEdge(INode node);
+    /// <summary>
+    /// Executes a the given <see cref="System.Action"/> on each node, starting from the given node, by means of a traversal
+    /// </summary>
+    /// <param name="action">The action.</param>
+    /// <param name="startNode">The start node.</param>
+    void ForEach<T>(Action<T> action, INode startNode) where T : INode;
+  }
 }
Index: /trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.Netron/3.0.2672.12446/Netron.Diagramming.Core-3.0.2672.12446/Analysis/Model.Analysis.cs
===================================================================
--- /trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.Netron/3.0.2672.12446/Netron.Diagramming.Core-3.0.2672.12446/Analysis/Model.Analysis.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.Netron/3.0.2672.12446/Netron.Diagramming.Core-3.0.2672.12446/Analysis/Model.Analysis.cs	(revision 4068)
@@ -1,8 +1,5 @@
 using System;
-using System.Drawing;
 using System.Collections;
 using System.Collections.Generic;
-using System.Collections.Specialized;
-using System.Text;
 using Netron.Diagramming.Core.Analysis;
 namespace Netron.Diagramming.Core {
Index: /trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.Netron/3.0.2672.12446/Netron.Diagramming.Core-3.0.2672.12446/Analysis/ShapeBase.Analysis.cs
===================================================================
--- /trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.Netron/3.0.2672.12446/Netron.Diagramming.Core-3.0.2672.12446/Analysis/ShapeBase.Analysis.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.Netron/3.0.2672.12446/Netron.Diagramming.Core-3.0.2672.12446/Analysis/ShapeBase.Analysis.cs	(revision 4068)
@@ -1,379 +1,332 @@
 using System;
-using System.Collections.Generic;
-using System.Text;
 using Netron.Diagramming.Core.Analysis;
-namespace Netron.Diagramming.Core
-{
-    public abstract partial class ShapeBase : INode
-    {
-        #region Fields
-        /// <summary>
-        /// the parent node
-        /// </summary>
-        private INode mParentNode = null;
-        private IEdge mParentEdge = null;
-        private bool mIsExpanded = true;
-        private CollectionBase<INode> treeChildren = null;
-        private int mDepth = -1;
-        #endregion
-
-        #region Properties
-
-        /// <summary>
-        /// Gets or sets whether this shape is fixed with respect to diagram layout
-        /// </summary>
-        /// <value></value>
-        bool INode.IsFixed
-        {
-            get { return mIsFixed; }
-            set { mIsFixed = value; }
+namespace Netron.Diagramming.Core {
+  public abstract partial class ShapeBase : INode {
+    #region Fields
+    /// <summary>
+    /// the parent node
+    /// </summary>
+    private INode mParentNode = null;
+    private IEdge mParentEdge = null;
+    private bool mIsExpanded = true;
+    private CollectionBase<INode> treeChildren = null;
+    private int mDepth = -1;
+    #endregion
+
+    #region Properties
+
+    /// <summary>
+    /// Gets or sets whether this shape is fixed with respect to diagram layout
+    /// </summary>
+    /// <value></value>
+    bool INode.IsFixed {
+      get { return mIsFixed; }
+      set { mIsFixed = value; }
+    }
+
+    /// <summary>
+    /// Gets or sets the IsExpanded
+    /// </summary>
+    public bool IsExpanded {
+      get { return treeChildren.Count != 0; }
+      set { mIsExpanded = value; }
+    }
+
+
+    /// <summary>
+    /// Get the in-degree of the node, the number of edges for which this node
+    /// is the target.
+    /// </summary>
+    /// <value></value>
+    int INode.InDegree {
+      get {
+        return (this as INode).InEdges.Count;
+      }
+    }
+
+    /// <summary>
+    /// Get the out-degree of the node, the number of edges for which this node
+    /// is the source.
+    /// </summary>
+    /// <value></value>
+    int INode.OutDegree {
+      get {
+        return (this as INode).OutEdges.Count;
+      }
+    }
+
+    /// <summary>
+    /// Get the degree of the node, the number of edges for which this node
+    /// is either the source or the target.
+    /// </summary>
+    /// <value></value>
+    int INode.Degree {
+      get {
+        return (this as INode).Edges.Count;
+      }
+    }
+
+
+    /// <summary>
+    /// Gets the collection of all incoming edges, those for which this node
+    /// is the target.
+    /// </summary>
+    /// <value></value>
+    CollectionBase<IEdge> INode.InEdges {
+      get {
+
+        CollectionBase<IEdge> col = (this as INode).Edges;
+        CollectionBase<IEdge> ret = new CollectionBase<IEdge>();
+        col.ForEach(
+              delegate(IEdge edge) {
+                if (edge.TargetNode == this)
+                  ret.Add(edge);
+              }
+            );
+        return ret;
+      }
+    }
+
+    /// <summary>
+    /// Gets the collection of all outgoing edges, those for which this node
+    /// is the source.
+    /// </summary>
+    /// <value></value>
+    CollectionBase<IEdge> INode.OutEdges {
+      get {
+
+        CollectionBase<IEdge> col = (this as INode).Edges;
+        CollectionBase<IEdge> ret = new CollectionBase<IEdge>();
+        col.ForEach(
+              delegate(IEdge edge) {
+                if (edge.SourceNode == this)
+                  ret.Add(edge);
+              }
+            );
+        return ret;
+      }
+    }
+
+    /// <summary>
+    /// Gets the collection of all incident edges, those for which this node
+    /// is either the source or the target.
+    /// </summary>
+    /// <value></value>
+    CollectionBase<IEdge> INode.Edges {
+      get {
+        CollectionBase<IEdge> col = new CollectionBase<IEdge>();
+        this.Connectors.ForEach(
+            delegate(IConnector cn) {
+              foreach (IConnector cnn in cn.AttachedConnectors)
+                if (cnn.Parent is IEdge)
+                  col.Add(cnn.Parent as IEdge);
+            }
+        );
+
+        return col;
+      }
+    }
+
+    /// <summary>
+    /// Gets the collection of all adjacent nodes connected to this node by an
+    /// incoming edge (i.e., all nodes that "point" at this one).
+    /// </summary>
+    /// <value></value>
+    CollectionBase<INode> INode.InNeighbors {
+      get {
+        CollectionBase<IEdge> edges = (this as INode).InEdges;
+        CollectionBase<INode> ret = new CollectionBase<INode>();
+        edges.ForEach(
+              delegate(IEdge edge) {
+                ret.Add(edge.SourceNode);
+              }
+            );
+        return ret;
+      }
+    }
+
+    /// <summary>
+    /// Gets the collection of adjacent nodes connected to this node by an
+    /// outgoing edge (i.e., all nodes "pointed" to by this one).
+    /// </summary>
+    /// <value></value>
+    CollectionBase<INode> INode.OutNeighbors {
+      get {
+        CollectionBase<IEdge> edges = (this as INode).OutEdges;
+        CollectionBase<INode> ret = new CollectionBase<INode>();
+        edges.ForEach(
+              delegate(IEdge edge) {
+                ret.Add(edge.TargetNode);
+              }
+            );
+        return ret;
+      }
+    }
+
+
+    /// <summary>
+    /// Get an iterator over all nodes connected to this node.
+    /// </summary>
+    /// <value></value>
+    CollectionBase<INode> INode.Neighbors {
+      get {
+        CollectionBase<IEdge> edges = (this as INode).Edges;
+        CollectionBase<INode> ret = new CollectionBase<INode>();
+        edges.ForEach(
+            delegate(IEdge edge) {
+              if (edge.SourceNode == this)
+                ret.Add(edge.TargetNode);
+              else
+                ret.Add(edge.SourceNode);
+            }
+            );
+
+        return ret;
+      }
+    }
+
+    /// <summary>
+    /// Gets or sets the parent of the entity
+    /// </summary>
+    /// <value></value>
+    INode INode.ParentNode {
+      get {
+        return mParentNode;
+        ;
+      }
+      set {
+        mParentNode = value;
+      }
+    }
+
+    /// <summary>
+    /// Get the edge between this node and its parent node in a tree
+    /// structure.
+    /// </summary>
+    /// <value></value>
+    IEdge INode.ParentEdge {
+      get {
+        //return (this.Model as IGraph).SpanningTree.ParentEdge(this); 
+        return mParentEdge;
+      }
+      set {
+        mParentEdge = value;
+      }
+
+    }
+
+    /// <summary>
+    /// Get the tree depth of this node.
+    /// <remarks>The root's tree depth is
+    /// zero, and each level of the tree is one depth level greater.
+    /// </remarks>
+    /// </summary>
+    /// <value></value>
+    int INode.Depth {
+      get { return mDepth; }
+      set { mDepth = value; }
+    }
+
+    /// <summary>
+    /// Get the number of tree children of this node.
+    /// </summary>
+    /// <value></value>
+    int INode.ChildCount {
+      get {
+        if (this.treeChildren == null)
+          return 0;
+        else
+          return this.treeChildren.Count;
+      }
+    }
+
+    /// <summary>
+    /// Get this node's first tree child.
+    /// </summary>
+    /// <value></value>
+    INode INode.FirstChild {
+      get {
+        if (this.treeChildren == null)
+          return null;
+        else
+          return treeChildren[0];
+      }
+    }
+
+    /// <summary>
+    /// Get this node's last tree child.
+    /// </summary>
+    /// <value></value>
+    INode INode.LastChild {
+      get {
+        if (this.treeChildren == null)
+          return null;
+        else
+          return treeChildren[this.treeChildren.Count - 1];
+      }
+    }
+
+    /// <summary>
+    /// Get this node's previous tree sibling.
+    /// </summary>
+    /// <value></value>
+    INode INode.PreviousSibling {
+      get {
+        if ((this as INode).ParentNode == null)
+          return null;
+        else {
+          CollectionBase<INode> ch = (this as INode).ParentNode.Children;
+          int chi = ch.IndexOf(this as INode);
+          if (chi < 0 || chi > ch.Count - 1)
+            throw new IndexOutOfRangeException();
+
+          if (chi == 0)
+            return null;
+          else
+            return ch[chi - 1];
         }
-        
-        /// <summary>
-        /// Gets or sets the IsExpanded
-        /// </summary>
-        public bool IsExpanded
-        {
-            get { return treeChildren.Count != 0; }
-            set { mIsExpanded = value; }
+      }
+    }
+
+    /// <summary>
+    /// Get this node's next tree sibling.
+    /// </summary>
+    /// <value></value>
+    INode INode.NextSibling {
+      get {
+        if ((this as INode).ParentNode == null)
+          return null;
+        else {
+          CollectionBase<INode> ch = (this as INode).ParentNode.Children;
+          int chi = ch.IndexOf(this as INode);
+          if (chi < 0 || chi > ch.Count - 1)
+            throw new IndexOutOfRangeException();
+
+          if (chi == ch.Count - 1)
+            return null;
+          else
+            return ch[chi + 1];
         }
-
-
-        /// <summary>
-        /// Get the in-degree of the node, the number of edges for which this node
-        /// is the target.
-        /// </summary>
-        /// <value></value>
-        int INode.InDegree
-        {
-            get
-            {
-                return (this as INode).InEdges.Count;
-            }
-        }
-
-        /// <summary>
-        /// Get the out-degree of the node, the number of edges for which this node
-        /// is the source.
-        /// </summary>
-        /// <value></value>
-        int INode.OutDegree
-        {
-            get
-            {
-                return (this as INode).OutEdges.Count;
-            }
-        }
-
-        /// <summary>
-        /// Get the degree of the node, the number of edges for which this node
-        /// is either the source or the target.
-        /// </summary>
-        /// <value></value>
-        int INode.Degree
-        {
-            get
-            {
-                return (this as INode).Edges.Count;
-            }
-        }
-        
-
-        /// <summary>
-        /// Gets the collection of all incoming edges, those for which this node
-        /// is the target.
-        /// </summary>
-        /// <value></value>
-        CollectionBase<IEdge> INode.InEdges
-        {
-            get
-            {
-
-                CollectionBase<IEdge> col = (this as INode).Edges;
-                CollectionBase<IEdge> ret = new CollectionBase<IEdge>();
-                col.ForEach(
-                      delegate(IEdge edge)
-                      {
-                          if (edge.TargetNode == this)
-                              ret.Add(edge);
-                      }
-                    );
-                return ret;
-            }
-        }
-
-        /// <summary>
-        /// Gets the collection of all outgoing edges, those for which this node
-        /// is the source.
-        /// </summary>
-        /// <value></value>
-        CollectionBase<IEdge> INode.OutEdges
-        {
-            get
-            {
-
-                CollectionBase<IEdge> col = (this as INode).Edges;
-                CollectionBase<IEdge> ret = new CollectionBase<IEdge>();
-                col.ForEach(
-                      delegate(IEdge edge)
-                      {
-                          if (edge.SourceNode == this)
-                              ret.Add(edge);
-                      }
-                    );
-                return ret;
-            }
-        }
-
-        /// <summary>
-        /// Gets the collection of all incident edges, those for which this node
-        /// is either the source or the target.
-        /// </summary>
-        /// <value></value>
-        CollectionBase<IEdge> INode.Edges
-        {
-            get
-            {
-                CollectionBase<IEdge> col = new CollectionBase<IEdge>();
-                this.Connectors.ForEach(
-                    delegate(IConnector cn)
-                    {
-                        foreach (IConnector cnn in cn.AttachedConnectors)
-                            if (cnn.Parent is IEdge)
-                                col.Add(cnn.Parent as IEdge);
-                    }
-                );
-
-                return col;
-            }
-        }
-
-        /// <summary>
-        /// Gets the collection of all adjacent nodes connected to this node by an
-        /// incoming edge (i.e., all nodes that "point" at this one).
-        /// </summary>
-        /// <value></value>
-        CollectionBase<INode> INode.InNeighbors
-        {
-            get
-            {
-                CollectionBase<IEdge> edges = (this as INode).InEdges;
-                CollectionBase<INode> ret = new CollectionBase<INode>();
-                edges.ForEach(
-                      delegate(IEdge edge)
-                      {
-                          ret.Add(edge.SourceNode);
-                      }
-                    );
-                return ret;
-            }
-        }
-
-        /// <summary>
-        /// Gets the collection of adjacent nodes connected to this node by an
-        /// outgoing edge (i.e., all nodes "pointed" to by this one).
-        /// </summary>
-        /// <value></value>
-        CollectionBase<INode> INode.OutNeighbors
-        {
-            get
-            {
-                CollectionBase<IEdge> edges = (this as INode).OutEdges;
-                CollectionBase<INode> ret = new CollectionBase<INode>();
-                edges.ForEach(
-                      delegate(IEdge edge)
-                      {
-                          ret.Add(edge.TargetNode);
-                      }
-                    );
-                return ret;
-            }
-        }
-
-
-        /// <summary>
-        /// Get an iterator over all nodes connected to this node.
-        /// </summary>
-        /// <value></value>
-        CollectionBase<INode> INode.Neighbors
-        {
-            get
-            {
-                CollectionBase<IEdge> edges = (this as INode).Edges;
-                CollectionBase<INode> ret = new CollectionBase<INode>();
-                edges.ForEach(
-                    delegate(IEdge edge)
-                    {
-                        if (edge.SourceNode == this)
-                            ret.Add(edge.TargetNode);
-                        else
-                            ret.Add(edge.SourceNode);
-                    }
-                    );
-
-                return ret;
-            }
-        }
-
-        /// <summary>
-        /// Gets or sets the parent of the entity
-        /// </summary>
-        /// <value></value>
-        INode INode.ParentNode
-        {
-            get
-            {
-                return mParentNode;
-                ;
-            }
-            set
-            {
-                mParentNode = value;
-            }
-        }
-
-        /// <summary>
-        /// Get the edge between this node and its parent node in a tree
-        /// structure.
-        /// </summary>
-        /// <value></value>
-        IEdge INode.ParentEdge
-        {
-            get {
-                //return (this.Model as IGraph).SpanningTree.ParentEdge(this); 
-                return mParentEdge;
-            }
-            set {
-                mParentEdge = value;
-            }
-
-        }
-
-        /// <summary>
-        /// Get the tree depth of this node.
-        /// <remarks>The root's tree depth is
-        /// zero, and each level of the tree is one depth level greater.
-        /// </remarks>
-        /// </summary>
-        /// <value></value>
-        int INode.Depth
-        {
-            get { return mDepth; }
-            set { mDepth = value; }
-        }
-
-        /// <summary>
-        /// Get the number of tree children of this node.
-        /// </summary>
-        /// <value></value>
-        int INode.ChildCount
-        {
-            get {
-                if (this.treeChildren == null)
-                    return 0;
-                else
-                    return this.treeChildren.Count; 
-            }
-        }
-
-        /// <summary>
-        /// Get this node's first tree child.
-        /// </summary>
-        /// <value></value>
-        INode INode.FirstChild
-        {
-            get
-            {
-                if (this.treeChildren == null)
-                    return null;
-                else
-                    return treeChildren[0];
-            }
-        }
-
-        /// <summary>
-        /// Get this node's last tree child.
-        /// </summary>
-        /// <value></value>
-        INode INode.LastChild
-        {
-            get {
-                if (this.treeChildren == null)
-                    return null;
-                else
-                    return treeChildren[this.treeChildren.Count-1];
-            }
-        }
-
-        /// <summary>
-        /// Get this node's previous tree sibling.
-        /// </summary>
-        /// <value></value>
-        INode INode.PreviousSibling
-        {
-            get
-            {
-                if ((this as INode).ParentNode == null)
-                    return null;
-                else
-                {
-                    CollectionBase<INode> ch = (this as INode).ParentNode.Children;
-                    int chi = ch.IndexOf(this as INode);
-                    if (chi < 0 || chi > ch.Count - 1)
-                        throw new IndexOutOfRangeException();
-                    
-                    if (chi == 0)
-                        return null;
-                    else
-                        return ch[chi - 1];
-                }
-            }
-        }
-
-        /// <summary>
-        /// Get this node's next tree sibling.
-        /// </summary>
-        /// <value></value>
-        INode INode.NextSibling
-        {
-            get
-            {
-                if ((this as INode).ParentNode == null)
-                    return null;
-                else
-                {
-                    CollectionBase<INode> ch = (this as INode).ParentNode.Children;
-                    int chi = ch.IndexOf(this as INode);
-                    if (chi < 0 || chi > ch.Count - 1)
-                        throw new IndexOutOfRangeException();
-                    
-                    if (chi == ch.Count-1)
-                        return null;
-                    else
-                        return ch[chi + 1];
-                }
-            }
-        }
-
-        /// <summary>
-        /// Gets the collection of this node's tree children.
-        /// </summary>
-        /// <value></value>
-        CollectionBase<INode> INode.Children
-        {
-            get { return treeChildren; }
-            set { treeChildren = value; }
-        }
-
-        /// <summary>
-        /// Gets the edges from this node to its tree children.
-        /// </summary>
-        /// <value></value>
-        CollectionBase<IEdge> INode.ChildEdges
-        {
-            get { return (this.Model as IGraph).SpanningTree.ChildEdges(this); }
-        }
-
-        #endregion
-    }
+      }
+    }
+
+    /// <summary>
+    /// Gets the collection of this node's tree children.
+    /// </summary>
+    /// <value></value>
+    CollectionBase<INode> INode.Children {
+      get { return treeChildren; }
+      set { treeChildren = value; }
+    }
+
+    /// <summary>
+    /// Gets the edges from this node to its tree children.
+    /// </summary>
+    /// <value></value>
+    CollectionBase<IEdge> INode.ChildEdges {
+      get { return (this.Model as IGraph).SpanningTree.ChildEdges(this); }
+    }
+
+    #endregion
+  }
 }
Index: /trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.Netron/3.0.2672.12446/Netron.Diagramming.Core-3.0.2672.12446/BaseClasses/AbstractTool.cs
===================================================================
--- /trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.Netron/3.0.2672.12446/Netron.Diagramming.Core-3.0.2672.12446/BaseClasses/AbstractTool.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.Netron/3.0.2672.12446/Netron.Diagramming.Core-3.0.2672.12446/BaseClasses/AbstractTool.cs	(revision 4068)
@@ -1,344 +1,302 @@
 using System;
-using System.Collections.Generic;
-using System.Text;
 using System.Windows.Forms;
-using System.Diagnostics;
-namespace Netron.Diagramming.Core
-{
-    // ----------------------------------------------------------------------
-    /// <summary>
-    /// The base class for any tool <see cref="ITool"/>.
-    /// </summary>
-    // ----------------------------------------------------------------------
-    public abstract class AbstractTool : ITool
-    {
-        #region Events
-
-        // ------------------------------------------------------------------
-        /// <summary>
-        /// Occurs when this tool is deactivated.
-        /// </summary>
-        // ------------------------------------------------------------------
-        public event EventHandler<ToolEventArgs> OnToolDeactivate;
-
-        // ------------------------------------------------------------------
-        /// <summary>
-        /// Occurs when this tool is activated.
-        /// </summary>
-        // ------------------------------------------------------------------
-        public event EventHandler<ToolEventArgs> OnToolActivate;
-
-        #endregion
-
-        #region Fields
-        /// <summary>
-        /// the Name field
-        /// </summary>
-        private string mName;
-        /// <summary>
-        /// the Enabled field
-        /// </summary>
-        private bool mEnabled = true;
-        /// <summary>
-        /// a pointer to the controller
-        /// </summary>
-        private IController mController;
-        /// <summary>
-        /// the tool's cursor
-        /// </summary>
-        private Cursor mCursor = Cursors.Default;
-        /// <summary>
-        /// whether the tool is currently active
-        /// </summary>
-        private bool mIsActive;
-        /// <summary>
-        /// keeps a reference to the previous cursor
-        /// </summary>
-        Cursor previousCursor ;
-        /// <summary>
-        /// the suspend state of the tool
-        /// </summary>
-        private bool mIsSuspended;
-        #endregion
-
-        #region Properties
-
-        /// <summary>
-        /// Gets or sets a value indicating whether this instance is suspended. A tool enters in a suspended mode when another tool has been activated and disallows another to continue its normal activity. For example, the <see cref="MoveTool"/> and <see cref="SelectionTool"/> are
-        /// mutually exclusive and similarly for the drawing tools and the selection tool.
-        /// <para>This suspended state is independent of the <see cref="IsActive"/> and the <see cref="Enabled"/> states.</para>
-        /// </summary>
-        /// <value>
-        /// 	<c>true</c> if this instance is suspended; otherwise, <c>false</c>.
-        /// </value>
-        public bool IsSuspended
-        {
-            get { return mIsSuspended; }
-            set { mIsSuspended = value; }
+namespace Netron.Diagramming.Core {
+  // ----------------------------------------------------------------------
+  /// <summary>
+  /// The base class for any tool <see cref="ITool"/>.
+  /// </summary>
+  // ----------------------------------------------------------------------
+  public abstract class AbstractTool : ITool {
+    #region Events
+
+    // ------------------------------------------------------------------
+    /// <summary>
+    /// Occurs when this tool is deactivated.
+    /// </summary>
+    // ------------------------------------------------------------------
+    public event EventHandler<ToolEventArgs> OnToolDeactivate;
+
+    // ------------------------------------------------------------------
+    /// <summary>
+    /// Occurs when this tool is activated.
+    /// </summary>
+    // ------------------------------------------------------------------
+    public event EventHandler<ToolEventArgs> OnToolActivate;
+
+    #endregion
+
+    #region Fields
+    /// <summary>
+    /// the Name field
+    /// </summary>
+    private string mName;
+    /// <summary>
+    /// the Enabled field
+    /// </summary>
+    private bool mEnabled = true;
+    /// <summary>
+    /// a pointer to the controller
+    /// </summary>
+    private IController mController;
+    /// <summary>
+    /// the tool's cursor
+    /// </summary>
+    private Cursor mCursor = Cursors.Default;
+    /// <summary>
+    /// whether the tool is currently active
+    /// </summary>
+    private bool mIsActive;
+    /// <summary>
+    /// keeps a reference to the previous cursor
+    /// </summary>
+    Cursor previousCursor;
+    /// <summary>
+    /// the suspend state of the tool
+    /// </summary>
+    private bool mIsSuspended;
+    #endregion
+
+    #region Properties
+
+    /// <summary>
+    /// Gets or sets a value indicating whether this instance is suspended. A tool enters in a suspended mode when another tool has been activated and disallows another to continue its normal activity. For example, the <see cref="MoveTool"/> and <see cref="SelectionTool"/> are
+    /// mutually exclusive and similarly for the drawing tools and the selection tool.
+    /// <para>This suspended state is independent of the <see cref="IsActive"/> and the <see cref="Enabled"/> states.</para>
+    /// </summary>
+    /// <value>
+    /// 	<c>true</c> if this instance is suspended; otherwise, <c>false</c>.
+    /// </value>
+    public bool IsSuspended {
+      get { return mIsSuspended; }
+      set { mIsSuspended = value; }
+    }
+
+    /// <summary>
+    /// Gets or sets a value indicating whether this tool is active.
+    /// </summary>
+    /// <value><c>true</c> if this instance is active; otherwise, <c>false</c>.</value>
+    public bool IsActive {
+      get { return mIsActive; }
+      set { mIsActive = value; }
+    }
+    /// <summary>
+    /// Gets or sets the name of the tool.
+    /// </summary>
+    /// <value>The name.</value>
+    public string Name {
+      get { return mName; }
+      set { mName = value; }
+    }
+    /// <summary>
+    /// Gets or sets the controller.
+    /// </summary>
+    /// <value>The controller.</value>
+    public IController Controller {
+      get {
+        return mController;
+      }
+
+      set {
+        mController = value;
+      }
+    }
+
+    /// <summary>
+    /// Gets or sets the cursor.
+    /// </summary>
+    /// <value>The cursor.</value>
+    public Cursor Cursor {
+      get {
+        return mCursor;
+      }
+      set {
+        mCursor = value;
+        //prevCursor = Controller.View.CurrentCursor;
+        Controller.View.CurrentCursor = value;
+      }
+    }
+
+    /// <summary>
+    /// Gets or sets the Enabled
+    /// </summary>
+    public bool Enabled {
+      get {
+        return this.mEnabled;
+      }
+
+      set {
+        //disable the tool first if it is active
+        if (!value && IsActive) {
+          DeactivateTool();
         }
-
-        /// <summary>
-        /// Gets or sets a value indicating whether this tool is active.
-        /// </summary>
-        /// <value><c>true</c> if this instance is active; otherwise, <c>false</c>.</value>
-        public bool IsActive
-        {
-            get { return mIsActive; }
-            set { mIsActive = value; }
+        mEnabled = value;
+      }
+    }
+
+    /// <summary>
+    /// Gets a value indicating whether this tool excludes other tools.
+    /// </summary>
+    /// <value>
+    /// 	<c>true</c> if this instance is exclusive; otherwise, <c>false</c>.
+    /// </value>
+    public virtual bool IsExclusive {
+      get {
+        return true;
+      }
+    }
+
+    /// <summary>
+    /// Gets or sets a value indicating whether this tool can activated.
+    /// </summary>
+    /// <value>
+    /// 	<c>true</c> if this instance can activate; otherwise, <c>false</c>.
+    /// </value>
+    public virtual bool CanActivate {
+      get {
+        if (mEnabled) {
+          return !IsActive;
+        } else {
+          return false;
         }
-        /// <summary>
-        /// Gets or sets the name of the tool.
-        /// </summary>
-        /// <value>The name.</value>
-        public string Name
-        {
-            get { return mName; }
-            set { mName = value; }
+      }
+
+    }
+    #endregion
+
+    #region Constructor
+    /// <summary>
+    /// Default constructor
+    /// </summary>
+    /// <param name="name">The name of the tool.</param>
+    public AbstractTool(string name) {
+      this.mName = name;
+    }
+    #endregion
+
+    #region Methods
+
+    protected void RestoreCursor() {
+      // I ran into an issue where the RectangleTool was activated,
+      // nothing drawn, then the EllipseTool was activated.  When
+      // the EllipseTool was deactivated the cursor was set to the
+      // previous cursor, which was the cursor for the RectangleTool.
+
+      // Update: Rather than fixing it here, I changed 
+      // ControllerBase.ActivateTool(string) so it deactivates
+      // the current tool first.
+      //Controller.View.CurrentCursor = Cursors.Default;
+
+      if (previousCursor != null) {
+        if (Controller != null) {
+          Controller.View.CurrentCursor = previousCursor;
         }
-        /// <summary>
-        /// Gets or sets the controller.
-        /// </summary>
-        /// <value>The controller.</value>
-        public IController Controller
-        {
-            get
-            {
-                return mController;
-            }
-
-            set
-            {
-                mController = value;
-            }
-        }
-
-        /// <summary>
-        /// Gets or sets the cursor.
-        /// </summary>
-        /// <value>The cursor.</value>
-        public Cursor Cursor
-        {
-            get 
-            { 
-                return mCursor; 
-            }
-            set 
-            {
-                mCursor = value;
-                //prevCursor = Controller.View.CurrentCursor;
-                Controller.View.CurrentCursor = value;
-            }
-        }
-
-        /// <summary>
-        /// Gets or sets the Enabled
-        /// </summary>
-        public bool Enabled
-        {
-            get
-            {
-                return this.mEnabled;
-            }
-
-            set
-            {
-                //disable the tool first if it is active
-                if (!value && IsActive)
-                {                       
-                    DeactivateTool();
-                }
-                mEnabled = value;
-            }
-        }
-
-        /// <summary>
-        /// Gets a value indicating whether this tool excludes other tools.
-        /// </summary>
-        /// <value>
-        /// 	<c>true</c> if this instance is exclusive; otherwise, <c>false</c>.
-        /// </value>
-        public virtual bool IsExclusive
-        {
-            get
-            {
-                return true;
-            }
-        }
-
-        /// <summary>
-        /// Gets or sets a value indicating whether this tool can activated.
-        /// </summary>
-        /// <value>
-        /// 	<c>true</c> if this instance can activate; otherwise, <c>false</c>.
-        /// </value>
-        public virtual bool CanActivate
-        {
-            get
-            {
-                if (mEnabled )
-                {
-                    return !IsActive ;
-                }
-                else
-                {
-                    return false;
-                }
-            }
-            
-        }
-        #endregion
-
-        #region Constructor
-        /// <summary>
-        /// Default constructor
-        /// </summary>
-        /// <param name="name">The name of the tool.</param>
-        public AbstractTool(string name)
-        {
-            this.mName = name;
-        }
-        #endregion
-
-        #region Methods
-
-        protected void RestoreCursor()
-        {
-            // I ran into an issue where the RectangleTool was activated,
-            // nothing drawn, then the EllipseTool was activated.  When
-            // the EllipseTool was deactivated the cursor was set to the
-            // previous cursor, which was the cursor for the RectangleTool.
- 
-            // Update: Rather than fixing it here, I changed 
-            // ControllerBase.ActivateTool(string) so it deactivates
-            // the current tool first.
-            //Controller.View.CurrentCursor = Cursors.Default;
-
-            if (previousCursor != null)
-            {
-                if (Controller != null)
-                {
-                    Controller.View.CurrentCursor = previousCursor;
-                }
-                previousCursor = null;
-            }
-        }
-
-        // ------------------------------------------------------------------
-        /// <summary>
-        /// Raises the <see cref="OnToolActivate"/> event
-        /// </summary>
-        /// <param name="e">ConnectionCollection event argument</param>
-        // ------------------------------------------------------------------
-        public virtual void RaiseOnToolActivate(ToolEventArgs e)
-        {
-            EventHandler<ToolEventArgs> handler = OnToolActivate;
-            if (handler != null)
-            {
-                handler(this, e);
-            }
-        }
-
-        // ------------------------------------------------------------------
-        /// <summary>
-        /// Raises the <see cref="OnToolDeactivate"/> event.
-        /// </summary>
-        /// <param name="e">ConnectionCollection event argument</param>
-        // ------------------------------------------------------------------
-        public virtual void RaiseOnToolDeactivate(ToolEventArgs e)
-        {
-            EventHandler<ToolEventArgs> handler = OnToolDeactivate;
-            if (handler != null)
-            {
-                handler(this, e);
-            }
-        }
-
-        #region Activation & deactivation
-
-        /// <summary>
-        /// Deactivates the tool.
-        /// </summary>
-        /// <returns></returns>
-        public bool DeactivateTool()
-        {
-            if (IsActive)
-            {
-                OnDeactivateTool();
-                IsActive = false;
-                RestoreCursor();
-                UnsuspendTools();
-                RaiseOnToolDeactivate(new ToolEventArgs(this));
-                return true;
-            }
-            return false;
-        }
-
-        /// <summary>
-        /// Activates the tool.
-        /// </summary>
-        /// <returns></returns>
-        public bool ActivateTool()
-        {
-            //halt other actions
-            SuspendOtherTools();
-            
-            if (Enabled && !IsActive)
-            {
-                previousCursor = this.Controller.View.CurrentCursor;
-                IsActive = true;
-                OnActivateTool();
-                RaiseOnToolActivate(new ToolEventArgs(this));
-            }
-            return IsActive;
-        }
-
-        /// <summary>
-        /// Suspends the other tools.
-        /// </summary>
-        public void SuspendOtherTools()
-        {
-            foreach (ITool tool in Controller.Tools)
-            {
-                if (tool != this)
-                    tool.IsSuspended = true;
-            }
-        }
-
-        /// <summary>
-        /// Releases the previously suspeneded tools <see cref="SuspendOtherTools"/>
-        /// </summary>
-        public void UnsuspendTools()
-        {
-            foreach (ITool tool in Controller.Tools)
-            {                  
-               tool.IsSuspended = false;
-            }
-        }
-
-        #endregion
-
-        /// <summary>
-        /// Called when the tool is activated.
-        /// </summary>
-        protected virtual void OnActivateTool(){}
-
-        /// <summary>
-        /// Called when the tool is deactivated.
-        /// </summary>
-        protected virtual void OnDeactivateTool(){}
-
-        /// <summary>
-        /// Gets the service object of the specified type.
-        /// </summary>
-        /// <param name="serviceType">An object that specifies the type of service object to get.</param>
-        /// <returns>
-        /// A service object of type serviceType.-or- null if there is no service object of type serviceType.
-        /// </returns>
-        public object GetService(Type serviceType)
-        {
-            return null; 
-        }
-        #endregion
-
-    }
+        previousCursor = null;
+      }
+    }
+
+    // ------------------------------------------------------------------
+    /// <summary>
+    /// Raises the <see cref="OnToolActivate"/> event
+    /// </summary>
+    /// <param name="e">ConnectionCollection event argument</param>
+    // ------------------------------------------------------------------
+    public virtual void RaiseOnToolActivate(ToolEventArgs e) {
+      EventHandler<ToolEventArgs> handler = OnToolActivate;
+      if (handler != null) {
+        handler(this, e);
+      }
+    }
+
+    // ------------------------------------------------------------------
+    /// <summary>
+    /// Raises the <see cref="OnToolDeactivate"/> event.
+    /// </summary>
+    /// <param name="e">ConnectionCollection event argument</param>
+    // ------------------------------------------------------------------
+    public virtual void RaiseOnToolDeactivate(ToolEventArgs e) {
+      EventHandler<ToolEventArgs> handler = OnToolDeactivate;
+      if (handler != null) {
+        handler(this, e);
+      }
+    }
+
+    #region Activation & deactivation
+
+    /// <summary>
+    /// Deactivates the tool.
+    /// </summary>
+    /// <returns></returns>
+    public bool DeactivateTool() {
+      if (IsActive) {
+        OnDeactivateTool();
+        IsActive = false;
+        RestoreCursor();
+        UnsuspendTools();
+        RaiseOnToolDeactivate(new ToolEventArgs(this));
+        return true;
+      }
+      return false;
+    }
+
+    /// <summary>
+    /// Activates the tool.
+    /// </summary>
+    /// <returns></returns>
+    public bool ActivateTool() {
+      //halt other actions
+      SuspendOtherTools();
+
+      if (Enabled && !IsActive) {
+        previousCursor = this.Controller.View.CurrentCursor;
+        IsActive = true;
+        OnActivateTool();
+        RaiseOnToolActivate(new ToolEventArgs(this));
+      }
+      return IsActive;
+    }
+
+    /// <summary>
+    /// Suspends the other tools.
+    /// </summary>
+    public void SuspendOtherTools() {
+      foreach (ITool tool in Controller.Tools) {
+        if (tool != this)
+          tool.IsSuspended = true;
+      }
+    }
+
+    /// <summary>
+    /// Releases the previously suspeneded tools <see cref="SuspendOtherTools"/>
+    /// </summary>
+    public void UnsuspendTools() {
+      foreach (ITool tool in Controller.Tools) {
+        tool.IsSuspended = false;
+      }
+    }
+
+    #endregion
+
+    /// <summary>
+    /// Called when the tool is activated.
+    /// </summary>
+    protected virtual void OnActivateTool() { }
+
+    /// <summary>
+    /// Called when the tool is deactivated.
+    /// </summary>
+    protected virtual void OnDeactivateTool() { }
+
+    /// <summary>
+    /// Gets the service object of the specified type.
+    /// </summary>
+    /// <param name="serviceType">An object that specifies the type of service object to get.</param>
+    /// <returns>
+    /// A service object of type serviceType.-or- null if there is no service object of type serviceType.
+    /// </returns>
+    public object GetService(Type serviceType) {
+      return null;
+    }
+    #endregion
+
+  }
 }
Index: /trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.Netron/3.0.2672.12446/Netron.Diagramming.Core-3.0.2672.12446/BaseClasses/ActionBase.cs
===================================================================
--- /trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.Netron/3.0.2672.12446/Netron.Diagramming.Core-3.0.2672.12446/BaseClasses/ActionBase.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.Netron/3.0.2672.12446/Netron.Diagramming.Core-3.0.2672.12446/BaseClasses/ActionBase.cs	(revision 4068)
@@ -1,40 +1,32 @@
-using System;
-using System.Collections.Generic;
-using System.Text;
 
-namespace Netron.Diagramming.Core
-{
-    abstract class ActionBase : ActivityBase, IAction
-    {
+namespace Netron.Diagramming.Core {
+  abstract class ActionBase : ActivityBase, IAction {
 
-        #region Fields
-        private IModel mModel;
-        #endregion
+    #region Fields
+    private IModel mModel;
+    #endregion
 
-        #region Properties
-        public IModel Model
-        {
-            get
-            {
-                return mModel;    
-            }
-            set
-            {
-                mModel = value;
-            }
-        }
-        #endregion
+    #region Properties
+    public IModel Model {
+      get {
+        return mModel;
+      }
+      set {
+        mModel = value;
+      }
+    }
+    #endregion
 
 
-        #region Constructor
-        ///<summary>
-        ///Default constructor
-        ///</summary>
-        public ActionBase(string name) : base(name)
-        {
+    #region Constructor
+    ///<summary>
+    ///Default constructor
+    ///</summary>
+    public ActionBase(string name)
+      : base(name) {
 
-        }
-        #endregion
-  
     }
+    #endregion
+
+  }
 }
Index: /trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.Netron/3.0.2672.12446/Netron.Diagramming.Core-3.0.2672.12446/BaseClasses/ActivityBase.cs
===================================================================
--- /trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.Netron/3.0.2672.12446/Netron.Diagramming.Core-3.0.2672.12446/BaseClasses/ActivityBase.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.Netron/3.0.2672.12446/Netron.Diagramming.Core-3.0.2672.12446/BaseClasses/ActivityBase.cs	(revision 4068)
@@ -1,89 +1,71 @@
 using System;
-using System.Collections.Generic;
-using System.Text;
 
-namespace Netron.Diagramming.Core
-{
-    abstract class ActivityBase : IActivity
-    {
-        #region Events
-        public event EventHandler OnActivityRun;
-        #endregion
+namespace Netron.Diagramming.Core {
+  abstract class ActivityBase : IActivity {
+    #region Events
+    public event EventHandler OnActivityRun;
+    #endregion
 
-        #region Fields
-        private bool mEnabled;
-        private TimeSpan mStepTime = new TimeSpan(0,0,80);
-        private DateTime mStartTime = DateTime.Now;
-        private string mName;
-        #endregion
+    #region Fields
+    private bool mEnabled;
+    private TimeSpan mStepTime = new TimeSpan(0, 0, 80);
+    private DateTime mStartTime = DateTime.Now;
+    private string mName;
+    #endregion
 
-        #region Properties
-        public string Name
-        {
-            get { return mName; }
-        }
-        public bool Enabled
-        {
-            get
-            {
-                return mEnabled;
-            }
-            set
-            {
-                mEnabled = value;
-            }
-        }
+    #region Properties
+    public string Name {
+      get { return mName; }
+    }
+    public bool Enabled {
+      get {
+        return mEnabled;
+      }
+      set {
+        mEnabled = value;
+      }
+    }
 
-        public TimeSpan StepTime
-        {
-            get
-            {
-                return mStepTime;   
-            }
-            set
-            {
-                mStepTime = value;
-            }
-        }
+    public TimeSpan StepTime {
+      get {
+        return mStepTime;
+      }
+      set {
+        mStepTime = value;
+      }
+    }
 
-        public DateTime StartTime
-        {
-            get
-            {
-                return mStartTime;
-            }
-            set
-            {
-               mStartTime = value;
-            }
-        }
+    public DateTime StartTime {
+      get {
+        return mStartTime;
+      }
+      set {
+        mStartTime = value;
+      }
+    }
 
-        public TimeSpan Duration
-        {
-            get
-            {
-                
-                return mStepTime;
-            }
-        }
-        #endregion
-        protected ActivityBase(string name){ mName = name;}
+    public TimeSpan Duration {
+      get {
 
-        public abstract void Run();
+        return mStepTime;
+      }
+    }
+    #endregion
+    protected ActivityBase(string name) { mName = name; }
 
-        public abstract void Run(int time);
+    public abstract void Run();
 
-        public void RunAfter(IActivity firstActivity)
-        {
-            throw new NotImplementedException("The method or operation is not implemented.");
-        }
+    public abstract void Run(int time);
 
-        public abstract void Stop();
+    public void RunAfter(IActivity firstActivity) {
+      throw new NotImplementedException("The method or operation is not implemented.");
+    }
 
-        protected void RaiseOnActivityRun()
-        {
-            if (OnActivityRun != null)
-                OnActivityRun(this, EventArgs.Empty);
-        }
+    public abstract void Stop();
+
+    protected void RaiseOnActivityRun() {
+      if (OnActivityRun != null)
+        OnActivityRun(this, EventArgs.Empty);
     }
+  }
 }
Index: /trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.Netron/3.0.2672.12446/Netron.Diagramming.Core-3.0.2672.12446/BaseClasses/ComplexShapeBase.cs
===================================================================
--- /trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.Netron/3.0.2672.12446/Netron.Diagramming.Core-3.0.2672.12446/BaseClasses/ComplexShapeBase.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.Netron/3.0.2672.12446/Netron.Diagramming.Core-3.0.2672.12446/BaseClasses/ComplexShapeBase.cs	(revision 4068)
@@ -1,421 +1,374 @@
 using System;
-using System.Collections.Generic;
-using System.Text;
+using System.ComponentModel;
 using System.Drawing;
-using System.ComponentModel;
-using System.Drawing.Drawing2D;
 using System.Windows.Forms;
 
-namespace Netron.Diagramming.Core
-{
-    // ----------------------------------------------------------------------
-    /// <summary>
-    /// Abstract base class for complex shapes <see cref="ComplexShapeBase"/>.
-    /// </summary>
-    // ----------------------------------------------------------------------
-    public abstract partial class ComplexShapeBase : 
-        ShapeBase, 
-        IComplexShape, 
-        IMouseListener, 
-        IHoverListener
-    {
-        #region Fields
-
-        // ------------------------------------------------------------------
-        /// <summary>
-        /// Implementation of IVersion - the current version of 
-        /// ComplexShapeBase.
-        /// </summary>
-        // ------------------------------------------------------------------
-        protected const double complexShapeVersion = 1.0;
-
-        /// <summary>
-        /// the text on the bundle
-        /// </summary>
-        protected string mText = string.Empty;
-
-        /// <summary>
-        /// the shape children or sub-controls
-        /// </summary>
-        protected CollectionBase<IShapeMaterial> mChildren;
-
-        #endregion
-
-        #region Properties
-
-        // ------------------------------------------------------------------
-        /// <summary>
-        /// Gets the current version.
-        /// </summary>
-        // ------------------------------------------------------------------
-        public override double Version
-        {
-            get
-            {
-                return complexShapeVersion;
+namespace Netron.Diagramming.Core {
+  // ----------------------------------------------------------------------
+  /// <summary>
+  /// Abstract base class for complex shapes <see cref="ComplexShapeBase"/>.
+  /// </summary>
+  // ----------------------------------------------------------------------
+  public abstract partial class ComplexShapeBase :
+      ShapeBase,
+      IComplexShape,
+      IMouseListener,
+      IHoverListener {
+    #region Fields
+
+    // ------------------------------------------------------------------
+    /// <summary>
+    /// Implementation of IVersion - the current version of 
+    /// ComplexShapeBase.
+    /// </summary>
+    // ------------------------------------------------------------------
+    protected const double complexShapeVersion = 1.0;
+
+    /// <summary>
+    /// the text on the bundle
+    /// </summary>
+    protected string mText = string.Empty;
+
+    /// <summary>
+    /// the shape children or sub-controls
+    /// </summary>
+    protected CollectionBase<IShapeMaterial> mChildren;
+
+    #endregion
+
+    #region Properties
+
+    // ------------------------------------------------------------------
+    /// <summary>
+    /// Gets the current version.
+    /// </summary>
+    // ------------------------------------------------------------------
+    public override double Version {
+      get {
+        return complexShapeVersion;
+      }
+    }
+
+    // ------------------------------------------------------------------
+    /// <summary>
+    /// Gets or sets the text of the bundle
+    /// </summary>
+    // ------------------------------------------------------------------
+    [Browsable(true),
+    Description("The text shown on the shape"), Category("Layout")]
+    public virtual string Text {
+      get {
+        return mText;
+      }
+      set {
+        mText = value;
+        this.Invalidate();
+      }
+    }
+
+    #endregion
+
+    #region Constructor
+
+    // ------------------------------------------------------------------
+    ///<summary>
+    ///Default constructor
+    ///</summary>
+    // ------------------------------------------------------------------
+    public ComplexShapeBase()
+      : base() {
+    }
+
+    // ------------------------------------------------------------------
+    /// <summary>
+    /// Initializes a new instance of the <see cref="ComplexShapeBase"/> 
+    /// class.
+    /// </summary>
+    /// <param name="model"></param>
+    // ------------------------------------------------------------------
+    public ComplexShapeBase(IModel model)
+      : base(model) {
+    }
+
+    // ------------------------------------------------------------------
+    /// <summary>
+    /// Initializes this instance.
+    /// </summary>
+    // ------------------------------------------------------------------
+    protected override void Initialize() {
+      base.Initialize();
+      mChildren = new CollectionBase<IShapeMaterial>();
+      mChildren.OnItemAdded +=
+          new EventHandler<CollectionEventArgs<IShapeMaterial>>
+          (mChildren_OnItemAdded);
+    }
+
+    #endregion
+
+    #region Methods
+    // ------------------------------------------------------------------
+
+    /// <summary>
+    /// Sets some contextual properties of the <see cref="Children"/> 
+    /// when a new item is added.
+    /// </summary>
+    /// <param name="sender">The sender.</param>
+    /// <param name="e">The e.</param>
+    // ------------------------------------------------------------------
+    void mChildren_OnItemAdded(object sender, CollectionEventArgs<IShapeMaterial> e) {
+      e.Item.Shape = this;
+    }
+
+    // ------------------------------------------------------------------
+    /// <summary>
+    /// Overrides the abstract paint method
+    /// </summary>
+    /// <param name="g">a graphics object onto which to paint</param>
+    // ------------------------------------------------------------------
+    public override void Paint(Graphics g) {
+
+      base.Paint(g);
+
+
+
+      foreach (IPaintable material in Children) {
+        material.Paint(g);
+      }
+
+    }
+
+    // ------------------------------------------------------------------
+    /// <summary>
+    /// Moves the entity with the given shift
+    /// </summary>
+    /// <param name="p">represent a shift-vector, not the absolute 
+    /// position!</param>
+    // ------------------------------------------------------------------
+    public override void MoveBy(Point p) {
+      base.MoveBy(p);
+      Rectangle rec;
+      foreach (IShapeMaterial material in Children) {
+        rec = material.Rectangle;
+
+        rec.Offset(p.X, p.Y);
+        material.Transform(rec);
+      }
+    }
+
+    // ------------------------------------------------------------------
+    /// <summary>
+    /// Transforms the entity to the given new rectangle.
+    /// </summary>
+    /// <param name="x">The x-coordinate of the new rectangle.</param>
+    /// <param name="y">The y-coordinate of the new rectangle.</param>
+    /// <param name="width">The width.</param>
+    /// <param name="height">The height.</param>
+    // ------------------------------------------------------------------
+    public override void Transform(int x, int y, int width, int height) {
+      if (Children != null && Children.Count > 0) {
+
+        int a, b, w, h;
+        foreach (IShapeMaterial material in Children) {
+
+          if (material.Gliding) {
+            a = Convert.ToInt32(Math.Round(((double)material.Rectangle.X - (double)Rectangle.X) / (double)Rectangle.Width * width, 1) + x);
+            b = Convert.ToInt32(Math.Round(((double)material.Rectangle.Y - (double)Rectangle.Y) / (double)Rectangle.Height * height, 1) + y);
+          } else //shift the material, do not scale the position with respect to the sizing of the shape
+                    {
+            a = material.Rectangle.X - Rectangle.X + x;
+            b = material.Rectangle.Y - Rectangle.Y + y;
+          }
+          if (material.Resizable) {
+            w = Convert.ToInt32(Math.Round(((double)material.Rectangle.Width) / ((double)Rectangle.Width), 1) * width);
+            h = Convert.ToInt32(Math.Round(((double)material.Rectangle.Height) / ((double)Rectangle.Height), 1) * height);
+          } else {
+            w = material.Rectangle.Width;
+            h = material.Rectangle.Height;
+          }
+
+          material.Transform(new Rectangle(a, b, w, h));
+        }
+      }
+      base.Transform(x, y, width, height);
+    }
+    #endregion
+
+    // ------------------------------------------------------------------
+    /// <summary>
+    /// Gets or sets the children.
+    /// </summary>
+    /// <value>The children.</value>
+    // ------------------------------------------------------------------
+    public virtual CollectionBase<IShapeMaterial> Children {
+      get {
+        return mChildren;
+      }
+      set {
+        throw new InconsistencyException("You cannot set the children, use the existing collection and the clear() method.");
+      }
+    }
+
+    // ------------------------------------------------------------------
+    /// <summary>
+    /// Defines a mechanism for retrieving a service object; that is, an 
+    /// object that provides custom support to other objects.
+    /// </summary>
+    /// <param name="serviceType">An object that specifies the type of 
+    /// service object to get.</param>
+    /// <returns>
+    /// A service object of type serviceType.-or- null if there is no 
+    /// service object of type serviceType.
+    /// </returns>
+    // ------------------------------------------------------------------
+    public override object GetService(Type serviceType) {
+      if (Services.ContainsKey(serviceType))
+        return Services[serviceType];
+      else {
+        return null;
+      }
+    }
+
+    // ------------------------------------------------------------------
+    /// <summary>
+    /// <see cref="IMouseListener"/> implementation.
+    /// </summary>
+    /// <param name="e">The 
+    /// <see cref="T:System.Windows.Forms.MouseEventArgs"/> instance 
+    /// containing the event data.</param>
+    // ------------------------------------------------------------------
+    public override bool MouseDown(MouseEventArgs e) {
+      base.MouseDown(e);
+      IMouseListener listener;
+      foreach (IShapeMaterial material in mChildren) {
+        if (material.Rectangle.Contains(e.Location) && material.Visible) {
+          listener = material.GetService(typeof(
+              IMouseListener)) as IMouseListener;
+          if (listener != null)
+            if (listener.MouseDown(e))
+              return true;
+        }
+
+      }
+      return false;
+    }
+
+    // ------------------------------------------------------------------
+    /// <summary>
+    /// <see cref="IMouseListener"/> implementation.
+    /// </summary>
+    /// <param name="e">The 
+    /// <see cref="T:System.Windows.Forms.MouseEventArgs"/> instance 
+    /// containing the event data.</param>
+    // ------------------------------------------------------------------
+    public override void MouseMove(MouseEventArgs e) {
+      base.MouseMove(e);
+      IMouseListener listener;
+      foreach (IShapeMaterial material in mChildren) {
+        if ((material.Rectangle.Contains(e.Location)) &&
+            (material.Visible)) {
+          listener = material.GetService(typeof
+              (IMouseListener)) as IMouseListener;
+
+          if (listener != null) {
+            listener.MouseMove(e);
+          }
+        }
+      }
+    }
+
+    // ------------------------------------------------------------------
+    /// <summary>
+    /// <see cref="IMouseListener"/> implementation.
+    /// </summary>
+    /// <param name="e">The 
+    /// <see cref="T:System.Windows.Forms.MouseEventArgs"/> instance 
+    /// containing the event data.</param>
+    // ------------------------------------------------------------------
+    public override void MouseUp(MouseEventArgs e) {
+      base.MouseUp(e);
+      IMouseListener listener;
+      foreach (IShapeMaterial material in mChildren) {
+        if (material.Rectangle.Contains(e.Location) && material.Visible) {
+          listener = material.GetService(typeof(IMouseListener)) as IMouseListener;
+          if (listener != null) listener.MouseUp(e);
+        }
+      }
+    }
+
+
+
+    #region IHoverListener Members
+
+    private IHoverListener currentHoveredMaterial;
+
+    // ------------------------------------------------------------------
+    /// <summary>
+    /// Handles the MouseHover event.
+    /// </summary>
+    /// <param name="e">The 
+    /// <see cref="T:System.Windows.Forms.MouseEventArgs"/> instance 
+    /// containing the event data.</param>
+    // ------------------------------------------------------------------
+    public override void MouseHover(MouseEventArgs e) {
+      base.MouseHover(e);
+      IHoverListener listener;
+      foreach (IShapeMaterial material in this.Children) {
+        if (material.Rectangle.Contains(e.Location) && material.Visible) //we caught an material and it's visible
+                {
+          listener = material.GetService(typeof(IHoverListener)) as IHoverListener;
+          if (listener != null) //the caught material does listen
+                    {
+            if (currentHoveredMaterial == listener) //it's the same as the previous time
+              listener.MouseHover(e);
+            else //we moved from one material to another listening material
+                        {
+              if (currentHoveredMaterial != null) //tell the previous material we are leaving
+                currentHoveredMaterial.MouseLeave(e);
+              listener.MouseEnter(e); //tell the current one we enter
+              currentHoveredMaterial = listener;
             }
-        }
-
-        // ------------------------------------------------------------------
-        /// <summary>
-        /// Gets or sets the text of the bundle
-        /// </summary>
-        // ------------------------------------------------------------------
-        [Browsable(true), 
-        Description("The text shown on the shape"), Category("Layout")]
-        public virtual string Text
-        {
-            get
-            {
-                return mText;
+          } else //the caught material does not listen
+                    {
+            if (currentHoveredMaterial != null) {
+              currentHoveredMaterial.MouseLeave(e);
+              currentHoveredMaterial = null;
             }
-            set
-            {
-                mText = value;
-                this.Invalidate();
-            }
-        }
-     
-        #endregion
-
-        #region Constructor
-
-        // ------------------------------------------------------------------
-        ///<summary>
-        ///Default constructor
-        ///</summary>
-        // ------------------------------------------------------------------
-        public ComplexShapeBase() : base()
-        {
-        }
-
-        // ------------------------------------------------------------------
-        /// <summary>
-        /// Initializes a new instance of the <see cref="ComplexShapeBase"/> 
-        /// class.
-        /// </summary>
-        /// <param name="model"></param>
-        // ------------------------------------------------------------------
-        public ComplexShapeBase(IModel model)
-            : base(model)
-        {
-        }
-
-        // ------------------------------------------------------------------
-        /// <summary>
-        /// Initializes this instance.
-        /// </summary>
-        // ------------------------------------------------------------------
-        protected override void Initialize()
-        {
-            base.Initialize();
-            mChildren = new CollectionBase<IShapeMaterial>();
-            mChildren.OnItemAdded +=
-                new EventHandler<CollectionEventArgs<IShapeMaterial>>
-                (mChildren_OnItemAdded);  
-        }
-        
-        #endregion
-
-        #region Methods
-        // ------------------------------------------------------------------
-
-        /// <summary>
-        /// Sets some contextual properties of the <see cref="Children"/> 
-        /// when a new item is added.
-        /// </summary>
-        /// <param name="sender">The sender.</param>
-        /// <param name="e">The e.</param>
-        // ------------------------------------------------------------------
-        void mChildren_OnItemAdded(object sender, CollectionEventArgs<IShapeMaterial> e)
-        {
-            e.Item.Shape = this;
-        }
-
-        // ------------------------------------------------------------------
-        /// <summary>
-        /// Overrides the abstract paint method
-        /// </summary>
-        /// <param name="g">a graphics object onto which to paint</param>
-        // ------------------------------------------------------------------
-        public override void Paint(Graphics g)
-        {
-            
-            base.Paint(g);
-
-           
-
-            foreach (IPaintable material in Children)
-            {
-                material.Paint(g);
-            }
-          
-        }
-
-        // ------------------------------------------------------------------
-        /// <summary>
-        /// Moves the entity with the given shift
-        /// </summary>
-        /// <param name="p">represent a shift-vector, not the absolute 
-        /// position!</param>
-        // ------------------------------------------------------------------
-        public override void MoveBy(Point p)
-        {
-            base.MoveBy(p);
-            Rectangle rec;
-            foreach (IShapeMaterial material in Children)
-            {
-                rec = material.Rectangle;
-
-                rec.Offset(p.X, p.Y);
-                material.Transform(rec);
-            }
-        }
-
-        // ------------------------------------------------------------------
-        /// <summary>
-        /// Transforms the entity to the given new rectangle.
-        /// </summary>
-        /// <param name="x">The x-coordinate of the new rectangle.</param>
-        /// <param name="y">The y-coordinate of the new rectangle.</param>
-        /// <param name="width">The width.</param>
-        /// <param name="height">The height.</param>
-        // ------------------------------------------------------------------
-        public override void Transform(int x, int y, int width, int height)
-        {
-            if (Children != null && Children.Count > 0)
-            {
-
-                int a, b, w, h;
-                foreach (IShapeMaterial material in Children)
-                {
-
-                    if (material.Gliding)
-                    {
-                        a = Convert.ToInt32(Math.Round(((double)material.Rectangle.X - (double)Rectangle.X) / (double)Rectangle.Width * width, 1) + x);
-                        b = Convert.ToInt32(Math.Round(((double)material.Rectangle.Y - (double)Rectangle.Y) / (double)Rectangle.Height * height, 1) + y);
-                    }
-                    else //shift the material, do not scale the position with respect to the sizing of the shape
-                    {
-                        a = material.Rectangle.X - Rectangle.X + x;
-                        b = material.Rectangle.Y - Rectangle.Y + y;
-                    }
-                    if (material.Resizable)
-                    {
-                        w = Convert.ToInt32(Math.Round(((double)material.Rectangle.Width) / ((double)Rectangle.Width), 1) * width);
-                        h = Convert.ToInt32(Math.Round(((double)material.Rectangle.Height) / ((double)Rectangle.Height), 1) * height);
-                    }
-                    else
-                    {
-                        w = material.Rectangle.Width;
-                        h = material.Rectangle.Height;
-                    }
-
-                    material.Transform(new Rectangle(a, b, w, h));
-                }
-            }
-            base.Transform(x, y, width, height);
-        }
-        #endregion
-
-        // ------------------------------------------------------------------
-        /// <summary>
-        /// Gets or sets the children.
-        /// </summary>
-        /// <value>The children.</value>
-        // ------------------------------------------------------------------
-        public virtual CollectionBase<IShapeMaterial> Children
-        {
-            get
-            {
-                return mChildren;
-            }
-            set
-            {
-                throw new InconsistencyException("You cannot set the children, use the existing collection and the clear() method.");    
-            }
-        }
-
-        // ------------------------------------------------------------------
-        /// <summary>
-        /// Defines a mechanism for retrieving a service object; that is, an 
-        /// object that provides custom support to other objects.
-        /// </summary>
-        /// <param name="serviceType">An object that specifies the type of 
-        /// service object to get.</param>
-        /// <returns>
-        /// A service object of type serviceType.-or- null if there is no 
-        /// service object of type serviceType.
-        /// </returns>
-        // ------------------------------------------------------------------
-        public override object GetService(Type serviceType)
-        {
-            if (Services.ContainsKey(serviceType))
-                return Services[serviceType];
-            else
-            {
-                return null;
-            }
-        }
-
-        // ------------------------------------------------------------------
-        /// <summary>
-        /// <see cref="IMouseListener"/> implementation.
-        /// </summary>
-        /// <param name="e">The 
-        /// <see cref="T:System.Windows.Forms.MouseEventArgs"/> instance 
-        /// containing the event data.</param>
-        // ------------------------------------------------------------------
-        public override bool MouseDown(MouseEventArgs e)
-        {
-            base.MouseDown(e);
-            IMouseListener listener ;
-            foreach (IShapeMaterial material in mChildren)
-            {
-                if(material.Rectangle.Contains(e.Location) && material.Visible)
-                {
-                    listener = material.GetService(typeof(
-                        IMouseListener)) as IMouseListener;
-                    if (listener != null)
-                        if (listener.MouseDown(e))
-                            return true;
-                }
-
-            }
-            return false;
-        }
-
-        // ------------------------------------------------------------------
-        /// <summary>
-        /// <see cref="IMouseListener"/> implementation.
-        /// </summary>
-        /// <param name="e">The 
-        /// <see cref="T:System.Windows.Forms.MouseEventArgs"/> instance 
-        /// containing the event data.</param>
-        // ------------------------------------------------------------------
-        public override void MouseMove(MouseEventArgs e)
-        {
-            base.MouseMove(e);
-            IMouseListener listener;
-            foreach (IShapeMaterial material in mChildren)
-            {
-                if ( (material.Rectangle.Contains(e.Location)) && 
-                    (material.Visible) )
-                {
-                    listener = material.GetService(typeof
-                        (IMouseListener)) as IMouseListener;
-
-                    if (listener != null)
-                    {
-                        listener.MouseMove(e);
-                    }
-                }
-            }
-        }
-
-        // ------------------------------------------------------------------
-        /// <summary>
-        /// <see cref="IMouseListener"/> implementation.
-        /// </summary>
-        /// <param name="e">The 
-        /// <see cref="T:System.Windows.Forms.MouseEventArgs"/> instance 
-        /// containing the event data.</param>
-        // ------------------------------------------------------------------
-        public override void MouseUp(MouseEventArgs e)
-        {
-            base.MouseUp(e);
-            IMouseListener listener;
-            foreach (IShapeMaterial material in mChildren)
-            {
-                if(material.Rectangle.Contains(e.Location) && material.Visible)
-                {
-                    listener = material.GetService(typeof(IMouseListener)) as IMouseListener;
-                    if (listener != null) listener.MouseUp(e);
-                }
-            }
-        }
-
-
-
-        #region IHoverListener Members
-
-        private IHoverListener currentHoveredMaterial;
-
-        // ------------------------------------------------------------------
-        /// <summary>
-        /// Handles the MouseHover event.
-        /// </summary>
-        /// <param name="e">The 
-        /// <see cref="T:System.Windows.Forms.MouseEventArgs"/> instance 
-        /// containing the event data.</param>
-        // ------------------------------------------------------------------
-        public override void MouseHover(MouseEventArgs e)
-        {
-            base.MouseHover(e);
-            IHoverListener listener;
-            foreach(IShapeMaterial material in this.Children)
-            {
-                if(material.Rectangle.Contains(e.Location) && material.Visible) //we caught an material and it's visible
-                {
-                    listener = material.GetService(typeof(IHoverListener)) as IHoverListener;
-                    if(listener != null) //the caught material does listen
-                    {
-                        if(currentHoveredMaterial == listener) //it's the same as the previous time
-                            listener.MouseHover(e);
-                        else //we moved from one material to another listening material
-                        {
-                            if(currentHoveredMaterial != null) //tell the previous material we are leaving
-                                currentHoveredMaterial.MouseLeave(e);
-                            listener.MouseEnter(e); //tell the current one we enter
-                            currentHoveredMaterial = listener;
-                        }
-                    }
-                    else //the caught material does not listen
-                    {
-                        if(currentHoveredMaterial != null)
-                        {
-                            currentHoveredMaterial.MouseLeave(e);
-                            currentHoveredMaterial = null;
-                        }
-                    }
-                    return; //only one material at a time
-                }
-
-            }
-            if(currentHoveredMaterial != null)
-            {
-                currentHoveredMaterial.MouseLeave(e);
-                currentHoveredMaterial = null;
-            }
-            
-        }
-
-        // ------------------------------------------------------------------
-        /// <summary>
-        /// Handles the OnMouseEnter event.
-        /// </summary>
-        /// <param name="e">The 
-        /// <see cref="T:System.Windows.Forms.MouseEventArgs"/> instance 
-        /// containing the event data.</param>
-        // ------------------------------------------------------------------
-        public override void MouseEnter(MouseEventArgs e)
-        {
-            base.MouseEnter(e);
-        }
-
-        // ------------------------------------------------------------------
-        /// <summary>
-        /// Handles the OnMouseLeave event.
-        /// </summary>
-        /// <param name="e">The 
-        /// <see cref="T:System.Windows.Forms.MouseEventArgs"/> instance 
-        /// containing the event data.</param>
-        // ------------------------------------------------------------------
-        public override void MouseLeave(MouseEventArgs e)
-        {
-            base.MouseLeave(e);
-        }
-
-        #endregion
-    }
+          }
+          return; //only one material at a time
+        }
+
+      }
+      if (currentHoveredMaterial != null) {
+        currentHoveredMaterial.MouseLeave(e);
+        currentHoveredMaterial = null;
+      }
+
+    }
+
+    // ------------------------------------------------------------------
+    /// <summary>
+    /// Handles the OnMouseEnter event.
+    /// </summary>
+    /// <param name="e">The 
+    /// <see cref="T:System.Windows.Forms.MouseEventArgs"/> instance 
+    /// containing the event data.</param>
+    // ------------------------------------------------------------------
+    public override void MouseEnter(MouseEventArgs e) {
+      base.MouseEnter(e);
+    }
+
+    // ------------------------------------------------------------------
+    /// <summary>
+    /// Handles the OnMouseLeave event.
+    /// </summary>
+    /// <param name="e">The 
+    /// <see cref="T:System.Windows.Forms.MouseEventArgs"/> instance 
+    /// containing the event data.</param>
+    // ------------------------------------------------------------------
+    public override void MouseLeave(MouseEventArgs e) {
+      base.MouseLeave(e);
+    }
+
+    #endregion
+  }
 }
Index: /trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.Netron/3.0.2672.12446/Netron.Diagramming.Core-3.0.2672.12446/BaseClasses/ConnectorBase.cs
===================================================================
--- /trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.Netron/3.0.2672.12446/Netron.Diagramming.Core-3.0.2672.12446/BaseClasses/ConnectorBase.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.Netron/3.0.2672.12446/Netron.Diagramming.Core-3.0.2672.12446/BaseClasses/ConnectorBase.cs	(revision 4068)
@@ -1,399 +1,362 @@
-using System;
+using System.Drawing;
 using System.Drawing.Drawing2D;
-using System.Drawing;
 using System.Windows.Forms;
-namespace Netron.Diagramming.Core
-{
-    // ----------------------------------------------------------------------
-	/// <summary>
-	/// Abstract base class for a connector.
-    /// </summary>
-    // ----------------------------------------------------------------------
-	public abstract partial class ConnectorBase : 
-        DiagramEntityBase, 
-        IConnector
-    {
-        #region Enums
-        public enum ConnectorNameLocation
-        {
-            Bottom,
-            Left,
-            Right,
-            Top
-        }
-        #endregion
-
-        #region Fields
-
-        // ------------------------------------------------------------------
-        /// <summary>
-        /// Implementation of IVersion - the current version of 
-        /// ConnectorBase.
-        /// </summary>
-        // ------------------------------------------------------------------
-        protected const double connectorBaseVersion = 1.0;
-
-        // ------------------------------------------------------------------
-		/// <summary>
-		/// the location of this connector
-        /// </summary>
-        // ------------------------------------------------------------------
-		protected Point mPoint;
-
-        // ------------------------------------------------------------------
-		/// <summary>
-		/// the connectors attached to this connector
-        /// </summary>
-        // ------------------------------------------------------------------
-        protected CollectionBase<IConnector> mAttachedConnectors;
-
-        // ------------------------------------------------------------------
-		/// <summary>
-		/// the connector, if any, to which this connector is attached to
-        /// </summary>
-        // ------------------------------------------------------------------
-        protected IConnector mAttachedTo;
-
-        // ------------------------------------------------------------------
-        /// <summary>
-        /// Specifies if the connectors name is drawn.
-        /// </summary>
-        // ------------------------------------------------------------------
-        protected bool mShowName = false;
-
-        // ------------------------------------------------------------------
-        /// <summary>
-        /// Specifies where the name is drawn relative to the connector's
-        /// bounds.
-        /// </summary>
-        // ------------------------------------------------------------------
-        protected ConnectorNameLocation mNameLocation = 
-            ConnectorNameLocation.Top;
-
-        // ------------------------------------------------------------------
-        /// <summary>
-        /// The font used to draw the name with.
-        /// </summary>
-        // ------------------------------------------------------------------
-        protected Font mFont = new Font("Arial", 12, FontStyle.Bold);
-
-        // ------------------------------------------------------------------
-        /// <summary>
-        /// The color used to draw the name with.
-        /// </summary>
-        // ------------------------------------------------------------------
-        protected Color mForeColor = Color.Black;
-		
-		#endregion
-
-        #region Properties
-
-        // ------------------------------------------------------------------
-        /// <summary>
-        /// Gets the current version.
-        /// </summary>
-        // ------------------------------------------------------------------
-        public override double Version
-        {
-            get
-            {
-                return connectorBaseVersion;
-            }
-        }
-
-        // ------------------------------------------------------------------
-        /// <summary>
-        /// Gets or sets the font used to draw the name with.
-        /// </summary>
-        // ------------------------------------------------------------------
-        public Font Font
-        {
-            get
-            {
-                return mFont;
-            }
-            set
-            {
-                mFont = value;
-            }
-        }
-
-        // ------------------------------------------------------------------
-        /// <summary>
-        /// Gets or sets the color used to draw the name with.
-        /// </summary>
-        // ------------------------------------------------------------------
-        public Color ForeColor
-        {
-            get
-            {
-                return mForeColor;
-            }
-            set
-            {
-                mForeColor = value;
-            }
-        }
-
-        // ------------------------------------------------------------------
-        /// <summary>
-        /// Gets or sets where the name is drawn relative to the connector's
-        /// bounds.
-        /// </summary>
-        // ------------------------------------------------------------------
-        public ConnectorNameLocation NameLocation
-        {
-            get
-            {
-                return mNameLocation;
-            }
-            set
-            {
-                mNameLocation = value;
-            }
-        }
-
-        // ------------------------------------------------------------------
-        /// <summary>
-        /// Gets or sets if the connectors name is drawn.
-        /// </summary>
-        // ------------------------------------------------------------------
-        public bool ShowName
-        {
-            get
-            {
-                return mShowName;
-            }
-            set
-            {
-                mShowName = value;
-            }
-        }
-
-        // ------------------------------------------------------------------
-		/// <summary>
-		/// Gets the attached connectors to this connector
-        /// </summary>
-        // ------------------------------------------------------------------
-        public CollectionBase<IConnector> AttachedConnectors
-		{
-			get
-            {
-                return mAttachedConnectors;
-            }		
-		}
-
-        // ------------------------------------------------------------------
-		/// <summary>
-		/// If the connector is attached to another connector
-        /// </summary>
-        // ------------------------------------------------------------------
-		public IConnector AttachedTo
-		{		
-			get
-            {
-                return mAttachedTo;
-            }
-			set
-            {
-                mAttachedTo = value;
-            }
-		}
-
-        // ------------------------------------------------------------------
-		/// <summary>
-		/// The location of this connector
-        /// </summary>
-        // ------------------------------------------------------------------
-		public Point Point
-		{
-			get
-            {
-                return mPoint;
-            }
-			set{
-                //throw new NotSupportedException("Use the Move() method instead.");
-
-             mPoint = value;
-            //foreach(IConnector con in  attachedConnectors)
-            //{
-            //    con.Point = value;
-            //}
-            }
-		}
-
-		#endregion
-
-		#region Constructor
-
-        // ------------------------------------------------------------------
-		/// <summary>
-		/// Default connector.
-        /// </summary>
-        // ------------------------------------------------------------------
-        protected ConnectorBase(IModel model)
-            : base(model)
-		{
-            mAttachedConnectors = new CollectionBase<IConnector>();
-            this.InitializeConnector();
-		}
-
-        // ------------------------------------------------------------------
-        /// <summary>
-        /// Constructs a connector, passing its location
-        /// </summary>
-        /// <param name="p">Point: The location of the conector.</param>
-        /// <param name="model">IModel: The model.</param>
-        // ------------------------------------------------------------------
-        protected ConnectorBase(Point p, IModel model)
-            : base(model)
-		{
-            mAttachedConnectors = new CollectionBase<IConnector>();
-            mPoint = p;
-            this.InitializeConnector();
-		}
-
-        // ------------------------------------------------------------------
-        /// <summary>
-        /// Initializes a new instance of the <see cref="T:ConnectorBase"/> 
-        /// class.
-        /// </summary>
-        /// <param name="p">Point: The location of the conector.</param>
-        // ------------------------------------------------------------------
-        protected ConnectorBase(Point p) : base()
-        {
-            mAttachedConnectors = new CollectionBase<IConnector>();
-            this.mPoint = p;
-            this.InitializeConnector();
-        }
-
-		#endregion
-
-		#region Methods
-
-        // ------------------------------------------------------------------
-        /// <summary>
-        /// Initializes the default settings of the connector.  Actions
-        /// performed in the ConnectorBase are:
-        ///     *  Sets the default PaintStyle to be 
-        ///        'SolidPaintStyle' with a transparent color.
-        ///     *  Sets the default PenStyle to be a LinePenStyle whose color
-        ///        is Transparent and DashStyle is 'Solid'.
-        /// </summary>
-        // ------------------------------------------------------------------
-        protected virtual void InitializeConnector()
-        {
-            this.mPaintStyle = new SolidPaintStyle(Color.Transparent);
-            LinePenStyle lineStyle = new LinePenStyle();
-            lineStyle.Color = Color.Transparent;
-            lineStyle.DashStyle = DashStyle.Solid;
-        }
-
-        // ------------------------------------------------------------------
-        /// <summary>
-        /// The custom menu to be added to the base menu of this connector.
-        /// 'null' is returned here.
-        /// </summary>
-        /// <returns>ToolStripItem[]</returns>
-        // ------------------------------------------------------------------
-        public override ToolStripItem[] Menu()
-        {
-            return null;
-        }
-
-        // ------------------------------------------------------------------
-		/// <summary>
-		/// Attaches the given connector to this connector. 
-        /// <remarks>The method will remove a previous binding, if any, 
-        /// before creating the attachment. This method prohibits mutliple 
-        /// identical connections; you can attach a connector only once.
-        /// </remarks>
-		/// </summary>
-        /// <param name="connector">IConnector</param>
-        // ------------------------------------------------------------------
-        public virtual void AttachConnector(IConnector connector)
-		{
-            if(connector == null || !Enabled)
-                return;
-            //only attach'm if not already present and not the parent
-            if( (!mAttachedConnectors.Contains(connector)) && 
-                (connector!=mAttachedTo) )
-            {
-                connector.DetachFromParent();
-                mAttachedConnectors.Add(connector);
-                // Make sure the attached connector is centered at this 
-                // connector.
-                connector.Point = this.mPoint;
-                connector.AttachedTo = this;
-            }
-
-		}
-
-        // ------------------------------------------------------------------
-		/// <summary>
-		/// Detaches the given connector from this connector. No exception 
-        /// will be thrown if the given connector is not a child.
-		/// </summary>
-        /// <param name="connector">IConnector</param>
-        // ------------------------------------------------------------------
-        public virtual void DetachConnector(IConnector connector)
-		{
-            if(connector == null || !Enabled)
-                return;
-
-            if(mAttachedConnectors.Contains(connector))
-            {
-                mAttachedConnectors.Remove(connector);
-                connector.AttachedTo = null;
-            }
-		}
-
-        // ------------------------------------------------------------------
-        /// <summary>
-        /// Detaches from its parent (if any). No exception will be thrown 
-        /// if this connector is not attached to any parent.
-        /// </summary>
-        // ------------------------------------------------------------------
-        public virtual void DetachFromParent()
-        {
-            if(this.AttachedTo != null && Enabled)
-            {
-                this.AttachedTo.AttachedConnectors.Remove(this);
-                this.AttachedTo = null;
-            }
-
-        }
-
-        // ------------------------------------------------------------------
-        /// <summary>
-        /// Attaches to another connector. 
-        /// <remarks>If this connector is already attached it will be 
-        /// detached first and no exception will be thrown.  This method does 
-        /// not allow mutliple connections; you cannot attach to a parent if 
-        /// it already does
-        /// </remarks>
-        /// </summary>
-        /// <param name="parent">The new parent connector.</param>
-        // ------------------------------------------------------------------
-        public virtual void AttachTo(IConnector parent)
-        {
-
-            if(parent == null || !Enabled)
-                return;
-            // Do not re-attach and the parent cannot be an already attached 
-            // child.
-            if( (this.AttachedTo != parent) && 
-                (!AttachedConnectors.Contains(parent)))
-            {
-                //remove any other binding
-                DetachFromParent();
-                //attach to the given parent
-                parent.AttachedConnectors.Add(this);
-                this.AttachedTo = parent;
-            }
-        }
-		
-		#endregion
-
-    }
+namespace Netron.Diagramming.Core {
+  // ----------------------------------------------------------------------
+  /// <summary>
+  /// Abstract base class for a connector.
+  /// </summary>
+  // ----------------------------------------------------------------------
+  public abstract partial class ConnectorBase :
+        DiagramEntityBase,
+        IConnector {
+    #region Enums
+    public enum ConnectorNameLocation {
+      Bottom,
+      Left,
+      Right,
+      Top
+    }
+    #endregion
+
+    #region Fields
+
+    // ------------------------------------------------------------------
+    /// <summary>
+    /// Implementation of IVersion - the current version of 
+    /// ConnectorBase.
+    /// </summary>
+    // ------------------------------------------------------------------
+    protected const double connectorBaseVersion = 1.0;
+
+    // ------------------------------------------------------------------
+    /// <summary>
+    /// the location of this connector
+    /// </summary>
+    // ------------------------------------------------------------------
+    protected Point mPoint;
+
+    // ------------------------------------------------------------------
+    /// <summary>
+    /// the connectors attached to this connector
+    /// </summary>
+    // ------------------------------------------------------------------
+    protected CollectionBase<IConnector> mAttachedConnectors;
+
+    // ------------------------------------------------------------------
+    /// <summary>
+    /// the connector, if any, to which this connector is attached to
+    /// </summary>
+    // ------------------------------------------------------------------
+    protected IConnector mAttachedTo;
+
+    // ------------------------------------------------------------------
+    /// <summary>
+    /// Specifies if the connectors name is drawn.
+    /// </summary>
+    // ------------------------------------------------------------------
+    protected bool mShowName = false;
+
+    // ------------------------------------------------------------------
+    /// <summary>
+    /// Specifies where the name is drawn relative to the connector's
+    /// bounds.
+    /// </summary>
+    // ------------------------------------------------------------------
+    protected ConnectorNameLocation mNameLocation =
+        ConnectorNameLocation.Top;
+
+    // ------------------------------------------------------------------
+    /// <summary>
+    /// The font used to draw the name with.
+    /// </summary>
+    // ------------------------------------------------------------------
+    protected Font mFont = new Font("Arial", 12, FontStyle.Bold);
+
+    // ------------------------------------------------------------------
+    /// <summary>
+    /// The color used to draw the name with.
+    /// </summary>
+    // ------------------------------------------------------------------
+    protected Color mForeColor = Color.Black;
+
+    #endregion
+
+    #region Properties
+
+    // ------------------------------------------------------------------
+    /// <summary>
+    /// Gets the current version.
+    /// </summary>
+    // ------------------------------------------------------------------
+    public override double Version {
+      get {
+        return connectorBaseVersion;
+      }
+    }
+
+    // ------------------------------------------------------------------
+    /// <summary>
+    /// Gets or sets the font used to draw the name with.
+    /// </summary>
+    // ------------------------------------------------------------------
+    public Font Font {
+      get {
+        return mFont;
+      }
+      set {
+        mFont = value;
+      }
+    }
+
+    // ------------------------------------------------------------------
+    /// <summary>
+    /// Gets or sets the color used to draw the name with.
+    /// </summary>
+    // ------------------------------------------------------------------
+    public Color ForeColor {
+      get {
+        return mForeColor;
+      }
+      set {
+        mForeColor = value;
+      }
+    }
+
+    // ------------------------------------------------------------------
+    /// <summary>
+    /// Gets or sets where the name is drawn relative to the connector's
+    /// bounds.
+    /// </summary>
+    // ------------------------------------------------------------------
+    public ConnectorNameLocation NameLocation {
+      get {
+        return mNameLocation;
+      }
+      set {
+        mNameLocation = value;
+      }
+    }
+
+    // ------------------------------------------------------------------
+    /// <summary>
+    /// Gets or sets if the connectors name is drawn.
+    /// </summary>
+    // ------------------------------------------------------------------
+    public bool ShowName {
+      get {
+        return mShowName;
+      }
+      set {
+        mShowName = value;
+      }
+    }
+
+    // ------------------------------------------------------------------
+    /// <summary>
+    /// Gets the attached connectors to this connector
+    /// </summary>
+    // ------------------------------------------------------------------
+    public CollectionBase<IConnector> AttachedConnectors {
+      get {
+        return mAttachedConnectors;
+      }
+    }
+
+    // ------------------------------------------------------------------
+    /// <summary>
+    /// If the connector is attached to another connector
+    /// </summary>
+    // ------------------------------------------------------------------
+    public IConnector AttachedTo {
+      get {
+        return mAttachedTo;
+      }
+      set {
+        mAttachedTo = value;
+      }
+    }
+
+    // ------------------------------------------------------------------
+    /// <summary>
+    /// The location of this connector
+    /// </summary>
+    // ------------------------------------------------------------------
+    public Point Point {
+      get {
+        return mPoint;
+      }
+      set {
+        //throw new NotSupportedException("Use the Move() method instead.");
+
+        mPoint = value;
+        //foreach(IConnector con in  attachedConnectors)
+        //{
+        //    con.Point = value;
+        //}
+      }
+    }
+
+    #endregion
+
+    #region Constructor
+
+    // ------------------------------------------------------------------
+    /// <summary>
+    /// Default connector.
+    /// </summary>
+    // ------------------------------------------------------------------
+    protected ConnectorBase(IModel model)
+      : base(model) {
+      mAttachedConnectors = new CollectionBase<IConnector>();
+      this.InitializeConnector();
+    }
+
+    // ------------------------------------------------------------------
+    /// <summary>
+    /// Constructs a connector, passing its location
+    /// </summary>
+    /// <param name="p">Point: The location of the conector.</param>
+    /// <param name="model">IModel: The model.</param>
+    // ------------------------------------------------------------------
+    protected ConnectorBase(Point p, IModel model)
+      : base(model) {
+      mAttachedConnectors = new CollectionBase<IConnector>();
+      mPoint = p;
+      this.InitializeConnector();
+    }
+
+    // ------------------------------------------------------------------
+    /// <summary>
+    /// Initializes a new instance of the <see cref="T:ConnectorBase"/> 
+    /// class.
+    /// </summary>
+    /// <param name="p">Point: The location of the conector.</param>
+    // ------------------------------------------------------------------
+    protected ConnectorBase(Point p)
+      : base() {
+      mAttachedConnectors = new CollectionBase<IConnector>();
+      this.mPoint = p;
+      this.InitializeConnector();
+    }
+
+    #endregion
+
+    #region Methods
+
+    // ------------------------------------------------------------------
+    /// <summary>
+    /// Initializes the default settings of the connector.  Actions
+    /// performed in the ConnectorBase are:
+    ///     *  Sets the default PaintStyle to be 
+    ///        'SolidPaintStyle' with a transparent color.
+    ///     *  Sets the default PenStyle to be a LinePenStyle whose color
+    ///        is Transparent and DashStyle is 'Solid'.
+    /// </summary>
+    // ------------------------------------------------------------------
+    protected virtual void InitializeConnector() {
+      this.mPaintStyle = new SolidPaintStyle(Color.Transparent);
+      LinePenStyle lineStyle = new LinePenStyle();
+      lineStyle.Color = Color.Transparent;
+      lineStyle.DashStyle = DashStyle.Solid;
+    }
+
+    // ------------------------------------------------------------------
+    /// <summary>
+    /// The custom menu to be added to the base menu of this connector.
+    /// 'null' is returned here.
+    /// </summary>
+    /// <returns>ToolStripItem[]</returns>
+    // ------------------------------------------------------------------
+    public override ToolStripItem[] Menu() {
+      return null;
+    }
+
+    // ------------------------------------------------------------------
+    /// <summary>
+    /// Attaches the given connector to this connector. 
+    /// <remarks>The method will remove a previous binding, if any, 
+    /// before creating the attachment. This method prohibits mutliple 
+    /// identical connections; you can attach a connector only once.
+    /// </remarks>
+    /// </summary>
+    /// <param name="connector">IConnector</param>
+    // ------------------------------------------------------------------
+    public virtual void AttachConnector(IConnector connector) {
+      if (connector == null || !Enabled)
+        return;
+      //only attach'm if not already present and not the parent
+      if ((!mAttachedConnectors.Contains(connector)) &&
+          (connector != mAttachedTo)) {
+        connector.DetachFromParent();
+        mAttachedConnectors.Add(connector);
+        // Make sure the attached connector is centered at this 
+        // connector.
+        connector.Point = this.mPoint;
+        connector.AttachedTo = this;
+      }
+
+    }
+
+    // ------------------------------------------------------------------
+    /// <summary>
+    /// Detaches the given connector from this connector. No exception 
+    /// will be thrown if the given connector is not a child.
+    /// </summary>
+    /// <param name="connector">IConnector</param>
+    // ------------------------------------------------------------------
+    public virtual void DetachConnector(IConnector connector) {
+      if (connector == null || !Enabled)
+        return;
+
+      if (mAttachedConnectors.Contains(connector)) {
+        mAttachedConnectors.Remove(connector);
+        connector.AttachedTo = null;
+      }
+    }
+
+    // ------------------------------------------------------------------
+    /// <summary>
+    /// Detaches from its parent (if any). No exception will be thrown 
+    /// if this connector is not attached to any parent.
+    /// </summary>
+    // ------------------------------------------------------------------
+    public virtual void DetachFromParent() {
+      if (this.AttachedTo != null && Enabled) {
+        this.AttachedTo.AttachedConnectors.Remove(this);
+        this.AttachedTo = null;
+      }
+
+    }
+
+    // ------------------------------------------------------------------
+    /// <summary>
+    /// Attaches to another connector. 
+    /// <remarks>If this connector is already attached it will be 
+    /// detached first and no exception will be thrown.  This method does 
+    /// not allow mutliple connections; you cannot attach to a parent if 
+    /// it already does
+    /// </remarks>
+    /// </summary>
+    /// <param name="parent">The new parent connector.</param>
+    // ------------------------------------------------------------------
+    public virtual void AttachTo(IConnector parent) {
+
+      if (parent == null || !Enabled)
+        return;
+      // Do not re-attach and the parent cannot be an already attached 
+      // child.
+      if ((this.AttachedTo != parent) &&
+          (!AttachedConnectors.Contains(parent))) {
+        //remove any other binding
+        DetachFromParent();
+        //attach to the given parent
+        parent.AttachedConnectors.Add(this);
+        this.AttachedTo = parent;
+      }
+    }
+
+    #endregion
+
+  }
 }
Index: /trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.Netron/3.0.2672.12446/Netron.Diagramming.Core-3.0.2672.12446/BaseClasses/DiagramEntityBase.cs
===================================================================
--- /trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.Netron/3.0.2672.12446/Netron.Diagramming.Core-3.0.2672.12446/BaseClasses/DiagramEntityBase.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.Netron/3.0.2672.12446/Netron.Diagramming.Core-3.0.2672.12446/BaseClasses/DiagramEntityBase.cs	(revision 4068)
@@ -1,1387 +1,1246 @@
 using System;
+using System.Collections.Generic;
+using System.ComponentModel;
 using System.Drawing;
-using System.ComponentModel;
-
 using System.Windows.Forms;
-using System.Collections.Generic;
-using System.Drawing.Drawing2D;
-namespace Netron.Diagramming.Core
-{
-    // ----------------------------------------------------------------------
-    /// <summary>
-    /// Abstract base class for every diagram entity.
-    /// </summary>
-    // ----------------------------------------------------------------------
-    public abstract partial class DiagramEntityBase : 
-        IDiagramEntity, 
-        IMouseListener,
-        IHoverListener,
-        IKeyboardListener,
-        IDisposable
-    {
-        #region Events
-
-        // ------------------------------------------------------------------
-        /// <summary>
-        /// Occurs when the user click on the entity.
-        /// </summary>
-        // ------------------------------------------------------------------
-        public event EventHandler<EntityEventArgs> OnClick;
-
-        // ------------------------------------------------------------------
-        /// <summary>
-        /// Occurs when a mouse button is pressed while over the entity.
-        /// </summary>
-        // ------------------------------------------------------------------
-        public event EventHandler<EntityMouseEventArgs> OnMouseDown;
-
-        // ------------------------------------------------------------------
-        /// <summary>
-        /// Occurs when a mouse button is released while over the entity.
-        /// </summary>
-        // ------------------------------------------------------------------
-        public event EventHandler<EntityMouseEventArgs> OnMouseUp;
-
-        // ------------------------------------------------------------------
-        /// <summary>
-        /// Occurs when the mouse is moved while over the entity.
-        /// </summary>
-        // ------------------------------------------------------------------
-        public event EventHandler<EntityMouseEventArgs> OnMouseMove;
-
-        // ------------------------------------------------------------------
-        /// <summary>
-        /// Occurs when the mouse enters the entity.
-        /// </summary>
-        // ------------------------------------------------------------------
-        public event EventHandler<EntityMouseEventArgs> OnMouseEnter;
-
-        // ------------------------------------------------------------------
-        /// <summary>
-        /// Occurs when the mouse hovers over the entity.
-        /// </summary>
-        // ------------------------------------------------------------------
-        public event EventHandler<EntityMouseEventArgs> OnMouseHover;
-
-        // ------------------------------------------------------------------
-        /// <summary>
-        /// Occurs when the mouse leaves the entity.
-        /// </summary>
-        // ------------------------------------------------------------------
-        public event EventHandler<EntityMouseEventArgs> OnMouseLeave;
-
-        // ------------------------------------------------------------------
-        /// <summary>
-        /// Occurs when the entity's properties have changed
-        /// </summary>
-        // ------------------------------------------------------------------
-        public event EventHandler<EntityEventArgs> OnEntityChange;
-
-        // ------------------------------------------------------------------
-        /// <summary>
-        /// Occurs when the entity is selected. This can be different than the 
-        /// OnClick because the selector can select and entity without 
-        /// clicking on it.
-        /// </summary>
-        // ------------------------------------------------------------------
-        public event EventHandler<EntityEventArgs> OnEntitySelect;
-
+namespace Netron.Diagramming.Core {
+  // ----------------------------------------------------------------------
+  /// <summary>
+  /// Abstract base class for every diagram entity.
+  /// </summary>
+  // ----------------------------------------------------------------------
+  public abstract partial class DiagramEntityBase :
+      IDiagramEntity,
+      IMouseListener,
+      IHoverListener,
+      IKeyboardListener,
+      IDisposable {
+    #region Events
+
+    // ------------------------------------------------------------------
+    /// <summary>
+    /// Occurs when the user click on the entity.
+    /// </summary>
+    // ------------------------------------------------------------------
+    public event EventHandler<EntityEventArgs> OnClick;
+
+    // ------------------------------------------------------------------
+    /// <summary>
+    /// Occurs when a mouse button is pressed while over the entity.
+    /// </summary>
+    // ------------------------------------------------------------------
+    public event EventHandler<EntityMouseEventArgs> OnMouseDown;
+
+    // ------------------------------------------------------------------
+    /// <summary>
+    /// Occurs when a mouse button is released while over the entity.
+    /// </summary>
+    // ------------------------------------------------------------------
+    public event EventHandler<EntityMouseEventArgs> OnMouseUp;
+
+    // ------------------------------------------------------------------
+    /// <summary>
+    /// Occurs when the mouse is moved while over the entity.
+    /// </summary>
+    // ------------------------------------------------------------------
+    public event EventHandler<EntityMouseEventArgs> OnMouseMove;
+
+    // ------------------------------------------------------------------
+    /// <summary>
+    /// Occurs when the mouse enters the entity.
+    /// </summary>
+    // ------------------------------------------------------------------
+    public event EventHandler<EntityMouseEventArgs> OnMouseEnter;
+
+    // ------------------------------------------------------------------
+    /// <summary>
+    /// Occurs when the mouse hovers over the entity.
+    /// </summary>
+    // ------------------------------------------------------------------
+    public event EventHandler<EntityMouseEventArgs> OnMouseHover;
+
+    // ------------------------------------------------------------------
+    /// <summary>
+    /// Occurs when the mouse leaves the entity.
+    /// </summary>
+    // ------------------------------------------------------------------
+    public event EventHandler<EntityMouseEventArgs> OnMouseLeave;
+
+    // ------------------------------------------------------------------
+    /// <summary>
+    /// Occurs when the entity's properties have changed
+    /// </summary>
+    // ------------------------------------------------------------------
+    public event EventHandler<EntityEventArgs> OnEntityChange;
+
+    // ------------------------------------------------------------------
+    /// <summary>
+    /// Occurs when the entity is selected. This can be different than the 
+    /// OnClick because the selector can select and entity without 
+    /// clicking on it.
+    /// </summary>
+    // ------------------------------------------------------------------
+    public event EventHandler<EntityEventArgs> OnEntitySelect;
+
+    #endregion
+
+    #region Fields
+
+    // ------------------------------------------------------------------
+    /// <summary>
+    /// Implementation of IVersion - the current version of 
+    /// DiagramEntityBase.
+    /// </summary>
+    // ------------------------------------------------------------------
+    protected const double diagramEntityBaseVersion = 1.0;
+
+    // ------------------------------------------------------------------
+    /// <summary>
+    /// The services of this entity.
+    /// </summary>
+    // ------------------------------------------------------------------
+    protected Dictionary<Type, IInteraction> mServices;
+
+    // ------------------------------------------------------------------
+    /// <summary>
+    /// The Rectangle on which any bundle lives.
+    /// </summary>
+    // ------------------------------------------------------------------
+    protected Rectangle mRectangle = Rectangle.Empty;
+
+    // ------------------------------------------------------------------
+    /// <summary>
+    /// General prupose tag
+    /// </summary>
+    // ------------------------------------------------------------------
+    protected object mTag;
+
+    // ------------------------------------------------------------------
+    /// <summary>
+    /// tells whether the current entity is hovered by the mouse
+    /// </summary>
+    // ------------------------------------------------------------------
+    protected bool mHovered;
+
+    // ------------------------------------------------------------------
+    /// <summary>
+    /// The current magnification of the view.
+    /// </summary>
+    // ------------------------------------------------------------------
+    protected SizeF mMagnification = new SizeF(100F, 100F);
+
+    // ------------------------------------------------------------------
+    /// <summary>
+    /// The Model to which the eneity belongs.
+    /// </summary>
+    // ------------------------------------------------------------------
+    protected IModel mModel;
+
+    // ------------------------------------------------------------------
+    /// <summary>
+    /// The layer to which this entity is attached in the Model.
+    /// </summary>
+    // ------------------------------------------------------------------
+    protected ILayer mLayer;
+
+    // ------------------------------------------------------------------
+    /// <summary>
+    /// tells whether the entity is selected
+    /// </summary>
+    // ------------------------------------------------------------------
+    protected bool mIsSelected;
+
+    // ------------------------------------------------------------------
+    /// <summary>
+    /// the current draw style
+    /// </summary>
+    // ------------------------------------------------------------------
+    protected IPenStyle mPenStyle;
+
+    // ------------------------------------------------------------------
+    /// <summary>
+    /// the current paint style
+    /// </summary>
+    // ------------------------------------------------------------------
+    protected IPaintStyle mPaintStyle;
+
+    // ------------------------------------------------------------------
+    /// <summary>
+    /// the default pen to be used by the Paint method
+    /// </summary>
+    // ------------------------------------------------------------------
+    protected Pen mPen;
+
+    // ------------------------------------------------------------------
+    /// <summary>
+    /// the default brush to be used by the Paint method
+    /// </summary>
+    // ------------------------------------------------------------------
+    protected Brush mBrush;
+
+    // ------------------------------------------------------------------
+    /// <summary>
+    /// the name of the entity
+    /// </summary>
+    // ------------------------------------------------------------------
+    protected string mName;
+
+    // ------------------------------------------------------------------
+    /// <summary>
+    /// a weak reference to the parent
+    /// </summary>
+    // ------------------------------------------------------------------
+    protected WeakReference mParent;
+
+    // ------------------------------------------------------------------
+    /// <summary>
+    /// the scene index, i.e. the index of this entity in the scene-graph.
+    /// </summary>
+    // ------------------------------------------------------------------
+    protected int mSceneIndex;
+
+    // ------------------------------------------------------------------
+    /// <summary>
+    /// The top-group to underneath which this entity resides.
+    /// </summary>
+    // ------------------------------------------------------------------
+    protected IGroup mGroup;
+
+    // ------------------------------------------------------------------
+    /// <summary>
+    /// Specifies if the entity can be moved.
+    /// </summary>
+    // ------------------------------------------------------------------
+    protected bool mAllowMove = true;
+
+    // ------------------------------------------------------------------
+    /// <summary>
+    /// Specifies if the entity can be deleted.
+    /// </summary>
+    // ------------------------------------------------------------------
+    protected bool mAllowDelete = true;
+
+    // ------------------------------------------------------------------
+    /// <summary>
+    /// Specifies if the entity can be resized.
+    /// </summary>
+    // ------------------------------------------------------------------
+    protected bool mResizable = true;
+
+    // ------------------------------------------------------------------
+    /// <summary>
+    /// The minimum size this entity can be.  The default value is:
+    /// width = 10, height = 10.  This seems to be the min size that
+    /// keeps the connectors relative position correct during a Transform.
+    /// </summary>
+    // ------------------------------------------------------------------
+    protected Size myMinSize = new Size(10, 10);
+
+    // ------------------------------------------------------------------
+    /// <summary>
+    /// The maximum size this entity can be.  The default value is:
+    /// width = 10000, height = 10000.
+    /// </summary>
+    // ------------------------------------------------------------------
+    protected Size myMaxSize = new Size(10000, 10000);
+
+    // ------------------------------------------------------------------
+    /// <summary>
+    /// The unique identifier of this entity
+    /// </summary>
+    // ------------------------------------------------------------------
+    protected Guid mUid = Guid.NewGuid();
+
+    // ------------------------------------------------------------------
+    /// <summary>
+    /// whether the entity is visible
+    /// </summary>
+    // ------------------------------------------------------------------
+    protected bool mVisible = true;
+
+    // ------------------------------------------------------------------
+    /// <summary>
+    /// The Enabled field.
+    /// </summary>
+    // ------------------------------------------------------------------
+    protected bool mEnabled = true;
+
+    #endregion
+
+    #region Properties
+
+    // ------------------------------------------------------------------
+    /// <summary>
+    /// Gets the current version.
+    /// </summary>
+    // ------------------------------------------------------------------
+    public virtual double Version {
+      get {
+        return diagramEntityBaseVersion;
+      }
+    }
+
+    // ------------------------------------------------------------------
+    /// <summary>
+    /// Gets the services provided by this entity.
+    /// </summary>
+    /// <value>The services.</value>
+    // ------------------------------------------------------------------
+    public Dictionary<Type, IInteraction> Services {
+      get { return mServices; }
+    }
+
+    // ------------------------------------------------------------------
+    /// <summary>
+    /// Gets or sets whether this entity is Enabled.
+    /// </summary>
+    // ------------------------------------------------------------------
+    public virtual bool Enabled {
+      get {
+        return mEnabled;
+      }
+      set {
+        mEnabled = value;
+        RaiseOnChange(this, new EntityEventArgs(this));
+      }
+    }
+
+    // ------------------------------------------------------------------
+    /// <summary>
+    /// Gets or sets a value indicating whether this entity is visible.
+    /// </summary>
+    /// <value><c>true</c> if visible; otherwise, <c>false</c>.</value>
+    // ------------------------------------------------------------------
+    public virtual bool Visible {
+      get {
+        return mVisible;
+      }
+      set {
+        mVisible = value;
+        RaiseOnChange(this, new EntityEventArgs(this));
+      }
+    }
+
+    // ------------------------------------------------------------------
+    /// <summary>
+    /// Gets or sets the drawing style.
+    /// </summary>
+    /// <value>The draw style.</value>
+    // ------------------------------------------------------------------
+    public virtual IPenStyle PenStyle {
+      get {
+        return mPenStyle;
+      }
+      set {
+        mPenStyle = value;
+        RaiseOnChange(this, new EntityEventArgs(this));
+        UpdatePaintingMaterial();
+      }
+    }
+
+    // ------------------------------------------------------------------
+    /// <summary>
+    /// Gets or sets the paint style.
+    /// </summary>
+    /// <value>The paint style.</value>
+    // ------------------------------------------------------------------
+    public virtual IPaintStyle PaintStyle {
+      get {
+        return mPaintStyle;
+      }
+      set {
+        mPaintStyle = value;
+        RaiseOnChange(this, new EntityEventArgs(this));
+        UpdatePaintingMaterial();
+      }
+    }
+
+    // ------------------------------------------------------------------
+    /// <summary>
+    /// Gets the globally unique identifier of this entity
+    /// </summary>
+    /// <value></value>
+    // ------------------------------------------------------------------
+    public virtual Guid Uid {
+      get {
+        return mUid;
+      }
+
+    }
+
+    // ------------------------------------------------------------------
+    /// <summary>
+    /// Gets or sets a value indicating whether this 
+    /// <see cref="IDiagramEntity"/> can be moved.
+    /// </summary>
+    /// <value><c>true</c> if movable; otherwise, <c>false</c>.</value>
+    // ------------------------------------------------------------------
+    public virtual bool AllowMove {
+      get {
+        return mAllowMove;
+      }
+      set {
+        mAllowMove = value;
+      }
+    }
+
+    // ------------------------------------------------------------------
+    /// <summary>
+    /// Gets or sets a value indicating whether this 
+    /// <see cref="IDiagramEntity"/> can be deleted.
+    /// </summary>
+    /// <value><c>true</c> if deletable; otherwise, <c>false</c>.</value>
+    // ------------------------------------------------------------------
+    public virtual bool AllowDelete {
+      get {
+        return mAllowDelete;
+      }
+      set {
+        mAllowDelete = value;
+      }
+    }
+
+    // ------------------------------------------------------------------
+    /// <summary>
+    /// Gets or sets the Resizable
+    /// </summary>
+    // ------------------------------------------------------------------
+    public virtual bool Resizable {
+      get {
+        return mResizable;
+      }
+      set {
+        mResizable = value;
+      }
+    }
+
+    // ------------------------------------------------------------------
+    /// <summary>
+    /// Gets the minimum size of the entity.
+    /// </summary>
+    // ------------------------------------------------------------------
+    public virtual Size MinSize {
+      get {
+        return myMinSize;
+      }
+    }
+
+    // ------------------------------------------------------------------
+    /// <summary>
+    /// Gets the maximum size of the entity.
+    /// </summary>
+    // ------------------------------------------------------------------
+    public virtual Size MaxSize {
+      get {
+        return myMaxSize;
+      }
+    }
+
+    // ------------------------------------------------------------------
+    /// <summary>
+    /// Gets the <see cref="Brush"/> to paint this entity.
+    /// </summary>
+    // ------------------------------------------------------------------
+    public virtual Brush Brush {
+      get {
+        return mBrush;
+      }
+    }
+
+    // ------------------------------------------------------------------
+    /// <summary>
+    /// Gets the pen to draw this entity.
+    /// </summary>
+    /// <value>The pen.</value>
+    // ------------------------------------------------------------------
+    public virtual Pen Pen {
+      get {
+        return mPen;
+      }
+    }
+
+    // ------------------------------------------------------------------
+    /// <summary>
+    /// Gets the friendly name of the entity to be displayed in the UI.
+    /// </summary>
+    /// <value></value>
+    // ------------------------------------------------------------------
+    public abstract string EntityName {
+      get;
+    }
+
+    // ------------------------------------------------------------------
+    /// <summary>
+    /// Gets or sets the general purpose tag
+    /// </summary>
+    // ------------------------------------------------------------------
+    public virtual object Tag {
+      get {
+        return mTag;
+      }
+      set {
+        mTag = value;
+      }
+    }
+
+    // ------------------------------------------------------------------
+    /// <summary>
+    /// Gets or sets the index of this entity in the scene-graph.
+    /// </summary>
+    /// <value>The index of the scene.</value>
+    // ------------------------------------------------------------------
+    public virtual int SceneIndex {
+      get {
+        return mSceneIndex;
+      }
+      set {
+        mSceneIndex = value;
+      }
+    }
+
+    // ------------------------------------------------------------------
+    /// <summary>
+    /// Gets or sets the unique top-group to which this entity belongs.
+    /// </summary>
+    /// <value></value>
+    // ------------------------------------------------------------------
+    public virtual IGroup Group {
+      get {
+        return mGroup;
+      }
+      set {
+        mGroup = value;
+        // Propagate downwards if this is a group shape, but not if 
+        // the value is 'null' since the group becomes the value of 
+        // the Group property.  Note that we could have used a formal 
+        // depth-traversal algorithm.
+        if (this is IGroup) {
+          if (value == null)//occurs on an ungroup action
+                    {
+            foreach (IDiagramEntity entity in
+                (this as IGroup).Entities) {
+              entity.Group = this as IGroup;
+            }
+          } else //occurs when grouping
+                    {
+            foreach (IDiagramEntity entity in
+                (this as IGroup).Entities) {
+              entity.Group = value;
+            }
+          }
+        }
+
+      }
+    }
+
+    // ------------------------------------------------------------------
+    /// <summary>
+    /// Gets or sets whether the entity is hovered by the mouse
+    /// </summary>
+    // ------------------------------------------------------------------
+    public virtual bool Hovered {
+      get {
+        return mHovered;
+      }
+      set {
+        mHovered = value;
+        Invalidate();
+      }
+    }
+
+    // ------------------------------------------------------------------
+    /// <summary>
+    /// Gets or sets the parent of the entity
+    /// </summary>
+    // ------------------------------------------------------------------
+    public virtual object Parent {
+      get {
+        if (mParent != null && mParent.IsAlive) {
+          return mParent.Target;
+        } else {
+          return null;
+        }
+      }
+      set {
+        mParent = new WeakReference(value);
+        RaiseOnChange(this, new EntityEventArgs(this));
+      }
+    }
+
+    // ------------------------------------------------------------------
+    /// <summary>
+    /// Gets or sets the name of the entity
+    /// </summary>
+    // ------------------------------------------------------------------
+    public virtual string Name {
+      get {
+        return mName;
+      }
+      set {
+        mName = value;
+        RaiseOnChange(this, new EntityEventArgs(this));
+      }
+    }
+
+    #region Bounds and point calculations
+
+    // ------------------------------------------------------------------
+    /// <summary>
+    /// Gets the bounds of the paintable entity.
+    /// </summary>
+    /// <value></value>
+    // ------------------------------------------------------------------
+    public abstract Rectangle Rectangle {
+      get;
+    }
+
+    // ------------------------------------------------------------------
+    /// <summary>
+    /// Gets the top left corner of this entity, which is the same as
+    /// 'Rectangle.Location'.
+    /// </summary>
+    // ------------------------------------------------------------------
+    public virtual Point TopLeftCorner {
+      get {
+        return this.Rectangle.Location;
+      }
+    }
+
+    // ------------------------------------------------------------------
+    /// <summary>
+    /// Gets the top right corner of this entity.
+    /// </summary>
+    // ------------------------------------------------------------------
+    public virtual Point TopRightCorner {
+      get {
+        return new Point(
+            Rectangle.Right,
+            Rectangle.Top);
+      }
+    }
+
+    // ------------------------------------------------------------------
+    /// <summary>
+    /// Gets the bottom left corner of this entity.
+    /// </summary>
+    // ------------------------------------------------------------------
+    public virtual Point BottomLeftCorner {
+      get {
+        return new Point(
+            Rectangle.Left,
+            Rectangle.Bottom);
+      }
+    }
+
+    // ------------------------------------------------------------------
+    /// <summary>
+    /// Gets the bottom right corner of this entity.
+    /// </summary>
+    // ------------------------------------------------------------------
+    public virtual Point BottomRightCorner {
+      get {
+        return new Point(
+            Rectangle.Right,
+            Rectangle.Bottom);
+      }
+    }
+
+    // ------------------------------------------------------------------
+    /// <summary>
+    /// Gets the center point of the paintable entity (the center of the
+    /// Rectangle).
+    /// </summary>
+    /// <value>Point</value>
+    // ------------------------------------------------------------------
+    public virtual Point Center {
+      get {
+        // Make sure the bounds are legal first.
+        if ((this.mRectangle == null) ||
+            (this.mRectangle == Rectangle.Empty)) {
+          return Point.Empty;
+        }
+
+        int x =
+            (this.mRectangle.Left) +
+            (this.mRectangle.Width / 2);
+
+        int y =
+            (this.mRectangle.Top) +
+            (this.mRectangle.Height / 2);
+        return new Point(x, y);
+      }
+    }
+
+    // ------------------------------------------------------------------
+    /// <summary>
+    /// Gets the center of the bottom edge of the bounding rectangle.
+    /// </summary>
+    // ------------------------------------------------------------------
+    public virtual Point BottomCenter {
+      get {
+        return new Point(
+            BottomLeftCorner.X + (mRectangle.Width / 2),
+            BottomLeftCorner.Y);
+      }
+    }
+
+    // ------------------------------------------------------------------
+    /// <summary>
+    /// Gets the center of the top edge of the bounding rectangle.
+    /// </summary>
+    // ------------------------------------------------------------------
+    public virtual Point TopCenter {
+      get {
+        return new Point(
+            TopLeftCorner.X + (mRectangle.Width / 2),
+            TopLeftCorner.Y);
+      }
+    }
+
+    #endregion
+
+    // ------------------------------------------------------------------
+    /// <summary>
+    /// Gets or sets whether the entity is selected
+    /// </summary>
+    // ------------------------------------------------------------------
+    [Browsable(false)]
+    public virtual bool IsSelected {
+      get {
+        return mIsSelected;
+      }
+      set {
+        mIsSelected = value;
+        if (value == true) {
+          this.RaiseOnSelect(this, new EntityEventArgs(this));
+        }
+      }
+    }
+
+    // ------------------------------------------------------------------
+    /// <summary>
+    /// Gets or sets the current magnification used by the view.
+    /// </summary>
+    // ------------------------------------------------------------------
+    public virtual SizeF Magnification {
+      get {
+        return mMagnification;
+      }
+      set {
+        mMagnification = value;
+      }
+    }
+
+    // ------------------------------------------------------------------
+    /// <summary>
+    /// Gets or sets the canvas to which the entity belongs.
+    /// </summary>
+    // ------------------------------------------------------------------
+    [Browsable(false)]
+    public virtual IModel Model {
+      get {
+        return mModel;
+      }
+      set {
+        mModel = value;
+      }
+    }
+
+    // ------------------------------------------------------------------
+    /// <summary>
+    /// Gets or sets the ILayer this entity is attached to in the IModel.
+    /// </summary>
+    // ------------------------------------------------------------------
+    public virtual ILayer Layer {
+      get {
+        return mLayer;
+      }
+      set {
+        mLayer = value;
+      }
+    }
+
+    #endregion
+
+    #region Constructor
+
+    // ------------------------------------------------------------------
+    /// <summary>
+    /// Constructor with the model of the entity.
+    /// </summary>
+    /// <param mName="model">IModel</param>
+    // ------------------------------------------------------------------
+    protected DiagramEntityBase(IModel model) {
+      this.mModel = model;
+      Initialize();
+    }
+
+    // ------------------------------------------------------------------
+    /// <summary>
+    /// The empty constructor is required to make deserialization work.
+    /// </summary>
+    // ------------------------------------------------------------------
+    protected DiagramEntityBase() {
+      Initialize();
+    }
+
+    #endregion
+
+    #region Methods
+
+    // ------------------------------------------------------------------
+    /// <summary>
+    /// Called after an entity is deleted.
+    /// </summary>
+    /// <param name="deleteCommand">DeleteCommand: The un/redoable command
+    /// that's part of the undo/redo mechanism.</param>
+    // ------------------------------------------------------------------
+    public virtual void OnAfterDelete(DeleteCommand deleteCommand) {
+    }
+
+    // ------------------------------------------------------------------
+    /// <summary>
+    /// Called before an entity is deleted.
+    /// </summary>
+    /// <param name="deleteCommand">DeleteCommand: The un/redoable command
+    /// that's part of the undo/redo mechanism.</param>
+    // ------------------------------------------------------------------
+    public virtual void OnBeforeDelete(DeleteCommand deleteCommand) {
+    }
+
+    // ------------------------------------------------------------------
+    /// <summary>
+    /// Called when a new DiagramEntityBase is instantiated.
+    /// </summary>
+    // ------------------------------------------------------------------
+    protected virtual void Initialize() {
+      PaintStyle = ArtPalette.GetDefaultPaintStyle();
+      PenStyle = ArtPalette.GetDefaultPenStyle();
+
+      mServices = new Dictionary<Type, IInteraction>();
+      mServices[typeof(IMouseListener)] = this;
+      mServices[typeof(IHoverListener)] = this;
+    }
+
+    // ------------------------------------------------------------------
+    /// <summary>
+    /// Generates a new Uid for this entity.
+    /// </summary>
+    /// <param name="recursive">if the Uid has to be changed recursively 
+    /// down to the sub-entities, set to true, otherwise false.</param>
+    // ------------------------------------------------------------------
+    public virtual void NewUid(bool recursive) {
+      this.mUid = Guid.NewGuid();
+      RaiseOnChange(this, new EntityEventArgs(this));
+    }
+
+    // ------------------------------------------------------------------
+    /// <summary>
+    /// Defines a mechanism for retrieving a service object; that is, an 
+    /// object that provides custom support to other objects.
+    /// </summary>
+    /// <param name="serviceType">An object that specifies the type of 
+    /// service object to get.</param>
+    /// <returns>
+    /// A service object of type serviceType.-or- null if there is no 
+    /// service object of type serviceType.
+    /// </returns>
+    // ------------------------------------------------------------------
+    public virtual object GetService(Type serviceType) {
+      if (Services.ContainsKey(serviceType)) {
+        return Services[serviceType];
+      } else {
+        return null;
+      }
+    }
+
+    // ------------------------------------------------------------------
+    /// <summary>
+    /// Paints the entity on the control
+    /// </summary>
+    /// <param mName="g">the graphics object to paint on</param>
+    // ------------------------------------------------------------------
+    public abstract void Paint(Graphics g);
+
+    // ------------------------------------------------------------------
+    /// <summary>
+    /// Tests whether the entity is hit by the mouse
+    /// </summary>
+    /// <param>a Point location</param>
+    /// <param name="p"></param>
+    // ------------------------------------------------------------------
+    public abstract bool Hit(Point p);
+
+    // ------------------------------------------------------------------
+    /// <summary>
+    /// Invalidates the entity
+    /// </summary>
+    // ------------------------------------------------------------------
+    public abstract void Invalidate();
+
+    // ------------------------------------------------------------------
+    /// <summary>
+    /// Called when the entity is detached from the canvas (temporarily
+    /// removed but not disposed, like in a cut operation).
+    /// </summary>
+    // ------------------------------------------------------------------
+    public virtual void Detached(ILayer layer) {
+      mLayer = null;
+    }
+
+    // ------------------------------------------------------------------
+    /// <summary>
+    /// Called when the entity is attached to a Layer.
+    /// </summary>
+    // ------------------------------------------------------------------
+    public virtual void Attached(ILayer layer) {
+      mLayer = layer;
+    }
+
+    // ------------------------------------------------------------------
+    /// <summary>
+    /// Invalidates a rectangle of the canvas
+    /// </summary>
+    /// <param name="rectangle"></param>
+    // ------------------------------------------------------------------
+    public virtual void Invalidate(Rectangle rectangle) {
+      if (Model != null)
+        Model.RaiseOnInvalidateRectangle(rectangle);
+    }
+
+    // ------------------------------------------------------------------
+    /// <summary>
+    /// Updates pens and brushes
+    /// </summary>
+    // ------------------------------------------------------------------
+    protected virtual void UpdatePaintingMaterial() {
+      // First make sure we have a valid rectangle.
+      if (mRectangle.Width == 0) {
+        mRectangle.Width = 1;
+      }
+
+      if (mRectangle.Height == 0) {
+        mRectangle.Height = 1;
+      }
+
+      if (mPenStyle != null) {
+        mPen = mPenStyle.DrawingPen();
+      }
+
+      if (mPaintStyle != null) {
+        mBrush = mPaintStyle.GetBrush(this.Rectangle);
+      }
+
+      Invalidate();
+    }
+
+    // ------------------------------------------------------------------
+    /// <summary>
+    /// Moves the entity on the canvas
+    /// </summary>
+    /// <param mName="p">the shifting vector, not an absolute 
+    /// position!</param>
+    // ------------------------------------------------------------------
+    public abstract void MoveBy(Point p);
+
+    // ------------------------------------------------------------------
+    /// <summary>
+    /// The custom elements to be added to the menu on a per-entity basis.
+    /// </summary>
+    /// <returns>ToolStripItem[]</returns>
+    // ------------------------------------------------------------------
+    public abstract ToolStripItem[] Menu();
+
+    #region Raisers
+
+    // ------------------------------------------------------------------
+    /// <summary>
+    /// Raises the onclick event.
+    /// </summary>
+    /// <param name="e"></param>
+    // ------------------------------------------------------------------
+    public virtual void RaiseOnClick(EntityEventArgs e) {
+      if (OnClick != null)
+        OnClick(this, e);
+    }
+
+    // ------------------------------------------------------------------
+    /// <summary>
+    /// Raises the OnMouseDown event.
+    /// </summary>
+    /// <param name="e">EntityMouseEventArgs</param>
+    // ------------------------------------------------------------------
+    public virtual void RaiseOnMouseDown(EntityMouseEventArgs e) {
+      if (OnMouseDown != null) {
+        OnMouseDown(this, e);
+      }
+    }
+
+    // ------------------------------------------------------------------
+    /// <summary>
+    /// Raises the OnMouseUp event.
+    /// </summary>
+    /// <param name="e">EntityMouseEventArgs</param>
+    // ------------------------------------------------------------------
+    public virtual void RaiseOnMouseUp(EntityMouseEventArgs e) {
+      if (OnMouseUp != null) {
+        OnMouseUp(this, e);
+      }
+    }
+
+    // ------------------------------------------------------------------
+    /// <summary>
+    /// Raises the OnMouseMove event.
+    /// </summary>
+    /// <param name="e">EntityMouseEventArgs</param>
+    // ------------------------------------------------------------------
+    public virtual void RaiseOnMouseMove(EntityMouseEventArgs e) {
+      if (OnMouseMove != null) {
+        OnMouseMove(this, e);
+      }
+    }
+
+    // ------------------------------------------------------------------
+    /// <summary>
+    /// Raises the OnMouseEnter event.
+    /// </summary>
+    /// <param name="e">EntityMouseEventArgs</param>
+    // ------------------------------------------------------------------
+    public virtual void RaiseOnMouseEnter(EntityMouseEventArgs e) {
+      if (OnMouseEnter != null) {
+        OnMouseEnter(this, e);
+      }
+    }
+
+    // ------------------------------------------------------------------
+    /// <summary>
+    /// Raises the OnMouseEnter event.
+    /// </summary>
+    /// <param name="e">EntityMouseEventArgs</param>
+    // ------------------------------------------------------------------
+    public virtual void RaiseOnMouseHover(EntityMouseEventArgs e) {
+      if (OnMouseHover != null) {
+        OnMouseHover(this, e);
+      }
+    }
+
+    // ------------------------------------------------------------------
+    /// <summary>
+    /// Raises the OnMouseLeave event.
+    /// </summary>
+    /// <param name="e">EntityMouseEventArgs</param>
+    // ------------------------------------------------------------------
+    public virtual void RaiseOnMouseLeave(EntityMouseEventArgs e) {
+      if (OnMouseLeave != null) {
+        OnMouseLeave(this, e);
+      }
+    }
+
+    // ------------------------------------------------------------------
+    /// <summary>
+    /// Raises the OnSelect event.
+    /// </summary>
+    /// <param name="sender">The sender.</param>
+    /// <param name="e">The 
+    /// <see cref="T:Netron.Diagramming.Core.EntityEventArgs"/> instance 
+    /// containing the event data.</param>
+    // ------------------------------------------------------------------
+    protected virtual void RaiseOnSelect(
+        object sender,
+        EntityEventArgs e) {
+      if (OnEntitySelect != null) {
+        OnEntitySelect(sender, e);
+      }
+    }
+
+    // ------------------------------------------------------------------
+    /// <summary>
+    /// Raises the OnChange event.
+    /// </summary>
+    /// <param name="sender">The sender.</param>
+    /// <param name="e">The 
+    /// <see cref="T:Netron.Diagramming.Core.EntityEventArgs"/> instance 
+    /// containing the event data.</param>
+    // ------------------------------------------------------------------
+    protected virtual void RaiseOnChange(object sender, EntityEventArgs e) {
+      if (OnEntityChange != null)
+        OnEntityChange(sender, e);
+    }
+
+    #endregion
+
+    #endregion
+
+    #region Standard IDispose implementation
+    /// <summary>
+    /// Disposes the entity.
+    /// </summary>
+    public void Dispose() {
+      Dispose(true);
+      GC.SuppressFinalize(this);
+
+
+    }
+
+    /// <summary>
+    /// Disposes the entity.
+    /// </summary>
+    /// <param name="disposing">if set to <c>true</c> [disposing].</param>
+    protected virtual void Dispose(bool disposing) {
+      if (disposing) {
+        #region free managed resources
+
+
+        if (mPen != null) {
+          mPen.Dispose();
+          mPen = null;
+        }
+        if (mBrush != null) {
+          mBrush.Dispose();
+          mBrush = null;
+        }
         #endregion
-
-        #region Fields
-
-        // ------------------------------------------------------------------
-        /// <summary>
-        /// Implementation of IVersion - the current version of 
-        /// DiagramEntityBase.
-        /// </summary>
-        // ------------------------------------------------------------------
-        protected const double diagramEntityBaseVersion = 1.0;
-
-        // ------------------------------------------------------------------
-        /// <summary>
-        /// The services of this entity.
-        /// </summary>
-        // ------------------------------------------------------------------
-        protected Dictionary<Type, IInteraction> mServices;
-
-        // ------------------------------------------------------------------
-        /// <summary>
-        /// The Rectangle on which any bundle lives.
-        /// </summary>
-        // ------------------------------------------------------------------
-        protected Rectangle mRectangle = Rectangle.Empty;
-
-        // ------------------------------------------------------------------
-        /// <summary>
-        /// General prupose tag
-        /// </summary>
-        // ------------------------------------------------------------------
-        protected object mTag;
-
-        // ------------------------------------------------------------------
-        /// <summary>
-        /// tells whether the current entity is hovered by the mouse
-        /// </summary>
-        // ------------------------------------------------------------------
-        protected bool mHovered;
-
-        // ------------------------------------------------------------------
-        /// <summary>
-        /// The current magnification of the view.
-        /// </summary>
-        // ------------------------------------------------------------------
-        protected SizeF mMagnification = new SizeF(100F, 100F);
-
-        // ------------------------------------------------------------------
-        /// <summary>
-        /// The Model to which the eneity belongs.
-        /// </summary>
-        // ------------------------------------------------------------------
-        protected IModel mModel;
-
-        // ------------------------------------------------------------------
-        /// <summary>
-        /// The layer to which this entity is attached in the Model.
-        /// </summary>
-        // ------------------------------------------------------------------
-        protected ILayer mLayer;
-
-        // ------------------------------------------------------------------
-        /// <summary>
-        /// tells whether the entity is selected
-        /// </summary>
-        // ------------------------------------------------------------------
-        protected bool mIsSelected;
-
-        // ------------------------------------------------------------------
-        /// <summary>
-        /// the current draw style
-        /// </summary>
-        // ------------------------------------------------------------------
-        protected IPenStyle mPenStyle;
-
-        // ------------------------------------------------------------------
-        /// <summary>
-        /// the current paint style
-        /// </summary>
-        // ------------------------------------------------------------------
-        protected IPaintStyle mPaintStyle;
-
-        // ------------------------------------------------------------------
-        /// <summary>
-        /// the default pen to be used by the Paint method
-        /// </summary>
-        // ------------------------------------------------------------------
-        protected Pen mPen;
-
-        // ------------------------------------------------------------------
-        /// <summary>
-        /// the default brush to be used by the Paint method
-        /// </summary>
-        // ------------------------------------------------------------------
-        protected Brush mBrush;
-
-        // ------------------------------------------------------------------
-        /// <summary>
-        /// the name of the entity
-        /// </summary>
-        // ------------------------------------------------------------------
-        protected string mName;
-
-        // ------------------------------------------------------------------
-        /// <summary>
-        /// a weak reference to the parent
-        /// </summary>
-        // ------------------------------------------------------------------
-        protected WeakReference mParent;
-
-        // ------------------------------------------------------------------
-        /// <summary>
-        /// the scene index, i.e. the index of this entity in the scene-graph.
-        /// </summary>
-        // ------------------------------------------------------------------
-        protected int mSceneIndex;
-
-        // ------------------------------------------------------------------
-        /// <summary>
-        /// The top-group to underneath which this entity resides.
-        /// </summary>
-        // ------------------------------------------------------------------
-        protected IGroup mGroup;
-
-        // ------------------------------------------------------------------
-        /// <summary>
-        /// Specifies if the entity can be moved.
-        /// </summary>
-        // ------------------------------------------------------------------
-        protected bool mAllowMove = true;
-
-        // ------------------------------------------------------------------
-        /// <summary>
-        /// Specifies if the entity can be deleted.
-        /// </summary>
-        // ------------------------------------------------------------------
-        protected bool mAllowDelete = true;
-
-        // ------------------------------------------------------------------
-        /// <summary>
-        /// Specifies if the entity can be resized.
-        /// </summary>
-        // ------------------------------------------------------------------
-        protected bool mResizable = true;
-
-        // ------------------------------------------------------------------
-        /// <summary>
-        /// The minimum size this entity can be.  The default value is:
-        /// width = 10, height = 10.  This seems to be the min size that
-        /// keeps the connectors relative position correct during a Transform.
-        /// </summary>
-        // ------------------------------------------------------------------
-        protected Size myMinSize = new Size(10, 10);
-
-        // ------------------------------------------------------------------
-        /// <summary>
-        /// The maximum size this entity can be.  The default value is:
-        /// width = 10000, height = 10000.
-        /// </summary>
-        // ------------------------------------------------------------------
-        protected Size myMaxSize = new Size(10000, 10000);
-
-        // ------------------------------------------------------------------
-        /// <summary>
-        /// The unique identifier of this entity
-        /// </summary>
-        // ------------------------------------------------------------------
-        protected Guid mUid = Guid.NewGuid();
-
-        // ------------------------------------------------------------------
-        /// <summary>
-        /// whether the entity is visible
-        /// </summary>
-        // ------------------------------------------------------------------
-        protected bool mVisible = true;
-
-        // ------------------------------------------------------------------
-        /// <summary>
-        /// The Enabled field.
-        /// </summary>
-        // ------------------------------------------------------------------
-        protected bool mEnabled = true;
-        
-        #endregion
-
-        #region Properties
-
-        // ------------------------------------------------------------------
-        /// <summary>
-        /// Gets the current version.
-        /// </summary>
-        // ------------------------------------------------------------------
-        public virtual double Version
-        {
-            get
-            {
-                return diagramEntityBaseVersion;
-            }
-        }
-
-        // ------------------------------------------------------------------
-        /// <summary>
-        /// Gets the services provided by this entity.
-        /// </summary>
-        /// <value>The services.</value>
-        // ------------------------------------------------------------------
-        public Dictionary<Type, IInteraction> Services
-        {
-            get { return mServices; }
-        }
-
-        // ------------------------------------------------------------------
-        /// <summary>
-        /// Gets or sets whether this entity is Enabled.
-        /// </summary>
-        // ------------------------------------------------------------------
-        public virtual bool Enabled
-        {
-            get 
-            { 
-                return mEnabled; 
-            }
-            set 
-            { 
-                mEnabled = value;
-                RaiseOnChange(this, new EntityEventArgs(this));
-            }
-        }
-
-        // ------------------------------------------------------------------
-        /// <summary>
-        /// Gets or sets a value indicating whether this entity is visible.
-        /// </summary>
-        /// <value><c>true</c> if visible; otherwise, <c>false</c>.</value>
-        // ------------------------------------------------------------------
-        public virtual bool Visible
-        {
-            get 
-            { 
-                return mVisible; 
-            }
-            set 
-            {
-                mVisible = value;
-                RaiseOnChange(this, new EntityEventArgs(this));
-            }
-        }
-
-        // ------------------------------------------------------------------
-        /// <summary>
-        /// Gets or sets the drawing style.
-        /// </summary>
-        /// <value>The draw style.</value>
-        // ------------------------------------------------------------------
-        public virtual IPenStyle PenStyle
-        {
-            get 
-            { 
-                return mPenStyle; 
-            }
-            set 
-            {
-                mPenStyle = value;
-                RaiseOnChange(this, new EntityEventArgs(this));
-                UpdatePaintingMaterial();
-            }
-        }
-
-        // ------------------------------------------------------------------
-        /// <summary>
-        /// Gets or sets the paint style.
-        /// </summary>
-        /// <value>The paint style.</value>
-        // ------------------------------------------------------------------
-        public virtual IPaintStyle PaintStyle
-        {
-            get 
-            { 
-                return mPaintStyle; 
-            }
-            set 
-            {
-                mPaintStyle = value;
-                RaiseOnChange(this, new EntityEventArgs(this));
-                UpdatePaintingMaterial();
-            }
-        }
-
-        // ------------------------------------------------------------------
-        /// <summary>
-        /// Gets the globally unique identifier of this entity
-        /// </summary>
-        /// <value></value>
-        // ------------------------------------------------------------------
-        public virtual Guid Uid
-        {
-            get
-            {
-                return mUid;
-            }
-
-        }
-
-        // ------------------------------------------------------------------
-        /// <summary>
-        /// Gets or sets a value indicating whether this 
-        /// <see cref="IDiagramEntity"/> can be moved.
-        /// </summary>
-        /// <value><c>true</c> if movable; otherwise, <c>false</c>.</value>
-        // ------------------------------------------------------------------
-        public virtual bool AllowMove 
-        {
-            get
-            {
-                return mAllowMove;
-            }
-            set
-            {
-                mAllowMove = value;
-            }
-        }
-
-        // ------------------------------------------------------------------
-        /// <summary>
-        /// Gets or sets a value indicating whether this 
-        /// <see cref="IDiagramEntity"/> can be deleted.
-        /// </summary>
-        /// <value><c>true</c> if deletable; otherwise, <c>false</c>.</value>
-        // ------------------------------------------------------------------
-        public virtual bool AllowDelete
-        {
-            get
-            {
-                return mAllowDelete;
-            }
-            set
-            {
-                mAllowDelete = value;
-            }
-        }
-
-        // ------------------------------------------------------------------
-        /// <summary>
-        /// Gets or sets the Resizable
-        /// </summary>
-        // ------------------------------------------------------------------
-        public virtual bool Resizable
-        {
-            get 
-            { 
-                return mResizable; 
-            }
-            set 
-            {
-                mResizable = value;
-            }
-        }
-
-        // ------------------------------------------------------------------
-        /// <summary>
-        /// Gets the minimum size of the entity.
-        /// </summary>
-        // ------------------------------------------------------------------
-        public virtual Size MinSize
-        {
-            get 
-            { 
-                return myMinSize; 
-            }
-        }
-
-        // ------------------------------------------------------------------
-        /// <summary>
-        /// Gets the maximum size of the entity.
-        /// </summary>
-        // ------------------------------------------------------------------
-        public virtual Size MaxSize
-        {
-            get
-            {
-                return myMaxSize;
-            }
-        }
-
-        // ------------------------------------------------------------------
-        /// <summary>
-        /// Gets the <see cref="Brush"/> to paint this entity.
-        /// </summary>
-        // ------------------------------------------------------------------
-        public virtual Brush Brush
-        {
-            get 
-            { 
-                return mBrush; 
-            }
-        }
-
-        // ------------------------------------------------------------------
-        /// <summary>
-        /// Gets the pen to draw this entity.
-        /// </summary>
-        /// <value>The pen.</value>
-        // ------------------------------------------------------------------
-        public virtual Pen Pen
-        {
-            get 
-            { 
-                return mPen; 
-            }
-        }
-
-        // ------------------------------------------------------------------
-        /// <summary>
-        /// Gets the friendly name of the entity to be displayed in the UI.
-        /// </summary>
-        /// <value></value>
-        // ------------------------------------------------------------------
-        public abstract string EntityName 
-        { 
-            get;
-        }
-
-        // ------------------------------------------------------------------
-        /// <summary>
-        /// Gets or sets the general purpose tag
-        /// </summary>
-        // ------------------------------------------------------------------
-        public virtual object Tag
-        {
-            get 
-            { 
-                return mTag; 
-            }
-            set 
-            {
-                mTag = value;
-            }
-        }
-
-        // ------------------------------------------------------------------
-        /// <summary>
-        /// Gets or sets the index of this entity in the scene-graph.
-        /// </summary>
-        /// <value>The index of the scene.</value>
-        // ------------------------------------------------------------------
-        public virtual int SceneIndex
-        {
-            get 
-            { 
-                return mSceneIndex; 
-            }
-            set 
-            {
-                mSceneIndex = value;
-            }
-        }
-
-        // ------------------------------------------------------------------
-        /// <summary>
-        /// Gets or sets the unique top-group to which this entity belongs.
-        /// </summary>
-        /// <value></value>
-        // ------------------------------------------------------------------
-        public virtual IGroup Group
-        {
-            get 
-            { 
-                return mGroup; 
-            }
-            set
-            {
-                mGroup = value;
-                // Propagate downwards if this is a group shape, but not if 
-                // the value is 'null' since the group becomes the value of 
-                // the Group property.  Note that we could have used a formal 
-                // depth-traversal algorithm.
-                if (this is IGroup)
-                {
-                    if (value == null)//occurs on an ungroup action
-                    {
-                        foreach (IDiagramEntity entity in 
-                            (this as IGroup).Entities)
-                        {
-                            entity.Group = this as IGroup;
-                        }
-                    }
-                    else //occurs when grouping
-                    {
-                        foreach (IDiagramEntity entity in 
-                            (this as IGroup).Entities)
-                        {
-                            entity.Group = value;
-                        }
-                    }
-                }
-
-            }
-        }
-
-        // ------------------------------------------------------------------
-        /// <summary>
-        /// Gets or sets whether the entity is hovered by the mouse
-        /// </summary>
-        // ------------------------------------------------------------------
-        public virtual bool Hovered
-        {
-            get 
-            { 
-                return mHovered; 
-            }
-            set
-            {
-                mHovered = value;
-                Invalidate();
-            }
-        }
-
-        // ------------------------------------------------------------------
-        /// <summary>
-        /// Gets or sets the parent of the entity
-        /// </summary>
-        // ------------------------------------------------------------------
-        public virtual object Parent
-        {
-            get
-            {
-                if (mParent != null && mParent.IsAlive)
-                {
-                    return mParent.Target;
-                }
-                else
-                {
-                    return null;
-                }
-            }
-            set
-            {
-                mParent = new WeakReference(value);
-                RaiseOnChange(this, new EntityEventArgs(this));
-            }
-        }
-
-        // ------------------------------------------------------------------
-        /// <summary>
-        /// Gets or sets the name of the entity
-        /// </summary>
-        // ------------------------------------------------------------------
-        public virtual string Name
-        {
-            get 
-            { 
-                return mName; 
-            }
-            set 
-            {
-                mName = value;
-                RaiseOnChange(this, new EntityEventArgs(this));
-            }
-        }
-
-        #region Bounds and point calculations
-
-        // ------------------------------------------------------------------
-        /// <summary>
-        /// Gets the bounds of the paintable entity.
-        /// </summary>
-        /// <value></value>
-        // ------------------------------------------------------------------
-        public abstract Rectangle Rectangle 
-        { 
-            get; 
-        }
-
-        // ------------------------------------------------------------------
-        /// <summary>
-        /// Gets the top left corner of this entity, which is the same as
-        /// 'Rectangle.Location'.
-        /// </summary>
-        // ------------------------------------------------------------------
-        public virtual Point TopLeftCorner
-        {
-            get
-            {                
-                return this.Rectangle.Location;
-            }
-        }
-
-        // ------------------------------------------------------------------
-        /// <summary>
-        /// Gets the top right corner of this entity.
-        /// </summary>
-        // ------------------------------------------------------------------
-        public virtual Point TopRightCorner
-        {
-            get
-            {
-                return new Point(
-                    Rectangle.Right,
-                    Rectangle.Top);
-            }
-        }
-
-        // ------------------------------------------------------------------
-        /// <summary>
-        /// Gets the bottom left corner of this entity.
-        /// </summary>
-        // ------------------------------------------------------------------
-        public virtual Point BottomLeftCorner
-        {
-            get
-            {
-                return new Point(
-                    Rectangle.Left,
-                    Rectangle.Bottom);
-            }
-        }
-
-        // ------------------------------------------------------------------
-        /// <summary>
-        /// Gets the bottom right corner of this entity.
-        /// </summary>
-        // ------------------------------------------------------------------
-        public virtual Point BottomRightCorner
-        {
-            get
-            {
-                return new Point(
-                    Rectangle.Right,
-                    Rectangle.Bottom);
-            }
-        }
-
-        // ------------------------------------------------------------------
-        /// <summary>
-        /// Gets the center point of the paintable entity (the center of the
-        /// Rectangle).
-        /// </summary>
-        /// <value>Point</value>
-        // ------------------------------------------------------------------
-        public virtual Point Center
-        {
-            get
-            {
-                // Make sure the bounds are legal first.
-                if ((this.mRectangle == null) ||
-                    (this.mRectangle == Rectangle.Empty))
-                {
-                    return Point.Empty;
-                }
-
-                int x =
-                    (this.mRectangle.Left) +
-                    (this.mRectangle.Width / 2);
-
-                int y =
-                    (this.mRectangle.Top) +
-                    (this.mRectangle.Height / 2);
-                return new Point(x, y);
-            }
-        }
-
-        // ------------------------------------------------------------------
-        /// <summary>
-        /// Gets the center of the bottom edge of the bounding rectangle.
-        /// </summary>
-        // ------------------------------------------------------------------
-        public virtual Point BottomCenter
-        {
-            get
-            {
-                return new Point(
-                    BottomLeftCorner.X + (mRectangle.Width / 2),
-                    BottomLeftCorner.Y);
-            }
-        }
-
-        // ------------------------------------------------------------------
-        /// <summary>
-        /// Gets the center of the top edge of the bounding rectangle.
-        /// </summary>
-        // ------------------------------------------------------------------
-        public virtual Point TopCenter
-        {
-            get
-            {
-                return new Point(
-                    TopLeftCorner.X + (mRectangle.Width / 2),
-                    TopLeftCorner.Y);
-            }
-        }
-
-        #endregion
-
-        // ------------------------------------------------------------------
-        /// <summary>
-        /// Gets or sets whether the entity is selected
-        /// </summary>
-        // ------------------------------------------------------------------
-        [Browsable(false)]
-        public virtual bool IsSelected
-        {
-            get 
-            { 
-                return mIsSelected; 
-            }
-            set 
-            {
-                mIsSelected = value;
-                if (value == true)
-                {
-                    this.RaiseOnSelect(this, new EntityEventArgs(this));
-                }
-            }
-        }
-
-        // ------------------------------------------------------------------
-        /// <summary>
-        /// Gets or sets the current magnification used by the view.
-        /// </summary>
-        // ------------------------------------------------------------------
-        public virtual SizeF Magnification
-        {
-            get
-            {
-                return mMagnification;
-            }
-            set
-            {
-                mMagnification = value;
-            }
-        }
-
-        // ------------------------------------------------------------------
-        /// <summary>
-        /// Gets or sets the canvas to which the entity belongs.
-        /// </summary>
-        // ------------------------------------------------------------------
-        [Browsable(false)]
-        public virtual IModel Model
-        {
-            get 
-            { 
-                return mModel; 
-            }
-            set 
-            {
-                mModel = value;
-            }
-        }
-
-        // ------------------------------------------------------------------
-        /// <summary>
-        /// Gets or sets the ILayer this entity is attached to in the IModel.
-        /// </summary>
-        // ------------------------------------------------------------------
-        public virtual ILayer Layer
-        {
-            get
-            {
-                return mLayer;
-            }
-            set
-            {
-                mLayer = value;
-            }
-        }
-
-        #endregion
-
-        #region Constructor
-
-        // ------------------------------------------------------------------
-        /// <summary>
-        /// Constructor with the model of the entity.
-        /// </summary>
-        /// <param mName="model">IModel</param>
-        // ------------------------------------------------------------------
-        protected DiagramEntityBase(IModel model)
-        {
-            this.mModel = model;
-            Initialize();
-        }
-
-        // ------------------------------------------------------------------
-        /// <summary>
-        /// The empty constructor is required to make deserialization work.
-        /// </summary>
-        // ------------------------------------------------------------------
-        protected DiagramEntityBase()
-        {
-            Initialize();
-        }  
-      
-        #endregion
-
-        #region Methods
-
-        // ------------------------------------------------------------------
-        /// <summary>
-        /// Called after an entity is deleted.
-        /// </summary>
-        /// <param name="deleteCommand">DeleteCommand: The un/redoable command
-        /// that's part of the undo/redo mechanism.</param>
-        // ------------------------------------------------------------------
-        public virtual void OnAfterDelete(DeleteCommand deleteCommand)
-        {
-        }
-
-        // ------------------------------------------------------------------
-        /// <summary>
-        /// Called before an entity is deleted.
-        /// </summary>
-        /// <param name="deleteCommand">DeleteCommand: The un/redoable command
-        /// that's part of the undo/redo mechanism.</param>
-        // ------------------------------------------------------------------
-        public virtual void OnBeforeDelete(DeleteCommand deleteCommand)
-        {
-        }
-
-        // ------------------------------------------------------------------
-        /// <summary>
-        /// Called when a new DiagramEntityBase is instantiated.
-        /// </summary>
-        // ------------------------------------------------------------------
-        protected virtual void Initialize()
-        {
-            PaintStyle = ArtPalette.GetDefaultPaintStyle();
-            PenStyle = ArtPalette.GetDefaultPenStyle();
-
-            mServices = new Dictionary<Type, IInteraction>();
-            mServices[typeof(IMouseListener)] = this;
-            mServices[typeof(IHoverListener)] = this;
-        }
-
-        // ------------------------------------------------------------------
-        /// <summary>
-        /// Generates a new Uid for this entity.
-        /// </summary>
-        /// <param name="recursive">if the Uid has to be changed recursively 
-        /// down to the sub-entities, set to true, otherwise false.</param>
-        // ------------------------------------------------------------------
-        public virtual void NewUid(bool recursive)
-        {
-            this.mUid = Guid.NewGuid();
-            RaiseOnChange(this, new EntityEventArgs(this));
-        }
-
-        // ------------------------------------------------------------------
-        /// <summary>
-        /// Defines a mechanism for retrieving a service object; that is, an 
-        /// object that provides custom support to other objects.
-        /// </summary>
-        /// <param name="serviceType">An object that specifies the type of 
-        /// service object to get.</param>
-        /// <returns>
-        /// A service object of type serviceType.-or- null if there is no 
-        /// service object of type serviceType.
-        /// </returns>
-        // ------------------------------------------------------------------
-        public virtual object GetService(Type serviceType)
-        {
-            if (Services.ContainsKey(serviceType))
-            {
-                return Services[serviceType];
-            }
-            else
-            {
-                return null;
-            }
-        }
-
-        // ------------------------------------------------------------------
-        /// <summary>
-        /// Paints the entity on the control
-        /// </summary>
-        /// <param mName="g">the graphics object to paint on</param>
-        // ------------------------------------------------------------------
-        public abstract void Paint(Graphics g);
-
-        // ------------------------------------------------------------------
-        /// <summary>
-        /// Tests whether the entity is hit by the mouse
-        /// </summary>
-        /// <param>a Point location</param>
-        /// <param name="p"></param>
-        // ------------------------------------------------------------------
-        public abstract bool Hit(Point p);
-
-        // ------------------------------------------------------------------
-        /// <summary>
-        /// Invalidates the entity
-        /// </summary>
-        // ------------------------------------------------------------------
-        public abstract void Invalidate();
-
-        // ------------------------------------------------------------------
-        /// <summary>
-        /// Called when the entity is detached from the canvas (temporarily
-        /// removed but not disposed, like in a cut operation).
-        /// </summary>
-        // ------------------------------------------------------------------
-        public virtual void Detached(ILayer layer) 
-        {
-            mLayer = null;
-        }
-
-        // ------------------------------------------------------------------
-        /// <summary>
-        /// Called when the entity is attached to a Layer.
-        /// </summary>
-        // ------------------------------------------------------------------
-        public virtual void Attached(ILayer layer)
-        {
-            mLayer = layer;
-        }
-
-        // ------------------------------------------------------------------
-        /// <summary>
-        /// Invalidates a rectangle of the canvas
-        /// </summary>
-        /// <param name="rectangle"></param>
-        // ------------------------------------------------------------------
-        public virtual void Invalidate(Rectangle rectangle)
-        {
-            if (Model != null)
-                Model.RaiseOnInvalidateRectangle(rectangle);
-        }
-
-        // ------------------------------------------------------------------
-        /// <summary>
-        /// Updates pens and brushes
-        /// </summary>
-        // ------------------------------------------------------------------
-        protected virtual void UpdatePaintingMaterial()        
-        {
-            // First make sure we have a valid rectangle.
-            if (mRectangle.Width == 0)
-            {
-                mRectangle.Width = 1;
-            }
-
-            if (mRectangle.Height == 0)
-            {
-                mRectangle.Height = 1;
-            }
-
-            if (mPenStyle != null)
-            {
-                mPen = mPenStyle.DrawingPen();
-            }
-
-            if (mPaintStyle != null)
-            {
-                mBrush = mPaintStyle.GetBrush(this.Rectangle);
-            }
-
-            Invalidate();
-        }
-
-        // ------------------------------------------------------------------
-        /// <summary>
-        /// Moves the entity on the canvas
-        /// </summary>
-        /// <param mName="p">the shifting vector, not an absolute 
-        /// position!</param>
-        // ------------------------------------------------------------------
-        public abstract void MoveBy(Point p);
-
-        // ------------------------------------------------------------------
-        /// <summary>
-        /// The custom elements to be added to the menu on a per-entity basis.
-        /// </summary>
-        /// <returns>ToolStripItem[]</returns>
-        // ------------------------------------------------------------------
-        public abstract ToolStripItem[] Menu();
-
-        #region Raisers
-
-        // ------------------------------------------------------------------
-        /// <summary>
-        /// Raises the onclick event.
-        /// </summary>
-        /// <param name="e"></param>
-        // ------------------------------------------------------------------
-        public virtual void RaiseOnClick(EntityEventArgs e)
-        {
-            if (OnClick != null)
-                OnClick(this, e);
-        }
-
-        // ------------------------------------------------------------------
-        /// <summary>
-        /// Raises the OnMouseDown event.
-        /// </summary>
-        /// <param name="e">EntityMouseEventArgs</param>
-        // ------------------------------------------------------------------
-        public virtual void RaiseOnMouseDown(EntityMouseEventArgs e)
-        {
-            if (OnMouseDown != null)
-            {
-                OnMouseDown(this, e);
-            }
-        }
-
-        // ------------------------------------------------------------------
-        /// <summary>
-        /// Raises the OnMouseUp event.
-        /// </summary>
-        /// <param name="e">EntityMouseEventArgs</param>
-        // ------------------------------------------------------------------
-        public virtual void RaiseOnMouseUp(EntityMouseEventArgs e)
-        {
-            if (OnMouseUp != null)
-            {
-                OnMouseUp(this, e);
-            }
-        }
-
-        // ------------------------------------------------------------------
-        /// <summary>
-        /// Raises the OnMouseMove event.
-        /// </summary>
-        /// <param name="e">EntityMouseEventArgs</param>
-        // ------------------------------------------------------------------
-        public virtual void RaiseOnMouseMove(EntityMouseEventArgs e)
-        {
-            if (OnMouseMove != null)
-            {
-                OnMouseMove(this, e);
-            }
-        }
-
-        // ------------------------------------------------------------------
-        /// <summary>
-        /// Raises the OnMouseEnter event.
-        /// </summary>
-        /// <param name="e">EntityMouseEventArgs</param>
-        // ------------------------------------------------------------------
-        public virtual void RaiseOnMouseEnter(EntityMouseEventArgs e)
-        {
-            if (OnMouseEnter != null)
-            {
-                OnMouseEnter(this, e);
-            }
-        }
-
-        // ------------------------------------------------------------------
-        /// <summary>
-        /// Raises the OnMouseEnter event.
-        /// </summary>
-        /// <param name="e">EntityMouseEventArgs</param>
-        // ------------------------------------------------------------------
-        public virtual void RaiseOnMouseHover(EntityMouseEventArgs e)
-        {
-            if (OnMouseHover != null)
-            {
-                OnMouseHover(this, e);
-            }
-        }
-
-        // ------------------------------------------------------------------
-        /// <summary>
-        /// Raises the OnMouseLeave event.
-        /// </summary>
-        /// <param name="e">EntityMouseEventArgs</param>
-        // ------------------------------------------------------------------
-        public virtual void RaiseOnMouseLeave(EntityMouseEventArgs e)
-        {
-            if (OnMouseLeave != null)
-            {
-                OnMouseLeave(this, e);
-            }
-        }
-
-        // ------------------------------------------------------------------
-        /// <summary>
-        /// Raises the OnSelect event.
-        /// </summary>
-        /// <param name="sender">The sender.</param>
-        /// <param name="e">The 
-        /// <see cref="T:Netron.Diagramming.Core.EntityEventArgs"/> instance 
-        /// containing the event data.</param>
-        // ------------------------------------------------------------------
-        protected virtual void RaiseOnSelect(
-            object sender, 
-            EntityEventArgs e)
-        {
-            if (OnEntitySelect != null)
-            {
-                OnEntitySelect(sender, e);
-            }
-        }
-
-        // ------------------------------------------------------------------
-        /// <summary>
-        /// Raises the OnChange event.
-        /// </summary>
-        /// <param name="sender">The sender.</param>
-        /// <param name="e">The 
-        /// <see cref="T:Netron.Diagramming.Core.EntityEventArgs"/> instance 
-        /// containing the event data.</param>
-        // ------------------------------------------------------------------
-        protected virtual void RaiseOnChange(object sender, EntityEventArgs e)
-        {
-            if (OnEntityChange != null)
-                OnEntityChange(sender, e);
-        } 
-
-        #endregion
-
-        #endregion
-
-        #region Standard IDispose implementation
-        /// <summary>
-        /// Disposes the entity.
-        /// </summary>
-        public void Dispose()
-        {
-            Dispose(true);
-            GC.SuppressFinalize(this);
-
-
-        }
-
-        /// <summary>
-        /// Disposes the entity.
-        /// </summary>
-        /// <param name="disposing">if set to <c>true</c> [disposing].</param>
-        protected virtual void Dispose(bool disposing)
-        {
-            if (disposing)
-            {
-                #region free managed resources
-
-
-                if (mPen != null)
-                {
-                    mPen.Dispose();
-                    mPen = null;
-                }
-                if (mBrush != null)
-                {
-                    mBrush.Dispose();
-                    mBrush = null;
-                }
-                #endregion
-            }
-
-        }
-
-        #endregion
-        
-        #region IMouseListener Members
-
-        // ------------------------------------------------------------------
-        /// <summary>
-        /// Implementation of the <see cref="IMouseListener"/>.  This is
-        /// the method called when a mouse button is pressed while over this 
-        /// entity.
-        /// </summary>
-        /// <param name="e">The 
-        /// <see cref="T:System.Windows.Forms.MouseEventArgs"/> instance 
-        /// containing the event data.</param>
-        /// <returns>bool: Whether or not the mouse down was handled by this
-        /// entity.  The default here is false.  Sub-entities should override
-        /// this to provide their own functionality if needed.</returns>
-        // ------------------------------------------------------------------
-        public virtual bool MouseDown(MouseEventArgs e)
-        {
-            this.RaiseOnMouseDown(new EntityMouseEventArgs(this, e));
-
-            // By default we're not handling the mouse down event here,
-            // we're just passing it on.  Let the sub-entities handle it 
-            // by overriding this method.
-            return false;
-        }
-
-        // ------------------------------------------------------------------
-        /// <summary>
-        /// Implementation of the <see cref="IMouseListener"/>.  This is
-        /// the method called when the mouse is moved while over this 
-        /// entity.
-        /// </summary>
-        /// <param name="e">The 
-        /// <see cref="T:System.Windows.Forms.MouseEventArgs"/> instance 
-        /// containing the event data.</param>
-        // ------------------------------------------------------------------
-        public virtual void MouseMove(MouseEventArgs e)
-        {
-            this.RaiseOnMouseMove(new EntityMouseEventArgs(this, e));
-        }
-
-        // ------------------------------------------------------------------
-        /// <summary>
-        /// Implementation of the <see cref="IMouseListener"/>.  This is
-        /// the method called when a mouse button is released while over this 
-        /// entity.
-        /// </summary>
-        /// <param name="e">The 
-        /// <see cref="T:System.Windows.Forms.MouseEventArgs"/> instance 
-        /// containing the event data.</param>
-        // ------------------------------------------------------------------
-        public virtual void MouseUp(MouseEventArgs e)
-        {
-            this.RaiseOnMouseUp(new EntityMouseEventArgs(this, e));
-        }
-
-        #endregion
-
-        #region IHoverListener Members
-
-        // ------------------------------------------------------------------
-        /// <summary>
-        /// Implementation of the <see cref="IHoverListener"/>.  This is
-        /// the method called when the mouse hovers over this entity.
-        /// </summary>
-        /// <param name="e">The 
-        /// <see cref="T:System.Windows.Forms.MouseEventArgs"/> instance 
-        /// containing the event data.</param>
-        // ------------------------------------------------------------------
-        public virtual void MouseHover(MouseEventArgs e)
-        {
-            this.RaiseOnMouseHover(new EntityMouseEventArgs(this, e));
-        }
-
-        // ------------------------------------------------------------------
-        /// <summary>
-        /// Implementation of the <see cref="IHoverListener"/>.  This is
-        /// the method called when the mouse enters this entity.
-        /// </summary>
-        /// <param name="e">The 
-        /// <see cref="T:System.Windows.Forms.MouseEventArgs"/> instance 
-        /// containing the event data.</param>
-        // ------------------------------------------------------------------
-        public virtual void MouseEnter(MouseEventArgs e)
-        {
-            this.RaiseOnMouseEnter(new EntityMouseEventArgs(this, e));
-        }
-
-        // ------------------------------------------------------------------
-        /// <summary>
-        /// Implementation of the <see cref="IHoverListener"/>.  This is
-        /// the method called when the mouse leaves this entity.
-        /// </summary>
-        /// <param name="e">The 
-        /// <see cref="T:System.Windows.Forms.MouseEventArgs"/> instance 
-        /// containing the event data.</param>
-        // ------------------------------------------------------------------
-        public virtual void MouseLeave(MouseEventArgs e)
-        {
-            this.RaiseOnMouseLeave(new EntityMouseEventArgs(this, e));
-        }
-
-        #endregion
-
-        #region IKeyboardListener Members
-
-        // ------------------------------------------------------------------
-        /// <summary>
-        /// Implementation of the <see cref="IKeyboardListener"/>.  This is
-        /// the method called when a key is pressed down.
-        /// </summary>
-        /// <param name="e">The 
-        /// <see cref="T:System.Windows.Forms.KeyEventArgs"/> instance 
-        /// containing the event data.</param>
-        // ------------------------------------------------------------------
-        public virtual void KeyDown(KeyEventArgs e)
-        {
-        }
-
-        // ------------------------------------------------------------------
-        /// <summary>
-        /// Implementation of the <see cref="IKeyboardListener"/>.  This is
-        /// the method called when a key is released.
-        /// </summary>
-        /// <param name="e">The 
-        /// <see cref="T:System.Windows.Forms.KeyEventArgs"/> instance 
-        /// containing the event data.</param>
-        // ------------------------------------------------------------------
-        public virtual void KeyUp(KeyEventArgs e)
-        {
-        }
-
-        // ------------------------------------------------------------------
-        /// <summary>
-        /// Implementation of the <see cref="IKeyboardListener"/>.  This is
-        /// the method called when a key is pressed.
-        /// </summary>
-        /// <param name="e">The 
-        /// <see cref="T:System.Windows.Forms.KeyPressEventArgs"/> instance 
-        /// containing the event data.</param>
-        // ------------------------------------------------------------------
-        public virtual void KeyPress(KeyPressEventArgs e)
-        {
-        }
-
-        #endregion
-    }
+      }
+
+    }
+
+    #endregion
+
+    #region IMouseListener Members
+
+    // ------------------------------------------------------------------
+    /// <summary>
+    /// Implementation of the <see cref="IMouseListener"/>.  This is
+    /// the method called when a mouse button is pressed while over this 
+    /// entity.
+    /// </summary>
+    /// <param name="e">The 
+    /// <see cref="T:System.Windows.Forms.MouseEventArgs"/> instance 
+    /// containing the event data.</param>
+    /// <returns>bool: Whether or not the mouse down was handled by this
+    /// entity.  The default here is false.  Sub-entities should override
+    /// this to provide their own functionality if needed.</returns>
+    // ------------------------------------------------------------------
+    public virtual bool MouseDown(MouseEventArgs e) {
+      this.RaiseOnMouseDown(new EntityMouseEventArgs(this, e));
+
+      // By default we're not handling the mouse down event here,
+      // we're just passing it on.  Let the sub-entities handle it 
+      // by overriding this method.
+      return false;
+    }
+
+    // ------------------------------------------------------------------
+    /// <summary>
+    /// Implementation of the <see cref="IMouseListener"/>.  This is
+    /// the method called when the mouse is moved while over this 
+    /// entity.
+    /// </summary>
+    /// <param name="e">The 
+    /// <see cref="T:System.Windows.Forms.MouseEventArgs"/> instance 
+    /// containing the event data.</param>
+    // ------------------------------------------------------------------
+    public virtual void MouseMove(MouseEventArgs e) {
+      this.RaiseOnMouseMove(new EntityMouseEventArgs(this, e));
+    }
+
+    // ------------------------------------------------------------------
+    /// <summary>
+    /// Implementation of the <see cref="IMouseListener"/>.  This is
+    /// the method called when a mouse button is released while over this 
+    /// entity.
+    /// </summary>
+    /// <param name="e">The 
+    /// <see cref="T:System.Windows.Forms.MouseEventArgs"/> instance 
+    /// containing the event data.</param>
+    // ------------------------------------------------------------------
+    public virtual void MouseUp(MouseEventArgs e) {
+      this.RaiseOnMouseUp(new EntityMouseEventArgs(this, e));
+    }
+
+    #endregion
+
+    #region IHoverListener Members
+
+    // ------------------------------------------------------------------
+    /// <summary>
+    /// Implementation of the <see cref="IHoverListener"/>.  This is
+    /// the method called when the mouse hovers over this entity.
+    /// </summary>
+    /// <param name="e">The 
+    /// <see cref="T:System.Windows.Forms.MouseEventArgs"/> instance 
+    /// containing the event data.</param>
+    // ------------------------------------------------------------------
+    public virtual void MouseHover(MouseEventArgs e) {
+      this.RaiseOnMouseHover(new EntityMouseEventArgs(this, e));
+    }
+
+    // ------------------------------------------------------------------
+    /// <summary>
+    /// Implementation of the <see cref="IHoverListener"/>.  This is
+    /// the method called when the mouse enters this entity.
+    /// </summary>
+    /// <param name="e">The 
+    /// <see cref="T:System.Windows.Forms.MouseEventArgs"/> instance 
+    /// containing the event data.</param>
+    // ------------------------------------------------------------------
+    public virtual void MouseEnter(MouseEventArgs e) {
+      this.RaiseOnMouseEnter(new EntityMouseEventArgs(this, e));
+    }
+
+    // ------------------------------------------------------------------
+    /// <summary>
+    /// Implementation of the <see cref="IHoverListener"/>.  This is
+    /// the method called when the mouse leaves this entity.
+    /// </summary>
+    /// <param name="e">The 
+    /// <see cref="T:System.Windows.Forms.MouseEventArgs"/> instance 
+    /// containing the event data.</param>
+    // ------------------------------------------------------------------
+    public virtual void MouseLeave(MouseEventArgs e) {
+      this.RaiseOnMouseLeave(new EntityMouseEventArgs(this, e));
+    }
+
+    #endregion
+
+    #region IKeyboardListener Members
+
+    // ------------------------------------------------------------------
+    /// <summary>
+    /// Implementation of the <see cref="IKeyboardListener"/>.  This is
+    /// the method called when a key is pressed down.
+    /// </summary>
+    /// <param name="e">The 
+    /// <see cref="T:System.Windows.Forms.KeyEventArgs"/> instance 
+    /// containing the event data.</param>
+    // ------------------------------------------------------------------
+    public virtual void KeyDown(KeyEventArgs e) {
+    }
+
+    // ------------------------------------------------------------------
+    /// <summary>
+    /// Implementation of the <see cref="IKeyboardListener"/>.  This is
+    /// the method called when a key is released.
+    /// </summary>
+    /// <param name="e">The 
+    /// <see cref="T:System.Windows.Forms.KeyEventArgs"/> instance 
+    /// containing the event data.</param>
+    // ------------------------------------------------------------------
+    public virtual void KeyUp(KeyEventArgs e) {
+    }
+
+    // ------------------------------------------------------------------
+    /// <summary>
+    /// Implementation of the <see cref="IKeyboardListener"/>.  This is
+    /// the method called when a key is pressed.
+    /// </summary>
+    /// <param name="e">The 
+    /// <see cref="T:System.Windows.Forms.KeyPressEventArgs"/> instance 
+    /// containing the event data.</param>
+    // ------------------------------------------------------------------
+    public virtual void KeyPress(KeyPressEventArgs e) {
+    }
+
+    #endregion
+  }
 }
Index: /trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.Netron/3.0.2672.12446/Netron.Diagramming.Core-3.0.2672.12446/BaseClasses/Shape.cs
===================================================================
--- /trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.Netron/3.0.2672.12446/Netron.Diagramming.Core-3.0.2672.12446/BaseClasses/Shape.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.Netron/3.0.2672.12446/Netron.Diagramming.Core-3.0.2672.12446/BaseClasses/Shape.cs	(revision 4068)
@@ -1,248 +1,209 @@
 using System;
-using System.Collections.Generic;
-using System.Text;
+using System.Drawing;
 using System.Drawing.Drawing2D;
-using System.Drawing;
-
-namespace Netron.Diagramming.Core
-{
-    public class Shape : ShapeBase
-    {
-        // ------------------------------------------------------------------
-        /// <summary>
-        /// The collection of shapes.
-        /// </summary>
-        // ------------------------------------------------------------------
-        CollectionBase<IDiagramEntity> myEntities;
-
-        // ------------------------------------------------------------------
-        /// <summary>
-        /// Gets the friendly name of this shape.
-        /// </summary>
-        // ------------------------------------------------------------------
-        public override string EntityName
-        {
-            get 
-            {
-                return "Shape";
-            }
+
+namespace Netron.Diagramming.Core {
+  public class Shape : ShapeBase {
+    // ------------------------------------------------------------------
+    /// <summary>
+    /// The collection of shapes.
+    /// </summary>
+    // ------------------------------------------------------------------
+    CollectionBase<IDiagramEntity> myEntities;
+
+    // ------------------------------------------------------------------
+    /// <summary>
+    /// Gets the friendly name of this shape.
+    /// </summary>
+    // ------------------------------------------------------------------
+    public override string EntityName {
+      get {
+        return "Shape";
+      }
+    }
+
+    // ------------------------------------------------------------------
+    /// <summary>
+    /// Gets or set the owned shapes.
+    /// </summary>
+    // ------------------------------------------------------------------
+    public CollectionBase<IDiagramEntity> Entities {
+      get {
+        return myEntities;
+      }
+      set {
+        myEntities = value;
+      }
+    }
+
+    public virtual GraphicsPath GraphicsPath {
+      get {
+        GraphicsPath path = new GraphicsPath();
+        path.AddRectangle(mRectangle);
+        return path;
+      }
+    }
+
+    // ------------------------------------------------------------------
+    /// <summary>
+    /// Default constructor.
+    /// </summary>
+    // ------------------------------------------------------------------
+    public Shape()
+      : base() {
+    }
+
+    // ------------------------------------------------------------------
+    /// <summary>
+    /// Constructor that receives the model this shape belongs to.
+    /// </summary>
+    /// <param name="model">IModel</param>
+    // ------------------------------------------------------------------
+    public Shape(IModel model)
+      : base(model) {
+    }
+
+    protected override void Initialize() {
+      base.Initialize();
+      myEntities = new CollectionBase<IDiagramEntity>();
+      AttachEventsToShapeCollection();
+    }
+
+    protected virtual void AttachEventsToShapeCollection() {
+      myEntities.OnClear += new EventHandler(OnEntitiesClear);
+      myEntities.OnItemAdded +=
+          new EventHandler<CollectionEventArgs<IDiagramEntity>>(
+          OnEntityAdded);
+      myEntities.OnItemRemoved +=
+          new EventHandler<CollectionEventArgs<IDiagramEntity>>(
+          OnEntityRemoved);
+    }
+
+    void OnEntityRemoved(object sender, CollectionEventArgs<IDiagramEntity> e) {
+      CalculateRectangle();
+    }
+
+    void OnEntityAdded(object sender, CollectionEventArgs<IDiagramEntity> e) {
+      if (myEntities.Count == 1) {
+        mRectangle = e.Item.Rectangle;
+      } else {
+        mRectangle = Rectangle.Union(
+            (Rectangle)mRectangle,
+            e.Item.Rectangle);
+      }
+    }
+
+    void OnEntitiesClear(object sender, EventArgs e) {
+      mRectangle = Rectangle.Empty;
+    }
+
+    // ------------------------------------------------------------------
+    /// <summary>
+    /// Calculates the bounding rectangle of this shape from all children.
+    /// </summary>
+    // ------------------------------------------------------------------
+    public void CalculateRectangle() {
+      if (myEntities == null || myEntities.Count == 0)
+        return;
+      Rectangle rec = myEntities[0].Rectangle;
+      foreach (IDiagramEntity entity in Entities) {
+        //cascade the calculation if necessary
+        if (entity is IGroup) (entity as IGroup).CalculateRectangle();
+
+        rec = Rectangle.Union(rec, entity.Rectangle);
+      }
+      this.mRectangle = rec;
+      this.mRectangle.Inflate(20, 20);
+    }
+
+    // ------------------------------------------------------------------
+    /// <summary>
+    /// Tests whether the group is hit by the mouse
+    /// </summary>
+    /// <param name="p">Point</param>
+    /// <returns>bool</returns>
+    // ------------------------------------------------------------------
+    public override bool Hit(Point p) {
+      foreach (IDiagramEntity entity in myEntities) {
+        if (entity.Hit(p)) {
+          return true;
         }
-
-        // ------------------------------------------------------------------
-        /// <summary>
-        /// Gets or set the owned shapes.
-        /// </summary>
-        // ------------------------------------------------------------------
-        public CollectionBase<IDiagramEntity> Entities
-        {
-            get
-            {
-                return myEntities;
-            }
-            set
-            {
-                myEntities = value;
-            }
+      }
+      return false;
+    }
+
+    // ------------------------------------------------------------------
+    /// <summary>
+    /// Invalidates the entity
+    /// </summary>
+    // ------------------------------------------------------------------
+    public override void Invalidate() {
+
+      if (mRectangle == null)
+        return;
+
+      Rectangle rec = mRectangle;
+      rec.Inflate(20, 20);
+      Model.RaiseOnInvalidateRectangle(rec);
+    }
+
+    // ------------------------------------------------------------------
+    /// <summary>
+    /// Moves the entity on the canvas
+    /// </summary>
+    /// <param name="p">Point</param>
+    // ------------------------------------------------------------------
+    public override void MoveBy(Point p) {
+
+      Rectangle recBefore = mRectangle;
+      recBefore.Inflate(20, 20);
+
+      // No need to invalidate since it'll be done by the individual 
+      // move actions.
+      foreach (IDiagramEntity entity in myEntities) {
+        entity.MoveBy(p);
+      }
+      mRectangle.X += p.X;
+      mRectangle.Y += p.Y;
+
+      //refresh things
+      this.Invalidate(recBefore);//position before the move
+      this.Invalidate();//current position
+
+    }
+
+    public override void Paint(Graphics g) {
+      base.Paint(g);
+
+      GraphicsPath path = GraphicsPath;
+      if (PaintStyle != null) {
+        g.FillPath(mPaintStyle.GetBrush(mRectangle), path);
+      }
+
+      if (Hovered) {
+        g.DrawPath(ArtPalette.HighlightPen, path);
+      } else if (PenStyle != null) {
+        g.DrawPath(mPenStyle.DrawingPen(), path);
+      }
+
+      foreach (IDiagramEntity entity in myEntities) {
+        entity.Paint(g);
+      }
+    }
+
+    public override bool MouseDown(System.Windows.Forms.MouseEventArgs e) {
+      bool result = base.MouseDown(e);
+
+      foreach (IDiagramEntity entity in myEntities) {
+        if (entity.Hit(e.Location)) {
+          this.Model.Selection.SelectedItems.Add(entity);
+          if (entity.MouseDown(e)) {
+            result = true;
+          }
         }
-
-        public virtual GraphicsPath GraphicsPath
-        {
-            get
-            {
-                GraphicsPath path = new GraphicsPath();
-                path.AddRectangle(mRectangle);
-                return path;
-            }
-        }
-
-        // ------------------------------------------------------------------
-        /// <summary>
-        /// Default constructor.
-        /// </summary>
-        // ------------------------------------------------------------------
-        public Shape()
-            : base()
-        {
-        }
-
-        // ------------------------------------------------------------------
-        /// <summary>
-        /// Constructor that receives the model this shape belongs to.
-        /// </summary>
-        /// <param name="model">IModel</param>
-        // ------------------------------------------------------------------
-        public Shape(IModel model)
-            : base(model)
-        {
-        }
-
-        protected override void Initialize()
-        {
-            base.Initialize();
-            myEntities = new CollectionBase<IDiagramEntity>();
-            AttachEventsToShapeCollection();
-        }
-
-        protected virtual void AttachEventsToShapeCollection()
-        {
-            myEntities.OnClear += new EventHandler(OnEntitiesClear);
-            myEntities.OnItemAdded +=
-                new EventHandler<CollectionEventArgs<IDiagramEntity>>(
-                OnEntityAdded);
-            myEntities.OnItemRemoved +=
-                new EventHandler<CollectionEventArgs<IDiagramEntity>>(
-                OnEntityRemoved);
-        }
-
-        void OnEntityRemoved(object sender, CollectionEventArgs<IDiagramEntity> e)
-        {
-            CalculateRectangle();
-        }
-
-        void OnEntityAdded(object sender, CollectionEventArgs<IDiagramEntity> e)
-        {
-            if (myEntities.Count == 1)
-            {
-                mRectangle = e.Item.Rectangle;
-            }
-            else
-            {
-                mRectangle = Rectangle.Union(
-                    (Rectangle)mRectangle,
-                    e.Item.Rectangle);
-            }
-        }
-
-        void OnEntitiesClear(object sender, EventArgs e)
-        {
-            mRectangle = Rectangle.Empty;
-        }
-
-        // ------------------------------------------------------------------
-        /// <summary>
-        /// Calculates the bounding rectangle of this shape from all children.
-        /// </summary>
-        // ------------------------------------------------------------------
-        public void CalculateRectangle()
-        {
-            if (myEntities == null || myEntities.Count == 0)
-                return;
-            Rectangle rec = myEntities[0].Rectangle;
-            foreach (IDiagramEntity entity in Entities)
-            {
-                //cascade the calculation if necessary
-                if (entity is IGroup) (entity as IGroup).CalculateRectangle();
-
-                rec = Rectangle.Union(rec, entity.Rectangle);
-            }
-            this.mRectangle = rec;
-            this.mRectangle.Inflate(20, 20);
-        }
-
-        // ------------------------------------------------------------------
-        /// <summary>
-        /// Tests whether the group is hit by the mouse
-        /// </summary>
-        /// <param name="p">Point</param>
-        /// <returns>bool</returns>
-        // ------------------------------------------------------------------
-        public override bool Hit(Point p)
-        {
-            foreach (IDiagramEntity entity in myEntities)
-            {
-                if (entity.Hit(p))
-                {
-                    return true;
-                }
-            }
-            return false;
-        }
-
-        // ------------------------------------------------------------------
-        /// <summary>
-        /// Invalidates the entity
-        /// </summary>
-        // ------------------------------------------------------------------
-        public override void Invalidate()
-        {
-
-            if (mRectangle == null)
-                return;
-
-            Rectangle rec = mRectangle;
-            rec.Inflate(20, 20);
-            Model.RaiseOnInvalidateRectangle(rec);
-        }
-
-        // ------------------------------------------------------------------
-        /// <summary>
-        /// Moves the entity on the canvas
-        /// </summary>
-        /// <param name="p">Point</param>
-        // ------------------------------------------------------------------
-        public override void MoveBy(Point p)
-        {
-
-            Rectangle recBefore = mRectangle;
-            recBefore.Inflate(20, 20);
-
-            // No need to invalidate since it'll be done by the individual 
-            // move actions.
-            foreach (IDiagramEntity entity in myEntities)
-            {
-                entity.MoveBy(p);
-            }
-            mRectangle.X += p.X;
-            mRectangle.Y += p.Y;
-
-            //refresh things
-            this.Invalidate(recBefore);//position before the move
-            this.Invalidate();//current position
-
-        }     
-
-        public override void Paint(Graphics g)
-        {
-            base.Paint(g);
-
-            GraphicsPath path = GraphicsPath;
-            if (PaintStyle != null)
-            {
-                g.FillPath(mPaintStyle.GetBrush(mRectangle), path);
-            }
-
-            if (Hovered)
-            {
-                g.DrawPath(ArtPalette.HighlightPen, path);
-            }
-            else if (PenStyle != null)
-            {
-                g.DrawPath(mPenStyle.DrawingPen(), path);
-            }
-
-            foreach (IDiagramEntity entity in myEntities)
-            {
-                entity.Paint(g);
-            }
-        }
-
-        public override bool MouseDown(System.Windows.Forms.MouseEventArgs e)
-        {
-            bool result = base.MouseDown(e);
-
-            foreach (IDiagramEntity entity in myEntities)
-            {
-                if (entity.Hit(e.Location))
-                {
-                   this.Model.Selection.SelectedItems.Add(entity);
-                    if (entity.MouseDown(e))
-                    {
-                        result = true;
-                    }
-                }
-            }
-
-            return result;
-        }
-    }
+      }
+
+      return result;
+    }
+  }
 }
Index: /trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.Netron/3.0.2672.12446/Netron.Diagramming.Core-3.0.2672.12446/BaseClasses/ShapeBase.cs
===================================================================
--- /trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.Netron/3.0.2672.12446/Netron.Diagramming.Core-3.0.2672.12446/BaseClasses/ShapeBase.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.Netron/3.0.2672.12446/Netron.Diagramming.Core-3.0.2672.12446/BaseClasses/ShapeBase.cs	(revision 4068)
@@ -1,543 +1,484 @@
 using System;
-using System.Diagnostics;
+using System.ComponentModel;
 using System.Drawing;
-using System.ComponentModel;
 using System.Windows.Forms;
-using System.Drawing.Drawing2D;
-namespace Netron.Diagramming.Core
-{
-    // ----------------------------------------------------------------------
-    /// <summary>
-    /// Abstract base class for shapes.
-    /// </summary>
-    // ----------------------------------------------------------------------
-    public abstract partial class ShapeBase : DiagramEntityBase, IShape
-    {
-        #region Fields
-
-        // ------------------------------------------------------------------
-        /// <summary>
-        /// Implementation of IVersion - the current version of 
-        /// ShapeBase.
-        /// </summary>
-        // ------------------------------------------------------------------
-        protected const double shapeBaseVersion = 1.0;
-
-        // ------------------------------------------------------------------
-        /// <summary>
-        /// Specifies if connectors are drawn.
-        /// </summary>
-        // ------------------------------------------------------------------
-        protected bool mShowConnectors = true; 
-
-        // ------------------------------------------------------------------
-        /// <summary>
-        /// The collection of Connectors onto which you can attach a 
-        /// connection.
-        /// </summary>
-        // ------------------------------------------------------------------
-        protected CollectionBase<IConnector> mConnectors;
-
-        protected bool mIsFixed = false;
-
-        #endregion
-
-        #region Properties
-
-        // ------------------------------------------------------------------
-        /// <summary>
-        /// Gets the current version.
-        /// </summary>
-        // ------------------------------------------------------------------
-        public override double Version
-        {
-            get
-            {
-                return shapeBaseVersion;
-            }
+namespace Netron.Diagramming.Core {
+  // ----------------------------------------------------------------------
+  /// <summary>
+  /// Abstract base class for shapes.
+  /// </summary>
+  // ----------------------------------------------------------------------
+  public abstract partial class ShapeBase : DiagramEntityBase, IShape {
+    #region Fields
+
+    // ------------------------------------------------------------------
+    /// <summary>
+    /// Implementation of IVersion - the current version of 
+    /// ShapeBase.
+    /// </summary>
+    // ------------------------------------------------------------------
+    protected const double shapeBaseVersion = 1.0;
+
+    // ------------------------------------------------------------------
+    /// <summary>
+    /// Specifies if connectors are drawn.
+    /// </summary>
+    // ------------------------------------------------------------------
+    protected bool mShowConnectors = true;
+
+    // ------------------------------------------------------------------
+    /// <summary>
+    /// The collection of Connectors onto which you can attach a 
+    /// connection.
+    /// </summary>
+    // ------------------------------------------------------------------
+    protected CollectionBase<IConnector> mConnectors;
+
+    protected bool mIsFixed = false;
+
+    #endregion
+
+    #region Properties
+
+    // ------------------------------------------------------------------
+    /// <summary>
+    /// Gets the current version.
+    /// </summary>
+    // ------------------------------------------------------------------
+    public override double Version {
+      get {
+        return shapeBaseVersion;
+      }
+    }
+
+    // ------------------------------------------------------------------
+    /// <summary>
+    /// Gets the image for this shape when displaying in a library (i.e.
+    /// toolbox).
+    /// </summary>
+    // ------------------------------------------------------------------
+    public virtual Image LibraryImage {
+      get {
+        return null;
+      }
+    }
+
+    // ------------------------------------------------------------------
+    /// <summary>
+    /// Gets or sets if the connectors are drawn.
+    /// </summary>
+    // ------------------------------------------------------------------
+    public bool ShowConnectors {
+      get {
+        return this.mShowConnectors;
+      }
+      set {
+        bool oldValue = mShowConnectors;
+        this.mShowConnectors = value;
+        if (oldValue != value) {
+          Invalidate();
         }
-
-        // ------------------------------------------------------------------
-        /// <summary>
-        /// Gets the image for this shape when displaying in a library (i.e.
-        /// toolbox).
-        /// </summary>
-        // ------------------------------------------------------------------
-        public virtual Image LibraryImage
-        {
-            get
-            {
-                return null;
-            }
+        RaiseOnChange(this, new EntityEventArgs(this));
+      }
+    }
+
+    // ------------------------------------------------------------------
+    /// <summary>
+    /// Gets or sets the canvas to which the entity belongs
+    /// </summary>
+    /// <value></value>
+    // ------------------------------------------------------------------
+    public override IModel Model {
+      get {
+        return base.Model;
+      }
+      set {
+        base.Model = value;
+        if (Connectors == null)
+          throw new InconsistencyException("The connectors collection is 'null'.");
+        foreach (IConnector con in Connectors) {
+          con.Model = value;
         }
-
-        // ------------------------------------------------------------------
-        /// <summary>
-        /// Gets or sets if the connectors are drawn.
-        /// </summary>
-        // ------------------------------------------------------------------
-        public bool ShowConnectors
-        {
-            get
-            {
-                return this.mShowConnectors;
-            }
-            set
-            {
-                bool oldValue = mShowConnectors;
-                this.mShowConnectors = value;
-                if (oldValue != value)
-                {
-                    Invalidate();
-                }
-                RaiseOnChange(this, new EntityEventArgs(this));
-            }
+      }
+    }
+
+    // ------------------------------------------------------------------
+    /// <summary>
+    /// Gets or sets the Connectors attached to this shape.
+    /// </summary>		
+    // ------------------------------------------------------------------
+    public CollectionBase<IConnector> Connectors {
+      get { return mConnectors; }
+      set { mConnectors = value; }
+    }
+
+    // ------------------------------------------------------------------
+    /// <summary>
+    /// Gets or sets the width of the bundle
+    /// </summary>
+    // ------------------------------------------------------------------
+    [Browsable(true),
+    Description("The width of the shape"),
+    Category("Layout")]
+    public int Width {
+      get {
+        return this.mRectangle.Width;
+      }
+      set {
+        Transform(
+            this.Rectangle.X,
+            this.Rectangle.Y,
+            value,
+            this.Height);
+      }
+    }
+
+    // ------------------------------------------------------------------
+    /// <summary>
+    /// Gets or sets the height of the bundle
+    /// </summary>		
+    // ------------------------------------------------------------------
+    [Browsable(true),
+    Description("The height of the shape"),
+    Category("Layout")]
+    public int Height {
+      get {
+        return this.mRectangle.Height;
+      }
+      set {
+        Transform(
+            this.Rectangle.X,
+            this.Rectangle.Y,
+            this.Width,
+            value);
+      }
+    }
+
+    // ------------------------------------------------------------------
+    /// <summary>
+    /// the x-coordinate of the upper-left corner
+    /// </summary>
+    // ------------------------------------------------------------------
+    [Browsable(true),
+    Description("The x-coordinate of the upper-left corner"),
+    Category("Layout")]
+    public int X {
+      get {
+        return mRectangle.X;
+      }
+      set {
+        Point p = new Point(value - mRectangle.X, mRectangle.Y);
+        this.MoveBy(p);
+
+        //if(Model!=null)
+        //  Model.RaiseOnInvalidate(); //note that 'this.Invalidate()' will not be enough
+      }
+    }
+
+    // ------------------------------------------------------------------
+    /// <summary>
+    /// the y-coordinate of the upper-left corner
+    /// </summary>
+    // ------------------------------------------------------------------
+    [Browsable(true), Description("The y-coordinate of the upper-left corner"), Category("Layout")]
+    public int Y {
+      get {
+        return mRectangle.Y;
+      }
+      set {
+        Point p = new Point(mRectangle.X, value - mRectangle.Y);
+        this.MoveBy(p);
+        //Model.RaiseOnInvalidate();
+      }
+    }
+
+    // ------------------------------------------------------------------
+    /// <summary>
+    /// Gets or sets the location of the bundle;
+    /// </summary>
+    // ------------------------------------------------------------------
+    [Browsable(false)]
+    public Point Location {
+      get {
+        return new Point(this.mRectangle.X, this.mRectangle.Y);
+      }
+      set {
+        //we use the move method but it requires the delta value, not 
+        // an absolute position!
+        Point p = new Point(
+            value.X - mRectangle.X,
+            value.Y - mRectangle.Y);
+
+        // If you'd use this it would indeed move the bundle but not 
+        // the connectors of the bundle 
+        // this.mRectangle.X = value.X; this.mRectangle.Y = value.Y; Invalidate();
+        this.MoveBy(p);
+      }
+    }
+
+    // ------------------------------------------------------------------
+    /// <summary>
+    /// Gets the bounds of the paintable entity
+    /// </summary>
+    /// <value></value>
+    // ------------------------------------------------------------------
+    public override Rectangle Rectangle {
+      get {
+        return mRectangle;
+      }
+      //set{mRectangle = value;
+
+      //this.Invalidate();              }
+    }
+
+    #endregion
+
+    #region Constructor
+
+
+    /// <summary>
+    /// Constructor with the site of the bundle
+    /// </summary>
+    /// <param name="model"></param>
+    protected ShapeBase(IModel model)
+      : base(model) {
+    }
+
+    /// <summary>
+    /// Initializes a new instance of the <see cref="T:ShapeBase"/> class.
+    /// </summary>
+    protected ShapeBase()
+      : base() {
+    }
+
+    /// <summary>
+    /// Inits this instance.
+    /// </summary>
+    protected override void Initialize() {
+      base.Initialize();
+      mConnectors = new CollectionBase<IConnector>();
+      mConnectors.OnItemAdded += new EventHandler<CollectionEventArgs<IConnector>>(mConnectors_OnItemAdded);
+      mRectangle = new Rectangle(0, 0, 100, 70);
+    }
+
+    #endregion
+
+    #region Methods
+
+    // ------------------------------------------------------------------
+    /// <summary>
+    /// Overrides the base 'OnBeforeDelete' to tell all attached
+    /// connectors they're being deleted.
+    /// </summary>
+    /// <param name="deleteCommand"></param>
+    // ------------------------------------------------------------------
+    public override void OnBeforeDelete(DeleteCommand deleteCommand) {
+      base.OnBeforeDelete(deleteCommand);
+      foreach (IConnector con in this.mConnectors) {
+        con.OnBeforeDelete(deleteCommand);
+      }
+    }
+
+    // ------------------------------------------------------------------
+    /// <summary>
+    /// Overrides the base 'OnAfterDelete' to tell all attached
+    /// connectors they have been deleted.
+    /// </summary>
+    /// <param name="deleteCommand"></param>
+    // ------------------------------------------------------------------
+    public override void OnAfterDelete(DeleteCommand deleteCommand) {
+      base.OnAfterDelete(deleteCommand);
+      foreach (IConnector con in this.mConnectors) {
+        con.OnAfterDelete(deleteCommand);
+      }
+    }
+
+    // ------------------------------------------------------------------
+    /// <summary>
+    /// Generates a new Uid for this entity.
+    /// </summary>
+    /// <param name="recursive">bool: If the Uid has to be changed  
+    /// recursively down to the sub-entities, set to true, otherwise 
+    /// false.</param>
+    // ------------------------------------------------------------------
+    public override void NewUid(bool recursive) {
+
+      if (recursive) {
+        foreach (IConnector connector in Connectors) {
+          connector.NewUid(recursive);
         }
-
-        // ------------------------------------------------------------------
-        /// <summary>
-        /// Gets or sets the canvas to which the entity belongs
-        /// </summary>
-        /// <value></value>
-        // ------------------------------------------------------------------
-        public override IModel Model
-        {
-            get
-            {
-                return base.Model;
-            }
-            set
-            {
-                base.Model = value;
-                if (Connectors == null)
-                    throw new InconsistencyException("The connectors collection is 'null'.");
-                foreach (IConnector con in Connectors)
-                {
-                    con.Model = value;
-                }
-            }
+        base.NewUid(recursive);
+      } else
+        base.NewUid(recursive);
+    }
+
+    // ------------------------------------------------------------------
+    /// <summary>
+    /// Part of the initialization, this method connects newly added 
+    /// connectors to the parenting shape.
+    /// </summary>
+    /// <param name="sender">object</param>
+    /// <param name="e">CollectionEventArgs<IConnector></param>
+    // ------------------------------------------------------------------
+    void mConnectors_OnItemAdded(
+        object sender,
+        CollectionEventArgs<IConnector> e) {
+      e.Item.Parent = this;
+    }
+
+    // ------------------------------------------------------------------
+    /// <summary>
+    /// The custom menu to be added to the base menu of this entity.
+    /// 'null' is returned here.
+    /// </summary>
+    /// <returns>ToolStripItem[]</returns>
+    // ------------------------------------------------------------------
+    public override ToolStripItem[] Menu() {
+      return null;
+    }
+
+    // ------------------------------------------------------------------
+    /// <summary>
+    /// Returns the connector hit by the mouse, if any.
+    /// </summary>
+    /// <param name="p">Point: The mouse coordinates</param>
+    /// <returns>IConnector: The connector hit by the mouse</returns>
+    // ------------------------------------------------------------------
+    public IConnector HitConnector(Point p) {
+      for (int k = 0; k < mConnectors.Count; k++) {
+        if (mConnectors[k].Hit(p)) {
+          mConnectors[k].Hovered = true;
+          mConnectors[k].Invalidate();
+          return mConnectors[k];
+        } else {
+          mConnectors[k].Hovered = false;
+          mConnectors[k].Invalidate();
+
         }
 
-        // ------------------------------------------------------------------
-        /// <summary>
-        /// Gets or sets the Connectors attached to this shape.
-        /// </summary>		
-        // ------------------------------------------------------------------
-        public CollectionBase<IConnector> Connectors
-        {
-            get { return mConnectors; }
-            set { mConnectors = value; }
-        }
-
-        // ------------------------------------------------------------------
-        /// <summary>
-        /// Gets or sets the width of the bundle
-        /// </summary>
-        // ------------------------------------------------------------------
-        [Browsable(true), 
-        Description("The width of the shape"), 
-        Category("Layout")]
-        public int Width
-        {
-            get 
-            { 
-                return this.mRectangle.Width; 
-            }
-            set 
-            { 
-                Transform(
-                    this.Rectangle.X, 
-                    this.Rectangle.Y, 
-                    value,
-                    this.Height);
-            }
-        }
-
-        // ------------------------------------------------------------------
-        /// <summary>
-        /// Gets or sets the height of the bundle
-        /// </summary>		
-        // ------------------------------------------------------------------
-        [Browsable(true), 
-        Description("The height of the shape"), 
-        Category("Layout")]
-        public int Height
-        {
-            get 
-            { 
-                return this.mRectangle.Height; 
-            }
-            set
-            {
-                Transform(
-                    this.Rectangle.X, 
-                    this.Rectangle.Y, 
-                    this.Width,
-                    value);
-            }
-        }
-
-        // ------------------------------------------------------------------
-        /// <summary>
-        /// the x-coordinate of the upper-left corner
-        /// </summary>
-        // ------------------------------------------------------------------
-        [Browsable(true), 
-        Description("The x-coordinate of the upper-left corner"), 
-        Category("Layout")]
-        public int X
-        {
-            get 
-            { 
-                return mRectangle.X; 
-            }
-            set
-            {
-                Point p = new Point(value - mRectangle.X, mRectangle.Y);
-                this.MoveBy(p);
-
-                //if(Model!=null)
-                //  Model.RaiseOnInvalidate(); //note that 'this.Invalidate()' will not be enough
-            }
-        }
-
-        // ------------------------------------------------------------------
-        /// <summary>
-        /// the y-coordinate of the upper-left corner
-        /// </summary>
-        // ------------------------------------------------------------------
-        [Browsable(true), Description("The y-coordinate of the upper-left corner"), Category("Layout")]
-        public int Y
-        {
-            get 
-            { 
-                return mRectangle.Y;
-            }
-            set
-            {
-                Point p = new Point(mRectangle.X, value - mRectangle.Y);
-                this.MoveBy(p);
-                //Model.RaiseOnInvalidate();
-            }
-        }
-
-        // ------------------------------------------------------------------
-        /// <summary>
-        /// Gets or sets the location of the bundle;
-        /// </summary>
-        // ------------------------------------------------------------------
-        [Browsable(false)]
-        public Point Location
-        {
-            get 
-            { 
-                return new Point(this.mRectangle.X, this.mRectangle.Y); 
-            }
-            set
-            {
-                //we use the move method but it requires the delta value, not 
-                // an absolute position!
-                Point p = new Point(
-                    value.X - mRectangle.X, 
-                    value.Y - mRectangle.Y);
-
-                // If you'd use this it would indeed move the bundle but not 
-                // the connectors of the bundle 
-                // this.mRectangle.X = value.X; this.mRectangle.Y = value.Y; Invalidate();
-                this.MoveBy(p);
-            }
-        }
-
-        // ------------------------------------------------------------------
-        /// <summary>
-        /// Gets the bounds of the paintable entity
-        /// </summary>
-        /// <value></value>
-        // ------------------------------------------------------------------
-        public override Rectangle Rectangle
-        {
-            get 
-            {
-                return mRectangle; 
-            }
-            //set{mRectangle = value;
-
-            //this.Invalidate();              }
-        }        
-      
-        #endregion
-
-        #region Constructor
-
-
-        /// <summary>
-        /// Constructor with the site of the bundle
-        /// </summary>
-        /// <param name="model"></param>
-        protected ShapeBase(IModel model)
-            : base(model)
-        {
-        }
-
-        /// <summary>
-        /// Initializes a new instance of the <see cref="T:ShapeBase"/> class.
-        /// </summary>
-        protected ShapeBase()
-            : base()
-        {
-        }
-
-        /// <summary>
-        /// Inits this instance.
-        /// </summary>
-        protected override void Initialize()
-        {
-            base.Initialize();
-            mConnectors = new CollectionBase<IConnector>();
-            mConnectors.OnItemAdded += new EventHandler<CollectionEventArgs<IConnector>>(mConnectors_OnItemAdded);
-            mRectangle = new Rectangle(0, 0, 100, 70);
-        }
-
-        #endregion
-
-        #region Methods
-
-        // ------------------------------------------------------------------
-        /// <summary>
-        /// Overrides the base 'OnBeforeDelete' to tell all attached
-        /// connectors they're being deleted.
-        /// </summary>
-        /// <param name="deleteCommand"></param>
-        // ------------------------------------------------------------------
-        public override void OnBeforeDelete(DeleteCommand deleteCommand)
-        {
-            base.OnBeforeDelete(deleteCommand);
-            foreach (IConnector con in this.mConnectors)
-            {
-                con.OnBeforeDelete(deleteCommand);
-            }
-        }
-
-        // ------------------------------------------------------------------
-        /// <summary>
-        /// Overrides the base 'OnAfterDelete' to tell all attached
-        /// connectors they have been deleted.
-        /// </summary>
-        /// <param name="deleteCommand"></param>
-        // ------------------------------------------------------------------
-        public override void OnAfterDelete(DeleteCommand deleteCommand)
-        {
-            base.OnAfterDelete(deleteCommand);
-            foreach (IConnector con in this.mConnectors)
-            {
-                con.OnAfterDelete(deleteCommand);
-            }
-        }
-
-        // ------------------------------------------------------------------
-        /// <summary>
-        /// Generates a new Uid for this entity.
-        /// </summary>
-        /// <param name="recursive">bool: If the Uid has to be changed  
-        /// recursively down to the sub-entities, set to true, otherwise 
-        /// false.</param>
-        // ------------------------------------------------------------------
-        public override void NewUid(bool recursive)
-        {
+
+      }
+      return null;
+    }
+
+    // ------------------------------------------------------------------
+    /// <summary>
+    /// Overrides the abstract paint method.  Nothing performed here,
+    /// let the sub-shapes do the painting.
+    /// </summary>
+    /// <param name="g">a graphics object onto which to paint</param>
+    // ------------------------------------------------------------------
+    public override void Paint(Graphics g) {
+      return;
+    }
+
+    // ------------------------------------------------------------------
+    /// <summary>
+    /// Override the abstract Hit method.  Here a simple hit test is
+    /// performed by checking if our "Rectangle" contains the point
+    /// specified.  Override this to perform more complex hit testing.
+    /// </summary>
+    /// <param name="p">Point</param>
+    /// <returns>bool</returns>
+    // ------------------------------------------------------------------
+    public override bool Hit(Point p) {
+      Rectangle r = new Rectangle(p, new Size(5, 5));
+      return Rectangle.Contains(r);
+    }
+
+    // ------------------------------------------------------------------
+    /// <summary>
+    /// Overrides the abstract Invalidate method.  This shape's rectangle
+    /// is inflated (not permanently) by a size of (40, 40) to ensure
+    /// the whole area is refreshed.
+    /// </summary>
+    // ------------------------------------------------------------------
+    public override void Invalidate() {
+      Rectangle r = Rectangle;
+      r.Offset(-10, -10);
+      r.Inflate(40, 40);
+      if (Model != null) {
+        Model.RaiseOnInvalidateRectangle(r);
+      }
+    }
+
+    // ------------------------------------------------------------------
+    /// <summary>
+    /// Moves the entity with the given shift (offset).
+    /// </summary>
+    /// <param name="p">Represents a shift-vector, not the absolute 
+    /// position!</param>
+    // ------------------------------------------------------------------
+    public override void MoveBy(Point p) {
+      Rectangle recBefore = mRectangle;
+      recBefore.Inflate(20, 20);
+
+      this.mRectangle.X += p.X;
+      this.mRectangle.Y += p.Y;
+
+      UpdatePaintingMaterial();
+
+      for (int k = 0; k < this.mConnectors.Count; k++) {
+        mConnectors[k].MoveBy(p);
+      }
+      RaiseOnChange(this, new EntityEventArgs(this));
+      //refresh things
+      this.Invalidate(recBefore);//position before the move
+      this.Invalidate();//current position
+
+    }
+
+    // ------------------------------------------------------------------
+    /// <summary>
+    /// Scales the entity with the given factor at the given origin.
+    /// <remarks>More an historical milestone than used code.</remarks>
+    /// </summary>
+    /// <param name="origin">The origin.</param>
+    /// <param name="scaleX">The scale X.</param>
+    /// <param name="scaleY">The scale Y.</param>
+    // ------------------------------------------------------------------
+    void Scale(
+        Point origin,
+        double scaleX,
+        double scaleY) {
+      #region Variables
+      //temporary variables to assign the new location of the mConnectors            
+      double a, b;
+      //the new location of the connector
+      Point p;
+      //calculated/scaled/biased corners of the new rectangle
+      double ltx = 0, lty = 0, rbx = 0, rby = 0;
+
+      Rectangle currentRectangle = Rectangle;
+      //we only need to transform the LT and RB corners since the rest of the rectangle can be deduced from that
+      /*
+      PointF[] corners = new PointF[]{new PointF(currentRectangle.X, currentRectangle.Y),                                                            
+                                                      new PointF(currentRectangle.Right, currentRectangle.Bottom),                                                            
             
-            if (recursive)
-            {
-                foreach (IConnector connector in Connectors)
-                {
-                    connector.NewUid(recursive);
-                }
-                base.NewUid(recursive);
-            }
-            else
-                base.NewUid(recursive);
-        }
-
-        // ------------------------------------------------------------------
-        /// <summary>
-        /// Part of the initialization, this method connects newly added 
-        /// connectors to the parenting shape.
-        /// </summary>
-        /// <param name="sender">object</param>
-        /// <param name="e">CollectionEventArgs<IConnector></param>
-        // ------------------------------------------------------------------
-        void mConnectors_OnItemAdded(
-            object sender, 
-            CollectionEventArgs<IConnector> e)
-        {
-            e.Item.Parent = this;
-        }
-
-        // ------------------------------------------------------------------
-        /// <summary>
-        /// The custom menu to be added to the base menu of this entity.
-        /// 'null' is returned here.
-        /// </summary>
-        /// <returns>ToolStripItem[]</returns>
-        // ------------------------------------------------------------------
-        public override ToolStripItem[] Menu()
-        {
-            return null;
-        }
-
-        // ------------------------------------------------------------------
-        /// <summary>
-        /// Returns the connector hit by the mouse, if any.
-        /// </summary>
-        /// <param name="p">Point: The mouse coordinates</param>
-        /// <returns>IConnector: The connector hit by the mouse</returns>
-        // ------------------------------------------------------------------
-        public IConnector HitConnector(Point p)
-        {
-            for (int k = 0; k < mConnectors.Count; k++)
-            {
-                if (mConnectors[k].Hit(p))
-                {
-                    mConnectors[k].Hovered = true;
-                    mConnectors[k].Invalidate();
-                    return mConnectors[k];
-                }
-                else
-                {
-                    mConnectors[k].Hovered = false;
-                    mConnectors[k].Invalidate();
-
-                }
-
-
-            }
-            return null;
-        }
-
-        // ------------------------------------------------------------------
-        /// <summary>
-        /// Overrides the abstract paint method.  Nothing performed here,
-        /// let the sub-shapes do the painting.
-        /// </summary>
-        /// <param name="g">a graphics object onto which to paint</param>
-        // ------------------------------------------------------------------
-        public override void Paint(Graphics g)
-        {           
-            return;
-        }
-
-        // ------------------------------------------------------------------
-        /// <summary>
-        /// Override the abstract Hit method.  Here a simple hit test is
-        /// performed by checking if our "Rectangle" contains the point
-        /// specified.  Override this to perform more complex hit testing.
-        /// </summary>
-        /// <param name="p">Point</param>
-        /// <returns>bool</returns>
-        // ------------------------------------------------------------------
-        public override bool Hit(Point p)
-        {
-            Rectangle r = new Rectangle(p, new Size(5, 5));
-            return Rectangle.Contains(r);
-        }
-
-        // ------------------------------------------------------------------
-        /// <summary>
-        /// Overrides the abstract Invalidate method.  This shape's rectangle
-        /// is inflated (not permanently) by a size of (40, 40) to ensure
-        /// the whole area is refreshed.
-        /// </summary>
-        // ------------------------------------------------------------------
-        public override void Invalidate()
-        {
-            Rectangle r = Rectangle;
-            r.Offset(-10, -10);
-            r.Inflate(40, 40);
-            if (Model != null)
-            {
-                Model.RaiseOnInvalidateRectangle(r);
-            }
-        }
-
-        // ------------------------------------------------------------------
-        /// <summary>
-        /// Moves the entity with the given shift (offset).
-        /// </summary>
-        /// <param name="p">Represents a shift-vector, not the absolute 
-        /// position!</param>
-        // ------------------------------------------------------------------
-        public override void MoveBy(Point p)
-        {
-            Rectangle recBefore = mRectangle;
-            recBefore.Inflate(20, 20);
-
-            this.mRectangle.X += p.X;
-            this.mRectangle.Y += p.Y;
-
-            UpdatePaintingMaterial();
-
-            for (int k = 0; k < this.mConnectors.Count; k++)
-            {
-                mConnectors[k].MoveBy(p);
-            }
-            RaiseOnChange(this, new EntityEventArgs(this));
-            //refresh things
-            this.Invalidate(recBefore);//position before the move
-            this.Invalidate();//current position
-
-        }
-
-        // ------------------------------------------------------------------
-        /// <summary>
-        /// Scales the entity with the given factor at the given origin.
-        /// <remarks>More an historical milestone than used code.</remarks>
-        /// </summary>
-        /// <param name="origin">The origin.</param>
-        /// <param name="scaleX">The scale X.</param>
-        /// <param name="scaleY">The scale Y.</param>
-        // ------------------------------------------------------------------
-        void Scale(
-            Point origin, 
-            double scaleX, 
-            double scaleY)
-        {
-            #region Variables
-            //temporary variables to assign the new location of the mConnectors            
-            double a, b;
-            //the new location of the connector
-            Point p;
-            //calculated/scaled/biased corners of the new rectangle
-            double ltx = 0, lty = 0, rbx = 0, rby = 0;
-
-            Rectangle currentRectangle = Rectangle;
-            //we only need to transform the LT and RB corners since the rest of the rectangle can be deduced from that
-            /*
-            PointF[] corners = new PointF[]{new PointF(currentRectangle.X, currentRectangle.Y),                                                            
-                                                            new PointF(currentRectangle.Right, currentRectangle.Bottom),                                                            
-            
-             };
-             */
-            Rectangle newRectangle;
-            #endregion
-
-            #region Transformation matrix
-
-            ltx = Math.Round((currentRectangle.X - origin.X) * scaleX, 1) + origin.X;
-            lty = Math.Round((currentRectangle.Y - origin.Y) * scaleY, 1) + origin.Y;
-
-            rbx = Math.Round((currentRectangle.Right - origin.X) * scaleX, 1) + origin.X;
-            rby = Math.Round((currentRectangle.Bottom - origin.Y) * scaleY, 1) + origin.Y;
-
-            //corners[0] = new PointF
-            //Matrix m = new Matrix();
-            // m.Translate(-origin.X, -origin.Y,MatrixOrder.Append);
-            // m.Scale(scaleX, scaleY, MatrixOrder.Append);
-            // m.Translate(origin.X, origin.Y, MatrixOrder.Append);
-            #endregion
-
-            //transfor the LTRB points of the current rectangle
-            //m.TransformPoints(corners);
-
-            #region Bias
-            /*
+       };
+       */
+      Rectangle newRectangle;
+      #endregion
+
+      #region Transformation matrix
+
+      ltx = Math.Round((currentRectangle.X - origin.X) * scaleX, 1) + origin.X;
+      lty = Math.Round((currentRectangle.Y - origin.Y) * scaleY, 1) + origin.Y;
+
+      rbx = Math.Round((currentRectangle.Right - origin.X) * scaleX, 1) + origin.X;
+      rby = Math.Round((currentRectangle.Bottom - origin.Y) * scaleY, 1) + origin.Y;
+
+      //corners[0] = new PointF
+      //Matrix m = new Matrix();
+      // m.Translate(-origin.X, -origin.Y,MatrixOrder.Append);
+      // m.Scale(scaleX, scaleY, MatrixOrder.Append);
+      // m.Translate(origin.X, origin.Y, MatrixOrder.Append);
+      #endregion
+
+      //transfor the LTRB points of the current rectangle
+      //m.TransformPoints(corners);
+
+      #region Bias
+      /*
             if(currentRectangle.Y <= origin.Y + ViewBase.TrackerOffset && origin.Y - ViewBase.TrackerOffset <= currentRectangle.Y)
             {
@@ -564,6 +505,6 @@
             } 
              */
-            #endregion
-            /*
+      #endregion
+      /*
             ltx = Math.Round(ltx);
             lty = Math.Round(lty);
@@ -571,116 +512,110 @@
             rby = Math.Round(rby);
              * */
-            //now we can re-create the rectangle of this shape            
-            //newRectangle = RectangleF.FromLTRB(ltx, lty, rbx, rby);
-            newRectangle = Rectangle.FromLTRB(Convert.ToInt32(ltx), Convert.ToInt32(lty), Convert.ToInt32(rbx), Convert.ToInt32(rby));
-            //if ((newRectangle.Width <= 50 && scaleX < 1) || (newRectangle.Height <= 50 && scaleY < 1))
-            //    return;
-            #region Scaling of the mConnectors
-            //Note that this mechanism is way easier than the calculations in the old Netron library
-            //and it also allows dynamic mConnectors.
-            foreach (IConnector cn in this.mConnectors)
-            {
-                //De profundis: ge wilt het gewoon nie weten hoeveel bloed, zweet en tranen ik in de onderstaande berekeningen heb gestoken...
-                //met al de afrondingen en meetkundinge schaalafwijkingen..tis een wonder dat ik eruit ben geraakt.
-
-                //Scaling preserves proportions, so we calculate the proportions before the rectangle was resized and
-                //re-assign the same proportion after the rectangle is resized.
-                //I have tried many, many different possibilities but the accumulation of double-to-int conversions is a real pain.
-                //The only working solution I found was to cut things off after the first decimal.
-                a = Math.Round(((double)cn.Point.X - (double)mRectangle.X) / (double)mRectangle.Width, 1) * newRectangle.Width + ltx;
-                b = Math.Round(((double)cn.Point.Y - (double)mRectangle.Y) / (double)mRectangle.Height, 1) * newRectangle.Height + lty;
-                p = new Point(Convert.ToInt32(a), Convert.ToInt32(b));
-                cn.Point = p;
-            }
-            #endregion
-
-            //assign the new calculated rectangle to this shape
-            this.mRectangle = newRectangle;
-
-            RaiseOnChange(this, new EntityEventArgs(this));
-
-            //invalidate the space before the resize; very important if the scaling is a contraction!
-            this.Invalidate(currentRectangle);
-            //invalidate the current situation
-            this.Invalidate();
-        }
-
-        // ------------------------------------------------------------------
-        /// <summary>
-        /// Transforms the entity to the given new rectangle.
-        /// </summary>
-        /// <param name="x">The x-coordinate of the new rectangle.</param>
-        /// <param name="y">The y-coordinate of the new rectangle.</param>
-        /// <param name="width">The width.</param>
-        /// <param name="height">The height.</param>
-        // ------------------------------------------------------------------
-        public virtual void Transform(int x, int y, int width, int height)
-        { 
-            // Make sure the new size is valid.
-            if ((width < myMinSize.Width) ||
-                (height < myMinSize.Height) ||
-                (width > myMaxSize.Width) ||
-                (height > myMaxSize.Height))
-            {
-                return;
-            }
-
-            double a, b;
-            Point p;
-            Rectangle before = mRectangle;
-            before.Inflate(20, 20);
-            foreach (IConnector cn in this.mConnectors)
-            {
-                a = Math.Round(
-                    ( (double)cn.Point.X - (double)mRectangle.X ) / 
-                    (double)mRectangle.Width, 1) * width + x - cn.Point.X;
-
-                b = Math.Round(
-                    ( (double)cn.Point.Y - (double)mRectangle.Y ) / 
-                    (double)mRectangle.Height, 1) * height + y - cn.Point.Y;
-
-                p = new Point(Convert.ToInt32(a), Convert.ToInt32(b));
-                cn.MoveBy(p);
-            }
-
-            mRectangle = new Rectangle(x, y, width, height);
-
-            RaiseOnChange(this, new EntityEventArgs(this));            
-
-            // Update the material; the gradient depends on the rectangle
-            UpdatePaintingMaterial();
-            Invalidate(before);
-
-            // If we're attached to a group, make sure to let him know
-            // we've moved/resized.
-            if (mGroup != null)
-            {
-                mGroup.CalculateRectangle();
-                mGroup.Invalidate();
-
-                // The group will invalidate us when it's invalidated so just
-                // stop now.
-                //return;
-            }
-
-            Invalidate(mRectangle);            
-        }
-
-        // ------------------------------------------------------------------
-        /// <summary>
-        /// Transforms the entity to the given new rectangle.
-        /// </summary>
-        /// <param name="rectangle">The new bounds.</param>
-        // ------------------------------------------------------------------
-        public virtual void Transform(Rectangle rectangle)
-        {           
-            Transform(
-                rectangle.X, 
-                rectangle.Y, 
-                rectangle.Width, 
-                rectangle.Height);
-        }
-
-        #endregion        
-    }
+      //now we can re-create the rectangle of this shape            
+      //newRectangle = RectangleF.FromLTRB(ltx, lty, rbx, rby);
+      newRectangle = Rectangle.FromLTRB(Convert.ToInt32(ltx), Convert.ToInt32(lty), Convert.ToInt32(rbx), Convert.ToInt32(rby));
+      //if ((newRectangle.Width <= 50 && scaleX < 1) || (newRectangle.Height <= 50 && scaleY < 1))
+      //    return;
+      #region Scaling of the mConnectors
+      //Note that this mechanism is way easier than the calculations in the old Netron library
+      //and it also allows dynamic mConnectors.
+      foreach (IConnector cn in this.mConnectors) {
+        //De profundis: ge wilt het gewoon nie weten hoeveel bloed, zweet en tranen ik in de onderstaande berekeningen heb gestoken...
+        //met al de afrondingen en meetkundinge schaalafwijkingen..tis een wonder dat ik eruit ben geraakt.
+
+        //Scaling preserves proportions, so we calculate the proportions before the rectangle was resized and
+        //re-assign the same proportion after the rectangle is resized.
+        //I have tried many, many different possibilities but the accumulation of double-to-int conversions is a real pain.
+        //The only working solution I found was to cut things off after the first decimal.
+        a = Math.Round(((double)cn.Point.X - (double)mRectangle.X) / (double)mRectangle.Width, 1) * newRectangle.Width + ltx;
+        b = Math.Round(((double)cn.Point.Y - (double)mRectangle.Y) / (double)mRectangle.Height, 1) * newRectangle.Height + lty;
+        p = new Point(Convert.ToInt32(a), Convert.ToInt32(b));
+        cn.Point = p;
+      }
+      #endregion
+
+      //assign the new calculated rectangle to this shape
+      this.mRectangle = newRectangle;
+
+      RaiseOnChange(this, new EntityEventArgs(this));
+
+      //invalidate the space before the resize; very important if the scaling is a contraction!
+      this.Invalidate(currentRectangle);
+      //invalidate the current situation
+      this.Invalidate();
+    }
+
+    // ------------------------------------------------------------------
+    /// <summary>
+    /// Transforms the entity to the given new rectangle.
+    /// </summary>
+    /// <param name="x">The x-coordinate of the new rectangle.</param>
+    /// <param name="y">The y-coordinate of the new rectangle.</param>
+    /// <param name="width">The width.</param>
+    /// <param name="height">The height.</param>
+    // ------------------------------------------------------------------
+    public virtual void Transform(int x, int y, int width, int height) {
+      // Make sure the new size is valid.
+      if ((width < myMinSize.Width) ||
+          (height < myMinSize.Height) ||
+          (width > myMaxSize.Width) ||
+          (height > myMaxSize.Height)) {
+        return;
+      }
+
+      double a, b;
+      Point p;
+      Rectangle before = mRectangle;
+      before.Inflate(20, 20);
+      foreach (IConnector cn in this.mConnectors) {
+        a = Math.Round(
+            ((double)cn.Point.X - (double)mRectangle.X) /
+            (double)mRectangle.Width, 1) * width + x - cn.Point.X;
+
+        b = Math.Round(
+            ((double)cn.Point.Y - (double)mRectangle.Y) /
+            (double)mRectangle.Height, 1) * height + y - cn.Point.Y;
+
+        p = new Point(Convert.ToInt32(a), Convert.ToInt32(b));
+        cn.MoveBy(p);
+      }
+
+      mRectangle = new Rectangle(x, y, width, height);
+
+      RaiseOnChange(this, new EntityEventArgs(this));
+
+      // Update the material; the gradient depends on the rectangle
+      UpdatePaintingMaterial();
+      Invalidate(before);
+
+      // If we're attached to a group, make sure to let him know
+      // we've moved/resized.
+      if (mGroup != null) {
+        mGroup.CalculateRectangle();
+        mGroup.Invalidate();
+
+        // The group will invalidate us when it's invalidated so just
+        // stop now.
+        //return;
+      }
+
+      Invalidate(mRectangle);
+    }
+
+    // ------------------------------------------------------------------
+    /// <summary>
+    /// Transforms the entity to the given new rectangle.
+    /// </summary>
+    /// <param name="rectangle">The new bounds.</param>
+    // ------------------------------------------------------------------
+    public virtual void Transform(Rectangle rectangle) {
+      Transform(
+          rectangle.X,
+          rectangle.Y,
+          rectangle.Width,
+          rectangle.Height);
+    }
+
+    #endregion
+  }
 }
Index: /trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.Netron/3.0.2672.12446/Netron.Diagramming.Core-3.0.2672.12446/BaseClasses/ShapeMaterialBase.cs
===================================================================
--- /trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.Netron/3.0.2672.12446/Netron.Diagramming.Core-3.0.2672.12446/BaseClasses/ShapeMaterialBase.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.Netron/3.0.2672.12446/Netron.Diagramming.Core-3.0.2672.12446/BaseClasses/ShapeMaterialBase.cs	(revision 4068)
@@ -1,207 +1,189 @@
 using System;
-using System.Collections.Generic;
-using System.Text;
 using System.Drawing;
-namespace Netron.Diagramming.Core
-{
+namespace Netron.Diagramming.Core {
+  /// <summary>
+  /// Abstract base class for shape materials
+  /// </summary>
+  public abstract partial class ShapeMaterialBase : IShapeMaterial {
+    #region Fields
+
+    // ------------------------------------------------------------------
     /// <summary>
-    /// Abstract base class for shape materials
+    /// Implementation of IVersion - the current version of 
+    /// ShapeMaterialBase.
     /// </summary>
-    public abstract partial class ShapeMaterialBase : IShapeMaterial
-    {
-        #region Fields
+    // ------------------------------------------------------------------
+    protected double shapeMaterialBaseVersion = 1.0;
 
-        // ------------------------------------------------------------------
-        /// <summary>
-        /// Implementation of IVersion - the current version of 
-        /// ShapeMaterialBase.
-        /// </summary>
-        // ------------------------------------------------------------------
-        protected double shapeMaterialBaseVersion = 1.0;
+    // ------------------------------------------------------------------
+    /// <summary>
+    /// the Gliding field
+    /// </summary>
+    // ------------------------------------------------------------------
+    private bool mGliding = true;
 
-        // ------------------------------------------------------------------
-        /// <summary>
-        /// the Gliding field
-        /// </summary>
-        // ------------------------------------------------------------------
-        private bool mGliding = true;
+    // ------------------------------------------------------------------
+    /// <summary>
+    /// the Resizable field
+    /// </summary>
+    // ------------------------------------------------------------------
+    private bool mResizable = true;
 
-        // ------------------------------------------------------------------
-        /// <summary>
-        /// the Resizable field
-        /// </summary>
-        // ------------------------------------------------------------------
-        private bool mResizable = true;
+    // ------------------------------------------------------------------
+    /// <summary>
+    /// the Rectangle field
+    /// </summary>
+    // ------------------------------------------------------------------
+    private Rectangle mRectangle = Rectangle.Empty;
 
-        // ------------------------------------------------------------------
-        /// <summary>
-        /// the Rectangle field
-        /// </summary>
-        // ------------------------------------------------------------------
-        private Rectangle mRectangle = Rectangle.Empty;
+    // ------------------------------------------------------------------
+    /// <summary>
+    /// the Shape field
+    /// </summary>
+    // ------------------------------------------------------------------
+    private IShape mShape;
 
-        // ------------------------------------------------------------------
-        /// <summary>
-        /// the Shape field
-        /// </summary>
-        // ------------------------------------------------------------------
-        private IShape mShape;
+    // ------------------------------------------------------------------
+    /// <summary>
+    /// the Visible field
+    /// </summary>
+    // ------------------------------------------------------------------
+    private bool mVisible = true;
 
-        // ------------------------------------------------------------------
-        /// <summary>
-        /// the Visible field
-        /// </summary>
-        // ------------------------------------------------------------------
-        private bool mVisible = true;
+    protected ITextStyle myTextStyle = new TextStyle(
+        Color.Black,
+        new Font("Arial", 10),
+        StringAlignment.Near,
+        StringAlignment.Near);
 
-        protected ITextStyle myTextStyle = new TextStyle(
-            Color.Black,
-            new Font("Arial", 10),
-            StringAlignment.Near,
-            StringAlignment.Near);
+    #endregion
 
-        #endregion
+    #region Properties
 
-        #region Properties
+    // ------------------------------------------------------------------
+    /// <summary>
+    /// Gets the current version.
+    /// </summary>
+    // ------------------------------------------------------------------
+    public virtual double Version {
+      get {
+        return shapeMaterialBaseVersion;
+      }
+    }
 
-        // ------------------------------------------------------------------
-        /// <summary>
-        /// Gets the current version.
-        /// </summary>
-        // ------------------------------------------------------------------
-        public virtual double Version
-        {
-            get
-            {
-                return shapeMaterialBaseVersion;
-            }
-        }
+    // ------------------------------------------------------------------
+    /// <summary>
+    /// Gets or sets the TextStyle.
+    /// </summary>
+    // ------------------------------------------------------------------
+    public virtual ITextStyle TextStyle {
+      get {
+        return myTextStyle;
+      }
+      set {
+        myTextStyle = value;
+      }
+    }
 
-        // ------------------------------------------------------------------
-        /// <summary>
-        /// Gets or sets the TextStyle.
-        /// </summary>
-        // ------------------------------------------------------------------
-        public virtual ITextStyle TextStyle
-        {
-            get
-            {
-                return myTextStyle;
-            }
-            set
-            {
-                myTextStyle = value;
-            }
-        }
+    // ------------------------------------------------------------------
+    /// <summary>
+    /// Gets or sets the Gliding
+    /// </summary>
+    // ------------------------------------------------------------------
+    public bool Gliding {
+      get { return mGliding; }
+      set { mGliding = value; }
+    }
 
-        // ------------------------------------------------------------------
-        /// <summary>
-        /// Gets or sets the Gliding
-        /// </summary>
-        // ------------------------------------------------------------------
-        public bool Gliding
-        {
-            get { return mGliding; }
-            set { mGliding = value; }
-        }
+    // ------------------------------------------------------------------
+    /// <summary>
+    /// Gets or sets the Resizable
+    /// </summary>
+    // ------------------------------------------------------------------
+    public bool Resizable {
+      get { return mResizable; }
+      set { mResizable = value; }
+    }
 
-        // ------------------------------------------------------------------
-        /// <summary>
-        /// Gets or sets the Resizable
-        /// </summary>
-        // ------------------------------------------------------------------
-        public bool Resizable
-        {
-            get { return mResizable; }
-            set { mResizable = value; }
-        }
+    // ------------------------------------------------------------------
+    /// <summary>
+    /// Gets or sets the Rectangle
+    /// </summary>
+    // ------------------------------------------------------------------
+    public virtual Rectangle Rectangle {
+      get { return mRectangle; }
+      internal set {
+        mRectangle = value;
+      }
+    }
 
-        // ------------------------------------------------------------------
-        /// <summary>
-        /// Gets or sets the Rectangle
-        /// </summary>
-        // ------------------------------------------------------------------
-        public virtual Rectangle Rectangle
-        {
-            get { return mRectangle; }
-            internal set
-            {
-                mRectangle = value;
-            }
-        }
+    // ------------------------------------------------------------------
+    /// <summary>
+    /// Gets or sets the Shape
+    /// </summary>
+    // ------------------------------------------------------------------
+    public virtual IShape Shape {
+      get { return mShape; }
+      set { mShape = value; }
+    }
 
-        // ------------------------------------------------------------------
-        /// <summary>
-        /// Gets or sets the Shape
-        /// </summary>
-        // ------------------------------------------------------------------
-        public virtual IShape Shape
-        {
-            get { return mShape; }
-            set { mShape = value; }
-        }
+    // ------------------------------------------------------------------
+    /// <summary>
+    /// Gets or sets if this material is visible.
+    /// </summary>
+    // ------------------------------------------------------------------
+    public bool Visible {
+      get { return mVisible; }
+      set { mVisible = value; }
+    }
+    #endregion
 
-        // ------------------------------------------------------------------
-        /// <summary>
-        /// Gets or sets if this material is visible.
-        /// </summary>
-        // ------------------------------------------------------------------
-        public bool Visible
-        {
-            get { return mVisible; }
-            set { mVisible = value; }
-        }
-        #endregion
+    #region Constructor
+    ///<summary>
+    ///Default constructor
+    ///</summary>
+    protected ShapeMaterialBase() {
+    }
+    #endregion
 
-        #region Constructor
-        ///<summary>
-        ///Default constructor
-        ///</summary>
-        protected ShapeMaterialBase()
-        {
-        }
-        #endregion
+    #region Methods
 
-        #region Methods
+    // ------------------------------------------------------------------
+    /// <summary>
+    /// Calculates the min size needed to fit this material in.
+    /// </summary>
+    /// <param name="g">Graphics</param>
+    /// <returns>Size</returns>
+    // ------------------------------------------------------------------
+    public abstract Size CalculateMinSize(Graphics g);
 
-        // ------------------------------------------------------------------
-        /// <summary>
-        /// Calculates the min size needed to fit this material in.
-        /// </summary>
-        /// <param name="g">Graphics</param>
-        /// <returns>Size</returns>
-        // ------------------------------------------------------------------
-        public abstract Size CalculateMinSize(Graphics g);
+    /// <summary>
+    /// Transforms the specified rectangle.
+    /// </summary>
+    /// <param name="rectangle">The rectangle.</param>
+    public virtual void Transform(Rectangle rectangle) {
+      this.mRectangle = rectangle;
+    }
 
-        /// <summary>
-        /// Transforms the specified rectangle.
-        /// </summary>
-        /// <param name="rectangle">The rectangle.</param>
-        public virtual void Transform(Rectangle rectangle)
-        {
-            this.mRectangle = rectangle;
-        }
-
-        /// <summary>
-        /// Paints the entity using the given graphics object
-        /// </summary>
-        /// <param name="g"></param>
-        public abstract void Paint(Graphics g);
+    /// <summary>
+    /// Paints the entity using the given graphics object
+    /// </summary>
+    /// <param name="g"></param>
+    public abstract void Paint(Graphics g);
 
 
-        /// <summary>
-        /// Gets the service object of the specified type.
-        /// </summary>
-        /// <param name="serviceType">An object that specifies the type of service object to get.</param>
-        /// <returns>
-        /// A service object of type serviceType.-or- null if there is no service object of type serviceType.
-        /// </returns>
-        public virtual object GetService(Type serviceType)
-        {
-            return null;
-        }
+    /// <summary>
+    /// Gets the service object of the specified type.
+    /// </summary>
+    /// <param name="serviceType">An object that specifies the type of service object to get.</param>
+    /// <returns>
+    /// A service object of type serviceType.-or- null if there is no service object of type serviceType.
+    /// </returns>
+    public virtual object GetService(Type serviceType) {
+      return null;
+    }
 
-        #endregion
+    #endregion
 
-    }
+  }
 }
Index: /trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.Netron/3.0.2672.12446/Netron.Diagramming.Core-3.0.2672.12446/BaseClasses/SimpleShapeBase.cs
===================================================================
--- /trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.Netron/3.0.2672.12446/Netron.Diagramming.Core-3.0.2672.12446/BaseClasses/SimpleShapeBase.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.Netron/3.0.2672.12446/Netron.Diagramming.Core-3.0.2672.12446/BaseClasses/SimpleShapeBase.cs	(revision 4068)
@@ -1,359 +1,327 @@
-using System;
-using System.Collections.Generic;
-using System.Text;
+using System.ComponentModel;
 using System.Drawing;
 using System.Windows.Forms;
-using System.ComponentModel;
-namespace Netron.Diagramming.Core
-{
-    // ----------------------------------------------------------------------
-    /// <summary>
-    /// Abstract base class for simple shapes. 
-    /// <para>A simple shape does not contain sub-elements (aka shape 
-    /// material, see <see cref="IShapeMaterial"/>) but this does
-    /// not mean you cannot paint sub-elements. In fact, this shape type 
-    /// corresponds to the old base class in the previous Netron graph 
-    /// library (i.e. before version 2.3).
-    /// <seealso cref="ComplexShapeBase"/>
-    /// </para>
-    /// </summary>
-    // ----------------------------------------------------------------------
-    public abstract partial class SimpleShapeBase : 
-        ShapeBase, 
-        ISimpleShape,
-        ITextProvider
-    {
-        // ------------------------------------------------------------------
-        /// <summary>
-        /// The amount to inflate the text area (mTextRectangle) by.
-        /// </summary>
-        // ------------------------------------------------------------------
-        protected const int TextRectangleInflation = 5;
-
-        // ------------------------------------------------------------------
-        /// <summary>
-        /// Implementation of IVersion - the current version of 
-        /// SimpleShapeBase.
-        /// </summary>
-        // ------------------------------------------------------------------
-        protected const double simpleShapeBaseVersion = 1.0;
-
-        #region Fields
-
-        // ------------------------------------------------------------------
-        /// <summary>
-        /// Specifies if this shape is auto-sized to fit the text.
-        /// </summary>
-        // ------------------------------------------------------------------
-        protected bool mAutoSize = false;
-
-        // ------------------------------------------------------------------
-        /// <summary>
-        /// Specifies if this shape allows in-place text editing.  If set to
-        /// true, then the TextEditor is displayed when the shape is 
-        /// double-clicked.
-        /// </summary>
-        // ------------------------------------------------------------------
-        protected bool mAllowTextEditing = true;
-
-        // ------------------------------------------------------------------
-        /// <summary>
-        /// Specifies the number of clicks required to launch the in-place
-        /// TextEditor.
-        /// </summary>
-        // ------------------------------------------------------------------
-        protected int mEditTextClicks = 2;       
-
-        // ------------------------------------------------------------------
-        /// <summary>
-        /// The text for this shape.
-        /// </summary>
-        // ------------------------------------------------------------------
-        protected string mText = string.Empty;
-
-        // ------------------------------------------------------------------
-        /// <summary>
-        /// The Rectangle inside which the text is drawn.
-        /// </summary>
-        // ------------------------------------------------------------------
-        protected Rectangle mTextArea;
-
-        // ------------------------------------------------------------------
-        /// <summary>
-        /// The style of the text to draw.
-        /// </summary>
-        // ------------------------------------------------------------------
-        protected ITextStyle mTextStyle = new TextStyle(
-            Color.Black,
-            new Font("Arial", 10),
-            StringAlignment.Center,
-            StringAlignment.Center);
-
-        #endregion
-
-        #region Properties
-
-        // ------------------------------------------------------------------
-        /// <summary>
-        /// Gets the current version.
-        /// </summary>
-        // ------------------------------------------------------------------
-        public override double Version
-        {
-            get
-            {
-                return simpleShapeBaseVersion;
-            }
+namespace Netron.Diagramming.Core {
+  // ----------------------------------------------------------------------
+  /// <summary>
+  /// Abstract base class for simple shapes. 
+  /// <para>A simple shape does not contain sub-elements (aka shape 
+  /// material, see <see cref="IShapeMaterial"/>) but this does
+  /// not mean you cannot paint sub-elements. In fact, this shape type 
+  /// corresponds to the old base class in the previous Netron graph 
+  /// library (i.e. before version 2.3).
+  /// <seealso cref="ComplexShapeBase"/>
+  /// </para>
+  /// </summary>
+  // ----------------------------------------------------------------------
+  public abstract partial class SimpleShapeBase :
+      ShapeBase,
+      ISimpleShape,
+      ITextProvider {
+    // ------------------------------------------------------------------
+    /// <summary>
+    /// The amount to inflate the text area (mTextRectangle) by.
+    /// </summary>
+    // ------------------------------------------------------------------
+    protected const int TextRectangleInflation = 5;
+
+    // ------------------------------------------------------------------
+    /// <summary>
+    /// Implementation of IVersion - the current version of 
+    /// SimpleShapeBase.
+    /// </summary>
+    // ------------------------------------------------------------------
+    protected const double simpleShapeBaseVersion = 1.0;
+
+    #region Fields
+
+    // ------------------------------------------------------------------
+    /// <summary>
+    /// Specifies if this shape is auto-sized to fit the text.
+    /// </summary>
+    // ------------------------------------------------------------------
+    protected bool mAutoSize = false;
+
+    // ------------------------------------------------------------------
+    /// <summary>
+    /// Specifies if this shape allows in-place text editing.  If set to
+    /// true, then the TextEditor is displayed when the shape is 
+    /// double-clicked.
+    /// </summary>
+    // ------------------------------------------------------------------
+    protected bool mAllowTextEditing = true;
+
+    // ------------------------------------------------------------------
+    /// <summary>
+    /// Specifies the number of clicks required to launch the in-place
+    /// TextEditor.
+    /// </summary>
+    // ------------------------------------------------------------------
+    protected int mEditTextClicks = 2;
+
+    // ------------------------------------------------------------------
+    /// <summary>
+    /// The text for this shape.
+    /// </summary>
+    // ------------------------------------------------------------------
+    protected string mText = string.Empty;
+
+    // ------------------------------------------------------------------
+    /// <summary>
+    /// The Rectangle inside which the text is drawn.
+    /// </summary>
+    // ------------------------------------------------------------------
+    protected Rectangle mTextArea;
+
+    // ------------------------------------------------------------------
+    /// <summary>
+    /// The style of the text to draw.
+    /// </summary>
+    // ------------------------------------------------------------------
+    protected ITextStyle mTextStyle = new TextStyle(
+        Color.Black,
+        new Font("Arial", 10),
+        StringAlignment.Center,
+        StringAlignment.Center);
+
+    #endregion
+
+    #region Properties
+
+    // ------------------------------------------------------------------
+    /// <summary>
+    /// Gets the current version.
+    /// </summary>
+    // ------------------------------------------------------------------
+    public override double Version {
+      get {
+        return simpleShapeBaseVersion;
+      }
+    }
+
+    // ------------------------------------------------------------------
+    /// <summary>
+    /// Gets or sets the style of the text to use.
+    /// </summary>
+    // ------------------------------------------------------------------
+    public virtual ITextStyle TextStyle {
+      get {
+        return mTextStyle;
+      }
+      set {
+        mTextStyle = value;
+        mTextStyle.TextStyleChanged +=
+            new TextStyleChangedEventHandler(HandleTextStyleChanged);
+        Invalidate();
+      }
+    }
+
+    // ------------------------------------------------------------------
+    /// <summary>
+    /// Returns if text editing is allowed.
+    /// </summary>
+    // ------------------------------------------------------------------
+    public virtual bool AllowTextEditing {
+      get {
+        return this.mAllowTextEditing;
+      }
+    }
+
+    // ------------------------------------------------------------------
+    /// <summary>
+    /// Returns the number of mouse clicks required to launch the in-place
+    /// text editor.
+    /// </summary>
+    // ------------------------------------------------------------------
+    public virtual int EditTextClicks {
+      get {
+        return mEditTextClicks;
+      }
+      set {
+        mEditTextClicks = value;
+      }
+    }
+
+    // ------------------------------------------------------------------
+    /// <summary>
+    /// Gets or sets a value indicating whether to autosize the label in 
+    /// function of the string content.
+    /// </summary>
+    /// <value><c>true</c> if [auto size]; otherwise, <c>false</c>.
+    /// </value>
+    // ------------------------------------------------------------------
+    public virtual bool AutoSize {
+      get {
+        return mAutoSize;
+      }
+      set {
+        mAutoSize = value;
+        AutoReSize(mText);
+      }
+    }
+
+    // ------------------------------------------------------------------
+    /// <summary>
+    /// Gets or sets the text to display in the TextArea.
+    /// </summary>
+    // ------------------------------------------------------------------
+    [Browsable(true),
+    Description("The text shown on the shape"),
+    Category("Layout")]
+    public virtual string Text {
+      get {
+        return mText;
+      }
+      set {
+        if (value == null) {
+          throw new InconsistencyException(
+              "The text property cannot be 'null'");
         }
 
-        // ------------------------------------------------------------------
-        /// <summary>
-        /// Gets or sets the style of the text to use.
-        /// </summary>
-        // ------------------------------------------------------------------
-        public virtual ITextStyle TextStyle
-        {
-            get
-            {
-                return mTextStyle;
-            }
-            set
-            {
-                mTextStyle = value;
-                mTextStyle.TextStyleChanged +=
-                    new TextStyleChangedEventHandler(HandleTextStyleChanged);
-                Invalidate();
-            }
+        mText = value;
+        if (mAutoSize) {
+          AutoReSize(value);
         }
-
-        // ------------------------------------------------------------------
-        /// <summary>
-        /// Returns if text editing is allowed.
-        /// </summary>
-        // ------------------------------------------------------------------
-        public virtual bool AllowTextEditing
-        {
-            get
-            {
-                return this.mAllowTextEditing;
-            }
-        }
-
-        // ------------------------------------------------------------------
-        /// <summary>
-        /// Returns the number of mouse clicks required to launch the in-place
-        /// text editor.
-        /// </summary>
-        // ------------------------------------------------------------------
-        public virtual int EditTextClicks
-        {
-            get
-            {
-                return mEditTextClicks;
-            }
-            set
-            {
-                mEditTextClicks = value;
-            }
-        }
-
-        // ------------------------------------------------------------------
-        /// <summary>
-        /// Gets or sets a value indicating whether to autosize the label in 
-        /// function of the string content.
-        /// </summary>
-        /// <value><c>true</c> if [auto size]; otherwise, <c>false</c>.
-        /// </value>
-        // ------------------------------------------------------------------
-        public virtual bool AutoSize
-        {
-            get 
-            { 
-                return mAutoSize; 
-            }
-            set 
-            { 
-                mAutoSize = value;
-                AutoReSize(mText);
-            }
-        }
-
-        // ------------------------------------------------------------------
-        /// <summary>
-        /// Gets or sets the text to display in the TextArea.
-        /// </summary>
-        // ------------------------------------------------------------------
-        [Browsable(true), 
-        Description("The text shown on the shape"), 
-        Category("Layout")]
-        public virtual string Text
-        {
-            get
-            {
-                return mText;
-            }
-            set
-            {
-                if (value == null)
-                {
-                    throw new InconsistencyException(
-                        "The text property cannot be 'null'");
-                }
-
-                mText = value;
-                if (mAutoSize)
-                {
-                    AutoReSize(value);
-                }
-                this.Invalidate();
-            }
-        }
-
-        // ------------------------------------------------------------------
-        /// <summary>
-        /// Gets or sets the text rectangle.
-        /// </summary>
-        /// <value>The text rectangle.</value>
-        // ------------------------------------------------------------------
-        public virtual Rectangle TextArea
-        {
-            get
-            {
-                return mTextArea;
-            }
-            set
-            {
-                mTextArea = value;
-            }
-        }
-        #endregion
-
-        #region Constructor
-        
-        // ------------------------------------------------------------------
-        ///<summary>
-        ///Default constructor.
-        ///</summary>
-        // ------------------------------------------------------------------
-        public SimpleShapeBase() : base()
-        {
-        }
-
-        // ------------------------------------------------------------------
-        /// <summary>
-        /// Initializes a new instance of the <see cref="T:SimpleShapeBase"/> 
-        /// class.
-        /// </summary>
-        /// <param name="model">The <see cref="IModel"/></param>
-        // ------------------------------------------------------------------
-        public SimpleShapeBase(IModel model)
-            : base(model)
-        {
-        }
-        
-        #endregion
-
-        #region Methods
-
-        // ------------------------------------------------------------------
-        /// <summary>
-        /// Initializes this instance.
-        /// </summary>
-        // ------------------------------------------------------------------
-        protected override void Initialize()
-        {
-            base.Initialize();
-            mTextArea = Rectangle;
-
-            mTextArea.Inflate(
-                -TextRectangleInflation,
-                -TextRectangleInflation);
-
-            this.mTextStyle = new TextStyle(
-                Color.Black,
-                new Font("Arial", 12),
-                StringAlignment.Center,
-                StringAlignment.Center);
-
-            this.mTextStyle.TextStyleChanged +=
-                new TextStyleChangedEventHandler(HandleTextStyleChanged);
-        }
-
-        // ------------------------------------------------------------------
-        /// <summary>
-        /// Called when the text style is changed.  This shape is invalidated
-        /// so the new text style is reflected.
-        /// </summary>
-        /// <param name="sender">object</param>
-        /// <param name="e">TextStyleChangedEventArgs</param>
-        // ------------------------------------------------------------------
-        protected virtual void HandleTextStyleChanged(
-            object sender, 
-            TextStyleChangedEventArgs e)
-        {
-            Invalidate();
-        }
-
-        // ------------------------------------------------------------------
-        /// <summary>
-        /// Moves the entity with the given shift vector
-        /// </summary>
-        /// <param name="p">Represent a shift-vector, not the absolute 
-        /// position!</param>
-        // ------------------------------------------------------------------
-        public override void MoveBy(Point p)
-        {
-            base.MoveBy(p);
-            this.mTextArea.X += p.X;
-            this.mTextArea.Y += p.Y;
-        }
-
-        // ------------------------------------------------------------------
-        /// <summary>
-        /// Transforms this shape to the given new rectangle.
-        /// </summary>
-        /// <param name="x">The x-coordinate of the new rectangle.</param>
-        /// <param name="y">The y-coordinate of the new rectangle.</param>
-        /// <param name="width">The width.</param>
-        /// <param name="height">The height.</param>
-        // ------------------------------------------------------------------
-        public override void Transform(
-            int x, 
-            int y, 
-            int width, 
-            int height)
-        {
-            base.Transform(x, y, width, height);
-            mTextArea = Rectangle;
-
-            mTextArea.Inflate(
-                -TextRectangleInflation,
-                -TextRectangleInflation);
-        }
-
-        // ------------------------------------------------------------------
-        /// <summary>
-        /// Re-calculates the bounds of this shape to fit the text specified.
-        /// </summary>
-        /// <param name="value">string: The text to fit to.</param>
-        // ------------------------------------------------------------------
-        private void AutoReSize(string value)
-        {
-            SizeF size = TextRenderer.MeasureText(
-                value, 
-                mTextStyle.Font);
-
-            Rectangle rec = new Rectangle(
-                Rectangle.Location, 
-                Size.Round(size));
-
-            rec.Inflate(TextRectangleInflation, TextRectangleInflation);
-
-            rec.Offset(TextRectangleInflation, TextRectangleInflation);
-
-            Transform(rec);
-        }
-
-        #endregion
-    }
+        this.Invalidate();
+      }
+    }
+
+    // ------------------------------------------------------------------
+    /// <summary>
+    /// Gets or sets the text rectangle.
+    /// </summary>
+    /// <value>The text rectangle.</value>
+    // ------------------------------------------------------------------
+    public virtual Rectangle TextArea {
+      get {
+        return mTextArea;
+      }
+      set {
+        mTextArea = value;
+      }
+    }
+    #endregion
+
+    #region Constructor
+
+    // ------------------------------------------------------------------
+    ///<summary>
+    ///Default constructor.
+    ///</summary>
+    // ------------------------------------------------------------------
+    public SimpleShapeBase()
+      : base() {
+    }
+
+    // ------------------------------------------------------------------
+    /// <summary>
+    /// Initializes a new instance of the <see cref="T:SimpleShapeBase"/> 
+    /// class.
+    /// </summary>
+    /// <param name="model">The <see cref="IModel"/></param>
+    // ------------------------------------------------------------------
+    public SimpleShapeBase(IModel model)
+      : base(model) {
+    }
+
+    #endregion
+
+    #region Methods
+
+    // ------------------------------------------------------------------
+    /// <summary>
+    /// Initializes this instance.
+    /// </summary>
+    // ------------------------------------------------------------------
+    protected override void Initialize() {
+      base.Initialize();
+      mTextArea = Rectangle;
+
+      mTextArea.Inflate(
+          -TextRectangleInflation,
+          -TextRectangleInflation);
+
+      this.mTextStyle = new TextStyle(
+          Color.Black,
+          new Font("Arial", 12),
+          StringAlignment.Center,
+          StringAlignment.Center);
+
+      this.mTextStyle.TextStyleChanged +=
+          new TextStyleChangedEventHandler(HandleTextStyleChanged);
+    }
+
+    // ------------------------------------------------------------------
+    /// <summary>
+    /// Called when the text style is changed.  This shape is invalidated
+    /// so the new text style is reflected.
+    /// </summary>
+    /// <param name="sender">object</param>
+    /// <param name="e">TextStyleChangedEventArgs</param>
+    // ------------------------------------------------------------------
+    protected virtual void HandleTextStyleChanged(
+        object sender,
+        TextStyleChangedEventArgs e) {
+      Invalidate();
+    }
+
+    // ------------------------------------------------------------------
+    /// <summary>
+    /// Moves the entity with the given shift vector
+    /// </summary>
+    /// <param name="p">Represent a shift-vector, not the absolute 
+    /// position!</param>
+    // ------------------------------------------------------------------
+    public override void MoveBy(Point p) {
+      base.MoveBy(p);
+      this.mTextArea.X += p.X;
+      this.mTextArea.Y += p.Y;
+    }
+
+    // ------------------------------------------------------------------
+    /// <summary>
+    /// Transforms this shape to the given new rectangle.
+    /// </summary>
+    /// <param name="x">The x-coordinate of the new rectangle.</param>
+    /// <param name="y">The y-coordinate of the new rectangle.</param>
+    /// <param name="width">The width.</param>
+    /// <param name="height">The height.</param>
+    // ------------------------------------------------------------------
+    public override void Transform(
+        int x,
+        int y,
+        int width,
+        int height) {
+      base.Transform(x, y, width, height);
+      mTextArea = Rectangle;
+
+      mTextArea.Inflate(
+          -TextRectangleInflation,
+          -TextRectangleInflation);
+    }
+
+    // ------------------------------------------------------------------
+    /// <summary>
+    /// Re-calculates the bounds of this shape to fit the text specified.
+    /// </summary>
+    /// <param name="value">string: The text to fit to.</param>
+    // ------------------------------------------------------------------
+    private void AutoReSize(string value) {
+      SizeF size = TextRenderer.MeasureText(
+          value,
+          mTextStyle.Font);
+
+      Rectangle rec = new Rectangle(
+          Rectangle.Location,
+          Size.Round(size));
+
+      rec.Inflate(TextRectangleInflation, TextRectangleInflation);
+
+      rec.Offset(TextRectangleInflation, TextRectangleInflation);
+
+      Transform(rec);
+    }
+
+    #endregion
+  }
 }
Index: /trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.Netron/3.0.2672.12446/Netron.Diagramming.Core-3.0.2672.12446/BaseClasses/SubsetActionBase.cs
===================================================================
--- /trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.Netron/3.0.2672.12446/Netron.Diagramming.Core-3.0.2672.12446/BaseClasses/SubsetActionBase.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.Netron/3.0.2672.12446/Netron.Diagramming.Core-3.0.2672.12446/BaseClasses/SubsetActionBase.cs	(revision 4068)
@@ -1,33 +1,26 @@
-using System;
-using System.Collections.Generic;
-using System.Text;
 
-namespace Netron.Diagramming.Core
-{
-    abstract class SubsetActionBase  : ActionBase, ISubsetAction
-    {
-        #region Fields
-        CollectionBase<IDiagramEntity> mSubset = new CollectionBase<IDiagramEntity>();
-        #endregion
+namespace Netron.Diagramming.Core {
+  abstract class SubsetActionBase : ActionBase, ISubsetAction {
+    #region Fields
+    CollectionBase<IDiagramEntity> mSubset = new CollectionBase<IDiagramEntity>();
+    #endregion
 
-        public CollectionBase<IDiagramEntity> Subset
-        {
-            get
-            {
-                return mSubset;
-            }
-            
-        }
+    public CollectionBase<IDiagramEntity> Subset {
+      get {
+        return mSubset;
+      }
 
-        #region Constructor
-        ///<summary>
-        ///Default constructor
-        ///</summary>
-        public SubsetActionBase(string name):base(name)
-        {
+    }
 
-        }
-        #endregion
-  
+    #region Constructor
+    ///<summary>
+    ///Default constructor
+    ///</summary>
+    public SubsetActionBase(string name)
+      : base(name) {
+
     }
+    #endregion
+
+  }
 }
Index: /trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.Netron/3.0.2672.12446/Netron.Diagramming.Core-3.0.2672.12446/BaseClasses/TrackerBase.cs
===================================================================
--- /trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.Netron/3.0.2672.12446/Netron.Diagramming.Core-3.0.2672.12446/BaseClasses/TrackerBase.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.Netron/3.0.2672.12446/Netron.Diagramming.Core-3.0.2672.12446/BaseClasses/TrackerBase.cs	(revision 4068)
@@ -1,89 +1,78 @@
-using System;
-using System.Collections.Generic;
-using System.Text;
 using System.Drawing;
-namespace Netron.Diagramming.Core
-{
+namespace Netron.Diagramming.Core {
+  /// <summary>
+  /// Abstract base implementation of the <see cref="ITracker"/> interface.
+  /// </summary>
+  public abstract class TrackerBase : ITracker {
+    #region Fields
     /// <summary>
-    /// Abstract base implementation of the <see cref="ITracker"/> interface.
+    /// the Rectangle field
     /// </summary>
-    public abstract class TrackerBase : ITracker
-    {
-        #region Fields
-        /// <summary>
-        /// the Rectangle field
-        /// </summary>
-        private Rectangle mRectangle;
-        #endregion
+    private Rectangle mRectangle;
+    #endregion
 
-        #region Properties
-        /// <summary>
-        /// Gets or sets the Rectangle
-        /// </summary>
-        public Rectangle Rectangle
-        {
-            get
-            {
-                return mRectangle;
-            }
-            set
-            {
-                mRectangle = value;
-            }
-        }
-        /// <summary>
-        /// the ShowHandles field
-        /// </summary>
-        private bool mShowHandles;
-        /// <summary>
-        /// Gets or sets the ShowHandles
-        /// </summary>
-        public bool ShowHandles
-        {
-            get { return mShowHandles; }
-            set { mShowHandles = value; }
-        }
-        #endregion
+    #region Properties
+    /// <summary>
+    /// Gets or sets the Rectangle
+    /// </summary>
+    public Rectangle Rectangle {
+      get {
+        return mRectangle;
+      }
+      set {
+        mRectangle = value;
+      }
+    }
+    /// <summary>
+    /// the ShowHandles field
+    /// </summary>
+    private bool mShowHandles;
+    /// <summary>
+    /// Gets or sets the ShowHandles
+    /// </summary>
+    public bool ShowHandles {
+      get { return mShowHandles; }
+      set { mShowHandles = value; }
+    }
+    #endregion
 
-        #region Constructors
+    #region Constructors
 
-        /// <summary>
-        /// Initializes a new instance of the <see cref="T:TrackerBase"/> class.
-        /// </summary>
-        public TrackerBase()
-        {
-        }
-        /// <summary>
-        /// Initializes a new instance of the <see cref="T:TrackerBase"/> class.
-        /// </summary>
-        /// <param name="rectangle">The rectangle.</param>
-        public TrackerBase(Rectangle rectangle)
-        {
-            mRectangle = rectangle;
-        }
-        #endregion
-    
-        #region Methods
-        /// <summary>
-        /// Paints the entity using the given graphics object
-        /// </summary>
-        /// <param name="g"></param>
-        public abstract void Paint(Graphics g);
-        //{
-        //    g.DrawRectangle(ArtPallet.HighlightPen, mRectangle);
-        //}
-        /// <summary>
-        /// Returns the relative coordinate of the grip-point hit, if any, of the tracker.
-        /// </summary>
-        /// <param name="p"></param>
-        /// <returns></returns>
-        public abstract Point Hit(Point p);
-        /// <summary>
-        /// Transforms the specified rectangle.
-        /// </summary>
-        /// <param name="rectangle">The rectangle.</param>
-        public abstract void Transform(Rectangle rectangle);
-        #endregion
+    /// <summary>
+    /// Initializes a new instance of the <see cref="T:TrackerBase"/> class.
+    /// </summary>
+    public TrackerBase() {
+    }
+    /// <summary>
+    /// Initializes a new instance of the <see cref="T:TrackerBase"/> class.
+    /// </summary>
+    /// <param name="rectangle">The rectangle.</param>
+    public TrackerBase(Rectangle rectangle) {
+      mRectangle = rectangle;
+    }
+    #endregion
 
-    }
+    #region Methods
+    /// <summary>
+    /// Paints the entity using the given graphics object
+    /// </summary>
+    /// <param name="g"></param>
+    public abstract void Paint(Graphics g);
+    //{
+    //    g.DrawRectangle(ArtPallet.HighlightPen, mRectangle);
+    //}
+    /// <summary>
+    /// Returns the relative coordinate of the grip-point hit, if any, of the tracker.
+    /// </summary>
+    /// <param name="p"></param>
+    /// <returns></returns>
+    public abstract Point Hit(Point p);
+    /// <summary>
+    /// Transforms the specified rectangle.
+    /// </summary>
+    /// <param name="rectangle">The rectangle.</param>
+    public abstract void Transform(Rectangle rectangle);
+    #endregion
+
+  }
 }
Index: /trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.Netron/3.0.2672.12446/Netron.Diagramming.Core-3.0.2672.12446/Collections/CollectionBase.cs
===================================================================
--- /trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.Netron/3.0.2672.12446/Netron.Diagramming.Core-3.0.2672.12446/Collections/CollectionBase.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.Netron/3.0.2672.12446/Netron.Diagramming.Core-3.0.2672.12446/Collections/CollectionBase.cs	(revision 4068)
@@ -1,687 +1,631 @@
 
 using System;
-using System.IO;
-using System.Runtime.Serialization;
-using System.Runtime.Serialization.Formatters.Binary;
 using System.Collections;
 using System.Collections.Generic;
 using System.Diagnostics;
+using System.IO;
+using System.Runtime.Serialization.Formatters.Binary;
 using Netron.NetronLight;
-namespace Netron.Diagramming.Core
-{
-    /// <summary>
-    /// CollectionBase is a base class that can be used to more easily implement the
-    /// generic ICollection&lt;T&gt; and non-generic ICollection interfaces.
-    /// </summary>
-    /// <remarks>
-    /// <para>To use CollectionBase as a base class, the derived class must override
-    /// the Count, GetEnumerator, Add, Clear, and Remove methods. </para>
-    /// <para>ICollection&lt;T&gt;.Contains need not be implemented by the
-    /// derived class, but it should be strongly considered, because the CollectionBase implementation
-    /// may not be very efficient.</para>
+namespace Netron.Diagramming.Core {
+  /// <summary>
+  /// CollectionBase is a base class that can be used to more easily implement the
+  /// generic ICollection&lt;T&gt; and non-generic ICollection interfaces.
+  /// </summary>
+  /// <remarks>
+  /// <para>To use CollectionBase as a base class, the derived class must override
+  /// the Count, GetEnumerator, Add, Clear, and Remove methods. </para>
+  /// <para>ICollection&lt;T&gt;.Contains need not be implemented by the
+  /// derived class, but it should be strongly considered, because the CollectionBase implementation
+  /// may not be very efficient.</para>
+  /// </remarks>
+  /// <typeparam name="T">The item type of the collection.</typeparam>
+
+  [DebuggerDisplay("{DebuggerDisplayString()}")]
+  public partial class CollectionBase<T> : ICollection<T>, ICollection, IList<T>, ICollectionBase<T>, IShowable {
+    #region Events
+    /// <summary>
+    /// Occurs when an item is added to the collection.
+    /// </summary>
+    public event EventHandler<CollectionEventArgs<T>> OnItemAdded;
+    /// <summary>
+    /// Occurs when an item is removed from the collection.
+    /// </summary>
+    public event EventHandler<CollectionEventArgs<T>> OnItemRemoved;
+    /// <summary>
+    /// Occurs when the collection is cleared.
+    /// </summary>
+    public event EventHandler OnClear;
+    #endregion
+
+    #region Fields
+    /// <summary>
+    /// the internal generic list on which this collection is based
+    /// </summary>                                                                    
+    protected List<T> innerList;
+    /// <summary>
+    /// whether this collection is readonly
+    /// </summary>
+    bool mReadOnly = false;
+    #endregion
+
+    #region Properties
+    /// <summary>
+    /// Indicates whether the collection is read-only. 
+    /// </summary>
+    bool ICollection<T>.IsReadOnly {
+      get {
+        return mReadOnly;
+      }
+    }
+
+    /// <summary>
+    /// Gets a value indicating whether this instance is empty.
+    /// </summary>
+    /// <value><c>true</c> if this instance is empty; otherwise, <c>false</c>.</value>
+    public virtual bool IsEmpty {
+      get { return this.innerList.Count == 0; }
+    }
+    #endregion
+
+
+
+    #region Constructor
+
+    /// <summary>
+    /// Creates a new CollectionBase. 
+    /// </summary>
+    public CollectionBase() {
+      innerList = new List<T>();
+    }
+
+    /// <summary>
+    /// Initializes a new instance of the <see cref="T:CollectionBase&lt;T&gt;"/> class.
+    /// </summary>
+    /// <param name="baseCollection">The base collection.</param>
+    public CollectionBase(ICollectionBase<T> baseCollection)
+      : this() {
+      innerList.AddRange(baseCollection);
+    }
+
+    /// <summary>
+    /// Initializes a new instance of the <see cref="T:CollectionBase&lt;T&gt;"/> class.
+    /// </summary>
+    /// <param name="baseCollection">The base collection.</param>
+    /// <param name="readOnly">if set to <c>true</c> [read only].</param>
+    public CollectionBase(ICollectionBase<T> baseCollection, bool readOnly)
+      : this() {
+      mReadOnly = readOnly;
+      //innerList = new System.Collections.ObjectModel.ReadOnlyCollection<T>(baseCollection);
+      innerList.AddRange(baseCollection);
+    }
+
+
+
+
+    #endregion
+
+    /// <summary>
+    /// Shows the string representation of the collection. The string representation contains
+    /// a list of the items in the collection. Contained collections (except string) are expanded
+    /// recursively.
+    /// </summary>
+    /// <returns>The string representation of the collection.</returns>
+    public override string ToString() {
+      return Algorithms.ToString(this);
+    }
+    /// <summary>
+    /// Returns a string representation of this collection.
+    /// </summary>
+    /// <param name="format">The format.</param>
+    /// <param name="formatProvider">The format provider.</param>
+    /// <returns></returns>
+    public virtual string ToString(string format, IFormatProvider formatProvider) {
+      return Showing.ShowString(this, format, formatProvider);
+    }
+
+    #region ICollection<T> Members
+
+    /// <summary>
+    /// Must be overridden to allow adding items to this collection.
+    /// </summary>
+    /// <remarks><p>This method is not abstract, although derived classes should always
+    /// override it. It is not abstract because some derived classes may wish to reimplement
+    /// Add with a different return type (typically bool). In C#, this can be accomplished
+    /// with code like the following:</p>
+    /// <code>
+    ///     public class MyCollection&lt;T&gt;: CollectionBase&lt;T&gt;, ICollection&lt;T&gt;
+    ///     {
+    ///         public new bool Add(T item) {
+    ///             /* Add the item */
+    ///         }
+    ///  
+    ///         void ICollection&lt;T&gt;.Add(T item) {
+    ///             Add(item);
+    ///         }
+    ///     }
+    /// </code>
     /// </remarks>
-    /// <typeparam name="T">The item type of the collection.</typeparam>
-
-    [DebuggerDisplay("{DebuggerDisplayString()}")]
-    public partial class CollectionBase<T> : ICollection<T>, ICollection, IList<T>, ICollectionBase<T>, IShowable 
-    {
-        #region Events
-        /// <summary>
-        /// Occurs when an item is added to the collection.
-        /// </summary>
-        public event EventHandler<CollectionEventArgs<T>> OnItemAdded;
-        /// <summary>
-        /// Occurs when an item is removed from the collection.
-        /// </summary>
-        public event EventHandler<CollectionEventArgs<T>> OnItemRemoved;
-        /// <summary>
-        /// Occurs when the collection is cleared.
-        /// </summary>
-        public event EventHandler OnClear;
-        #endregion
-
-        #region Fields
-        /// <summary>
-        /// the internal generic list on which this collection is based
-        /// </summary>                                                                    
-        protected List<T> innerList;
-        /// <summary>
-        /// whether this collection is readonly
-        /// </summary>
-        bool mReadOnly = false;
-        #endregion
-
-        #region Properties
-        /// <summary>
-        /// Indicates whether the collection is read-only. 
-        /// </summary>
-        bool ICollection<T>.IsReadOnly
-        {
-            get
-            {
-                return mReadOnly;
-            }
+    /// <param name="item">Item to be added to the collection.</param>
+    /// <exception cref="NotImplementedException">Always throws this exception to indicated
+    /// that the method must be overridden or re-implemented in the derived class.</exception>
+    public virtual void Add(T item) {
+      if (item == null) throw new InconsistencyException("Adding 'null' to the collection is not allowed.");
+      if (mReadOnly)
+        throw new InconsistencyException("The collection is read only");
+      this.innerList.Add(item);
+      RaiseOnItemAdded(item);
+
+    }
+    /// <summary>
+    /// Determines the index of a specific item in the <see cref="T:System.Collections.Generic.IList`1"></see>.
+    /// </summary>
+    /// <param name="item">The object to locate in the <see cref="T:System.Collections.Generic.IList`1"></see>.</param>
+    /// <returns>
+    /// The index of item if found in the list; otherwise, -1.
+    /// </returns>
+    public int IndexOf(T item) {
+      return this.innerList.IndexOf(item);
+    }
+
+    /// <summary>
+    /// Inserts the specified item at the specified index.
+    /// </summary>
+    /// <param name="index">The index.</param>
+    /// <param name="item">A parameter of the generics Type T</param>
+    public virtual void Insert(int index, T item) {
+      if (mReadOnly)
+        throw new InconsistencyException("The collection is read only");
+      if (item.Equals(default(T)))
+        return;
+      this.innerList.Insert(index, item);
+      RaiseOnItemAdded(item);
+    }
+
+    /// <summary>
+    /// Adds a collection range to this collection.
+    /// </summary>
+    /// <param name="items">The items.</param>
+    public virtual void AddRange(CollectionBase<T> items) {
+      if (mReadOnly)
+        throw new InconsistencyException("The collection is read only");
+      this.innerList.AddRange(items);
+      foreach (T item in items) {
+        RaiseOnItemAdded(item);
+      }
+    }
+
+    private void RaiseOnItemAdded(T item) {
+      if (OnItemAdded != null)
+        OnItemAdded(this, new CollectionEventArgs<T>(item));
+    }
+
+    private void RaiseOnItemRemoved(T item) {
+      if (OnItemRemoved != null)
+        OnItemRemoved(this, new CollectionEventArgs<T>(item));
+    }
+    private void RaiseOnClear() {
+      if (OnClear != null)
+        OnClear(this, EventArgs.Empty);
+    }
+
+
+
+    /// <summary>
+    /// Must be overridden to allow clearing this collection.
+    /// </summary>
+    public virtual void Clear() {
+      RaiseOnClear();
+      innerList.Clear();
+    }
+
+    /// <summary>
+    /// Must be overridden to allow removing items from this collection.
+    /// </summary>
+    /// <returns>True if <paramref name="item"/> existed in the collection and
+    /// was removed. False if <paramref name="item"/> did not exist in the collection.</returns>
+    public virtual bool Remove(T item) {
+
+      bool result = this.innerList.Remove(item);
+      if (result) {
+        RaiseOnItemRemoved(item);
+      }
+      return result;
+    }
+
+    /// <summary>
+    /// Determines if the collection contains a particular item. This default implementation
+    /// iterates all of the items in the collection via GetEnumerator, testing each item
+    /// against <paramref name="item"/> using IComparable&lt;T&gt;.Equals or
+    /// Object.Equals.
+    /// </summary>
+    /// <remarks>You should strongly consider overriding this method to provide
+    /// a more efficient implementation, or if the default equality comparison
+    /// is inappropriate.</remarks>
+    /// <param name="item">The item to check for in the collection.</param>
+    /// <returns>True if the collection contains <paramref name="item"/>, false otherwise.</returns>
+    public virtual bool Contains(T item) {
+      return this.innerList.Contains(item);
+
+    }
+
+    /// <summary>
+    /// Copies all the items in the collection into an array. Implemented by
+    /// using the enumerator returned from GetEnumerator to get all the items
+    /// and copy them to the provided array.
+    /// </summary>
+    /// <param name="array">Array to copy to.</param>
+    /// <param name="arrayIndex">Starting index in <paramref name="array"/> to copy to.</param>
+    public virtual void CopyTo(T[] array, int arrayIndex) {
+      int count = this.Count;
+
+      if (count == 0)
+        return;
+
+      if (array == null)
+        throw new ArgumentNullException("array");
+      if (count < 0)
+        throw new ArgumentOutOfRangeException("count", count, Resource1.ArgumentOutOfRange);
+      if (arrayIndex < 0)
+        throw new ArgumentOutOfRangeException("arrayIndex", arrayIndex, Resource1.ArgumentOutOfRange);
+      if (arrayIndex >= array.Length || count > array.Length - arrayIndex)
+        throw new ArgumentException("arrayIndex", Resource1.ArrayTooSmall);
+
+      int index = arrayIndex, i = 0;
+      foreach (T item in (ICollection<T>)this) {
+        if (i >= count)
+          break;
+
+        array[index] = item;
+        ++index;
+        ++i;
+      }
+    }
+
+    /// <summary>
+    /// Creates an array of the correct size, and copies all the items in the 
+    /// collection into the array, by calling CopyTo.
+    /// </summary>
+    /// <returns>An array containing all the elements in the collection, in order.</returns>
+    public virtual T[] ToArray() {
+      int count = this.Count;
+
+      T[] array = new T[count];
+      CopyTo(array, 0);
+      return array;
+    }
+
+    /// <summary>
+    /// Must be overridden to provide the number of items in the collection.
+    /// </summary>
+    /// <value>The number of items in the collection.</value>
+    public virtual int Count { get { return innerList.Count; } }
+
+
+
+    #endregion
+
+    #region Delegate operations
+
+    /// <summary>
+    /// Determines if the collection contains any item that satisfies the condition
+    /// defined by <paramref name="predicate"/>.
+    /// </summary>
+    /// <param name="predicate">A delegate that defines the condition to check for.</param>
+    /// <returns>True if the collection contains one or more items that satisfy the condition
+    /// defined by <paramref name="predicate"/>. False if the collection does not contain
+    /// an item that satisfies <paramref name="predicate"/>.</returns>
+    public virtual bool Exists(Predicate<T> predicate) {
+      if (predicate == null)
+        throw new ArgumentNullException("predicate");
+
+      return Algorithms.Exists(this, predicate);
+    }
+
+    /// <summary>
+    /// Determines if all of the items in the collection satisfy the condition
+    /// defined by <paramref name="predicate"/>.
+    /// </summary>
+    /// <param name="predicate">A delegate that defines the condition to check for.</param>
+    /// <returns>True if all of the items in the collection satisfy the condition
+    /// defined by <paramref name="predicate"/>, or if the collection is empty. False if one or more items
+    /// in the collection do not satisfy <paramref name="predicate"/>.</returns>
+    public virtual bool TrueForAll(Predicate<T> predicate) {
+      if (predicate == null)
+        throw new ArgumentNullException("predicate");
+
+      return Algorithms.TrueForAll(this, predicate);
+    }
+    /*
+   /// <summary>
+   /// Counts the number of items in the collection that satisfy the condition
+   /// defined by <paramref name="predicate"/>.
+   /// </summary>
+   /// <param name="predicate">A delegate that defines the condition to check for.</param>
+   /// <returns>The number of items in the collection that satisfy <paramref name="predicate"/>.</returns>
+   public virtual int CountWhere(Predicate<T> predicate)
+   {
+       if (predicate == null)
+           throw new ArgumentNullException("predicate");
+
+       return Algorithms.CountWhere(this, predicate);
+   }
+     */
+    /// <summary>
+    /// Finds the first item in the collection satisfying the given predicate
+    /// </summary>
+    /// <param name="predicate">a searching predictae</param>
+    /// <returns>an item satisfying the criteria (if any)</returns>
+    public virtual T Find(Predicate<T> predicate) {
+      foreach (T item in this.innerList) {
+        if (predicate(item))
+          return item;
+      }
+      return default(T);
+    }
+
+
+    /// <summary>
+    /// Removes all the items in the collection that satisfy the condition
+    /// defined by <paramref name="predicate"/>.
+    /// </summary>
+    /// <param name="predicate">A delegate that defines the condition to check for.</param>
+    /// <returns>Returns a collection of the items that were removed, in sorted order.</returns>
+    public virtual ICollection<T> RemoveAll(Predicate<T> predicate) {
+      if (predicate == null)
+        throw new ArgumentNullException("predicate");
+
+      return Algorithms.RemoveWhere(this, predicate);
+    }
+
+    /// <summary>
+    /// Performs the specified action on each item in this collection.
+    /// </summary>
+    /// <param name="action">An Action delegate which is invoked for each item in this collection.</param>
+    public virtual void ForEach(Action<T> action) {
+      if (action == null)
+        throw new ArgumentNullException("action");
+
+      Algorithms.ForEach(this, action);
+    }
+
+
+
+    #endregion
+
+    #region IEnumerable<T> Members
+
+    /// <summary>
+    /// Must be overridden to enumerate all the members of the collection.
+    /// </summary>
+    /// <returns>A generic IEnumerator&lt;T&gt; that can be used
+    /// to enumerate all the items in the collection.</returns>
+    public virtual IEnumerator<T> GetEnumerator() {
+      return this.innerList.GetEnumerator();
+    }
+
+
+    #endregion
+
+    #region ICollection Members
+
+    /// <summary>
+    /// Copies all the items in the collection into an array. Implemented by
+    /// using the enumerator returned from GetEnumerator to get all the items
+    /// and copy them to the provided array.
+    /// </summary>
+    /// <param name="array">Array to copy to.</param>
+    /// <param name="index">Starting index in <paramref name="array"/> to copy to.</param>
+    void ICollection.CopyTo(Array array, int index) {
+      int count = this.Count;
+
+      if (count == 0)
+        return;
+
+      if (array == null)
+        throw new ArgumentNullException("array");
+      if (index < 0)
+        throw new ArgumentOutOfRangeException("index", index, Resource1.ArgumentOutOfRange);
+      if (index >= array.Length || count > array.Length - index)
+        throw new ArgumentException("index", Resource1.ArrayTooSmall);
+
+      int i = 0;
+      foreach (object o in (ICollection)this) {
+        if (i >= count)
+          break;
+
+        array.SetValue(o, index);
+        ++index;
+        ++i;
+      }
+    }
+
+    /// <summary>
+    /// Indicates whether the collection is synchronized.
+    /// </summary>
+    /// <value>Always returns false, indicating that the collection is not synchronized.</value>
+    bool ICollection.IsSynchronized {
+      get { return IsSynchronized; }
+    }
+
+    /// <summary>
+    /// See code analysis CA1033
+    /// </summary>
+    protected bool IsSynchronized {
+      get { return false; }
+    }
+    /// <summary>
+    /// Indicates the synchronization object for this collection.
+    /// </summary>
+    /// <value>Always returns this.</value>
+    object ICollection.SyncRoot {
+      get { return SyncRoot; }
+    }
+
+    /// <summary>
+    /// See code analysis CA1033
+    /// </summary>
+    protected object SyncRoot {
+      get { return this; }
+    }
+
+    #endregion
+
+    #region IEnumerable Members
+
+    /// <summary>
+    /// Provides an IEnumerator that can be used to iterate all the members of the
+    /// collection. This implementation uses the IEnumerator&lt;T&gt; that was overridden
+    /// by the derived classes to enumerate the members of the collection.
+    /// </summary>
+    /// <returns>An IEnumerator that can be used to iterate the collection.</returns>
+    IEnumerator IEnumerable.GetEnumerator() {
+      foreach (T item in this) {
+        yield return item;
+      }
+    }
+
+    #endregion
+
+    /// <summary>
+    /// Display the contents of the collection in the debugger. This is intentionally private, it is called
+    /// only from the debugger due to the presence of the DebuggerDisplay attribute. It is similar
+    /// format to ToString(), but is limited to 250-300 characters or so, so as not to overload the debugger.
+    /// </summary>
+    /// <returns>The string representation of the items in the collection, similar in format to ToString().</returns>
+    internal string DebuggerDisplayString() {
+      const int MAXLENGTH = 250;
+
+      System.Text.StringBuilder builder = new System.Text.StringBuilder();
+
+      builder.Append('{');
+
+      // Call ToString on each item and put it in.
+      bool firstItem = true;
+      foreach (T item in this) {
+        if (builder.Length >= MAXLENGTH) {
+          builder.Append(",...");
+          break;
         }
 
-        /// <summary>
-        /// Gets a value indicating whether this instance is empty.
-        /// </summary>
-        /// <value><c>true</c> if this instance is empty; otherwise, <c>false</c>.</value>
-        public virtual bool IsEmpty
-        {
-            get { return this.innerList.Count == 0; }
-        }
-        #endregion
-
-        
-
-        #region Constructor
-        
-        /// <summary>
-        /// Creates a new CollectionBase. 
-        /// </summary>
-        public  CollectionBase()
-        {
-            innerList = new List<T>();
-        }
-
-        /// <summary>
-        /// Initializes a new instance of the <see cref="T:CollectionBase&lt;T&gt;"/> class.
-        /// </summary>
-        /// <param name="baseCollection">The base collection.</param>
-        public CollectionBase(ICollectionBase<T> baseCollection) : this()
-        {
-            innerList.AddRange(baseCollection);   
-        }
-
-        /// <summary>
-        /// Initializes a new instance of the <see cref="T:CollectionBase&lt;T&gt;"/> class.
-        /// </summary>
-        /// <param name="baseCollection">The base collection.</param>
-        /// <param name="readOnly">if set to <c>true</c> [read only].</param>
-        public CollectionBase(ICollectionBase<T> baseCollection, bool readOnly)
-            : this()
-        {
-            mReadOnly = readOnly;
-            //innerList = new System.Collections.ObjectModel.ReadOnlyCollection<T>(baseCollection);
-            innerList.AddRange(baseCollection);
-        }
-
-        
-        
-
-        #endregion
-
-        /// <summary>
-        /// Shows the string representation of the collection. The string representation contains
-        /// a list of the items in the collection. Contained collections (except string) are expanded
-        /// recursively.
-        /// </summary>
-        /// <returns>The string representation of the collection.</returns>
-        public override string ToString()
-        {
-            return Algorithms.ToString(this);
-        }
-        /// <summary>
-        /// Returns a string representation of this collection.
-        /// </summary>
-        /// <param name="format">The format.</param>
-        /// <param name="formatProvider">The format provider.</param>
-        /// <returns></returns>
-        public virtual string ToString(string format, IFormatProvider formatProvider)
-        {
-            return Showing.ShowString(this, format, formatProvider);
-        }
-
-        #region ICollection<T> Members
-
-        /// <summary>
-        /// Must be overridden to allow adding items to this collection.
-        /// </summary>
-        /// <remarks><p>This method is not abstract, although derived classes should always
-        /// override it. It is not abstract because some derived classes may wish to reimplement
-        /// Add with a different return type (typically bool). In C#, this can be accomplished
-        /// with code like the following:</p>
-        /// <code>
-        ///     public class MyCollection&lt;T&gt;: CollectionBase&lt;T&gt;, ICollection&lt;T&gt;
-        ///     {
-        ///         public new bool Add(T item) {
-        ///             /* Add the item */
-        ///         }
-        ///  
-        ///         void ICollection&lt;T&gt;.Add(T item) {
-        ///             Add(item);
-        ///         }
-        ///     }
-        /// </code>
-        /// </remarks>
-        /// <param name="item">Item to be added to the collection.</param>
-        /// <exception cref="NotImplementedException">Always throws this exception to indicated
-        /// that the method must be overridden or re-implemented in the derived class.</exception>
-        public virtual void Add(T item)
-        {
-            if(item==null) throw new InconsistencyException("Adding 'null' to the collection is not allowed.");
-            if (mReadOnly)
-                throw new InconsistencyException("The collection is read only");
-            this.innerList.Add(item);
-            RaiseOnItemAdded(item);
-
-        }
-        /// <summary>
-        /// Determines the index of a specific item in the <see cref="T:System.Collections.Generic.IList`1"></see>.
-        /// </summary>
-        /// <param name="item">The object to locate in the <see cref="T:System.Collections.Generic.IList`1"></see>.</param>
-        /// <returns>
-        /// The index of item if found in the list; otherwise, -1.
-        /// </returns>
-        public int IndexOf(T item)
-        {
-            return this.innerList.IndexOf(item);
-        }
-
-        /// <summary>
-        /// Inserts the specified item at the specified index.
-        /// </summary>
-        /// <param name="index">The index.</param>
-        /// <param name="item">A parameter of the generics Type T</param>
-        public virtual void Insert(int index, T item)
-        {
-            if (mReadOnly)
-                throw new InconsistencyException("The collection is read only");
-            if(item.Equals(default(T)))
-                return;
-            this.innerList.Insert(index, item);
-            RaiseOnItemAdded(item);
-        }
-
-        /// <summary>
-        /// Adds a collection range to this collection.
-        /// </summary>
-        /// <param name="items">The items.</param>
-        public virtual void AddRange(CollectionBase<T> items)
-        {
-            if (mReadOnly)
-                throw new InconsistencyException("The collection is read only");
-            this.innerList.AddRange(items);
-            foreach (T item in items)
-            {
-                RaiseOnItemAdded(item);
-            }
-        }
-
-        private void RaiseOnItemAdded(T item)
-        {
-            if (OnItemAdded != null)
-                OnItemAdded(this, new CollectionEventArgs<T>(item));
-        }
-
-        private void RaiseOnItemRemoved(T item)
-        {
-            if (OnItemRemoved != null)
-                OnItemRemoved(this, new CollectionEventArgs<T>(item));
-        }
-        private void RaiseOnClear()
-        {
-            if (OnClear != null)
-                OnClear(this, EventArgs.Empty);
-        }
-
-
-
-        /// <summary>
-        /// Must be overridden to allow clearing this collection.
-        /// </summary>
-        public virtual void Clear()
-        {
-            RaiseOnClear();
-            innerList.Clear();
-        }
-
-        /// <summary>
-        /// Must be overridden to allow removing items from this collection.
-        /// </summary>
-        /// <returns>True if <paramref name="item"/> existed in the collection and
-        /// was removed. False if <paramref name="item"/> did not exist in the collection.</returns>
-        public virtual bool Remove(T item)
-        {
-            
-            bool result =  this.innerList.Remove(item);
-            if (result)
-            {
-                RaiseOnItemRemoved(item);
-            }
-            return result;
-        }
-
-        /// <summary>
-        /// Determines if the collection contains a particular item. This default implementation
-        /// iterates all of the items in the collection via GetEnumerator, testing each item
-        /// against <paramref name="item"/> using IComparable&lt;T&gt;.Equals or
-        /// Object.Equals.
-        /// </summary>
-        /// <remarks>You should strongly consider overriding this method to provide
-        /// a more efficient implementation, or if the default equality comparison
-        /// is inappropriate.</remarks>
-        /// <param name="item">The item to check for in the collection.</param>
-        /// <returns>True if the collection contains <paramref name="item"/>, false otherwise.</returns>
-        public virtual bool Contains(T item)
-        {
-            return this.innerList.Contains(item);
-
-        }
-
-        /// <summary>
-        /// Copies all the items in the collection into an array. Implemented by
-        /// using the enumerator returned from GetEnumerator to get all the items
-        /// and copy them to the provided array.
-        /// </summary>
-        /// <param name="array">Array to copy to.</param>
-        /// <param name="arrayIndex">Starting index in <paramref name="array"/> to copy to.</param>
-        public virtual void CopyTo(T[] array, int arrayIndex)
-        {
-            int count = this.Count;
-
-            if (count == 0)
-                return;
-
-            if (array == null)
-                throw new ArgumentNullException("array");
-            if (count < 0)
-                throw new ArgumentOutOfRangeException("count", count, Resource1.ArgumentOutOfRange);
-            if (arrayIndex < 0)
-                throw new ArgumentOutOfRangeException("arrayIndex", arrayIndex, Resource1.ArgumentOutOfRange);
-            if (arrayIndex >= array.Length || count > array.Length - arrayIndex)
-                throw new ArgumentException("arrayIndex", Resource1.ArrayTooSmall);
-
-            int index = arrayIndex, i = 0;
-            foreach (T item in (ICollection<T>)this)
-            {
-                if (i >= count)
-                    break;
-
-                array[index] = item;
-                ++index;
-                ++i;
-            }
-        }
-
-        /// <summary>
-        /// Creates an array of the correct size, and copies all the items in the 
-        /// collection into the array, by calling CopyTo.
-        /// </summary>
-        /// <returns>An array containing all the elements in the collection, in order.</returns>
-        public virtual T[] ToArray()
-        {
-            int count = this.Count;
-
-            T[] array = new T[count];
-            CopyTo(array, 0);
-            return array;
-        }
-
-        /// <summary>
-        /// Must be overridden to provide the number of items in the collection.
-        /// </summary>
-        /// <value>The number of items in the collection.</value>
-        public virtual int Count { get { return innerList.Count; } }
-
-
-
-        #endregion
-
-        #region Delegate operations
-
-        /// <summary>
-        /// Determines if the collection contains any item that satisfies the condition
-        /// defined by <paramref name="predicate"/>.
-        /// </summary>
-        /// <param name="predicate">A delegate that defines the condition to check for.</param>
-        /// <returns>True if the collection contains one or more items that satisfy the condition
-        /// defined by <paramref name="predicate"/>. False if the collection does not contain
-        /// an item that satisfies <paramref name="predicate"/>.</returns>
-        public virtual bool Exists(Predicate<T> predicate)
-        {
-            if (predicate == null)
-                throw new ArgumentNullException("predicate");
-
-            return Algorithms.Exists(this, predicate);
-        }
-
-        /// <summary>
-        /// Determines if all of the items in the collection satisfy the condition
-        /// defined by <paramref name="predicate"/>.
-        /// </summary>
-        /// <param name="predicate">A delegate that defines the condition to check for.</param>
-        /// <returns>True if all of the items in the collection satisfy the condition
-        /// defined by <paramref name="predicate"/>, or if the collection is empty. False if one or more items
-        /// in the collection do not satisfy <paramref name="predicate"/>.</returns>
-        public virtual bool TrueForAll(Predicate<T> predicate)
-        {
-            if (predicate == null)
-                throw new ArgumentNullException("predicate");
-
-            return Algorithms.TrueForAll(this, predicate);
-        }
-         /*
-        /// <summary>
-        /// Counts the number of items in the collection that satisfy the condition
-        /// defined by <paramref name="predicate"/>.
-        /// </summary>
-        /// <param name="predicate">A delegate that defines the condition to check for.</param>
-        /// <returns>The number of items in the collection that satisfy <paramref name="predicate"/>.</returns>
-        public virtual int CountWhere(Predicate<T> predicate)
-        {
-            if (predicate == null)
-                throw new ArgumentNullException("predicate");
-
-            return Algorithms.CountWhere(this, predicate);
-        }
-          */
-        /// <summary>
-        /// Finds the first item in the collection satisfying the given predicate
-        /// </summary>
-        /// <param name="predicate">a searching predictae</param>
-        /// <returns>an item satisfying the criteria (if any)</returns>
-        public virtual T Find(Predicate<T> predicate)
-        {
-            foreach (T item in this.innerList)
-            {
-                if (predicate(item))
-                    return item;
-            }
-            return default(T);
-        }
-
-
-        /// <summary>
-        /// Removes all the items in the collection that satisfy the condition
-        /// defined by <paramref name="predicate"/>.
-        /// </summary>
-        /// <param name="predicate">A delegate that defines the condition to check for.</param>
-        /// <returns>Returns a collection of the items that were removed, in sorted order.</returns>
-        public virtual ICollection<T> RemoveAll(Predicate<T> predicate)
-        {
-            if (predicate == null)
-                throw new ArgumentNullException("predicate");
-
-            return Algorithms.RemoveWhere(this, predicate);
-        }
-
-        /// <summary>
-        /// Performs the specified action on each item in this collection.
-        /// </summary>
-        /// <param name="action">An Action delegate which is invoked for each item in this collection.</param>
-        public virtual void ForEach(Action<T> action)
-        {
-            if (action == null)
-                throw new ArgumentNullException("action");
-
-            Algorithms.ForEach(this, action);
-        }
-
-
-
-        #endregion
-
-        #region IEnumerable<T> Members
-
-        /// <summary>
-        /// Must be overridden to enumerate all the members of the collection.
-        /// </summary>
-        /// <returns>A generic IEnumerator&lt;T&gt; that can be used
-        /// to enumerate all the items in the collection.</returns>
-        public virtual IEnumerator<T> GetEnumerator()
-        {
-            return this.innerList.GetEnumerator();
-        }
-
-
-        #endregion
-
-        #region ICollection Members
-
-        /// <summary>
-        /// Copies all the items in the collection into an array. Implemented by
-        /// using the enumerator returned from GetEnumerator to get all the items
-        /// and copy them to the provided array.
-        /// </summary>
-        /// <param name="array">Array to copy to.</param>
-        /// <param name="index">Starting index in <paramref name="array"/> to copy to.</param>
-        void ICollection.CopyTo(Array array, int index)
-        {
-            int count = this.Count;
-
-            if (count == 0)
-                return;
-
-            if (array == null)
-                throw new ArgumentNullException("array");
-            if (index < 0)
-                throw new ArgumentOutOfRangeException("index", index, Resource1.ArgumentOutOfRange);
-            if (index >= array.Length || count > array.Length - index)
-                throw new ArgumentException("index", Resource1.ArrayTooSmall);
-
-            int i = 0;
-            foreach (object o in (ICollection)this)
-            {
-                if (i >= count)
-                    break;
-
-                array.SetValue(o, index);
-                ++index;
-                ++i;
-            }
-        }
-
-        /// <summary>
-        /// Indicates whether the collection is synchronized.
-        /// </summary>
-        /// <value>Always returns false, indicating that the collection is not synchronized.</value>
-        bool ICollection.IsSynchronized
-        {
-            get { return IsSynchronized; }
-        }
-
-        /// <summary>
-        /// See code analysis CA1033
-        /// </summary>
-        protected bool IsSynchronized
-        {
-            get { return false; }
-        }
-        /// <summary>
-        /// Indicates the synchronization object for this collection.
-        /// </summary>
-        /// <value>Always returns this.</value>
-        object ICollection.SyncRoot
-        {
-            get { return SyncRoot; }
-        }
-
-        /// <summary>
-        /// See code analysis CA1033
-        /// </summary>
-        protected object SyncRoot
-        {
-            get { return this; }
-        }
-
-        #endregion
-
-        #region IEnumerable Members
-
-        /// <summary>
-        /// Provides an IEnumerator that can be used to iterate all the members of the
-        /// collection. This implementation uses the IEnumerator&lt;T&gt; that was overridden
-        /// by the derived classes to enumerate the members of the collection.
-        /// </summary>
-        /// <returns>An IEnumerator that can be used to iterate the collection.</returns>
-        IEnumerator IEnumerable.GetEnumerator()
-        {
-            foreach (T item in this)
-            {
-                yield return item;
-            }
-        }
-
-        #endregion
-
-        /// <summary>
-        /// Display the contents of the collection in the debugger. This is intentionally private, it is called
-        /// only from the debugger due to the presence of the DebuggerDisplay attribute. It is similar
-        /// format to ToString(), but is limited to 250-300 characters or so, so as not to overload the debugger.
-        /// </summary>
-        /// <returns>The string representation of the items in the collection, similar in format to ToString().</returns>
-        internal string DebuggerDisplayString()
-        {
-            const int MAXLENGTH = 250;
-
-            System.Text.StringBuilder builder = new System.Text.StringBuilder();
-
-            builder.Append('{');
-
-            // Call ToString on each item and put it in.
-            bool firstItem = true;
-            foreach (T item in this)
-            {
-                if (builder.Length >= MAXLENGTH)
-                {
-                    builder.Append(",...");
-                    break;
-                }
-
-                if (!firstItem)
-                    builder.Append(',');
-
-                if (item == null)
-                    builder.Append("null");
-                else
-                    builder.Append(item.ToString());
-
-                firstItem = false;
-            }
-
-            builder.Append('}');
-            return builder.ToString();
-        }
-        /// <summary>
-        /// Removes an item at the given index
-        /// </summary>
-        /// <param name="index"></param>
-        public void RemoveAt(int index)
-        {
-            this.innerList.RemoveAt(index);
-        }
-        /// <summary>
-        /// Integer indexer
-        /// </summary>
-        /// <param name="index"></param>
-        /// <returns></returns>
-        public T this[int index]
-        {
-            get
-            {
-                return this.innerList[index];
-            }
-            set
-            {
-                this.innerList[index] = value;
-            }
-        }
-
-        /// <summary>
-        /// Returns a deep copy of this collection.
-        /// <remarks>The returned collection is not attached to the <see cref="Model"/>
-        /// and is as such on an in-memory collection of instances. You need to 'unwrap' the collection 
-        /// in the model and, to make it visible, deploy it in the paintables collection of the model.
-        /// </remarks>
-        /// </summary>
-        /// <returns></returns>
-        public CollectionBase<T> DeepCopy()
-        {
-            /* This doesn't work seemingly....
-            if (!typeof(T).IsSerializable)
-                throw new InconsistencyException("The generic type on which the collection is based is not serializable, the collection cannot generate a deep copy.");
-            */
-
-            try
-            {
-                
-                CollectionBase<T> newobj = null;
-                MemoryStream stream = new MemoryStream();
-                GenericFormatter<BinaryFormatter> f = new GenericFormatter<BinaryFormatter>();
-                f.Serialize(stream, this);
-                stream.Seek(0, SeekOrigin.Begin);
-                newobj = f.Deserialize<CollectionBase<T>>(stream);
-                stream.Close();
-                return newobj;
-            }
-            catch (Exception exc)
-            {
-                throw new InconsistencyException("The copy operation failed.", exc);
-            }
-
-        }
-        /// <summary>
-        /// Returns a copy of this instance.
-        /// </summary>
-        /// <returns></returns>
-        public CollectionBase<T> Copy()
-        {
-            CollectionBase<T> copy = new CollectionBase<T>();
-            foreach (T item in this.innerList)
-            {
-                copy.Add(item);
-            }
-            return copy;  
-        }
-        /// <summary>
-        /// This method creates first a deep copy of the collection and puts 
-        /// the result in a <see cref="MemoryStream"/>. 
-        /// See the <see cref="CopyTool"/> for details.
-        /// </summary>
-        /// <returns></returns>
-        public MemoryStream ToStream()
-        {
-            try
-            {
-
-                MemoryStream stream = new MemoryStream();
-                GenericFormatter<BinaryFormatter> f = 
-                    new GenericFormatter<BinaryFormatter>();
-                f.Serialize(stream, this);
-                return stream;
-            }
-            catch (Exception exc)
-            {
-                throw new InconsistencyException(
-                    "The ToStream() operation failed.", 
-                    exc);
-            }
-
-        }
-
-        /// <summary>
-        /// Format <code>this</code> using at most approximately <code>rest</code> chars and
-        /// append the result, possibly truncated, to stringbuilder.
-        /// Subtract the actual number of used chars from <code>rest</code>.
-        /// </summary>
-        /// <param name="stringbuilder"></param>
-        /// <param name="rest"></param>
-        /// <param name="formatProvider"></param>
-        /// <returns>
-        /// True if the appended formatted string was complete (not truncated).
-        /// </returns>
-        public virtual bool Show(System.Text.StringBuilder stringbuilder, ref int rest, IFormatProvider formatProvider)
-        {
-            return true;
-        }
-      
-    }
-
-   
-    
-
-
-    
+        if (!firstItem)
+          builder.Append(',');
+
+        if (item == null)
+          builder.Append("null");
+        else
+          builder.Append(item.ToString());
+
+        firstItem = false;
+      }
+
+      builder.Append('}');
+      return builder.ToString();
+    }
+    /// <summary>
+    /// Removes an item at the given index
+    /// </summary>
+    /// <param name="index"></param>
+    public void RemoveAt(int index) {
+      this.innerList.RemoveAt(index);
+    }
+    /// <summary>
+    /// Integer indexer
+    /// </summary>
+    /// <param name="index"></param>
+    /// <returns></returns>
+    public T this[int index] {
+      get {
+        return this.innerList[index];
+      }
+      set {
+        this.innerList[index] = value;
+      }
+    }
+
+    /// <summary>
+    /// Returns a deep copy of this collection.
+    /// <remarks>The returned collection is not attached to the <see cref="Model"/>
+    /// and is as such on an in-memory collection of instances. You need to 'unwrap' the collection 
+    /// in the model and, to make it visible, deploy it in the paintables collection of the model.
+    /// </remarks>
+    /// </summary>
+    /// <returns></returns>
+    public CollectionBase<T> DeepCopy() {
+      /* This doesn't work seemingly....
+      if (!typeof(T).IsSerializable)
+          throw new InconsistencyException("The generic type on which the collection is based is not serializable, the collection cannot generate a deep copy.");
+      */
+
+      try {
+
+        CollectionBase<T> newobj = null;
+        MemoryStream stream = new MemoryStream();
+        GenericFormatter<BinaryFormatter> f = new GenericFormatter<BinaryFormatter>();
+        f.Serialize(stream, this);
+        stream.Seek(0, SeekOrigin.Begin);
+        newobj = f.Deserialize<CollectionBase<T>>(stream);
+        stream.Close();
+        return newobj;
+      }
+      catch (Exception exc) {
+        throw new InconsistencyException("The copy operation failed.", exc);
+      }
+
+    }
+    /// <summary>
+    /// Returns a copy of this instance.
+    /// </summary>
+    /// <returns></returns>
+    public CollectionBase<T> Copy() {
+      CollectionBase<T> copy = new CollectionBase<T>();
+      foreach (T item in this.innerList) {
+        copy.Add(item);
+      }
+      return copy;
+    }
+    /// <summary>
+    /// This method creates first a deep copy of the collection and puts 
+    /// the result in a <see cref="MemoryStream"/>. 
+    /// See the <see cref="CopyTool"/> for details.
+    /// </summary>
+    /// <returns></returns>
+    public MemoryStream ToStream() {
+      try {
+
+        MemoryStream stream = new MemoryStream();
+        GenericFormatter<BinaryFormatter> f =
+            new GenericFormatter<BinaryFormatter>();
+        f.Serialize(stream, this);
+        return stream;
+      }
+      catch (Exception exc) {
+        throw new InconsistencyException(
+            "The ToStream() operation failed.",
+            exc);
+      }
+
+    }
+
+    /// <summary>
+    /// Format <code>this</code> using at most approximately <code>rest</code> chars and
+    /// append the result, possibly truncated, to stringbuilder.
+    /// Subtract the actual number of used chars from <code>rest</code>.
+    /// </summary>
+    /// <param name="stringbuilder"></param>
+    /// <param name="rest"></param>
+    /// <param name="formatProvider"></param>
+    /// <returns>
+    /// True if the appended formatted string was complete (not truncated).
+    /// </returns>
+    public virtual bool Show(System.Text.StringBuilder stringbuilder, ref int rest, IFormatProvider formatProvider) {
+      return true;
+    }
+
+  }
+
+
+
+
+
+
 }
Index: /trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.Netron/3.0.2672.12446/Netron.Diagramming.Core-3.0.2672.12446/Collections/ICollectionBase.cs
===================================================================
--- /trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.Netron/3.0.2672.12446/Netron.Diagramming.Core-3.0.2672.12446/Collections/ICollectionBase.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.Netron/3.0.2672.12446/Netron.Diagramming.Core-3.0.2672.12446/Collections/ICollectionBase.cs	(revision 4068)
@@ -1,102 +1,98 @@
 ﻿using System;
-using System.Collections;
 using System.Collections.Generic;
-using System.IO;
-namespace Netron.Diagramming.Core
-{
+namespace Netron.Diagramming.Core {
+  /// <summary>
+  /// Describes the CollectionBase collection.
+  /// </summary>
+  /// <typeparam name="T"></typeparam>
+  public interface ICollectionBase<T> : ICollection<T>, IList<T> {
+    #region Events
     /// <summary>
-    /// Describes the CollectionBase collection.
+    /// Occurs when the collection is cleared.
     /// </summary>
-    /// <typeparam name="T"></typeparam>
-    public interface ICollectionBase<T> : ICollection<T>, IList<T>
-    {
-        #region Events
-        /// <summary>
-        /// Occurs when the collection is cleared.
-        /// </summary>
-        event EventHandler OnClear;
-        /// <summary>
-        /// Occurs when an item is added to the collection.
-        /// </summary>
-        event EventHandler<CollectionEventArgs<T>> OnItemAdded;
-        /// <summary>
-        /// Occurs when en item is removed from the collection.
-        /// </summary>
-        event EventHandler<CollectionEventArgs<T>> OnItemRemoved;
-        #endregion
+    event EventHandler OnClear;
+    /// <summary>
+    /// Occurs when an item is added to the collection.
+    /// </summary>
+    event EventHandler<CollectionEventArgs<T>> OnItemAdded;
+    /// <summary>
+    /// Occurs when en item is removed from the collection.
+    /// </summary>
+    event EventHandler<CollectionEventArgs<T>> OnItemRemoved;
+    #endregion
 
-        #region Properties
-      
-        #endregion
+    #region Properties
 
-        #region Methods
-        /// <summary>
-        /// Adds the range of items to the collection.
-        /// </summary>
-        /// <param name="items">The items.</param>
-        void AddRange(CollectionBase<T> items);
-        /// <summary>
-        /// Copies this instance.
-        /// </summary>
-        /// <returns></returns>
-        CollectionBase<T> Copy();
-        /// <summary>
-        /// Creates a deep copy of this instance.
-        /// </summary>
-        /// <returns></returns>
-        CollectionBase<T> DeepCopy();
-        /// <summary>
-        /// Uses the given predicate to test the existence of a certain item in the collection.
-        /// </summary>
-        /// <param name="predicate">The predicate.</param>
-        /// <returns></returns>
-        bool Exists(Predicate<T> predicate);
-        /// <summary>
-        /// Finds the specified predicate.
-        /// </summary>
-        /// <param name="predicate">The predicate.</param>
-        /// <returns></returns>
-        T Find(Predicate<T> predicate);
-        /// <summary>
-        /// Uses the given Action to act on the collection items
-        /// </summary>
-        /// <param name="action">The action.</param>
-        void ForEach(Action<T> action);
-       
-      
-        ICollection<T> RemoveAll(Predicate<T> predicate);
+    #endregion
 
-        /// <summary>
-        /// Converts the collection to an array.
-        /// </summary>
-        /// <returns></returns>
-        T[] ToArray();
-        /// <summary>
-        /// Specific copy/paste utility function.
-        /// </summary>
-        /// <returns></returns>
-        System.IO.MemoryStream ToStream();
-        /// <summary>
-        /// Returns a string representation of the collection.
-        /// </summary>
-        /// <param name="format">The format.</param>
-        /// <param name="formatProvider">The format provider.</param>
-        /// <returns></returns>
-        string ToString(string format, IFormatProvider formatProvider);
-        /// <summary>
-        /// Returns a string representation of the collection.
-        /// </summary>
-        /// <returns></returns>
-        string ToString();
-        /// <summary>
-        /// Checks, using the given predicate, whether a certain property is true for all items in the collection.
-        /// </summary>
-        /// <param name="predicate">The predicate.</param>
-        /// <returns></returns>
-        bool TrueForAll(Predicate<T> predicate);
-        #endregion
+    #region Methods
+    /// <summary>
+    /// Adds the range of items to the collection.
+    /// </summary>
+    /// <param name="items">The items.</param>
+    void AddRange(CollectionBase<T> items);
+    /// <summary>
+    /// Copies this instance.
+    /// </summary>
+    /// <returns></returns>
+    CollectionBase<T> Copy();
+    /// <summary>
+    /// Creates a deep copy of this instance.
+    /// </summary>
+    /// <returns></returns>
+    CollectionBase<T> DeepCopy();
+    /// <summary>
+    /// Uses the given predicate to test the existence of a certain item in the collection.
+    /// </summary>
+    /// <param name="predicate">The predicate.</param>
+    /// <returns></returns>
+    bool Exists(Predicate<T> predicate);
+    /// <summary>
+    /// Finds the specified predicate.
+    /// </summary>
+    /// <param name="predicate">The predicate.</param>
+    /// <returns></returns>
+    T Find(Predicate<T> predicate);
+    /// <summary>
+    /// Uses the given Action to act on the collection items
+    /// </summary>
+    /// <param name="action">The action.</param>
+    void ForEach(Action<T> action);
 
-        
-        
-    }
+
+    ICollection<T> RemoveAll(Predicate<T> predicate);
+
+    /// <summary>
+    /// Converts the collection to an array.
+    /// </summary>
+    /// <returns></returns>
+    T[] ToArray();
+    /// <summary>
+    /// Specific copy/paste utility function.
+    /// </summary>
+    /// <returns></returns>
+    System.IO.MemoryStream ToStream();
+    /// <summary>
+    /// Returns a string representation of the collection.
+    /// </summary>
+    /// <param name="format">The format.</param>
+    /// <param name="formatProvider">The format provider.</param>
+    /// <returns></returns>
+    string ToString(string format, IFormatProvider formatProvider);
+    /// <summary>
+    /// Returns a string representation of the collection.
+    /// </summary>
+    /// <returns></returns>
+    string ToString();
+    /// <summary>
+    /// Checks, using the given predicate, whether a certain property is true for all items in the collection.
+    /// </summary>
+    /// <param name="predicate">The predicate.</param>
+    /// <returns></returns>
+    bool TrueForAll(Predicate<T> predicate);
+    #endregion
+
+
+
+  }
 }
Index: /trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.Netron/3.0.2672.12446/Netron.Diagramming.Core-3.0.2672.12446/Collections/StackBase.cs
===================================================================
--- /trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.Netron/3.0.2672.12446/Netron.Diagramming.Core-3.0.2672.12446/Collections/StackBase.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.Netron/3.0.2672.12446/Netron.Diagramming.Core-3.0.2672.12446/Collections/StackBase.cs	(revision 4068)
@@ -2,122 +2,111 @@
 using System.Collections;
 using System.Collections.Generic;
-using System.Diagnostics;
 
 
-namespace Netron.Diagramming.Core
-{
+namespace Netron.Diagramming.Core {
+  /// <summary>
+  /// This is a wrapper around the <see cref="Stack"/> which communicates Push and Pop events
+  /// </summary>
+  /// <typeparam name="T"></typeparam>
+  public class StackBase<T> {
+    #region Fields
     /// <summary>
-    /// This is a wrapper around the <see cref="Stack"/> which communicates Push and Pop events
+    /// the internal stack based on the .Net <see cref="Stack"/> implementation
     /// </summary>
-    /// <typeparam name="T"></typeparam>
-    public class StackBase<T>
-    {
-        #region Fields
-        /// <summary>
-        /// the internal stack based on the .Net <see cref="Stack"/> implementation
-        /// </summary>
-        private Stack<T> InnerStack;
-        #endregion
+    private Stack<T> InnerStack;
+    #endregion
 
-        #region Events
-        /// <summary>
-        /// Occurs when an item is pushed onto the stack
-        /// </summary>
-        public event EventHandler<CollectionEventArgs<T>> OnItemPushed;
-        /// <summary>
-        /// Occurs when an item is popped from the stack
-        /// </summary>
-        public event EventHandler<CollectionEventArgs<T>> OnItemPopped;
-        #endregion;
+    #region Events
+    /// <summary>
+    /// Occurs when an item is pushed onto the stack
+    /// </summary>
+    public event EventHandler<CollectionEventArgs<T>> OnItemPushed;
+    /// <summary>
+    /// Occurs when an item is popped from the stack
+    /// </summary>
+    public event EventHandler<CollectionEventArgs<T>> OnItemPopped;
+    #endregion;
 
-        #region Constructor
-        /// <summary>
-        /// Initializes a new instance of the <see cref="T:StackBase&lt;T&gt;"/> class.
-        /// </summary>
-        public StackBase()
-        {
-            InnerStack = new Stack<T>();
-        }
-        #endregion
+    #region Constructor
+    /// <summary>
+    /// Initializes a new instance of the <see cref="T:StackBase&lt;T&gt;"/> class.
+    /// </summary>
+    public StackBase() {
+      InnerStack = new Stack<T>();
+    }
+    #endregion
 
-        #region Methods
+    #region Methods
 
-        /// <summary>
-        /// Gets the number of elements in the stack
-        /// </summary>
-        /// <value>The count.</value>
-        public int Count
-        {
-            get { return InnerStack.Count; }
-        }
+    /// <summary>
+    /// Gets the number of elements in the stack
+    /// </summary>
+    /// <value>The count.</value>
+    public int Count {
+      get { return InnerStack.Count; }
+    }
 
 
-        /// <summary>
-        /// Pushes the specified item.
-        /// </summary>
-        /// <param name="item">A parameter of the generics Type T</param>
-        public void Push(T item)
-        {
+    /// <summary>
+    /// Pushes the specified item.
+    /// </summary>
+    /// <param name="item">A parameter of the generics Type T</param>
+    public void Push(T item) {
 
-            this.InnerStack.Push(item);
-            RaiseOnItemPushed(item);
+      this.InnerStack.Push(item);
+      RaiseOnItemPushed(item);
 
-        }
+    }
 
-        /// <summary>
-        /// Pops the next item from the stack
-        /// </summary>
-        /// <returns></returns>
-        public T Pop()
-        {
-            T item =
-             InnerStack.Pop();
-            RaiseOnItemPopped(item);
-            return item;
-        }
+    /// <summary>
+    /// Pops the next item from the stack
+    /// </summary>
+    /// <returns></returns>
+    public T Pop() {
+      T item =
+       InnerStack.Pop();
+      RaiseOnItemPopped(item);
+      return item;
+    }
 
-        /// <summary>
-        /// Peeks the next item in the stack
-        /// </summary>
-        /// <returns></returns>
-        public T Peek()
-        {
-            return InnerStack.Peek();
-        }
+    /// <summary>
+    /// Peeks the next item in the stack
+    /// </summary>
+    /// <returns></returns>
+    public T Peek() {
+      return InnerStack.Peek();
+    }
 
 
-        /// <summary>
-        /// Converts the stack to an array.
-        /// </summary>
-        /// <returns></returns>
-        public T[] ToArray()
-        {
-            return InnerStack.ToArray();
-        }
+    /// <summary>
+    /// Converts the stack to an array.
+    /// </summary>
+    /// <returns></returns>
+    public T[] ToArray() {
+      return InnerStack.ToArray();
+    }
 
 
-        /// <summary>
-        /// Raises the <see cref="OnItemPushed"/>.
-        /// </summary>
-        /// <param name="item">A parameter of the generics Type T</param>
-        private void RaiseOnItemPushed(T item)
-        {
-            EventHandler<CollectionEventArgs<T>> handler = OnItemPushed;
-            handler(this, new CollectionEventArgs<T>(item));
-        }
+    /// <summary>
+    /// Raises the <see cref="OnItemPushed"/>.
+    /// </summary>
+    /// <param name="item">A parameter of the generics Type T</param>
+    private void RaiseOnItemPushed(T item) {
+      EventHandler<CollectionEventArgs<T>> handler = OnItemPushed;
+      handler(this, new CollectionEventArgs<T>(item));
+    }
 
-        /// <summary>
-        /// Raises the on OnItemPopped event.
-        /// </summary>
-        /// <param name="item">A parameter of the generics Type T</param>
-        private void RaiseOnItemPopped(T item)
-        {
-            EventHandler<CollectionEventArgs<T>> handler = OnItemPopped;
-            handler(this, new CollectionEventArgs<T>(item));
-        }
+    /// <summary>
+    /// Raises the on OnItemPopped event.
+    /// </summary>
+    /// <param name="item">A parameter of the generics Type T</param>
+    private void RaiseOnItemPopped(T item) {
+      EventHandler<CollectionEventArgs<T>> handler = OnItemPopped;
+      handler(this, new CollectionEventArgs<T>(item));
+    }
 
 
-        #endregion
+    #endregion
 
-    }
+  }
 }
Index: /trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.Netron/3.0.2672.12446/Netron.Diagramming.Core-3.0.2672.12446/Core/Ambience.cs
===================================================================
--- /trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.Netron/3.0.2672.12446/Netron.Diagramming.Core-3.0.2672.12446/Core/Ambience.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.Netron/3.0.2672.12446/Netron.Diagramming.Core-3.0.2672.12446/Core/Ambience.cs	(revision 4068)
@@ -1,433 +1,389 @@
 using System;
-using System.Collections.Generic;
-using System.Text;
 using System.Drawing;
-using System.Drawing.Drawing2D;
-using System.Drawing.Design;
-using System.Runtime.Serialization;
-using System.Xml.Serialization;
-using System.Windows.Forms;
-
-namespace Netron.Diagramming.Core
-{
-    /// <summary>
-    /// <para>
-    /// The ambient properties of the canvas (background style, default line 
-    /// style etc) are collected in this class. The ambience class is part 
-    /// of the model and is serialized together with the diagram.
-    /// </para>
-    /// </summary>
-    public partial class Ambience : IDisposable, IVersion
-    {
-        #region Events
-        /// <summary>
-        /// Occurs when the Ambience has changed
-        /// </summary>
-        public event EventHandler<AmbienceEventArgs> OnAmbienceChanged;
+
+namespace Netron.Diagramming.Core {
+  /// <summary>
+  /// <para>
+  /// The ambient properties of the canvas (background style, default line 
+  /// style etc) are collected in this class. The ambience class is part 
+  /// of the model and is serialized together with the diagram.
+  /// </para>
+  /// </summary>
+  public partial class Ambience : IDisposable, IVersion {
+    #region Events
+    /// <summary>
+    /// Occurs when the Ambience has changed
+    /// </summary>
+    public event EventHandler<AmbienceEventArgs> OnAmbienceChanged;
+    #endregion
+
+    #region Fields
+
+    // ------------------------------------------------------------------
+    /// <summary>
+    /// Implementation of IVersion - the current version of 
+    /// Ambience.
+    /// </summary>
+    // ------------------------------------------------------------------
+    protected const double ambienceVersion = 1.0;
+
+    // ------------------------------------------------------------------
+    /// <summary>
+    /// pointer to the model
+    /// </summary>
+    // ------------------------------------------------------------------
+    private IModel mModel;
+
+    // ------------------------------------------------------------------
+    /// <summary>
+    /// the background type 
+    /// </summary>
+    // ------------------------------------------------------------------
+    private CanvasBackgroundTypes mBackgroundType;
+
+    // ------------------------------------------------------------------
+    /// <summary>
+    /// the GradientColor1 field
+    /// </summary>
+    // ------------------------------------------------------------------
+    private Color mGradientColor1;
+
+    /// <summary>
+    /// the GradientColor2 field
+    /// </summary>
+    private Color mGradientColor2;
+
+    // ------------------------------------------------------------------
+    /// <summary>
+    /// the BackgroundColor field
+    /// </summary>
+    // ------------------------------------------------------------------
+    private Color mBackgroundColor;
+
+    // ------------------------------------------------------------------
+    /// <summary>
+    /// The color of the page.
+    /// </summary>
+    // ------------------------------------------------------------------
+    private Color mPageColor;
+
+    // ------------------------------------------------------------------
+    /// <summary>
+    /// The starting gradient color for the page.
+    /// </summary>
+    // ------------------------------------------------------------------
+    private Color mPageGradientColor1;
+
+    // ------------------------------------------------------------------
+    /// <summary>
+    /// The ending gradient color for the page.
+    /// </summary>
+    // ------------------------------------------------------------------
+    private Color mPageGradientColor2;
+
+    // ------------------------------------------------------------------
+    /// <summary>
+    /// The background type of the page.
+    /// </summary>
+    // ------------------------------------------------------------------
+    private CanvasBackgroundTypes mPageBackgroundType =
+        CanvasBackgroundTypes.FlatColor;
+
+    // ------------------------------------------------------------------
+    /// <summary>
+    /// Specifies if the page is rendered in landscape orientation.
+    /// </summary>
+    // ------------------------------------------------------------------
+    private bool mLandscape = true;
+
+    // ------------------------------------------------------------------
+    /// <summary>
+    /// The size of the page in mils (thousandths of an inch).
+    /// </summary>
+    // ------------------------------------------------------------------
+    private Size mPageSize = new Size(8500, 11000);
+
+    // ------------------------------------------------------------------
+    /// <summary>
+    /// The title of the page.
+    /// </summary>
+    // ------------------------------------------------------------------
+    private string mTitle = "Default page: no title.";
+
+    // ------------------------------------------------------------------
+    /// <summary>
+    /// the Page field
+    /// </summary>
+    // ------------------------------------------------------------------
+    private IPage mPage;
+
+    #endregion
+
+    #region Properties
+
+    // ------------------------------------------------------------------
+    /// <summary>
+    /// Gets the current version.
+    /// </summary>
+    // ------------------------------------------------------------------
+    public virtual double Version {
+      get {
+        return ambienceVersion;
+      }
+    }
+
+    // ------------------------------------------------------------------
+    /// <summary>
+    /// Gets or sets the title of the page.
+    /// </summary>
+    /// <value>The title.</value>
+    // ------------------------------------------------------------------
+    public string Title {
+      get { return mTitle; }
+      set { mTitle = value; }
+    }
+
+    // ------------------------------------------------------------------
+    /// <summary>
+    /// Gets or sets the size of the page in mils (thousandths of an inch).  
+    /// The default is letter 8.5" x 11".
+    /// </summary>
+    /// <value>The size of the page.</value>
+    // ------------------------------------------------------------------
+    public Size PageSize {
+      get { return mPageSize; }
+      set { mPageSize = value; }
+    }
+
+    // ------------------------------------------------------------------
+    /// <summary>
+    /// Gets or sets the Page to which this ambience belongs
+    /// </summary>
+    // ------------------------------------------------------------------
+    public IPage Page {
+      get {
+        return mPage;
+      }
+      set {
+        mPage = value;
+      }
+    }
+
+    // ------------------------------------------------------------------
+    /// <summary>
+    /// Gets or sets if the page is rendered and printed in landscape
+    /// orientation.
+    /// </summary>
+    // ------------------------------------------------------------------
+    public bool Landscape {
+      get {
+        return mLandscape;
+      }
+      set {
+        mLandscape = value;
+      }
+    }
+
+    // ------------------------------------------------------------------
+    /// <summary>
+    /// Gets or sets the type of the background.
+    /// </summary>
+    /// <value>The type of the background.</value>
+    // ------------------------------------------------------------------
+    public CanvasBackgroundTypes BackgroundType {
+      get { return this.mBackgroundType; }
+      set {
+        this.mBackgroundType = value;
+        RaiseOnAmbienceChanged();
+      }
+    }
+
+    // ------------------------------------------------------------------
+    /// <summary>
+    /// Gets or sets the type of the background for the page portion.
+    /// </summary>
+    /// <value>The type of the background.</value>
+    // ------------------------------------------------------------------
+    public CanvasBackgroundTypes PageBackgroundType {
+      get { return this.mPageBackgroundType; }
+      set {
+        this.mPageBackgroundType = value;
+        RaiseOnAmbienceChanged();
+      }
+    }
+
+    // ------------------------------------------------------------------
+    /// <summary>
+    /// Gets or sets the first gradient color for the background.
+    /// </summary>
+    /// <value>The first gradient color.</value>
+    // ------------------------------------------------------------------
+    public Color BackgroundGradientColor1 {
+      get { return mGradientColor1; }
+      set {
+        mGradientColor1 = value;
+        RaiseOnAmbienceChanged();
+      }
+    }
+
+    // ------------------------------------------------------------------
+    /// <summary>
+    /// Gets or sets the second gradient color
+    /// </summary>
+    /// <value>The second gradient color.</value>
+    // ------------------------------------------------------------------
+    public Color BackgroundGradientColor2 {
+      get { return mGradientColor2; }
+      set {
+        mGradientColor2 = value;
+        RaiseOnAmbienceChanged();
+      }
+    }
+
+    // ------------------------------------------------------------------
+    /// <summary>
+    /// Gets or sets the BackgroundColor
+    /// </summary>
+    /// <value>The color of the background.</value>
+    // ------------------------------------------------------------------
+    public Color BackgroundColor {
+      get { return mBackgroundColor; }
+      set {
+        mBackgroundColor = value;
+        //notify the world that things have changed
+        RaiseOnAmbienceChanged();
+
+      }
+    }
+
+    // ------------------------------------------------------------------
+    /// <summary>
+    /// Gets or sets the first gradient color for the background.
+    /// </summary>
+    /// <value>The first gradient color.</value>
+    // ------------------------------------------------------------------
+    public Color PageGradientColor1 {
+      get { return mPageGradientColor1; }
+      set {
+        mPageGradientColor1 = value;
+        RaiseOnAmbienceChanged();
+      }
+    }
+
+    // ------------------------------------------------------------------
+    /// <summary>
+    /// Gets or sets the second gradient color
+    /// </summary>
+    /// <value>The second gradient color.</value>
+    // ------------------------------------------------------------------
+    public Color PageGradientColor2 {
+      get { return mPageGradientColor2; }
+      set {
+        mPageGradientColor2 = value;
+        RaiseOnAmbienceChanged();
+      }
+    }
+
+    // ------------------------------------------------------------------
+    /// <summary>
+    /// Gets or sets the BackgroundColor
+    /// </summary>
+    /// <value>The color of the background.</value>
+    // ------------------------------------------------------------------
+    public Color PageColor {
+      get { return mPageColor; }
+      set {
+        mPageColor = value;
+        //notify the world that things have changed
+        RaiseOnAmbienceChanged();
+
+      }
+    }
+
+    // ------------------------------------------------------------------
+    /// <summary>
+    /// Gets the model.
+    /// </summary>
+    /// <value>The model.</value>
+    // ------------------------------------------------------------------
+    public IModel Model {
+      get {
+        return mModel;
+      }
+      internal set {
+        mModel = value;
+      }
+    }
+
+    #endregion
+
+    #region Constructor
+
+    // ------------------------------------------------------------------
+    /// <summary>
+    /// Default constructor
+    /// </summary>
+    /// <param name="page">The page.</param>
+    // ------------------------------------------------------------------
+    public Ambience(IPage page) {
+      if (page == null)
+        throw new ArgumentNullException(
+            "The page paramter cannot be 'null'");
+      if (page.Model == null)
+        throw new ArgumentNullException("The Model is 'null'");
+
+      //set default ambience
+      //mBackgroundColor = Color.FromArgb(116, 118, 124);
+      mBackgroundColor = ArtPalette.DefaultPageBackgroundColor;
+      mBackgroundType = CanvasBackgroundTypes.FlatColor;
+      mGradientColor1 = Color.WhiteSmoke;
+      mGradientColor2 = Color.LightSlateGray;
+      mPageBackgroundType = CanvasBackgroundTypes.FlatColor;
+      mPageColor = ArtPalette.DefaultPageColor;
+      mPageGradientColor1 = Color.WhiteSmoke;
+      mPageGradientColor2 = Color.Silver;
+      mModel = page.Model;
+    }
+
+    #endregion
+
+    #region Methods
+
+    /// <summary>
+    /// Raises the <see cref="OnAmbienceChanged"/> event
+    /// </summary>
+    protected virtual void RaiseOnAmbienceChanged() {
+      EventHandler<AmbienceEventArgs> handler = OnAmbienceChanged;
+      if (handler != null) {
+        handler(this, new AmbienceEventArgs(this));
+      }
+    }
+
+    #endregion
+
+    #region Standard IDispose implementation
+    /// <summary>
+    /// Disposes the view
+    /// </summary>
+    public void Dispose() {
+      Dispose(true);
+      GC.SuppressFinalize(this);
+
+
+    }
+    /// <summary>
+    /// Part of the dispose implementation
+    /// </summary>
+    /// <param name="disposing">if set to <c>true</c> disposing.</param>
+    protected virtual void Dispose(bool disposing) {
+      if (disposing) {
+        #region free managed resources
+
         #endregion
-
-        #region Fields
-
-        // ------------------------------------------------------------------
-        /// <summary>
-        /// Implementation of IVersion - the current version of 
-        /// Ambience.
-        /// </summary>
-        // ------------------------------------------------------------------
-        protected const double ambienceVersion = 1.0;
-
-        // ------------------------------------------------------------------
-        /// <summary>
-        /// pointer to the model
-        /// </summary>
-        // ------------------------------------------------------------------
-        private IModel mModel;
-
-        // ------------------------------------------------------------------
-        /// <summary>
-        /// the background type 
-        /// </summary>
-        // ------------------------------------------------------------------
-        private CanvasBackgroundTypes mBackgroundType;
-
-        // ------------------------------------------------------------------
-        /// <summary>
-        /// the GradientColor1 field
-        /// </summary>
-        // ------------------------------------------------------------------
-        private Color mGradientColor1;
-
-        /// <summary>
-        /// the GradientColor2 field
-        /// </summary>
-        private Color mGradientColor2;
-
-        // ------------------------------------------------------------------
-        /// <summary>
-        /// the BackgroundColor field
-        /// </summary>
-        // ------------------------------------------------------------------
-        private Color mBackgroundColor;
-
-        // ------------------------------------------------------------------
-        /// <summary>
-        /// The color of the page.
-        /// </summary>
-        // ------------------------------------------------------------------
-        private Color mPageColor;
-
-        // ------------------------------------------------------------------
-        /// <summary>
-        /// The starting gradient color for the page.
-        /// </summary>
-        // ------------------------------------------------------------------
-        private Color mPageGradientColor1;
-
-        // ------------------------------------------------------------------
-        /// <summary>
-        /// The ending gradient color for the page.
-        /// </summary>
-        // ------------------------------------------------------------------
-        private Color mPageGradientColor2;
-
-        // ------------------------------------------------------------------
-        /// <summary>
-        /// The background type of the page.
-        /// </summary>
-        // ------------------------------------------------------------------
-        private CanvasBackgroundTypes mPageBackgroundType = 
-            CanvasBackgroundTypes.FlatColor;
-        
-        // ------------------------------------------------------------------
-        /// <summary>
-        /// Specifies if the page is rendered in landscape orientation.
-        /// </summary>
-        // ------------------------------------------------------------------
-        private bool mLandscape = true;
-
-        // ------------------------------------------------------------------
-        /// <summary>
-        /// The size of the page in mils (thousandths of an inch).
-        /// </summary>
-        // ------------------------------------------------------------------
-        private Size mPageSize = new Size(8500, 11000);
-
-        // ------------------------------------------------------------------
-        /// <summary>
-        /// The title of the page.
-        /// </summary>
-        // ------------------------------------------------------------------
-        private string mTitle = "Default page: no title.";
-
-        // ------------------------------------------------------------------
-         /// <summary>
-        /// the Page field
-        /// </summary>
-        // ------------------------------------------------------------------
-        private IPage mPage;
-
-        #endregion
-
-        #region Properties
-
-        // ------------------------------------------------------------------
-        /// <summary>
-        /// Gets the current version.
-        /// </summary>
-        // ------------------------------------------------------------------
-        public virtual double Version
-        {
-            get
-            {
-                return ambienceVersion;
-            }
-        }
-
-        // ------------------------------------------------------------------
-        /// <summary>
-        /// Gets or sets the title of the page.
-        /// </summary>
-        /// <value>The title.</value>
-        // ------------------------------------------------------------------
-        public string Title
-        {
-            get { return mTitle; }
-            set { mTitle = value; }
-        }
-
-        // ------------------------------------------------------------------
-        /// <summary>
-        /// Gets or sets the size of the page in mils (thousandths of an inch).  
-        /// The default is letter 8.5" x 11".
-        /// </summary>
-        /// <value>The size of the page.</value>
-        // ------------------------------------------------------------------
-        public Size PageSize
-        {
-            get { return mPageSize; }
-            set { mPageSize = value; }
-        }
-
-        // ------------------------------------------------------------------
-        /// <summary>
-        /// Gets or sets the Page to which this ambience belongs
-        /// </summary>
-        // ------------------------------------------------------------------
-        public IPage Page
-        {
-            get
-            {
-                return mPage;
-            }
-            set
-            {
-                mPage = value;
-            }
-        }
-
-        // ------------------------------------------------------------------
-        /// <summary>
-        /// Gets or sets if the page is rendered and printed in landscape
-        /// orientation.
-        /// </summary>
-        // ------------------------------------------------------------------
-        public bool Landscape
-        {
-            get
-            {
-                return mLandscape;
-            }
-            set
-            {
-                mLandscape = value;
-            }
-        }
-
-        // ------------------------------------------------------------------
-        /// <summary>
-        /// Gets or sets the type of the background.
-        /// </summary>
-        /// <value>The type of the background.</value>
-        // ------------------------------------------------------------------
-        public CanvasBackgroundTypes BackgroundType
-        {
-            get { return this.mBackgroundType; }
-            set
-            {
-                this.mBackgroundType = value;
-                RaiseOnAmbienceChanged();
-            }
-        }
-
-        // ------------------------------------------------------------------
-        /// <summary>
-        /// Gets or sets the type of the background for the page portion.
-        /// </summary>
-        /// <value>The type of the background.</value>
-        // ------------------------------------------------------------------
-        public CanvasBackgroundTypes PageBackgroundType
-        {
-            get { return this.mPageBackgroundType; }
-            set
-            {
-                this.mPageBackgroundType = value;
-                RaiseOnAmbienceChanged();
-            }
-        }
-
-        // ------------------------------------------------------------------
-        /// <summary>
-        /// Gets or sets the first gradient color for the background.
-        /// </summary>
-        /// <value>The first gradient color.</value>
-        // ------------------------------------------------------------------
-        public Color BackgroundGradientColor1
-        {
-            get { return mGradientColor1; }
-            set
-            {
-                mGradientColor1 = value;
-                RaiseOnAmbienceChanged();
-            }
-        }
-
-        // ------------------------------------------------------------------
-        /// <summary>
-        /// Gets or sets the second gradient color
-        /// </summary>
-        /// <value>The second gradient color.</value>
-        // ------------------------------------------------------------------
-        public Color BackgroundGradientColor2
-        {
-            get { return mGradientColor2; }
-            set
-            {
-                mGradientColor2 = value;
-                RaiseOnAmbienceChanged();
-            }
-        }
-
-        // ------------------------------------------------------------------
-        /// <summary>
-        /// Gets or sets the BackgroundColor
-        /// </summary>
-        /// <value>The color of the background.</value>
-        // ------------------------------------------------------------------
-        public Color BackgroundColor
-        {
-            get { return mBackgroundColor; }
-            set
-            {
-                mBackgroundColor = value;
-                //notify the world that things have changed
-                RaiseOnAmbienceChanged();
-
-            }
-        }
-
-        // ------------------------------------------------------------------
-        /// <summary>
-        /// Gets or sets the first gradient color for the background.
-        /// </summary>
-        /// <value>The first gradient color.</value>
-        // ------------------------------------------------------------------
-        public Color PageGradientColor1
-        {
-            get { return mPageGradientColor1; }
-            set
-            {
-                mPageGradientColor1 = value;
-                RaiseOnAmbienceChanged();
-            }
-        }
-
-        // ------------------------------------------------------------------
-        /// <summary>
-        /// Gets or sets the second gradient color
-        /// </summary>
-        /// <value>The second gradient color.</value>
-        // ------------------------------------------------------------------
-        public Color PageGradientColor2
-        {
-            get { return mPageGradientColor2; }
-            set
-            {
-                mPageGradientColor2 = value;
-                RaiseOnAmbienceChanged();
-            }
-        }
-
-        // ------------------------------------------------------------------
-        /// <summary>
-        /// Gets or sets the BackgroundColor
-        /// </summary>
-        /// <value>The color of the background.</value>
-        // ------------------------------------------------------------------
-        public Color PageColor
-        {
-            get { return mPageColor; }
-            set
-            {
-                mPageColor = value;
-                //notify the world that things have changed
-                RaiseOnAmbienceChanged();
-
-            }
-        }
-
-        // ------------------------------------------------------------------
-        /// <summary>
-        /// Gets the model.
-        /// </summary>
-        /// <value>The model.</value>
-        // ------------------------------------------------------------------
-        public IModel Model
-        {
-            get
-            {
-                return mModel;
-            }
-            internal set
-            {
-                mModel = value;
-            }
-        }
-
-        #endregion
-
-        #region Constructor
-
-        // ------------------------------------------------------------------
-        /// <summary>
-        /// Default constructor
-        /// </summary>
-        /// <param name="page">The page.</param>
-        // ------------------------------------------------------------------
-        public Ambience(IPage page)
-        {
-            if (page == null)
-                throw new ArgumentNullException(
-                    "The page paramter cannot be 'null'");
-            if (page.Model == null)
-                throw new ArgumentNullException("The Model is 'null'");
-
-            //set default ambience
-            //mBackgroundColor = Color.FromArgb(116, 118, 124);
-            mBackgroundColor = ArtPalette.DefaultPageBackgroundColor;
-            mBackgroundType = CanvasBackgroundTypes.FlatColor;
-            mGradientColor1 = Color.WhiteSmoke;
-            mGradientColor2 = Color.LightSlateGray;
-            mPageBackgroundType = CanvasBackgroundTypes.FlatColor;
-            mPageColor = ArtPalette.DefaultPageColor;
-            mPageGradientColor1 = Color.WhiteSmoke;
-            mPageGradientColor2 = Color.Silver;
-            mModel = page.Model;            
-        }
-
-        #endregion
-
-        #region Methods
-
-        /// <summary>
-        /// Raises the <see cref="OnAmbienceChanged"/> event
-        /// </summary>
-        protected virtual void RaiseOnAmbienceChanged()
-        {
-            EventHandler<AmbienceEventArgs> handler = OnAmbienceChanged;
-            if (handler != null)
-            {
-                handler(this, new AmbienceEventArgs(this));
-            }
-        }
-
-        #endregion
-
-        #region Standard IDispose implementation
-        /// <summary>
-        /// Disposes the view
-        /// </summary>
-        public void Dispose()
-        {
-            Dispose(true);
-            GC.SuppressFinalize(this);
-
-
-        }
-        /// <summary>
-        /// Part of the dispose implementation
-        /// </summary>
-        /// <param name="disposing">if set to <c>true</c> disposing.</param>
-        protected virtual void Dispose(bool disposing)
-        {
-            if (disposing)
-            {
-                #region free managed resources
-
-                #endregion
-            }
-
-        }
-
-        #endregion
-    }
+      }
+
+    }
+
+    #endregion
+  }
 }
Index: /trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.Netron/3.0.2672.12446/Netron.Diagramming.Core-3.0.2672.12446/Core/ControllerBase.cs
===================================================================
--- /trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.Netron/3.0.2672.12446/Netron.Diagramming.Core-3.0.2672.12446/Core/ControllerBase.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.Netron/3.0.2672.12446/Netron.Diagramming.Core-3.0.2672.12446/Core/ControllerBase.cs	(revision 4068)
@@ -1,9 +1,5 @@
 using System;
 using System.Drawing;
-using System.Collections.Generic;
-using System.Text;
 using System.Windows.Forms;
-using System.ComponentModel;
-using System.Diagnostics;
 namespace Netron.Diagramming.Core {
   // ----------------------------------------------------------------------
Index: /trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.Netron/3.0.2672.12446/Netron.Diagramming.Core-3.0.2672.12446/Core/Document.cs
===================================================================
--- /trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.Netron/3.0.2672.12446/Netron.Diagramming.Core-3.0.2672.12446/Core/Document.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.Netron/3.0.2672.12446/Netron.Diagramming.Core-3.0.2672.12446/Core/Document.cs	(revision 4068)
@@ -1,131 +1,111 @@
 //To localize the descriptions see http://groups.google.be/group/microsoft.public.dotnet.languages.csharp/browse_thread/thread/3bb6895b49d7cbe/e3241b7fa085ba90?lnk=st&q=csharp+attribute+resource+file&rnum=4#e3241b7fa085ba90
-using System;
-using System.Collections.Generic;
-using System.Text;
-using System.Drawing;
-using System.ComponentModel;
-using System.Runtime.Serialization;
-using System.Xml.Serialization;
-namespace Netron.Diagramming.Core
-{
-    // ----------------------------------------------------------------------
+namespace Netron.Diagramming.Core {
+  // ----------------------------------------------------------------------
+  /// <summary>
+  /// The document class represents the root of the controls' data 
+  /// hierarchy. The document is the root of the serialization graph and 
+  /// contains both the data of the diagram(s) and the metadata (or user 
+  /// information).
+  /// </summary>
+  // ----------------------------------------------------------------------
+  public partial class Document : IVersion {
+    #region Fields
+
+    // ------------------------------------------------------------------
     /// <summary>
-    /// The document class represents the root of the controls' data 
-    /// hierarchy. The document is the root of the serialization graph and 
-    /// contains both the data of the diagram(s) and the metadata (or user 
-    /// information).
+    /// Implementation of IVersion - the current version of 
+    /// Document.
     /// </summary>
-    // ----------------------------------------------------------------------
-    public partial class Document : IVersion
-    {
-        #region Fields
+    // ------------------------------------------------------------------
+    protected const double documentVersion = 1.0;
 
-        // ------------------------------------------------------------------
-        /// <summary>
-        /// Implementation of IVersion - the current version of 
-        /// Document.
-        /// </summary>
-        // ------------------------------------------------------------------
-        protected const double documentVersion = 1.0;
+    // ------------------------------------------------------------------
+    /// <summary>
+    /// Pointer to the model.
+    /// </summary>       
+    // ------------------------------------------------------------------
+    protected IModel mModel;
 
-        // ------------------------------------------------------------------
-        /// <summary>
-        /// Pointer to the model.
-        /// </summary>       
-        // ------------------------------------------------------------------
-        protected IModel mModel;
+    // ------------------------------------------------------------------
+    /// <summary>
+    /// The Information field.
+    /// </summary>
+    // ------------------------------------------------------------------
+    protected DocumentInformation mInformation;
 
-        // ------------------------------------------------------------------
-        /// <summary>
-        /// The Information field.
-        /// </summary>
-        // ------------------------------------------------------------------
-        protected DocumentInformation mInformation;
+    #endregion
 
-        #endregion
+    #region Properties
 
-        #region Properties
+    // ------------------------------------------------------------------
+    /// <summary>
+    /// Gets the current version.
+    /// </summary>
+    // ------------------------------------------------------------------
+    public virtual double Version {
+      get {
+        return documentVersion;
+      }
+    }
 
-        // ------------------------------------------------------------------
-        /// <summary>
-        /// Gets the current version.
-        /// </summary>
-        // ------------------------------------------------------------------
-        public virtual double Version
-        {
-            get
-            {
-                return documentVersion;
-            }
-        }
-
-        /// <summary>
-        /// Gets or sets the Information
-        /// </summary>
-        public DocumentInformation Information
-        {
-            get
-            {
-                return mInformation;
-            }
-            set
-            {
-                mInformation = value;
-            }
-        }
+    /// <summary>
+    /// Gets or sets the Information
+    /// </summary>
+    public DocumentInformation Information {
+      get {
+        return mInformation;
+      }
+      set {
+        mInformation = value;
+      }
+    }
 
 
-        /// <summary>
-        /// Gets the model.
-        /// </summary>
-        /// <value>The model.</value>
-        public IModel Model
-        {
-            get
-            {
-                return mModel;
-            }
+    /// <summary>
+    /// Gets the model.
+    /// </summary>
+    /// <value>The model.</value>
+    public IModel Model {
+      get {
+        return mModel;
+      }
+    }
+
+    #endregion
+
+    #region Constructor
+    ///<summary>
+    ///Default constructor. Creates a new document and, hence, a new model with one default page and one default layer.
+    ///</summary>
+    public Document() {
+      mModel = new Model();
+      mInformation = new DocumentInformation();
+    }
+
+
+    #endregion
+
+    #region Methods
+
+    // ------------------------------------------------------------------
+    /// <summary>
+    /// Loops through all pages and returns ALL entities that belong to
+    /// this Document.
+    /// </summary>
+    /// <returns>CollectionBase</returns>
+    // ------------------------------------------------------------------
+    public CollectionBase<IDiagramEntity> GetAllEntities() {
+      CollectionBase<IDiagramEntity> entities =
+              new CollectionBase<IDiagramEntity>();
+      foreach (IPage page in this.mModel.Pages) {
+        foreach (ILayer layer in page.Layers) {
+          entities.AddRange(layer.Entities);
         }
+      }
+      return entities;
+    }
 
-        #endregion
+    #endregion
 
-        #region Constructor
-        ///<summary>
-        ///Default constructor. Creates a new document and, hence, a new model with one default page and one default layer.
-        ///</summary>
-        public Document()
-        {
-            mModel = new Model();
-            mInformation = new DocumentInformation();
-        }
-
-    
-        #endregion
-
-        #region Methods
-
-        // ------------------------------------------------------------------
-        /// <summary>
-        /// Loops through all pages and returns ALL entities that belong to
-        /// this Document.
-        /// </summary>
-        /// <returns>CollectionBase</returns>
-        // ------------------------------------------------------------------
-        public CollectionBase<IDiagramEntity> GetAllEntities()
-        {
-            CollectionBase<IDiagramEntity> entities =
-                    new CollectionBase<IDiagramEntity>();
-            foreach (IPage page in this.mModel.Pages)
-            {
-                foreach (ILayer layer in page.Layers)
-                {
-                    entities.AddRange(layer.Entities);
-                }
-            }
-            return entities;
-        }
-
-        #endregion
-           
-    }
+  }
 }
Index: /trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.Netron/3.0.2672.12446/Netron.Diagramming.Core-3.0.2672.12446/Core/DocumentInformation.cs
===================================================================
--- /trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.Netron/3.0.2672.12446/Netron.Diagramming.Core-3.0.2672.12446/Core/DocumentInformation.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.Netron/3.0.2672.12446/Netron.Diagramming.Core-3.0.2672.12446/Core/DocumentInformation.cs	(revision 4068)
@@ -1,106 +1,89 @@
 using System;
-using System.Collections.Generic;
-using System.Text;
-using System.Drawing;
-using System.ComponentModel;
-using System.Runtime.Serialization;
-using System.Xml.Serialization;
-using System.Diagnostics;
-using System.Xml.Schema;
 
-namespace Netron.Diagramming.Core
-{
+namespace Netron.Diagramming.Core {
+  /// <summary>
+  /// The meta-data (author, date, description) related to a diagram is collected in this class
+  /// </summary>
+  public partial class DocumentInformation : IVersion {
+    #region Fields
+
+    // ------------------------------------------------------------------
     /// <summary>
-    /// The meta-data (author, date, description) related to a diagram is collected in this class
+    /// Implementation of IVersion - the current version of 
+    /// DocumentInformation.
     /// </summary>
-    public partial class DocumentInformation : IVersion
-    {
-        #region Fields
+    // ------------------------------------------------------------------
+    protected const double documentInformationVersion = 1.0;
 
-        // ------------------------------------------------------------------
-        /// <summary>
-        /// Implementation of IVersion - the current version of 
-        /// DocumentInformation.
-        /// </summary>
-        // ------------------------------------------------------------------
-        protected const double documentInformationVersion = 1.0;
+    /// <summary>
+    /// the CreationDate field
+    /// </summary>
+    private string mCreationDate = DateTime.Now.ToString();
+    /// <summary>
+    /// the field
+    /// </summary>
+    private string mAuthor = string.Empty;
+    /// <summary>
+    /// the Description field
+    /// </summary>
+    private string mDescription = string.Empty;
+    /// <summary>
+    /// the Title field
+    /// </summary>
+    private string mTitle = string.Empty;
+    #endregion
 
-        /// <summary>
-        /// the CreationDate field
-        /// </summary>
-        private string mCreationDate = DateTime.Now.ToString();
-        /// <summary>
-        /// the field
-        /// </summary>
-        private string mAuthor = string.Empty;
-        /// <summary>
-        /// the Description field
-        /// </summary>
-        private string mDescription = string.Empty;
-        /// <summary>
-        /// the Title field
-        /// </summary>
-        private string mTitle = string.Empty;
-        #endregion
+    #region Properties
 
-        #region Properties
+    // ------------------------------------------------------------------
+    /// <summary>
+    /// Gets the current version.
+    /// </summary>
+    // ------------------------------------------------------------------
+    public virtual double Version {
+      get {
+        return documentInformationVersion;
+      }
+    }
 
-        // ------------------------------------------------------------------
-        /// <summary>
-        /// Gets the current version.
-        /// </summary>
-        // ------------------------------------------------------------------
-        public virtual double Version
-        {
-            get
-            {
-                return documentInformationVersion;
-            }
-        }
-        
-        /// <summary>
-        /// Gets or sets the 
-        /// </summary>
-        public string Author
-        {
-            get { return mAuthor; }
-            set { mAuthor = value; }
-        }
-        /// <summary>
-        /// Gets or sets the Description
-        /// </summary>
-        public string Description
-        {
-            get { return mDescription; }
-            set { mDescription = value; }
-        }
-        /// <summary>
-        /// Gets or sets the Title
-        /// </summary>
-        public string Title
-        {
-            get { return mTitle; }
-            set { mTitle = value; }
-        }
-        /// <summary>
-        /// Gets or sets the CreationDate
-        /// </summary>
-        public string CreationDate
-        {
-            get { return mCreationDate; }
-            set { mCreationDate = value; }
-        }
-        #endregion
+    /// <summary>
+    /// Gets or sets the 
+    /// </summary>
+    public string Author {
+      get { return mAuthor; }
+      set { mAuthor = value; }
+    }
+    /// <summary>
+    /// Gets or sets the Description
+    /// </summary>
+    public string Description {
+      get { return mDescription; }
+      set { mDescription = value; }
+    }
+    /// <summary>
+    /// Gets or sets the Title
+    /// </summary>
+    public string Title {
+      get { return mTitle; }
+      set { mTitle = value; }
+    }
+    /// <summary>
+    /// Gets or sets the CreationDate
+    /// </summary>
+    public string CreationDate {
+      get { return mCreationDate; }
+      set { mCreationDate = value; }
+    }
+    #endregion
 
-        #region Constructor
-        ///<summary>
-        ///Default constructor
-        ///</summary>
-        public DocumentInformation()
-        {
-        	
-        }
-        #endregion
- 
+    #region Constructor
+    ///<summary>
+    ///Default constructor
+    ///</summary>
+    public DocumentInformation() {
+
     }
+    #endregion
+
+  }
 }
Index: /trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.Netron/3.0.2672.12446/Netron.Diagramming.Core-3.0.2672.12446/Core/Grid.cs
===================================================================
--- /trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.Netron/3.0.2672.12446/Netron.Diagramming.Core-3.0.2672.12446/Core/Grid.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.Netron/3.0.2672.12446/Netron.Diagramming.Core-3.0.2672.12446/Core/Grid.cs	(revision 4068)
@@ -1,71 +1,62 @@
 using System;
-using System.Collections.Generic;
-using System.Text;
 using System.Drawing;
-using System.Windows.Forms;
 using System.Drawing.Drawing2D;
 
-namespace Netron.Diagramming.Core
-{
-    public class Grid
-    {
-        // ------------------------------------------------------------------
-        /// <summary>
-        /// Constructor.
-        /// </summary>
-        // ------------------------------------------------------------------
-        public Grid()
-        {
-        }
+namespace Netron.Diagramming.Core {
+  public class Grid {
+    // ------------------------------------------------------------------
+    /// <summary>
+    /// Constructor.
+    /// </summary>
+    // ------------------------------------------------------------------
+    public Grid() {
+    }
 
-        public static void Paint(
-            Graphics g, 
-            RectangleF area,
-            float horizontalSpacing,
-            float verticalSpacing,
-            float penWidth)
-        {
-            //ControlPaint.DrawGrid(
-            //    g,
-            //    area,
-            //    new Size(20, 20),
-            //    Color.Wheat);
+    public static void Paint(
+        Graphics g,
+        RectangleF area,
+        float horizontalSpacing,
+        float verticalSpacing,
+        float penWidth) {
+      //ControlPaint.DrawGrid(
+      //    g,
+      //    area,
+      //    new Size(20, 20),
+      //    Color.Wheat);
 
-            //g.SmoothingMode = SmoothingMode.HighQuality;
-            //g.CompositingQuality = CompositingQuality.HighQuality;
-            //g.InterpolationMode = InterpolationMode.HighQualityBicubic;
-            g.SetClip(area);
-            float sideLength = Math.Min(area.Width, area.Height);
-            float horizSpacing = sideLength / horizontalSpacing;
-            float vertSpacing = sideLength / verticalSpacing;
+      //g.SmoothingMode = SmoothingMode.HighQuality;
+      //g.CompositingQuality = CompositingQuality.HighQuality;
+      //g.InterpolationMode = InterpolationMode.HighQualityBicubic;
+      g.SetClip(area);
+      float sideLength = Math.Min(area.Width, area.Height);
+      float horizSpacing = sideLength / horizontalSpacing;
+      float vertSpacing = sideLength / verticalSpacing;
 
-            Pen majorPen = new Pen(Color.DarkGray);
-            majorPen.Width = penWidth;
-            majorPen.DashStyle = DashStyle.Dot;
+      Pen majorPen = new Pen(Color.DarkGray);
+      majorPen.Width = penWidth;
+      majorPen.DashStyle = DashStyle.Dot;
 
-            float top = area.Top;  // The top y coord.
-            float bottom = area.Bottom;  // The bottom y coord.
-            float left = area.Left;  // The left y coord.
-            float right = area.Right;  // The right y coord.
-            PointF p1;  // The starting point for the grid line.
-            PointF p2;  // The end point for the grid line.
+      float top = area.Top;  // The top y coord.
+      float bottom = area.Bottom;  // The bottom y coord.
+      float left = area.Left;  // The left y coord.
+      float right = area.Right;  // The right y coord.
+      PointF p1;  // The starting point for the grid line.
+      PointF p2;  // The end point for the grid line.
 
-            // Draw the horizontal lines, starting at the top.
-            for (float i = top; i <= bottom; i += horizontalSpacing)
-            {
-                p1 = new PointF(left, i);
-                p2 = new PointF(right, i);
-                g.DrawLine(majorPen, p1, p2);
-            }
+      // Draw the horizontal lines, starting at the top.
+      for (float i = top; i <= bottom; i += horizontalSpacing) {
+        p1 = new PointF(left, i);
+        p2 = new PointF(right, i);
+        g.DrawLine(majorPen, p1, p2);
+      }
 
-            // Draw the major vertical lines, starting at the left edge.
-            for (float i = left; i <= right; i += verticalSpacing)
-            {
-                p1 = new PointF(i, top);
-                p2 = new PointF(i, bottom);
-                g.DrawLine(majorPen, p1, p2);
-            }
-            g.ResetClip();
-        }
+      // Draw the major vertical lines, starting at the left edge.
+      for (float i = left; i <= right; i += verticalSpacing) {
+        p1 = new PointF(i, top);
+        p2 = new PointF(i, bottom);
+        g.DrawLine(majorPen, p1, p2);
+      }
+      g.ResetClip();
     }
+  }
 }
Index: /trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.Netron/3.0.2672.12446/Netron.Diagramming.Core-3.0.2672.12446/Core/Interfaces/IAction.cs
===================================================================
--- /trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.Netron/3.0.2672.12446/Netron.Diagramming.Core-3.0.2672.12446/Core/Interfaces/IAction.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.Netron/3.0.2672.12446/Netron.Diagramming.Core-3.0.2672.12446/Core/Interfaces/IAction.cs	(revision 4068)
@@ -1,28 +1,23 @@
-using System;
-using System.Drawing;
-using System.Windows.Forms;
-namespace Netron.Diagramming.Core
-{
-	/// <summary>
-	/// This defines what an action is on the model.
-	/// </summary>
-	public interface IAction : IActivity
-	{
+namespace Netron.Diagramming.Core {
+  /// <summary>
+  /// This defines what an action is on the model.
+  /// </summary>
+  public interface IAction : IActivity {
 
-		#region Events
+    #region Events
 
-		#endregion
+    #endregion
 
-		#region Properties
-        /// <summary>
-        /// Gets or sets the model.
-        /// </summary>
-        /// <value>The model.</value>
-        IModel Model {get; set;}
-		#endregion
+    #region Properties
+    /// <summary>
+    /// Gets or sets the model.
+    /// </summary>
+    /// <value>The model.</value>
+    IModel Model { get; set; }
+    #endregion
 
-		#region Methods
+    #region Methods
 
-		#endregion
-	}
+    #endregion
+  }
 }
Index: /trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.Netron/3.0.2672.12446/Netron.Diagramming.Core-3.0.2672.12446/Core/Interfaces/IActivity.cs
===================================================================
--- /trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.Netron/3.0.2672.12446/Netron.Diagramming.Core-3.0.2672.12446/Core/Interfaces/IActivity.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.Netron/3.0.2672.12446/Netron.Diagramming.Core-3.0.2672.12446/Core/Interfaces/IActivity.cs	(revision 4068)
@@ -1,79 +1,75 @@
 using System;
-using System.Drawing;
-using System.Windows.Forms;
-namespace Netron.Diagramming.Core
-{
-    // ----------------------------------------------------------------------
-	/// <summary>
-	/// This defines what an action or activity is on the diagram, which can 
-    /// be a data manipulation or layout or an asynchronuous dump of data.
+namespace Netron.Diagramming.Core {
+  // ----------------------------------------------------------------------
+  /// <summary>
+  /// This defines what an action or activity is on the diagram, which can 
+  /// be a data manipulation or layout or an asynchronuous dump of data.
+  /// </summary>
+  // ----------------------------------------------------------------------
+  public interface IActivity {
+    // In the final analysis, your understanding of how to do construction 
+    // determines how good a programmer you are.
+
+    #region Events
+    /// <summary>
+    /// 
     /// </summary>
-    // ----------------------------------------------------------------------
-	public interface IActivity 
-	{
-        // In the final analysis, your understanding of how to do construction 
-        // determines how good a programmer you are.
+    event EventHandler OnActivityRun;
 
-		#region Events
-        /// <summary>
-        /// 
-        /// </summary>
-        event EventHandler OnActivityRun;
+    #endregion
 
-		#endregion
+    #region Properties
+    /// <summary>
+    /// Gets or sets a value indicating whether this <see cref="T:IActivity"/> is enabled.
+    /// </summary>
+    /// <value><c>true</c> if enabled; otherwise, <c>false</c>.</value>
+    bool Enabled { get; set; }
+    /// <summary>
+    /// Gets or sets the step time.
+    /// </summary>
+    /// <value>The step time.</value>
+    TimeSpan StepTime { get; set; }
+    /// <summary>
+    /// Gets or sets the start time.
+    /// </summary>
+    /// <value>The start time.</value>
+    DateTime StartTime { get; set; }
+    /// <summary>
+    /// Gets the duration of the activity.
+    /// </summary>
+    /// <value>The duration.</value>
+    TimeSpan Duration { get; }
+    /// <summary>
+    /// Gets the name.
+    /// </summary>
+    /// <value>The name.</value>
+    string Name { get; }
 
-		#region Properties
-        /// <summary>
-        /// Gets or sets a value indicating whether this <see cref="T:IActivity"/> is enabled.
-        /// </summary>
-        /// <value><c>true</c> if enabled; otherwise, <c>false</c>.</value>
-        bool Enabled { get; set;}
-        /// <summary>
-        /// Gets or sets the step time.
-        /// </summary>
-        /// <value>The step time.</value>
-        TimeSpan StepTime { get; set;}
-        /// <summary>
-        /// Gets or sets the start time.
-        /// </summary>
-        /// <value>The start time.</value>
-        DateTime StartTime { get; set;}
-        /// <summary>
-        /// Gets the duration of the activity.
-        /// </summary>
-        /// <value>The duration.</value>
-        TimeSpan Duration { get; }
-        /// <summary>
-        /// Gets the name.
-        /// </summary>
-        /// <value>The name.</value>
-        string Name { get;}
+    #endregion
 
-		#endregion
+    #region Methods
+    /// <summary>
+    /// Runs the activity
+    /// </summary>
+    void Run();
 
-		#region Methods
-		/// <summary>
-		/// Runs the activity
-		/// </summary>
-		void Run();
+    /// <summary>
+    /// Runs the specified time.
+    /// </summary>
+    /// <param name="time">The time.</param>
+    void Run(int time);
 
-        /// <summary>
-        /// Runs the specified time.
-        /// </summary>
-        /// <param name="time">The time.</param>
-        void Run(int time);
+    /// <summary>
+    /// Runs the after.
+    /// </summary>
+    /// <param name="firstActivity">The first activity.</param>
+    void RunAfter(IActivity firstActivity);
 
-        /// <summary>
-        /// Runs the after.
-        /// </summary>
-        /// <param name="firstActivity">The first activity.</param>
-        void RunAfter(IActivity firstActivity);
+    /// <summary>
+    /// Stops this instance.
+    /// </summary>
+    void Stop();
 
-        /// <summary>
-        /// Stops this instance.
-        /// </summary>
-        void Stop();
-        
-		#endregion
-	}
+    #endregion
+  }
 }
Index: /trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.Netron/3.0.2672.12446/Netron.Diagramming.Core-3.0.2672.12446/Core/Interfaces/IAnts.cs
===================================================================
--- /trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.Netron/3.0.2672.12446/Netron.Diagramming.Core-3.0.2672.12446/Core/Interfaces/IAnts.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.Netron/3.0.2672.12446/Netron.Diagramming.Core-3.0.2672.12446/Core/Interfaces/IAnts.cs	(revision 4068)
@@ -1,13 +1,8 @@
-using System;
-using System.Collections.Generic;
-using System.Text;
 
-namespace Netron.Diagramming.Core
-{
-    /// <summary>
-    /// Marching ants interface
-    /// </summary>
-    public interface IAnts : IPaintable
-    {
-    }
+namespace Netron.Diagramming.Core {
+  /// <summary>
+  /// Marching ants interface
+  /// </summary>
+  public interface IAnts : IPaintable {
+  }
 }
Index: /trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.Netron/3.0.2672.12446/Netron.Diagramming.Core-3.0.2672.12446/Core/Interfaces/IAttachmentCallback.cs
===================================================================
--- /trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.Netron/3.0.2672.12446/Netron.Diagramming.Core-3.0.2672.12446/Core/Interfaces/IAttachmentCallback.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.Netron/3.0.2672.12446/Netron.Diagramming.Core-3.0.2672.12446/Core/Interfaces/IAttachmentCallback.cs	(revision 4068)
@@ -1,16 +1,12 @@
 using System;
-using System.Collections.Generic;
-using System.Text;
 
-namespace Netron.Diagramming.Core
-{
-    /// <summary>
-    /// Interface to be returned by <see cref="IDiagramEntity"/>'s if additional actions have to be executed
-    /// after being added to the <see cref="Model"/>. The object implementing this interface should be returned by the <see cref="IServiceProvider.GetService"/>method.
-    /// 
-    /// </summary>
-    interface IAdditionCallback
-    {
-        void OnAddition();
-    }
+namespace Netron.Diagramming.Core {
+  /// <summary>
+  /// Interface to be returned by <see cref="IDiagramEntity"/>'s if additional actions have to be executed
+  /// after being added to the <see cref="Model"/>. The object implementing this interface should be returned by the <see cref="IServiceProvider.GetService"/>method.
+  /// 
+  /// </summary>
+  interface IAdditionCallback {
+    void OnAddition();
+  }
 }
Index: /trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.Netron/3.0.2672.12446/Netron.Diagramming.Core-3.0.2672.12446/Core/Interfaces/IBundle.cs
===================================================================
--- /trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.Netron/3.0.2672.12446/Netron.Diagramming.Core-3.0.2672.12446/Core/Interfaces/IBundle.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.Netron/3.0.2672.12446/Netron.Diagramming.Core-3.0.2672.12446/Core/Interfaces/IBundle.cs	(revision 4068)
@@ -1,37 +1,31 @@
-using System;
-using System.Drawing;
-using System.Collections.Generic;
-using System.Text;
 
-namespace Netron.Diagramming.Core
-{
+namespace Netron.Diagramming.Core {
+  /// <summary>
+  /// Interface of a <see cref="Bundle"/>
+  /// </summary>
+  public interface IBundle : IDiagramEntity {
+    // ------------------------------------------------------------------
     /// <summary>
-    /// Interface of a <see cref="Bundle"/>
+    /// Gets the entities in the <see cref="Bundle"/>
     /// </summary>
-    public interface IBundle : IDiagramEntity
-    {
-        // ------------------------------------------------------------------
-        /// <summary>
-        /// Gets the entities in the <see cref="Bundle"/>
-        /// </summary>
-        /// <value>The entities.</value>
-        // ------------------------------------------------------------------
-        CollectionBase<IDiagramEntity> Entities { get;}
-        
-        // ------------------------------------------------------------------
-        /// <summary>
-        /// Sets the 'IsSelected' property to false for all entities in the 
-        /// bundle.
-        /// </summary>
-        // ------------------------------------------------------------------
-        void DeSelectAll();
+    /// <value>The entities.</value>
+    // ------------------------------------------------------------------
+    CollectionBase<IDiagramEntity> Entities { get; }
 
-        // ------------------------------------------------------------------
-        /// <summary>
-        /// Sets the 'Hovered' property for all entities in the bundle to
-        /// the value specified.
-        /// </summary>
-        // ------------------------------------------------------------------
-        void SetHovered(bool isHovered);
-    }
+    // ------------------------------------------------------------------
+    /// <summary>
+    /// Sets the 'IsSelected' property to false for all entities in the 
+    /// bundle.
+    /// </summary>
+    // ------------------------------------------------------------------
+    void DeSelectAll();
+
+    // ------------------------------------------------------------------
+    /// <summary>
+    /// Sets the 'Hovered' property for all entities in the bundle to
+    /// the value specified.
+    /// </summary>
+    // ------------------------------------------------------------------
+    void SetHovered(bool isHovered);
+  }
 }
Index: /trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.Netron/3.0.2672.12446/Netron.Diagramming.Core-3.0.2672.12446/Core/Interfaces/ICommand.cs
===================================================================
--- /trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.Netron/3.0.2672.12446/Netron.Diagramming.Core-3.0.2672.12446/Core/Interfaces/ICommand.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.Netron/3.0.2672.12446/Netron.Diagramming.Core-3.0.2672.12446/Core/Interfaces/ICommand.cs	(revision 4068)
@@ -1,25 +1,22 @@
-using System;
 
-namespace Netron.Diagramming.Core
-{
-	/// <summary>
-	/// ICommand is an interface for undo/redo support that is
-	/// implemented by the <see cref="Command"/> class.
-	/// </summary>
-	public interface ICommand
-	{
-        /// <summary>
-        /// Executes the action corresponding to an undo
-        /// </summary>
-		void Undo();
-        /// <summary>
-        /// Executes the actual action or equivalently the redo in case it had been undone
-        /// </summary>
-		void Redo();
-        /// <summary>
-        /// A description of the action
-        /// </summary>
-        /// <remarks>The text can be used in an undo list or undo stack description</remarks>
-		string Text{get; set;}
-	}
+namespace Netron.Diagramming.Core {
+  /// <summary>
+  /// ICommand is an interface for undo/redo support that is
+  /// implemented by the <see cref="Command"/> class.
+  /// </summary>
+  public interface ICommand {
+    /// <summary>
+    /// Executes the action corresponding to an undo
+    /// </summary>
+    void Undo();
+    /// <summary>
+    /// Executes the actual action or equivalently the redo in case it had been undone
+    /// </summary>
+    void Redo();
+    /// <summary>
+    /// A description of the action
+    /// </summary>
+    /// <remarks>The text can be used in an undo list or undo stack description</remarks>
+    string Text { get; set; }
+  }
 }
Index: /trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.Netron/3.0.2672.12446/Netron.Diagramming.Core-3.0.2672.12446/Core/Interfaces/IComplexShape.cs
===================================================================
--- /trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.Netron/3.0.2672.12446/Netron.Diagramming.Core-3.0.2672.12446/Core/Interfaces/IComplexShape.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.Netron/3.0.2672.12446/Netron.Diagramming.Core-3.0.2672.12446/Core/Interfaces/IComplexShape.cs	(revision 4068)
@@ -1,22 +1,16 @@
-using System;
-using System.Collections.Generic;
-using System.Text;
 
-namespace Netron.Diagramming.Core
-{
+namespace Netron.Diagramming.Core {
+  /// <summary>
+  /// A complex shape is just an IShape with <see cref="IShapeMaterial"/> children
+  /// </summary>
+  public interface IComplexShape : IShape {
     /// <summary>
-    /// A complex shape is just an IShape with <see cref="IShapeMaterial"/> children
+    /// Gets or sets the children.
     /// </summary>
-    public interface IComplexShape : IShape
-    {
-        /// <summary>
-        /// Gets or sets the children.
-        /// </summary>
-        /// <value>The children.</value>
-        CollectionBase<IShapeMaterial> Children
-        {            
-            get;
-            set;
-        }
+    /// <value>The children.</value>
+    CollectionBase<IShapeMaterial> Children {
+      get;
+      set;
     }
+  }
 }
Index: /trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.Netron/3.0.2672.12446/Netron.Diagramming.Core-3.0.2672.12446/Core/Interfaces/ICompoundCommand.cs
===================================================================
--- /trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.Netron/3.0.2672.12446/Netron.Diagramming.Core-3.0.2672.12446/Core/Interfaces/ICompoundCommand.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.Netron/3.0.2672.12446/Netron.Diagramming.Core-3.0.2672.12446/Core/Interfaces/ICompoundCommand.cs	(revision 4068)
@@ -1,23 +1,19 @@
-using System;
 
-namespace Netron.Diagramming.Core
-{
-	/// <summary>
-	/// ICommand is an interface for undo/redo support that is
-	/// implemented by the Command class.
-	/// </summary>
-	public interface ICompoundCommand : ICommand
-	{
-        /// <summary>
-        /// Gets or sets the commands in this compound action.
-        /// </summary>
-        /// <value>The commands.</value>
-        CollectionBase<ICommand> Commands
-        {
-            get;
-            set;
-        }
+namespace Netron.Diagramming.Core {
+  /// <summary>
+  /// ICommand is an interface for undo/redo support that is
+  /// implemented by the Command class.
+  /// </summary>
+  public interface ICompoundCommand : ICommand {
+    /// <summary>
+    /// Gets or sets the commands in this compound action.
+    /// </summary>
+    /// <value>The commands.</value>
+    CollectionBase<ICommand> Commands {
+      get;
+      set;
+    }
 
 
-	}
+  }
 }
Index: /trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.Netron/3.0.2672.12446/Netron.Diagramming.Core-3.0.2672.12446/Core/Interfaces/IConnector.cs
===================================================================
--- /trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.Netron/3.0.2672.12446/Netron.Diagramming.Core-3.0.2672.12446/Core/Interfaces/IConnector.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.Netron/3.0.2672.12446/Netron.Diagramming.Core-3.0.2672.12446/Core/Interfaces/IConnector.cs	(revision 4068)
@@ -1,50 +1,47 @@
-using System;
 using System.Drawing;
-namespace Netron.Diagramming.Core
-{
-	/// <summary>
-	/// This interface describes the public members of a connector
-	/// </summary>
-	public interface IConnector : IDiagramEntity
-	{
-		#region Properties
-		/// <summary>
-		/// Gets the point at which the connector is located
-		/// </summary>
-		Point Point {get; set;}
-		/// <summary>
-		/// Gets or sets the connector to which this connector is attached to
-		/// </summary>
-		IConnector AttachedTo {get; set;}
-		/// <summary>
-		/// Gets the connectors (if any) attached to this connector
-		/// </summary>
-		CollectionBase<IConnector> AttachedConnectors {get;}
-		#endregion
+namespace Netron.Diagramming.Core {
+  /// <summary>
+  /// This interface describes the public members of a connector
+  /// </summary>
+  public interface IConnector : IDiagramEntity {
+    #region Properties
+    /// <summary>
+    /// Gets the point at which the connector is located
+    /// </summary>
+    Point Point { get; set; }
+    /// <summary>
+    /// Gets or sets the connector to which this connector is attached to
+    /// </summary>
+    IConnector AttachedTo { get; set; }
+    /// <summary>
+    /// Gets the connectors (if any) attached to this connector
+    /// </summary>
+    CollectionBase<IConnector> AttachedConnectors { get; }
+    #endregion
 
-		#region Methods
-        /// <summary>
-        /// Attaches the given connector to this one
-        /// </summary>
-        /// <param name="child">The child connector to attach.</param>		
-		void AttachConnector(IConnector child);
+    #region Methods
+    /// <summary>
+    /// Attaches the given connector to this one
+    /// </summary>
+    /// <param name="child">The child connector to attach.</param>		
+    void AttachConnector(IConnector child);
 
-        /// <summary>
-        /// Detaches the given connector from this connector.
-        /// </summary>
-        /// <param name="child">The child connector to detach.</param>        
-        void DetachConnector(IConnector child);
+    /// <summary>
+    /// Detaches the given connector from this connector.
+    /// </summary>
+    /// <param name="child">The child connector to detach.</param>        
+    void DetachConnector(IConnector child);
 
-        /// <summary>
-        /// Detaches from its parent (if any).
-        /// </summary>
-        void DetachFromParent();
+    /// <summary>
+    /// Detaches from its parent (if any).
+    /// </summary>
+    void DetachFromParent();
 
-        /// <summary>
-        /// Attaches to another connector
-        /// </summary>
-        /// <param name="parent">The new parent connector.</param>        
-        void AttachTo(IConnector parent);
-		#endregion
-	}
+    /// <summary>
+    /// Attaches to another connector
+    /// </summary>
+    /// <param name="parent">The new parent connector.</param>        
+    void AttachTo(IConnector parent);
+    #endregion
+  }
 }
Index: /trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.Netron/3.0.2672.12446/Netron.Diagramming.Core-3.0.2672.12446/Core/Interfaces/IController.cs
===================================================================
--- /trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.Netron/3.0.2672.12446/Netron.Diagramming.Core-3.0.2672.12446/Core/Interfaces/IController.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.Netron/3.0.2672.12446/Netron.Diagramming.Core-3.0.2672.12446/Core/Interfaces/IController.cs	(revision 4068)
@@ -1,287 +1,282 @@
 ﻿using System;
 using System.Windows.Forms;
-using System.Drawing;
-namespace Netron.Diagramming.Core
-{
-    // ----------------------------------------------------------------------
-    /// <summary>
-    /// Interface of a controller
-    /// </summary>
-    // ----------------------------------------------------------------------
-    public interface IController : IUndoSupport
-    {
-        #region Events
-
-        // ------------------------------------------------------------------
-        /// <summary>
-        /// Occurs when a page's ambience has changed.
-        /// </summary>
-        // ------------------------------------------------------------------
-        event EventHandler<AmbienceEventArgs> OnAmbienceChanged;
-
-        // ------------------------------------------------------------------
-        /// <summary>
-        /// Occurs when the undo/redo history has changed
-        /// </summary>
-        // ------------------------------------------------------------------
-        event EventHandler<HistoryChangeEventArgs> OnHistoryChange;
-
-        // ------------------------------------------------------------------
-        /// <summary>
-        /// Occurs when a tool is activated
-        /// </summary>
-        // ------------------------------------------------------------------
-        event EventHandler<ToolEventArgs> OnToolActivate;
-
-        // ------------------------------------------------------------------
-        /// <summary>
-        /// Occurs when a tool is deactivated
-        /// </summary>
-        // ------------------------------------------------------------------
-        event EventHandler<ToolEventArgs> OnToolDeactivate;
-
-        // ------------------------------------------------------------------
-        /// <summary>
-        /// Occurs when the something got selected and the properties of it 
-        /// can/should be shown.
-        /// </summary>
-        // ------------------------------------------------------------------
-        event EventHandler<SelectionEventArgs> OnShowSelectionProperties;
-
-        // ------------------------------------------------------------------
-        /// <summary>
-        /// Occurs when an entity is added.
-        /// <remarks>This event usually is bubbled from one of the 
-        /// layers</remarks>
-        /// </summary>
-        // ------------------------------------------------------------------
-        event EventHandler<EntityEventArgs> OnEntityAdded;
-
-        // ------------------------------------------------------------------
-        /// <summary>
-        /// Occurs when an entity is removed.
-        /// <remarks>This event usually is bubbled from one of the 
-        /// layers</remarks>
-        /// </summary>
-        // ------------------------------------------------------------------
-        event EventHandler<EntityEventArgs> OnEntityRemoved;
-
-        // ------------------------------------------------------------------
-        /// <summary>
-        /// Occurs when the controller receives a mouse-down notification of 
-        /// the surface. This event is raised before the event is broadcasted 
-        /// down to the tools.
-        /// </summary>
-        // ------------------------------------------------------------------
-        event EventHandler<MouseEventArgs> OnMouseDown;
-
-        // ------------------------------------------------------------------
-        /// <summary>
-        /// Occurs when the diagram control is aksed to show the context menu
-        /// </summary>
-        // ------------------------------------------------------------------
-        event EventHandler<EntityMenuEventArgs> OnShowContextMenu;
-
-        #endregion
-
-        #region Properties
-
-        // ------------------------------------------------------------------
-        /// <summary>
-        /// Gets or sets the model
-        /// </summary>
-        // ------------------------------------------------------------------
-        IModel Model { get; set;}
-
-        // ------------------------------------------------------------------
-        /// <summary>
-        /// Gets or sets the view.
-        /// </summary>
-        /// <value>The view.</value>
-        // ------------------------------------------------------------------
-        IView View { get;set;}
-
-        // ------------------------------------------------------------------
-        /// <summary>
-        /// Gets the currently active tool.  This can be 'null'!!!
-        /// </summary>
-        // ------------------------------------------------------------------
-        ITool ActiveTool
-        {
-            get;
-        }
-
-        // ------------------------------------------------------------------
-        /// <summary>
-        /// Gets the tools.
-        /// </summary>
-        /// <value>The tools.</value>
-        // ------------------------------------------------------------------
-        CollectionBase<ITool> Tools { get;}
-
-        // ------------------------------------------------------------------
-        /// <summary>
-        /// Gets the undo manager.
-        /// </summary>
-        /// <value>The undo manager.</value>
-        // ------------------------------------------------------------------
-        UndoManager UndoManager { get;}
-
-        // ------------------------------------------------------------------
-        /// <summary>
-        /// Gets the parent control.
-        /// </summary>
-        /// <value>The parent control.</value>
-        // ------------------------------------------------------------------
-        IDiagramControl ParentControl { get;}
-
-        // ------------------------------------------------------------------
-        /// <summary>
-        /// Gets or sets a value indicating whether this 
-        /// <see cref="T:IController"/> is enabled.
-        /// </summary>
-        /// <value><c>true</c> if enabled; otherwise, <c>false</c>.</value>
-        // ------------------------------------------------------------------
-        bool Enabled
-        {
-            get;
-            set;
-        }
-
-        #endregion
-
-        #region Methods
-
-        // ------------------------------------------------------------------
-        /// <summary>
-        /// Activates the text editor for the given text provider.
-        /// </summary>
-        /// <param name="textProvider">ITextProvider</param>
-        /// <returns>bool: True if sucessful, false if not.</returns>
-        // ------------------------------------------------------------------
-        bool ActivateTextEditor(ITextProvider textProvider);
-
-        // ------------------------------------------------------------------
-        /// <summary>
-        /// Activates the tool.
-        /// </summary>
-        /// <param name="toolName">Name of the tool.</param>
-        // ------------------------------------------------------------------
-        void ActivateTool(string toolName);
-
-        // ------------------------------------------------------------------
-        /// <summary>
-        /// Adds the tool.
-        /// </summary>
-        /// <param name="tool">The tool.</param>
-        // ------------------------------------------------------------------
-        void AddTool(ITool tool);
-
-        // ------------------------------------------------------------------
-        /// <summary>
-        /// Deactivates the tool.
-        /// </summary>
-        /// <param name="tool">The tool.</param>
-        /// <returns>bool: True if successful.</returns>
-        // ------------------------------------------------------------------
-        bool DeactivateTool(ITool tool);
-
-        // ------------------------------------------------------------------
-        /// <summary>
-        /// Deactivates all tools.
-        /// </summary>
-        /// <returns>bool: True if successful.</returns>
-        // ------------------------------------------------------------------
-        bool DeactivateAllTools();
-
-        // ------------------------------------------------------------------
-        /// <summary>
-        /// Raises the OnShowSelectionProperties event.
-        /// </summary>
-        /// <param name="e">The 
-        /// <see cref="T:Netron.Diagramming.Core.SelectionEventArgs"/> 
-        /// instance containing the event data.</param>
-        // ------------------------------------------------------------------
-        void RaiseOnShowSelectionProperties(SelectionEventArgs e);
-
-        // ------------------------------------------------------------------
-        /// <summary>
-        /// Suspends all tools
-        /// </summary>
-        // ------------------------------------------------------------------
-        void SuspendAllTools();
-
-        // ------------------------------------------------------------------
-        /// <summary>
-        /// Unsuspends all tools.
-        /// </summary>
-        // ------------------------------------------------------------------
-        void UnsuspendAllTools();
-
-        // ------------------------------------------------------------------
-        /// <summary>
-        /// Raises the OnShowContextMenu event
-        /// </summary>
-        /// <param name="e">EntityMenuEventArgs</param>
-        // ------------------------------------------------------------------
-        void RaiseOnShowContextMenu(EntityMenuEventArgs e);
-
-        // ------------------------------------------------------------------
-        /// <summary>
-        /// Changes the paint style of the selected entities.
-        /// </summary>
-        /// <param name="paintStyle">IPaintStyle</param>
-        // ------------------------------------------------------------------
-        void ChangeStyle(IPaintStyle paintStyle);
-
-        // ------------------------------------------------------------------
-        /// <summary>
-        /// Changes the pen style of the selected entities.
-        /// </summary>
-        /// <param name="penStyle">IPenStyle</param>
-        // ------------------------------------------------------------------
-        void ChangeStyle(IPenStyle penStyle);
-
-        // ------------------------------------------------------------------
-        /// <summary>
-        /// Runs the specified activity.  If no activity exists with the name
-        /// specified, then an exception is thrown.
-        /// </summary>
-        /// <param name="name">string: The name of the activity to run.</param>
-        // ------------------------------------------------------------------
-        void RunActivity(string name);
-
-        // ------------------------------------------------------------------
-        /// <summary>
-        /// Selects all entities on the current page.  The selection is 
-        /// cleared first.
-        /// </summary>
-        // ------------------------------------------------------------------
-        void SelectAll();
-
-        // ------------------------------------------------------------------
-        /// <summary>
-        /// Navigates to the next page.  Nothing is performed if the last page
-        /// is currently selected and 'wrap' is false.  If 'wrap' is true,
-        /// then the first page is selected.
-        /// </summary>
-        /// <param name="wrap">bool: Specifies if the collection is wrapped
-        /// when the end is reached.</param>
-        // ------------------------------------------------------------------
-        void GoForward(bool wrap);
-
-        // ------------------------------------------------------------------
-        /// <summary>
-        /// Navigates to the previous page.  Nothing is performed if the first 
-        /// page is currently selected and 'wrap' is false.  If 'wrap' is
-        /// true, then the last page is selected if the current page is the
-        /// first page.
-        /// </summary> 
-        /// <param name="wrap">bool: Specifies if the collection is wrapped
-        /// when the start is reached.</param>
-        // ------------------------------------------------------------------
-        void GoBack(bool wrap);
-
-        #endregion        
+namespace Netron.Diagramming.Core {
+  // ----------------------------------------------------------------------
+  /// <summary>
+  /// Interface of a controller
+  /// </summary>
+  // ----------------------------------------------------------------------
+  public interface IController : IUndoSupport {
+    #region Events
+
+    // ------------------------------------------------------------------
+    /// <summary>
+    /// Occurs when a page's ambience has changed.
+    /// </summary>
+    // ------------------------------------------------------------------
+    event EventHandler<AmbienceEventArgs> OnAmbienceChanged;
+
+    // ------------------------------------------------------------------
+    /// <summary>
+    /// Occurs when the undo/redo history has changed
+    /// </summary>
+    // ------------------------------------------------------------------
+    event EventHandler<HistoryChangeEventArgs> OnHistoryChange;
+
+    // ------------------------------------------------------------------
+    /// <summary>
+    /// Occurs when a tool is activated
+    /// </summary>
+    // ------------------------------------------------------------------
+    event EventHandler<ToolEventArgs> OnToolActivate;
+
+    // ------------------------------------------------------------------
+    /// <summary>
+    /// Occurs when a tool is deactivated
+    /// </summary>
+    // ------------------------------------------------------------------
+    event EventHandler<ToolEventArgs> OnToolDeactivate;
+
+    // ------------------------------------------------------------------
+    /// <summary>
+    /// Occurs when the something got selected and the properties of it 
+    /// can/should be shown.
+    /// </summary>
+    // ------------------------------------------------------------------
+    event EventHandler<SelectionEventArgs> OnShowSelectionProperties;
+
+    // ------------------------------------------------------------------
+    /// <summary>
+    /// Occurs when an entity is added.
+    /// <remarks>This event usually is bubbled from one of the 
+    /// layers</remarks>
+    /// </summary>
+    // ------------------------------------------------------------------
+    event EventHandler<EntityEventArgs> OnEntityAdded;
+
+    // ------------------------------------------------------------------
+    /// <summary>
+    /// Occurs when an entity is removed.
+    /// <remarks>This event usually is bubbled from one of the 
+    /// layers</remarks>
+    /// </summary>
+    // ------------------------------------------------------------------
+    event EventHandler<EntityEventArgs> OnEntityRemoved;
+
+    // ------------------------------------------------------------------
+    /// <summary>
+    /// Occurs when the controller receives a mouse-down notification of 
+    /// the surface. This event is raised before the event is broadcasted 
+    /// down to the tools.
+    /// </summary>
+    // ------------------------------------------------------------------
+    event EventHandler<MouseEventArgs> OnMouseDown;
+
+    // ------------------------------------------------------------------
+    /// <summary>
+    /// Occurs when the diagram control is aksed to show the context menu
+    /// </summary>
+    // ------------------------------------------------------------------
+    event EventHandler<EntityMenuEventArgs> OnShowContextMenu;
+
+    #endregion
+
+    #region Properties
+
+    // ------------------------------------------------------------------
+    /// <summary>
+    /// Gets or sets the model
+    /// </summary>
+    // ------------------------------------------------------------------
+    IModel Model { get; set; }
+
+    // ------------------------------------------------------------------
+    /// <summary>
+    /// Gets or sets the view.
+    /// </summary>
+    /// <value>The view.</value>
+    // ------------------------------------------------------------------
+    IView View { get; set; }
+
+    // ------------------------------------------------------------------
+    /// <summary>
+    /// Gets the currently active tool.  This can be 'null'!!!
+    /// </summary>
+    // ------------------------------------------------------------------
+    ITool ActiveTool {
+      get;
     }
+
+    // ------------------------------------------------------------------
+    /// <summary>
+    /// Gets the tools.
+    /// </summary>
+    /// <value>The tools.</value>
+    // ------------------------------------------------------------------
+    CollectionBase<ITool> Tools { get; }
+
+    // ------------------------------------------------------------------
+    /// <summary>
+    /// Gets the undo manager.
+    /// </summary>
+    /// <value>The undo manager.</value>
+    // ------------------------------------------------------------------
+    UndoManager UndoManager { get; }
+
+    // ------------------------------------------------------------------
+    /// <summary>
+    /// Gets the parent control.
+    /// </summary>
+    /// <value>The parent control.</value>
+    // ------------------------------------------------------------------
+    IDiagramControl ParentControl { get; }
+
+    // ------------------------------------------------------------------
+    /// <summary>
+    /// Gets or sets a value indicating whether this 
+    /// <see cref="T:IController"/> is enabled.
+    /// </summary>
+    /// <value><c>true</c> if enabled; otherwise, <c>false</c>.</value>
+    // ------------------------------------------------------------------
+    bool Enabled {
+      get;
+      set;
+    }
+
+    #endregion
+
+    #region Methods
+
+    // ------------------------------------------------------------------
+    /// <summary>
+    /// Activates the text editor for the given text provider.
+    /// </summary>
+    /// <param name="textProvider">ITextProvider</param>
+    /// <returns>bool: True if sucessful, false if not.</returns>
+    // ------------------------------------------------------------------
+    bool ActivateTextEditor(ITextProvider textProvider);
+
+    // ------------------------------------------------------------------
+    /// <summary>
+    /// Activates the tool.
+    /// </summary>
+    /// <param name="toolName">Name of the tool.</param>
+    // ------------------------------------------------------------------
+    void ActivateTool(string toolName);
+
+    // ------------------------------------------------------------------
+    /// <summary>
+    /// Adds the tool.
+    /// </summary>
+    /// <param name="tool">The tool.</param>
+    // ------------------------------------------------------------------
+    void AddTool(ITool tool);
+
+    // ------------------------------------------------------------------
+    /// <summary>
+    /// Deactivates the tool.
+    /// </summary>
+    /// <param name="tool">The tool.</param>
+    /// <returns>bool: True if successful.</returns>
+    // ------------------------------------------------------------------
+    bool DeactivateTool(ITool tool);
+
+    // ------------------------------------------------------------------
+    /// <summary>
+    /// Deactivates all tools.
+    /// </summary>
+    /// <returns>bool: True if successful.</returns>
+    // ------------------------------------------------------------------
+    bool DeactivateAllTools();
+
+    // ------------------------------------------------------------------
+    /// <summary>
+    /// Raises the OnShowSelectionProperties event.
+    /// </summary>
+    /// <param name="e">The 
+    /// <see cref="T:Netron.Diagramming.Core.SelectionEventArgs"/> 
+    /// instance containing the event data.</param>
+    // ------------------------------------------------------------------
+    void RaiseOnShowSelectionProperties(SelectionEventArgs e);
+
+    // ------------------------------------------------------------------
+    /// <summary>
+    /// Suspends all tools
+    /// </summary>
+    // ------------------------------------------------------------------
+    void SuspendAllTools();
+
+    // ------------------------------------------------------------------
+    /// <summary>
+    /// Unsuspends all tools.
+    /// </summary>
+    // ------------------------------------------------------------------
+    void UnsuspendAllTools();
+
+    // ------------------------------------------------------------------
+    /// <summary>
+    /// Raises the OnShowContextMenu event
+    /// </summary>
+    /// <param name="e">EntityMenuEventArgs</param>
+    // ------------------------------------------------------------------
+    void RaiseOnShowContextMenu(EntityMenuEventArgs e);
+
+    // ------------------------------------------------------------------
+    /// <summary>
+    /// Changes the paint style of the selected entities.
+    /// </summary>
+    /// <param name="paintStyle">IPaintStyle</param>
+    // ------------------------------------------------------------------
+    void ChangeStyle(IPaintStyle paintStyle);
+
+    // ------------------------------------------------------------------
+    /// <summary>
+    /// Changes the pen style of the selected entities.
+    /// </summary>
+    /// <param name="penStyle">IPenStyle</param>
+    // ------------------------------------------------------------------
+    void ChangeStyle(IPenStyle penStyle);
+
+    // ------------------------------------------------------------------
+    /// <summary>
+    /// Runs the specified activity.  If no activity exists with the name
+    /// specified, then an exception is thrown.
+    /// </summary>
+    /// <param name="name">string: The name of the activity to run.</param>
+    // ------------------------------------------------------------------
+    void RunActivity(string name);
+
+    // ------------------------------------------------------------------
+    /// <summary>
+    /// Selects all entities on the current page.  The selection is 
+    /// cleared first.
+    /// </summary>
+    // ------------------------------------------------------------------
+    void SelectAll();
+
+    // ------------------------------------------------------------------
+    /// <summary>
+    /// Navigates to the next page.  Nothing is performed if the last page
+    /// is currently selected and 'wrap' is false.  If 'wrap' is true,
+    /// then the first page is selected.
+    /// </summary>
+    /// <param name="wrap">bool: Specifies if the collection is wrapped
+    /// when the end is reached.</param>
+    // ------------------------------------------------------------------
+    void GoForward(bool wrap);
+
+    // ------------------------------------------------------------------
+    /// <summary>
+    /// Navigates to the previous page.  Nothing is performed if the first 
+    /// page is currently selected and 'wrap' is false.  If 'wrap' is
+    /// true, then the last page is selected if the current page is the
+    /// first page.
+    /// </summary> 
+    /// <param name="wrap">bool: Specifies if the collection is wrapped
+    /// when the start is reached.</param>
+    // ------------------------------------------------------------------
+    void GoBack(bool wrap);
+
+    #endregion
+  }
 }
Index: /trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.Netron/3.0.2672.12446/Netron.Diagramming.Core-3.0.2672.12446/Core/Interfaces/IDiagramControl.cs
===================================================================
--- /trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.Netron/3.0.2672.12446/Netron.Diagramming.Core-3.0.2672.12446/Core/Interfaces/IDiagramControl.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.Netron/3.0.2672.12446/Netron.Diagramming.Core-3.0.2672.12446/Core/Interfaces/IDiagramControl.cs	(revision 4068)
@@ -1,290 +1,278 @@
 using System;
-using System.Collections.Generic;
-using System.Text;
 using System.Drawing;
 using System.Windows.Forms;
-namespace Netron.Diagramming.Core
-{
-    // ----------------------------------------------------------------------
-    /// <summary>
-    /// Interface of the surface or diagram control.
-    /// </summary>
-    // ----------------------------------------------------------------------
-    public interface IDiagramControl
-    {
-        #region Events
-        /// <summary>
-        /// Occurs when a drag-and-drop operation is completed.
-        /// </summary>
-        event DragEventHandler DragDrop;
-        /// <summary>
-        /// Occurs when an object is dragged into the control's bounds.
-        /// </summary>
-        event DragEventHandler DragEnter;
-        /// <summary>
-        /// Occurs when an object is dragged out of the control's bounds.
-        /// </summary>
-        event EventHandler DragLeave;
-        /// <summary>
-        /// Occurs when an object is dragged over the control's bounds.
-        /// </summary>
-        event DragEventHandler DragOver;
-
-        event GiveFeedbackEventHandler GiveFeedback;
-        /// <summary>
-        /// Occurs when the size of the canvas has changed
-        /// </summary>
-        /// <remarks>
-        /// This event is usually defined already in the Control or ScrollableControl class from which
-        /// the canvas inherits.
-        /// </remarks>
-        event EventHandler SizeChanged;
-        /// <summary>
-        /// Occurs when the mouse is pressed on the canvas
-        /// </summary>
-        /// <remarks>
-        /// This event is usually defined already in the Control or ScrollableControl class from which
-        /// the canvas inherits.
-        /// </remarks>
-        event MouseEventHandler MouseDown;
-        /// <summary>
-        /// Occurs when the mouse is released above the canvas
-        /// </summary>
-        /// <remarks>
-        /// This event is usually defined already in the Control or ScrollableControl class from which
-        /// the canvas inherits.
-        /// </remarks>
-        event MouseEventHandler MouseUp;
-        /// <summary>
-        /// Occurs when the mouse is moved over the canvas
-        /// </summary>
-        /// <remarks>
-        /// This event is usually defined already in the Control or ScrollableControl class from which
-        /// the canvas inherits.
-        /// </remarks>
-        event MouseEventHandler MouseMove;
-        /// <summary>
-        /// Occurs when the mouse pointer rests on the control.
-        /// </summary>
-        event EventHandler MouseHover;
-
-        event MouseEventHandler MouseWheel;
-        /// <summary>
-        /// Occurs when a key is down
-        /// </summary>
-        event KeyEventHandler KeyDown;
-        /// <summary>
-        /// Occurs when a key is released
-        /// </summary>
-        event KeyEventHandler KeyUp;
-        /// <summary>
-        /// Occurs when a key is pressed
-        /// </summary>
-        event KeyPressEventHandler KeyPress;
-        /// <summary>
-        /// Occurs when a new diagram is started.
-        /// </summary>
-        event EventHandler OnNewDiagram;
-        #endregion
-
-        #region Properties
-
-        /// <summary>
-        /// Gets or sets the view.
-        /// </summary>
-        /// <value>The view.</value>
-        IView View
-        {
-            get;
-            set;
-        }
-
-        /// <summary>
-        /// Gets or sets the controller.
-        /// </summary>
-        /// <value>The controller.</value>
-        IController Controller
-        {
-            get;
-            set;
-
-        }
-
-        /// <summary>
-        /// Gets or sets the Document
-        /// </summary>
-        Document Document
-        {
-            get;
-            set;
-        }
-
-        // ------------------------------------------------------------------
-        /// <summary>
-        /// Gets or sets if all shape's connectors should be shown.
-        /// </summary>
-        // ------------------------------------------------------------------
-        bool ShowConnectors
-        {
-            get;
-            set;
-        }
-
-        // ------------------------------------------------------------------
-        /// <summary>
-        /// Gets or sets the scroll position.
-        /// </summary>
-        // ------------------------------------------------------------------
-        Point AutoScrollPosition 
-        { 
-            get;
-            set;
-        }
-
-        // ------------------------------------------------------------------
-        /// <summary>
-        /// Gets the client rectangle.
-        /// </summary>
-        /// <value>The client rectangle.</value>
-        // ------------------------------------------------------------------
-        Rectangle ClientRectangle 
-        { 
-            get;
-        }
-
-        // ------------------------------------------------------------------
-        /// <summary>
-        /// Gets or sets the size of the diagram.
-        /// </summary>
-        /// <value>Size: The height and width.</value>
-        // ------------------------------------------------------------------
-        Size Size
-        {
-            get;
-            set;
-        }
-
-        // ------------------------------------------------------------------
-        /// <summary>
-        /// Gets or sets the minimum size of the autoscroll.
-        /// </summary>
-        /// <value>Size: The height and width.</value>
-        // ------------------------------------------------------------------
-        Size AutoScrollMinSize
-        {
-            get;
-            set;
-        }
-
-        #endregion
-
-        #region Methods
-
-        // ------------------------------------------------------------------
-        /// <summary>
-        /// Invalidates the specified rectangle.
-        /// </summary>
-        /// <param name="rectangle">The rectangle.</param>
-        // ------------------------------------------------------------------
-        void Invalidate(Rectangle rectangle);
-
-        // ------------------------------------------------------------------
-        /// <summary>
-        /// Invalidates this instance.
-        /// </summary>
-        // ------------------------------------------------------------------
-        void Invalidate();
-
-        // ------------------------------------------------------------------
-        /// <summary>
-        /// Focuses this instance.
-        /// </summary>
-        /// <returns></returns>
-        // ------------------------------------------------------------------
-        bool Focus(); 
-        
-        // ------------------------------------------------------------------
-        /// <summary>
-        /// Displays a PageSetupDialog so the user can specify how each
-        /// page is printed.
-        /// </summary>
-        // ------------------------------------------------------------------
-        void PageSetup();
-        
-        // ------------------------------------------------------------------
-        /// <summary>
-        /// Prints all pages of the diagram.
-        /// </summary>
-        // ------------------------------------------------------------------
-        void Print();
-
-        // ------------------------------------------------------------------
-        /// <summary>
-        /// Print previews all pages of the diagram.
-        /// </summary>
-        // ------------------------------------------------------------------
-        void PrintPreview();
-
-        // ------------------------------------------------------------------
-        /// <summary>
-        /// Displays an OpenFileDialog for the user to specify the diagram
-        /// to open.
-        /// </summary>
-        // ------------------------------------------------------------------
-        void Open();
-
-        // ------------------------------------------------------------------
-        /// <summary>
-        /// Opens the specified path.
-        /// </summary>
-        /// <param name="path">The path.</param>
-        // ------------------------------------------------------------------
-        void Open(string path);
-
-        // ------------------------------------------------------------------
-        /// <summary>
-        /// If the current filename (FileName property) is empty, the a
-        /// SaveFileDialog is displayed for the user to specify what to save 
-        /// the diagram as.  Otherwise, the current filename is used to save 
-        /// the diagram.
-        /// </summary>
-        // ------------------------------------------------------------------
-        void Save();
-
-        // ------------------------------------------------------------------
-        /// <summary>
-        /// Displays a SaveFileDialog regardless if there's an existing
-        /// filename so the user can save the diagram to a new location.
-        /// </summary>
-        // ------------------------------------------------------------------
-        void SaveAs();
-
-        // ------------------------------------------------------------------
-        /// <summary>
-        /// Saves the diagram to the path specified.
-        /// </summary>
-        /// <param name="path">The path.</param>
-        // ------------------------------------------------------------------
-        void SaveAs(string path);
-
-        // ------------------------------------------------------------------
-        /// <summary>
-        /// Creates a new document.
-        /// </summary>
-        // ------------------------------------------------------------------
-        void NewDocument();
-
-        // ------------------------------------------------------------------
-        /// <summary>
-        /// Computes the location of the specified screen point into client
-        /// coordinates.
-        /// </summary>
-        /// <param name="p">Point</param>
-        /// <returns>Point</returns>
-        // ------------------------------------------------------------------
-        Point PointToClient(Point p);
-
-        #endregion
-        
-    }
+namespace Netron.Diagramming.Core {
+  // ----------------------------------------------------------------------
+  /// <summary>
+  /// Interface of the surface or diagram control.
+  /// </summary>
+  // ----------------------------------------------------------------------
+  public interface IDiagramControl {
+    #region Events
+    /// <summary>
+    /// Occurs when a drag-and-drop operation is completed.
+    /// </summary>
+    event DragEventHandler DragDrop;
+    /// <summary>
+    /// Occurs when an object is dragged into the control's bounds.
+    /// </summary>
+    event DragEventHandler DragEnter;
+    /// <summary>
+    /// Occurs when an object is dragged out of the control's bounds.
+    /// </summary>
+    event EventHandler DragLeave;
+    /// <summary>
+    /// Occurs when an object is dragged over the control's bounds.
+    /// </summary>
+    event DragEventHandler DragOver;
+
+    event GiveFeedbackEventHandler GiveFeedback;
+    /// <summary>
+    /// Occurs when the size of the canvas has changed
+    /// </summary>
+    /// <remarks>
+    /// This event is usually defined already in the Control or ScrollableControl class from which
+    /// the canvas inherits.
+    /// </remarks>
+    event EventHandler SizeChanged;
+    /// <summary>
+    /// Occurs when the mouse is pressed on the canvas
+    /// </summary>
+    /// <remarks>
+    /// This event is usually defined already in the Control or ScrollableControl class from which
+    /// the canvas inherits.
+    /// </remarks>
+    event MouseEventHandler MouseDown;
+    /// <summary>
+    /// Occurs when the mouse is released above the canvas
+    /// </summary>
+    /// <remarks>
+    /// This event is usually defined already in the Control or ScrollableControl class from which
+    /// the canvas inherits.
+    /// </remarks>
+    event MouseEventHandler MouseUp;
+    /// <summary>
+    /// Occurs when the mouse is moved over the canvas
+    /// </summary>
+    /// <remarks>
+    /// This event is usually defined already in the Control or ScrollableControl class from which
+    /// the canvas inherits.
+    /// </remarks>
+    event MouseEventHandler MouseMove;
+    /// <summary>
+    /// Occurs when the mouse pointer rests on the control.
+    /// </summary>
+    event EventHandler MouseHover;
+
+    event MouseEventHandler MouseWheel;
+    /// <summary>
+    /// Occurs when a key is down
+    /// </summary>
+    event KeyEventHandler KeyDown;
+    /// <summary>
+    /// Occurs when a key is released
+    /// </summary>
+    event KeyEventHandler KeyUp;
+    /// <summary>
+    /// Occurs when a key is pressed
+    /// </summary>
+    event KeyPressEventHandler KeyPress;
+    /// <summary>
+    /// Occurs when a new diagram is started.
+    /// </summary>
+    event EventHandler OnNewDiagram;
+    #endregion
+
+    #region Properties
+
+    /// <summary>
+    /// Gets or sets the view.
+    /// </summary>
+    /// <value>The view.</value>
+    IView View {
+      get;
+      set;
+    }
+
+    /// <summary>
+    /// Gets or sets the controller.
+    /// </summary>
+    /// <value>The controller.</value>
+    IController Controller {
+      get;
+      set;
+
+    }
+
+    /// <summary>
+    /// Gets or sets the Document
+    /// </summary>
+    Document Document {
+      get;
+      set;
+    }
+
+    // ------------------------------------------------------------------
+    /// <summary>
+    /// Gets or sets if all shape's connectors should be shown.
+    /// </summary>
+    // ------------------------------------------------------------------
+    bool ShowConnectors {
+      get;
+      set;
+    }
+
+    // ------------------------------------------------------------------
+    /// <summary>
+    /// Gets or sets the scroll position.
+    /// </summary>
+    // ------------------------------------------------------------------
+    Point AutoScrollPosition {
+      get;
+      set;
+    }
+
+    // ------------------------------------------------------------------
+    /// <summary>
+    /// Gets the client rectangle.
+    /// </summary>
+    /// <value>The client rectangle.</value>
+    // ------------------------------------------------------------------
+    Rectangle ClientRectangle {
+      get;
+    }
+
+    // ------------------------------------------------------------------
+    /// <summary>
+    /// Gets or sets the size of the diagram.
+    /// </summary>
+    /// <value>Size: The height and width.</value>
+    // ------------------------------------------------------------------
+    Size Size {
+      get;
+      set;
+    }
+
+    // ------------------------------------------------------------------
+    /// <summary>
+    /// Gets or sets the minimum size of the autoscroll.
+    /// </summary>
+    /// <value>Size: The height and width.</value>
+    // ------------------------------------------------------------------
+    Size AutoScrollMinSize {
+      get;
+      set;
+    }
+
+    #endregion
+
+    #region Methods
+
+    // ------------------------------------------------------------------
+    /// <summary>
+    /// Invalidates the specified rectangle.
+    /// </summary>
+    /// <param name="rectangle">The rectangle.</param>
+    // ------------------------------------------------------------------
+    void Invalidate(Rectangle rectangle);
+
+    // ------------------------------------------------------------------
+    /// <summary>
+    /// Invalidates this instance.
+    /// </summary>
+    // ------------------------------------------------------------------
+    void Invalidate();
+
+    // ------------------------------------------------------------------
+    /// <summary>
+    /// Focuses this instance.
+    /// </summary>
+    /// <returns></returns>
+    // ------------------------------------------------------------------
+    bool Focus();
+
+    // ------------------------------------------------------------------
+    /// <summary>
+    /// Displays a PageSetupDialog so the user can specify how each
+    /// page is printed.
+    /// </summary>
+    // ------------------------------------------------------------------
+    void PageSetup();
+
+    // ------------------------------------------------------------------
+    /// <summary>
+    /// Prints all pages of the diagram.
+    /// </summary>
+    // ------------------------------------------------------------------
+    void Print();
+
+    // ------------------------------------------------------------------
+    /// <summary>
+    /// Print previews all pages of the diagram.
+    /// </summary>
+    // ------------------------------------------------------------------
+    void PrintPreview();
+
+    // ------------------------------------------------------------------
+    /// <summary>
+    /// Displays an OpenFileDialog for the user to specify the diagram
+    /// to open.
+    /// </summary>
+    // ------------------------------------------------------------------
+    void Open();
+
+    // ------------------------------------------------------------------
+    /// <summary>
+    /// Opens the specified path.
+    /// </summary>
+    /// <param name="path">The path.</param>
+    // ------------------------------------------------------------------
+    void Open(string path);
+
+    // ------------------------------------------------------------------
+    /// <summary>
+    /// If the current filename (FileName property) is empty, the a
+    /// SaveFileDialog is displayed for the user to specify what to save 
+    /// the diagram as.  Otherwise, the current filename is used to save 
+    /// the diagram.
+    /// </summary>
+    // ------------------------------------------------------------------
+    void Save();
+
+    // ------------------------------------------------------------------
+    /// <summary>
+    /// Displays a SaveFileDialog regardless if there's an existing
+    /// filename so the user can save the diagram to a new location.
+    /// </summary>
+    // ------------------------------------------------------------------
+    void SaveAs();
+
+    // ------------------------------------------------------------------
+    /// <summary>
+    /// Saves the diagram to the path specified.
+    /// </summary>
+    /// <param name="path">The path.</param>
+    // ------------------------------------------------------------------
+    void SaveAs(string path);
+
+    // ------------------------------------------------------------------
+    /// <summary>
+    /// Creates a new document.
+    /// </summary>
+    // ------------------------------------------------------------------
+    void NewDocument();
+
+    // ------------------------------------------------------------------
+    /// <summary>
+    /// Computes the location of the specified screen point into client
+    /// coordinates.
+    /// </summary>
+    /// <param name="p">Point</param>
+    /// <returns>Point</returns>
+    // ------------------------------------------------------------------
+    Point PointToClient(Point p);
+
+    #endregion
+
+  }
 }
Index: /trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.Netron/3.0.2672.12446/Netron.Diagramming.Core-3.0.2672.12446/Core/Interfaces/IDiagramEntity.cs
===================================================================
--- /trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.Netron/3.0.2672.12446/Netron.Diagramming.Core-3.0.2672.12446/Core/Interfaces/IDiagramEntity.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.Netron/3.0.2672.12446/Netron.Diagramming.Core-3.0.2672.12446/Core/Interfaces/IDiagramEntity.cs	(revision 4068)
@@ -1,557 +1,528 @@
 using System;
 using System.Drawing;
+using System.Runtime.Serialization;
 using System.Windows.Forms;
-using System.Runtime.Serialization;
-
-namespace Netron.Diagramming.Core
-{
-    // ----------------------------------------------------------------------
-	/// <summary>
-	/// The diagram entity is the base entity of all elements of a diagram.
-	/// </summary>
-    // ----------------------------------------------------------------------
-	public interface IDiagramEntity : 
-        IPaintable, 
+
+namespace Netron.Diagramming.Core {
+  // ----------------------------------------------------------------------
+  /// <summary>
+  /// The diagram entity is the base entity of all elements of a diagram.
+  /// </summary>
+  // ----------------------------------------------------------------------
+  public interface IDiagramEntity :
+        IPaintable,
         IMouseListener,
         IHoverListener,
-        IServiceProvider, 
+        IServiceProvider,
         ISerializable,
-        IVersion
-	{
-
-		#region Events
-
-        // ------------------------------------------------------------------
-		/// <summary>
-		/// Occurs when the entity's properties have changed
-        /// </summary>
-        // ------------------------------------------------------------------
-		event EventHandler<EntityEventArgs> OnEntityChange;
-
-        // ------------------------------------------------------------------
-		/// <summary>
-		/// Occurs when the entity is selected.  This can be different than 
-        /// the OnClick because the selector can select and entity without 
-        /// clicking on it.
-        /// </summary>
-        // ------------------------------------------------------------------
-        event EventHandler<EntityEventArgs> OnEntitySelect;
-
-        // ------------------------------------------------------------------
-		/// <summary>
-		/// Occurs when the user clicks on the entity.
-        /// </summary>
-        // ------------------------------------------------------------------
-        event EventHandler<EntityEventArgs> OnClick;
-
-        // ------------------------------------------------------------------
-        /// <summary>
-        /// Occurs when a mouse button is pressed while over the entity.
-        /// </summary>
-        // ------------------------------------------------------------------
-        event EventHandler<EntityMouseEventArgs> OnMouseDown;
-
-        // ------------------------------------------------------------------
-        /// <summary>
-        /// Occurs when a mouse button is released while over the entity.
-        /// </summary>
-        // ------------------------------------------------------------------
-        event EventHandler<EntityMouseEventArgs> OnMouseUp;
-
-        // ------------------------------------------------------------------
-        /// <summary>
-        /// Occurs when the mouse is moved while over the entity.
-        /// </summary>
-        // ------------------------------------------------------------------
-        event EventHandler<EntityMouseEventArgs> OnMouseMove;
-
-        // ------------------------------------------------------------------
-        /// <summary>
-        /// Occurs when the mouse enters the entity.
-        /// </summary>
-        // ------------------------------------------------------------------
-        event EventHandler<EntityMouseEventArgs> OnMouseEnter;
-
-        // ------------------------------------------------------------------
-        /// <summary>
-        /// Occurs when the mouse hovers over the entity.
-        /// </summary>
-        // ------------------------------------------------------------------
-        event EventHandler<EntityMouseEventArgs> OnMouseHover;
-
-        // ------------------------------------------------------------------
-        /// <summary>
-        /// Occurs when the mouse leaves the entity.
-        /// </summary>
-        // ------------------------------------------------------------------
-        event EventHandler<EntityMouseEventArgs> OnMouseLeave;
-
-
-		#endregion
-
-		#region Properties
-
-        // ------------------------------------------------------------------
-        /// <summary>
-        /// Gets the center point of the paintable entity (the center of the
-        /// Rectangle).
-        /// </summary>
-        /// <value>Point</value>
-        // ------------------------------------------------------------------
-        Point Center 
-        { 
-            get; 
-        }
-
-        // ------------------------------------------------------------------
-        /// <summary>
-        /// Gets the center of the bottom edge of the bounding rectangle.
-        /// </summary>
-        // ------------------------------------------------------------------
-        Point BottomCenter
-        {
-            get;
-        }
-
-        // ------------------------------------------------------------------
-        /// <summary>
-        /// Gets the center of the top edge of the bounding rectangle.
-        /// </summary>
-        // ------------------------------------------------------------------
-        Point TopCenter
-        {
-            get;
-        }
-
-        // ------------------------------------------------------------------
-        /// <summary>
-        /// Gets the top left corner of this entity, which is the same as
-        /// 'Rectangle.Location'.
-        /// </summary>
-        // ------------------------------------------------------------------
-        Point TopLeftCorner
-        {
-            get;
-        }
-
-        // ------------------------------------------------------------------
-        /// <summary>
-        /// Gets the top right corner of this entity.
-        /// </summary>
-        // ------------------------------------------------------------------
-        Point TopRightCorner
-        {
-            get;
-        }
-
-        // ------------------------------------------------------------------
-        /// <summary>
-        /// Gets the bottom left corner of this entity.
-        /// </summary>
-        // ------------------------------------------------------------------
-        Point BottomLeftCorner
-        {
-            get;
-        }
-
-        // ------------------------------------------------------------------
-        /// <summary>
-        /// Gets the bottom right corner of this entity.
-        /// </summary>
-        // ------------------------------------------------------------------
-        Point BottomRightCorner
-        {
-            get;
-        }
-
-        // ------------------------------------------------------------------
-        /// <summary>
-        /// Gets the minimum size of the paintable entity.
-        /// </summary>
-        /// <value>Size</value>
-        // ------------------------------------------------------------------
-        Size MinSize 
-        { 
-            get; 
-        }
-
-        // ------------------------------------------------------------------
-        /// <summary>
-        /// Gets the maximum size of the paintable entity.
-        /// </summary>
-        /// <value>Size</value>
-        // ------------------------------------------------------------------
-        Size MaxSize 
-        { 
-            get; 
-        }
-
-        // ------------------------------------------------------------------
-        /// <summary>
-        /// Gets or sets the magnification currently used by the view.
-        /// </summary>
-        // ------------------------------------------------------------------
-        SizeF Magnification
-        {
-            get;
-            set;
-        }
-
-        // ------------------------------------------------------------------
-        /// <summary>
-        /// Gets or sets a value indicating whether this 
-        /// <see cref="T:IDiagramEntity"/> is enabled.
-        /// </summary>
-        /// <value><c>true</c> if enabled; otherwise, <c>false</c>.</value>
-        // ------------------------------------------------------------------
-        bool Enabled 
-        { 
-            get;
-            set;
-        }
-
-        // ------------------------------------------------------------------
-		/// <summary>
-		/// Gets or sets whether the entity is selected
-        /// </summary>
-        // ------------------------------------------------------------------
-		bool IsSelected 
-        {
-            get; 
-            set;
-        }
-
-        // ------------------------------------------------------------------
-		/// <summary>
-		/// Gets or sets the canvas to which the entity belongs
-        /// </summary>
-        // ------------------------------------------------------------------
-		IModel Model 
-        {
-            get; 
-            set;
-        }
-
-        // ------------------------------------------------------------------
-		/// <summary>
-		/// Gets or sets the parent of the entity.
-        /// <remarks>If the parent is null the entity is a branch node in the 
-        /// scene graph. The layer is never a parent because an entity can 
-        /// belong to multiple layers.
-        /// </remarks>
-        /// </summary>
-        // ------------------------------------------------------------------
-		object Parent 
-        {
-            get; 
-            set;
-        }
-
-        // ------------------------------------------------------------------
-		/// <summary>
-		/// Gets or sets the name of the entity
-        /// </summary>
-        // ------------------------------------------------------------------
-		string Name 
-        {
-            get; 
-            set;
-        }
-
-        // ------------------------------------------------------------------
-		/// <summary>
-		/// Gets or sets whether the entity is hovered by the mouse
-        /// </summary>
-        // ------------------------------------------------------------------
-		bool Hovered 
-        {
-            get; 
-            set;
-        }
-
-        // ------------------------------------------------------------------
-		/// <summary>
-		/// General purpose tag
-        /// </summary>
-        // ------------------------------------------------------------------
-		object Tag 
-        {
-            get; 
-            set;
-        }
-
-        // ------------------------------------------------------------------
-        /// <summary>
-        /// Gets the friendly name of the entity to be displayed in the UI
-        /// </summary>
-        // ------------------------------------------------------------------
-        string EntityName 
-        { 
-            get;
-        }
-
-        // ------------------------------------------------------------------
-        /// <summary>
-        /// Gets or sets the index of this entity in the scene-graph.
-        /// </summary>
-        /// <value>The index of the scene.</value>
-        // ------------------------------------------------------------------
-        int SceneIndex 
-        { 
-            get; 
-            set;
-        }
-
-        // ------------------------------------------------------------------
-        /// <summary>
-        /// Gets or sets the unique top-group to which this entity belongs.
-        /// </summary>
-        // ------------------------------------------------------------------
-        IGroup Group 
-        { 
-            get; 
-            set;
-        }
-
-        // ------------------------------------------------------------------
-        /// <summary>
-        /// Gets or sets a value indicating whether this 
-        /// <see cref="IDiagramEntity"/> is movable.
-        /// </summary>
-        /// <value><c>true</c> if movable; otherwise, <c>false</c>.</value>
-        // ------------------------------------------------------------------
-        bool AllowMove 
-        { 
-            get;
-            set;
-        }
-
-        // ------------------------------------------------------------------
-        /// <summary>
-        /// Gets or sets a value indicating whether this 
-        /// <see cref="IDiagramEntity"/> can be deleted.
-        /// </summary>
-        /// <value><c>true</c> if deletable; otherwise, <c>false</c>.</value>
-        // ------------------------------------------------------------------
-        bool AllowDelete
-        {
-            get;
-            set;
-        }
-
-        // ------------------------------------------------------------------
-        /// <summary>
-        /// Gets or sets a value indicating whether this 
-        /// <see cref="IDiagramEntity"/> is resizable.
-        /// </summary>
-        /// <value><c>true</c> if resizable; otherwise, <c>false</c>.</value>
-        // ------------------------------------------------------------------
-        bool Resizable 
-        { 
-            get;
-            set;
-        }
-
-        // ------------------------------------------------------------------
-        /// <summary>
-        /// Gets the globally unique identifier of this entity
-        /// </summary>
-        // ------------------------------------------------------------------
-        Guid Uid 
-        { 
-            get;
-        }
-
-        // ------------------------------------------------------------------
-        /// <summary>
-        /// Gets or sets the paint style.
-        /// </summary>
-        /// <value>The paint style.</value>
-        // ------------------------------------------------------------------
-        IPaintStyle PaintStyle 
-        { 
-            get; 
-            set;
-        }
-
-        // ------------------------------------------------------------------
-        /// <summary>
-        /// Gets or sets the pen style.
-        /// </summary>
-        /// <value>The pen style.</value>
-        // ------------------------------------------------------------------
-        IPenStyle PenStyle 
-        { 
-            get; 
-            set;
-        }
-
-        // ------------------------------------------------------------------
-        /// <summary>
-        /// Gets or sets the layer this entity is attached to.
-        /// </summary>
-        // ------------------------------------------------------------------
-        ILayer Layer
-        {
-            get;
-            set;
-        }
-
-		#endregion
-
-        #region Methods
-        
-        // ------------------------------------------------------------------
-        /// <summary>
-        /// Called after an entity is deleted.
-        /// </summary>
-        /// <param name="deleteCommand">DeleteCommand: The un/redoable command
-        /// that's part of the undo/redo mechanism.</param>
-        // ------------------------------------------------------------------
-        void OnAfterDelete(DeleteCommand deleteCommand);
-
-        // ------------------------------------------------------------------
-        /// <summary>
-        /// Called before an entity is deleted.
-        /// </summary>
-        /// <param name="deleteCommand">DeleteCommand: The un/redoable command
-        /// that's part of the undo/redo mechanism.</param>
-        // ------------------------------------------------------------------
-        void OnBeforeDelete(DeleteCommand deleteCommand);
-
-        // ------------------------------------------------------------------
-        /// <summary>
-        /// Called when the entity is detached from the canvas (temporarily
-        /// deleted but not disposed).
-        /// </summary>
-        // ------------------------------------------------------------------
-        void Detached(ILayer layer);
-
-        // ------------------------------------------------------------------
-        /// <summary>
-        /// Called when the entity is attached to the canvas (after being
-        /// temporarily detached, like in a paste operation).
-        /// </summary>
-        // ------------------------------------------------------------------
-        void Attached(ILayer layer);
-
-        // ------------------------------------------------------------------
-        /// <summary>
-        /// Generates a new Uid for this entity.
-        /// </summary>
-        /// <param name="recursive">if the Uid has to be changed recursively 
-        /// down to the sub-entities, set to true, otherwise false.</param>
-        // ------------------------------------------------------------------
-        void NewUid(bool recursive);
-
-        // ------------------------------------------------------------------
-        /// <summary>
-        /// The custom elements to be added to the menu on a per-entity basis
-        /// </summary>
-        /// <returns>ToolStripItem[]</returns>
-        // ------------------------------------------------------------------
-        ToolStripItem[] Menu();
-
-        // ------------------------------------------------------------------
-		/// <summary>
-		/// Raises the onclick event.
-		/// </summary>
-        /// <param name="e"></param>
-        // ------------------------------------------------------------------
-        void RaiseOnClick(EntityEventArgs e);
-
-        // ------------------------------------------------------------------
-        /// <summary>
-        /// Raises the OnMouseDown event.
-        /// </summary>
-        /// <param name="e">The 
-        /// <see cref="T:Netron.Diagramming.Core.EntityMouseEventArgs"/> 
-        /// instance containing the event data.</param>
-        // ------------------------------------------------------------------
-        void RaiseOnMouseDown(EntityMouseEventArgs e);
-
-        // ------------------------------------------------------------------
-        /// <summary>
-        /// Raises the OnMouseUp event.
-        /// </summary>
-        /// <param name="e">The 
-        /// <see cref="T:Netron.Diagramming.Core.EntityMouseEventArgs"/> 
-        /// instance containing the event data.</param>
-        // ------------------------------------------------------------------
-        void RaiseOnMouseUp(EntityMouseEventArgs e);
-
-        // ------------------------------------------------------------------
-        /// <summary>
-        /// Raises the OnMouseMove event.
-        /// </summary>
-        /// <param name="e">The 
-        /// <see cref="T:Netron.Diagramming.Core.EntityMouseEventArgs"/> 
-        /// instance containing the event data.</param>
-        // ------------------------------------------------------------------
-        void RaiseOnMouseMove(EntityMouseEventArgs e);
-
-        // ------------------------------------------------------------------
-        /// <summary>
-        /// Raises the OnMouseEnter event.
-        /// </summary>
-        /// <param name="e">The 
-        /// <see cref="T:Netron.Diagramming.Core.EntityMouseEventArgs"/> 
-        /// instance containing the event data.</param>
-        // ------------------------------------------------------------------
-        void RaiseOnMouseEnter(EntityMouseEventArgs e);
-
-        // ------------------------------------------------------------------
-        /// <summary>
-        /// Raises the OnMouseHover event.
-        /// </summary>
-        /// <param name="e">The 
-        /// <see cref="T:Netron.Diagramming.Core.EntityMouseEventArgs"/> 
-        /// instance containing the event data.</param>
-        // ------------------------------------------------------------------
-        void RaiseOnMouseHover(EntityMouseEventArgs e);
-
-        // ------------------------------------------------------------------
-        /// <summary>
-        /// Raises the OnMouseLeave event.
-        /// </summary>
-        /// <param name="e">The 
-        /// <see cref="T:Netron.Diagramming.Core.EntityMouseEventArgs"/> 
-        /// instance containing the event data.</param>
-        // ------------------------------------------------------------------
-        void RaiseOnMouseLeave(EntityMouseEventArgs e);
-
-        // ------------------------------------------------------------------
-		/// <summary>
-		/// Returns whether the entity was hit at the given location
-		/// </summary>
-		/// <param name="p">a Point location</param>
-        /// <returns></returns>
-        // ------------------------------------------------------------------
-		bool Hit(Point p);
-
-        // ------------------------------------------------------------------
-		/// <summary>
-		/// Invalidates the entity
-        /// </summary>
-        // ------------------------------------------------------------------
-		void Invalidate();
-
-        // ------------------------------------------------------------------
-		/// <summary>
-		/// Invalidates a certain rectangle of the canvas
-		/// </summary>
-        /// <param name="rectangle"></param>
-        // ------------------------------------------------------------------
-		void Invalidate(Rectangle rectangle);
-
-        // ------------------------------------------------------------------
-		/// <summary>
-		/// Moves the entity to the given location
-		/// </summary>
-        /// <param name="p">a Point location</param>
-        // ------------------------------------------------------------------
-		void MoveBy(Point p);
-
-		#endregion
-	}
+        IVersion {
+
+    #region Events
+
+    // ------------------------------------------------------------------
+    /// <summary>
+    /// Occurs when the entity's properties have changed
+    /// </summary>
+    // ------------------------------------------------------------------
+    event EventHandler<EntityEventArgs> OnEntityChange;
+
+    // ------------------------------------------------------------------
+    /// <summary>
+    /// Occurs when the entity is selected.  This can be different than 
+    /// the OnClick because the selector can select and entity without 
+    /// clicking on it.
+    /// </summary>
+    // ------------------------------------------------------------------
+    event EventHandler<EntityEventArgs> OnEntitySelect;
+
+    // ------------------------------------------------------------------
+    /// <summary>
+    /// Occurs when the user clicks on the entity.
+    /// </summary>
+    // ------------------------------------------------------------------
+    event EventHandler<EntityEventArgs> OnClick;
+
+    // ------------------------------------------------------------------
+    /// <summary>
+    /// Occurs when a mouse button is pressed while over the entity.
+    /// </summary>
+    // ------------------------------------------------------------------
+    event EventHandler<EntityMouseEventArgs> OnMouseDown;
+
+    // ------------------------------------------------------------------
+    /// <summary>
+    /// Occurs when a mouse button is released while over the entity.
+    /// </summary>
+    // ------------------------------------------------------------------
+    event EventHandler<EntityMouseEventArgs> OnMouseUp;
+
+    // ------------------------------------------------------------------
+    /// <summary>
+    /// Occurs when the mouse is moved while over the entity.
+    /// </summary>
+    // ------------------------------------------------------------------
+    event EventHandler<EntityMouseEventArgs> OnMouseMove;
+
+    // ------------------------------------------------------------------
+    /// <summary>
+    /// Occurs when the mouse enters the entity.
+    /// </summary>
+    // ------------------------------------------------------------------
+    event EventHandler<EntityMouseEventArgs> OnMouseEnter;
+
+    // ------------------------------------------------------------------
+    /// <summary>
+    /// Occurs when the mouse hovers over the entity.
+    /// </summary>
+    // ------------------------------------------------------------------
+    event EventHandler<EntityMouseEventArgs> OnMouseHover;
+
+    // ------------------------------------------------------------------
+    /// <summary>
+    /// Occurs when the mouse leaves the entity.
+    /// </summary>
+    // ------------------------------------------------------------------
+    event EventHandler<EntityMouseEventArgs> OnMouseLeave;
+
+
+    #endregion
+
+    #region Properties
+
+    // ------------------------------------------------------------------
+    /// <summary>
+    /// Gets the center point of the paintable entity (the center of the
+    /// Rectangle).
+    /// </summary>
+    /// <value>Point</value>
+    // ------------------------------------------------------------------
+    Point Center {
+      get;
+    }
+
+    // ------------------------------------------------------------------
+    /// <summary>
+    /// Gets the center of the bottom edge of the bounding rectangle.
+    /// </summary>
+    // ------------------------------------------------------------------
+    Point BottomCenter {
+      get;
+    }
+
+    // ------------------------------------------------------------------
+    /// <summary>
+    /// Gets the center of the top edge of the bounding rectangle.
+    /// </summary>
+    // ------------------------------------------------------------------
+    Point TopCenter {
+      get;
+    }
+
+    // ------------------------------------------------------------------
+    /// <summary>
+    /// Gets the top left corner of this entity, which is the same as
+    /// 'Rectangle.Location'.
+    /// </summary>
+    // ------------------------------------------------------------------
+    Point TopLeftCorner {
+      get;
+    }
+
+    // ------------------------------------------------------------------
+    /// <summary>
+    /// Gets the top right corner of this entity.
+    /// </summary>
+    // ------------------------------------------------------------------
+    Point TopRightCorner {
+      get;
+    }
+
+    // ------------------------------------------------------------------
+    /// <summary>
+    /// Gets the bottom left corner of this entity.
+    /// </summary>
+    // ------------------------------------------------------------------
+    Point BottomLeftCorner {
+      get;
+    }
+
+    // ------------------------------------------------------------------
+    /// <summary>
+    /// Gets the bottom right corner of this entity.
+    /// </summary>
+    // ------------------------------------------------------------------
+    Point BottomRightCorner {
+      get;
+    }
+
+    // ------------------------------------------------------------------
+    /// <summary>
+    /// Gets the minimum size of the paintable entity.
+    /// </summary>
+    /// <value>Size</value>
+    // ------------------------------------------------------------------
+    Size MinSize {
+      get;
+    }
+
+    // ------------------------------------------------------------------
+    /// <summary>
+    /// Gets the maximum size of the paintable entity.
+    /// </summary>
+    /// <value>Size</value>
+    // ------------------------------------------------------------------
+    Size MaxSize {
+      get;
+    }
+
+    // ------------------------------------------------------------------
+    /// <summary>
+    /// Gets or sets the magnification currently used by the view.
+    /// </summary>
+    // ------------------------------------------------------------------
+    SizeF Magnification {
+      get;
+      set;
+    }
+
+    // ------------------------------------------------------------------
+    /// <summary>
+    /// Gets or sets a value indicating whether this 
+    /// <see cref="T:IDiagramEntity"/> is enabled.
+    /// </summary>
+    /// <value><c>true</c> if enabled; otherwise, <c>false</c>.</value>
+    // ------------------------------------------------------------------
+    bool Enabled {
+      get;
+      set;
+    }
+
+    // ------------------------------------------------------------------
+    /// <summary>
+    /// Gets or sets whether the entity is selected
+    /// </summary>
+    // ------------------------------------------------------------------
+    bool IsSelected {
+      get;
+      set;
+    }
+
+    // ------------------------------------------------------------------
+    /// <summary>
+    /// Gets or sets the canvas to which the entity belongs
+    /// </summary>
+    // ------------------------------------------------------------------
+    IModel Model {
+      get;
+      set;
+    }
+
+    // ------------------------------------------------------------------
+    /// <summary>
+    /// Gets or sets the parent of the entity.
+    /// <remarks>If the parent is null the entity is a branch node in the 
+    /// scene graph. The layer is never a parent because an entity can 
+    /// belong to multiple layers.
+    /// </remarks>
+    /// </summary>
+    // ------------------------------------------------------------------
+    object Parent {
+      get;
+      set;
+    }
+
+    // ------------------------------------------------------------------
+    /// <summary>
+    /// Gets or sets the name of the entity
+    /// </summary>
+    // ------------------------------------------------------------------
+    string Name {
+      get;
+      set;
+    }
+
+    // ------------------------------------------------------------------
+    /// <summary>
+    /// Gets or sets whether the entity is hovered by the mouse
+    /// </summary>
+    // ------------------------------------------------------------------
+    bool Hovered {
+      get;
+      set;
+    }
+
+    // ------------------------------------------------------------------
+    /// <summary>
+    /// General purpose tag
+    /// </summary>
+    // ------------------------------------------------------------------
+    object Tag {
+      get;
+      set;
+    }
+
+    // ------------------------------------------------------------------
+    /// <summary>
+    /// Gets the friendly name of the entity to be displayed in the UI
+    /// </summary>
+    // ------------------------------------------------------------------
+    string EntityName {
+      get;
+    }
+
+    // ------------------------------------------------------------------
+    /// <summary>
+    /// Gets or sets the index of this entity in the scene-graph.
+    /// </summary>
+    /// <value>The index of the scene.</value>
+    // ------------------------------------------------------------------
+    int SceneIndex {
+      get;
+      set;
+    }
+
+    // ------------------------------------------------------------------
+    /// <summary>
+    /// Gets or sets the unique top-group to which this entity belongs.
+    /// </summary>
+    // ------------------------------------------------------------------
+    IGroup Group {
+      get;
+      set;
+    }
+
+    // ------------------------------------------------------------------
+    /// <summary>
+    /// Gets or sets a value indicating whether this 
+    /// <see cref="IDiagramEntity"/> is movable.
+    /// </summary>
+    /// <value><c>true</c> if movable; otherwise, <c>false</c>.</value>
+    // ------------------------------------------------------------------
+    bool AllowMove {
+      get;
+      set;
+    }
+
+    // ------------------------------------------------------------------
+    /// <summary>
+    /// Gets or sets a value indicating whether this 
+    /// <see cref="IDiagramEntity"/> can be deleted.
+    /// </summary>
+    /// <value><c>true</c> if deletable; otherwise, <c>false</c>.</value>
+    // ------------------------------------------------------------------
+    bool AllowDelete {
+      get;
+      set;
+    }
+
+    // ------------------------------------------------------------------
+    /// <summary>
+    /// Gets or sets a value indicating whether this 
+    /// <see cref="IDiagramEntity"/> is resizable.
+    /// </summary>
+    /// <value><c>true</c> if resizable; otherwise, <c>false</c>.</value>
+    // ------------------------------------------------------------------
+    bool Resizable {
+      get;
+      set;
+    }
+
+    // ------------------------------------------------------------------
+    /// <summary>
+    /// Gets the globally unique identifier of this entity
+    /// </summary>
+    // ------------------------------------------------------------------
+    Guid Uid {
+      get;
+    }
+
+    // ------------------------------------------------------------------
+    /// <summary>
+    /// Gets or sets the paint style.
+    /// </summary>
+    /// <value>The paint style.</value>
+    // ------------------------------------------------------------------
+    IPaintStyle PaintStyle {
+      get;
+      set;
+    }
+
+    // ------------------------------------------------------------------
+    /// <summary>
+    /// Gets or sets the pen style.
+    /// </summary>
+    /// <value>The pen style.</value>
+    // ------------------------------------------------------------------
+    IPenStyle PenStyle {
+      get;
+      set;
+    }
+
+    // ------------------------------------------------------------------
+    /// <summary>
+    /// Gets or sets the layer this entity is attached to.
+    /// </summary>
+    // ------------------------------------------------------------------
+    ILayer Layer {
+      get;
+      set;
+    }
+
+    #endregion
+
+    #region Methods
+
+    // ------------------------------------------------------------------
+    /// <summary>
+    /// Called after an entity is deleted.
+    /// </summary>
+    /// <param name="deleteCommand">DeleteCommand: The un/redoable command
+    /// that's part of the undo/redo mechanism.</param>
+    // ------------------------------------------------------------------
+    void OnAfterDelete(DeleteCommand deleteCommand);
+
+    // ------------------------------------------------------------------
+    /// <summary>
+    /// Called before an entity is deleted.
+    /// </summary>
+    /// <param name="deleteCommand">DeleteCommand: The un/redoable command
+    /// that's part of the undo/redo mechanism.</param>
+    // ------------------------------------------------------------------
+    void OnBeforeDelete(DeleteCommand deleteCommand);
+
+    // ------------------------------------------------------------------
+    /// <summary>
+    /// Called when the entity is detached from the canvas (temporarily
+    /// deleted but not disposed).
+    /// </summary>
+    // ------------------------------------------------------------------
+    void Detached(ILayer layer);
+
+    // ------------------------------------------------------------------
+    /// <summary>
+    /// Called when the entity is attached to the canvas (after being
+    /// temporarily detached, like in a paste operation).
+    /// </summary>
+    // ------------------------------------------------------------------
+    void Attached(ILayer layer);
+
+    // ------------------------------------------------------------------
+    /// <summary>
+    /// Generates a new Uid for this entity.
+    /// </summary>
+    /// <param name="recursive">if the Uid has to be changed recursively 
+    /// down to the sub-entities, set to true, otherwise false.</param>
+    // ------------------------------------------------------------------
+    void NewUid(bool recursive);
+
+    // ------------------------------------------------------------------
+    /// <summary>
+    /// The custom elements to be added to the menu on a per-entity basis
+    /// </summary>
+    /// <returns>ToolStripItem[]</returns>
+    // ------------------------------------------------------------------
+    ToolStripItem[] Menu();
+
+    // ------------------------------------------------------------------
+    /// <summary>
+    /// Raises the onclick event.
+    /// </summary>
+    /// <param name="e"></param>
+    // ------------------------------------------------------------------
+    void RaiseOnClick(EntityEventArgs e);
+
+    // ------------------------------------------------------------------
+    /// <summary>
+    /// Raises the OnMouseDown event.
+    /// </summary>
+    /// <param name="e">The 
+    /// <see cref="T:Netron.Diagramming.Core.EntityMouseEventArgs"/> 
+    /// instance containing the event data.</param>
+    // ------------------------------------------------------------------
+    void RaiseOnMouseDown(EntityMouseEventArgs e);
+
+    // ------------------------------------------------------------------
+    /// <summary>
+    /// Raises the OnMouseUp event.
+    /// </summary>
+    /// <param name="e">The 
+    /// <see cref="T:Netron.Diagramming.Core.EntityMouseEventArgs"/> 
+    /// instance containing the event data.</param>
+    // ------------------------------------------------------------------
+    void RaiseOnMouseUp(EntityMouseEventArgs e);
+
+    // ------------------------------------------------------------------
+    /// <summary>
+    /// Raises the OnMouseMove event.
+    /// </summary>
+    /// <param name="e">The 
+    /// <see cref="T:Netron.Diagramming.Core.EntityMouseEventArgs"/> 
+    /// instance containing the event data.</param>
+    // ------------------------------------------------------------------
+    void RaiseOnMouseMove(EntityMouseEventArgs e);
+
+    // ------------------------------------------------------------------
+    /// <summary>
+    /// Raises the OnMouseEnter event.
+    /// </summary>
+    /// <param name="e">The 
+    /// <see cref="T:Netron.Diagramming.Core.EntityMouseEventArgs"/> 
+    /// instance containing the event data.</param>
+    // ------------------------------------------------------------------
+    void RaiseOnMouseEnter(EntityMouseEventArgs e);
+
+    // ------------------------------------------------------------------
+    /// <summary>
+    /// Raises the OnMouseHover event.
+    /// </summary>
+    /// <param name="e">The 
+    /// <see cref="T:Netron.Diagramming.Core.EntityMouseEventArgs"/> 
+    /// instance containing the event data.</param>
+    // ------------------------------------------------------------------
+    void RaiseOnMouseHover(EntityMouseEventArgs e);
+
+    // ------------------------------------------------------------------
+    /// <summary>
+    /// Raises the OnMouseLeave event.
+    /// </summary>
+    /// <param name="e">The 
+    /// <see cref="T:Netron.Diagramming.Core.EntityMouseEventArgs"/> 
+    /// instance containing the event data.</param>
+    // ------------------------------------------------------------------
+    void RaiseOnMouseLeave(EntityMouseEventArgs e);
+
+    // ------------------------------------------------------------------
+    /// <summary>
+    /// Returns whether the entity was hit at the given location
+    /// </summary>
+    /// <param name="p">a Point location</param>
+    /// <returns></returns>
+    // ------------------------------------------------------------------
+    bool Hit(Point p);
+
+    // ------------------------------------------------------------------
+    /// <summary>
+    /// Invalidates the entity
+    /// </summary>
+    // ------------------------------------------------------------------
+    void Invalidate();
+
+    // ------------------------------------------------------------------
+    /// <summary>
+    /// Invalidates a certain rectangle of the canvas
+    /// </summary>
+    /// <param name="rectangle"></param>
+    // ------------------------------------------------------------------
+    void Invalidate(Rectangle rectangle);
+
+    // ------------------------------------------------------------------
+    /// <summary>
+    /// Moves the entity to the given location
+    /// </summary>
+    /// <param name="p">a Point location</param>
+    // ------------------------------------------------------------------
+    void MoveBy(Point p);
+
+    #endregion
+  }
 }
Index: /trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.Netron/3.0.2672.12446/Netron.Diagramming.Core-3.0.2672.12446/Core/Interfaces/IDragDropListener.cs
===================================================================
--- /trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.Netron/3.0.2672.12446/Netron.Diagramming.Core-3.0.2672.12446/Core/Interfaces/IDragDropListener.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.Netron/3.0.2672.12446/Netron.Diagramming.Core-3.0.2672.12446/Core/Interfaces/IDragDropListener.cs	(revision 4068)
@@ -1,40 +1,36 @@
 using System;
-using System.Collections.Generic;
-using System.Text;
 using System.Windows.Forms;
-namespace Netron.Diagramming.Core
-{
-    public interface IDragDropListener : IInteraction
-    {
+namespace Netron.Diagramming.Core {
+  public interface IDragDropListener : IInteraction {
 
-        /// <summary>
-        /// On dragdrop.
-        /// </summary>
-        /// <param name="e">The <see cref="T:KeyEventArgs"/> instance containing the event data.</param>
-        bool OnDragDrop(DragEventArgs e);
+    /// <summary>
+    /// On dragdrop.
+    /// </summary>
+    /// <param name="e">The <see cref="T:KeyEventArgs"/> instance containing the event data.</param>
+    bool OnDragDrop(DragEventArgs e);
 
-        /// <summary>
-        ///   On drag enter
-        /// </summary>
-        /// <param name="e"></param>
-        bool OnDragEnter(DragEventArgs e);
-        /// <summary>
-        /// On drag leave.
-        /// </summary>
-        /// <param name="e">The <see cref="T:KeyEventArgs"/> instance containing the event data.</param>
-        bool OnDragLeave(EventArgs e);
+    /// <summary>
+    ///   On drag enter
+    /// </summary>
+    /// <param name="e"></param>
+    bool OnDragEnter(DragEventArgs e);
+    /// <summary>
+    /// On drag leave.
+    /// </summary>
+    /// <param name="e">The <see cref="T:KeyEventArgs"/> instance containing the event data.</param>
+    bool OnDragLeave(EventArgs e);
 
-        /// <summary>
-        /// On drag over.
-        /// </summary>
-        /// <param name="e">The <see cref="T:KeyPressEventArgs"/> instance containing the event data.</param>
-        bool OnDragOver(DragEventArgs e);
+    /// <summary>
+    /// On drag over.
+    /// </summary>
+    /// <param name="e">The <see cref="T:KeyPressEventArgs"/> instance containing the event data.</param>
+    bool OnDragOver(DragEventArgs e);
 
-        /// <summary>
-        /// Gives the feedback on dragging.
-        /// </summary>
-        /// <param name="e">The <see cref="T:System.Windows.Forms.GiveFeedbackEventArgs"/> instance containing the event data.</param>
-        void GiveFeedback(GiveFeedbackEventArgs e);
+    /// <summary>
+    /// Gives the feedback on dragging.
+    /// </summary>
+    /// <param name="e">The <see cref="T:System.Windows.Forms.GiveFeedbackEventArgs"/> instance containing the event data.</param>
+    void GiveFeedback(GiveFeedbackEventArgs e);
 
-    }
+  }
 }
Index: /trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.Netron/3.0.2672.12446/Netron.Diagramming.Core-3.0.2672.12446/Core/Interfaces/IDrawStyle.cs
===================================================================
--- /trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.Netron/3.0.2672.12446/Netron.Diagramming.Core-3.0.2672.12446/Core/Interfaces/IDrawStyle.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.Netron/3.0.2672.12446/Netron.Diagramming.Core-3.0.2672.12446/Core/Interfaces/IDrawStyle.cs	(revision 4068)
@@ -1,98 +1,89 @@
-using System;
-using System.Collections.Generic;
-using System.Text;
 using System.Drawing;
 using System.Drawing.Drawing2D;
-namespace Netron.Diagramming.Core
-{
+namespace Netron.Diagramming.Core {
+  /// <summary>
+  /// Defines a custom pen style to draw entities and sub-entities.
+  /// <remarks>The style can be extended with many properties and .Net 2.0 has added several new ones in comparison to .Net 1.1. Feel free to extend
+  /// as you need.</remarks>
+  /// </summary>
+  public interface IDrawStyle {
     /// <summary>
-    /// Defines a custom pen style to draw entities and sub-entities.
-    /// <remarks>The style can be extended with many properties and .Net 2.0 has added several new ones in comparison to .Net 1.1. Feel free to extend
-    /// as you need.</remarks>
+    /// Gets or sets the custom end cap.
     /// </summary>
-    public interface IDrawStyle
-    {
-        /// <summary>
-        /// Gets or sets the custom end cap.
-        /// </summary>
-        /// <value>The custom end cap.</value>
-        CustomLineCap CustomEndCap { get; set; }
-        /// <summary>
-        /// Gets or sets the custom start cap.
-        /// </summary>
-        /// <value>The custom start cap.</value>
-        CustomLineCap CustomStartCap { get; set; }
-        /// <summary>
-        /// Gets or sets the start cap.
-        /// </summary>
-        /// <value>The start cap.</value>
-        LineCap StartCap { get; set; }
-        /// <summary>
-        /// Gets or sets the end cap.
-        /// </summary>
-        /// <value>The end cap.</value>
-        LineCap EndCap { get; set; }
-        /// <summary>
-        /// Gets or sets the color.
-        /// </summary>
-        /// <value>The color.</value>
-        Color Color { get; set; }
-        /// <summary>
-        /// Gets or sets the dash style.
-        /// </summary>
-        /// <value>The dash style.</value>
-        DashStyle DashStyle { get; set; }
-        /// <summary>
-        /// Gets or sets the width.
-        /// </summary>
-        /// <value>The width.</value>
-        float Width { get; set; }
-        /// <summary>
-        /// Gets the drawing pen of this style.
-        /// </summary>
-        /// <returns></returns>
-        Pen DrawingPen();
+    /// <value>The custom end cap.</value>
+    CustomLineCap CustomEndCap { get; set; }
+    /// <summary>
+    /// Gets or sets the custom start cap.
+    /// </summary>
+    /// <value>The custom start cap.</value>
+    CustomLineCap CustomStartCap { get; set; }
+    /// <summary>
+    /// Gets or sets the start cap.
+    /// </summary>
+    /// <value>The start cap.</value>
+    LineCap StartCap { get; set; }
+    /// <summary>
+    /// Gets or sets the end cap.
+    /// </summary>
+    /// <value>The end cap.</value>
+    LineCap EndCap { get; set; }
+    /// <summary>
+    /// Gets or sets the color.
+    /// </summary>
+    /// <value>The color.</value>
+    Color Color { get; set; }
+    /// <summary>
+    /// Gets or sets the dash style.
+    /// </summary>
+    /// <value>The dash style.</value>
+    DashStyle DashStyle { get; set; }
+    /// <summary>
+    /// Gets or sets the width.
+    /// </summary>
+    /// <value>The width.</value>
+    float Width { get; set; }
+    /// <summary>
+    /// Gets the drawing pen of this style.
+    /// </summary>
+    /// <returns></returns>
+    Pen DrawingPen();
+  }
+
+  /// <summary>
+  /// Describes a pen style.
+  /// </summary>
+  public interface IPenStyle : IVersion {
+    #region Properties
+
+    /// <summary>
+    /// Gets or sets the color.
+    /// </summary>
+    /// <value>The color.</value>
+    Color Color {
+      get;
+      set;
     }
 
     /// <summary>
-    /// Describes a pen style.
+    /// Gets or sets the dash style.
     /// </summary>
-    public interface IPenStyle : IVersion
-    {
-        #region Properties
+    /// <value>The dash style.</value>
+    DashStyle DashStyle {
+      get;
+      set;
+    }
 
-        /// <summary>
-        /// Gets or sets the color.
-        /// </summary>
-        /// <value>The color.</value>
-        Color Color
-        {
-            get;
-            set;
-        }
+    /// <summary>
+    /// Gets or sets the width.
+    /// </summary>
+    /// <value>The width.</value>
+    float Width {
+      get;
+      set;
+    }
 
-        /// <summary>
-        /// Gets or sets the dash style.
-        /// </summary>
-        /// <value>The dash style.</value>
-        DashStyle DashStyle
-        {
-            get;
-            set;
-        }
+    #endregion
 
-        /// <summary>
-        /// Gets or sets the width.
-        /// </summary>
-        /// <value>The width.</value>
-        float Width
-        {
-            get;
-            set;
-        }
-
-        #endregion
-
-        Pen DrawingPen();
-    }
+    Pen DrawingPen();
+  }
 }
Index: /trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.Netron/3.0.2672.12446/Netron.Diagramming.Core-3.0.2672.12446/Core/Interfaces/IGenericFormatter.cs
===================================================================
--- /trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.Netron/3.0.2672.12446/Netron.Diagramming.Core-3.0.2672.12446/Core/Interfaces/IGenericFormatter.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.Netron/3.0.2672.12446/Netron.Diagramming.Core-3.0.2672.12446/Core/Interfaces/IGenericFormatter.cs	(revision 4068)
@@ -1,25 +1,20 @@
-using System;
-using System.Collections.Generic;
-using System.Text;
 using System.IO;
-namespace Netron.Diagramming.Core
-{
+namespace Netron.Diagramming.Core {
+  /// <summary>
+  /// Generic formatter interface
+  /// </summary>
+  public interface IGenericFormatter {
     /// <summary>
-    /// Generic formatter interface
+    /// Deserializes the specified serialization stream.
     /// </summary>
-    public interface IGenericFormatter
-    {
-        /// <summary>
-        /// Deserializes the specified serialization stream.
-        /// </summary>
-        /// <param name="serializationStream">The serialization stream.</param>
-        /// <returns></returns>
-        T Deserialize<T>(Stream serializationStream);
-        /// <summary>
-        /// Serializes the specified serialization stream.
-        /// </summary>
-        /// <param name="serializationStream">The serialization stream.</param>
-        /// <param name="graph">A parameter of the generics Type T</param>
-        void Serialize<T>(Stream serializationStream, T graph);
-    }
+    /// <param name="serializationStream">The serialization stream.</param>
+    /// <returns></returns>
+    T Deserialize<T>(Stream serializationStream);
+    /// <summary>
+    /// Serializes the specified serialization stream.
+    /// </summary>
+    /// <param name="serializationStream">The serialization stream.</param>
+    /// <param name="graph">A parameter of the generics Type T</param>
+    void Serialize<T>(Stream serializationStream, T graph);
+  }
 }
Index: /trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.Netron/3.0.2672.12446/Netron.Diagramming.Core-3.0.2672.12446/Core/Interfaces/IGhost.cs
===================================================================
--- /trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.Netron/3.0.2672.12446/Netron.Diagramming.Core-3.0.2672.12446/Core/Interfaces/IGhost.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.Netron/3.0.2672.12446/Netron.Diagramming.Core-3.0.2672.12446/Core/Interfaces/IGhost.cs	(revision 4068)
@@ -1,14 +1,8 @@
-using System;
-using System.Collections.Generic;
-using System.Text;
-using System.Drawing;
-namespace Netron.Diagramming.Core
-{
-    /// <summary>
-    /// A ghost is a preview of something on the canvas
-    /// </summary>
-    public interface IGhost : IPaintable
-    {
-       
-    }
+namespace Netron.Diagramming.Core {
+  /// <summary>
+  /// A ghost is a preview of something on the canvas
+  /// </summary>
+  public interface IGhost : IPaintable {
+
+  }
 }
Index: /trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.Netron/3.0.2672.12446/Netron.Diagramming.Core-3.0.2672.12446/Core/Interfaces/IGroup.cs
===================================================================
--- /trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.Netron/3.0.2672.12446/Netron.Diagramming.Core-3.0.2672.12446/Core/Interfaces/IGroup.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.Netron/3.0.2672.12446/Netron.Diagramming.Core-3.0.2672.12446/Core/Interfaces/IGroup.cs	(revision 4068)
@@ -1,47 +1,41 @@
-using System;
-using System.Collections.Generic;
-using System.Text;
 
-namespace Netron.Diagramming.Core
-{
-    // ----------------------------------------------------------------------
+namespace Netron.Diagramming.Core {
+  // ----------------------------------------------------------------------
+  /// <summary>
+  /// The group interface.
+  /// </summary>
+  // ----------------------------------------------------------------------
+  public interface IGroup : IDiagramEntity {
+    // ------------------------------------------------------------------
     /// <summary>
-    /// The group interface.
+    /// Gets or sets the entities contained in this group.
     /// </summary>
-    // ----------------------------------------------------------------------
-    public interface IGroup : IDiagramEntity
-    {
-        // ------------------------------------------------------------------
-        /// <summary>
-        /// Gets or sets the entities contained in this group.
-        /// </summary>
-        // ------------------------------------------------------------------
-        CollectionBase<IDiagramEntity> Entities { get; set;}
+    // ------------------------------------------------------------------
+    CollectionBase<IDiagramEntity> Entities { get; set; }
 
-        // ------------------------------------------------------------------
-        /// <summary>
-        /// Gets or sets whether the group as a shape should be painted on 
-        /// the canvas.
-        /// </summary>
-        // ------------------------------------------------------------------
-        bool EmphasizeGroup { get;set;}
+    // ------------------------------------------------------------------
+    /// <summary>
+    /// Gets or sets whether the group as a shape should be painted on 
+    /// the canvas.
+    /// </summary>
+    // ------------------------------------------------------------------
+    bool EmphasizeGroup { get; set; }
 
-        // ------------------------------------------------------------------
-        /// <summary>
-        /// Calculates the bounding rectangle that encompasses all entities.
-        /// </summary>
-        // ------------------------------------------------------------------
-        void CalculateRectangle();
+    // ------------------------------------------------------------------
+    /// <summary>
+    /// Calculates the bounding rectangle that encompasses all entities.
+    /// </summary>
+    // ------------------------------------------------------------------
+    void CalculateRectangle();
 
-        // ------------------------------------------------------------------
-        /// <summary>
-        /// Gets or sets if un-grouping of the entities is allowed.
-        /// </summary>
-        // ------------------------------------------------------------------
-        bool CanUnGroup
-        {
-            get;
-            set;
-        }
+    // ------------------------------------------------------------------
+    /// <summary>
+    /// Gets or sets if un-grouping of the entities is allowed.
+    /// </summary>
+    // ------------------------------------------------------------------
+    bool CanUnGroup {
+      get;
+      set;
     }
+  }
 }
Index: /trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.Netron/3.0.2672.12446/Netron.Diagramming.Core-3.0.2672.12446/Core/Interfaces/IHoverListener.cs
===================================================================
--- /trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.Netron/3.0.2672.12446/Netron.Diagramming.Core-3.0.2672.12446/Core/Interfaces/IHoverListener.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.Netron/3.0.2672.12446/Netron.Diagramming.Core-3.0.2672.12446/Core/Interfaces/IHoverListener.cs	(revision 4068)
@@ -1,18 +1,12 @@
-using System;
-using System.Collections.Generic;
-using System.Text;
 using System.Windows.Forms;
-using System.Drawing;
-namespace Netron.Diagramming.Core
-{
-    /// <summary>
-    /// Hover service
-    /// </summary>
-    public interface IHoverListener : IInteraction
-    {          
-        void MouseHover(MouseEventArgs e);
-        void MouseEnter(MouseEventArgs e);
-        void MouseLeave(MouseEventArgs e);
+namespace Netron.Diagramming.Core {
+  /// <summary>
+  /// Hover service
+  /// </summary>
+  public interface IHoverListener : IInteraction {
+    void MouseHover(MouseEventArgs e);
+    void MouseEnter(MouseEventArgs e);
+    void MouseLeave(MouseEventArgs e);
 
-    }
+  }
 }
Index: /trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.Netron/3.0.2672.12446/Netron.Diagramming.Core-3.0.2672.12446/Core/Interfaces/IInteraction.cs
===================================================================
--- /trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.Netron/3.0.2672.12446/Netron.Diagramming.Core-3.0.2672.12446/Core/Interfaces/IInteraction.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.Netron/3.0.2672.12446/Netron.Diagramming.Core-3.0.2672.12446/Core/Interfaces/IInteraction.cs	(revision 4068)
@@ -1,15 +1,10 @@
-using System;
-using System.Collections.Generic;
-using System.Text;
 
-namespace Netron.Diagramming.Core
-{
-    /// <summary>
-    /// This is a tag interface to label the interfaces you can use to plug 
-    /// into the interaction.
-    /// 
-    /// </summary>
-    public interface IInteraction
-    {
-    }
+namespace Netron.Diagramming.Core {
+  /// <summary>
+  /// This is a tag interface to label the interfaces you can use to plug 
+  /// into the interaction.
+  /// 
+  /// </summary>
+  public interface IInteraction {
+  }
 }
Index: /trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.Netron/3.0.2672.12446/Netron.Diagramming.Core-3.0.2672.12446/Core/Interfaces/IKeyboardListener.cs
===================================================================
--- /trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.Netron/3.0.2672.12446/Netron.Diagramming.Core-3.0.2672.12446/Core/Interfaces/IKeyboardListener.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.Netron/3.0.2672.12446/Netron.Diagramming.Core-3.0.2672.12446/Core/Interfaces/IKeyboardListener.cs	(revision 4068)
@@ -1,29 +1,24 @@
-using System;
-using System.Collections.Generic;
-using System.Text;
 using System.Windows.Forms;
-namespace Netron.Diagramming.Core
-{
-    public interface IKeyboardListener : IInteraction
-    {
+namespace Netron.Diagramming.Core {
+  public interface IKeyboardListener : IInteraction {
 
-        /// <summary>
-        /// on key down.
-        /// </summary>
-        /// <param name="e">The <see cref="T:KeyEventArgs"/> instance containing the event data.</param>
-        void KeyDown(KeyEventArgs e);
+    /// <summary>
+    /// on key down.
+    /// </summary>
+    /// <param name="e">The <see cref="T:KeyEventArgs"/> instance containing the event data.</param>
+    void KeyDown(KeyEventArgs e);
 
-        /// <summary>
-        /// On keys up.
-        /// </summary>
-        /// <param name="e">The <see cref="T:KeyEventArgs"/> instance containing the event data.</param>
-        void KeyUp(KeyEventArgs e);
+    /// <summary>
+    /// On keys up.
+    /// </summary>
+    /// <param name="e">The <see cref="T:KeyEventArgs"/> instance containing the event data.</param>
+    void KeyUp(KeyEventArgs e);
 
-        /// <summary>
-        /// On key pressed.
-        /// </summary>
-        /// <param name="e">The <see cref="T:KeyPressEventArgs"/> instance containing the event data.</param>
-        void KeyPress(KeyPressEventArgs e);
+    /// <summary>
+    /// On key pressed.
+    /// </summary>
+    /// <param name="e">The <see cref="T:KeyPressEventArgs"/> instance containing the event data.</param>
+    void KeyPress(KeyPressEventArgs e);
 
-    }
+  }
 }
Index: /trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.Netron/3.0.2672.12446/Netron.Diagramming.Core-3.0.2672.12446/Core/Interfaces/ILayer.cs
===================================================================
--- /trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.Netron/3.0.2672.12446/Netron.Diagramming.Core-3.0.2672.12446/Core/Interfaces/ILayer.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.Netron/3.0.2672.12446/Netron.Diagramming.Core-3.0.2672.12446/Core/Interfaces/ILayer.cs	(revision 4068)
@@ -1,87 +1,83 @@
 using System;
-using System.Collections.Generic;
-using System.Text;
 
-namespace Netron.Diagramming.Core
-{
-    // ----------------------------------------------------------------------
+namespace Netron.Diagramming.Core {
+  // ----------------------------------------------------------------------
+  /// <summary>
+  /// Interface of a diagram layer
+  /// </summary>
+  // ----------------------------------------------------------------------
+  public interface ILayer {
+    #region Events
+
+    // ------------------------------------------------------------------
     /// <summary>
-    /// Interface of a diagram layer
+    /// Occurs when an entity is added to the layer.
     /// </summary>
-    // ----------------------------------------------------------------------
-    public interface ILayer
-    {
-        #region Events
+    // ------------------------------------------------------------------
+    event EventHandler<EntityEventArgs> OnEntityAdded;
 
-        // ------------------------------------------------------------------
-        /// <summary>
-        /// Occurs when an entity is added to the layer.
-        /// </summary>
-        // ------------------------------------------------------------------
-        event EventHandler<EntityEventArgs> OnEntityAdded;
+    // ------------------------------------------------------------------
+    /// <summary>
+    /// Occurs when an entity is removed from the layer.
+    /// </summary>
+    // ------------------------------------------------------------------
+    event EventHandler<EntityEventArgs> OnEntityRemoved;
 
-        // ------------------------------------------------------------------
-        /// <summary>
-        /// Occurs when an entity is removed from the layer.
-        /// </summary>
-        // ------------------------------------------------------------------
-        event EventHandler<EntityEventArgs> OnEntityRemoved;
+    // ------------------------------------------------------------------
+    /// <summary>
+    /// Occurs when the layer is cleared.
+    /// </summary>
+    // ------------------------------------------------------------------
+    event EventHandler OnClear;
 
-        // ------------------------------------------------------------------
-        /// <summary>
-        /// Occurs when the layer is cleared.
-        /// </summary>
-        // ------------------------------------------------------------------
-        event EventHandler OnClear;
+    #endregion
 
-        #endregion
+    #region Properties
 
-        #region Properties
+    // ------------------------------------------------------------------
+    /// <summary>
+    /// Gets all connections in this layer.
+    /// </summary>
+    // ------------------------------------------------------------------
+    CollectionBase<IConnection> Connections { get; }
 
-        // ------------------------------------------------------------------
-        /// <summary>
-        /// Gets all connections in this layer.
-        /// </summary>
-        // ------------------------------------------------------------------
-        CollectionBase<IConnection> Connections { get;}
+    // ------------------------------------------------------------------
+    /// <summary>
+    /// Gets all shapes in this layer.
+    /// </summary>
+    // ------------------------------------------------------------------
+    CollectionBase<IShape> Shapes { get; }
 
-        // ------------------------------------------------------------------
-        /// <summary>
-        /// Gets all shapes in this layer.
-        /// </summary>
-        // ------------------------------------------------------------------
-        CollectionBase<IShape> Shapes { get;}
+    // ------------------------------------------------------------------
+    /// <summary>
+    /// Gets or sets the model.
+    /// </summary>
+    /// <value>The model.</value>
+    // ------------------------------------------------------------------
+    IModel Model { get; set; }
 
-        // ------------------------------------------------------------------
-        /// <summary>
-        /// Gets or sets the model.
-        /// </summary>
-        /// <value>The model.</value>
-        // ------------------------------------------------------------------
-        IModel Model { get;set;}
+    // ------------------------------------------------------------------
+    /// <summary>
+    /// Gets or sets if this layer is visible.
+    /// </summary>
+    // ------------------------------------------------------------------
+    bool IsVisible { get; set; }
 
-        // ------------------------------------------------------------------
-        /// <summary>
-        /// Gets or sets if this layer is visible.
-        /// </summary>
-        // ------------------------------------------------------------------
-        bool IsVisible { get; set;}
+    // ------------------------------------------------------------------
+    /// <summary>
+    /// Gets or sets the name of this layer.
+    /// </summary>
+    // ------------------------------------------------------------------
+    string Name { get; set; }
 
-        // ------------------------------------------------------------------
-        /// <summary>
-        /// Gets or sets the name of this layer.
-        /// </summary>
-        // ------------------------------------------------------------------
-        string Name { get; set; }
+    #endregion
 
-        #endregion
-
-        // ------------------------------------------------------------------
-        /// <summary>
-        /// Gets the entities of this layer.
-        /// </summary>
-        /// <value>The entities.</value>
-        // ------------------------------------------------------------------
-        CollectionBase<IDiagramEntity> Entities { get;}
-    }
+    // ------------------------------------------------------------------
+    /// <summary>
+    /// Gets the entities of this layer.
+    /// </summary>
+    /// <value>The entities.</value>
+    // ------------------------------------------------------------------
+    CollectionBase<IDiagramEntity> Entities { get; }
+  }
 }
Index: /trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.Netron/3.0.2672.12446/Netron.Diagramming.Core-3.0.2672.12446/Core/Interfaces/ILayout.cs
===================================================================
--- /trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.Netron/3.0.2672.12446/Netron.Diagramming.Core-3.0.2672.12446/Core/Interfaces/ILayout.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.Netron/3.0.2672.12446/Netron.Diagramming.Core-3.0.2672.12446/Core/Interfaces/ILayout.cs	(revision 4068)
@@ -1,30 +1,26 @@
-using System;
 using System.Drawing;
-using System.Windows.Forms;
-namespace Netron.Diagramming.Core
-{
-	/// <summary>
-	/// This interface describes the elements of a layout module.
-	/// The single call to the inherited Run() method will organize the diagram in 
-	/// a certain way.
-	/// </summary>
-	public interface ILayout : IAction
-	{
-		#region Events
-		
-		#endregion
+namespace Netron.Diagramming.Core {
+  /// <summary>
+  /// This interface describes the elements of a layout module.
+  /// The single call to the inherited Run() method will organize the diagram in 
+  /// a certain way.
+  /// </summary>
+  public interface ILayout : IAction {
+    #region Events
 
-		#region Properties
-        /// <summary>
-        /// Gets or sets the bounds of the layout algorithm.
-        /// </summary>
-        /// <value>The bounds.</value>
-        Rectangle Bounds { get;set;}
-        PointF Center { get;set;}
-		#endregion
+    #endregion
 
-		#region Methods
-		
-		#endregion
-	}
+    #region Properties
+    /// <summary>
+    /// Gets or sets the bounds of the layout algorithm.
+    /// </summary>
+    /// <value>The bounds.</value>
+    Rectangle Bounds { get; set; }
+    PointF Center { get; set; }
+    #endregion
+
+    #region Methods
+
+    #endregion
+  }
 }
Index: /trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.Netron/3.0.2672.12446/Netron.Diagramming.Core-3.0.2672.12446/Core/Interfaces/IMouseListener.cs
===================================================================
--- /trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.Netron/3.0.2672.12446/Netron.Diagramming.Core-3.0.2672.12446/Core/Interfaces/IMouseListener.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.Netron/3.0.2672.12446/Netron.Diagramming.Core-3.0.2672.12446/Core/Interfaces/IMouseListener.cs	(revision 4068)
@@ -1,44 +1,39 @@
-using System;
-using System.Collections.Generic;
-using System.Text;
 using System.Windows.Forms;
-namespace Netron.Diagramming.Core
-{
-    // ----------------------------------------------------------------------
+namespace Netron.Diagramming.Core {
+  // ----------------------------------------------------------------------
+  /// <summary>
+  /// Describes the three fundamental methods of a mouse handler object.
+  /// </summary>
+  // ----------------------------------------------------------------------
+  public interface IMouseListener : IInteraction {
+    // ------------------------------------------------------------------
     /// <summary>
-    /// Describes the three fundamental methods of a mouse handler object.
+    /// Handles the mouse-down event.
     /// </summary>
-    // ----------------------------------------------------------------------
-    public interface IMouseListener : IInteraction
-    {
-        // ------------------------------------------------------------------
-        /// <summary>
-        /// Handles the mouse-down event.
-        /// </summary>
-        /// <param name="e">The <see cref=
-        /// "T:System.Windows.Forms.MouseEventArgs"/> instance containing the 
-        /// event data.</param>
-        // ------------------------------------------------------------------
-        bool MouseDown(MouseEventArgs e);
+    /// <param name="e">The <see cref=
+    /// "T:System.Windows.Forms.MouseEventArgs"/> instance containing the 
+    /// event data.</param>
+    // ------------------------------------------------------------------
+    bool MouseDown(MouseEventArgs e);
 
-        // ------------------------------------------------------------------
-        /// <summary>
-        /// Handles the mouse-move event.
-        /// </summary>
-        /// <param name="e">The <see cref=
-        /// "T:System.Windows.Forms.MouseEventArgs"/> instance containing the 
-        /// event data.</param>
-        // ------------------------------------------------------------------
-        void MouseMove(MouseEventArgs e);
+    // ------------------------------------------------------------------
+    /// <summary>
+    /// Handles the mouse-move event.
+    /// </summary>
+    /// <param name="e">The <see cref=
+    /// "T:System.Windows.Forms.MouseEventArgs"/> instance containing the 
+    /// event data.</param>
+    // ------------------------------------------------------------------
+    void MouseMove(MouseEventArgs e);
 
-        // ------------------------------------------------------------------
-        /// <summary>
-        /// Handles the mouse-up event.
-        /// </summary>
-        /// <param name="e">The <see cref=
-        /// "T:System.Windows.Forms.MouseEventArgs"/> instance containing the 
-        /// event data.</param>
-        // ------------------------------------------------------------------
-        void MouseUp(MouseEventArgs e);
-    }
+    // ------------------------------------------------------------------
+    /// <summary>
+    /// Handles the mouse-up event.
+    /// </summary>
+    /// <param name="e">The <see cref=
+    /// "T:System.Windows.Forms.MouseEventArgs"/> instance containing the 
+    /// event data.</param>
+    // ------------------------------------------------------------------
+    void MouseUp(MouseEventArgs e);
+  }
 }
Index: /trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.Netron/3.0.2672.12446/Netron.Diagramming.Core-3.0.2672.12446/Core/Interfaces/IPage.cs
===================================================================
--- /trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.Netron/3.0.2672.12446/Netron.Diagramming.Core-3.0.2672.12446/Core/Interfaces/IPage.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.Netron/3.0.2672.12446/Netron.Diagramming.Core-3.0.2672.12446/Core/Interfaces/IPage.cs	(revision 4068)
@@ -1,193 +1,178 @@
 using System;
-using System.Collections.Generic;
-using System.Text;
 using System.Drawing;
 
-namespace Netron.Diagramming.Core
-{
-    // ----------------------------------------------------------------------
+namespace Netron.Diagramming.Core {
+  // ----------------------------------------------------------------------
+  /// <summary>
+  /// The interface of a page
+  /// </summary>
+  // ----------------------------------------------------------------------
+  public interface IPage {
+    #region Events
+
+    // ------------------------------------------------------------------
     /// <summary>
-    /// The interface of a page
+    /// Occurs when an entity is added.
+    /// <remarks>This event usually is bubbled from one of the 
+    /// layers</remarks>
     /// </summary>
-    // ----------------------------------------------------------------------
-    public interface IPage
-    {
-        #region Events
+    // ------------------------------------------------------------------
+    event EventHandler<EntityEventArgs> OnEntityAdded;
 
-        // ------------------------------------------------------------------
-        /// <summary>
-        /// Occurs when an entity is added.
-        /// <remarks>This event usually is bubbled from one of the 
-        /// layers</remarks>
-        /// </summary>
-        // ------------------------------------------------------------------
-        event EventHandler<EntityEventArgs> OnEntityAdded;
+    // ------------------------------------------------------------------
+    /// <summary>
+    /// Occurs when an entity is removed.
+    /// <remarks>This event usually is bubbled from one of the 
+    /// layers</remarks>
+    /// </summary>
+    // ------------------------------------------------------------------
+    event EventHandler<EntityEventArgs> OnEntityRemoved;
 
-        // ------------------------------------------------------------------
-        /// <summary>
-        /// Occurs when an entity is removed.
-        /// <remarks>This event usually is bubbled from one of the 
-        /// layers</remarks>
-        /// </summary>
-        // ------------------------------------------------------------------
-        event EventHandler<EntityEventArgs> OnEntityRemoved;
+    // ------------------------------------------------------------------
+    /// <summary>
+    /// Occurs when the page is cleared
+    /// </summary>
+    // ------------------------------------------------------------------
+    event EventHandler OnClear;
 
-        // ------------------------------------------------------------------
-        /// <summary>
-        /// Occurs when the page is cleared
-        /// </summary>
-        // ------------------------------------------------------------------
-        event EventHandler OnClear;
+    // ------------------------------------------------------------------
+    /// <summary>
+    /// Occurs when the Ambience has changed
+    /// </summary>
+    // ------------------------------------------------------------------
+    event EventHandler<AmbienceEventArgs> OnAmbienceChanged;
 
-        // ------------------------------------------------------------------
-        /// <summary>
-        /// Occurs when the Ambience has changed
-        /// </summary>
-        // ------------------------------------------------------------------
-        event EventHandler<AmbienceEventArgs> OnAmbienceChanged;
+    #endregion
 
-        #endregion
+    #region Properties
 
-        #region Properties
+    // ------------------------------------------------------------------
+    /// <summary>
+    /// Gets or sets the Name of this page.
+    /// </summary>
+    // ------------------------------------------------------------------
+    string Name {
+      get;
+      set;
+    }
 
-        // ------------------------------------------------------------------
-        /// <summary>
-        /// Gets or sets the Name of this page.
-        /// </summary>
-        // ------------------------------------------------------------------
-        string Name
-        {
-            get;
-            set;
-        }
+    // ------------------------------------------------------------------
+    /// <summary>
+    /// Gets all the connections in the page.
+    /// </summary>
+    // ------------------------------------------------------------------
+    CollectionBase<IConnection> Connections {
+      get;
+    }
 
-        // ------------------------------------------------------------------
-        /// <summary>
-        /// Gets all the connections in the page.
-        /// </summary>
-        // ------------------------------------------------------------------
-        CollectionBase<IConnection> Connections 
-        { 
-            get;
-        }
+    // ------------------------------------------------------------------
+    /// <summary>
+    /// Gets all entities in this page.
+    /// </summary>
+    // ------------------------------------------------------------------
+    CollectionBase<IDiagramEntity> Entities {
+      get;
+    }
 
-        // ------------------------------------------------------------------
-        /// <summary>
-        /// Gets all entities in this page.
-        /// </summary>
-        // ------------------------------------------------------------------
-        CollectionBase<IDiagramEntity> Entities
-        {
-            get;
-        }
+    // ------------------------------------------------------------------
+    /// <summary>
+    /// Gets all shapes in this page.
+    /// </summary>
+    // ------------------------------------------------------------------
+    CollectionBase<IShape> Shapes {
+      get;
+    }
 
-        // ------------------------------------------------------------------
-        /// <summary>
-        /// Gets all shapes in this page.
-        /// </summary>
-        // ------------------------------------------------------------------
-        CollectionBase<IShape> Shapes 
-        { 
-            get;
-        }
+    // ------------------------------------------------------------------
+    /// <summary>
+    /// Gets the layers.
+    /// </summary>
+    /// <value>The layers.</value>
+    // ------------------------------------------------------------------
+    CollectionBase<ILayer> Layers {
+      get;
+    }
 
-        // ------------------------------------------------------------------
-        /// <summary>
-        /// Gets the layers.
-        /// </summary>
-        /// <value>The layers.</value>
-        // ------------------------------------------------------------------
-        CollectionBase<ILayer> Layers 
-        { 
-            get;
-        }
+    // ------------------------------------------------------------------
+    /// <summary>
+    /// Gets the default layer.
+    /// </summary>
+    /// <value>The default layer.</value>
+    // ------------------------------------------------------------------
+    ILayer DefaultLayer {
+      get;
+    }
 
-        // ------------------------------------------------------------------
-        /// <summary>
-        /// Gets the default layer.
-        /// </summary>
-        /// <value>The default layer.</value>
-        // ------------------------------------------------------------------
-        ILayer DefaultLayer 
-        { 
-            get;
-        }
+    // ------------------------------------------------------------------
+    /// <summary>
+    /// Gets the ambience.
+    /// </summary>
+    /// <value>The ambience.</value>
+    // ------------------------------------------------------------------
+    Ambience Ambience {
+      get;
+    }
 
-        // ------------------------------------------------------------------
-        /// <summary>
-        /// Gets the ambience.
-        /// </summary>
-        /// <value>The ambience.</value>
-        // ------------------------------------------------------------------
-        Ambience Ambience 
-        { 
-            get;
-        }
+    // ------------------------------------------------------------------
+    /// <summary>
+    /// Gets a reference to the model
+    /// </summary>
+    // ------------------------------------------------------------------
+    IModel Model {
+      get;
+      set;
+    }
 
-        // ------------------------------------------------------------------
-        /// <summary>
-        /// Gets a reference to the model
-        /// </summary>
-        // ------------------------------------------------------------------
-        IModel Model
-        {
-            get;
-            set;
-        }
+    // ------------------------------------------------------------------
+    /// <summary>
+    /// Gets or sets the scaling factor of this page.
+    /// </summary>
+    // ------------------------------------------------------------------
+    SizeF Magnification {
+      get;
+      set;
+    }
 
-        // ------------------------------------------------------------------
-        /// <summary>
-        /// Gets or sets the scaling factor of this page.
-        /// </summary>
-        // ------------------------------------------------------------------
-        SizeF Magnification
-        {
-            get;
-            set;
-        }
+    // ------------------------------------------------------------------
+    /// <summary>
+    /// Gets or sets the origin of this page.
+    /// </summary>
+    // ------------------------------------------------------------------
+    Point Origin {
+      get;
+      set;
+    }
 
-        // ------------------------------------------------------------------
-        /// <summary>
-        /// Gets or sets the origin of this page.
-        /// </summary>
-        // ------------------------------------------------------------------
-        Point Origin
-        {
-            get;
-            set;
-        }
+    // ------------------------------------------------------------------
+    /// <summary>
+    /// Gets the page bounds, taking into account landscape and page
+    /// settings (for printing).
+    /// </summary>
+    // ------------------------------------------------------------------
+    RectangleF Bounds {
+      get;
+    }
 
-        // ------------------------------------------------------------------
-        /// <summary>
-        /// Gets the page bounds, taking into account landscape and page
-        /// settings (for printing).
-        /// </summary>
-        // ------------------------------------------------------------------
-        RectangleF Bounds
-        {
-            get;
-        }
+    #endregion
 
-        #endregion
+    // ------------------------------------------------------------------
+    /// <summary>
+    /// Gets the layer that has the entity specified.  If the entity
+    /// specified could not be found, 'null' is returned.
+    /// </summary>
+    /// <param name="entity">IDiagramEntity</param>
+    /// <returns>ILayer</returns>
+    // ------------------------------------------------------------------
+    ILayer GetLayer(IDiagramEntity entity);
 
-        // ------------------------------------------------------------------
-        /// <summary>
-        /// Gets the layer that has the entity specified.  If the entity
-        /// specified could not be found, 'null' is returned.
-        /// </summary>
-        /// <param name="entity">IDiagramEntity</param>
-        /// <returns>ILayer</returns>
-        // ------------------------------------------------------------------
-        ILayer GetLayer(IDiagramEntity entity);
+    // ------------------------------------------------------------------
+    /// <summary>
+    /// Paints the page to the drawing surface specified.
+    /// </summary>
+    /// <param name="g">Graphics</param>
+    /// <param name="showGrid">bool</param>
+    // ------------------------------------------------------------------
+    void Paint(Graphics g, bool showGrid);
 
-        // ------------------------------------------------------------------
-        /// <summary>
-        /// Paints the page to the drawing surface specified.
-        /// </summary>
-        /// <param name="g">Graphics</param>
-        /// <param name="showGrid">bool</param>
-        // ------------------------------------------------------------------
-        void Paint(Graphics g, bool showGrid);
-        
-    }
+  }
 }
Index: /trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.Netron/3.0.2672.12446/Netron.Diagramming.Core-3.0.2672.12446/Core/Interfaces/IPaintStyle.cs
===================================================================
--- /trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.Netron/3.0.2672.12446/Netron.Diagramming.Core-3.0.2672.12446/Core/Interfaces/IPaintStyle.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.Netron/3.0.2672.12446/Netron.Diagramming.Core-3.0.2672.12446/Core/Interfaces/IPaintStyle.cs	(revision 4068)
@@ -1,30 +1,24 @@
-using System;
-using System.Collections.Generic;
-using System.Text;
 using System.Drawing;
-using System.Drawing.Drawing2D;
-namespace Netron.Diagramming.Core
-{
+namespace Netron.Diagramming.Core {
+  /// <summary>
+  /// Defines a custom painting style.
+  /// </summary>
+  public interface IPaintStyle {
+    // ------------------------------------------------------------------
     /// <summary>
-    /// Defines a custom painting style.
+    /// Occurs when this paint style is changed.
     /// </summary>
-    public interface IPaintStyle
-    {
-        // ------------------------------------------------------------------
-        /// <summary>
-        /// Occurs when this paint style is changed.
-        /// </summary>
-        // ------------------------------------------------------------------
-        event PaintStyleChangedEventHandler PaintStyleChanged;
+    // ------------------------------------------------------------------
+    event PaintStyleChangedEventHandler PaintStyleChanged;
 
-        /// <summary>
-        /// Gets the brush with which an entity can be painted.
-        /// </summary>
-        /// <param name="rectangle">The rectangle.</param>
-        /// <returns></returns>
-        Brush GetBrush(Rectangle rectangle);
-        
-    }
+    /// <summary>
+    /// Gets the brush with which an entity can be painted.
+    /// </summary>
+    /// <param name="rectangle">The rectangle.</param>
+    /// <returns></returns>
+    Brush GetBrush(Rectangle rectangle);
 
-   
+  }
+
+
 }
Index: /trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.Netron/3.0.2672.12446/Netron.Diagramming.Core-3.0.2672.12446/Core/Interfaces/IPaintable.cs
===================================================================
--- /trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.Netron/3.0.2672.12446/Netron.Diagramming.Core-3.0.2672.12446/Core/Interfaces/IPaintable.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.Netron/3.0.2672.12446/Netron.Diagramming.Core-3.0.2672.12446/Core/Interfaces/IPaintable.cs	(revision 4068)
@@ -1,26 +1,20 @@
-using System;
-using System.Collections.Generic;
-using System.Text;
 using System.Drawing;
-namespace Netron.Diagramming.Core
-{
+namespace Netron.Diagramming.Core {
+  /// <summary>
+  /// The interface of something that can be painted on the canvas.
+  /// </summary>
+  public interface IPaintable {
     /// <summary>
-    /// The interface of something that can be painted on the canvas.
+    /// The bounds of the paintable entity
     /// </summary>
-    public interface IPaintable
-    {
-        /// <summary>
-        /// The bounds of the paintable entity
-        /// </summary>
-        Rectangle Rectangle
-        {
-            get;           
-        }
+    Rectangle Rectangle {
+      get;
+    }
 
-        /// <summary>
-        /// Paints the entity using the given graphics object
-        /// </summary>
-        /// <param name="g"></param>
-        void Paint(Graphics g);
-    }
+    /// <summary>
+    /// Paints the entity using the given graphics object
+    /// </summary>
+    /// <param name="g"></param>
+    void Paint(Graphics g);
+  }
 }
Index: /trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.Netron/3.0.2672.12446/Netron.Diagramming.Core-3.0.2672.12446/Core/Interfaces/IShape.cs
===================================================================
--- /trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.Netron/3.0.2672.12446/Netron.Diagramming.Core-3.0.2672.12446/Core/Interfaces/IShape.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.Netron/3.0.2672.12446/Netron.Diagramming.Core-3.0.2672.12446/Core/Interfaces/IShape.cs	(revision 4068)
@@ -1,99 +1,93 @@
-using System;
 using System.Drawing;
-using System.Windows.Forms;
-namespace Netron.Diagramming.Core
-{
-    // ----------------------------------------------------------------------
-	/// <summary>
-	/// The interface of a shape. This interface comes in two inherited 
-    /// flavors; <see cref="ISimpleShape"/> and <see cref="IComplexShape"/>.
-	/// </summary>
-    // ----------------------------------------------------------------------
-	public interface IShape : IDiagramEntity
-	{
-		#region Events
-		
-		#endregion
+namespace Netron.Diagramming.Core {
+  // ----------------------------------------------------------------------
+  /// <summary>
+  /// The interface of a shape. This interface comes in two inherited 
+  /// flavors; <see cref="ISimpleShape"/> and <see cref="IComplexShape"/>.
+  /// </summary>
+  // ----------------------------------------------------------------------
+  public interface IShape : IDiagramEntity {
+    #region Events
 
-		#region Properties
+    #endregion
 
-        // ------------------------------------------------------------------
-        /// <summary>
-        /// Gets or sets if the connectors are drawn.
-        /// </summary>
-        // ------------------------------------------------------------------
-        bool ShowConnectors
-        {
-            get;
-            set;
-        }
+    #region Properties
 
-        // ------------------------------------------------------------------
-		/// <summary>
-        /// Gets the connectors of the shape.
-		/// </summary>
-		/// <remarks>Connectors are defined at design time, hence the fact 
-        /// that you cannot set the connector collection.</remarks>
-        // ------------------------------------------------------------------
-        CollectionBase<IConnector> Connectors { get;}
+    // ------------------------------------------------------------------
+    /// <summary>
+    /// Gets or sets if the connectors are drawn.
+    /// </summary>
+    // ------------------------------------------------------------------
+    bool ShowConnectors {
+      get;
+      set;
+    }
 
-        // ------------------------------------------------------------------
-		/// <summary>
-        /// Gets or sets the location of the shape
-        /// </summary>
-        // ------------------------------------------------------------------
-		Point Location {get; set;}
+    // ------------------------------------------------------------------
+    /// <summary>
+    /// Gets the connectors of the shape.
+    /// </summary>
+    /// <remarks>Connectors are defined at design time, hence the fact 
+    /// that you cannot set the connector collection.</remarks>
+    // ------------------------------------------------------------------
+    CollectionBase<IConnector> Connectors { get; }
 
-        // ------------------------------------------------------------------
-		/// <summary>
-        /// Gets or sets the height of the shape
-        /// </summary>
-        // ------------------------------------------------------------------
-		int Height {get; set;}
+    // ------------------------------------------------------------------
+    /// <summary>
+    /// Gets or sets the location of the shape
+    /// </summary>
+    // ------------------------------------------------------------------
+    Point Location { get; set; }
 
-        // ------------------------------------------------------------------
-		/// <summary>
-		/// Gets or sets the width of the shape.
-        /// </summary>
-        // ------------------------------------------------------------------
-		int Width {get; set;}
+    // ------------------------------------------------------------------
+    /// <summary>
+    /// Gets or sets the height of the shape
+    /// </summary>
+    // ------------------------------------------------------------------
+    int Height { get; set; }
 
-        // ------------------------------------------------------------------
-        /// <summary>
-        /// Gets the image for this shape when displaying in a library (i.e.
-        /// toolbox).
-        /// </summary>
-        // ------------------------------------------------------------------
-        Image LibraryImage
-        {
-            get;
-        }
-        
-		#endregion
+    // ------------------------------------------------------------------
+    /// <summary>
+    /// Gets or sets the width of the shape.
+    /// </summary>
+    // ------------------------------------------------------------------
+    int Width { get; set; }
 
-        #region Methods
-        // ------------------------------------------------------------------
-		/// <summary>
-		/// Returns whether the given point hits one of the connectors of 
-        /// the bundle.
-		/// </summary>
-		/// <param name="p">a location, usually corresponds to the mouse 
-        /// location.</param>
-        /// <returns></returns>
-        // ------------------------------------------------------------------
-		IConnector HitConnector(Point p);
+    // ------------------------------------------------------------------
+    /// <summary>
+    /// Gets the image for this shape when displaying in a library (i.e.
+    /// toolbox).
+    /// </summary>
+    // ------------------------------------------------------------------
+    Image LibraryImage {
+      get;
+    }
 
-        // ------------------------------------------------------------------
-        /// <summary>
-        /// Maps the shape to another rectangle, including all its sub-entities 
-        /// and materials.
-        /// </summary>
-        /// <param name="x">The x.</param>
-        /// <param name="y">The y.</param>
-        /// <param name="width">The width.</param>
-        /// <param name="height">The height.</param>
-        // ------------------------------------------------------------------
-        void Transform(int x, int y, int width, int height);
-		#endregion
-	}
+    #endregion
+
+    #region Methods
+    // ------------------------------------------------------------------
+    /// <summary>
+    /// Returns whether the given point hits one of the connectors of 
+    /// the bundle.
+    /// </summary>
+    /// <param name="p">a location, usually corresponds to the mouse 
+    /// location.</param>
+    /// <returns></returns>
+    // ------------------------------------------------------------------
+    IConnector HitConnector(Point p);
+
+    // ------------------------------------------------------------------
+    /// <summary>
+    /// Maps the shape to another rectangle, including all its sub-entities 
+    /// and materials.
+    /// </summary>
+    /// <param name="x">The x.</param>
+    /// <param name="y">The y.</param>
+    /// <param name="width">The width.</param>
+    /// <param name="height">The height.</param>
+    // ------------------------------------------------------------------
+    void Transform(int x, int y, int width, int height);
+    #endregion
+  }
 }
Index: /trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.Netron/3.0.2672.12446/Netron.Diagramming.Core-3.0.2672.12446/Core/Interfaces/ISimpleShape.cs
===================================================================
--- /trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.Netron/3.0.2672.12446/Netron.Diagramming.Core-3.0.2672.12446/Core/Interfaces/ISimpleShape.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.Netron/3.0.2672.12446/Netron.Diagramming.Core-3.0.2672.12446/Core/Interfaces/ISimpleShape.cs	(revision 4068)
@@ -1,21 +1,15 @@
-using System;
-using System.Collections.Generic;
-using System.Text;
 
-namespace Netron.Diagramming.Core
-{
+namespace Netron.Diagramming.Core {
+  /// <summary>
+  /// The simple shape interface.
+  /// </summary>
+  public interface ISimpleShape : IShape {
     /// <summary>
-    /// The simple shape interface.
+    /// Gets or sets the text of the simple shape
     /// </summary>
-    public interface ISimpleShape : IShape
-    {
-        /// <summary>
-        /// Gets or sets the text of the simple shape
-        /// </summary>
-        string Text
-        {
-            get;
-            set;
-        }
+    string Text {
+      get;
+      set;
     }
+  }
 }
Index: /trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.Netron/3.0.2672.12446/Netron.Diagramming.Core-3.0.2672.12446/Core/Interfaces/ISubsetAction.cs
===================================================================
--- /trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.Netron/3.0.2672.12446/Netron.Diagramming.Core-3.0.2672.12446/Core/Interfaces/ISubsetAction.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.Netron/3.0.2672.12446/Netron.Diagramming.Core-3.0.2672.12446/Core/Interfaces/ISubsetAction.cs	(revision 4068)
@@ -1,28 +1,23 @@
-using System;
-using System.Drawing;
-using System.Windows.Forms;
-namespace Netron.Diagramming.Core
-{
-	/// <summary>
-	/// This defines what an action is on the model.
-	/// </summary>
-	public interface ISubsetAction : IAction
-	{
+namespace Netron.Diagramming.Core {
+  /// <summary>
+  /// This defines what an action is on the model.
+  /// </summary>
+  public interface ISubsetAction : IAction {
 
-		#region Events
+    #region Events
 
-		#endregion
+    #endregion
 
-		#region Properties
-        /// <summary>
-        /// Gets the subset.
-        /// </summary>
-        /// <value>The subset.</value>
-        CollectionBase<IDiagramEntity> Subset {get;}
-		#endregion
+    #region Properties
+    /// <summary>
+    /// Gets the subset.
+    /// </summary>
+    /// <value>The subset.</value>
+    CollectionBase<IDiagramEntity> Subset { get; }
+    #endregion
 
-		#region Methods
+    #region Methods
 
-		#endregion
-	}
+    #endregion
+  }
 }
Index: /trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.Netron/3.0.2672.12446/Netron.Diagramming.Core-3.0.2672.12446/Core/Interfaces/ITextProvider.cs
===================================================================
--- /trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.Netron/3.0.2672.12446/Netron.Diagramming.Core-3.0.2672.12446/Core/Interfaces/ITextProvider.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.Netron/3.0.2672.12446/Netron.Diagramming.Core-3.0.2672.12446/Core/Interfaces/ITextProvider.cs	(revision 4068)
@@ -1,67 +1,57 @@
-using System;
-using System.Collections.Generic;
-using System.Text;
 using System.Drawing;
 
-namespace Netron.Diagramming.Core
-{
+namespace Netron.Diagramming.Core {
+  /// <summary>
+  /// The signature for any item that wants text editing.
+  /// </summary>
+  public interface ITextProvider {
+    // ------------------------------------------------------------------
     /// <summary>
-    /// The signature for any item that wants text editing.
+    /// Returns the bounds of the text.
     /// </summary>
-    public interface ITextProvider
-    {
-        // ------------------------------------------------------------------
-        /// <summary>
-        /// Returns the bounds of the text.
-        /// </summary>
-        // ------------------------------------------------------------------
-        Rectangle TextArea
-        {
-            get;
-        }
+    // ------------------------------------------------------------------
+    Rectangle TextArea {
+      get;
+    }
 
-        // ------------------------------------------------------------------
-        /// <summary>
-        /// Gets or sets the text.
-        /// </summary>
-        // ------------------------------------------------------------------
-        string Text
-        {
-            get;
-            set;
-        }
+    // ------------------------------------------------------------------
+    /// <summary>
+    /// Gets or sets the text.
+    /// </summary>
+    // ------------------------------------------------------------------
+    string Text {
+      get;
+      set;
+    }
 
-        // ------------------------------------------------------------------
-        /// <summary>
-        /// Gets or sets the style of the text to use.
-        /// </summary>
-        // ------------------------------------------------------------------
-        ITextStyle TextStyle
-        {
-            get;
-            set;
-        }
+    // ------------------------------------------------------------------
+    /// <summary>
+    /// Gets or sets the style of the text to use.
+    /// </summary>
+    // ------------------------------------------------------------------
+    ITextStyle TextStyle {
+      get;
+      set;
+    }
 
-        // ------------------------------------------------------------------
-        /// <summary>
-        /// Returns if text editing is allowed.
-        /// </summary>
-        // ------------------------------------------------------------------
-        bool AllowTextEditing
-        {
-            get;
-        }
+    // ------------------------------------------------------------------
+    /// <summary>
+    /// Returns if text editing is allowed.
+    /// </summary>
+    // ------------------------------------------------------------------
+    bool AllowTextEditing {
+      get;
+    }
 
-        // ------------------------------------------------------------------
-        /// <summary>
-        /// Returns the number of mouse clicks required to launch the in-place
-        /// text editor.
-        /// </summary>
-        // ------------------------------------------------------------------
-        int EditTextClicks
-        {
-            get;
-            set;
-        }
+    // ------------------------------------------------------------------
+    /// <summary>
+    /// Returns the number of mouse clicks required to launch the in-place
+    /// text editor.
+    /// </summary>
+    // ------------------------------------------------------------------
+    int EditTextClicks {
+      get;
+      set;
     }
+  }
 }
Index: /trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.Netron/3.0.2672.12446/Netron.Diagramming.Core-3.0.2672.12446/Core/Interfaces/ITextStyle.cs
===================================================================
--- /trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.Netron/3.0.2672.12446/Netron.Diagramming.Core-3.0.2672.12446/Core/Interfaces/ITextStyle.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.Netron/3.0.2672.12446/Netron.Diagramming.Core-3.0.2672.12446/Core/Interfaces/ITextStyle.cs	(revision 4068)
@@ -1,5 +1,2 @@
-using System;
-using System.Collections.Generic;
-using System.Text;
 using System.Drawing;
 using System.Runtime.Serialization;
@@ -7,162 +4,149 @@
 using ToolBox.Formatting;
 
-namespace Netron.Diagramming.Core
-{
-    public interface ITextStyle : ISerializable, IVersion
-    {
-        // ------------------------------------------------------------------
-        /// <summary>
-        /// Occurs when the text style is changed.
-        /// </summary>
-        // ------------------------------------------------------------------
-        event TextStyleChangedEventHandler TextStyleChanged;
+namespace Netron.Diagramming.Core {
+  public interface ITextStyle : ISerializable, IVersion {
+    // ------------------------------------------------------------------
+    /// <summary>
+    /// Occurs when the text style is changed.
+    /// </summary>
+    // ------------------------------------------------------------------
+    event TextStyleChangedEventHandler TextStyleChanged;
 
-        #region Properties
+    #region Properties
 
-        // ------------------------------------------------------------------
-        /// <summary>
-        /// Gets or sets the number of decimal places to use when a TextFormat
-        /// other than 'String' is specified.
-        /// </summary>
-        // ------------------------------------------------------------------
-        int DecimalPlaces
-        {
-            get;
-            set;
-        }
+    // ------------------------------------------------------------------
+    /// <summary>
+    /// Gets or sets the number of decimal places to use when a TextFormat
+    /// other than 'String' is specified.
+    /// </summary>
+    // ------------------------------------------------------------------
+    int DecimalPlaces {
+      get;
+      set;
+    }
 
-        // ------------------------------------------------------------------
-        /// <summary>
-        /// Gets or sets the formatting to apply to the text.
-        /// </summary>
-        // ------------------------------------------------------------------
-        TextFormat TextFormat
-        {
-            get;
-            set;
-        }
+    // ------------------------------------------------------------------
+    /// <summary>
+    /// Gets or sets the formatting to apply to the text.
+    /// </summary>
+    // ------------------------------------------------------------------
+    TextFormat TextFormat {
+      get;
+      set;
+    }
 
-        // ------------------------------------------------------------------
-        /// <summary>
-        /// Gets the format of the string.
-        /// </summary>
-        // ------------------------------------------------------------------
-        StringFormat StringFormat
-        {
-            get;
-        }
+    // ------------------------------------------------------------------
+    /// <summary>
+    /// Gets the format of the string.
+    /// </summary>
+    // ------------------------------------------------------------------
+    StringFormat StringFormat {
+      get;
+    }
 
-        // ------------------------------------------------------------------
-        /// <summary>
-        /// Gets or sets the horizontal alignment of the text.
-        /// </summary>
-        // ------------------------------------------------------------------
-        StringAlignment HorizontalAlignment
-        {
-            get;
-            set;
-        }
+    // ------------------------------------------------------------------
+    /// <summary>
+    /// Gets or sets the horizontal alignment of the text.
+    /// </summary>
+    // ------------------------------------------------------------------
+    StringAlignment HorizontalAlignment {
+      get;
+      set;
+    }
 
-        // ------------------------------------------------------------------
-        /// <summary>
-        /// Gets or sets the vertical alignment of the text.
-        /// </summary>
-        // ------------------------------------------------------------------
-        StringAlignment VerticalAlignment
-        {
-            get;
-            set;
-        }
+    // ------------------------------------------------------------------
+    /// <summary>
+    /// Gets or sets the vertical alignment of the text.
+    /// </summary>
+    // ------------------------------------------------------------------
+    StringAlignment VerticalAlignment {
+      get;
+      set;
+    }
 
-        // ------------------------------------------------------------------
-        /// <summary>
-        /// Gets or sets the text's font.
-        /// </summary>
-        // ------------------------------------------------------------------
-        Font Font
-        {
-            get;
-            set;
-        }
+    // ------------------------------------------------------------------
+    /// <summary>
+    /// Gets or sets the text's font.
+    /// </summary>
+    // ------------------------------------------------------------------
+    Font Font {
+      get;
+      set;
+    }
 
-        // ------------------------------------------------------------------
-        /// <summary>
-        /// Gets or sets the text's font size.
-        /// </summary>
-        // ------------------------------------------------------------------
-        float FontSize
-        {
-            get;
-            set;
-        }
+    // ------------------------------------------------------------------
+    /// <summary>
+    /// Gets or sets the text's font size.
+    /// </summary>
+    // ------------------------------------------------------------------
+    float FontSize {
+      get;
+      set;
+    }
 
-        // ------------------------------------------------------------------
-        /// <summary>
-        /// Gets or sets the text's color.
-        /// </summary>
-        // ------------------------------------------------------------------
-        Color FontColor
-        {
-            get;
-            set;
-        }
+    // ------------------------------------------------------------------
+    /// <summary>
+    /// Gets or sets the text's color.
+    /// </summary>
+    // ------------------------------------------------------------------
+    Color FontColor {
+      get;
+      set;
+    }
 
-        // ------------------------------------------------------------------
-        /// <summary>
-        /// Gets or sets if the text is underlined.
-        /// </summary>
-        // ------------------------------------------------------------------
-        bool IsUnderlined
-        {
-            get;
-            set;
-        }
+    // ------------------------------------------------------------------
+    /// <summary>
+    /// Gets or sets if the text is underlined.
+    /// </summary>
+    // ------------------------------------------------------------------
+    bool IsUnderlined {
+      get;
+      set;
+    }
 
-        // ------------------------------------------------------------------
-        /// <summary>
-        /// Gets or sets if the text is bold.
-        /// </summary>
-        // ------------------------------------------------------------------
-        bool IsBold
-        {
-            get;
-            set;
-        }
+    // ------------------------------------------------------------------
+    /// <summary>
+    /// Gets or sets if the text is bold.
+    /// </summary>
+    // ------------------------------------------------------------------
+    bool IsBold {
+      get;
+      set;
+    }
 
-        // ------------------------------------------------------------------
-        /// <summary>
-        /// Gets or sets if the text is italic.
-        /// </summary>
-        // ------------------------------------------------------------------
-        bool IsItalic
-        {
-            get;
-            set;
-        }
+    // ------------------------------------------------------------------
+    /// <summary>
+    /// Gets or sets if the text is italic.
+    /// </summary>
+    // ------------------------------------------------------------------
+    bool IsItalic {
+      get;
+      set;
+    }
 
-        #endregion
+    #endregion
 
-        #region Methods
+    #region Methods
 
-        // ------------------------------------------------------------------
-        /// <summary>
-        /// Gets the brush that's used to draw our text to a GDI+ graphics
-        /// surface.
-        /// </summary>
-        /// <returns>Brush</returns>
-        // ------------------------------------------------------------------
-        Brush GetBrush();
+    // ------------------------------------------------------------------
+    /// <summary>
+    /// Gets the brush that's used to draw our text to a GDI+ graphics
+    /// surface.
+    /// </summary>
+    /// <returns>Brush</returns>
+    // ------------------------------------------------------------------
+    Brush GetBrush();
 
-        // ------------------------------------------------------------------
-        /// <summary>
-        /// Applies the formatting specified by TextFormatting to the text
-        /// specified.
-        /// </summary>
-        /// <param name="text">string: The un-formatted text.</param>
-        /// <returns>string: The formatted text.</returns>
-        // ------------------------------------------------------------------
-        string GetFormattedText(string text);
+    // ------------------------------------------------------------------
+    /// <summary>
+    /// Applies the formatting specified by TextFormatting to the text
+    /// specified.
+    /// </summary>
+    /// <param name="text">string: The un-formatted text.</param>
+    /// <returns>string: The formatted text.</returns>
+    // ------------------------------------------------------------------
+    string GetFormattedText(string text);
 
-        #endregion
-    }
+    #endregion
+  }
 }
Index: /trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.Netron/3.0.2672.12446/Netron.Diagramming.Core-3.0.2672.12446/Core/Interfaces/ITool.cs
===================================================================
--- /trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.Netron/3.0.2672.12446/Netron.Diagramming.Core-3.0.2672.12446/Core/Interfaces/ITool.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.Netron/3.0.2672.12446/Netron.Diagramming.Core-3.0.2672.12446/Core/Interfaces/ITool.cs	(revision 4068)
@@ -1,123 +1,119 @@
 using System;
-using System.Collections.Generic;
-using System.Text;
 
-namespace Netron.Diagramming.Core
-{
-/*    
-    http://www.theserverside.net/blogs/showblog.tss?id=pluginArchitectures
-    http://www.martinfowler.com/articles/injection.html
-    http://www.codeproject.com/csharp/components.asp
- */
+namespace Netron.Diagramming.Core {
+  /*    
+      http://www.theserverside.net/blogs/showblog.tss?id=pluginArchitectures
+      http://www.martinfowler.com/articles/injection.html
+      http://www.codeproject.com/csharp/components.asp
+   */
+  /// <summary>
+  /// Describes a tool's members. <seealso cref="AbstractTool"/>
+  /// </summary>
+  public interface ITool : IServiceProvider {
+    #region Events
+
+    // ------------------------------------------------------------------
     /// <summary>
-    /// Describes a tool's members. <seealso cref="AbstractTool"/>
+    /// Occurs when this tool is deactivated.
     /// </summary>
-    public interface ITool : IServiceProvider
-    {
-        #region Events
+    // ------------------------------------------------------------------
+    event EventHandler<ToolEventArgs> OnToolDeactivate;
 
-        // ------------------------------------------------------------------
-        /// <summary>
-        /// Occurs when this tool is deactivated.
-        /// </summary>
-        // ------------------------------------------------------------------
-        event EventHandler<ToolEventArgs> OnToolDeactivate;
+    // ------------------------------------------------------------------
+    /// <summary>
+    /// Occurs when this tool is activated.
+    /// </summary>
+    // ------------------------------------------------------------------
+    event EventHandler<ToolEventArgs> OnToolActivate;
 
-        // ------------------------------------------------------------------
-        /// <summary>
-        /// Occurs when this tool is activated.
-        /// </summary>
-        // ------------------------------------------------------------------
-        event EventHandler<ToolEventArgs> OnToolActivate;
+    #endregion
 
-        #endregion
+    #region Properties
 
-        #region Properties
+    // ------------------------------------------------------------------
+    /// <summary>
+    /// Gets or sets a value indicating whether this <see cref="T:ITool"/> 
+    /// is enabled.
+    /// </summary>
+    /// <value><c>true</c> if enabled; otherwise, <c>false</c>.</value>
+    // ------------------------------------------------------------------
+    bool Enabled { get; set; }
 
-        // ------------------------------------------------------------------
-        /// <summary>
-        /// Gets or sets a value indicating whether this <see cref="T:ITool"/> 
-        /// is enabled.
-        /// </summary>
-        /// <value><c>true</c> if enabled; otherwise, <c>false</c>.</value>
-        // ------------------------------------------------------------------
-        bool Enabled { get; set; }
+    // ------------------------------------------------------------------
+    /// <summary>
+    /// Gets or sets the name of the tool.
+    /// </summary>
+    /// <value>The name.</value>
+    // ------------------------------------------------------------------
+    string Name { get; set; }
 
-        // ------------------------------------------------------------------
-        /// <summary>
-        /// Gets or sets the name of the tool.
-        /// </summary>
-        /// <value>The name.</value>
-        // ------------------------------------------------------------------
-        string Name { get; set; }
+    // ------------------------------------------------------------------
+    /// <summary>
+    /// Gets or sets a value indicating whether this tool is active. If 
+    /// true the tool is actually performing work via the various mouse 
+    /// or keyboard event handlers.
+    /// If <see cref="Enabled"/> is false the tool can never be active. 
+    /// Furthermore, if the tool <see cref="IsSuspended"/> it means 
+    /// another tool has suspended the activity of this tool.
+    /// </summary>
+    /// <value><c>true</c> if this instance is active; otherwise, 
+    /// <c>false</c>.</value>
+    // ------------------------------------------------------------------
+    bool IsActive { get; set; }
 
-        // ------------------------------------------------------------------
-        /// <summary>
-        /// Gets or sets a value indicating whether this tool is active. If 
-        /// true the tool is actually performing work via the various mouse 
-        /// or keyboard event handlers.
-        /// If <see cref="Enabled"/> is false the tool can never be active. 
-        /// Furthermore, if the tool <see cref="IsSuspended"/> it means 
-        /// another tool has suspended the activity of this tool.
-        /// </summary>
-        /// <value><c>true</c> if this instance is active; otherwise, 
-        /// <c>false</c>.</value>
-        // ------------------------------------------------------------------
-        bool IsActive { get; set;}
+    // ------------------------------------------------------------------
+    /// <summary>
+    /// Gets or sets a value indicating whether this tool can activated.
+    /// </summary>
+    /// <value>
+    /// 	<c>true</c> if this instance can activate; otherwise, <c>false</c>.
+    /// </value>
+    // ------------------------------------------------------------------
+    bool CanActivate { get; }
 
-        // ------------------------------------------------------------------
-        /// <summary>
-        /// Gets or sets a value indicating whether this tool can activated.
-        /// </summary>
-        /// <value>
-        /// 	<c>true</c> if this instance can activate; otherwise, <c>false</c>.
-        /// </value>
-        // ------------------------------------------------------------------
-        bool CanActivate { get; }
+    // ------------------------------------------------------------------
+    /// <summary>
+    /// Gets or sets the controller.
+    /// </summary>
+    /// <value>The controller.</value>
+    // ------------------------------------------------------------------
+    IController Controller { get; set; }
 
-        // ------------------------------------------------------------------
-        /// <summary>
-        /// Gets or sets the controller.
-        /// </summary>
-        /// <value>The controller.</value>
-        // ------------------------------------------------------------------
-        IController Controller { get; set;}
+    // ------------------------------------------------------------------
+    /// <summary>
+    /// Gets or sets a value indicating whether this instance is suspended.
+    /// A tool enters in a suspended mode when another tool has been 
+    /// activated and disallows another to continue its normal activity. 
+    /// For example, the <see cref="MoveTool"/> and 
+    /// <see cref="SelectionTool"/> are utually exclusive and similarly 
+    /// for the drawing tools and the selection tool. 
+    /// <para>This suspended state is independent of the 
+    /// <see cref="IsActive"/> and the <see cref="Enabled"/> states.</para>
+    /// </summary>
+    /// <value>
+    /// <c>true</c> if this instance is suspended; otherwise, <c>false</c>.
+    /// </value>
+    // ------------------------------------------------------------------
+    bool IsSuspended { get; set; }
 
-        // ------------------------------------------------------------------
-        /// <summary>
-        /// Gets or sets a value indicating whether this instance is suspended.
-        /// A tool enters in a suspended mode when another tool has been 
-        /// activated and disallows another to continue its normal activity. 
-        /// For example, the <see cref="MoveTool"/> and 
-        /// <see cref="SelectionTool"/> are utually exclusive and similarly 
-        /// for the drawing tools and the selection tool. 
-        /// <para>This suspended state is independent of the 
-        /// <see cref="IsActive"/> and the <see cref="Enabled"/> states.</para>
-        /// </summary>
-        /// <value>
-        /// <c>true</c> if this instance is suspended; otherwise, <c>false</c>.
-        /// </value>
-        // ------------------------------------------------------------------
-        bool IsSuspended { get; set;}
+    #endregion
 
-        #endregion
+    #region Methods
 
-        #region Methods
+    /// <summary>
+    /// Deactivates the tool.
+    /// </summary>
+    /// <returns></returns>
+    bool DeactivateTool();
 
-        /// <summary>
-        /// Deactivates the tool.
-        /// </summary>
-        /// <returns></returns>
-        bool DeactivateTool();
+    /// <summary>
+    /// Activates the tool.
+    /// </summary>
+    /// <returns></returns>
+    bool ActivateTool();
 
-        /// <summary>
-        /// Activates the tool.
-        /// </summary>
-        /// <returns></returns>
-        bool ActivateTool();
+    #endregion
+  }
 
-        #endregion
-    }
 
-    
 }
Index: /trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.Netron/3.0.2672.12446/Netron.Diagramming.Core-3.0.2672.12446/Core/Interfaces/ITracker.cs
===================================================================
--- /trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.Netron/3.0.2672.12446/Netron.Diagramming.Core-3.0.2672.12446/Core/Interfaces/ITracker.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.Netron/3.0.2672.12446/Netron.Diagramming.Core-3.0.2672.12446/Core/Interfaces/ITracker.cs	(revision 4068)
@@ -1,33 +1,28 @@
-using System;
-using System.Collections.Generic;
-using System.Text;
 using System.Drawing;
-namespace Netron.Diagramming.Core
-{
+namespace Netron.Diagramming.Core {
+  /// <summary>
+  /// The tracker tracks the resize and move of an entity or a group of entities.
+  /// </summary>
+  public interface ITracker : IPaintable {
+
+
     /// <summary>
-    /// The tracker tracks the resize and move of an entity or a group of entities.
+    /// Returns the relative coordinate of the grip-point hit, if any, of the tracker.
     /// </summary>
-    public interface ITracker : IPaintable
-    {
+    /// <param name="p"></param>
+    /// <returns></returns>
+    Point Hit(Point p);
 
-       
-        /// <summary>
-        /// Returns the relative coordinate of the grip-point hit, if any, of the tracker.
-        /// </summary>
-        /// <param name="p"></param>
-        /// <returns></returns>
-        Point Hit(Point p);
+    /// <summary>
+    /// Maps the tracker specified rectangle.
+    /// </summary>
+    /// <param name="rectangle">The rectangle.</param>
+    void Transform(Rectangle rectangle);
 
-        /// <summary>
-        /// Maps the tracker specified rectangle.
-        /// </summary>
-        /// <param name="rectangle">The rectangle.</param>
-        void Transform(Rectangle rectangle);
-
-        /// <summary>
-        /// Gets or sets a value indicating whether to show the resizing handles.
-        /// </summary>
-        /// <value><c>true</c> if [show handles]; otherwise, <c>false</c>.</value>
-        bool ShowHandles { get; set;}
-    }
+    /// <summary>
+    /// Gets or sets a value indicating whether to show the resizing handles.
+    /// </summary>
+    /// <value><c>true</c> if [show handles]; otherwise, <c>false</c>.</value>
+    bool ShowHandles { get; set; }
+  }
 }
Index: /trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.Netron/3.0.2672.12446/Netron.Diagramming.Core-3.0.2672.12446/Core/Interfaces/IUndoSupport.cs
===================================================================
--- /trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.Netron/3.0.2672.12446/Netron.Diagramming.Core-3.0.2672.12446/Core/Interfaces/IUndoSupport.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.Netron/3.0.2672.12446/Netron.Diagramming.Core-3.0.2672.12446/Core/Interfaces/IUndoSupport.cs	(revision 4068)
@@ -1,22 +1,19 @@
-using System;
 
-namespace Netron.Diagramming.Core
-{
-	/// <summary>
-	/// Interface that your application classes can implement
-	/// in order to perform the actual undo/redo functionality.	
-	/// </summary>
-	public interface IUndoSupport
-	{
-        /// <summary>
-        /// Undo of the last action
-        /// </summary>
-        /// <remarks>Calling this on a class level will call the Undo method of the last ICommand in the stack.</remarks>
-		void Undo();
-        /// <summary>
-        /// Performs the actual action or redo in case the actions was undoe before
-        /// </summary>
-        /// <remarks>Calling this on a class level will call the Redo method of the last ICommand in the stack.</remarks>
-		void Redo();
-	}
+namespace Netron.Diagramming.Core {
+  /// <summary>
+  /// Interface that your application classes can implement
+  /// in order to perform the actual undo/redo functionality.	
+  /// </summary>
+  public interface IUndoSupport {
+    /// <summary>
+    /// Undo of the last action
+    /// </summary>
+    /// <remarks>Calling this on a class level will call the Undo method of the last ICommand in the stack.</remarks>
+    void Undo();
+    /// <summary>
+    /// Performs the actual action or redo in case the actions was undoe before
+    /// </summary>
+    /// <remarks>Calling this on a class level will call the Redo method of the last ICommand in the stack.</remarks>
+    void Redo();
+  }
 }
Index: /trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.Netron/3.0.2672.12446/Netron.Diagramming.Core-3.0.2672.12446/Core/Interfaces/IVersion.cs
===================================================================
--- /trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.Netron/3.0.2672.12446/Netron.Diagramming.Core-3.0.2672.12446/Core/Interfaces/IVersion.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.Netron/3.0.2672.12446/Netron.Diagramming.Core-3.0.2672.12446/Core/Interfaces/IVersion.cs	(revision 4068)
@@ -1,19 +1,13 @@
-using System;
-using System.Collections.Generic;
-using System.Text;
 
-namespace Netron.Diagramming.Core
-{
-    public interface IVersion
-    {
-        // ------------------------------------------------------------------
-        /// <summary>
-        /// Gets the current version.
-        /// </summary>
-        // ------------------------------------------------------------------
-        double Version
-        {
-            get;
-        }
+namespace Netron.Diagramming.Core {
+  public interface IVersion {
+    // ------------------------------------------------------------------
+    /// <summary>
+    /// Gets the current version.
+    /// </summary>
+    // ------------------------------------------------------------------
+    double Version {
+      get;
     }
+  }
 }
Index: /trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.Netron/3.0.2672.12446/Netron.Diagramming.Core-3.0.2672.12446/Core/Interfaces/IView.cs
===================================================================
--- /trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.Netron/3.0.2672.12446/Netron.Diagramming.Core-3.0.2672.12446/Core/Interfaces/IView.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.Netron/3.0.2672.12446/Netron.Diagramming.Core-3.0.2672.12446/Core/Interfaces/IView.cs	(revision 4068)
@@ -3,363 +3,353 @@
 using System.Drawing.Drawing2D;
 using System.Windows.Forms;
-using System.Drawing.Printing;
-namespace Netron.Diagramming.Core
-{
-    // ----------------------------------------------------------------------
-    /// <summary>
-    /// The interface of the "View" in the Model - View - Controller 
-    /// framework.  The drawing of the diagram is handled by the View.
-    /// </summary>
-    // ----------------------------------------------------------------------
-    public interface IView
-    {
-        #region Events
-        /// <summary>
-        /// Occurs when the cursor is changed and the surface is supposed to set the cursor accordingly.
-        /// </summary>
-        event EventHandler<CursorEventArgs> OnCursorChange;
-
-        event EventHandler<ColorEventArgs> OnBackColorChange;
-        #endregion
-
-        #region Properties
-
-        // ------------------------------------------------------------------
-        /// <summary>
-        /// Gets or sets if the grid is to be drawn.
-        /// </summary>
-        // ------------------------------------------------------------------
-        bool ShowGrid
-        {
-            get;
-            set;
-        }
-
-        // ------------------------------------------------------------------
-        /// <summary>
-        /// Gets or sets if all shape's connectors should be shown.
-        /// </summary>
-        // ------------------------------------------------------------------
-        bool ShowConnectors
-        {
-            get;
-            set;
-        }
-
-        Rectangle HorizontalRulerBounds { get;}
-        Rectangle VerticalRulerBounds { get;}
-        MeasurementsUnit RulerUnits { get;}
-        /// <summary>
-        /// Get the transformation matrix of the view
-        /// </summary>
-        Matrix ViewMatrix { get;}
-
-        // ------------------------------------------------------------------
-        /// <summary>
-        /// Gets or sets the current cursor.
-        /// </summary>
-        /// <value>The current cursor.</value>
-        // ------------------------------------------------------------------
-        Cursor CurrentCursor { get; set;}
-
-        /// <summary>
-        /// Gets the ghost.
-        /// </summary>
-        /// <value>The ghost.</value>
-        IGhost Ghost { get;}
-
-        /// <summary>
-        /// Gets the ants.
-        /// </summary>
-        /// <value>The ants.</value>
-        IAnts Ants
-        {
-            get;
-        }
-
-        /// <summary>
-        /// Gets or sets the model.
-        /// </summary>
-        /// <value>The model.</value>
-        IModel Model { get; set; }
-
-        /// <summary>
-        /// Gets or sets the tracker.
-        /// </summary>
-        /// <value>The tracker.</value>
-        ITracker Tracker { get; set;}
-
-        /// <summary>
-        /// Scales the diagram.
-        /// </summary>
-        /// <value>The scale.</value>
-        SizeF Magnification { get; set;}
-
-        /// <summary>
-        /// Pans the view with the given shift.
-        /// </summary>
-        /// <value>The pan.</value>
-        Point Origin {get;set;}
-
-        /// <summary>
-        /// Gets or sets whether the rulers are visible.
-        /// </summary>
-        bool ShowRulers { get;set;}
-
-        // ------------------------------------------------------------------
-        /// <summary>
-        /// Gets or sets if the page's title is drawn when 'ShowPage' is set
-        /// to true.
-        /// </summary>
-        // ------------------------------------------------------------------
-        bool ShowPageTitle
-        {
-            get;
-            set;
-        }
-
-        // ------------------------------------------------------------------
-        /// <summary>
-        /// Gets or sets the size of the page in thousandths of an inch.
-        /// </summary>
-        // ------------------------------------------------------------------
-        Size PageSize
-        {
-            get;
-            set;
-        }
-
-        // ------------------------------------------------------------------
-        /// <summary>
-        /// Gets or sets if each page is rendered and printed in landscape
-        /// orientation.
-        /// </summary>
-        // ------------------------------------------------------------------
-        bool Landscape
-        {
-            get;
-            set;
-        }
-
-        /// <summary>
-        /// Gets the graphics object of the surface.
-        /// </summary>
-        /// <value>The graphics.</value>
-        Graphics Graphics
-        {
-            get;
-        }
-
-        #endregion
-
-        #region Methods
-
-        #region View to device
-        Point ViewToDevice(PointF point);
-        Size ViewToDevice(SizeF szView);
-        PointF ViewToDeviceF(PointF ptView);
-        Rectangle ViewToDevice(RectangleF rcView);
-        void ViewToDevice(PointF[] viewPts, out Point[] devicePts);
-        SizeF ViewToDeviceF(SizeF szView);
-        RectangleF ViewToDeviceF(RectangleF rcView);
-        #endregion
-
-        #region World to view
-        PointF WorldToView(PointF ptWorld);
-        RectangleF WorldToView(RectangleF rectangle);
-        void WorldToView(PointF[] worldPts, out PointF[] viewPts);
-        SizeF WorldToView(SizeF szWorld);
-        #endregion
-
-        #region Device to view
-        PointF DeviceToView(Point ptDevice);
-        void DeviceToView(Point[] devicePts, out PointF[] viewPts);
-        RectangleF DeviceToView(Rectangle rcDevice);
-        SizeF DeviceToView(Size szDevice);
-        #endregion
-
-        #region View to world
-        PointF ViewToWorld(PointF ptView);
-        RectangleF ViewToWorld(RectangleF rcView);
-        Rectangle ViewToWorld(Rectangle rcView);
-        SizeF ViewToWorld(SizeF szView);
-        void ViewToWorld(PointF[] viewPts, out PointF[] worldPts);
-        #endregion
-
-        // ------------------------------------------------------------------
-        /// <summary>
-        /// Sets the magnification and origin of the diagram such that
-        /// all entities in the current page are in view.
-        /// </summary>
-        // ------------------------------------------------------------------
-        void ZoomFit();
-
-        // ------------------------------------------------------------------
-        /// <summary>
-        /// Zooms the diagram control to the area specified.
-        /// </summary>
-        /// <param name="area">Rectangle: The area to zoom.</param>
-        // ------------------------------------------------------------------
-        void ZoomArea(Rectangle area);
-
-        // ------------------------------------------------------------------
-        /// <summary>
-        /// Invalidates this instance.
-        /// </summary>
-        // ------------------------------------------------------------------
-        void Invalidate();
-
-        // ------------------------------------------------------------------
-        /// <summary>
-        /// Invalidates the specified rectangle.
-        /// </summary>
-        /// <param name="rectangle">The rectangle.</param>
-        // ------------------------------------------------------------------
-        void Invalidate(System.Drawing.Rectangle rectangle);
-
-        // ------------------------------------------------------------------
-        /// <summary>
-        /// Paints the specified g.
-        /// </summary>
-        /// <param name="g">The g.</param>
-        // ------------------------------------------------------------------
-        void Paint(System.Drawing.Graphics g);
-
-        // ------------------------------------------------------------------
-        /// <summary>
-        /// Paints the background.
-        /// </summary>
-        /// <param name="g">The g.</param>
-        // ------------------------------------------------------------------
-        void PaintBackground(System.Drawing.Graphics g);
-
-        // ------------------------------------------------------------------
-        /// <summary>
-        /// Sets the type of the background.
-        /// </summary>
-        /// <param name="type">The type.</param>
-        // ------------------------------------------------------------------
-        void SetBackgroundType(CanvasBackgroundTypes type);
-
-        // ------------------------------------------------------------------
-        /// <summary>
-        /// Resets the ghost.
-        /// </summary>
-        // ------------------------------------------------------------------
-        void ResetGhost();
-
-        // ------------------------------------------------------------------
-        /// <summary>
-        /// Resets the ants.
-        /// </summary>
-        // ------------------------------------------------------------------
-        void ResetAnts();
-
-        // ------------------------------------------------------------------
-        /// <summary>
-        /// Resets the tracker.  The tracker is the selection frame drawn
-        /// around selected entities and allows then to be moved and/or
-        /// resized.
-        /// </summary>
-        // ------------------------------------------------------------------
-        void ResetTracker();
-
-        // ------------------------------------------------------------------
-        /// <summary>
-        /// Hides the tracker.  The tracker is the selection frame drawn
-        /// around selected entities and allows then to be moved and/or
-        /// resized.
-        /// </summary>
-        // ------------------------------------------------------------------
-        void HideTracker();
-
-        // ------------------------------------------------------------------
-        /// <summary>
-        /// Paints the ghost rectangle.
-        /// </summary>
-        /// <param name="start">The start.</param>
-        /// <param name="end">The end.</param>
-        // ------------------------------------------------------------------
-        void PaintGhostRectangle(Point start, Point end);
-
-        // ------------------------------------------------------------------
-        /// <summary>
-        /// Paints a ghost line.
-        /// </summary>
-        /// <param name="start">The start.</param>
-        /// <param name="end">The end.</param>
-        // ------------------------------------------------------------------
-        void PaintGhostLine(Point start, Point end);
-
-        // ------------------------------------------------------------------
-        /// <summary>
-        /// Paints a ghost multi-line
-        /// </summary>
-        /// <param name="cureveType">Type of the cureve.</param>
-        /// <param name="points">The points.</param>
-        // ------------------------------------------------------------------
-        void PaintGhostLine(MultiPointType cureveType, Point[] points);
-
-        // ------------------------------------------------------------------
-        /// <summary>
-        /// Paints the ghost ellipse.
-        /// </summary>
-        /// <param name="start">The start.</param>
-        /// <param name="end">The end.</param>
-        // ------------------------------------------------------------------
-        void PaintGhostEllipse(Point start, Point end);
-
-        // ------------------------------------------------------------------
-        /// <summary>
-        /// Paints the ants rectangle.
-        /// </summary>
-        /// <param name="ltPoint">The lt point.</param>
-        /// <param name="rbPoint">The rb point.</param>
-        // ------------------------------------------------------------------
-        void PaintAntsRectangle(Point ltPoint, Point rbPoint);
-
-        // ------------------------------------------------------------------
-        /// <summary>
-        /// Paints the tracker.
-        /// </summary>
-        /// <param name="rectangle">The rectangle.</param>
-        /// <param name="showHandles">if set to <c>true</c> shows the 
-        /// handles.</param>
-        // ------------------------------------------------------------------
-        void PaintTracker(Rectangle rectangle, bool showHandles);
-
-        // ------------------------------------------------------------------
-        /// <summary>
-        /// Attaches to model.
-        /// </summary>
-        /// <param name="model">The model.</param>
-        // ------------------------------------------------------------------
-        void AttachToModel(IModel model);
-
-        // ------------------------------------------------------------------
-        /// <summary>
-        /// Shows the tracker.
-        /// </summary>
-        // ------------------------------------------------------------------
-        void ShowTracker();
-
-        // ------------------------------------------------------------------
-        /// <summary>
-        /// Suspends the invalidation of the view, which means that the 
-        /// Invalidate() method calls from any entity will be discarded until 
-        /// Resume() has been called.
-        /// </summary>
-        // ------------------------------------------------------------------
-        void Suspend();
-
-        // ------------------------------------------------------------------
-        /// <summary>
-        /// Resumes the invalidation of the view.
-        /// </summary>
-        // ------------------------------------------------------------------
-        void Resume();
-
-        #endregion
-
-    }
+namespace Netron.Diagramming.Core {
+  // ----------------------------------------------------------------------
+  /// <summary>
+  /// The interface of the "View" in the Model - View - Controller 
+  /// framework.  The drawing of the diagram is handled by the View.
+  /// </summary>
+  // ----------------------------------------------------------------------
+  public interface IView {
+    #region Events
+    /// <summary>
+    /// Occurs when the cursor is changed and the surface is supposed to set the cursor accordingly.
+    /// </summary>
+    event EventHandler<CursorEventArgs> OnCursorChange;
+
+    event EventHandler<ColorEventArgs> OnBackColorChange;
+    #endregion
+
+    #region Properties
+
+    // ------------------------------------------------------------------
+    /// <summary>
+    /// Gets or sets if the grid is to be drawn.
+    /// </summary>
+    // ------------------------------------------------------------------
+    bool ShowGrid {
+      get;
+      set;
+    }
+
+    // ------------------------------------------------------------------
+    /// <summary>
+    /// Gets or sets if all shape's connectors should be shown.
+    /// </summary>
+    // ------------------------------------------------------------------
+    bool ShowConnectors {
+      get;
+      set;
+    }
+
+    Rectangle HorizontalRulerBounds { get; }
+    Rectangle VerticalRulerBounds { get; }
+    MeasurementsUnit RulerUnits { get; }
+    /// <summary>
+    /// Get the transformation matrix of the view
+    /// </summary>
+    Matrix ViewMatrix { get; }
+
+    // ------------------------------------------------------------------
+    /// <summary>
+    /// Gets or sets the current cursor.
+    /// </summary>
+    /// <value>The current cursor.</value>
+    // ------------------------------------------------------------------
+    Cursor CurrentCursor { get; set; }
+
+    /// <summary>
+    /// Gets the ghost.
+    /// </summary>
+    /// <value>The ghost.</value>
+    IGhost Ghost { get; }
+
+    /// <summary>
+    /// Gets the ants.
+    /// </summary>
+    /// <value>The ants.</value>
+    IAnts Ants {
+      get;
+    }
+
+    /// <summary>
+    /// Gets or sets the model.
+    /// </summary>
+    /// <value>The model.</value>
+    IModel Model { get; set; }
+
+    /// <summary>
+    /// Gets or sets the tracker.
+    /// </summary>
+    /// <value>The tracker.</value>
+    ITracker Tracker { get; set; }
+
+    /// <summary>
+    /// Scales the diagram.
+    /// </summary>
+    /// <value>The scale.</value>
+    SizeF Magnification { get; set; }
+
+    /// <summary>
+    /// Pans the view with the given shift.
+    /// </summary>
+    /// <value>The pan.</value>
+    Point Origin { get; set; }
+
+    /// <summary>
+    /// Gets or sets whether the rulers are visible.
+    /// </summary>
+    bool ShowRulers { get; set; }
+
+    // ------------------------------------------------------------------
+    /// <summary>
+    /// Gets or sets if the page's title is drawn when 'ShowPage' is set
+    /// to true.
+    /// </summary>
+    // ------------------------------------------------------------------
+    bool ShowPageTitle {
+      get;
+      set;
+    }
+
+    // ------------------------------------------------------------------
+    /// <summary>
+    /// Gets or sets the size of the page in thousandths of an inch.
+    /// </summary>
+    // ------------------------------------------------------------------
+    Size PageSize {
+      get;
+      set;
+    }
+
+    // ------------------------------------------------------------------
+    /// <summary>
+    /// Gets or sets if each page is rendered and printed in landscape
+    /// orientation.
+    /// </summary>
+    // ------------------------------------------------------------------
+    bool Landscape {
+      get;
+      set;
+    }
+
+    /// <summary>
+    /// Gets the graphics object of the surface.
+    /// </summary>
+    /// <value>The graphics.</value>
+    Graphics Graphics {
+      get;
+    }
+
+    #endregion
+
+    #region Methods
+
+    #region View to device
+    Point ViewToDevice(PointF point);
+    Size ViewToDevice(SizeF szView);
+    PointF ViewToDeviceF(PointF ptView);
+    Rectangle ViewToDevice(RectangleF rcView);
+    void ViewToDevice(PointF[] viewPts, out Point[] devicePts);
+    SizeF ViewToDeviceF(SizeF szView);
+    RectangleF ViewToDeviceF(RectangleF rcView);
+    #endregion
+
+    #region World to view
+    PointF WorldToView(PointF ptWorld);
+    RectangleF WorldToView(RectangleF rectangle);
+    void WorldToView(PointF[] worldPts, out PointF[] viewPts);
+    SizeF WorldToView(SizeF szWorld);
+    #endregion
+
+    #region Device to view
+    PointF DeviceToView(Point ptDevice);
+    void DeviceToView(Point[] devicePts, out PointF[] viewPts);
+    RectangleF DeviceToView(Rectangle rcDevice);
+    SizeF DeviceToView(Size szDevice);
+    #endregion
+
+    #region View to world
+    PointF ViewToWorld(PointF ptView);
+    RectangleF ViewToWorld(RectangleF rcView);
+    Rectangle ViewToWorld(Rectangle rcView);
+    SizeF ViewToWorld(SizeF szView);
+    void ViewToWorld(PointF[] viewPts, out PointF[] worldPts);
+    #endregion
+
+    // ------------------------------------------------------------------
+    /// <summary>
+    /// Sets the magnification and origin of the diagram such that
+    /// all entities in the current page are in view.
+    /// </summary>
+    // ------------------------------------------------------------------
+    void ZoomFit();
+
+    // ------------------------------------------------------------------
+    /// <summary>
+    /// Zooms the diagram control to the area specified.
+    /// </summary>
+    /// <param name="area">Rectangle: The area to zoom.</param>
+    // ------------------------------------------------------------------
+    void ZoomArea(Rectangle area);
+
+    // ------------------------------------------------------------------
+    /// <summary>
+    /// Invalidates this instance.
+    /// </summary>
+    // ------------------------------------------------------------------
+    void Invalidate();
+
+    // ------------------------------------------------------------------
+    /// <summary>
+    /// Invalidates the specified rectangle.
+    /// </summary>
+    /// <param name="rectangle">The rectangle.</param>
+    // ------------------------------------------------------------------
+    void Invalidate(System.Drawing.Rectangle rectangle);
+
+    // ------------------------------------------------------------------
+    /// <summary>
+    /// Paints the specified g.
+    /// </summary>
+    /// <param name="g">The g.</param>
+    // ------------------------------------------------------------------
+    void Paint(System.Drawing.Graphics g);
+
+    // ------------------------------------------------------------------
+    /// <summary>
+    /// Paints the background.
+    /// </summary>
+    /// <param name="g">The g.</param>
+    // ------------------------------------------------------------------
+    void PaintBackground(System.Drawing.Graphics g);
+
+    // ------------------------------------------------------------------
+    /// <summary>
+    /// Sets the type of the background.
+    /// </summary>
+    /// <param name="type">The type.</param>
+    // ------------------------------------------------------------------
+    void SetBackgroundType(CanvasBackgroundTypes type);
+
+    // ------------------------------------------------------------------
+    /// <summary>
+    /// Resets the ghost.
+    /// </summary>
+    // ------------------------------------------------------------------
+    void ResetGhost();
+
+    // ------------------------------------------------------------------
+    /// <summary>
+    /// Resets the ants.
+    /// </summary>
+    // ------------------------------------------------------------------
+    void ResetAnts();
+
+    // ------------------------------------------------------------------
+    /// <summary>
+    /// Resets the tracker.  The tracker is the selection frame drawn
+    /// around selected entities and allows then to be moved and/or
+    /// resized.
+    /// </summary>
+    // ------------------------------------------------------------------
+    void ResetTracker();
+
+    // ------------------------------------------------------------------
+    /// <summary>
+    /// Hides the tracker.  The tracker is the selection frame drawn
+    /// around selected entities and allows then to be moved and/or
+    /// resized.
+    /// </summary>
+    // ------------------------------------------------------------------
+    void HideTracker();
+
+    // ------------------------------------------------------------------
+    /// <summary>
+    /// Paints the ghost rectangle.
+    /// </summary>
+    /// <param name="start">The start.</param>
+    /// <param name="end">The end.</param>
+    // ------------------------------------------------------------------
+    void PaintGhostRectangle(Point start, Point end);
+
+    // ------------------------------------------------------------------
+    /// <summary>
+    /// Paints a ghost line.
+    /// </summary>
+    /// <param name="start">The start.</param>
+    /// <param name="end">The end.</param>
+    // ------------------------------------------------------------------
+    void PaintGhostLine(Point start, Point end);
+
+    // ------------------------------------------------------------------
+    /// <summary>
+    /// Paints a ghost multi-line
+    /// </summary>
+    /// <param name="cureveType">Type of the cureve.</param>
+    /// <param name="points">The points.</param>
+    // ------------------------------------------------------------------
+    void PaintGhostLine(MultiPointType cureveType, Point[] points);
+
+    // ------------------------------------------------------------------
+    /// <summary>
+    /// Paints the ghost ellipse.
+    /// </summary>
+    /// <param name="start">The start.</param>
+    /// <param name="end">The end.</param>
+    // ------------------------------------------------------------------
+    void PaintGhostEllipse(Point start, Point end);
+
+    // ------------------------------------------------------------------
+    /// <summary>
+    /// Paints the ants rectangle.
+    /// </summary>
+    /// <param name="ltPoint">The lt point.</param>
+    /// <param name="rbPoint">The rb point.</param>
+    // ------------------------------------------------------------------
+    void PaintAntsRectangle(Point ltPoint, Point rbPoint);
+
+    // ------------------------------------------------------------------
+    /// <summary>
+    /// Paints the tracker.
+    /// </summary>
+    /// <param name="rectangle">The rectangle.</param>
+    /// <param name="showHandles">if set to <c>true</c> shows the 
+    /// handles.</param>
+    // ------------------------------------------------------------------
+    void PaintTracker(Rectangle rectangle, bool showHandles);
+
+    // ------------------------------------------------------------------
+    /// <summary>
+    /// Attaches to model.
+    /// </summary>
+    /// <param name="model">The model.</param>
+    // ------------------------------------------------------------------
+    void AttachToModel(IModel model);
+
+    // ------------------------------------------------------------------
+    /// <summary>
+    /// Shows the tracker.
+    /// </summary>
+    // ------------------------------------------------------------------
+    void ShowTracker();
+
+    // ------------------------------------------------------------------
+    /// <summary>
+    /// Suspends the invalidation of the view, which means that the 
+    /// Invalidate() method calls from any entity will be discarded until 
+    /// Resume() has been called.
+    /// </summary>
+    // ------------------------------------------------------------------
+    void Suspend();
+
+    // ------------------------------------------------------------------
+    /// <summary>
+    /// Resumes the invalidation of the view.
+    /// </summary>
+    // ------------------------------------------------------------------
+    void Resume();
+
+    #endregion
+
+  }
 }
Index: /trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.Netron/3.0.2672.12446/Netron.Diagramming.Core-3.0.2672.12446/Core/Library.cs
===================================================================
--- /trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.Netron/3.0.2672.12446/Netron.Diagramming.Core-3.0.2672.12446/Core/Library.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.Netron/3.0.2672.12446/Netron.Diagramming.Core-3.0.2672.12446/Core/Library.cs	(revision 4068)
@@ -1,238 +1,209 @@
 using System;
-using System.Collections.Generic;
-using System.Text;
+using System.Diagnostics;
 using System.IO;
 using System.Reflection;
 using System.Windows.Forms;
-using System.Diagnostics;
-
-namespace Netron.Diagramming.Core
-{
-    // ----------------------------------------------------------------------
-    /// <summary>
-    /// Contains a collection of shapes and handles loading shapes from
-    /// assemblies.  This can also be serialized for later use.
-    /// </summary>
-    // ----------------------------------------------------------------------
-    public class Library
-    {
-        // ------------------------------------------------------------------
-        /// <summary>
-        /// The collection of shapes for this library.
-        /// </summary>
-        // ------------------------------------------------------------------
-        CollectionBase<IShape> myShapes;
-
-        // ------------------------------------------------------------------
-        /// <summary>
-        /// The name of this library.
-        /// </summary>
-        // ------------------------------------------------------------------
-        string myName = "Library";
-
-        // ------------------------------------------------------------------
-        /// <summary>
-        /// The complete path to the assembly to load.
-        /// </summary>
-        // ------------------------------------------------------------------
-        string myPath = String.Empty;
-
-        // ------------------------------------------------------------------
-        /// <summary>
-        /// Our assembly.
-        /// </summary>
-        // ------------------------------------------------------------------
-        Assembly assembly;
-
-        // ------------------------------------------------------------------
-        /// <summary>
-        /// Gets or sets the name of this library.
-        /// </summary>
-        // ------------------------------------------------------------------
-        public string Name
-        {
-            get
-            {
-                return myName;
-            }
-            set
-            {
-                myName = value;
-            }
-        }
-
-        // ------------------------------------------------------------------
-        /// <summary>
-        /// Gets the shapes in the library.
-        /// </summary>
-        // ------------------------------------------------------------------
-        public CollectionBase<IShape> Shapes
-        {
-            get
-            {
-                return myShapes;
-            }
-        }
-
-        // ------------------------------------------------------------------
-        /// <summary>
-        /// Constructor.
-        /// </summary>
-        // ------------------------------------------------------------------
-        public Library()
-        {
-            this.myShapes = new CollectionBase<IShape>();
-        }
-
-        // ------------------------------------------------------------------
-        /// <summary>
-        /// Returns if this library contains a shape with the GUID specified.
-        /// </summary>
-        /// <param name="guid"></param>
-        /// <returns></returns>
-        // ------------------------------------------------------------------
-        public bool ContainsShape(string guid)
-        {
-            foreach (IShape shape in myShapes)
-            {
-                if (shape.Uid.ToString() == guid)
-                {
-                    return true;
-                }
-            }
-            return false;
-        }
-
-        // ------------------------------------------------------------------
-        /// <summary>
-        /// Creates a new instance of the shape with the GUID specified.
-        /// </summary>
-        /// <param name="guid">string</param>
-        /// <returns>IShape</returns>
-        // ------------------------------------------------------------------
-        public IShape CreateNewInstance(string guid)
-        {
-            if ((assembly == null) ||
-                (guid == "") ||
-                (guid == String.Empty))
-            {
-                return null;
-            }
-
-            string typeName = "";
-            foreach (IShape shape in myShapes)
-            {
-                if (shape.Uid.ToString() == guid)
-                {
-                    typeName = shape.GetType().FullName;
-                    IShape newInstance =
-                        (IShape)assembly.CreateInstance(typeName);
-
-                    return newInstance;
-                }
-            }
-            return null;
-        }
-
-        // ------------------------------------------------------------------
-        /// <summary>
-        /// Imports all shapes that have the "ShapeAttribute" attribute
-        /// from the assembly (i.e. "dll") specified.
-        /// </summary>
-        /// <param name="path">string: The complete path to the assembly to
-        /// load.</param>
-        // ------------------------------------------------------------------
-        public void Load(string path)
-        {
-            try
-            {
-                myPath = path;
-                Directory.SetCurrentDirectory(
-                    Path.GetDirectoryName(Application.ExecutablePath));
-
-                // Use the "LoadFile" option so the assembly is also loaded
-                // into the current domain.  This is important!!!
-                assembly = Assembly.LoadFile(path);
-                if (assembly == null)
-                {
-                    return;
-                }
-
-                // The assembly types.
-                Type[] types = assembly.GetTypes();
-
-                if (types == null)
-                {
-                    return;
-                }
-
-                IShape shapeInstance = null;
-                object[] objs;
-
-                // Loop over all modules in the assembly and get all shapes
-                // that are marked with the attribute that indicates they're
-                // to be loaded into the library.
-                for (int k = 0; k < types.Length; k++)
-                {
-                    // It has to be a class to be a shape!
-                    if (!types[k].IsClass)
-                    {
-                        continue;
-                    }
-
-                    objs = types[k].GetCustomAttributes(
-                        typeof(ShapeAttribute), false);
-
-                    if (objs.Length < 1)
-                    {
-                        // This module isn't a shape so go to the next one.
-                        continue;
-                    }
-
-                    // Now, we are sure to have a shape object.					
-
-                    try
-                    {
-                        // Normally you'd need the constructor passing the 
-                        // Model, but this instance will not actually live 
-                        // on the canvas and hence cause no problem.
-                        // However, you do need a ctor with no parameters!
-                        shapeInstance = (IShape)assembly.CreateInstance(
-                            types[k].FullName);
-
-                        ShapeAttribute shapeAtts = objs[0] as ShapeAttribute;
-                        this.myShapes.Add(shapeInstance);
-                        //summary = new ShapeSummary(path, shapeAtts.Key,shapeAtts.Name, shapeAtts.ShapeCategory, shapeAtts.ReflectionName, shapeAtts.Description);
-                        //library.ShapeSummaries.Add(summary);
-                    }
-                    catch (Exception exc)
-                    {
-                        Trace.WriteLine(exc.Message, "An error occurred " +
-                            "while creating a shape from type " +
-                            types[k].FullName);
-                        continue;
-                    }
-                }
-
-                // Now, set the name of this library to the assembly title.
-                foreach (Attribute attr in 
-                    Attribute.GetCustomAttributes(assembly))
-                {
-                    // Check for the AssemblyTitle attribute.
-                    if (attr.GetType() == typeof(AssemblyTitleAttribute))
-                    {
-                        this.myName = ((AssemblyTitleAttribute)attr).Title;
-                        break;
-                    }
-                }
-
-            }
-            catch(Exception e)
-            {
-                Trace.WriteLine(e.Message, "An error occurred while " +
-                    "loading library from:\n" + path);
-                return;
-            }
-        }
-    }
+
+namespace Netron.Diagramming.Core {
+  // ----------------------------------------------------------------------
+  /// <summary>
+  /// Contains a collection of shapes and handles loading shapes from
+  /// assemblies.  This can also be serialized for later use.
+  /// </summary>
+  // ----------------------------------------------------------------------
+  public class Library {
+    // ------------------------------------------------------------------
+    /// <summary>
+    /// The collection of shapes for this library.
+    /// </summary>
+    // ------------------------------------------------------------------
+    CollectionBase<IShape> myShapes;
+
+    // ------------------------------------------------------------------
+    /// <summary>
+    /// The name of this library.
+    /// </summary>
+    // ------------------------------------------------------------------
+    string myName = "Library";
+
+    // ------------------------------------------------------------------
+    /// <summary>
+    /// The complete path to the assembly to load.
+    /// </summary>
+    // ------------------------------------------------------------------
+    string myPath = String.Empty;
+
+    // ------------------------------------------------------------------
+    /// <summary>
+    /// Our assembly.
+    /// </summary>
+    // ------------------------------------------------------------------
+    Assembly assembly;
+
+    // ------------------------------------------------------------------
+    /// <summary>
+    /// Gets or sets the name of this library.
+    /// </summary>
+    // ------------------------------------------------------------------
+    public string Name {
+      get {
+        return myName;
+      }
+      set {
+        myName = value;
+      }
+    }
+
+    // ------------------------------------------------------------------
+    /// <summary>
+    /// Gets the shapes in the library.
+    /// </summary>
+    // ------------------------------------------------------------------
+    public CollectionBase<IShape> Shapes {
+      get {
+        return myShapes;
+      }
+    }
+
+    // ------------------------------------------------------------------
+    /// <summary>
+    /// Constructor.
+    /// </summary>
+    // ------------------------------------------------------------------
+    public Library() {
+      this.myShapes = new CollectionBase<IShape>();
+    }
+
+    // ------------------------------------------------------------------
+    /// <summary>
+    /// Returns if this library contains a shape with the GUID specified.
+    /// </summary>
+    /// <param name="guid"></param>
+    /// <returns></returns>
+    // ------------------------------------------------------------------
+    public bool ContainsShape(string guid) {
+      foreach (IShape shape in myShapes) {
+        if (shape.Uid.ToString() == guid) {
+          return true;
+        }
+      }
+      return false;
+    }
+
+    // ------------------------------------------------------------------
+    /// <summary>
+    /// Creates a new instance of the shape with the GUID specified.
+    /// </summary>
+    /// <param name="guid">string</param>
+    /// <returns>IShape</returns>
+    // ------------------------------------------------------------------
+    public IShape CreateNewInstance(string guid) {
+      if ((assembly == null) ||
+          (guid == "") ||
+          (guid == String.Empty)) {
+        return null;
+      }
+
+      string typeName = "";
+      foreach (IShape shape in myShapes) {
+        if (shape.Uid.ToString() == guid) {
+          typeName = shape.GetType().FullName;
+          IShape newInstance =
+              (IShape)assembly.CreateInstance(typeName);
+
+          return newInstance;
+        }
+      }
+      return null;
+    }
+
+    // ------------------------------------------------------------------
+    /// <summary>
+    /// Imports all shapes that have the "ShapeAttribute" attribute
+    /// from the assembly (i.e. "dll") specified.
+    /// </summary>
+    /// <param name="path">string: The complete path to the assembly to
+    /// load.</param>
+    // ------------------------------------------------------------------
+    public void Load(string path) {
+      try {
+        myPath = path;
+        Directory.SetCurrentDirectory(
+            Path.GetDirectoryName(Application.ExecutablePath));
+
+        // Use the "LoadFile" option so the assembly is also loaded
+        // into the current domain.  This is important!!!
+        assembly = Assembly.LoadFile(path);
+        if (assembly == null) {
+          return;
+        }
+
+        // The assembly types.
+        Type[] types = assembly.GetTypes();
+
+        if (types == null) {
+          return;
+        }
+
+        IShape shapeInstance = null;
+        object[] objs;
+
+        // Loop over all modules in the assembly and get all shapes
+        // that are marked with the attribute that indicates they're
+        // to be loaded into the library.
+        for (int k = 0; k < types.Length; k++) {
+          // It has to be a class to be a shape!
+          if (!types[k].IsClass) {
+            continue;
+          }
+
+          objs = types[k].GetCustomAttributes(
+              typeof(ShapeAttribute), false);
+
+          if (objs.Length < 1) {
+            // This module isn't a shape so go to the next one.
+            continue;
+          }
+
+          // Now, we are sure to have a shape object.					
+
+          try {
+            // Normally you'd need the constructor passing the 
+            // Model, but this instance will not actually live 
+            // on the canvas and hence cause no problem.
+            // However, you do need a ctor with no parameters!
+            shapeInstance = (IShape)assembly.CreateInstance(
+                types[k].FullName);
+
+            ShapeAttribute shapeAtts = objs[0] as ShapeAttribute;
+            this.myShapes.Add(shapeInstance);
+            //summary = new ShapeSummary(path, shapeAtts.Key,shapeAtts.Name, shapeAtts.ShapeCategory, shapeAtts.ReflectionName, shapeAtts.Description);
+            //library.ShapeSummaries.Add(summary);
+          }
+          catch (Exception exc) {
+            Trace.WriteLine(exc.Message, "An error occurred " +
+                "while creating a shape from type " +
+                types[k].FullName);
+            continue;
+          }
+        }
+
+        // Now, set the name of this library to the assembly title.
+        foreach (Attribute attr in
+            Attribute.GetCustomAttributes(assembly)) {
+          // Check for the AssemblyTitle attribute.
+          if (attr.GetType() == typeof(AssemblyTitleAttribute)) {
+            this.myName = ((AssemblyTitleAttribute)attr).Title;
+            break;
+          }
+        }
+
+      }
+      catch (Exception e) {
+        Trace.WriteLine(e.Message, "An error occurred while " +
+            "loading library from:\n" + path);
+        return;
+      }
+    }
+  }
 }
Index: /trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.Netron/3.0.2672.12446/Netron.Diagramming.Core-3.0.2672.12446/Core/LibraryManager.cs
===================================================================
--- /trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.Netron/3.0.2672.12446/Netron.Diagramming.Core-3.0.2672.12446/Core/LibraryManager.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.Netron/3.0.2672.12446/Netron.Diagramming.Core-3.0.2672.12446/Core/LibraryManager.cs	(revision 4068)
@@ -1,64 +1,52 @@
-using System;
-using System.Collections.Generic;
-using System.Text;
-using System.Diagnostics;
 
-namespace Netron.Diagramming.Core
-{
-    // ----------------------------------------------------------------------
+namespace Netron.Diagramming.Core {
+  // ----------------------------------------------------------------------
+  /// <summary>
+  /// Manages the collection of libraries.
+  /// </summary>
+  // ----------------------------------------------------------------------
+  public class LibraryManager {
+    // ------------------------------------------------------------------
     /// <summary>
-    /// Manages the collection of libraries.
+    /// The collection of shapes for this library.
     /// </summary>
-    // ----------------------------------------------------------------------
-    public class LibraryManager
-    {
-        // ------------------------------------------------------------------
-        /// <summary>
-        /// The collection of shapes for this library.
-        /// </summary>
-        // ------------------------------------------------------------------
-        private CollectionBase<Library> myLibraries;
+    // ------------------------------------------------------------------
+    private CollectionBase<Library> myLibraries;
 
-        // ------------------------------------------------------------------
-        /// <summary>
-        /// Gets the collection of all libraries.
-        /// </summary>
-        // ------------------------------------------------------------------
-        public CollectionBase<Library> Libraries
-        {
-            get
-            {
-                return myLibraries;
-            }
+    // ------------------------------------------------------------------
+    /// <summary>
+    /// Gets the collection of all libraries.
+    /// </summary>
+    // ------------------------------------------------------------------
+    public CollectionBase<Library> Libraries {
+      get {
+        return myLibraries;
+      }
+    }
+
+    // ------------------------------------------------------------------
+    /// <summary>
+    /// Constructor.
+    /// </summary>
+    // ------------------------------------------------------------------
+    public LibraryManager() {
+      myLibraries = new CollectionBase<Library>();
+    }
+
+    // ------------------------------------------------------------------
+    /// <summary>
+    /// Creates a new instance of the shape that has the GUID specified.
+    /// </summary>
+    /// <param name="guid">string</param>
+    /// <returns>IShape</returns>
+    // ------------------------------------------------------------------
+    public IShape CreateNewInstance(string guid) {
+      foreach (Library lib in myLibraries) {
+        if (lib.ContainsShape(guid)) {
+          return lib.CreateNewInstance(guid);
         }
-
-        // ------------------------------------------------------------------
-        /// <summary>
-        /// Constructor.
-        /// </summary>
-        // ------------------------------------------------------------------
-        public LibraryManager()
-        {
-            myLibraries = new CollectionBase<Library>();            
-        }
-
-        // ------------------------------------------------------------------
-        /// <summary>
-        /// Creates a new instance of the shape that has the GUID specified.
-        /// </summary>
-        /// <param name="guid">string</param>
-        /// <returns>IShape</returns>
-        // ------------------------------------------------------------------
-        public IShape CreateNewInstance(string guid)
-        {
-            foreach (Library lib in myLibraries)
-            {
-                if (lib.ContainsShape(guid))
-                {
-                    return lib.CreateNewInstance(guid);
-                }
-            }
-            return null;
-        }
+      }
+      return null;
     }
+  }
 }
Index: /trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.Netron/3.0.2672.12446/Netron.Diagramming.Core-3.0.2672.12446/Core/Scene graph/Layer.cs
===================================================================
--- /trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.Netron/3.0.2672.12446/Netron.Diagramming.Core-3.0.2672.12446/Core/Scene graph/Layer.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.Netron/3.0.2672.12446/Netron.Diagramming.Core-3.0.2672.12446/Core/Scene graph/Layer.cs	(revision 4068)
@@ -1,250 +1,225 @@
 using System;
-using System.Collections.Generic;
-using System.Text;
-
-namespace Netron.Diagramming.Core
-{
-    /// <summary>
-    /// Implements the ILayer interface/mechanism
-    /// </summary>
-    public partial class Layer : ILayer, IVersion
-    {
-        #region Events
-        /// <summary>
-        /// Occurs when an entity is added to the layer
-        /// </summary>
-        public event EventHandler<EntityEventArgs> OnEntityAdded;
-        /// <summary>
-        /// Occurs when an entity is removed from the layer 
-        /// </summary>
-        public event EventHandler<EntityEventArgs> OnEntityRemoved;
-        /// <summary>
-        /// Occurs when the layer is cleared
-        /// </summary>
-        public event EventHandler OnClear;
-        #endregion
-
-        #region Fields
-
-        // ------------------------------------------------------------------
-        /// <summary>
-        /// Implementation of IVersion - the current version of 
-        /// Layer.
-        /// </summary>
-        // ------------------------------------------------------------------
-        protected const double layerVersion = 1.0;
-
-        // ------------------------------------------------------------------
-        /// <summary>
-        /// the Model field
-        /// </summary>
-        // ------------------------------------------------------------------
-        [NonSerialized]
-        private IModel mModel;
-
-        // ------------------------------------------------------------------
-        /// <summary>
-        /// the Entities field
-        /// </summary>
-        // ------------------------------------------------------------------
-        private CollectionBase<IDiagramEntity> mEntities;
-
-        // ------------------------------------------------------------------
-        /// <summary>
-        /// the Name field
-        /// </summary>
-        // ------------------------------------------------------------------
-        private string mName;
-
-        // ------------------------------------------------------------------
-        /// <summary>
-        /// Specifies if this layer and all of its entities are drawn.
-        /// </summary>
-        // ------------------------------------------------------------------
-        protected bool mIsVisible = true;
-
-        #endregion
-
-        #region Properties
-
-        // ------------------------------------------------------------------
-        /// <summary>
-        /// Gets the current version.
-        /// </summary>
-        // ------------------------------------------------------------------
-        public virtual double Version
-        {
-            get
-            {
-                return layerVersion;
-            }
+
+namespace Netron.Diagramming.Core {
+  /// <summary>
+  /// Implements the ILayer interface/mechanism
+  /// </summary>
+  public partial class Layer : ILayer, IVersion {
+    #region Events
+    /// <summary>
+    /// Occurs when an entity is added to the layer
+    /// </summary>
+    public event EventHandler<EntityEventArgs> OnEntityAdded;
+    /// <summary>
+    /// Occurs when an entity is removed from the layer 
+    /// </summary>
+    public event EventHandler<EntityEventArgs> OnEntityRemoved;
+    /// <summary>
+    /// Occurs when the layer is cleared
+    /// </summary>
+    public event EventHandler OnClear;
+    #endregion
+
+    #region Fields
+
+    // ------------------------------------------------------------------
+    /// <summary>
+    /// Implementation of IVersion - the current version of 
+    /// Layer.
+    /// </summary>
+    // ------------------------------------------------------------------
+    protected const double layerVersion = 1.0;
+
+    // ------------------------------------------------------------------
+    /// <summary>
+    /// the Model field
+    /// </summary>
+    // ------------------------------------------------------------------
+    [NonSerialized]
+    private IModel mModel;
+
+    // ------------------------------------------------------------------
+    /// <summary>
+    /// the Entities field
+    /// </summary>
+    // ------------------------------------------------------------------
+    private CollectionBase<IDiagramEntity> mEntities;
+
+    // ------------------------------------------------------------------
+    /// <summary>
+    /// the Name field
+    /// </summary>
+    // ------------------------------------------------------------------
+    private string mName;
+
+    // ------------------------------------------------------------------
+    /// <summary>
+    /// Specifies if this layer and all of its entities are drawn.
+    /// </summary>
+    // ------------------------------------------------------------------
+    protected bool mIsVisible = true;
+
+    #endregion
+
+    #region Properties
+
+    // ------------------------------------------------------------------
+    /// <summary>
+    /// Gets the current version.
+    /// </summary>
+    // ------------------------------------------------------------------
+    public virtual double Version {
+      get {
+        return layerVersion;
+      }
+    }
+
+    // ------------------------------------------------------------------
+    /// <summary>
+    /// Gets or sets if this layer and all of its entities are drawn.
+    /// </summary>
+    // ------------------------------------------------------------------
+    public bool IsVisible {
+      get {
+        return mIsVisible;
+      }
+      set {
+        mIsVisible = value;
+      }
+    }
+
+    // ------------------------------------------------------------------
+    /// <summary>
+    /// Gets all shapes in this layer.
+    /// </summary>
+    // ------------------------------------------------------------------
+    public CollectionBase<IShape> Shapes {
+      get {
+        CollectionBase<IShape> shapes = new CollectionBase<IShape>();
+        foreach (IDiagramEntity entity in mEntities) {
+          if (entity is IShape)
+            shapes.Add(entity as IShape);
         }
-
-        // ------------------------------------------------------------------
-        /// <summary>
-        /// Gets or sets if this layer and all of its entities are drawn.
-        /// </summary>
-        // ------------------------------------------------------------------
-        public bool IsVisible
-        {
-            get
-            {
-                return mIsVisible;
-            }
-            set
-            {
-                mIsVisible = value;
-            }
+        return shapes;
+      }
+    }
+
+    // ------------------------------------------------------------------
+    /// <summary>
+    /// Gets all connections in this layer.
+    /// </summary>
+    // ------------------------------------------------------------------
+    public CollectionBase<IConnection> Connections {
+      get {
+        CollectionBase<IConnection> cons = new CollectionBase<IConnection>();
+        foreach (IDiagramEntity entity in mEntities) {
+          if (entity is IConnection)
+            cons.Add(entity as IConnection);
         }
-
-        // ------------------------------------------------------------------
-        /// <summary>
-        /// Gets all shapes in this layer.
-        /// </summary>
-        // ------------------------------------------------------------------
-        public CollectionBase<IShape> Shapes
-        {
-            get
-            {
-                CollectionBase<IShape> shapes = new CollectionBase<IShape>();
-                foreach (IDiagramEntity entity in mEntities)
-                {
-                    if (entity is IShape)
-                        shapes.Add(entity as IShape);
-                }
-                return shapes;
-            }
-        }
-
-        // ------------------------------------------------------------------
-        /// <summary>
-        /// Gets all connections in this layer.
-        /// </summary>
-        // ------------------------------------------------------------------
-        public CollectionBase<IConnection> Connections
-        {
-            get
-            {
-                CollectionBase<IConnection> cons = new CollectionBase<IConnection>();
-                foreach (IDiagramEntity entity in mEntities)
-                {
-                    if (entity is IConnection)
-                        cons.Add(entity as IConnection);
-                }
-                return cons;
-            }
-        }
-
-        // ------------------------------------------------------------------
-        /// <summary>
-        /// Gets or sets the Model
-        /// </summary>
-        // ------------------------------------------------------------------
-        public IModel Model
-        {
-            get { return mModel; }
-            set
-            {
-                if (value == null)
-                    throw new InconsistencyException("The model you want to set has value 'null'.");
-
-                mModel = value;
-                foreach (IDiagramEntity entity in mEntities)
-                    entity.Model = value;
-            }
-        }
-
-        // ------------------------------------------------------------------
-        /// <summary>
-        /// Gets or sets the Name
-        /// </summary>
-        // ------------------------------------------------------------------
-        public string Name
-        {
-            get { return mName; }
-            set { mName = value; }
-        }
-
-        // ------------------------------------------------------------------
-        /// <summary>
-        /// Gets or sets the Entities
-        /// </summary>
-        // ------------------------------------------------------------------
-        public CollectionBase<IDiagramEntity> Entities
-        {
-            get { return mEntities; }
-            //set { mEntities = value; }
-        }
-
-
-        #endregion
-
-        #region Constructor
-
-        // ------------------------------------------------------------------
-        /// <summary>
-        /// Initializes a new instance of the <see cref="T:Layer"/> class.
-        /// </summary>
-        /// <param name="name">The name.</param>
-        // ------------------------------------------------------------------
-        public Layer(string name)
-        {
-            mName = name;
-            mEntities = new CollectionBase<IDiagramEntity>();
-            Init();
-        }
-        private void AttachToEntityCollection(CollectionBase<IDiagramEntity> collection)
-        {
-            collection.OnItemAdded += new EventHandler<CollectionEventArgs<IDiagramEntity>>(mEntities_OnItemAdded);
-            collection.OnItemRemoved += new EventHandler<CollectionEventArgs<IDiagramEntity>>(mEntities_OnItemRemoved);
-            collection.OnClear += new EventHandler(mEntities_OnClear);
-        }
-        /// <summary>
-        /// Initializes this object
-        /// <remarks>See also the <see cref="OnDeserialized"/> event for post-deserialization actions to which this method is related.
-        /// </remarks>
-        /// </summary>
-        private void Init()
-        {
-            if (mEntities == null)
-                throw new InconsistencyException("The entity collection is 'null'");
-            AttachToEntityCollection(mEntities);
-        }
-        /// <summary>
-        /// Handles the OnClear event of the Entities.
-        /// </summary>
-        /// <param name="sender">The source of the event.</param>
-        /// <param name="e">The <see cref="T:System.EventArgs"/> instance containing the event data.</param>
-        void mEntities_OnClear(object sender, EventArgs e)
-        {
-            EventHandler handler = OnClear;
-            if (handler != null)
-                handler(sender, e);
-        }
-
-        /// <summary>
-        /// Handles the OnItemRemoved event of the Entities
-        /// </summary>
-        /// <param name="sender">The sender.</param>
-        /// <param name="e">The e.</param>
-        void mEntities_OnItemRemoved(object sender, CollectionEventArgs<IDiagramEntity> e)
-        {
-            EventHandler<EntityEventArgs> handler = OnEntityRemoved;
-            if (handler != null)
-                handler(this, new EntityEventArgs(e.Item));
-        }
-
-        /// <summary>
-        /// Bubbles the event up
-        /// </summary>
-        /// <param name="sender"></param>
-        /// <param name="e"></param>
-        void mEntities_OnItemAdded(object sender, CollectionEventArgs<IDiagramEntity> e)
-        {
-            EventHandler<EntityEventArgs> handler = OnEntityAdded;
-            if (handler != null)
-                handler(this, new EntityEventArgs(e.Item));
-        }
-        #endregion
-    }
+        return cons;
+      }
+    }
+
+    // ------------------------------------------------------------------
+    /// <summary>
+    /// Gets or sets the Model
+    /// </summary>
+    // ------------------------------------------------------------------
+    public IModel Model {
+      get { return mModel; }
+      set {
+        if (value == null)
+          throw new InconsistencyException("The model you want to set has value 'null'.");
+
+        mModel = value;
+        foreach (IDiagramEntity entity in mEntities)
+          entity.Model = value;
+      }
+    }
+
+    // ------------------------------------------------------------------
+    /// <summary>
+    /// Gets or sets the Name
+    /// </summary>
+    // ------------------------------------------------------------------
+    public string Name {
+      get { return mName; }
+      set { mName = value; }
+    }
+
+    // ------------------------------------------------------------------
+    /// <summary>
+    /// Gets or sets the Entities
+    /// </summary>
+    // ------------------------------------------------------------------
+    public CollectionBase<IDiagramEntity> Entities {
+      get { return mEntities; }
+      //set { mEntities = value; }
+    }
+
+
+    #endregion
+
+    #region Constructor
+
+    // ------------------------------------------------------------------
+    /// <summary>
+    /// Initializes a new instance of the <see cref="T:Layer"/> class.
+    /// </summary>
+    /// <param name="name">The name.</param>
+    // ------------------------------------------------------------------
+    public Layer(string name) {
+      mName = name;
+      mEntities = new CollectionBase<IDiagramEntity>();
+      Init();
+    }
+    private void AttachToEntityCollection(CollectionBase<IDiagramEntity> collection) {
+      collection.OnItemAdded += new EventHandler<CollectionEventArgs<IDiagramEntity>>(mEntities_OnItemAdded);
+      collection.OnItemRemoved += new EventHandler<CollectionEventArgs<IDiagramEntity>>(mEntities_OnItemRemoved);
+      collection.OnClear += new EventHandler(mEntities_OnClear);
+    }
+    /// <summary>
+    /// Initializes this object
+    /// <remarks>See also the <see cref="OnDeserialized"/> event for post-deserialization actions to which this method is related.
+    /// </remarks>
+    /// </summary>
+    private void Init() {
+      if (mEntities == null)
+        throw new InconsistencyException("The entity collection is 'null'");
+      AttachToEntityCollection(mEntities);
+    }
+    /// <summary>
+    /// Handles the OnClear event of the Entities.
+    /// </summary>
+    /// <param name="sender">The source of the event.</param>
+    /// <param name="e">The <see cref="T:System.EventArgs"/> instance containing the event data.</param>
+    void mEntities_OnClear(object sender, EventArgs e) {
+      EventHandler handler = OnClear;
+      if (handler != null)
+        handler(sender, e);
+    }
+
+    /// <summary>
+    /// Handles the OnItemRemoved event of the Entities
+    /// </summary>
+    /// <param name="sender">The sender.</param>
+    /// <param name="e">The e.</param>
+    void mEntities_OnItemRemoved(object sender, CollectionEventArgs<IDiagramEntity> e) {
+      EventHandler<EntityEventArgs> handler = OnEntityRemoved;
+      if (handler != null)
+        handler(this, new EntityEventArgs(e.Item));
+    }
+
+    /// <summary>
+    /// Bubbles the event up
+    /// </summary>
+    /// <param name="sender"></param>
+    /// <param name="e"></param>
+    void mEntities_OnItemAdded(object sender, CollectionEventArgs<IDiagramEntity> e) {
+      EventHandler<EntityEventArgs> handler = OnEntityAdded;
+      if (handler != null)
+        handler(this, new EntityEventArgs(e.Item));
+    }
+    #endregion
+  }
 }
Index: /trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.Netron/3.0.2672.12446/Netron.Diagramming.Core-3.0.2672.12446/Core/Scene graph/Model.cs
===================================================================
--- /trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.Netron/3.0.2672.12446/Netron.Diagramming.Core-3.0.2672.12446/Core/Scene graph/Model.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.Netron/3.0.2672.12446/Netron.Diagramming.Core-3.0.2672.12446/Core/Scene graph/Model.cs	(revision 4068)
@@ -1,1325 +1,1183 @@
 using System;
+using System.Collections.Generic;
+using System.ComponentModel;
+using System.Diagnostics;
 using System.Drawing;
-using System.Collections.Generic;
-using System.Text;
-using System.Diagnostics;
 using System.Windows.Forms;
-using System.ComponentModel;
-namespace Netron.Diagramming.Core
-{
-    // ----------------------------------------------------------------------
-    /// <summary>
-    /// Implementation of the <see cref="IModel"/> interface; the 'database' 
-    /// of the control.
-    /// </summary>
-    // ----------------------------------------------------------------------
-    public partial class Model : 
-        IModel, 
-        IDisposable
-    {
-        #region Events
-
-        // ------------------------------------------------------------------
-        /// <summary>
-        /// Occurs when the current page has changed.
-        /// </summary>
-        // ------------------------------------------------------------------
-        public event CurrentPageChangedEventHandler OnCurrentPageChanged;
-
-        /// <summary>
-        /// Occurs when an entity is removed from the model
-        /// </summary>
-        public event EventHandler<EntityEventArgs> OnEntityRemoved;
-        /// <summary>
-        /// Occurs when an entity is added to the model.
-        /// </summary>
-        public event EventHandler<EntityEventArgs> OnEntityAdded;
-        /// <summary>
-        /// Occurs when an element of the diagram requests a refresh of a region/rectangle of the canvas
-        /// </summary>
-        public event EventHandler<RectangleEventArgs> OnInvalidateRectangle;
-        /// <summary>
-        /// Occurs when an element of the diagram requests a refresh
-        /// </summary>
-        public event EventHandler OnInvalidate;
-        /// <summary>
-        /// Occurs when the ConnectionCollection has changed
-        /// </summary>
-        public event EventHandler<ConnectionCollectionEventArgs> OnConnectionCollectionChanged;
-        /// <summary>
-        /// Occurs when the cursor is changed and the surface is supposed to set the cursor accordingly.
-        /// </summary>
-        public event EventHandler<CursorEventArgs> OnCursorChange;
-        /// <summary>
-        /// Raises the <see cref="OnConnectionCollectionChanged"/> event
-        /// </summary>
-        /// <param name="e">ConnectionCollection event argument</param>
-        private void RaiseOnConnectionCollectionChanged(ConnectionCollectionEventArgs e)
-        {
-            EventHandler<ConnectionCollectionEventArgs> handler = OnConnectionCollectionChanged;
-            if (handler != null)
-            {
-                handler(this, e);
+namespace Netron.Diagramming.Core {
+  // ----------------------------------------------------------------------
+  /// <summary>
+  /// Implementation of the <see cref="IModel"/> interface; the 'database' 
+  /// of the control.
+  /// </summary>
+  // ----------------------------------------------------------------------
+  public partial class Model :
+      IModel,
+      IDisposable {
+    #region Events
+
+    // ------------------------------------------------------------------
+    /// <summary>
+    /// Occurs when the current page has changed.
+    /// </summary>
+    // ------------------------------------------------------------------
+    public event CurrentPageChangedEventHandler OnCurrentPageChanged;
+
+    /// <summary>
+    /// Occurs when an entity is removed from the model
+    /// </summary>
+    public event EventHandler<EntityEventArgs> OnEntityRemoved;
+    /// <summary>
+    /// Occurs when an entity is added to the model.
+    /// </summary>
+    public event EventHandler<EntityEventArgs> OnEntityAdded;
+    /// <summary>
+    /// Occurs when an element of the diagram requests a refresh of a region/rectangle of the canvas
+    /// </summary>
+    public event EventHandler<RectangleEventArgs> OnInvalidateRectangle;
+    /// <summary>
+    /// Occurs when an element of the diagram requests a refresh
+    /// </summary>
+    public event EventHandler OnInvalidate;
+    /// <summary>
+    /// Occurs when the ConnectionCollection has changed
+    /// </summary>
+    public event EventHandler<ConnectionCollectionEventArgs> OnConnectionCollectionChanged;
+    /// <summary>
+    /// Occurs when the cursor is changed and the surface is supposed to set the cursor accordingly.
+    /// </summary>
+    public event EventHandler<CursorEventArgs> OnCursorChange;
+    /// <summary>
+    /// Raises the <see cref="OnConnectionCollectionChanged"/> event
+    /// </summary>
+    /// <param name="e">ConnectionCollection event argument</param>
+    private void RaiseOnConnectionCollectionChanged(ConnectionCollectionEventArgs e) {
+      EventHandler<ConnectionCollectionEventArgs> handler = OnConnectionCollectionChanged;
+      if (handler != null) {
+        handler(this, e);
+      }
+    }
+
+    public void RaiseOnCursorChange(Cursor cursor) {
+      EventHandler<CursorEventArgs> handler = OnCursorChange;
+      if (handler != null)
+        handler(this, new CursorEventArgs(cursor));
+    }
+
+    /// <summary>
+    /// Raises the on invalidate.
+    /// </summary>
+    public void RaiseOnInvalidate() {
+      if (OnInvalidate != null)
+        OnInvalidate(this, EventArgs.Empty);
+    }
+    /// <summary>
+    /// Raises the OnInvalidateRectangle event.
+    /// </summary>
+    /// <param name="rectangle">The rectangle.</param>
+    public void RaiseOnInvalidateRectangle(Rectangle rectangle) {
+      EventHandler<RectangleEventArgs> handler = OnInvalidateRectangle;
+      if (handler != null) {
+        handler(this, new RectangleEventArgs(rectangle));
+      }
+    }
+    /// <summary>
+    /// Occurs when the bounding region (aka client-rectangle) of the canvas has changed
+    /// </summary>
+    public event EventHandler<RectangleEventArgs> OnRectangleChanged;
+    /// <summary>
+    /// Raises the <see cref="OnRectangleChanged"/> event.
+    /// </summary>
+    /// <param name="e"></param>
+    private void RaiseOnRectangleChanged(RectangleEventArgs e) {
+      EventHandler<RectangleEventArgs> handler = OnRectangleChanged;
+      if (handler != null) {
+        handler(this, e);
+      }
+    }
+    /// <summary>
+    /// Occurs when the diagram info (aka user metadata) has changed
+    /// </summary>
+    public event EventHandler<DiagramInformationEventArgs> OnDiagramInformationChanged;
+    /// <summary>
+    /// Raises the <see cref="OnDiagramInformationChanged"/> event.
+    /// </summary>
+    /// <param name="e"></param>
+    private void RaiseOnDiagramInformationChanged(DiagramInformationEventArgs e) {
+      EventHandler<DiagramInformationEventArgs> handler = OnDiagramInformationChanged;
+      if (handler != null) {
+        handler(this, e);
+      }
+    }
+
+    /// <summary>
+    /// Occurs when the Ambience has changed
+    /// </summary>
+    public event EventHandler<AmbienceEventArgs> OnAmbienceChanged;
+    /// <summary>
+    /// Raises the <see cref="OnAmbienceChanged"/> event
+    /// </summary>
+    /// <param name="e"></param>
+    private void RaiseOnAmbienceChanged(AmbienceEventArgs e) {
+      EventHandler<AmbienceEventArgs> handler = OnAmbienceChanged;
+      if (handler != null) {
+        handler(this, e);
+      }
+    }
+
+    /// <summary>
+    /// Raises the <see cref="OnEntityAdded"/> event
+    /// </summary>
+    /// <param name="e">The <see cref="T:Netron.Diagramming.Core.EntityEventArgs"/> instance containing the event data.</param>
+    private void RaiseOnEntityAdded(EntityEventArgs e) {
+      EventHandler<EntityEventArgs> handler = OnEntityAdded;
+      if (handler != null) {
+        handler(this, e);
+      }
+    }
+
+    /// <summary>
+    /// Raises the <see cref="OnEntityRemoved"/> event.
+    /// </summary>
+    /// <param name="e">The <see cref="T:Netron.Diagramming.Core.EntityEventArgs"/> instance containing the event data.</param>
+    private void RaiseOnEntityRemoved(EntityEventArgs e) {
+      EventHandler<EntityEventArgs> handler = OnEntityRemoved;
+      if (handler != null) {
+        handler(this, e);
+      }
+    }
+
+    // ------------------------------------------------------------------
+    /// <summary>
+    /// Raises the <see cref="OnCurrentPageChanged"/> event.
+    /// </summary>
+    /// <param name="e">PageEventArgs</param>
+    // ------------------------------------------------------------------
+    protected virtual void RaiseOnCurrentPageChanged(PageEventArgs e) {
+      if (this.OnCurrentPageChanged != null) {
+        OnCurrentPageChanged(this, e);
+      }
+    }
+
+    #endregion
+
+    #region Fields
+
+    // ------------------------------------------------------------------
+    /// <summary>
+    /// Implementation of IVersion - the current version of 
+    /// Model.
+    /// </summary>
+    // ------------------------------------------------------------------
+    protected const double modelVersion = 1.0;
+
+    // ------------------------------------------------------------------
+    /// <summary>
+    /// Specifies if all shape's connectors are shown.
+    /// </summary>
+    // ------------------------------------------------------------------
+    protected bool mShowConnectors = true;
+
+    private GraphicsUnit measurementUnits = GraphicsUnit.Pixel;
+    /// <summary>
+    /// the LayoutRoot field
+    /// </summary>
+    private IShape mLayoutRoot;
+    /// <summary>
+    /// the DefaultPage field
+    /// </summary>
+    [NonSerialized]
+    private IPage mDefaultPage;
+    /// <summary>
+    /// the page collection
+    /// </summary>
+    [NonSerialized]
+    private CollectionBase<IPage> mPages;
+    ///<summary>
+    /// the shapes of the diagram
+    /// </summary>
+    //[NonSerialized]
+    //private CollectionBase<IShape> mShapes;
+    /// <summary>
+    /// the bounding rectangle
+    /// </summary>
+    [NonSerialized]
+    private Rectangle mRectangle;
+    /// <summary>
+    /// the metadata of the diagram
+    /// </summary>
+    [NonSerialized]
+    private DocumentInformation mInformation;
+
+    /// <summary>
+    /// the collection of to-be-painted diagram entities
+    /// </summary>
+    //[NonSerialized]
+    //private CollectionBase<IDiagramEntity> Paintables;
+    /// <summary>
+    /// the CurrentPage field
+    /// </summary>
+    [NonSerialized]
+    private IPage mCurrentPage;
+
+    private float mMeasurementScale = 1.0F;
+    #endregion
+
+    #region Properties
+
+    // ------------------------------------------------------------------
+    /// <summary>
+    /// Gets the current version.
+    /// </summary>
+    // ------------------------------------------------------------------
+    public virtual double Version {
+      get {
+        return modelVersion;
+      }
+    }
+
+    private Selection selection;
+    public Selection Selection {
+      get { return this.selection; }
+      set { this.selection = value; }
+    }
+
+    // ------------------------------------------------------------------
+    /// <summary>
+    /// Specifies if all shape's connectors are shown.
+    /// </summary>
+    // ------------------------------------------------------------------
+    public bool ShowConnectors {
+      get {
+        return this.mShowConnectors;
+      }
+      set {
+        this.mShowConnectors = value;
+        foreach (IPage page in this.mPages) {
+          foreach (IShape shape in page.Shapes) {
+            shape.ShowConnectors = this.mShowConnectors;
+          }
+        }
+      }
+    }
+
+    [Browsable(true)]
+    [Description("Scaling value for logical units.")]
+    public float MeasurementScale {
+      get {
+        return mMeasurementScale;
+      }
+
+      set {
+        mMeasurementScale = value;
+      }
+    }
+
+    [BrowsableAttribute(true)]
+    [Description("Logical unit of measurement")]
+    public GraphicsUnit MeasurementUnits {
+      get {
+        return measurementUnits;
+      }
+
+      set {
+        measurementUnits = value;
+      }
+    }
+
+    // ------------------------------------------------------------------
+    /// <summary>
+    /// Gets or sets the LayoutRoot
+    /// </summary>
+    // ------------------------------------------------------------------
+    public IShape LayoutRoot {
+      get { return mLayoutRoot; }
+      set {
+        mLayoutRoot = value;
+
+      }
+    }
+
+    // ------------------------------------------------------------------        
+    /// <summary>
+    /// Gets the current page.  Use 'SetCurrentPage(IPage page)' or
+    /// 'SetCurrentPage(int index)' to set the current page.
+    /// </summary>
+    // ------------------------------------------------------------------
+    public IPage CurrentPage {
+      get { return mCurrentPage; }
+    }
+
+    // ------------------------------------------------------------------
+    /// <summary>
+    /// Gets the paintables.
+    /// </summary>
+    /// <value>The paintables.</value>
+    // ------------------------------------------------------------------
+    public CollectionBase<IDiagramEntity> Paintables {
+      get {
+        return mCurrentPage.Entities;
+      }
+    }
+
+    // ------------------------------------------------------------------
+    /// <summary>
+    /// Gets the pages of the diagram control.  Use method 'AddPage' to
+    /// add a page so the page gets attached to this Model.
+    /// </summary>
+    /// <value>The pages.</value>
+    // ------------------------------------------------------------------
+    public CollectionBase<IPage> Pages {
+      get { return mPages; }
+    }
+
+    // ------------------------------------------------------------------
+    /// <summary>
+    /// Gets or sets the default page
+    /// </summary>
+    // ------------------------------------------------------------------
+    public IPage DefaultPage {
+      get { return mDefaultPage; }
+      set { mDefaultPage = value; }
+    }
+
+    // ------------------------------------------------------------------
+    /// <summary>
+    /// Gets the shapes of the current page.
+    /// </summary>
+    // ------------------------------------------------------------------
+    public CollectionBase<IShape> Shapes {
+      get {
+        return CurrentPage.Shapes;
+        //return mShapes;
+      }
+      //internal set
+      //{
+      //    mShapes = value;
+      //}
+    }
+
+    // ------------------------------------------------------------------
+    /// <summary>
+    /// Gets or sets the information of the diagram
+    /// </summary>
+    // ------------------------------------------------------------------
+    internal DocumentInformation Information {
+      get {
+        return mInformation;
+      }
+      set {
+        mInformation = value;
+      }
+    }
+
+    // ------------------------------------------------------------------
+    /// <summary>
+    /// Gets the bounding rectangle of the diagram (client rectangle)
+    /// </summary>
+    // ------------------------------------------------------------------
+    public Rectangle Rectangle {
+      get {
+        return mRectangle;
+      }
+      set {
+        mRectangle = value;
+        RaiseOnRectangleChanged(new RectangleEventArgs(value));
+      }
+    }
+
+    // ------------------------------------------------------------------
+    /// <summary>
+    /// Gets the horizontal coordinate of the diagram
+    /// </summary>
+    // ------------------------------------------------------------------
+    public float X {
+      get {
+        return mRectangle.X;
+      }
+    }
+
+    // ------------------------------------------------------------------
+    /// <summary>
+    /// Gets the verticle coordinate of the diagram
+    /// </summary>
+    // ------------------------------------------------------------------
+    public float Y {
+      get {
+        return mRectangle.Y;
+      }
+
+    }
+
+    // ------------------------------------------------------------------
+    /// <summary>
+    /// Gets the width of the diagram
+    /// </summary>
+    // ------------------------------------------------------------------
+    public float Width {
+      get {
+        return mRectangle.Width;
+      }
+    }
+
+    // ------------------------------------------------------------------
+    /// <summary>
+    /// Gets the height of the diagram
+    /// </summary>
+    // ------------------------------------------------------------------
+    public float Height {
+      get {
+        return mRectangle.Height;
+      }
+    }
+
+    // ------------------------------------------------------------------
+    /// <summary>
+    /// Gets or sets the collection of connections
+    /// </summary>
+    // ------------------------------------------------------------------
+    public CollectionBase<IConnection> Connections {
+      get {
+        return CurrentPage.Connections;
+      }
+
+    }
+    #endregion
+
+    #region Constructor
+
+    // ------------------------------------------------------------------
+    /// <summary>
+    /// Default constructor
+    /// </summary>
+    // ------------------------------------------------------------------
+    public Model() {
+      //here I'll have to work on the scene graph
+      //this.mShapes = new CollectionBase<IShape>();
+      //the default page
+
+      //the page collection
+      mPages = new CollectionBase<IPage>();
+      Page p = new Page("Default Page", this);
+      p.Ambience.PageColor = ArtPalette.DefaultPageColor;
+      mPages.Add(p);
+
+      Init();
+    }
+
+    #endregion
+
+    // ------------------------------------------------------------------
+    /// <summary>
+    /// Initializes this object
+    /// <remarks>See also the <see cref="OnDeserialized"/> event for 
+    /// post-deserialization actions to which this method is related.
+    /// </remarks>
+    /// </summary>
+    // ------------------------------------------------------------------
+    private void Init() {
+      if (mPages == null) {
+        throw new InconsistencyException(
+            "The page collection is 'null'.");
+      }
+      if (mPages.Count == 0) {
+        throw new InconsistencyException(
+            "The page collection should contain at least one page.");
+      }
+
+      foreach (IPage page in mPages)
+        AttachToPage(page);
+      mDefaultPage = mPages[0];
+      // Initially the current page is the zero-th page in the 
+      // collection.
+      SetCurrentPage(0);
+    }
+
+    // ------------------------------------------------------------------
+    /// <summary>
+    /// Adds a page.  This should be used when adding pages rather than
+    /// though the Pages property so the page gets attached to the Model.
+    /// </summary>
+    /// <param name="page">IPage: The page to add.</param>
+    /// <returns>IPage</returns>
+    // ------------------------------------------------------------------
+    public IPage AddPage(IPage page) {
+      mPages.Add(page);
+      AttachToPage(page);
+      return page;
+    }
+
+    // ------------------------------------------------------------------
+    /// <summary>
+    /// Adds a page.  This should be used when adding pages rather than
+    /// though the Pages property so the page gets attached to the Model.
+    /// The page name is set to "Page" plus the new number of pages.
+    /// For example, if there are currently two pages, then "Page3" is 
+    /// set as the new page name.
+    /// </summary>
+    /// <returns>IPage</returns>
+    // ------------------------------------------------------------------
+    public IPage AddPage() {
+      string pageName = this.GetDefaultNewPageName();
+      Page page = new Page(pageName, this);
+      return AddPage(page);
+    }
+
+    // ------------------------------------------------------------------
+    /// <summary>
+    /// Deletes the page specified if it is not the default page.
+    /// </summary>
+    /// <param name="page">IPage: The page to remove.</param>
+    /// <param name="allowWarnings">bool: Specifies if the user should
+    /// be given the option to cancel the action if the current page
+    /// has entities.  Also, when set to true, if the current page is
+    /// the default page, then a message box is shown informing the
+    /// user that the default page cannot be deleted.</param>
+    /// <returns>bool: If the delete was successful.  True is returned
+    /// if the current page was removed.</returns>
+    // ------------------------------------------------------------------
+    public bool RemovePage(IPage page, bool allowWarnings) {
+      if (page == this.DefaultPage) {
+        if (allowWarnings) {
+          MessageBox.Show(
+          "The default page cannot be deleted.",
+          "Delete Page Error",
+          MessageBoxButtons.OK,
+          MessageBoxIcon.Error);
+        }
+        return false;
+      }
+
+      int pageIndex = 0;
+      int newCurrentPageIndex = 0;
+
+      // Ask the user if they really want to remove the page if
+      // it has entities if 'allowWarnings' is true.
+      if ((allowWarnings) && (page.Entities.Count > 0)) {
+        if (MessageBox.Show(
+            "Are you sure you want to delete this page?",
+            "Confirm Delete",
+            MessageBoxButtons.YesNo,
+            MessageBoxIcon.Question,
+            MessageBoxDefaultButton.Button1) == DialogResult.No) {
+          return false;
+        }
+      }
+
+      // Now we can continue with deleting the page.
+      // If the page specified is the current page, then we need to set
+      // the current page to another page.  Let's use the previous one 
+      // in the list.  
+      if (page == CurrentPage) {
+        pageIndex = Pages.IndexOf(page);
+
+        if (pageIndex > 0) {
+          newCurrentPageIndex = pageIndex - 1;
+        }
+        SetCurrentPage(newCurrentPageIndex);
+      }
+
+      Pages.Remove(page);
+      return true;
+    }
+
+    // ------------------------------------------------------------------
+    /// <summary>
+    /// Returns a new page name that's unique from all the others.
+    /// </summary>
+    /// <returns>string: Returns "Page" plus the number of pages IF A
+    /// NEW PAGE WERE ADDED.  For example, if there are currently two
+    /// pages, then "Page3" is returned.</returns>
+    // ------------------------------------------------------------------
+    public string GetDefaultNewPageName() {
+      string name = "Page" + (Pages.Count + 1).ToString();
+      return name;
+    }
+
+    // ------------------------------------------------------------------
+    /// <summary>
+    /// Sets the current page.
+    /// </summary>
+    /// <param name="page">The page.</param>
+    // ------------------------------------------------------------------
+    public void SetCurrentPage(IPage page) {
+      mCurrentPage = page;
+      RaiseOnAmbienceChanged(new AmbienceEventArgs(page.Ambience));
+      RaiseOnCurrentPageChanged(new PageEventArgs(page));
+
+      //change the paintables as well            
+      //Paintables = new CollectionBase<IDiagramEntity>();
+
+      #region Reload of the z-order, usually only necessary after deserialization
+
+      CollectionBase<IDiagramEntity> collected = new CollectionBase<IDiagramEntity>();
+      //pick up the non-group entities
+      foreach (IDiagramEntity entity in Paintables)
+        if (!typeof(IGroup).IsInstanceOfType(entity))
+          collected.Add(entity);
+
+      if (collected.Count > 0) {
+        Algorithms.SortInPlace<IDiagramEntity>(collected, new SceneIndexComparer<IDiagramEntity>());
+        //Paintables.AddRange(collected);
+      }
+      #endregion
+
+    }
+
+    // ------------------------------------------------------------------
+    /// <summary>
+    /// Sets the current page.
+    /// </summary>
+    /// <param name="pageIndex">Index of the page.</param>
+    // ------------------------------------------------------------------
+    public void SetCurrentPage(int pageIndex) {
+      if (mPages == null ||
+          mPages.Count == 0 ||
+          pageIndex >= mPages.Count ||
+          pageIndex < 0) {
+        throw new IndexOutOfRangeException(
+            "The page index is outside the page range.");
+      }
+      SetCurrentPage(mPages[pageIndex]);
+    }
+
+    // ------------------------------------------------------------------
+    /// <summary>
+    /// Attaches this model to the page specified.  The Model property for
+    /// the page is set and the IPage events needed by this are registered
+    /// for here (OnEntityAdded, OnEntityRemoved, OnClear, and 
+    /// OnAmbienceChanged).
+    /// </summary>
+    /// <param name="page">IPage: The page to attach this model to.</param>
+    // ------------------------------------------------------------------
+    private void AttachToPage(IPage page) {
+      page.OnEntityAdded += new EventHandler<EntityEventArgs>(mDefaultPage_OnEntityAdded);
+      page.OnEntityRemoved += new EventHandler<EntityEventArgs>(mDefaultPage_OnEntityRemoved);
+      page.OnClear += new EventHandler(mDefaultPage_OnClear);
+      page.OnAmbienceChanged += new EventHandler<AmbienceEventArgs>(mDefaultPage_OnAmbienceChanged);
+      page.Model = this;
+    }
+
+    void mDefaultPage_OnAmbienceChanged(object sender, AmbienceEventArgs e) {
+      RaiseOnAmbienceChanged(e);
+    }
+
+    #region Paintables transfers on Page changes
+
+    // ------------------------------------------------------------------
+    /// <summary>
+    /// Handles the OnClear event of the DefaultPage.
+    /// </summary>
+    /// <param name="sender">The source of the event.</param>
+    /// <param name="e">The <see cref="T:System.EventArgs"/> instance 
+    /// containing the event data.</param>
+    // ------------------------------------------------------------------
+    void mDefaultPage_OnClear(object sender, EventArgs e) {
+      Paintables.Clear();
+    }
+
+    // ------------------------------------------------------------------
+    /// <summary>
+    /// Handles the OnEntityRemoved event of the DefaultPage.
+    /// </summary>
+    /// <param name="sender">The source of the event.</param>
+    /// <param name="e">The 
+    /// <see cref="T:Netron.Diagramming.Core.EntityEventArgs"/> instance 
+    /// containing the event data.</param>
+    // ------------------------------------------------------------------
+    void mDefaultPage_OnEntityRemoved(object sender, EntityEventArgs e) {
+      if (Paintables.Contains(e.Entity)) {
+        //shift the entities above the one to be removed
+        int index = e.Entity.SceneIndex;
+        foreach (IDiagramEntity entity in Paintables) {
+          if (entity.SceneIndex > index)
+            entity.SceneIndex--;
+        }
+        Paintables.Remove(e.Entity);
+      }
+      //if the selection contains the shape we have to remove it from the selection
+      if (Selection.SelectedItems.Contains(e.Entity)) {
+        Selection.SelectedItems.Remove(e.Entity);
+      }
+      RaiseOnEntityRemoved(e);
+    }
+
+    // ------------------------------------------------------------------
+    /// <summary>
+    /// Handles the OnEntityAdded event of the Page and adds the new 
+    /// entity to the Paintables.
+    /// </summary>
+    /// <param name="sender">The source of the event.</param>
+    /// <param name="e">The 
+    /// <see cref="T:Netron.Diagramming.Core.EntityEventArgs"/> instance 
+    /// containing the event data.</param>
+    // ------------------------------------------------------------------
+    void mDefaultPage_OnEntityAdded(object sender, EntityEventArgs e) {
+      //don't add it if it's already there or if it's a group (unless you want to deploy something special to emphasize a group shape).
+      if (!Paintables.Contains(e.Entity)) {
+        if ((e.Entity is IGroup) && !(e.Entity as IGroup).EmphasizeGroup) {
+          return;
+        }
+        //set the new entity on top of the stack
+        e.Entity.SceneIndex = Paintables.Count;
+        Paintables.Add(e.Entity);
+      }
+      #region Addition callback
+      IAdditionCallback callback = e.Entity.GetService(typeof(IAdditionCallback)) as IAdditionCallback;
+      if (callback != null)
+        callback.OnAddition();
+      #endregion
+      RaiseOnEntityAdded(e);
+    }
+    #endregion
+
+    #region Methods
+
+    #region Ordering methods
+    /// <summary>
+    /// Re-sets the scene-index of the paintables
+    /// </summary>
+    private void ReAssignSceneIndex(CollectionBase<IDiagramEntity> entities) {
+      for (int i = 0; i < entities.Count; i++) {
+        entities[i].SceneIndex = i;
+      }
+    }
+    /// <summary>
+    /// Sends to entity to the bottom of the z-order stack.
+    /// </summary>
+    /// <param name="entity">The entity.</param>
+    public void SendToBack(IDiagramEntity entity) {
+      ILayer layer = CurrentPage.GetLayer(entity);
+      if (layer != null) {
+        layer.Entities.Remove(entity);
+        layer.Entities.Insert(0, entity);
+        ReAssignSceneIndex(layer.Entities);
+        Rectangle rec = entity.Rectangle;
+        rec.Inflate(20, 20);
+        this.RaiseOnInvalidateRectangle(Rectangle);
+      }
+      //if(Paintables.Contains(entity))
+      //{
+      //    Paintables.Remove(entity);
+      //    Paintables.Insert(0, entity);
+      //    ReAssignSceneIndex();
+      //    Rectangle rec = entity.Rectangle;
+      //    rec.Inflate(20, 20);
+      //    this.RaiseOnInvalidateRectangle(Rectangle);
+      //}
+    }
+
+    /// <summary>
+    /// Sends the entity down the z-order stack with the specified amount.
+    /// </summary>
+    /// <param name="entity">The entity.</param>
+    /// <param name="zShift">The z shift.</param>
+    public void SendBackwards(IDiagramEntity entity, int zShift) {
+      ILayer layer = CurrentPage.GetLayer(entity);
+      if (layer != null) {
+        int newpos = layer.Entities.IndexOf(entity) - zShift;
+        //if this is the first in the row you cannot move it lower
+        if (newpos >= 0) {
+          layer.Entities.Remove(entity);
+          layer.Entities.Insert(newpos, entity);
+          ReAssignSceneIndex(layer.Entities);
+          Rectangle rec = entity.Rectangle;
+          rec.Inflate(20, 20);
+          this.RaiseOnInvalidateRectangle(Rectangle);
+        }
+      }
+
+      //if (Paintables.Contains(entity))
+      //{
+      //    int newpos = Paintables.IndexOf(entity) - zShift;
+      //    //if this is the first in the row you cannot move it lower
+      //    if (newpos >= 0)
+      //    {
+      //        Paintables.Remove(entity);
+      //        Paintables.Insert(newpos, entity);
+      //        ReAssignSceneIndex(Paintables);
+      //        Rectangle rec = entity.Rectangle;
+      //        rec.Inflate(20, 20);
+      //        this.RaiseOnInvalidateRectangle(Rectangle);
+      //    }
+      //}
+    }
+    /// <summary>
+    /// Sends the entity one level down the z-order stack.
+    /// </summary>
+    /// <param name="entity">The entity.</param>
+    public void SendBackwards(IDiagramEntity entity) {
+      SendBackwards(entity, 1);
+    }
+
+    /// <summary>
+    /// Sends the entity to the top of the z-order stack.
+    /// </summary>
+    /// <param name="entity">The entity.</param>
+    public void SendForwards(IDiagramEntity entity) {
+      SendForwards(entity, 1);
+    }
+    /// <summary>
+    /// Sends the entity up the z-order stack with the specified amount.
+    /// </summary>
+    /// <param name="entity">The entity.</param>
+    /// <param name="zShift">The z shift.</param>
+    public void SendForwards(IDiagramEntity entity, int zShift) {
+      ILayer layer = CurrentPage.GetLayer(entity);
+      if (layer != null) {
+        int newpos = layer.Entities.IndexOf(entity) + zShift;
+        //if this is the last in the row you cannot move it higher
+        if (newpos < layer.Entities.Count) {
+          layer.Entities.Remove(entity);
+          layer.Entities.Insert(newpos, entity); //does it works when this is an addition at the top?
+          ReAssignSceneIndex(layer.Entities);
+          Rectangle rec = entity.Rectangle;
+          rec.Inflate(20, 20);
+          this.RaiseOnInvalidateRectangle(Rectangle);
+        }
+      }
+
+      //if (Paintables.Contains(entity) && zShift>=1)
+      //{
+      //    int newpos = Paintables.IndexOf(entity) + zShift;
+      //    //if this is the last in the row you cannot move it higher
+      //    if (newpos < Paintables.Count)
+      //    {
+      //        Paintables.Remove(entity);
+      //        Paintables.Insert(newpos, entity); //does it works when this is an addition at the top?
+      //        ReAssignSceneIndex(Paintables);
+      //        Rectangle rec = entity.Rectangle;
+      //        rec.Inflate(20, 20);
+      //        this.RaiseOnInvalidateRectangle(Rectangle);
+      //    }
+      //}
+    }
+
+    /// <summary>
+    /// Sends the entity to the front of the z-order stack.
+    /// </summary>
+    /// <param name="entity">The entity.</param>
+    public void SendToFront(IDiagramEntity entity) {
+      ILayer layer = CurrentPage.GetLayer(entity);
+      if (layer != null) {
+        layer.Entities.Remove(entity);
+        layer.Entities.Add(entity);
+        ReAssignSceneIndex(layer.Entities);
+        Rectangle rec = entity.Rectangle;
+        rec.Inflate(20, 20);
+        this.RaiseOnInvalidateRectangle(Rectangle);
+      }
+
+      //if(Paintables.Contains(entity))
+      //{
+      //    Paintables.Remove(entity);
+      //    Paintables.Add(entity);
+      //    ReAssignSceneIndex(Paintables);
+      //    Rectangle rec = entity.Rectangle;
+      //    rec.Inflate(20, 20);
+      //    this.RaiseOnInvalidateRectangle(Rectangle);
+      //}
+    }
+    #endregion
+
+    #region Diagram manipulation actions
+
+    // ------------------------------------------------------------------
+    /// <summary>
+    /// Returns the number of shapes in the current page that are of
+    /// the type specified.
+    /// </summary>
+    /// <param name="type">Type</param>
+    /// <returns>int</returns>
+    // ------------------------------------------------------------------
+    public int NumberOfShapes(Type type) {
+      int count = 0;
+      foreach (IShape shape in Shapes) {
+        if (shape.GetType() == type) {
+          count++;
+        }
+      }
+      return count;
+    }
+
+    // ------------------------------------------------------------------
+    /// <summary>
+    /// Gets the shape at the specified location.  If no shape could be
+    /// found then 'null' is returned.
+    /// </summary>
+    /// <param name="surfacePoint">Point: The location in world 
+    /// coordinates.</param>
+    /// <returns>IShape</returns>
+    // ------------------------------------------------------------------
+    public IShape GetShapeAt(Point surfacePoint) {
+      foreach (IShape shape in this.CurrentPage.Shapes) {
+        if (shape.Hit(surfacePoint)) {
+          return shape;
+        }
+      }
+      return null;
+    }
+
+    // ------------------------------------------------------------------
+    /// <summary>
+    /// Adds an entity to the diagram.  The magnification level for the
+    /// entity is set to the current magnification level of the current 
+    /// page.
+    /// </summary>
+    /// <param name="entity">IDiagramEntity: The entity to add.</param>
+    /// <returns>IDiagramEntity: The added entity.</returns>
+    // ------------------------------------------------------------------
+    public IDiagramEntity AddEntity(IDiagramEntity entity) {
+      SetModel(entity);
+      //By default the new entity is added to the default layer in the 
+      // current page.
+      CurrentPage.DefaultLayer.Entities.Add(entity);
+      entity.Attached(CurrentPage.DefaultLayer);
+      entity.Magnification = CurrentPage.Magnification;
+      return entity;
+    }
+
+    // ------------------------------------------------------------------
+    /// <summary>
+    /// Adds a shape to the diagram
+    /// </summary>
+    /// <param name="shape">IShape: The shape to add.</param>
+    /// <returns>IShape: The added shape.</returns>
+    // ------------------------------------------------------------------
+    public IShape AddShape(IShape shape) {
+
+      SetModel(shape);
+      // By default the new shape is added to the default layer in the 
+      // current page.
+      CurrentPage.DefaultLayer.Entities.Add(shape);
+      shape.Attached(CurrentPage.DefaultLayer);
+      shape.ShowConnectors = this.mShowConnectors;
+      return shape;
+
+    }
+
+    // ------------------------------------------------------------------
+    /// <summary>
+    /// Adds a connection to the diagram
+    /// </summary>
+    /// <param name="connection">a connection</param>
+    // ------------------------------------------------------------------
+    public IConnection AddConnection(IConnection connection) {
+      SetModel(connection);
+      CurrentPage.DefaultLayer.Entities.Add(connection);
+      connection.Attached(CurrentPage.DefaultLayer);
+      return connection;
+    }
+
+    // ------------------------------------------------------------------
+    /// <summary>
+    /// Adds a connection between two shape connectors.        
+    /// </summary>
+    /// <param name="from">From connector.</param>
+    /// <param name="to">To connector.</param>
+    // ------------------------------------------------------------------
+    public IConnection AddConnection(IConnector from, IConnector to) {
+      Connection con = new Connection(from.Point, to.Point);
+      this.AddConnection(con);
+      return con;
+    }
+
+    // ------------------------------------------------------------------
+    /// <summary>
+    /// Sets the model (recursively) on the given entity.
+    /// </summary>
+    /// <param name="entity">The entity.</param>
+    // ------------------------------------------------------------------
+    public void SetModel(IDiagramEntity entity) {
+      if (entity is IConnector) {
+        (entity as IConnector).Model = this;
+      } else if (entity is IConnection) {
+        IConnection con = entity as IConnection;
+        con.Model = this;
+        Debug.Assert(con.From != null, "The 'From' connector is not set.");
+        con.From.Model = this;
+        Debug.Assert(con.From != null, "The 'To' connector is not set.");
+        con.To.Model = this;
+      } else if (entity is IShape) {
+        IShape shape = entity as IShape;
+        shape.Model = this;
+        foreach (IConnector co in shape.Connectors) {
+          co.Model = this;
+        }
+      } else if (entity is IGroup) {
+        IGroup group = entity as IGroup;
+        group.Model = this;
+        foreach (IDiagramEntity child in group.Entities) {
+          SetModel(child);
+        }
+      }
+    }
+
+    // ------------------------------------------------------------------
+    /// <summary>
+    /// Removes the shape from the diagram.
+    /// </summary>
+    /// <param name="shape">The shape.</param>
+    // ------------------------------------------------------------------
+    public void RemoveShape(IShape shape) {
+      //remove it from the layer(s)
+      foreach (IPage page in mPages) {
+        foreach (ILayer layer in page.Layers) {
+          if (layer.Entities.Contains(shape)) {
+            layer.Entities.Remove(shape);
+            shape.Detached(CurrentPage.DefaultLayer);
+          }
+        }
+      }
+
+      // The old way, when there weren't multiple pages and layers.
+      //if (CurrentPage.DefaultLayer.Entities.Contains(shape))
+      //{
+      //    CurrentPage.DefaultLayer.Entities.Remove(shape);
+      //    shape.Detached(CurrentPage.DefaultLayer);
+      //}
+    }
+
+    // ------------------------------------------------------------------
+    /// <summary>
+    /// Removes all entities that are currently selected.
+    /// </summary>
+    /// <param name="entity">The entity.</param>
+    // ------------------------------------------------------------------
+    public void RemoveSelectedItems() {
+      if (this.Selection.SelectedItems.Count < 1) {
+        return;
+      }
+
+      int numberOfItems = this.Selection.SelectedItems.Count;
+      for (int i = 0; i < numberOfItems - 1; i++) {
+        IDiagramEntity entity = Selection.SelectedItems[0];
+        foreach (IPage page in mPages) {
+          foreach (ILayer layer in page.Layers) {
+            if (layer.Entities.Contains(entity)) {
+              layer.Entities.Remove(entity);
+              entity.Detached(DefaultPage.DefaultLayer);
             }
-        }
-
-        public void RaiseOnCursorChange(Cursor cursor)
-        {
-            EventHandler<CursorEventArgs> handler = OnCursorChange;
-            if(handler != null)
-                handler(this, new CursorEventArgs(cursor));
-        }
-
-        /// <summary>
-        /// Raises the on invalidate.
-        /// </summary>
-        public void RaiseOnInvalidate()
-        {
-            if (OnInvalidate != null)
-                OnInvalidate(this, EventArgs.Empty);
-        }
-        /// <summary>
-        /// Raises the OnInvalidateRectangle event.
-        /// </summary>
-        /// <param name="rectangle">The rectangle.</param>
-        public void RaiseOnInvalidateRectangle(Rectangle rectangle)
-        {
-            EventHandler<RectangleEventArgs> handler = OnInvalidateRectangle;
-            if (handler != null)
-            {
-                handler(this, new RectangleEventArgs(rectangle));
-            }
-        }
-        /// <summary>
-        /// Occurs when the bounding region (aka client-rectangle) of the canvas has changed
-        /// </summary>
-        public event EventHandler<RectangleEventArgs> OnRectangleChanged;
-        /// <summary>
-        /// Raises the <see cref="OnRectangleChanged"/> event.
-        /// </summary>
-        /// <param name="e"></param>
-        private void RaiseOnRectangleChanged(RectangleEventArgs e)
-        {
-            EventHandler<RectangleEventArgs> handler = OnRectangleChanged;
-            if (handler != null)
-            {
-                handler(this, e);
-            }
-        }
-        /// <summary>
-        /// Occurs when the diagram info (aka user metadata) has changed
-        /// </summary>
-        public event EventHandler<DiagramInformationEventArgs> OnDiagramInformationChanged;
-        /// <summary>
-        /// Raises the <see cref="OnDiagramInformationChanged"/> event.
-        /// </summary>
-        /// <param name="e"></param>
-        private void RaiseOnDiagramInformationChanged(DiagramInformationEventArgs e)
-        {
-            EventHandler<DiagramInformationEventArgs> handler = OnDiagramInformationChanged;
-            if (handler != null)
-            {
-                handler(this, e);
-            }
-        }
-        
-        /// <summary>
-        /// Occurs when the Ambience has changed
-        /// </summary>
-        public event EventHandler<AmbienceEventArgs> OnAmbienceChanged;
-        /// <summary>
-        /// Raises the <see cref="OnAmbienceChanged"/> event
-        /// </summary>
-        /// <param name="e"></param>
-        private void RaiseOnAmbienceChanged(AmbienceEventArgs e)
-        {
-            EventHandler<AmbienceEventArgs> handler = OnAmbienceChanged;
-            if (handler != null)
-            {
-                handler(this, e);
-            }
-        }
-
-        /// <summary>
-        /// Raises the <see cref="OnEntityAdded"/> event
-        /// </summary>
-        /// <param name="e">The <see cref="T:Netron.Diagramming.Core.EntityEventArgs"/> instance containing the event data.</param>
-        private void RaiseOnEntityAdded(EntityEventArgs e)
-        {
-            EventHandler<EntityEventArgs> handler = OnEntityAdded;
-            if (handler != null)
-            {
-                handler(this, e);
-            }
-        }
-
-        /// <summary>
-        /// Raises the <see cref="OnEntityRemoved"/> event.
-        /// </summary>
-        /// <param name="e">The <see cref="T:Netron.Diagramming.Core.EntityEventArgs"/> instance containing the event data.</param>
-        private void RaiseOnEntityRemoved(EntityEventArgs e)
-        {
-            EventHandler<EntityEventArgs> handler = OnEntityRemoved;
-            if (handler != null)
-            {
-                handler(this, e);
-            }
-        }
-
-        // ------------------------------------------------------------------
-        /// <summary>
-        /// Raises the <see cref="OnCurrentPageChanged"/> event.
-        /// </summary>
-        /// <param name="e">PageEventArgs</param>
-        // ------------------------------------------------------------------
-        protected virtual void RaiseOnCurrentPageChanged(PageEventArgs e)
-        {
-            if (this.OnCurrentPageChanged != null)
-            {
-                OnCurrentPageChanged(this, e);
-            }
-        }
-
-        #endregion
-
-        #region Fields
-
-        // ------------------------------------------------------------------
-        /// <summary>
-        /// Implementation of IVersion - the current version of 
-        /// Model.
-        /// </summary>
-        // ------------------------------------------------------------------
-        protected const double modelVersion = 1.0;
-
-        // ------------------------------------------------------------------
-        /// <summary>
-        /// Specifies if all shape's connectors are shown.
-        /// </summary>
-        // ------------------------------------------------------------------
-        protected bool mShowConnectors = true;
-
-        private GraphicsUnit measurementUnits = GraphicsUnit.Pixel;
-        /// <summary>
-        /// the LayoutRoot field
-        /// </summary>
-        private IShape mLayoutRoot;
-        /// <summary>
-        /// the DefaultPage field
-        /// </summary>
-        [NonSerialized]
-        private IPage mDefaultPage;
-        /// <summary>
-        /// the page collection
-        /// </summary>
-        [NonSerialized]
-        private CollectionBase<IPage> mPages;
-        ///<summary>
-        /// the shapes of the diagram
-        /// </summary>
-        //[NonSerialized]
-        //private CollectionBase<IShape> mShapes;
-        /// <summary>
-        /// the bounding rectangle
-        /// </summary>
-        [NonSerialized]        
-        private Rectangle mRectangle;
-        /// <summary>
-        /// the metadata of the diagram
-        /// </summary>
-        [NonSerialized]
-        private DocumentInformation mInformation;
-      
-        /// <summary>
-        /// the collection of to-be-painted diagram entities
-        /// </summary>
-        //[NonSerialized]
-        //private CollectionBase<IDiagramEntity> Paintables;
-        /// <summary>
-        /// the CurrentPage field
-        /// </summary>
-        [NonSerialized]
-        private IPage mCurrentPage;
-
-        private float mMeasurementScale = 1.0F;
-        #endregion
-
-        #region Properties
-
-        // ------------------------------------------------------------------
-        /// <summary>
-        /// Gets the current version.
-        /// </summary>
-        // ------------------------------------------------------------------
-        public virtual double Version
-        {
-            get
-            {
-                return modelVersion;
-            }
-        }
-
-        private Selection selection;
-        public Selection Selection {
-          get { return this.selection; }
-          set { this.selection = value; }
-        }
-
-        // ------------------------------------------------------------------
-        /// <summary>
-        /// Specifies if all shape's connectors are shown.
-        /// </summary>
-        // ------------------------------------------------------------------
-        public bool ShowConnectors
-        {
-            get
-            {
-                return this.mShowConnectors;
-            }
-            set
-            {
-                this.mShowConnectors = value;
-                foreach (IPage page in this.mPages)
+          }
+        }
+      }
+    }
+
+    // ------------------------------------------------------------------
+    /// <summary>
+    /// Removes the specified entity.
+    /// </summary>
+    /// <param name="entity">The entity.</param>
+    // ------------------------------------------------------------------
+    public void Remove(IDiagramEntity entity) {
+      if (CurrentPage.DefaultLayer.Entities.Contains(entity)) {
+        CurrentPage.DefaultLayer.Entities.Remove(entity);
+        entity.Detached(CurrentPage.DefaultLayer);
+      }
+    }
+
+    // ------------------------------------------------------------------
+    /// <summary>
+    /// Adds a collection of entities to the diagram
+    /// </summary>
+    /// <param name="collection">The collection.</param>
+    // ------------------------------------------------------------------
+    public void AddEntities(CollectionBase<IDiagramEntity> collection) {
+      foreach (IDiagramEntity entity in collection) {
+        SetModel(entity);
+        CurrentPage.DefaultLayer.Entities.Add(entity);
+        entity.Attached(CurrentPage.DefaultLayer);
+      }
+    }
+
+    // ------------------------------------------------------------------
+    /// <summary>
+    /// Unwraps an entity
+    /// <list type="bullet">
+    /// <term>Uid</term><description>Generates a new <see cref="IDiagramEntity.Uid"/> for the entity. </description>
+    /// <tem>Model</tem><description>Assigns the Model property to the entity.</description>
+    /// 
+    /// </list>
+    /// </summary>
+    // ------------------------------------------------------------------
+    public void Unwrap(IDiagramEntity entity) {
+      //set a new unique identifier for this copied object
+      entity.NewUid(true);
+      //this assignment will be recursive if needed
+      SetModel(entity);
+      CurrentPage.DefaultLayer.Entities.Add(entity);
+      entity.Attached(CurrentPage.DefaultLayer);
+
+    }
+
+    // ------------------------------------------------------------------
+    /// <summary>
+    /// Unwraps the specified collection.
+    /// </summary>
+    /// <param name="collection">The collection.</param>
+    // ------------------------------------------------------------------
+    public void Unwrap(CollectionBase<IDiagramEntity> collection) {
+      if (collection == null)
+        return;
+      foreach (IDiagramEntity entity in collection) {
+        Unwrap(entity);
+      }
+      //reconnect the connectors, just like the deserialization of a filed diagram
+      Dictionary<Guid, Anchor>.Enumerator enumer = Anchors.GetEnumerator();
+      System.Collections.Generic.KeyValuePair<Guid, Anchor> pair;
+      Anchor anchor;
+      while (enumer.MoveNext()) {
+        pair = enumer.Current;
+        anchor = pair.Value;
+        if (anchor.Parent != Guid.Empty) //there's a parent connector
                 {
-                    foreach (IShape shape in page.Shapes)
-                    {
-                        shape.ShowConnectors = this.mShowConnectors;
-                    }
-                }
-            }
-        }
-
-        [Browsable(true)]
-        [Description("Scaling value for logical units.")]
-        public float MeasurementScale
-        {
-            get
-            {
-                return mMeasurementScale;
-            }
-
-            set
-            {
-                mMeasurementScale = value;
-            }
-        }
-
-        [BrowsableAttribute(true)]
-        [Description("Logical unit of measurement")]
-        public  GraphicsUnit MeasurementUnits
-        {
-            get
-            {
-                return measurementUnits;
-            }
-
-            set
-            {
-                measurementUnits = value;
-            }
-        }
-
-        // ------------------------------------------------------------------
-        /// <summary>
-        /// Gets or sets the LayoutRoot
-        /// </summary>
-        // ------------------------------------------------------------------
-        public IShape LayoutRoot
-        {
-            get { return mLayoutRoot; }
-            set { mLayoutRoot = value; 
-                
-            }
-        }
-
-        // ------------------------------------------------------------------        
-        /// <summary>
-        /// Gets the current page.  Use 'SetCurrentPage(IPage page)' or
-        /// 'SetCurrentPage(int index)' to set the current page.
-        /// </summary>
-        // ------------------------------------------------------------------
-        public IPage CurrentPage
-        {
-            get { return mCurrentPage; }
-        }
-
-        // ------------------------------------------------------------------
-        /// <summary>
-        /// Gets the paintables.
-        /// </summary>
-        /// <value>The paintables.</value>
-        // ------------------------------------------------------------------
-        public CollectionBase<IDiagramEntity> Paintables
-        {
-            get 
-            { 
-                return mCurrentPage.Entities; 
-            }
-        }
-
-        // ------------------------------------------------------------------
-        /// <summary>
-        /// Gets the pages of the diagram control.  Use method 'AddPage' to
-        /// add a page so the page gets attached to this Model.
-        /// </summary>
-        /// <value>The pages.</value>
-        // ------------------------------------------------------------------
-        public CollectionBase<IPage> Pages
-        {
-            get { return mPages; }
-        }
-
-        // ------------------------------------------------------------------
-        /// <summary>
-        /// Gets or sets the default page
-        /// </summary>
-        // ------------------------------------------------------------------
-        public  IPage DefaultPage
-        {
-            get { return mDefaultPage; }
-            set { mDefaultPage = value; }
-        }
-
-        // ------------------------------------------------------------------
-        /// <summary>
-        /// Gets the shapes of the current page.
-        /// </summary>
-        // ------------------------------------------------------------------
-        public CollectionBase<IShape> Shapes
-        {
-            get
-            {
-                return CurrentPage.Shapes;
-                //return mShapes;
-            }
-            //internal set
-            //{
-            //    mShapes = value;
-            //}
-        }
-
-        // ------------------------------------------------------------------
-        /// <summary>
-        /// Gets or sets the information of the diagram
-        /// </summary>
-        // ------------------------------------------------------------------
-        internal DocumentInformation Information
-        {
-            get
-            {
-                return mInformation;
-            }
-            set
-            {
-                mInformation = value;
-            }
-        }
-
-        // ------------------------------------------------------------------
-        /// <summary>
-        /// Gets the bounding rectangle of the diagram (client rectangle)
-        /// </summary>
-        // ------------------------------------------------------------------
-        public Rectangle Rectangle
-        {
-            get
-            {
-                return mRectangle;
-            }
-            set
-            {
-                mRectangle = value;
-                RaiseOnRectangleChanged(new RectangleEventArgs(value));
-            }
-        }
-
-        // ------------------------------------------------------------------
-        /// <summary>
-        /// Gets the horizontal coordinate of the diagram
-        /// </summary>
-        // ------------------------------------------------------------------
-        public float X
-        {
-            get
-            {
-                return mRectangle.X;
-            }            
-        }
-
-        // ------------------------------------------------------------------
-        /// <summary>
-        /// Gets the verticle coordinate of the diagram
-        /// </summary>
-        // ------------------------------------------------------------------
-        public float Y
-        {
-            get
-            {
-                return mRectangle.Y;
-            }
-            
-        }
-
-        // ------------------------------------------------------------------
-        /// <summary>
-        /// Gets the width of the diagram
-        /// </summary>
-        // ------------------------------------------------------------------
-        public float Width
-        {
-            get
-            {
-                return mRectangle.Width;
-            }
-        }
-
-        // ------------------------------------------------------------------
-        /// <summary>
-        /// Gets the height of the diagram
-        /// </summary>
-        // ------------------------------------------------------------------
-        public float Height
-        {
-            get
-            {
-                return mRectangle.Height;
-            }            
-        }
-
-        // ------------------------------------------------------------------
-        /// <summary>
-        /// Gets or sets the collection of connections
-        /// </summary>
-        // ------------------------------------------------------------------
-        public CollectionBase<IConnection> Connections
-        {
-            get
-            {
-              return CurrentPage.Connections;
-            }
-
-        } 
-        #endregion
-
-        #region Constructor
-
-        // ------------------------------------------------------------------
-        /// <summary>
-        /// Default constructor
-        /// </summary>
-        // ------------------------------------------------------------------
-        public Model()
-        {
-            //here I'll have to work on the scene graph
-            //this.mShapes = new CollectionBase<IShape>();
-            //the default page
-            
-            //the page collection
-            mPages = new CollectionBase<IPage>();
-            Page p = new Page("Default Page", this);
-            p.Ambience.PageColor = ArtPalette.DefaultPageColor;
-            mPages.Add(p);
-
-            Init();
-        }
-
-        #endregion
-
-        // ------------------------------------------------------------------
-        /// <summary>
-        /// Initializes this object
-        /// <remarks>See also the <see cref="OnDeserialized"/> event for 
-        /// post-deserialization actions to which this method is related.
-        /// </remarks>
-        /// </summary>
-        // ------------------------------------------------------------------
-        private void Init()
-        {
-            if (mPages == null)
-            {
-                throw new InconsistencyException(
-                    "The page collection is 'null'.");
-            }
-            if (mPages.Count == 0)
-            {
-                throw new InconsistencyException(
-                    "The page collection should contain at least one page.");
-            }
-
-            foreach(IPage page in mPages)
-                AttachToPage(page);
-            mDefaultPage = mPages[0];            
-            // Initially the current page is the zero-th page in the 
-            // collection.
-            SetCurrentPage(0);
-        }
-
-        // ------------------------------------------------------------------
-        /// <summary>
-        /// Adds a page.  This should be used when adding pages rather than
-        /// though the Pages property so the page gets attached to the Model.
-        /// </summary>
-        /// <param name="page">IPage: The page to add.</param>
-        /// <returns>IPage</returns>
-        // ------------------------------------------------------------------
-        public IPage AddPage(IPage page)
-        {
-            mPages.Add(page);
-            AttachToPage(page);
-            return page;
-        }
-
-        // ------------------------------------------------------------------
-        /// <summary>
-        /// Adds a page.  This should be used when adding pages rather than
-        /// though the Pages property so the page gets attached to the Model.
-        /// The page name is set to "Page" plus the new number of pages.
-        /// For example, if there are currently two pages, then "Page3" is 
-        /// set as the new page name.
-        /// </summary>
-        /// <returns>IPage</returns>
-        // ------------------------------------------------------------------
-        public IPage AddPage()
-        {
-            string pageName = this.GetDefaultNewPageName();
-            Page page = new Page(pageName, this);
-            return AddPage(page);
-        }
-
-        // ------------------------------------------------------------------
-        /// <summary>
-        /// Deletes the page specified if it is not the default page.
-        /// </summary>
-        /// <param name="page">IPage: The page to remove.</param>
-        /// <param name="allowWarnings">bool: Specifies if the user should
-        /// be given the option to cancel the action if the current page
-        /// has entities.  Also, when set to true, if the current page is
-        /// the default page, then a message box is shown informing the
-        /// user that the default page cannot be deleted.</param>
-        /// <returns>bool: If the delete was successful.  True is returned
-        /// if the current page was removed.</returns>
-        // ------------------------------------------------------------------
-        public bool RemovePage(IPage page, bool allowWarnings)
-        {
-            if (page == this.DefaultPage)
-            {
-                if (allowWarnings)
-                {
-                    MessageBox.Show(
-                    "The default page cannot be deleted.",
-                    "Delete Page Error",
-                    MessageBoxButtons.OK,
-                    MessageBoxIcon.Error);
-                }
-                return false;
-            }
-
-            int pageIndex = 0;
-            int newCurrentPageIndex = 0;
-
-            // Ask the user if they really want to remove the page if
-            // it has entities if 'allowWarnings' is true.
-            if ((allowWarnings) && (page.Entities.Count > 0))
-            {
-                if (MessageBox.Show(
-                    "Are you sure you want to delete this page?",
-                    "Confirm Delete",
-                    MessageBoxButtons.YesNo,
-                    MessageBoxIcon.Question,
-                    MessageBoxDefaultButton.Button1) == DialogResult.No)
-                {
-                    return false;
-                }
-            }
-
-            // Now we can continue with deleting the page.
-            // If the page specified is the current page, then we need to set
-            // the current page to another page.  Let's use the previous one 
-            // in the list.  
-            if (page == CurrentPage)
-            {
-                pageIndex = Pages.IndexOf(page);
-
-                if (pageIndex > 0)
-                {
-                    newCurrentPageIndex = pageIndex - 1;
-                }
-                SetCurrentPage(newCurrentPageIndex);
-            }
-
-            Pages.Remove(page);
-            return true;
-        }
-
-        // ------------------------------------------------------------------
-        /// <summary>
-        /// Returns a new page name that's unique from all the others.
-        /// </summary>
-        /// <returns>string: Returns "Page" plus the number of pages IF A
-        /// NEW PAGE WERE ADDED.  For example, if there are currently two
-        /// pages, then "Page3" is returned.</returns>
-        // ------------------------------------------------------------------
-        public string GetDefaultNewPageName()
-        {
-            string name = "Page" + (Pages.Count + 1).ToString();
-            return name;
-        }
-
-        // ------------------------------------------------------------------
-        /// <summary>
-        /// Sets the current page.
-        /// </summary>
-        /// <param name="page">The page.</param>
-        // ------------------------------------------------------------------
-        public void SetCurrentPage(IPage page)
-        {
-            mCurrentPage = page;
-            RaiseOnAmbienceChanged(new AmbienceEventArgs(page.Ambience));
-            RaiseOnCurrentPageChanged(new PageEventArgs(page));
-
-            //change the paintables as well            
-            //Paintables = new CollectionBase<IDiagramEntity>();
-
-            #region Reload of the z-order, usually only necessary after deserialization
-
-            CollectionBase<IDiagramEntity> collected = new CollectionBase<IDiagramEntity>();
-            //pick up the non-group entities
-            foreach (IDiagramEntity entity in Paintables)
-                if (!typeof(IGroup).IsInstanceOfType(entity))
-                    collected.Add(entity);
-
-            if (collected.Count > 0)
-            {
-                Algorithms.SortInPlace<IDiagramEntity>(collected, new SceneIndexComparer<IDiagramEntity>());
-                //Paintables.AddRange(collected);
-            }
-            #endregion           
-                
-        }
-
-        // ------------------------------------------------------------------
-        /// <summary>
-        /// Sets the current page.
-        /// </summary>
-        /// <param name="pageIndex">Index of the page.</param>
-        // ------------------------------------------------------------------
-        public void SetCurrentPage(int pageIndex)
-        {
-            if (mPages == null ||
-                mPages.Count == 0 ||
-                pageIndex >= mPages.Count ||
-                pageIndex < 0)
-            {
-                throw new IndexOutOfRangeException(
-                    "The page index is outside the page range.");
-            }
-            SetCurrentPage(mPages[pageIndex]);
-        }
-
-        // ------------------------------------------------------------------
-        /// <summary>
-        /// Attaches this model to the page specified.  The Model property for
-        /// the page is set and the IPage events needed by this are registered
-        /// for here (OnEntityAdded, OnEntityRemoved, OnClear, and 
-        /// OnAmbienceChanged).
-        /// </summary>
-        /// <param name="page">IPage: The page to attach this model to.</param>
-        // ------------------------------------------------------------------
-        private void AttachToPage(IPage page)
-        {
-            page.OnEntityAdded += new EventHandler<EntityEventArgs>(mDefaultPage_OnEntityAdded);
-            page.OnEntityRemoved += new EventHandler<EntityEventArgs>(mDefaultPage_OnEntityRemoved);
-            page.OnClear += new EventHandler(mDefaultPage_OnClear);
-            page.OnAmbienceChanged += new EventHandler<AmbienceEventArgs>(mDefaultPage_OnAmbienceChanged);
-            page.Model = this;
-        }
-
-        void mDefaultPage_OnAmbienceChanged(object sender, AmbienceEventArgs e)
-        {
-            RaiseOnAmbienceChanged(e);
-        }
-
-        #region Paintables transfers on Page changes
-
-        // ------------------------------------------------------------------
-        /// <summary>
-        /// Handles the OnClear event of the DefaultPage.
-        /// </summary>
-        /// <param name="sender">The source of the event.</param>
-        /// <param name="e">The <see cref="T:System.EventArgs"/> instance 
-        /// containing the event data.</param>
-        // ------------------------------------------------------------------
-        void mDefaultPage_OnClear(object sender, EventArgs e)
-        {
-            Paintables.Clear();
-        }
-
-        // ------------------------------------------------------------------
-        /// <summary>
-        /// Handles the OnEntityRemoved event of the DefaultPage.
-        /// </summary>
-        /// <param name="sender">The source of the event.</param>
-        /// <param name="e">The 
-        /// <see cref="T:Netron.Diagramming.Core.EntityEventArgs"/> instance 
-        /// containing the event data.</param>
-        // ------------------------------------------------------------------
-        void mDefaultPage_OnEntityRemoved(object sender, EntityEventArgs e)
-        {
-            if(Paintables.Contains(e.Entity))
-            {
-                //shift the entities above the one to be removed
-                int index = e.Entity.SceneIndex;
-                foreach(IDiagramEntity entity in Paintables)
-                {
-                    if(entity.SceneIndex > index)
-                        entity.SceneIndex--;
-                }
-                Paintables.Remove(e.Entity);
-            }
-            //if the selection contains the shape we have to remove it from the selection
-            if (Selection.SelectedItems.Contains(e.Entity))
-            {
-                Selection.SelectedItems.Remove(e.Entity);               
-            }
-            RaiseOnEntityRemoved(e);
-        }
-
-        // ------------------------------------------------------------------
-        /// <summary>
-        /// Handles the OnEntityAdded event of the Page and adds the new 
-        /// entity to the Paintables.
-        /// </summary>
-        /// <param name="sender">The source of the event.</param>
-        /// <param name="e">The 
-        /// <see cref="T:Netron.Diagramming.Core.EntityEventArgs"/> instance 
-        /// containing the event data.</param>
-        // ------------------------------------------------------------------
-        void mDefaultPage_OnEntityAdded(object sender, EntityEventArgs e)
-        {
-            //don't add it if it's already there or if it's a group (unless you want to deploy something special to emphasize a group shape).
-            if (!Paintables.Contains(e.Entity) )
-            {
-                if ((e.Entity is IGroup) && !(e.Entity as IGroup).EmphasizeGroup)
-                {
-                    return;
-                }
-                //set the new entity on top of the stack
-                e.Entity.SceneIndex = Paintables.Count;
-                Paintables.Add(e.Entity);
-            }
-            #region Addition callback
-            IAdditionCallback callback = e.Entity.GetService(typeof(IAdditionCallback)) as IAdditionCallback;
-            if (callback != null)
-                callback.OnAddition();
-            #endregion
-            RaiseOnEntityAdded(e);
-        }
-        #endregion
-
-        #region Methods
-
-        #region Ordering methods
-        /// <summary>
-        /// Re-sets the scene-index of the paintables
-        /// </summary>
-        private void ReAssignSceneIndex(CollectionBase<IDiagramEntity> entities)
-        {
-            for (int i = 0; i < entities.Count; i++)
-            {
-                entities[i].SceneIndex = i;
-            }
-        }
-        /// <summary>
-        /// Sends to entity to the bottom of the z-order stack.
-        /// </summary>
-        /// <param name="entity">The entity.</param>
-        public void SendToBack(IDiagramEntity entity)
-        {
-            ILayer layer = CurrentPage.GetLayer(entity);
-            if (layer != null)
-            {
-                layer.Entities.Remove(entity);
-                layer.Entities.Insert(0, entity);
-                ReAssignSceneIndex(layer.Entities);
-                Rectangle rec = entity.Rectangle;
-                rec.Inflate(20, 20);
-                this.RaiseOnInvalidateRectangle(Rectangle);
-            }
-            //if(Paintables.Contains(entity))
-            //{
-            //    Paintables.Remove(entity);
-            //    Paintables.Insert(0, entity);
-            //    ReAssignSceneIndex();
-            //    Rectangle rec = entity.Rectangle;
-            //    rec.Inflate(20, 20);
-            //    this.RaiseOnInvalidateRectangle(Rectangle);
-            //}
-        }
-
-        /// <summary>
-        /// Sends the entity down the z-order stack with the specified amount.
-        /// </summary>
-        /// <param name="entity">The entity.</param>
-        /// <param name="zShift">The z shift.</param>
-        public void SendBackwards(IDiagramEntity entity, int zShift)
-        {
-            ILayer layer = CurrentPage.GetLayer(entity);
-            if (layer != null)
-            {
-                int newpos = layer.Entities.IndexOf(entity) - zShift;
-                //if this is the first in the row you cannot move it lower
-                if (newpos >= 0)
-                {
-                    layer.Entities.Remove(entity);
-                    layer.Entities.Insert(newpos, entity);
-                    ReAssignSceneIndex(layer.Entities);
-                    Rectangle rec = entity.Rectangle;
-                    rec.Inflate(20, 20);
-                    this.RaiseOnInvalidateRectangle(Rectangle);
-                }
-            }
-
-            //if (Paintables.Contains(entity))
-            //{
-            //    int newpos = Paintables.IndexOf(entity) - zShift;
-            //    //if this is the first in the row you cannot move it lower
-            //    if (newpos >= 0)
-            //    {
-            //        Paintables.Remove(entity);
-            //        Paintables.Insert(newpos, entity);
-            //        ReAssignSceneIndex(Paintables);
-            //        Rectangle rec = entity.Rectangle;
-            //        rec.Inflate(20, 20);
-            //        this.RaiseOnInvalidateRectangle(Rectangle);
-            //    }
-            //}
-        }
-        /// <summary>
-        /// Sends the entity one level down the z-order stack.
-        /// </summary>
-        /// <param name="entity">The entity.</param>
-        public void SendBackwards(IDiagramEntity entity)
-        {
-            SendBackwards(entity, 1);
-        }
-
-        /// <summary>
-        /// Sends the entity to the top of the z-order stack.
-        /// </summary>
-        /// <param name="entity">The entity.</param>
-        public void SendForwards(IDiagramEntity entity)
-        {
-            SendForwards(entity, 1);
-        }
-        /// <summary>
-        /// Sends the entity up the z-order stack with the specified amount.
-        /// </summary>
-        /// <param name="entity">The entity.</param>
-        /// <param name="zShift">The z shift.</param>
-        public void SendForwards(IDiagramEntity entity, int zShift)
-        {
-            ILayer layer = CurrentPage.GetLayer(entity);
-            if (layer != null)
-            {
-                int newpos = layer.Entities.IndexOf(entity) + zShift;
-                //if this is the last in the row you cannot move it higher
-                if (newpos < layer.Entities.Count)
-                {
-                    layer.Entities.Remove(entity);
-                    layer.Entities.Insert(newpos, entity); //does it works when this is an addition at the top?
-                    ReAssignSceneIndex(layer.Entities);
-                    Rectangle rec = entity.Rectangle;
-                    rec.Inflate(20, 20);
-                    this.RaiseOnInvalidateRectangle(Rectangle);
-                }
-            }
-
-            //if (Paintables.Contains(entity) && zShift>=1)
-            //{
-            //    int newpos = Paintables.IndexOf(entity) + zShift;
-            //    //if this is the last in the row you cannot move it higher
-            //    if (newpos < Paintables.Count)
-            //    {
-            //        Paintables.Remove(entity);
-            //        Paintables.Insert(newpos, entity); //does it works when this is an addition at the top?
-            //        ReAssignSceneIndex(Paintables);
-            //        Rectangle rec = entity.Rectangle;
-            //        rec.Inflate(20, 20);
-            //        this.RaiseOnInvalidateRectangle(Rectangle);
-            //    }
-            //}
-        }
-
-        /// <summary>
-        /// Sends the entity to the front of the z-order stack.
-        /// </summary>
-        /// <param name="entity">The entity.</param>
-        public void SendToFront(IDiagramEntity entity)
-        {
-            ILayer layer = CurrentPage.GetLayer(entity);
-            if (layer != null)
-            {
-                layer.Entities.Remove(entity);
-                layer.Entities.Add(entity);
-                ReAssignSceneIndex(layer.Entities);
-                Rectangle rec = entity.Rectangle;
-                rec.Inflate(20, 20);
-                this.RaiseOnInvalidateRectangle(Rectangle);
-            }
-
-            //if(Paintables.Contains(entity))
-            //{
-            //    Paintables.Remove(entity);
-            //    Paintables.Add(entity);
-            //    ReAssignSceneIndex(Paintables);
-            //    Rectangle rec = entity.Rectangle;
-            //    rec.Inflate(20, 20);
-            //    this.RaiseOnInvalidateRectangle(Rectangle);
-            //}
-        }
-        #endregion
-
-        #region Diagram manipulation actions
-
-        // ------------------------------------------------------------------
-        /// <summary>
-        /// Returns the number of shapes in the current page that are of
-        /// the type specified.
-        /// </summary>
-        /// <param name="type">Type</param>
-        /// <returns>int</returns>
-        // ------------------------------------------------------------------
-        public int NumberOfShapes(Type type)
-        {
-            int count = 0;
-            foreach (IShape shape in Shapes)
-            {
-                if (shape.GetType() == type)
-                {
-                    count++;
-                }
-            }
-            return count;
-        }
-
-        // ------------------------------------------------------------------
-        /// <summary>
-        /// Gets the shape at the specified location.  If no shape could be
-        /// found then 'null' is returned.
-        /// </summary>
-        /// <param name="surfacePoint">Point: The location in world 
-        /// coordinates.</param>
-        /// <returns>IShape</returns>
-        // ------------------------------------------------------------------
-        public IShape GetShapeAt(Point surfacePoint)
-        {
-            foreach (IShape shape in this.CurrentPage.Shapes)
-            {
-                if (shape.Hit(surfacePoint))
-                {
-                    return shape;
-                }
-            }
-            return null;
-        }
-
-        // ------------------------------------------------------------------
-        /// <summary>
-        /// Adds an entity to the diagram.  The magnification level for the
-        /// entity is set to the current magnification level of the current 
-        /// page.
-        /// </summary>
-        /// <param name="entity">IDiagramEntity: The entity to add.</param>
-        /// <returns>IDiagramEntity: The added entity.</returns>
-        // ------------------------------------------------------------------
-        public IDiagramEntity AddEntity(IDiagramEntity entity)
-        {
-            SetModel(entity);
-            //By default the new entity is added to the default layer in the 
-            // current page.
-            CurrentPage.DefaultLayer.Entities.Add(entity);
-            entity.Attached(CurrentPage.DefaultLayer);
-            entity.Magnification = CurrentPage.Magnification;
-            return entity;
-        }
-
-        // ------------------------------------------------------------------
-        /// <summary>
-        /// Adds a shape to the diagram
-        /// </summary>
-        /// <param name="shape">IShape: The shape to add.</param>
-        /// <returns>IShape: The added shape.</returns>
-        // ------------------------------------------------------------------
-        public IShape AddShape(IShape shape)
-        {
-           
-            SetModel(shape);
-            // By default the new shape is added to the default layer in the 
-            // current page.
-            CurrentPage.DefaultLayer.Entities.Add(shape);
-            shape.Attached(CurrentPage.DefaultLayer);
-            shape.ShowConnectors = this.mShowConnectors;
-            return shape;
-            
-        }
-
-        // ------------------------------------------------------------------
-        /// <summary>
-        /// Adds a connection to the diagram
-        /// </summary>
-        /// <param name="connection">a connection</param>
-        // ------------------------------------------------------------------
-        public IConnection AddConnection(IConnection connection)
-        {
-            SetModel(connection);
-            CurrentPage.DefaultLayer.Entities.Add(connection);
-            connection.Attached(CurrentPage.DefaultLayer);
-            return connection;
-        }
-
-        // ------------------------------------------------------------------
-        /// <summary>
-        /// Adds a connection between two shape connectors.        
-        /// </summary>
-        /// <param name="from">From connector.</param>
-        /// <param name="to">To connector.</param>
-        // ------------------------------------------------------------------
-        public IConnection AddConnection(IConnector from, IConnector to)
-        {
-            Connection con = new Connection(from.Point, to.Point);
-            this.AddConnection(con);
-            return con;
-        }
-
-        // ------------------------------------------------------------------
-        /// <summary>
-        /// Sets the model (recursively) on the given entity.
-        /// </summary>
-        /// <param name="entity">The entity.</param>
-        // ------------------------------------------------------------------
-        public void SetModel(IDiagramEntity entity)
-        {
-            if(entity is IConnector)
-            {
-                (entity as IConnector).Model = this;
-            }
-            else if(entity is IConnection)
-            {
-                IConnection con = entity as IConnection;
-                con.Model = this;
-                Debug.Assert(con.From != null, "The 'From' connector is not set.");
-                con.From.Model = this;
-                Debug.Assert(con.From != null, "The 'To' connector is not set.");
-                con.To.Model = this;
-            }
-            else if(entity is IShape)
-            {
-                IShape shape = entity as IShape;
-                shape.Model = this;
-                foreach(IConnector co in shape.Connectors)
-                {
-                    co.Model = this;
-                }
-            }
-            else if (entity is IGroup)
-            {
-                IGroup group = entity as IGroup;
-                group.Model = this;
-                foreach (IDiagramEntity child in group.Entities)
-                {
-                    SetModel(child);
-                }
-            }
-        }
-
-        // ------------------------------------------------------------------
-        /// <summary>
-        /// Removes the shape from the diagram.
-        /// </summary>
-        /// <param name="shape">The shape.</param>
-        // ------------------------------------------------------------------
-        public void RemoveShape(IShape shape)
-        {            
-            //remove it from the layer(s)
-            foreach (IPage page in mPages)
-            {
-                foreach (ILayer layer in page.Layers)
-                {
-                    if (layer.Entities.Contains(shape))
-                    {
-                        layer.Entities.Remove(shape);
-                        shape.Detached(CurrentPage.DefaultLayer);                        
-                    }
-                }
-            }
-
-            // The old way, when there weren't multiple pages and layers.
-            //if (CurrentPage.DefaultLayer.Entities.Contains(shape))
-            //{
-            //    CurrentPage.DefaultLayer.Entities.Remove(shape);
-            //    shape.Detached(CurrentPage.DefaultLayer);
-            //}
-        }
-
-        // ------------------------------------------------------------------
-        /// <summary>
-        /// Removes all entities that are currently selected.
-        /// </summary>
-        /// <param name="entity">The entity.</param>
-        // ------------------------------------------------------------------
-        public void RemoveSelectedItems()
-        {
-            if (this.Selection.SelectedItems.Count < 1)
-            {
-                return;
-            }
-
-            int numberOfItems = this.Selection.SelectedItems.Count;
-            for (int i = 0; i < numberOfItems - 1; i++)
-            {
-                IDiagramEntity entity = Selection.SelectedItems[0];
-                foreach (IPage page in mPages)
-                {
-                    foreach (ILayer layer in page.Layers)
-                    {
-                        if (layer.Entities.Contains(entity))
-                        {
-                            layer.Entities.Remove(entity);
-                            entity.Detached(DefaultPage.DefaultLayer);
-                        }
-                    }
-                }
-            }
-        }
-
-        // ------------------------------------------------------------------
-        /// <summary>
-        /// Removes the specified entity.
-        /// </summary>
-        /// <param name="entity">The entity.</param>
-        // ------------------------------------------------------------------
-        public void Remove(IDiagramEntity entity)
-        {
-            if (CurrentPage.DefaultLayer.Entities.Contains(entity))
-            {
-                CurrentPage.DefaultLayer.Entities.Remove(entity);
-                entity.Detached(CurrentPage.DefaultLayer);
-            }
-        }
-
-        // ------------------------------------------------------------------
-        /// <summary>
-        /// Adds a collection of entities to the diagram
-        /// </summary>
-        /// <param name="collection">The collection.</param>
-        // ------------------------------------------------------------------
-        public void AddEntities(CollectionBase<IDiagramEntity> collection)
-        {
-            foreach (IDiagramEntity entity in collection)
-            {
-                SetModel(entity);
-                CurrentPage.DefaultLayer.Entities.Add(entity);
-                entity.Attached(CurrentPage.DefaultLayer);                
-            }
-        }
-
-        // ------------------------------------------------------------------
-        /// <summary>
-        /// Unwraps an entity
-        /// <list type="bullet">
-        /// <term>Uid</term><description>Generates a new <see cref="IDiagramEntity.Uid"/> for the entity. </description>
-        /// <tem>Model</tem><description>Assigns the Model property to the entity.</description>
-        /// 
-        /// </list>
-        /// </summary>
-        // ------------------------------------------------------------------
-        public void Unwrap(IDiagramEntity entity)
-        {
-            //set a new unique identifier for this copied object
-            entity.NewUid(true);
-            //this assignment will be recursive if needed
-            SetModel(entity);
-            CurrentPage.DefaultLayer.Entities.Add(entity);
-            entity.Attached(CurrentPage.DefaultLayer);
-            
-        }
-
-        // ------------------------------------------------------------------
-        /// <summary>
-        /// Unwraps the specified collection.
-        /// </summary>
-        /// <param name="collection">The collection.</param>
-        // ------------------------------------------------------------------
-        public void Unwrap(CollectionBase<IDiagramEntity> collection)
-        {
-            if (collection == null)
-                return;
-            foreach (IDiagramEntity entity in collection)
-            {
-                Unwrap(entity);
-            }
-            //reconnect the connectors, just like the deserialization of a filed diagram
-            Dictionary<Guid, Anchor>.Enumerator enumer = Anchors.GetEnumerator();
-            System.Collections.Generic.KeyValuePair<Guid, Anchor> pair;
-            Anchor anchor;
-            while (enumer.MoveNext())
-            {
-                pair = enumer.Current;
-                anchor = pair.Value;
-                if (anchor.Parent != Guid.Empty) //there's a parent connector
-                {
-                    if (Anchors.ContainsKey(anchor.Parent))
-                    {
-                        Anchors.GetAnchor(anchor.Parent).Instance.AttachConnector(anchor.Instance);
-                    }
-                }
-            }
-            //clean up the anchoring matrix
-            Anchors.Clear();
-        }
-
-        // ------------------------------------------------------------------
-        /// <summary>
-        /// Clears the current page.
-        /// </summary>
-        // ------------------------------------------------------------------
-        public void Clear()
-        {
-            //clear the scene-graph
-            this.CurrentPage.DefaultLayer.Entities.Clear();
-        }
-        #endregion
-     
-        #endregion
-
-        #region Standard IDispose implementation
-
-        // ------------------------------------------------------------------
-        /// <summary>
-        /// Disposes the view.
-        /// </summary>
-        // ------------------------------------------------------------------
-        public void Dispose()
-        {
-            Dispose(true);
-            GC.SuppressFinalize(this);
-        }
-
-        // ------------------------------------------------------------------
-        /// <summary>
-        /// Disposes the view.
-        /// </summary>
-        /// <param name="disposing">if set to <c>true</c> [disposing].</param>
-        // ------------------------------------------------------------------
-        private void Dispose(bool disposing)
-        {
-            if (disposing)
-            {
-                
-            }
-
-        }
-
-        #endregion
-    }
+          if (Anchors.ContainsKey(anchor.Parent)) {
+            Anchors.GetAnchor(anchor.Parent).Instance.AttachConnector(anchor.Instance);
+          }
+        }
+      }
+      //clean up the anchoring matrix
+      Anchors.Clear();
+    }
+
+    // ------------------------------------------------------------------
+    /// <summary>
+    /// Clears the current page.
+    /// </summary>
+    // ------------------------------------------------------------------
+    public void Clear() {
+      //clear the scene-graph
+      this.CurrentPage.DefaultLayer.Entities.Clear();
+    }
+    #endregion
+
+    #endregion
+
+    #region Standard IDispose implementation
+
+    // ------------------------------------------------------------------
+    /// <summary>
+    /// Disposes the view.
+    /// </summary>
+    // ------------------------------------------------------------------
+    public void Dispose() {
+      Dispose(true);
+      GC.SuppressFinalize(this);
+    }
+
+    // ------------------------------------------------------------------
+    /// <summary>
+    /// Disposes the view.
+    /// </summary>
+    /// <param name="disposing">if set to <c>true</c> [disposing].</param>
+    // ------------------------------------------------------------------
+    private void Dispose(bool disposing) {
+      if (disposing) {
+
+      }
+
+    }
+
+    #endregion
+  }
 }
Index: /trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.Netron/3.0.2672.12446/Netron.Diagramming.Core-3.0.2672.12446/Core/Scene graph/Page.cs
===================================================================
--- /trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.Netron/3.0.2672.12446/Netron.Diagramming.Core-3.0.2672.12446/Core/Scene graph/Page.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.Netron/3.0.2672.12446/Netron.Diagramming.Core-3.0.2672.12446/Core/Scene graph/Page.cs	(revision 4068)
@@ -1,519 +1,462 @@
 using System;
 using System.Drawing;
-using System.Collections.Generic;
-using System.Text;
-using System.ComponentModel;
-namespace Netron.Diagramming.Core
-{
-    /// <summary>
-    /// Implementation of the <see cref="IPage"/> interface. The page represents one page the diagram control, pages being usually visualized as tabs in the control.
-    /// 
-    /// </summary>
-    public partial class Page : IPage, IVersion
-    {
-        #region Events
-        /// <summary>
-        /// Occurs when the Ambience has changed
-        /// </summary>
-        public event EventHandler<AmbienceEventArgs> OnAmbienceChanged;
-        /// <summary>
-        /// Occurs when an entity is added.
-        /// <remarks>This event usually is bubbled from one of the layers</remarks>
-        /// </summary>
-        public event EventHandler<EntityEventArgs> OnEntityAdded;
-        /// <summary>
-        /// Occurs when an entity is removed.
-        /// <remarks>This event usually is bubbled from one of the layers</remarks>
-        /// </summary>
-        public event EventHandler<EntityEventArgs> OnEntityRemoved;
-        /// <summary>
-        /// Occurs when the page is cleared
-        /// </summary>
-        public event EventHandler OnClear;
-        /// <summary>
-        /// Occurs before an entity is transformed
-        /// </summary>
-        //public event EventHandler<CancelableEntityEventArgs> OnBeforeResize;
-        #endregion
-
-        #region Fields
-
-        // ------------------------------------------------------------------
-        /// <summary>
-        /// Implementation of IVersion - the current version of 
-        /// Page.
-        /// </summary>
-        // ------------------------------------------------------------------
-        protected const double pageVersion = 1.0;
-
-        // ------------------------------------------------------------------
-        /// <summary>
-        /// The scaling factor of this page.
-        /// </summary>
-        // ------------------------------------------------------------------
-        protected SizeF mMagnification = new SizeF(71F, 71F);
-
-        // ------------------------------------------------------------------
-        /// <summary>
-        /// Pans the page with the given shift.
-        /// </summary>
-        // ------------------------------------------------------------------
-        protected Point mOrigin = new Point(0, 0);
-
-        /// <summary>
-        /// the Name field
-        /// </summary>
-        protected string mName;
-
-        /// <summary>
-        /// the default layer
-        /// </summary>
-        [NonSerialized]
-        protected ILayer mDefaultLayer;
-
-        /// <summary>
-        /// the Layers field
-        /// </summary>
-        protected CollectionBase<ILayer> mLayers;
-
-        /// <summary>
-        /// the Ambience field
-        /// </summary>
-        protected Ambience mAmbience;
-
-        #endregion
-
-        #region Properties
-
-        // ------------------------------------------------------------------
-        /// <summary>
-        /// Gets the current version.
-        /// </summary>
-        // ------------------------------------------------------------------
-        public virtual double Version
-        {
-            get
-            {
-                return pageVersion;
-            }
-        }
-
-        // ------------------------------------------------------------------
-        /// <summary>
-        /// Gets or sets the scaling factor of this page.
-        /// </summary>
-        // ------------------------------------------------------------------
-        public SizeF Magnification
-        {
-            get
-            {
-                return mMagnification;
-            }
-            set
-            {
-                if (value == SizeF.Empty)
-                {
-                    throw new InconsistencyException(
-                        "The magnification has to be a positive value " +
-                        "greater than zero.");
-                }
-
-                mMagnification = value;
-
-                // Update the magnification for each entity.
-                foreach (IDiagramEntity entity in Entities)
-                {
-                    entity.Magnification = mMagnification;                    
-                }
-            }
-        }
-
-        // ------------------------------------------------------------------
-        /// <summary>
-        /// Gets or sets the origin of this page.
-        /// </summary>
-        // ------------------------------------------------------------------
-        public Point Origin
-        {
-            get
-            {
-                return mOrigin;
-            }
-            set
-            {
-                mOrigin = value;
-            }
-        }
-
-        // ------------------------------------------------------------------
-        /// <summary>
-        /// Gets the page bounds, taking into account landscape and page
-        /// settings (for printing).
-        /// </summary>
-        // ------------------------------------------------------------------
-        public RectangleF Bounds
-        {
-            get
-            {
-                float width = (float)Ambience.PageSize.Width / 1000;
-                float height = (float)Ambience.PageSize.Height / 1000;
-                width = width * Display.DpiX;
-                height = height * Display.DpiY;
-
-                if (Ambience.Landscape)
-                {
-                    float w = width;
-                    width = height;
-                    height = w;
-                }
-
-                // Offset the upper-left corner by 1 inch.
-                //float x = 1F * Display.DpiX;
-                //float y = 1F * Display.DpiY;
-
-              //inserted to remove margin around the drawi-ng aera
-                float x = 0;
-                float y = 0;
-
-                RectangleF bounds = new RectangleF(x, y, width, height);
-                return bounds;
-            }
-        }
-
-        // ------------------------------------------------------------------
-        /// <summary>
-        /// Gets all shapes in this page.
-        /// </summary>
-        // ------------------------------------------------------------------
-        public CollectionBase<IShape> Shapes
-        {
-            get {
-                CollectionBase<IShape> shapes = new CollectionBase<IShape>();
-                foreach (ILayer  layer in mLayers)
-                {
-                    shapes.AddRange(layer.Shapes);
-                }
-                return shapes;
-            }
-        }
-
-        // ------------------------------------------------------------------
-        /// <summary>
-        /// Gets all entities in this page.
-        /// </summary>
-        // ------------------------------------------------------------------
-        public CollectionBase<IDiagramEntity> Entities
-        {
-            get
-            {
-                //return DefaultLayer.Entities;
-                CollectionBase<IDiagramEntity> entities =
-                    new CollectionBase<IDiagramEntity>();                
-                foreach (ILayer layer in mLayers)
-                {
-                    entities.AddRange(layer.Entities);
-                }
-                return entities;
-            }
-        }
-
-        // ------------------------------------------------------------------
-        /// <summary>
-        /// Gets all connections in this page.
-        /// </summary>
-        // ------------------------------------------------------------------
-        public CollectionBase<IConnection> Connections
-        {
-            get
-            {
-                CollectionBase<IConnection> cons = new CollectionBase<IConnection>();
-                foreach (ILayer layer in mLayers)
-                {
-                    cons.AddRange(layer.Connections);
-                }
-                return cons;
-            }
-        }
-
-        /// <summary>
-        /// Gets or sets the Ambience
-        /// </summary>
-        public Ambience Ambience
-        {
-            get
-            {
-                return mAmbience;
-            }
-            set
-            {
-                mAmbience = value;
-                RaiseOnAmbienceChanged(new AmbienceEventArgs(mAmbience));
-            }
-        }
-
-        /// <summary>
-        /// Gets the default layer.
-        /// </summary>
-        /// <value>The default layer.</value>
-        public ILayer DefaultLayer
-        {
-            get
-            {
-                return mDefaultLayer;
-            }
-        }
-        /// <summary>
-        /// Gets or sets the Layers
-        /// </summary>
-        public CollectionBase<ILayer> Layers
-        {
-            get
-            {
-                return mLayers;
-            }
-            set
-            {
-                mLayers = value;
-            }
-        }
-        /// <summary>
-        /// Gets or sets the Name
-        /// </summary>
-        public string Name
-        {
-            get { return mName; }
-            set { mName = value; }
-        }
-        /// <summary>
-        /// the Model field
-        /// </summary>
-        private IModel mModel;
-        /// <summary>
-        /// Gets or sets the Model
-        /// </summary>
-        public IModel Model
-        {
-            get
-            {
-                return mModel;
-            }
-            set
-            {
-                if (value == null)
-                    throw new InconsistencyException("The model you want to set has value 'null'.");
-                mModel = value;
-                //this will cascade the setting down the hierarchy
-                foreach (ILayer layer in mLayers)
-                    layer.Model = value;
-            }
-        }
-        #endregion
-
-        #region Constructor
-        ///<summary>
-        ///Default constructor
-        ///</summary>
-        public Page(string name, IModel model)
-        {
-            this.mModel = model;
-
-            mName = name;
-            mAmbience = new Ambience(this);            
-
-            //the one and only and indestructible layer            
-            mLayers = new CollectionBase<ILayer>();
-            mLayers.Add(new Layer("Default Layer")); 
-            
-            Init();
-
-            
-        }
-
-        /// <summary>
-        /// Initializes this object
-        /// <remarks>See also the <see cref="OnDeserialized"/> event for post-deserialization actions to which this method is related.
-        /// </remarks>
-        /// </summary>
-        private void Init()
-        {
-            if (mLayers == null || mLayers.Count == 0)
-                throw new InconsistencyException("The page object does not contain the expected default layer.");
-            mDefaultLayer = mLayers[0];
-                       
-            //listen to events
-            AttachToAmbience(mAmbience);
-
-            foreach(ILayer layer in mLayers)
-                AttachToLayer(layer);
-        }
-
-        private void AttachToLayer(ILayer layer)
-        {
-            layer.OnEntityAdded += new EventHandler<EntityEventArgs>(defaultLayer_OnEntityAdded);
-            layer.OnEntityRemoved += new EventHandler<EntityEventArgs>(mDefaultLayer_OnEntityRemoved);
-            layer.OnClear += new EventHandler(mDefaultLayer_OnClear);
-        }
-
-        /// <summary>
-        /// Attaches the model to the ambience class.
-        /// </summary>
-        /// <param name="ambience">The ambience.</param>
-        private void AttachToAmbience(Ambience ambience)
-        {
-            if(ambience == null)
-                throw new ArgumentNullException("The ambience object assigned to the model cannot be 'null'");
-
-            mAmbience.OnAmbienceChanged += new EventHandler<AmbienceEventArgs>(mAmbience_OnAmbienceChanged);
-        }
-
-        // ------------------------------------------------------------------
-        /// <summary>
-        /// Gets the layer that has the entity specified.  If the entity
-        /// specified could not be found, 'null' is returned.
-        /// </summary>
-        /// <param name="entity">IDiagramEntity</param>
-        /// <returns>ILayer</returns>
-        // ------------------------------------------------------------------
-        public ILayer GetLayer(IDiagramEntity entity)
-        {
-            foreach (ILayer layer in mLayers)
-            {
-                if (layer.Entities.Contains(entity))
-                {
-                    return layer;
-                }
-            }
-            return null;
-        }
-
-        public void Paint(Graphics g, bool showGrid)
-        {
-            // First paint the grid.
-            if (showGrid)
-            {
-                float penWidth = 1F;
-                float max = 0;
-
-                if (Magnification != Size.Empty)
-                {
-                    max = Math.Max(
-                        Magnification.Width / 100F,
-                        Magnification.Height / 100F);
-                }
-
-                // Scale the pen size by the magnification so the grid
-                // lines don't get magnified (stays a constant width).
-                if (max > 0)
-                {
-                    penWidth = penWidth / max;
-                }
-
-                // Show the grid lines in every 1/4th of the current
-                // measurement units.
-                float xGridSpacing = g.DpiX / 4;
-                float yGridSpacing = g.DpiY / 4;
-
-                Grid.Paint(g, Bounds, xGridSpacing, yGridSpacing, penWidth);
-            }
-
-            // The old way, before multiple layers were allowed.
-            //foreach (IDiagramEntity entity in mModel.Paintables)
-            //{
-            //    entity.Paint(g);                
-            //}
-
-            // I was going to do it this way, but then decided it's easier
-            // to check the 'Layer.IsVisible' property for each entity.
-            //foreach (ILayer layer in mModel.CurrentPage.Layers)
-            //{
-            //    if (layer.IsVisible)
-            //    {
-            //        foreach (IDiagramEntity entity in layer.Entities)
-            //        {
-            //            entity.Paint(g);
-            //        }
-            //    }
-            //}          
-
-            foreach (IDiagramEntity entity in this.Entities)
-            {
-                // If this entity isn't attached to a layer, then paint
-                // it regardless.
-                if ((entity.Layer == null) ||
-                    (entity.Layer.IsVisible))
-                {
-                    entity.Paint(g);
-                }
-                //else if (entity.Layer.IsVisible)
-                //{
-                //    //entity.Paint(g);
-                //}
-            }
-
-            g.Transform.Reset();
-            g.ResetClip();
-        }
-
-        /// <summary>
-        /// Raises the <see cref="OnAmbienceChanged"/> event
-        /// </summary>
-        /// <param name="e"></param>
-        protected virtual void RaiseOnAmbienceChanged(AmbienceEventArgs e)
-        {
-            EventHandler<AmbienceEventArgs> handler = OnAmbienceChanged;
-            if(handler != null)
-            {
-                handler(this, e);
-            }
-        }
-
-        /// <summary>
-        /// Handles the OnClear event of the DefaultLayer.
-        /// </summary>
-        /// <param name="sender">The source of the event.</param>
-        /// <param name="e">The <see cref="T:System.EventArgs"/> instance containing the event data.</param>
-        void mDefaultLayer_OnClear(object sender, EventArgs e)
-        {
-            EventHandler handler = OnClear;
-            if (handler != null)
-                handler(sender, e);
-        }
-
-        /// <summary>
-        /// Handles the OnEntityRemoved event of the DefaultLayer.
-        /// </summary>
-        /// <param name="sender">The source of the event.</param>
-        /// <param name="e">The <see cref="T:Netron.Diagramming.Core.EntityEventArgs"/> instance containing the event data.</param>
-        void mDefaultLayer_OnEntityRemoved(object sender, EntityEventArgs e)
-        {
-            EventHandler<EntityEventArgs> handler = OnEntityRemoved;
-            if (handler != null)
-                handler(sender, e);
-        }
-
-        /// <summary>
-        /// Handles the OnEntityAdded event of the defaultLayer.
-        /// </summary>
-        /// <param name="sender">The source of the event.</param>
-        /// <param name="e">The <see cref="T:Netron.Diagramming.Core.EntityEventArgs"/> instance containing the event data.</param>
-        void defaultLayer_OnEntityAdded(object sender, EntityEventArgs e)
-        {
-            EventHandler<EntityEventArgs> handler = OnEntityAdded;
-            if (handler != null)
-                handler(sender, e);
-        }
-
-        /// <summary>
-        /// Handles the OnAmbienceChanged event of the <see cref="Ambience"/>.
-        /// </summary>
-        /// <param name="sender">The source of the event.</param>
-        /// <param name="e">The <see cref="T:Netron.Diagramming.Core.AmbienceEventArgs"/> instance containing the event data.</param>
-        void mAmbience_OnAmbienceChanged(object sender, AmbienceEventArgs e)
-        {
-            //pass on the good news, eventually the View will be notified and the canvas will be redrawn
-            RaiseOnAmbienceChanged(e);
-        }
-        #endregion
-  
-    }
+namespace Netron.Diagramming.Core {
+  /// <summary>
+  /// Implementation of the <see cref="IPage"/> interface. The page represents one page the diagram control, pages being usually visualized as tabs in the control.
+  /// 
+  /// </summary>
+  public partial class Page : IPage, IVersion {
+    #region Events
+    /// <summary>
+    /// Occurs when the Ambience has changed
+    /// </summary>
+    public event EventHandler<AmbienceEventArgs> OnAmbienceChanged;
+    /// <summary>
+    /// Occurs when an entity is added.
+    /// <remarks>This event usually is bubbled from one of the layers</remarks>
+    /// </summary>
+    public event EventHandler<EntityEventArgs> OnEntityAdded;
+    /// <summary>
+    /// Occurs when an entity is removed.
+    /// <remarks>This event usually is bubbled from one of the layers</remarks>
+    /// </summary>
+    public event EventHandler<EntityEventArgs> OnEntityRemoved;
+    /// <summary>
+    /// Occurs when the page is cleared
+    /// </summary>
+    public event EventHandler OnClear;
+    /// <summary>
+    /// Occurs before an entity is transformed
+    /// </summary>
+    //public event EventHandler<CancelableEntityEventArgs> OnBeforeResize;
+    #endregion
+
+    #region Fields
+
+    // ------------------------------------------------------------------
+    /// <summary>
+    /// Implementation of IVersion - the current version of 
+    /// Page.
+    /// </summary>
+    // ------------------------------------------------------------------
+    protected const double pageVersion = 1.0;
+
+    // ------------------------------------------------------------------
+    /// <summary>
+    /// The scaling factor of this page.
+    /// </summary>
+    // ------------------------------------------------------------------
+    protected SizeF mMagnification = new SizeF(71F, 71F);
+
+    // ------------------------------------------------------------------
+    /// <summary>
+    /// Pans the page with the given shift.
+    /// </summary>
+    // ------------------------------------------------------------------
+    protected Point mOrigin = new Point(0, 0);
+
+    /// <summary>
+    /// the Name field
+    /// </summary>
+    protected string mName;
+
+    /// <summary>
+    /// the default layer
+    /// </summary>
+    [NonSerialized]
+    protected ILayer mDefaultLayer;
+
+    /// <summary>
+    /// the Layers field
+    /// </summary>
+    protected CollectionBase<ILayer> mLayers;
+
+    /// <summary>
+    /// the Ambience field
+    /// </summary>
+    protected Ambience mAmbience;
+
+    #endregion
+
+    #region Properties
+
+    // ------------------------------------------------------------------
+    /// <summary>
+    /// Gets the current version.
+    /// </summary>
+    // ------------------------------------------------------------------
+    public virtual double Version {
+      get {
+        return pageVersion;
+      }
+    }
+
+    // ------------------------------------------------------------------
+    /// <summary>
+    /// Gets or sets the scaling factor of this page.
+    /// </summary>
+    // ------------------------------------------------------------------
+    public SizeF Magnification {
+      get {
+        return mMagnification;
+      }
+      set {
+        if (value == SizeF.Empty) {
+          throw new InconsistencyException(
+              "The magnification has to be a positive value " +
+              "greater than zero.");
+        }
+
+        mMagnification = value;
+
+        // Update the magnification for each entity.
+        foreach (IDiagramEntity entity in Entities) {
+          entity.Magnification = mMagnification;
+        }
+      }
+    }
+
+    // ------------------------------------------------------------------
+    /// <summary>
+    /// Gets or sets the origin of this page.
+    /// </summary>
+    // ------------------------------------------------------------------
+    public Point Origin {
+      get {
+        return mOrigin;
+      }
+      set {
+        mOrigin = value;
+      }
+    }
+
+    // ------------------------------------------------------------------
+    /// <summary>
+    /// Gets the page bounds, taking into account landscape and page
+    /// settings (for printing).
+    /// </summary>
+    // ------------------------------------------------------------------
+    public RectangleF Bounds {
+      get {
+        float width = (float)Ambience.PageSize.Width / 1000;
+        float height = (float)Ambience.PageSize.Height / 1000;
+        width = width * Display.DpiX;
+        height = height * Display.DpiY;
+
+        if (Ambience.Landscape) {
+          float w = width;
+          width = height;
+          height = w;
+        }
+
+        // Offset the upper-left corner by 1 inch.
+        //float x = 1F * Display.DpiX;
+        //float y = 1F * Display.DpiY;
+
+        //inserted to remove margin around the drawi-ng aera
+        float x = 0;
+        float y = 0;
+
+        RectangleF bounds = new RectangleF(x, y, width, height);
+        return bounds;
+      }
+    }
+
+    // ------------------------------------------------------------------
+    /// <summary>
+    /// Gets all shapes in this page.
+    /// </summary>
+    // ------------------------------------------------------------------
+    public CollectionBase<IShape> Shapes {
+      get {
+        CollectionBase<IShape> shapes = new CollectionBase<IShape>();
+        foreach (ILayer layer in mLayers) {
+          shapes.AddRange(layer.Shapes);
+        }
+        return shapes;
+      }
+    }
+
+    // ------------------------------------------------------------------
+    /// <summary>
+    /// Gets all entities in this page.
+    /// </summary>
+    // ------------------------------------------------------------------
+    public CollectionBase<IDiagramEntity> Entities {
+      get {
+        //return DefaultLayer.Entities;
+        CollectionBase<IDiagramEntity> entities =
+            new CollectionBase<IDiagramEntity>();
+        foreach (ILayer layer in mLayers) {
+          entities.AddRange(layer.Entities);
+        }
+        return entities;
+      }
+    }
+
+    // ------------------------------------------------------------------
+    /// <summary>
+    /// Gets all connections in this page.
+    /// </summary>
+    // ------------------------------------------------------------------
+    public CollectionBase<IConnection> Connections {
+      get {
+        CollectionBase<IConnection> cons = new CollectionBase<IConnection>();
+        foreach (ILayer layer in mLayers) {
+          cons.AddRange(layer.Connections);
+        }
+        return cons;
+      }
+    }
+
+    /// <summary>
+    /// Gets or sets the Ambience
+    /// </summary>
+    public Ambience Ambience {
+      get {
+        return mAmbience;
+      }
+      set {
+        mAmbience = value;
+        RaiseOnAmbienceChanged(new AmbienceEventArgs(mAmbience));
+      }
+    }
+
+    /// <summary>
+    /// Gets the default layer.
+    /// </summary>
+    /// <value>The default layer.</value>
+    public ILayer DefaultLayer {
+      get {
+        return mDefaultLayer;
+      }
+    }
+    /// <summary>
+    /// Gets or sets the Layers
+    /// </summary>
+    public CollectionBase<ILayer> Layers {
+      get {
+        return mLayers;
+      }
+      set {
+        mLayers = value;
+      }
+    }
+    /// <summary>
+    /// Gets or sets the Name
+    /// </summary>
+    public string Name {
+      get { return mName; }
+      set { mName = value; }
+    }
+    /// <summary>
+    /// the Model field
+    /// </summary>
+    private IModel mModel;
+    /// <summary>
+    /// Gets or sets the Model
+    /// </summary>
+    public IModel Model {
+      get {
+        return mModel;
+      }
+      set {
+        if (value == null)
+          throw new InconsistencyException("The model you want to set has value 'null'.");
+        mModel = value;
+        //this will cascade the setting down the hierarchy
+        foreach (ILayer layer in mLayers)
+          layer.Model = value;
+      }
+    }
+    #endregion
+
+    #region Constructor
+    ///<summary>
+    ///Default constructor
+    ///</summary>
+    public Page(string name, IModel model) {
+      this.mModel = model;
+
+      mName = name;
+      mAmbience = new Ambience(this);
+
+      //the one and only and indestructible layer            
+      mLayers = new CollectionBase<ILayer>();
+      mLayers.Add(new Layer("Default Layer"));
+
+      Init();
+
+
+    }
+
+    /// <summary>
+    /// Initializes this object
+    /// <remarks>See also the <see cref="OnDeserialized"/> event for post-deserialization actions to which this method is related.
+    /// </remarks>
+    /// </summary>
+    private void Init() {
+      if (mLayers == null || mLayers.Count == 0)
+        throw new InconsistencyException("The page object does not contain the expected default layer.");
+      mDefaultLayer = mLayers[0];
+
+      //listen to events
+      AttachToAmbience(mAmbience);
+
+      foreach (ILayer layer in mLayers)
+        AttachToLayer(layer);
+    }
+
+    private void AttachToLayer(ILayer layer) {
+      layer.OnEntityAdded += new EventHandler<EntityEventArgs>(defaultLayer_OnEntityAdded);
+      layer.OnEntityRemoved += new EventHandler<EntityEventArgs>(mDefaultLayer_OnEntityRemoved);
+      layer.OnClear += new EventHandler(mDefaultLayer_OnClear);
+    }
+
+    /// <summary>
+    /// Attaches the model to the ambience class.
+    /// </summary>
+    /// <param name="ambience">The ambience.</param>
+    private void AttachToAmbience(Ambience ambience) {
+      if (ambience == null)
+        throw new ArgumentNullException("The ambience object assigned to the model cannot be 'null'");
+
+      mAmbience.OnAmbienceChanged += new EventHandler<AmbienceEventArgs>(mAmbience_OnAmbienceChanged);
+    }
+
+    // ------------------------------------------------------------------
+    /// <summary>
+    /// Gets the layer that has the entity specified.  If the entity
+    /// specified could not be found, 'null' is returned.
+    /// </summary>
+    /// <param name="entity">IDiagramEntity</param>
+    /// <returns>ILayer</returns>
+    // ------------------------------------------------------------------
+    public ILayer GetLayer(IDiagramEntity entity) {
+      foreach (ILayer layer in mLayers) {
+        if (layer.Entities.Contains(entity)) {
+          return layer;
+        }
+      }
+      return null;
+    }
+
+    public void Paint(Graphics g, bool showGrid) {
+      // First paint the grid.
+      if (showGrid) {
+        float penWidth = 1F;
+        float max = 0;
+
+        if (Magnification != Size.Empty) {
+          max = Math.Max(
+              Magnification.Width / 100F,
+              Magnification.Height / 100F);
+        }
+
+        // Scale the pen size by the magnification so the grid
+        // lines don't get magnified (stays a constant width).
+        if (max > 0) {
+          penWidth = penWidth / max;
+        }
+
+        // Show the grid lines in every 1/4th of the current
+        // measurement units.
+        float xGridSpacing = g.DpiX / 4;
+        float yGridSpacing = g.DpiY / 4;
+
+        Grid.Paint(g, Bounds, xGridSpacing, yGridSpacing, penWidth);
+      }
+
+      // The old way, before multiple layers were allowed.
+      //foreach (IDiagramEntity entity in mModel.Paintables)
+      //{
+      //    entity.Paint(g);                
+      //}
+
+      // I was going to do it this way, but then decided it's easier
+      // to check the 'Layer.IsVisible' property for each entity.
+      //foreach (ILayer layer in mModel.CurrentPage.Layers)
+      //{
+      //    if (layer.IsVisible)
+      //    {
+      //        foreach (IDiagramEntity entity in layer.Entities)
+      //        {
+      //            entity.Paint(g);
+      //        }
+      //    }
+      //}          
+
+      foreach (IDiagramEntity entity in this.Entities) {
+        // If this entity isn't attached to a layer, then paint
+        // it regardless.
+        if ((entity.Layer == null) ||
+            (entity.Layer.IsVisible)) {
+          entity.Paint(g);
+        }
+        //else if (entity.Layer.IsVisible)
+        //{
+        //    //entity.Paint(g);
+        //}
+      }
+
+      g.Transform.Reset();
+      g.ResetClip();
+    }
+
+    /// <summary>
+    /// Raises the <see cref="OnAmbienceChanged"/> event
+    /// </summary>
+    /// <param name="e"></param>
+    protected virtual void RaiseOnAmbienceChanged(AmbienceEventArgs e) {
+      EventHandler<AmbienceEventArgs> handler = OnAmbienceChanged;
+      if (handler != null) {
+        handler(this, e);
+      }
+    }
+
+    /// <summary>
+    /// Handles the OnClear event of the DefaultLayer.
+    /// </summary>
+    /// <param name="sender">The source of the event.</param>
+    /// <param name="e">The <see cref="T:System.EventArgs"/> instance containing the event data.</param>
+    void mDefaultLayer_OnClear(object sender, EventArgs e) {
+      EventHandler handler = OnClear;
+      if (handler != null)
+        handler(sender, e);
+    }
+
+    /// <summary>
+    /// Handles the OnEntityRemoved event of the DefaultLayer.
+    /// </summary>
+    /// <param name="sender">The source of the event.</param>
+    /// <param name="e">The <see cref="T:Netron.Diagramming.Core.EntityEventArgs"/> instance containing the event data.</param>
+    void mDefaultLayer_OnEntityRemoved(object sender, EntityEventArgs e) {
+      EventHandler<EntityEventArgs> handler = OnEntityRemoved;
+      if (handler != null)
+        handler(sender, e);
+    }
+
+    /// <summary>
+    /// Handles the OnEntityAdded event of the defaultLayer.
+    /// </summary>
+    /// <param name="sender">The source of the event.</param>
+    /// <param name="e">The <see cref="T:Netron.Diagramming.Core.EntityEventArgs"/> instance containing the event data.</param>
+    void defaultLayer_OnEntityAdded(object sender, EntityEventArgs e) {
+      EventHandler<EntityEventArgs> handler = OnEntityAdded;
+      if (handler != null)
+        handler(sender, e);
+    }
+
+    /// <summary>
+    /// Handles the OnAmbienceChanged event of the <see cref="Ambience"/>.
+    /// </summary>
+    /// <param name="sender">The source of the event.</param>
+    /// <param name="e">The <see cref="T:Netron.Diagramming.Core.AmbienceEventArgs"/> instance containing the event data.</param>
+    void mAmbience_OnAmbienceChanged(object sender, AmbienceEventArgs e) {
+      //pass on the good news, eventually the View will be notified and the canvas will be redrawn
+      RaiseOnAmbienceChanged(e);
+    }
+    #endregion
+
+  }
 }
Index: /trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.Netron/3.0.2672.12446/Netron.Diagramming.Core-3.0.2672.12446/Core/ViewBase.cs
===================================================================
--- /trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.Netron/3.0.2672.12446/Netron.Diagramming.Core-3.0.2672.12446/Core/ViewBase.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.Netron/3.0.2672.12446/Netron.Diagramming.Core-3.0.2672.12446/Core/ViewBase.cs	(revision 4068)
@@ -1,1651 +1,1473 @@
 using System;
 using System.ComponentModel;
-using System.Collections.Generic;
-using System.Text;
 using System.Drawing;
 using System.Drawing.Drawing2D;
-using System.Drawing.Design;
-using System.Diagnostics;
 using System.Windows.Forms;
-using System.Threading;
-using System.Drawing.Printing;
-
-namespace Netron.Diagramming.Core
-{
-    // ----------------------------------------------------------------------
-    /// <summary>
-    /// Abstract view base class which serves/renders both the Win and Web 
-    /// diagrams.
-    /// <remarks>
-    /// <para>Click here for an explanation of the Model-View-Controller
-    /// pattern: http://st-www.cs.uiuc.edu/users/smarch/st-docs/mvc.html
-    /// </para>
-    /// <para>See Bob Powell's explaination of the different coordinate 
-    /// systems here: http://www.bobpowell.net/mappingmodes.htm
-    /// The rendering pipeline with the different ratiometric conversions 
-    /// is not really easy.
-    /// </para>
-    /// </remarks>
-    /// </summary>
-    // ----------------------------------------------------------------------
-    public abstract class ViewBase : IDisposable, IView
-    {
-
-        #region Events
-        /// <summary>
-        /// Occurs when the cursor changes and the surface has to effectively show a different cursor
-        /// </summary>
-        public event EventHandler<CursorEventArgs> OnCursorChange;
-        /// <summary>
-        /// Occurs when the background color has to change. The view could paint the backcolor itself via the PaintBackground method
-        /// but this would be less efficient than the built-in painting of the Control.
-        /// </summary>
-        public event EventHandler<ColorEventArgs> OnBackColorChange;
-        #endregion
-
-        #region Fields
-
-        // ------------------------------------------------------------------
-        /// <summary>
-        /// Specifies if all shape's connectors are shown.
-        /// </summary>
-        // ------------------------------------------------------------------
-        protected bool mShowConnectors = true;
-
-        // ------------------------------------------------------------------
-        /// <summary>
-        /// Specifies if the grid is drawn.
-        /// </summary>
-        // ------------------------------------------------------------------
-        protected bool mShowGrid = true;
-
-        // ------------------------------------------------------------------
-        /// <summary>
-        /// Specifies if a page's title is drawn when 'ShowPage' is set to
-        /// true.
-        /// </summary>
-        // ------------------------------------------------------------------
-        protected bool mShowPageTitle = false;
-
-        // ------------------------------------------------------------------
-        /// <summary>
-        /// Specifies if the page is rendered and printed in landscape
-        /// orientation.
-        /// </summary>
-        // ------------------------------------------------------------------
-        protected bool mLandscape = true;
-
-        protected  Matrix mViewMatrix;
-        protected  Matrix mInvertedViewMatrix;
-        private float dpiX = 96F;
-
-        private float dpiY = 96F;
-        /// <summary>
-        /// the ShowRulers field
-        /// </summary>
-        private bool mShowRulers;
-        private bool mIsSuspended;
-        /// <summary>
-        /// pointer to the current tracker
-        /// </summary>
-        private ITracker mTracker;
-        /// <summary>
-        /// pointer to the current ants or selector
-        /// </summary>
-        private IAnts mAnts;
-        /// <summary>
-        /// pointer to the current ghost bundle or region
-        /// </summary>
-        private IGhost mGhost;
-        /// <summary>
-        /// the data model
-        /// </summary>
-        private IModel mModel;
-        /// <summary>
-        /// the brush to be used for the background
-        /// </summary>
-        private Brush mBackgroundBrush;
-        /// <summary>
-        /// the parent control (aka surface)
-        /// </summary>
-        private IDiagramControl parentControl;
-        /// <summary>
-        /// the rectangle of the client surface
-        /// </summary>
-        private Rectangle clientRectangle;
-        /// <summary>
-        /// the current cursor
-        /// </summary>
-        private Cursor mCurrentCursor = Cursors.Default;
-
-        /// <summary>
-        /// the horizontal ruler
-        /// </summary>
-        private HorizontalRuler horizontalRuler;
-
-        /// <summary>
-        /// the vertical ruler
-        /// </summary>                                                
-        private VerticalRuler verticalRuler;
-        private int mRulerSize = 16;
-
-      
-
-        #endregion
-
-        #region Properties
-
-        // ------------------------------------------------------------------
-        /// <summary>
-        /// Gets or sets if the grid is to be drawn.
-        /// </summary>
-        // ------------------------------------------------------------------
-        public bool ShowGrid
-        {
-            get
-            {
-                return mShowGrid;
-            }
-            set
-            {
-                mShowGrid = value;
-                this.Invalidate();
-            }
+
+namespace Netron.Diagramming.Core {
+  // ----------------------------------------------------------------------
+  /// <summary>
+  /// Abstract view base class which serves/renders both the Win and Web 
+  /// diagrams.
+  /// <remarks>
+  /// <para>Click here for an explanation of the Model-View-Controller
+  /// pattern: http://st-www.cs.uiuc.edu/users/smarch/st-docs/mvc.html
+  /// </para>
+  /// <para>See Bob Powell's explaination of the different coordinate 
+  /// systems here: http://www.bobpowell.net/mappingmodes.htm
+  /// The rendering pipeline with the different ratiometric conversions 
+  /// is not really easy.
+  /// </para>
+  /// </remarks>
+  /// </summary>
+  // ----------------------------------------------------------------------
+  public abstract class ViewBase : IDisposable, IView {
+
+    #region Events
+    /// <summary>
+    /// Occurs when the cursor changes and the surface has to effectively show a different cursor
+    /// </summary>
+    public event EventHandler<CursorEventArgs> OnCursorChange;
+    /// <summary>
+    /// Occurs when the background color has to change. The view could paint the backcolor itself via the PaintBackground method
+    /// but this would be less efficient than the built-in painting of the Control.
+    /// </summary>
+    public event EventHandler<ColorEventArgs> OnBackColorChange;
+    #endregion
+
+    #region Fields
+
+    // ------------------------------------------------------------------
+    /// <summary>
+    /// Specifies if all shape's connectors are shown.
+    /// </summary>
+    // ------------------------------------------------------------------
+    protected bool mShowConnectors = true;
+
+    // ------------------------------------------------------------------
+    /// <summary>
+    /// Specifies if the grid is drawn.
+    /// </summary>
+    // ------------------------------------------------------------------
+    protected bool mShowGrid = true;
+
+    // ------------------------------------------------------------------
+    /// <summary>
+    /// Specifies if a page's title is drawn when 'ShowPage' is set to
+    /// true.
+    /// </summary>
+    // ------------------------------------------------------------------
+    protected bool mShowPageTitle = false;
+
+    // ------------------------------------------------------------------
+    /// <summary>
+    /// Specifies if the page is rendered and printed in landscape
+    /// orientation.
+    /// </summary>
+    // ------------------------------------------------------------------
+    protected bool mLandscape = true;
+
+    protected Matrix mViewMatrix;
+    protected Matrix mInvertedViewMatrix;
+    private float dpiX = 96F;
+
+    private float dpiY = 96F;
+    /// <summary>
+    /// the ShowRulers field
+    /// </summary>
+    private bool mShowRulers;
+    private bool mIsSuspended;
+    /// <summary>
+    /// pointer to the current tracker
+    /// </summary>
+    private ITracker mTracker;
+    /// <summary>
+    /// pointer to the current ants or selector
+    /// </summary>
+    private IAnts mAnts;
+    /// <summary>
+    /// pointer to the current ghost bundle or region
+    /// </summary>
+    private IGhost mGhost;
+    /// <summary>
+    /// the data model
+    /// </summary>
+    private IModel mModel;
+    /// <summary>
+    /// the brush to be used for the background
+    /// </summary>
+    private Brush mBackgroundBrush;
+    /// <summary>
+    /// the parent control (aka surface)
+    /// </summary>
+    private IDiagramControl parentControl;
+    /// <summary>
+    /// the rectangle of the client surface
+    /// </summary>
+    private Rectangle clientRectangle;
+    /// <summary>
+    /// the current cursor
+    /// </summary>
+    private Cursor mCurrentCursor = Cursors.Default;
+
+    /// <summary>
+    /// the horizontal ruler
+    /// </summary>
+    private HorizontalRuler horizontalRuler;
+
+    /// <summary>
+    /// the vertical ruler
+    /// </summary>                                                
+    private VerticalRuler verticalRuler;
+    private int mRulerSize = 16;
+
+
+
+    #endregion
+
+    #region Properties
+
+    // ------------------------------------------------------------------
+    /// <summary>
+    /// Gets or sets if the grid is to be drawn.
+    /// </summary>
+    // ------------------------------------------------------------------
+    public bool ShowGrid {
+      get {
+        return mShowGrid;
+      }
+      set {
+        mShowGrid = value;
+        this.Invalidate();
+      }
+    }
+
+    // ------------------------------------------------------------------
+    /// <summary>
+    /// Specifies if all shape's connectors are shown.
+    /// </summary>
+    // ------------------------------------------------------------------
+    public bool ShowConnectors {
+      get {
+        return this.mModel.ShowConnectors;
+      }
+      set {
+        this.mModel.ShowConnectors = value;
+        this.Invalidate();
+      }
+    }
+
+    // ------------------------------------------------------------------
+    /// <summary>
+    /// Gets or sets if the page's title is drawn when 'ShowPage' is set
+    /// to true.
+    /// </summary>
+    // ------------------------------------------------------------------
+    public bool ShowPageTitle {
+      get {
+        return mShowPageTitle;
+      }
+      set {
+        mShowPageTitle = value;
+        this.Invalidate();
+      }
+    }
+
+    // ------------------------------------------------------------------
+    /// <summary>
+    /// Gets or sets the size of each page in thousandths of an inch.
+    /// </summary>
+    // ------------------------------------------------------------------
+    public Size PageSize {
+      get {
+        return mModel.CurrentPage.Ambience.PageSize;
+      }
+      set {
+        foreach (IPage page in Model.Pages) {
+          page.Ambience.PageSize = value;
         }
-
-        // ------------------------------------------------------------------
-        /// <summary>
-        /// Specifies if all shape's connectors are shown.
-        /// </summary>
-        // ------------------------------------------------------------------
-        public bool ShowConnectors
-        {
-            get
-            {
-                return this.mModel.ShowConnectors;
-            }
-            set
-            {
-                this.mModel.ShowConnectors = value;
-                this.Invalidate();
-            }
+        UpdateViewMatrix();
+        this.Invalidate();
+      }
+    }
+
+    // ------------------------------------------------------------------
+    /// <summary>
+    /// Gets or sets if each page is rendered and printed in landscape
+    /// orientation.
+    /// </summary>
+    // ------------------------------------------------------------------
+    public bool Landscape {
+      get {
+        return mLandscape;
+      }
+      set {
+        mLandscape = value;
+        foreach (IPage page in mModel.Pages) {
+          page.Ambience.Landscape = value;
         }
-
-        // ------------------------------------------------------------------
-        /// <summary>
-        /// Gets or sets if the page's title is drawn when 'ShowPage' is set
-        /// to true.
-        /// </summary>
-        // ------------------------------------------------------------------
-        public bool ShowPageTitle
-        {
-            get
-            {
-                return mShowPageTitle;
-            }
-            set
-            {
-                mShowPageTitle = value;
-                this.Invalidate(); 
-            }
+        this.Invalidate();
+      }
+    }
+
+    // ------------------------------------------------------------------
+    /// <summary>
+    /// Gets or sets if the rulers are shown are not.  I don't recommend
+    /// showing them just yet :)
+    /// </summary>
+    // ------------------------------------------------------------------
+    public bool ShowRulers {
+      get {
+        return mShowRulers;
+      }
+      set {
+        mShowRulers = value;
+        UpdateViewMatrix();
+        this.Invalidate();
+      }
+    }
+
+    // ------------------------------------------------------------------
+    /// <summary>
+    /// Gets the view matrix.
+    /// </summary>
+    /// <value>The view matrix.</value>
+    // ------------------------------------------------------------------
+    public Matrix ViewMatrix {
+      get { return mViewMatrix; }
+    }
+
+    // ------------------------------------------------------------------
+    /// <summary>
+    /// Gets the inverted view matrix.
+    /// </summary>
+    // ------------------------------------------------------------------
+    public Matrix InvertedViewMatrix {
+      get { return mInvertedViewMatrix; }
+    }
+
+    // ------------------------------------------------------------------
+    /// <summary>
+    /// Gets or sets the scaling factor of the current page.
+    /// </summary>
+    // ------------------------------------------------------------------
+    public SizeF Magnification {
+      get {
+        //return mMagnification;
+        return Model.CurrentPage.Magnification;
+      }
+      set {
+        Model.CurrentPage.Magnification = value;
+        UpdateViewMatrix();
+        this.Invalidate();
+      }
+    }
+
+    // ------------------------------------------------------------------
+    /// <summary>
+    /// Pans the current page with the given shift.
+    /// </summary>
+    // ------------------------------------------------------------------
+    public Point Origin {
+      get {
+        return Model.CurrentPage.Origin;
+      }
+      set {
+        Model.CurrentPage.Origin = value;
+        UpdateViewMatrix();
+        this.Invalidate();
+      }
+    }
+
+    // ------------------------------------------------------------------
+    /// <summary>
+    /// Gets the graphics object of the surface.
+    /// </summary>
+    // ------------------------------------------------------------------
+    public Graphics Graphics {
+      get {
+        if (this.parentControl != null)
+          return Graphics.FromHwnd((this.parentControl as Control).Handle);
+        else
+          return null;
+      }
+    }
+
+    internal readonly static int TrackerOffset = 5;
+
+    // ------------------------------------------------------------------
+    /// <summary>
+    /// Gets the current cursor
+    /// </summary>
+    // ------------------------------------------------------------------
+    public Cursor CurrentCursor {
+      get { return mCurrentCursor; }
+      set {
+        mCurrentCursor = value;
+        RaiseOnCursorChange(value);
+      }
+    }
+
+    // ------------------------------------------------------------------
+    /// <summary>
+    /// Gets the background brush
+    /// </summary>
+    // ------------------------------------------------------------------
+    internal Brush BackgroundBrush {
+      get {
+        return mBackgroundBrush;
+      }
+    }
+
+    // ------------------------------------------------------------------
+    /// <summary>
+    /// Gets or sets the model
+    /// </summary>
+    // ------------------------------------------------------------------
+    public IModel Model {
+      get {
+        return mModel;
+      }
+      set {
+        mModel = value;
+        AttachToModel(mModel);
+      }
+    }
+
+    // ------------------------------------------------------------------
+    /// <summary>
+    /// Gets the ghost.
+    /// </summary>
+    /// <value>The ghost.</value>
+    // ------------------------------------------------------------------
+    public IGhost Ghost {
+      get { return mGhost; }
+      protected set { mGhost = value; }
+    }
+
+    // ------------------------------------------------------------------
+    /// <summary>
+    /// Gets the ants.
+    /// </summary>
+    /// <value>The ants.</value>
+    // ------------------------------------------------------------------
+    public IAnts Ants {
+      get { return mAnts; }
+      protected set { mAnts = value; }
+    }
+
+    // ------------------------------------------------------------------
+    /// <summary>
+    /// Gets or sets the tracker.
+    /// </summary>
+    /// <value>The tracker.</value>
+    // ------------------------------------------------------------------
+    public ITracker Tracker {
+      get { return mTracker; }
+      set { mTracker = value; }
+    }
+
+    // ------------------------------------------------------------------
+    /// <summary>
+    /// Gets the client bounds.
+    /// </summary>
+    // ------------------------------------------------------------------
+    public Rectangle Bounds {
+      get { return clientRectangle; }
+    }
+
+    [BrowsableAttribute(true)]
+    [DesignerSerializationVisibilityAttribute(DesignerSerializationVisibility.Visible)]
+    public MeasurementsUnit RulerUnits {
+      get {
+        return MeasurementsUnit.Inches;
+      }
+
+    }
+
+
+    #endregion
+
+    #region Constructor
+
+    // ------------------------------------------------------------------
+    ///<summary>
+    ///Default constructor
+    ///</summary>
+    // ------------------------------------------------------------------
+    protected ViewBase(IDiagramControl surface) {
+      if (surface == null)
+        throw new NullReferenceException();
+
+      // Render and print each page in landscape.
+      mLandscape = true;
+
+      AttachToSurface(surface);
+    }
+
+    // ------------------------------------------------------------------
+    /// <summary>
+    /// Initializes a new instance of the <see cref="T:ViewBase"/> class.
+    /// </summary>
+    // ------------------------------------------------------------------
+    protected ViewBase() { }
+
+    #endregion
+
+    #region Methods
+
+    // ------------------------------------------------------------------
+    /// <summary>
+    /// Updates the view and inverted view matrices.
+    /// </summary>
+    // ------------------------------------------------------------------
+    private void UpdateViewMatrix() {
+      mViewMatrix = GetViewMatrix();
+      //set the inverted view matrix
+      mInvertedViewMatrix = mViewMatrix.Clone();
+      mInvertedViewMatrix.Invert();
+    }
+
+    // ------------------------------------------------------------------
+    /// <summary>
+    /// Handles the SizeChanged event of the parentControl control.
+    /// </summary>
+    /// <param name="sender">The source of the event.</param>
+    /// <param name="e">The <see cref="T:System.EventArgs"/> instance 
+    /// containing the event data.</param>
+    // ------------------------------------------------------------------
+    void parentControl_SizeChanged(object sender, EventArgs e) {
+      clientRectangle = Rectangle.Round(parentControl.ClientRectangle);
+      //redefine the brush in function of the chosen background type
+      SetBackgroundType(Model.CurrentPage.Ambience.BackgroundType);
+      Invalidate();
+    }
+
+    // ------------------------------------------------------------------
+    /// <summary>
+    /// Paints the diagram on the canvas. Adornments and other stuff 
+    /// (ghosts, ants and so on) have to be painted by descendants.
+    /// </summary>
+    /// <param name="g">the graphics onto which the diagram will be 
+    /// painted</param>
+    // ------------------------------------------------------------------
+    public virtual void Paint(Graphics g) {
+      if (mIsSuspended) return;
+      this.UpdateViewMatrix();
+      //Rectangle rectangle = WorkArea;
+      g.SetClip(WorkArea);
+      //g.PageUnit = Model.MeasurementUnits;
+      //g.PageScale = Model.MeasurementScale;
+
+      //RectangleF rectangleF = ViewToWorld(DeviceToView(rectangle));
+      g.Transform = mViewMatrix;
+      mModel.CurrentPage.Paint(g, mShowGrid);
+    }
+    /*
+     public virtual void Draw(Graphics grfx)
+     {
+         Global.ViewMatrix = GetViewMatrix();
+         grfx.Clear(backgroundColor);
+         PaintRulers(grfx);
+         Rectangle rectangle = WorkArea;
+         grfx.SetClip(rectangle);
+         RectangleF rectangleF = ViewToWorld(DeviceToView(rectangle));
+         grfx.Transform = Global.ViewMatrix;
+         if (model != null)
+         {
+             grfx.PageUnit = model.MeasurementUnits;
+             grfx.PageScale = model.MeasurementScale;
+             model.DrawBackground(grfx);
+             LayoutGrid layoutGrid = Grid;
+             if (layoutGrid != null)
+             {
+                 layoutGrid.Draw(grfx);
+             }
+             if (ShowPageBounds)
+             {
+                 DrawPageBounds(grfx);
+             }
+             //draw the actual diagram
+             model.Draw(grfx, rectangleF);
+         }
+         grfx.Transform = new Matrix();
+         grfx.PageUnit = GraphicsUnit.Pixel;
+         grfx.PageScale = 1.0F;
+         DrawSelectionHandles(grfx);
+         isDirty = false;
+     }
+      */
+
+    // ------------------------------------------------------------------
+    /// <summary>
+    /// Gets the bounds of the current page, taking into account landscape
+    /// orientation and converting inches to dpi given the graphics 
+    /// resolution.
+    /// </summary>
+    /// <param name="g">Graphics</param>
+    /// <returns>Rectangle</returns>
+    // ------------------------------------------------------------------
+    //protected RectangleF GetPageBounds(Graphics g)
+    //{
+    //    float width = (float)mModel.CurrentPage.Ambience.PageSize.Width / 1000;
+    //    float height = (float)mModel.CurrentPage.Ambience.PageSize.Height / 1000;
+    //    width = width * g.DpiX;
+    //    height = height * g.DpiY;
+
+    //    if (mModel.CurrentPage.Ambience.Landscape)
+    //    {
+    //        float w = width;
+    //        width = height;
+    //        height = w;
+    //    }
+
+    //    // Offset the upper-left corner by 1 inch.
+    //    float x = 1F * g.DpiX;
+    //    float y = 1F * g.DpiY;
+
+    //    RectangleF bounds = new RectangleF(x, y, width, height);
+    //    return bounds;
+    //}
+
+    // ------------------------------------------------------------------
+    /// <summary>
+    /// Paints the background.
+    /// </summary>
+    /// <param name="g">the graphics object onto which the background or 
+    /// canvas will be painted</param>
+    // ------------------------------------------------------------------
+    public virtual void PaintBackground(Graphics g) {
+      if (g == null) return;
+      if (mShowRulers) {
+        PaintRulers(g);
+      }
+
+      g.SetClip(WorkArea);
+
+      if (mModel.CurrentPage.Ambience.BackgroundType ==
+          CanvasBackgroundTypes.FlatColor) {
+        g.FillRectangle(
+            new SolidBrush(mModel.CurrentPage.Ambience.BackgroundColor),
+            clientRectangle);
+      }
+
+      RectangleF pageBounds = mModel.CurrentPage.Bounds;
+      g.Transform = mViewMatrix;
+      //g.TranslateTransform(pageLocation.X, pageLocation.Y);
+      RectangleF rec = pageBounds;
+
+      // The shadow
+      rec.Offset(6, 6);
+      g.FillRectangle(ArtPalette.ShadowBrush, rec);
+
+      // The page itself.
+      rec.Offset(-6, -6);
+      g.FillRectangle(
+          new SolidBrush(mModel.CurrentPage.Ambience.PageColor),
+          rec);
+      g.DrawRectangle(Pens.DimGray, rec.X, rec.Y, rec.Width, rec.Height);
+
+      if (mShowPageTitle) {
+        g.DrawString(
+            Model.CurrentPage.Ambience.Title,
+            ArtPalette.TitleFont,
+            Brushes.Silver,
+            0,
+            -50);
+      }
+      g.ResetTransform();
+    }
+
+    // ------------------------------------------------------------------
+    /// <summary>
+    /// Attaches event handlers to the events raised by the model.
+    /// </summary>
+    // ------------------------------------------------------------------
+    public void AttachToModel(IModel model) {
+      if (model == null)
+        throw new ArgumentNullException(
+            "The model assigned to the view cannot be 'null'");
+      // Should I do anything to dispose the current model before 
+      // attaching the new one?
+      mModel = model;
+
+      mModel.OnAmbienceChanged +=
+          new EventHandler<AmbienceEventArgs>(mModel_OnAmbienceChanged);
+
+      mModel.OnInvalidate +=
+          new EventHandler(mModel_OnInvalidate);
+
+      mModel.OnInvalidateRectangle +=
+          new EventHandler<RectangleEventArgs>(
+          mModel_OnInvalidateRectangle);
+
+      mModel.OnCursorChange +=
+          new EventHandler<CursorEventArgs>(mModel_OnCursorChange);
+    }
+
+    // ------------------------------------------------------------------
+    /// <summary>
+    /// Attaches the view to the diagram control (aka surface).
+    /// </summary>
+    /// <param name="surface"></param>
+    // ------------------------------------------------------------------
+    private void AttachToSurface(IDiagramControl surface) {
+
+      if (surface != null) {
+        this.parentControl = surface;
+        Graphics graphics = this.Graphics;
+        dpiX = graphics.DpiX;
+        dpiY = graphics.DpiX;
+        graphics.Dispose();
+
+
+        clientRectangle =
+            Rectangle.Round(parentControl.ClientRectangle);
+
+        this.parentControl.SizeChanged +=
+            new EventHandler(parentControl_SizeChanged);
+      } else
+        throw new InconsistencyException("The surface control is 'null'");
+    }
+
+    void mModel_OnCursorChange(object sender, CursorEventArgs e) {
+      this.RaiseOnCursorChange(e.Cursor);
+    }
+
+    void mModel_OnInvalidateRectangle(object sender, RectangleEventArgs e) {
+
+      try {
+        if (!mIsSuspended) {
+          Invalidate(e.Rectangle);
+          ShowTracker();//this makes sure that the tracker is always 
+          // up to date, especially when the shape have 
+          // changed/trasnformed because of collapse/expand of material
         }
-
-        // ------------------------------------------------------------------
-        /// <summary>
-        /// Gets or sets the size of each page in thousandths of an inch.
-        /// </summary>
-        // ------------------------------------------------------------------
-        public Size PageSize
-        {
-            get
-            {
-                return mModel.CurrentPage.Ambience.PageSize;
-            }
-            set
-            {
-                foreach (IPage page in Model.Pages)
-                {
-                    page.Ambience.PageSize = value;
-                }
-                UpdateViewMatrix();
-                this.Invalidate(); 
-            }
+      }
+      catch (StackOverflowException) {
+        //TODO: automatic exception report here?
+
+        throw;
+      }
+    }
+
+    // ------------------------------------------------------------------
+    /// <summary>
+    /// Handles the OnInvalidate event of the Model.
+    /// </summary>
+    /// <param name="sender">The source of the event.</param>
+    /// <param name="e">The <see cref="T:System.EventArgs"/> instance 
+    /// containing the event data.</param>
+    // ------------------------------------------------------------------
+    void mModel_OnInvalidate(object sender, EventArgs e) {
+      if (!mIsSuspended) {
+        parentControl.Invalidate();
+      }
+    }
+
+    // ------------------------------------------------------------------
+    /// <summary>
+    /// Sets the type of the background.
+    /// </summary>
+    /// <param name="value">The value.</param>
+    // ------------------------------------------------------------------
+    public void SetBackgroundType(CanvasBackgroundTypes value) {
+
+      if (value == CanvasBackgroundTypes.Gradient) {
+        BuildGradientBrush();
+      } else if (value == CanvasBackgroundTypes.FlatColor) {
+        RaiseOnBackColorChange(
+            Model.CurrentPage.Ambience.BackgroundColor);
+      }
+      //BuildSolidBrush();
+
+
+    }
+
+    // ------------------------------------------------------------------
+    /// <summary>
+    /// Handles the OnAmbienceChanged event of the mModel control.
+    /// </summary>
+    /// <param name="sender">The source of the event.</param>
+    /// <param name="e">The <see 
+    /// cref="T:Netron.Diagramming.Core.AmbienceEventArgs"/> instance 
+    /// containing the event data.</param>
+    // ------------------------------------------------------------------
+    void mModel_OnAmbienceChanged(object sender, AmbienceEventArgs e) {
+      //redefine the brush in function of the chosen background type
+      SetBackgroundType(mModel.CurrentPage.Ambience.BackgroundType);
+      //refresh everything
+      Invalidate();
+    }
+
+    // ------------------------------------------------------------------
+    /// <summary>
+    /// Detaches from a model
+    /// </summary>
+    /// <param name="model">a diagram model</param>
+    // ------------------------------------------------------------------
+    public void DetachFromModel(Model model) {
+      throw new System.NotImplementedException();
+    }
+
+    #region Invalidate overloads
+
+    // ------------------------------------------------------------------
+    /// <summary>
+    /// Invalidates this instance.
+    /// </summary>
+    // ------------------------------------------------------------------
+    public void Invalidate() {
+      if (parentControl != null) {
+        UpdateViewMatrix();
+        parentControl.Invalidate();
+      }
+    }
+
+    // ------------------------------------------------------------------
+    /// <summary>
+    /// Invalidates the specified rectangle.
+    /// </summary>
+    /// <param name="rectangle">The rectangle.</param>
+    // ------------------------------------------------------------------
+    public void Invalidate(Rectangle rectangle) {
+      if (parentControl != null) {
+        UpdateViewMatrix();
+        rectangle = Rectangle.Round(WorldToView(rectangle));
+        //rectangle.Offset(parentControl.AutoScrollPosition.X, parentControl.AutoScrollPosition.Y);
+        //rectangle = Rectangle.Round(ViewToWorld(DeviceToView(rectangle)));
+        this.parentControl.Invalidate(rectangle);
+      }
+    }
+    #endregion
+
+    // ------------------------------------------------------------------
+    /// <summary>
+    /// Builds the gradient brush.
+    /// </summary>
+    // ------------------------------------------------------------------
+    private void BuildGradientBrush() {
+      if ((mModel == null) || (clientRectangle == RectangleF.Empty)) {
+        return;
+      }
+
+      mBackgroundBrush = new LinearGradientBrush(
+          clientRectangle,
+          mModel.CurrentPage.Ambience.BackgroundGradientColor1,
+          mModel.CurrentPage.Ambience.BackgroundGradientColor2,
+          LinearGradientMode.Vertical);
+    }
+
+    // ------------------------------------------------------------------
+    /// <summary>
+    /// Builds the solid brush.
+    /// </summary>
+    // ------------------------------------------------------------------
+    private void BuildSolidBrush() {
+      if (mModel == null || clientRectangle == RectangleF.Empty) return;
+
+      mBackgroundBrush = new SolidBrush(mModel.CurrentPage.Ambience.BackgroundColor);
+    }
+
+    // ------------------------------------------------------------------
+    /// <summary>
+    /// Raises the <see cref="OnCursorChange"/> event.
+    /// </summary>
+    /// <param name="cursor">The cursor.</param>
+    // ------------------------------------------------------------------
+    private void RaiseOnCursorChange(Cursor cursor) {
+      EventHandler<CursorEventArgs> handler = OnCursorChange;
+      if (handler != null)
+        handler(this, new CursorEventArgs(cursor));
+    }
+
+    // ------------------------------------------------------------------
+    /// <summary>
+    /// Raises the OnBakcColorChange event.
+    /// </summary>
+    /// <param name="color">The color.</param>
+    // ------------------------------------------------------------------
+    private void RaiseOnBackColorChange(Color color) {
+      EventHandler<ColorEventArgs> handler = OnBackColorChange;
+      if (handler != null)
+        handler(this, new ColorEventArgs(color));
+    }
+
+    // ------------------------------------------------------------------
+    /// <summary>
+    /// Paints the ants rectangle.
+    /// </summary>
+    /// <param name="ltPoint">The lt point.</param>
+    /// <param name="rbPoint">The rb point.</param>
+    // ------------------------------------------------------------------
+    public virtual void PaintAntsRectangle(Point ltPoint, Point rbPoint) {
+    }
+
+    // ------------------------------------------------------------------
+    /// <summary>
+    /// Paints the ghost rectangle.
+    /// </summary>
+    /// <param name="ltPoint">The lt point.</param>
+    /// <param name="rbPoint">The rb point.</param>
+    // ------------------------------------------------------------------
+    public virtual void PaintGhostRectangle(Point ltPoint, Point rbPoint) {
+    }
+
+    // ------------------------------------------------------------------
+    /// <summary>
+    /// Paints the ghost line.
+    /// </summary>
+    /// <param name="ltPoint">The lt point.</param>
+    /// <param name="rbPoint">The rb point.</param>
+    // ------------------------------------------------------------------
+    public virtual void PaintGhostLine(Point ltPoint, Point rbPoint) {
+    }
+
+    // ------------------------------------------------------------------
+    /// <summary>
+    /// Paints the ghost line.
+    /// </summary>
+    /// <param name="curveType">Type of the curve.</param>
+    /// <param name="points">The points.</param>
+    // ------------------------------------------------------------------
+    public virtual void PaintGhostLine(MultiPointType curveType, Point[] points) {
+    }
+
+    // ------------------------------------------------------------------
+    /// <summary>
+    /// Paints the ghost ellipse.
+    /// </summary>
+    /// <param name="ltPoint">The lt point.</param>
+    /// <param name="rbPoint">The rb point.</param>
+    // ------------------------------------------------------------------
+    public virtual void PaintGhostEllipse(Point ltPoint, Point rbPoint) {
+    }
+
+    // ------------------------------------------------------------------
+    /// <summary>
+    /// Paints the tracker.
+    /// </summary>
+    /// <param name="rectangle">The rectangle.</param>
+    /// <param name="showHandles">if set to <c>true</c> shows the 
+    /// handles.</param>
+    // ------------------------------------------------------------------
+    public virtual void PaintTracker(Rectangle rectangle, bool showHandles) { }
+
+    // ------------------------------------------------------------------
+    /// <summary>
+    /// Resets the ghost.
+    /// </summary>
+    // ------------------------------------------------------------------
+    public void ResetGhost() {
+      if (mGhost == null) return;
+      Rectangle rec = mGhost.Rectangle;
+      rec.Inflate(20, 20);
+      //convert it to viewspace
+      //rec = Rectangle.Round(WorldToView(rec));
+      this.Invalidate(rec);
+      mGhost = null;
+    }
+
+    // ------------------------------------------------------------------
+    /// <summary>
+    /// Resets the ants.
+    /// </summary>
+    // ------------------------------------------------------------------
+    public void ResetAnts() {
+      mAnts = null;
+    }
+
+    #region Tracker methods
+
+    // ------------------------------------------------------------------
+    /// <summary>
+    /// Resets the tracker.
+    /// </summary>
+    // ------------------------------------------------------------------
+    public void ResetTracker() {
+      if (mTracker == null) return;
+      Rectangle rec = mTracker.Rectangle;
+      rec.Inflate(20, 20);
+      mTracker = null;
+      Invalidate(rec);
+    }
+
+    // ------------------------------------------------------------------
+    /// <summary>
+    /// Hides the tracker.
+    /// </summary>
+    // ------------------------------------------------------------------
+    public void HideTracker() {
+      if (mTracker == null) return;
+      //let's be efficient and refresh only what's necessary
+      Rectangle rec = mTracker.Rectangle;
+      rec.Inflate(20, 20);
+      mTracker = null;
+      this.Invalidate(rec);
+    }
+
+    // ------------------------------------------------------------------
+    /// <summary>
+    /// Shows the tracker.
+    /// </summary>
+    // ------------------------------------------------------------------
+    public void ShowTracker() {
+      if (this.Model.Selection.SelectedItems != null &&
+         this.Model.Selection.SelectedItems.Count > 0) {
+        CollectionBase<IDiagramEntity> ents = this.Model.Selection.SelectedItems;
+        bool showHandles = false;
+
+        Rectangle rec = ents[0].Rectangle;
+        foreach (IDiagramEntity entity in ents) {
+          rec = Rectangle.Union(rec, entity.Rectangle);
+          showHandles |= entity.Resizable;
         }
-
-        // ------------------------------------------------------------------
-        /// <summary>
-        /// Gets or sets if each page is rendered and printed in landscape
-        /// orientation.
-        /// </summary>
-        // ------------------------------------------------------------------
-        public bool Landscape
-        {
-            get
-            {
-                return mLandscape;
-            }
-            set
-            {
-                mLandscape = value;
-                foreach (IPage page in mModel.Pages)
-                {
-                    page.Ambience.Landscape = value;
-                }
-                this.Invalidate(); 
-            }
+        // Make the tracker slightly bigger than the actual bounding 
+        // rectangle.
+        rec.Inflate(TrackerOffset, TrackerOffset);
+
+        this.PaintTracker(rec, showHandles);
+
+      } else //if the selection is 'null' or empty we annihilate the current tracker
+        ResetTracker();
+    }
+    #endregion
+
+    // ------------------------------------------------------------------
+    /// <summary>
+    /// Suspends the invalidation of the view, which means that the
+    /// Invalidate() method calls from any entity will be discarded until 
+    /// Resume() has been called.
+    /// </summary>
+    // ------------------------------------------------------------------
+    public void Suspend() {
+      mIsSuspended = true;
+    }
+
+    // ------------------------------------------------------------------
+    /// <summary>
+    /// Resumes the invalidation of the view.
+    /// </summary>
+    // ------------------------------------------------------------------
+    public void Resume() {
+      mIsSuspended = false;
+      parentControl.Invalidate();
+    }
+
+    #region Rulers
+
+    // ------------------------------------------------------------------
+    /// <summary>
+    /// Paints the horizontal and vertical rulers.
+    /// </summary>
+    /// <param name="g">Graphics</param>
+    // ------------------------------------------------------------------
+    protected virtual void PaintRulers(Graphics g) {
+      PaintMarginIntersection(g);
+      HorizontalRuler horizontalRuler = HorizontalRuler;
+      if (horizontalRuler != null && horizontalRuler.Visible) {
+        horizontalRuler.Paint(g);
+      }
+      VerticalRuler verticalRuler = VerticalRuler;
+      if (verticalRuler != null && verticalRuler.Visible) {
+        verticalRuler.Paint(g);
+      }
+    }
+
+    protected virtual void PaintMarginIntersection(Graphics g) {
+      Rectangle rectangle = new Rectangle(Bounds.X, Bounds.Y, LeftMargin, TopMargin);
+      g.FillRectangle(ArtPalette.RullerFillBrush, rectangle);
+    }
+
+    protected virtual HorizontalRuler CreateHorizontalRuler() {
+      return new HorizontalRuler(this);
+    }
+
+    protected virtual VerticalRuler CreateVerticalRuler() {
+      return new VerticalRuler(this);
+    }
+
+    [BrowsableAttribute(true)]
+    [DesignerSerializationVisibilityAttribute(DesignerSerializationVisibility.Visible)]
+    public int RulerSize {
+      get {
+        return mRulerSize;
+      }
+
+      set {
+        mRulerSize = value;
+      }
+    }
+
+    [DesignerSerializationVisibilityAttribute(DesignerSerializationVisibility.Hidden)]
+    [BrowsableAttribute(false)]
+    public virtual int LeftMargin {
+      get {
+        if ((verticalRuler != null) &&
+        (verticalRuler.Visible) &&
+        (mShowRulers)) {
+          return RulerSize;
+        } else {
+          return 0;
         }
-
-        // ------------------------------------------------------------------
-        /// <summary>
-        /// Gets or sets if the rulers are shown are not.  I don't recommend
-        /// showing them just yet :)
-        /// </summary>
-        // ------------------------------------------------------------------
-        public bool ShowRulers
-        {
-            get 
-            { 
-                return mShowRulers; 
-            }
-            set 
-            {
-                mShowRulers = value;
-                UpdateViewMatrix();
-                this.Invalidate();
-            }
+      }
+    }
+    [BrowsableAttribute(false)]
+    [DesignerSerializationVisibilityAttribute(DesignerSerializationVisibility.Hidden)]
+    public virtual int TopMargin {
+      get {
+        if ((horizontalRuler != null) &&
+            (horizontalRuler.Visible) &&
+            (mShowRulers)) {
+          return RulerSize;
+        } else
+          return 0;
+      }
+    }
+
+    [BrowsableAttribute(false)]
+    [DesignerSerializationVisibilityAttribute(DesignerSerializationVisibility.Hidden)]
+    public Rectangle LeftMarginBounds {
+      get {
+        return new Rectangle(
+            Bounds.X,
+            Bounds.Y,
+            LeftMargin,
+            Bounds.Height);
+      }
+    }
+
+
+
+    [DesignerSerializationVisibilityAttribute(DesignerSerializationVisibility.Hidden)]
+    [BrowsableAttribute(false)]
+    public Rectangle TopMarginBounds {
+      get {
+        return new Rectangle(
+            Bounds.X,
+            Bounds.Y,
+            Bounds.Width,
+            TopMargin);
+      }
+    }
+
+    /// <summary>
+    /// Gets the work area, i.e. the rectangle of the surface control without the rulers.
+    /// </summary>
+    /// <value>The work area.</value>
+    [BrowsableAttribute(false)]
+    [DesignerSerializationVisibilityAttribute(DesignerSerializationVisibility.Hidden)]
+    public virtual Rectangle WorkArea {
+      get {
+        Rectangle rectangle = Bounds;
+        rectangle.X = rectangle.Left + LeftMargin + 1;
+        rectangle.Y = rectangle.Top + TopMargin + 1;
+        return rectangle;
+      }
+    }
+
+    [BrowsableAttribute(false)]
+    [DesignerSerializationVisibilityAttribute(DesignerSerializationVisibility.Hidden)]
+    public Rectangle HorizontalRulerBounds {
+      get {
+        int lm = LeftMargin;
+        int tm = TopMargin;
+        return new Rectangle(Bounds.X + lm, Bounds.Y, Bounds.Width - lm, tm);
+      }
+    }
+
+    [BrowsableAttribute(false)]
+    [DesignerSerializationVisibilityAttribute(DesignerSerializationVisibility.Hidden)]
+    public Rectangle VerticalRulerBounds {
+      get {
+        int i = LeftMargin;
+        int j = TopMargin;
+        return new Rectangle(Bounds.X, Bounds.Y + j, i, Bounds.Height - j);
+      }
+    }
+    [CategoryAttribute("Rulers")]
+    [BrowsableAttribute(true)]
+    [DesignerSerializationVisibilityAttribute(DesignerSerializationVisibility.Content)]
+    public HorizontalRuler HorizontalRuler {
+      get {
+        if (horizontalRuler == null) {
+          horizontalRuler = CreateHorizontalRuler();
         }
-
-        // ------------------------------------------------------------------
-        /// <summary>
-        /// Gets the view matrix.
-        /// </summary>
-        /// <value>The view matrix.</value>
-        // ------------------------------------------------------------------
-        public Matrix ViewMatrix
-        {
-            get { return mViewMatrix; }
+        return horizontalRuler;
+      }
+    }
+
+    [DesignerSerializationVisibilityAttribute(
+        DesignerSerializationVisibility.Content)]
+    [BrowsableAttribute(true)]
+    [CategoryAttribute("Rulers")]
+    public VerticalRuler VerticalRuler {
+      get {
+        if (verticalRuler == null) {
+          verticalRuler = CreateVerticalRuler();
         }
-
-        // ------------------------------------------------------------------
-        /// <summary>
-        /// Gets the inverted view matrix.
-        /// </summary>
-        // ------------------------------------------------------------------
-        public Matrix InvertedViewMatrix
-        {
-            get { return mInvertedViewMatrix; }
+        return verticalRuler;
+      }
+    }
+    #endregion
+
+    #region World-View-Device Conversions
+
+    #region View to device
+    public Point ViewToDevice(PointF ptView) {
+      float f1 = 1.0F;
+      float f2 = 1.0F;
+      float f3 = 1.0F;
+      float f4 = 1.0F;
+      if (mModel != null) {
+        if (mModel.MeasurementUnits != GraphicsUnit.Pixel) {
+          f1 = Measurements.UnitsPerInch(mModel.MeasurementUnits);
+          f3 = dpiX / f1;
+          f4 = dpiX / f1;
         }
-
-        // ------------------------------------------------------------------
-        /// <summary>
-        /// Gets or sets the scaling factor of the current page.
-        /// </summary>
-        // ------------------------------------------------------------------
-        public SizeF Magnification
-        {
-            get
-            {
-                //return mMagnification;
-                return Model.CurrentPage.Magnification;
-            }
-            set
-            {   
-                Model.CurrentPage.Magnification = value;                
-                UpdateViewMatrix();
-                this.Invalidate();
-            }
+        f2 = mModel.MeasurementScale;
+      }
+      int i = (int)Math.Round((double)(ptView.X * f2 * f3));
+      int j = (int)Math.Round((double)(ptView.Y * f2 * f4));
+      return new Point(i, j);
+    }
+
+    public Size ViewToDevice(SizeF szView) {
+      float f1 = 1.0F;
+      float f2 = 1.0F;
+      float f3 = 1.0F;
+      float f4 = 1.0F;
+      if (mModel != null) {
+        if (mModel.MeasurementUnits != GraphicsUnit.Pixel) {
+          f1 = Measurements.UnitsPerInch(mModel.MeasurementUnits);
+          f3 = dpiX / f1;
+          f4 = dpiX / f1;
         }
-
-        // ------------------------------------------------------------------
-        /// <summary>
-        /// Pans the current page with the given shift.
-        /// </summary>
-        // ------------------------------------------------------------------
-        public Point Origin
-        {
-            get
-            {
-                return Model.CurrentPage.Origin;
-            }
-            set
-            {
-                Model.CurrentPage.Origin = value;
-                UpdateViewMatrix();
-                this.Invalidate();
-            }
+        f2 = mModel.MeasurementScale;
+      }
+      int i = (int)(szView.Width * f2 * f3);
+      int j = (int)(szView.Height * f2 * f4);
+      return new Size(i, j);
+    }
+
+    public PointF ViewToDeviceF(PointF ptView) {
+      float f3 = 1.0F;
+      float f4 = 1.0F;
+      float f5 = 1.0F;
+      float f6 = 1.0F;
+      if (mModel != null) {
+        if (mModel.MeasurementUnits != GraphicsUnit.Pixel) {
+          f3 = Measurements.UnitsPerInch(mModel.MeasurementUnits);
+          f5 = dpiX / f3;
+          f6 = dpiX / f3;
         }
-
-        // ------------------------------------------------------------------
-        /// <summary>
-        /// Gets the graphics object of the surface.
-        /// </summary>
-        // ------------------------------------------------------------------
-        public Graphics Graphics
-        {
-            get
-            {  
-                if (this.parentControl != null)
-                    return Graphics.FromHwnd((this.parentControl as Control).Handle);
-                else
-                    return null;
-            }
+        f4 = mModel.MeasurementScale;
+      }
+      float f1 = ptView.X * f4 * f5;
+      float f2 = ptView.Y * f4 * f6;
+      return new PointF(f1, f2);
+    }
+
+    public Rectangle ViewToDevice(RectangleF rcView) {
+      PointF pointF1 = new PointF(rcView.Left, rcView.Top);
+      PointF pointF2 = new PointF(rcView.Right, rcView.Bottom);
+      Point point1 = ViewToDevice(pointF1);
+      Point point2 = ViewToDevice(pointF2);
+      return new Rectangle(point1.X, point1.Y, point2.X - point1.X, point2.Y - point1.Y);
+    }
+
+    public void ViewToDevice(PointF[] viewPts, out Point[] devicePts) {
+      devicePts = new Point[(int)viewPts.Length];
+      for (int i = 0; i < (int)viewPts.Length; i++) {
+        devicePts[i] = ViewToDevice(viewPts[i]);
+      }
+    }
+
+    public SizeF ViewToDeviceF(SizeF szView) {
+      float f3 = 1.0F;
+      float f4 = 1.0F;
+      float f5 = 1.0F;
+      float f6 = 1.0F;
+      if (mModel != null) {
+        if (mModel.MeasurementUnits != GraphicsUnit.Pixel) {
+          f3 = Measurements.UnitsPerInch(mModel.MeasurementUnits);
+          f5 = dpiX / f3;
+          f6 = dpiX / f3;
         }
-
-        internal readonly static int TrackerOffset = 5;
-
-        // ------------------------------------------------------------------
-        /// <summary>
-        /// Gets the current cursor
-        /// </summary>
-        // ------------------------------------------------------------------
-        public Cursor CurrentCursor
-        {
-            get { return mCurrentCursor; }
-            set
-            {
-                mCurrentCursor = value;
-                RaiseOnCursorChange(value);
-            }
+        f4 = mModel.MeasurementScale;
+      }
+      float f1 = szView.Width * f4 * f5;
+      float f2 = szView.Height * f4 * f6;
+      return new SizeF(f1, f2);
+    }
+
+    public RectangleF ViewToDeviceF(RectangleF rcView) {
+      PointF pointF1 = new PointF(rcView.Left, rcView.Top);
+      PointF pointF2 = new PointF(rcView.Right, rcView.Bottom);
+      PointF pointF3 = ViewToDeviceF(pointF1);
+      PointF pointF4 = ViewToDeviceF(pointF2);
+      return new RectangleF(pointF3.X, pointF3.Y, pointF4.X - pointF3.X, pointF4.Y - pointF3.Y);
+    }
+    #endregion
+
+    #region World to view
+
+    public RectangleF WorldToView(RectangleF rcWorld) {
+      PointF[] pointFs = new PointF[2];
+      pointFs[0].X = rcWorld.Left;
+      pointFs[0].Y = rcWorld.Top;
+      pointFs[1].X = rcWorld.Right;
+      pointFs[1].Y = rcWorld.Bottom;
+      mViewMatrix.TransformPoints(pointFs);
+      return new RectangleF(pointFs[0].X, pointFs[0].Y, pointFs[1].X - pointFs[0].X, pointFs[1].Y - pointFs[0].Y);
+    }
+
+    public PointF WorldToView(PointF ptWorld) {
+      PointF[] pointFs1 = new PointF[] { ptWorld };
+      mViewMatrix.TransformPoints(pointFs1);
+      return pointFs1[0];
+    }
+
+    public void WorldToView(PointF[] worldPts, out PointF[] viewPts) {
+      viewPts = (PointF[])worldPts.Clone();
+      mViewMatrix.TransformPoints(viewPts);
+    }
+
+    public SizeF WorldToView(SizeF szWorld) {
+      PointF[] pointFs1 = new PointF[] { new PointF(szWorld.Width, szWorld.Height) };
+      Matrix matrix = new Matrix();
+      matrix.Scale(Magnification.Width / 100.0F, Magnification.Height / 100.0F);
+      matrix.TransformPoints(pointFs1);
+      return new SizeF(pointFs1[0].X, pointFs1[0].Y);
+    }
+
+    #endregion
+
+    #region View to world
+
+    /// <summary>
+    /// Converts the given point from View coordinates to the absolute World coordinates.
+    /// </summary>
+    /// <param name="ptView">The pt view.</param>
+    /// <returns></returns>
+    public PointF ViewToWorld(PointF ptView) {
+      PointF[] pointFs1 = new PointF[] { ptView };
+      //Matrix matrix = mInvertedViewMatrix;
+      //the view transformation has to be inverted since the transform is from world to view coordinates
+      //matrix.Invert();
+      mInvertedViewMatrix.TransformPoints(pointFs1);
+      return pointFs1[0];
+    }
+
+    /// <summary>
+    /// Converts the given rectangle from View coordinates to the absolute World coordinates.
+    /// </summary>
+    /// <param name="rcView">The rc view.</param>
+    /// <returns></returns>
+    public RectangleF ViewToWorld(RectangleF rcView) {
+      PointF[] pointFs = new PointF[2];
+      pointFs[0].X = rcView.Left;
+      pointFs[0].Y = rcView.Top;
+      pointFs[1].X = rcView.Right;
+      pointFs[1].Y = rcView.Bottom;
+      //Matrix matrix = GetViewMatrix();
+      //matrix.Invert();
+      mInvertedViewMatrix.TransformPoints(pointFs);
+      return new RectangleF(pointFs[0].X, pointFs[0].Y, pointFs[1].X - pointFs[0].X, pointFs[1].Y - pointFs[0].Y);
+    }
+
+    /// <summary>
+    /// Converts the given rectangle from View coordinates to the absolute World coordinates.
+    /// </summary>
+    /// <param name="rectangle">The rectangle.</param>
+    /// <returns></returns>
+    public Rectangle ViewToWorld(Rectangle rectangle) {
+      Point[] pts = new Point[2];
+      pts[0].X = rectangle.Left;
+      pts[0].Y = rectangle.Top;
+      pts[1].X = rectangle.Right;
+      pts[1].Y = rectangle.Bottom;
+      //Matrix matrix = GetViewMatrix();
+      //matrix.Invert();
+      mInvertedViewMatrix.TransformPoints(pts);
+      return new Rectangle(pts[0].X, pts[0].Y, pts[1].X - pts[0].X, pts[1].Y - pts[0].Y);
+    }
+
+    /// <summary>
+    /// Converts the given size from View coordinates to the absolute World coordinates.
+    /// </summary>
+    /// <param name="szView">The sz view.</param>
+    /// <returns></returns>
+    public SizeF ViewToWorld(SizeF szView) {
+      PointF[] pointFs1 = new PointF[] { new PointF(szView.Width, szView.Height) };
+      Matrix matrix = new Matrix();
+      matrix.Scale(Magnification.Width / 100.0F, Magnification.Height / 100.0F);
+      matrix.Invert();
+      matrix.TransformPoints(pointFs1);
+      return new SizeF(pointFs1[0].X, pointFs1[0].Y);
+    }
+
+    /// <summary>
+    /// Converts the given point array from View coordinates to the absolute World coordinates.
+    /// </summary>
+    /// <param name="viewPts">The view PTS.</param>
+    /// <param name="worldPts">The world PTS.</param>
+    public void ViewToWorld(PointF[] viewPts, out PointF[] worldPts) {
+      worldPts = (PointF[])viewPts.Clone();
+      //Matrix matrix = GetViewMatrix();
+      //matrix.Invert();
+      mInvertedViewMatrix.TransformPoints(worldPts);
+    }
+
+    #endregion
+
+    #region Device to view
+
+    public PointF DeviceToView(Point ptDevice) {
+      float f3 = 1.0F;
+      float f4 = 1.0F;
+      float f5 = 1.0F;
+      float f6 = 1.0F;
+      if (mModel != null) {
+        if (mModel.MeasurementUnits != GraphicsUnit.Pixel) {
+          f3 = Measurements.UnitsPerInch(mModel.MeasurementUnits);
+          f5 = dpiX / f3;
+          f6 = dpiY / f3;
         }
-
-        // ------------------------------------------------------------------
-        /// <summary>
-        /// Gets the background brush
-        /// </summary>
-        // ------------------------------------------------------------------
-        internal Brush BackgroundBrush
-        {
-            get
-            {
-                return mBackgroundBrush;
-            }
+        f4 = mModel.MeasurementScale;
+      }
+      float f1 = (float)ptDevice.X / (f4 * f5);
+      float f2 = (float)ptDevice.Y / (f4 * f6);
+      return new PointF(f1, f2);
+    }
+
+    public void DeviceToView(Point[] devicePts, out PointF[] viewPts) {
+      viewPts = new PointF[(int)devicePts.Length];
+      for (int i = 0; i < (int)devicePts.Length; i++) {
+        viewPts[i] = DeviceToView(devicePts[i]);
+      }
+    }
+
+    public RectangleF DeviceToView(Rectangle rcDevice) {
+      Point point1 = new Point(rcDevice.Left, rcDevice.Top);
+      Point point2 = new Point(rcDevice.Right, rcDevice.Bottom);
+      PointF pointF1 = DeviceToView(point1);
+      PointF pointF2 = DeviceToView(point2);
+      return new RectangleF(pointF1.X, pointF1.Y, pointF2.X - pointF1.X, pointF2.Y - pointF1.Y);
+    }
+
+    public SizeF DeviceToView(Size szDevice) {
+      float f3 = 1.0F;
+      float f4 = 1.0F;
+      float f5 = 1.0F;
+      float f6 = 1.0F;
+      if (mModel != null) {
+        if (mModel.MeasurementUnits != GraphicsUnit.Pixel) {
+          f3 = Measurements.UnitsPerInch(mModel.MeasurementUnits);
+          f5 = dpiX / f3;
+          f6 = dpiY / f3;
         }
-
-        // ------------------------------------------------------------------
-        /// <summary>
-        /// Gets or sets the model
-        /// </summary>
-        // ------------------------------------------------------------------
-        public IModel Model
-        {
-            get
-            {
-                return mModel;
-            }
-            set
-            {
-                mModel = value;
-                AttachToModel(mModel);
-            }
-        }
-
-        // ------------------------------------------------------------------
-        /// <summary>
-        /// Gets the ghost.
-        /// </summary>
-        /// <value>The ghost.</value>
-        // ------------------------------------------------------------------
-        public  IGhost Ghost
-        {
-            get { return mGhost; }
-            protected set { mGhost = value;}
-        }
-
-        // ------------------------------------------------------------------
-        /// <summary>
-        /// Gets the ants.
-        /// </summary>
-        /// <value>The ants.</value>
-        // ------------------------------------------------------------------
-        public IAnts Ants
-        {
-            get { return mAnts; }
-            protected set { mAnts = value; }
-        }
-
-        // ------------------------------------------------------------------
-        /// <summary>
-        /// Gets or sets the tracker.
-        /// </summary>
-        /// <value>The tracker.</value>
-        // ------------------------------------------------------------------
-        public ITracker Tracker
-        {
-            get { return mTracker; }
-            set { mTracker = value; }
-        }
-
-        // ------------------------------------------------------------------
-        /// <summary>
-        /// Gets the client bounds.
-        /// </summary>
-        // ------------------------------------------------------------------
-        public Rectangle Bounds
-        {
-            get { return clientRectangle; }
-        }
-
-        [BrowsableAttribute(true)]
-        [DesignerSerializationVisibilityAttribute(DesignerSerializationVisibility.Visible)]
-        public MeasurementsUnit RulerUnits
-        {
-            get
-            {
-                    return MeasurementsUnit.Inches;
-            }
-
-        }
-
-
-        #endregion
-
-        #region Constructor
-
-        // ------------------------------------------------------------------
-        ///<summary>
-        ///Default constructor
-        ///</summary>
-        // ------------------------------------------------------------------
-        protected ViewBase(IDiagramControl surface)
-        {
-            if (surface == null)
-                throw new NullReferenceException();
-
-            // Render and print each page in landscape.
-            mLandscape = true;
-
-            AttachToSurface(surface);
-        }
-
-        // ------------------------------------------------------------------
-        /// <summary>
-        /// Initializes a new instance of the <see cref="T:ViewBase"/> class.
-        /// </summary>
-        // ------------------------------------------------------------------
-        protected ViewBase()
-        { }
-        
-        #endregion
-
-        #region Methods
-
-        // ------------------------------------------------------------------
-        /// <summary>
-        /// Updates the view and inverted view matrices.
-        /// </summary>
-        // ------------------------------------------------------------------
-        private void UpdateViewMatrix()
-        {
-            mViewMatrix = GetViewMatrix();
-            //set the inverted view matrix
-            mInvertedViewMatrix = mViewMatrix.Clone();
-            mInvertedViewMatrix.Invert();
-        }
-
-        // ------------------------------------------------------------------
-        /// <summary>
-        /// Handles the SizeChanged event of the parentControl control.
-        /// </summary>
-        /// <param name="sender">The source of the event.</param>
-        /// <param name="e">The <see cref="T:System.EventArgs"/> instance 
-        /// containing the event data.</param>
-        // ------------------------------------------------------------------
-        void parentControl_SizeChanged(object sender, EventArgs e)
-        {
-            clientRectangle = Rectangle.Round(parentControl.ClientRectangle);
-            //redefine the brush in function of the chosen background type
-            SetBackgroundType(Model.CurrentPage.Ambience.BackgroundType);
-            Invalidate();
-        }
-
-        // ------------------------------------------------------------------
-        /// <summary>
-        /// Paints the diagram on the canvas. Adornments and other stuff 
-        /// (ghosts, ants and so on) have to be painted by descendants.
-        /// </summary>
-        /// <param name="g">the graphics onto which the diagram will be 
-        /// painted</param>
-        // ------------------------------------------------------------------
-        public virtual void Paint(Graphics g)
-        {
-            if (mIsSuspended) return;
-            this.UpdateViewMatrix();
-            //Rectangle rectangle = WorkArea;
-            g.SetClip(WorkArea);
-            //g.PageUnit = Model.MeasurementUnits;
-            //g.PageScale = Model.MeasurementScale;
-            
-            //RectangleF rectangleF = ViewToWorld(DeviceToView(rectangle));
-            g.Transform = mViewMatrix;
-            mModel.CurrentPage.Paint(g, mShowGrid);
-        }
-       /*
-        public virtual void Draw(Graphics grfx)
-        {
-            Global.ViewMatrix = GetViewMatrix();
-            grfx.Clear(backgroundColor);
-            PaintRulers(grfx);
-            Rectangle rectangle = WorkArea;
-            grfx.SetClip(rectangle);
-            RectangleF rectangleF = ViewToWorld(DeviceToView(rectangle));
-            grfx.Transform = Global.ViewMatrix;
-            if (model != null)
-            {
-                grfx.PageUnit = model.MeasurementUnits;
-                grfx.PageScale = model.MeasurementScale;
-                model.DrawBackground(grfx);
-                LayoutGrid layoutGrid = Grid;
-                if (layoutGrid != null)
-                {
-                    layoutGrid.Draw(grfx);
-                }
-                if (ShowPageBounds)
-                {
-                    DrawPageBounds(grfx);
-                }
-                //draw the actual diagram
-                model.Draw(grfx, rectangleF);
-            }
-            grfx.Transform = new Matrix();
-            grfx.PageUnit = GraphicsUnit.Pixel;
-            grfx.PageScale = 1.0F;
-            DrawSelectionHandles(grfx);
-            isDirty = false;
-        }
-         */
-
-        // ------------------------------------------------------------------
-        /// <summary>
-        /// Gets the bounds of the current page, taking into account landscape
-        /// orientation and converting inches to dpi given the graphics 
-        /// resolution.
-        /// </summary>
-        /// <param name="g">Graphics</param>
-        /// <returns>Rectangle</returns>
-        // ------------------------------------------------------------------
-        //protected RectangleF GetPageBounds(Graphics g)
-        //{
-        //    float width = (float)mModel.CurrentPage.Ambience.PageSize.Width / 1000;
-        //    float height = (float)mModel.CurrentPage.Ambience.PageSize.Height / 1000;
-        //    width = width * g.DpiX;
-        //    height = height * g.DpiY;
-
-        //    if (mModel.CurrentPage.Ambience.Landscape)
-        //    {
-        //        float w = width;
-        //        width = height;
-        //        height = w;
-        //    }
-
-        //    // Offset the upper-left corner by 1 inch.
-        //    float x = 1F * g.DpiX;
-        //    float y = 1F * g.DpiY;
-
-        //    RectangleF bounds = new RectangleF(x, y, width, height);
-        //    return bounds;
-        //}
-
-        // ------------------------------------------------------------------
-        /// <summary>
-        /// Paints the background.
-        /// </summary>
-        /// <param name="g">the graphics object onto which the background or 
-        /// canvas will be painted</param>
-        // ------------------------------------------------------------------
-        public virtual void PaintBackground(Graphics g)
-        {
-            if (g == null) return;
-            if (mShowRulers)
-            {
-                PaintRulers(g);
-            }
-
-            g.SetClip(WorkArea);
-
-            if (mModel.CurrentPage.Ambience.BackgroundType ==
-                CanvasBackgroundTypes.FlatColor)
-            {
-                g.FillRectangle(
-                    new SolidBrush(mModel.CurrentPage.Ambience.BackgroundColor),
-                    clientRectangle);
-            }
-
-            RectangleF pageBounds = mModel.CurrentPage.Bounds;
-            g.Transform = mViewMatrix;
-            //g.TranslateTransform(pageLocation.X, pageLocation.Y);
-            RectangleF rec = pageBounds;
-
-            // The shadow
-            rec.Offset(6, 6);
-            g.FillRectangle(ArtPalette.ShadowBrush, rec);
-
-            // The page itself.
-            rec.Offset(-6, -6);
-            g.FillRectangle(
-                new SolidBrush(mModel.CurrentPage.Ambience.PageColor),
-                rec);
-            g.DrawRectangle(Pens.DimGray, rec.X, rec.Y, rec.Width, rec.Height);
-
-            if (mShowPageTitle)
-            {
-                g.DrawString(
-                    Model.CurrentPage.Ambience.Title,
-                    ArtPalette.TitleFont,
-                    Brushes.Silver,
-                    0,
-                    -50);
-            }
-            g.ResetTransform();
-        }
-
-        // ------------------------------------------------------------------
-        /// <summary>
-        /// Attaches event handlers to the events raised by the model.
-        /// </summary>
-        // ------------------------------------------------------------------
-        public void AttachToModel(IModel model)
-        {
-            if (model == null)
-                throw new ArgumentNullException(
-                    "The model assigned to the view cannot be 'null'");
-            // Should I do anything to dispose the current model before 
-            // attaching the new one?
-            mModel = model;
-
-            mModel.OnAmbienceChanged += 
-                new EventHandler<AmbienceEventArgs>(mModel_OnAmbienceChanged);
-
-            mModel.OnInvalidate += 
-                new EventHandler(mModel_OnInvalidate);
-
-            mModel.OnInvalidateRectangle += 
-                new EventHandler<RectangleEventArgs>(
-                mModel_OnInvalidateRectangle);
-
-            mModel.OnCursorChange += 
-                new EventHandler<CursorEventArgs>(mModel_OnCursorChange);
-        }
-
-        // ------------------------------------------------------------------
-        /// <summary>
-        /// Attaches the view to the diagram control (aka surface).
-        /// </summary>
-        /// <param name="surface"></param>
-        // ------------------------------------------------------------------
-        private void AttachToSurface(IDiagramControl surface)
-        {
-
-            if (surface != null)
-            {
-                this.parentControl = surface;
-                Graphics graphics = this.Graphics;
-                dpiX = graphics.DpiX;
-                dpiY = graphics.DpiX;
-                graphics.Dispose();
-
-               
-                clientRectangle = 
-                    Rectangle.Round(parentControl.ClientRectangle);
-
-                this.parentControl.SizeChanged += 
-                    new EventHandler(parentControl_SizeChanged);
-            }
-            else
-                throw new InconsistencyException("The surface control is 'null'");
-        }
-
-        void mModel_OnCursorChange(object sender, CursorEventArgs e)
-        {
-            this.RaiseOnCursorChange(e.Cursor);
-        }
-
-        void mModel_OnInvalidateRectangle(object sender, RectangleEventArgs e)
-        {
-
-            try
-            {
-                if (!mIsSuspended)
-                {
-                    Invalidate(e.Rectangle);
-                    ShowTracker();//this makes sure that the tracker is always 
-                    // up to date, especially when the shape have 
-                    // changed/trasnformed because of collapse/expand of material
-                }
-            }
-            catch(StackOverflowException)
-            {
-                //TODO: automatic exception report here?
-
-                throw;
-            }
-        }
-
-        // ------------------------------------------------------------------
-        /// <summary>
-        /// Handles the OnInvalidate event of the Model.
-        /// </summary>
-        /// <param name="sender">The source of the event.</param>
-        /// <param name="e">The <see cref="T:System.EventArgs"/> instance 
-        /// containing the event data.</param>
-        // ------------------------------------------------------------------
-        void mModel_OnInvalidate(object sender, EventArgs e)
-        {
-            if (!mIsSuspended)
-            {
-                parentControl.Invalidate();
-            }
-        }
-
-        // ------------------------------------------------------------------
-        /// <summary>
-        /// Sets the type of the background.
-        /// </summary>
-        /// <param name="value">The value.</param>
-        // ------------------------------------------------------------------
-        public void SetBackgroundType(CanvasBackgroundTypes value)
-        {
-
-            if (value == CanvasBackgroundTypes.Gradient)
-            {
-                BuildGradientBrush();
-            }
-            else if (value == CanvasBackgroundTypes.FlatColor)
-            {
-                RaiseOnBackColorChange(
-                    Model.CurrentPage.Ambience.BackgroundColor);
-            }
-                //BuildSolidBrush();
-
-
-        }
-
-        // ------------------------------------------------------------------
-        /// <summary>
-        /// Handles the OnAmbienceChanged event of the mModel control.
-        /// </summary>
-        /// <param name="sender">The source of the event.</param>
-        /// <param name="e">The <see 
-        /// cref="T:Netron.Diagramming.Core.AmbienceEventArgs"/> instance 
-        /// containing the event data.</param>
-        // ------------------------------------------------------------------
-        void mModel_OnAmbienceChanged(object sender, AmbienceEventArgs e)
-        {
-            //redefine the brush in function of the chosen background type
-            SetBackgroundType(mModel.CurrentPage.Ambience.BackgroundType);
-            //refresh everything
-            Invalidate();
-        }
-
-        // ------------------------------------------------------------------
-        /// <summary>
-        /// Detaches from a model
-        /// </summary>
-        /// <param name="model">a diagram model</param>
-        // ------------------------------------------------------------------
-        public void DetachFromModel(Model model)
-        {
-            throw new System.NotImplementedException();
-        }
-
-        #region Invalidate overloads
-
-        // ------------------------------------------------------------------
-        /// <summary>
-        /// Invalidates this instance.
-        /// </summary>
-        // ------------------------------------------------------------------
-        public void Invalidate()
-        {
-            if (parentControl != null)
-            {
-                UpdateViewMatrix();
-                parentControl.Invalidate();
-            }
-        }
-
-        // ------------------------------------------------------------------
-        /// <summary>
-        /// Invalidates the specified rectangle.
-        /// </summary>
-        /// <param name="rectangle">The rectangle.</param>
-        // ------------------------------------------------------------------
-        public void Invalidate(Rectangle rectangle)
-        {
-            if (parentControl != null)
-            {
-                UpdateViewMatrix();                                                    
-                rectangle = Rectangle.Round(WorldToView(rectangle));
-                //rectangle.Offset(parentControl.AutoScrollPosition.X, parentControl.AutoScrollPosition.Y);
-                //rectangle = Rectangle.Round(ViewToWorld(DeviceToView(rectangle)));
-                this.parentControl.Invalidate(rectangle);
-            }
+        f4 = mModel.MeasurementScale;
+      }
+      float f1 = (float)szDevice.Width / (f4 * f5);
+      float f2 = (float)szDevice.Height / (f4 * f6);
+      return new SizeF(f1, f2);
+    }
+
+    #endregion
+
+    #endregion
+
+    // ------------------------------------------------------------------
+    /// <summary>
+    /// Returns the matrix corresponding to the translation and scaling 
+    /// of the canvas.
+    /// </summary>
+    /// <returns>Matrix</returns>
+    // ------------------------------------------------------------------
+    public Matrix GetViewMatrix() {
+      Matrix matrix = new Matrix();
+
+      matrix.Scale(
+          Magnification.Width / 100.0F,
+          Magnification.Height / 100.0F);
+
+      matrix.Translate(-Origin.X, -Origin.Y);
+
+      Size size = new Size(LeftMargin, TopMargin);
+      SizeF sizeF = ViewToWorld(DeviceToView(size));
+      matrix.Translate(sizeF.Width, sizeF.Height);
+      return matrix;
+    }
+
+    // ------------------------------------------------------------------
+    /// <summary>
+    /// Sets the magnification and origin of the diagram such that
+    /// all entities in the current page are in view.
+    /// </summary>
+    // ------------------------------------------------------------------
+    public virtual void ZoomFit() {
+      Bundle bundle = new Bundle(this.Model.CurrentPage.Entities);
+      Rectangle bundleBounds = bundle.Rectangle;
+      bundleBounds.Inflate(20, 20);
+      bundleBounds.Offset(-10, -10);
+      this.ZoomArea(bundleBounds);
+    }
+
+    // ------------------------------------------------------------------
+    /// <summary>
+    /// Zooms the diagram to the area specified.
+    /// </summary>
+    /// <param name="areaInWorldCoords">Rectangle: The area to zoom in world 
+    /// coordinates.</param>
+    // ------------------------------------------------------------------
+    public virtual void ZoomArea(Rectangle areaInWorldCoords) {
+      Rectangle areaToZoom = Rectangle.Round(WorldToView(areaInWorldCoords));
+      areaToZoom = areaInWorldCoords;
+
+      float zoom = Math.Min(
+          ((float)WorkArea.Width / (float)areaToZoom.Width) * 100.0F,
+           ((float)WorkArea.Height / (float)areaToZoom.Height) * 100.0F);
+
+      if (zoom == 0) {
+        zoom = 1F;
+      }
+
+      Magnification = new SizeF(
+          zoom,
+          zoom);
+      Origin = areaInWorldCoords.Location;
+    }
+
+    #endregion
+
+    #region Standard IDispose implementation
+    /// <summary>
+    /// Disposes the view
+    /// </summary>
+    public void Dispose() {
+      Dispose(true);
+      GC.SuppressFinalize(this);
+
+
+    }
+    /// <summary>
+    /// Disposes this instance.
+    /// </summary>
+    /// <param name="disposing">if set to <c>true</c> [disposing].</param>
+    protected virtual void Dispose(bool disposing) {
+      if (disposing) {
+        #region free managed resources
+        if (mBackgroundBrush != null) {
+          mBackgroundBrush.Dispose();
+          mBackgroundBrush = null;
         }
         #endregion
-
-        // ------------------------------------------------------------------
-        /// <summary>
-        /// Builds the gradient brush.
-        /// </summary>
-        // ------------------------------------------------------------------
-        private void BuildGradientBrush()
-        {
-            if ( (mModel == null) || (clientRectangle == RectangleF.Empty) )
-            {
-                return;
-            }
-
-            mBackgroundBrush = new LinearGradientBrush(
-                clientRectangle, 
-                mModel.CurrentPage.Ambience.BackgroundGradientColor1,
-                mModel.CurrentPage.Ambience.BackgroundGradientColor2, 
-                LinearGradientMode.Vertical);
-        }
-
-        // ------------------------------------------------------------------
-        /// <summary>
-        /// Builds the solid brush.
-        /// </summary>
-        // ------------------------------------------------------------------
-        private void BuildSolidBrush()
-        {
-            if (mModel == null || clientRectangle == RectangleF.Empty) return;
-                
-            mBackgroundBrush = new SolidBrush(mModel.CurrentPage.Ambience.BackgroundColor);
-        }
-
-        // ------------------------------------------------------------------
-        /// <summary>
-        /// Raises the <see cref="OnCursorChange"/> event.
-        /// </summary>
-        /// <param name="cursor">The cursor.</param>
-        // ------------------------------------------------------------------
-        private void RaiseOnCursorChange(Cursor cursor)
-        {
-            EventHandler<CursorEventArgs> handler = OnCursorChange;
-            if (handler != null)
-                handler(this, new CursorEventArgs(cursor));
-        }
-
-        // ------------------------------------------------------------------
-        /// <summary>
-        /// Raises the OnBakcColorChange event.
-        /// </summary>
-        /// <param name="color">The color.</param>
-        // ------------------------------------------------------------------
-        private void RaiseOnBackColorChange(Color color)
-        {
-            EventHandler<ColorEventArgs> handler = OnBackColorChange;
-            if(handler != null)
-                handler(this, new ColorEventArgs(color));
-        }
-
-        // ------------------------------------------------------------------
-        /// <summary>
-        /// Paints the ants rectangle.
-        /// </summary>
-        /// <param name="ltPoint">The lt point.</param>
-        /// <param name="rbPoint">The rb point.</param>
-        // ------------------------------------------------------------------
-        public virtual void PaintAntsRectangle(Point ltPoint, Point rbPoint)
-        {
-        }
-
-        // ------------------------------------------------------------------
-        /// <summary>
-        /// Paints the ghost rectangle.
-        /// </summary>
-        /// <param name="ltPoint">The lt point.</param>
-        /// <param name="rbPoint">The rb point.</param>
-        // ------------------------------------------------------------------
-        public virtual void PaintGhostRectangle(Point ltPoint, Point rbPoint)
-        {
-        }
-
-        // ------------------------------------------------------------------
-        /// <summary>
-        /// Paints the ghost line.
-        /// </summary>
-        /// <param name="ltPoint">The lt point.</param>
-        /// <param name="rbPoint">The rb point.</param>
-        // ------------------------------------------------------------------
-        public virtual void PaintGhostLine(Point ltPoint, Point rbPoint)
-        {
-        }
-
-        // ------------------------------------------------------------------
-        /// <summary>
-        /// Paints the ghost line.
-        /// </summary>
-        /// <param name="curveType">Type of the curve.</param>
-        /// <param name="points">The points.</param>
-        // ------------------------------------------------------------------
-        public virtual void PaintGhostLine(MultiPointType curveType, Point[] points)
-        {
-        }
-
-        // ------------------------------------------------------------------
-        /// <summary>
-        /// Paints the ghost ellipse.
-        /// </summary>
-        /// <param name="ltPoint">The lt point.</param>
-        /// <param name="rbPoint">The rb point.</param>
-        // ------------------------------------------------------------------
-        public virtual void PaintGhostEllipse(Point ltPoint, Point rbPoint)
-        {
-        }
-
-        // ------------------------------------------------------------------
-        /// <summary>
-        /// Paints the tracker.
-        /// </summary>
-        /// <param name="rectangle">The rectangle.</param>
-        /// <param name="showHandles">if set to <c>true</c> shows the 
-        /// handles.</param>
-        // ------------------------------------------------------------------
-        public virtual void PaintTracker(Rectangle rectangle, bool showHandles)
-        { }
-
-        // ------------------------------------------------------------------
-        /// <summary>
-        /// Resets the ghost.
-        /// </summary>
-        // ------------------------------------------------------------------
-        public void ResetGhost()
-        {
-            if (mGhost == null) return;
-            Rectangle rec = mGhost.Rectangle;
-            rec.Inflate(20, 20);
-            //convert it to viewspace
-            //rec = Rectangle.Round(WorldToView(rec));
-            this.Invalidate(rec);            
-            mGhost = null;
-        }
-
-        // ------------------------------------------------------------------
-        /// <summary>
-        /// Resets the ants.
-        /// </summary>
-        // ------------------------------------------------------------------
-        public void ResetAnts()
-        {
-            mAnts = null;
-        }
-
-        #region Tracker methods
-
-        // ------------------------------------------------------------------
-        /// <summary>
-        /// Resets the tracker.
-        /// </summary>
-        // ------------------------------------------------------------------
-        public void ResetTracker()
-        {
-            if (mTracker == null) return;
-            Rectangle rec = mTracker.Rectangle;
-            rec.Inflate(20, 20);
-            mTracker = null;
-            Invalidate(rec);
-        }
-
-        // ------------------------------------------------------------------
-        /// <summary>
-        /// Hides the tracker.
-        /// </summary>
-        // ------------------------------------------------------------------
-        public void HideTracker()
-        {
-            if(mTracker==null) return;
-            //let's be efficient and refresh only what's necessary
-            Rectangle rec = mTracker.Rectangle;
-            rec.Inflate(20,20);
-            mTracker = null;
-            this.Invalidate(rec);
-        }
-
-        // ------------------------------------------------------------------
-        /// <summary>
-        /// Shows the tracker.
-        /// </summary>
-        // ------------------------------------------------------------------
-        public void ShowTracker()
-        {
-            if(this.Model.Selection.SelectedItems != null && 
-               this.Model.Selection.SelectedItems.Count > 0)
-            {
-                CollectionBase<IDiagramEntity> ents =this.Model.Selection.SelectedItems;
-                bool showHandles = false;
-
-                Rectangle rec = ents[0].Rectangle;
-                foreach (IDiagramEntity entity in ents)
-                {
-                    rec = Rectangle.Union(rec, entity.Rectangle);
-                    showHandles |= entity.Resizable;
-                }
-                // Make the tracker slightly bigger than the actual bounding 
-                // rectangle.
-                rec.Inflate(TrackerOffset, TrackerOffset);
-
-                this.PaintTracker(rec,showHandles);
-
-            }
-            else //if the selection is 'null' or empty we annihilate the current tracker
-                ResetTracker();
-        }
-        #endregion
-
-        // ------------------------------------------------------------------
-        /// <summary>
-        /// Suspends the invalidation of the view, which means that the
-        /// Invalidate() method calls from any entity will be discarded until 
-        /// Resume() has been called.
-        /// </summary>
-        // ------------------------------------------------------------------
-        public void Suspend()
-        {
-            mIsSuspended = true;
-        }
-
-        // ------------------------------------------------------------------
-        /// <summary>
-        /// Resumes the invalidation of the view.
-        /// </summary>
-        // ------------------------------------------------------------------
-        public void Resume()
-        {
-            mIsSuspended = false;
-            parentControl.Invalidate();
-        }
-
-        #region Rulers 
-        
-        // ------------------------------------------------------------------
-        /// <summary>
-        /// Paints the horizontal and vertical rulers.
-        /// </summary>
-        /// <param name="g">Graphics</param>
-        // ------------------------------------------------------------------
-        protected virtual void PaintRulers(Graphics g)
-        {
-            PaintMarginIntersection(g);
-            HorizontalRuler horizontalRuler = HorizontalRuler;
-            if (horizontalRuler != null && horizontalRuler.Visible)
-            {
-                horizontalRuler.Paint(g);
-            }
-            VerticalRuler verticalRuler = VerticalRuler;
-            if (verticalRuler != null && verticalRuler.Visible)
-            {
-                verticalRuler.Paint(g);
-            }
-        }
-
-        protected virtual void PaintMarginIntersection(Graphics g)
-        {
-            Rectangle rectangle = new Rectangle(Bounds.X, Bounds.Y, LeftMargin, TopMargin);
-            g.FillRectangle(ArtPalette.RullerFillBrush, rectangle);
-        }
-
-        protected virtual HorizontalRuler CreateHorizontalRuler()
-        {
-            return new HorizontalRuler(this);
-        }
-
-        protected virtual VerticalRuler CreateVerticalRuler()
-        {
-            return new VerticalRuler(this);
-        }
-
-        [BrowsableAttribute(true)]
-        [DesignerSerializationVisibilityAttribute(DesignerSerializationVisibility.Visible)]
-        public int RulerSize
-        {
-            get
-            {
-                return mRulerSize;
-            }
-
-            set
-            {
-                mRulerSize = value;
-            }
-        }
-
-        [DesignerSerializationVisibilityAttribute(DesignerSerializationVisibility.Hidden)]
-        [BrowsableAttribute(false)]
-        public virtual int LeftMargin
-        {
-            get
-            {
-                if ((verticalRuler != null) &&
-                (verticalRuler.Visible) &&
-                (mShowRulers))
-                {
-                    return RulerSize;
-                }
-                else
-                {
-                    return 0;
-                }
-            }
-        }
-        [BrowsableAttribute(false)]
-        [DesignerSerializationVisibilityAttribute(DesignerSerializationVisibility.Hidden)]
-        public virtual int TopMargin
-        {
-            get
-            {
-                if ((horizontalRuler != null) &&
-                    (horizontalRuler.Visible) &&
-                    (mShowRulers))
-                {
-                    return RulerSize;
-                }
-                else
-                    return 0;
-            }
-        }
-
-        [BrowsableAttribute(false)]
-        [DesignerSerializationVisibilityAttribute(DesignerSerializationVisibility.Hidden)]
-        public Rectangle LeftMarginBounds
-        {
-            get
-            {
-                return new Rectangle(
-                    Bounds.X, 
-                    Bounds.Y, 
-                    LeftMargin, 
-                    Bounds.Height);
-            }
-        }
-
-
-
-        [DesignerSerializationVisibilityAttribute(DesignerSerializationVisibility.Hidden)]
-        [BrowsableAttribute(false)]
-        public Rectangle TopMarginBounds
-        {
-            get
-            {
-                return new Rectangle(
-                    Bounds.X, 
-                    Bounds.Y, 
-                    Bounds.Width, 
-                    TopMargin);
-            }
-        }
-
-        /// <summary>
-        /// Gets the work area, i.e. the rectangle of the surface control without the rulers.
-        /// </summary>
-        /// <value>The work area.</value>
-        [BrowsableAttribute(false)]
-        [DesignerSerializationVisibilityAttribute(DesignerSerializationVisibility.Hidden)]
-        public virtual Rectangle WorkArea
-        {
-            get
-            {
-                Rectangle rectangle = Bounds;
-                rectangle.X = rectangle.Left + LeftMargin + 1;
-                rectangle.Y = rectangle.Top + TopMargin + 1;
-                return rectangle;
-            }
-        }
-
-        [BrowsableAttribute(false)]
-        [DesignerSerializationVisibilityAttribute(DesignerSerializationVisibility.Hidden)]
-        public Rectangle HorizontalRulerBounds
-        {
-            get
-            {
-                int lm = LeftMargin;
-                int tm = TopMargin;
-                return new Rectangle(Bounds.X + lm, Bounds.Y, Bounds.Width - lm, tm);
-            }
-        }
-
-        [BrowsableAttribute(false)]
-        [DesignerSerializationVisibilityAttribute(DesignerSerializationVisibility.Hidden)]
-        public Rectangle VerticalRulerBounds
-        {
-            get
-            {
-                int i = LeftMargin;
-                int j = TopMargin;
-                return new Rectangle(Bounds.X, Bounds.Y + j, i, Bounds.Height - j);
-            }
-        }
-        [CategoryAttribute("Rulers")]
-        [BrowsableAttribute(true)]
-        [DesignerSerializationVisibilityAttribute(DesignerSerializationVisibility.Content)]
-        public HorizontalRuler HorizontalRuler
-        {
-            get
-            {
-                if (horizontalRuler == null)
-                {
-                    horizontalRuler = CreateHorizontalRuler();
-                }
-                return horizontalRuler;
-            }
-        }
-
-        [DesignerSerializationVisibilityAttribute(
-            DesignerSerializationVisibility.Content)]
-        [BrowsableAttribute(true)]
-        [CategoryAttribute("Rulers")]
-        public VerticalRuler VerticalRuler
-        {
-            get
-            {
-                if (verticalRuler == null)
-                {
-                    verticalRuler = CreateVerticalRuler();
-                }
-                return verticalRuler;
-            }
-        }
-        #endregion
-
-        #region World-View-Device Conversions
-
-        #region View to device
-        public Point ViewToDevice(PointF ptView)
-        {
-            float f1 = 1.0F;
-            float f2 = 1.0F;
-            float f3 = 1.0F;
-            float f4 = 1.0F;
-            if (mModel != null)
-            {
-                if (mModel.MeasurementUnits != GraphicsUnit.Pixel)
-                {
-                    f1 = Measurements.UnitsPerInch(mModel.MeasurementUnits);
-                    f3 = dpiX / f1;
-                    f4 = dpiX / f1;
-                }
-                f2 = mModel.MeasurementScale;
-            }
-            int i = (int)Math.Round((double)(ptView.X * f2 * f3));
-            int j = (int)Math.Round((double)(ptView.Y * f2 * f4));
-            return new Point(i, j);
-        }
-
-        public Size ViewToDevice(SizeF szView)
-        {
-            float f1 = 1.0F;
-            float f2 = 1.0F;
-            float f3 = 1.0F;
-            float f4 = 1.0F;
-            if (mModel != null)
-            {
-                if (mModel.MeasurementUnits != GraphicsUnit.Pixel)
-                {
-                    f1 = Measurements.UnitsPerInch(mModel.MeasurementUnits);
-                    f3 = dpiX / f1;
-                    f4 = dpiX / f1;
-                }
-                f2 = mModel.MeasurementScale;
-            }
-            int i = (int)(szView.Width * f2 * f3);
-            int j = (int)(szView.Height * f2 * f4);
-            return new Size(i, j);
-        }
-
-        public PointF ViewToDeviceF(PointF ptView)
-        {
-            float f3 = 1.0F;
-            float f4 = 1.0F;
-            float f5 = 1.0F;
-            float f6 = 1.0F;
-            if (mModel != null)
-            {
-                if (mModel.MeasurementUnits != GraphicsUnit.Pixel)
-                {
-                    f3 = Measurements.UnitsPerInch(mModel.MeasurementUnits);
-                    f5 = dpiX / f3;
-                    f6 = dpiX / f3;
-                }
-                f4 = mModel.MeasurementScale;
-            }
-            float f1 = ptView.X * f4 * f5;
-            float f2 = ptView.Y * f4 * f6;
-            return new PointF(f1, f2);
-        }
-
-        public Rectangle ViewToDevice(RectangleF rcView)
-        {
-            PointF pointF1 = new PointF(rcView.Left, rcView.Top);
-            PointF pointF2 = new PointF(rcView.Right, rcView.Bottom);
-            Point point1 = ViewToDevice(pointF1);
-            Point point2 = ViewToDevice(pointF2);
-            return new Rectangle(point1.X, point1.Y, point2.X - point1.X, point2.Y - point1.Y);
-        }
-
-        public void ViewToDevice(PointF[] viewPts, out Point[] devicePts)
-        {
-            devicePts = new Point[(int)viewPts.Length];
-            for (int i = 0; i < (int)viewPts.Length; i++)
-            {
-                devicePts[i] = ViewToDevice(viewPts[i]);
-            }
-        }
-
-        public SizeF ViewToDeviceF(SizeF szView)
-        {
-            float f3 = 1.0F;
-            float f4 = 1.0F;
-            float f5 = 1.0F;
-            float f6 = 1.0F;
-            if (mModel != null)
-            {
-                if (mModel.MeasurementUnits != GraphicsUnit.Pixel)
-                {
-                    f3 = Measurements.UnitsPerInch(mModel.MeasurementUnits);
-                    f5 = dpiX / f3;
-                    f6 = dpiX / f3;
-                }
-                f4 = mModel.MeasurementScale;
-            }
-            float f1 = szView.Width * f4 * f5;
-            float f2 = szView.Height * f4 * f6;
-            return new SizeF(f1, f2);
-        }
-
-        public RectangleF ViewToDeviceF(RectangleF rcView)
-        {
-            PointF pointF1 = new PointF(rcView.Left, rcView.Top);
-            PointF pointF2 = new PointF(rcView.Right, rcView.Bottom);
-            PointF pointF3 = ViewToDeviceF(pointF1);
-            PointF pointF4 = ViewToDeviceF(pointF2);
-            return new RectangleF(pointF3.X, pointF3.Y, pointF4.X - pointF3.X, pointF4.Y - pointF3.Y);
-        }
-        #endregion
-
-        #region World to view
-
-        public RectangleF WorldToView(RectangleF rcWorld)
-        {
-            PointF[] pointFs = new PointF[2];
-            pointFs[0].X = rcWorld.Left;
-            pointFs[0].Y = rcWorld.Top;
-            pointFs[1].X = rcWorld.Right;
-            pointFs[1].Y = rcWorld.Bottom;
-            mViewMatrix.TransformPoints(pointFs);
-            return new RectangleF(pointFs[0].X, pointFs[0].Y, pointFs[1].X - pointFs[0].X, pointFs[1].Y - pointFs[0].Y);
-        }
-
-        public PointF WorldToView(PointF ptWorld)
-        {
-            PointF[] pointFs1 = new PointF[] { ptWorld };
-            mViewMatrix.TransformPoints(pointFs1);
-            return pointFs1[0];
-        }
-
-        public void WorldToView(PointF[] worldPts, out PointF[] viewPts)
-        {
-            viewPts = (PointF[])worldPts.Clone();
-            mViewMatrix.TransformPoints(viewPts);
-        }
-
-        public SizeF WorldToView(SizeF szWorld)
-        {
-            PointF[] pointFs1 = new PointF[] { new PointF(szWorld.Width, szWorld.Height) };
-            Matrix matrix = new Matrix();
-            matrix.Scale(Magnification.Width / 100.0F, Magnification.Height / 100.0F);
-            matrix.TransformPoints(pointFs1);
-            return new SizeF(pointFs1[0].X, pointFs1[0].Y);
-        }
-
-        #endregion
-
-        #region View to world
-
-        /// <summary>
-        /// Converts the given point from View coordinates to the absolute World coordinates.
-        /// </summary>
-        /// <param name="ptView">The pt view.</param>
-        /// <returns></returns>
-        public PointF ViewToWorld(PointF ptView)
-        {
-            PointF[] pointFs1 = new PointF[] { ptView };
-            //Matrix matrix = mInvertedViewMatrix;
-            //the view transformation has to be inverted since the transform is from world to view coordinates
-            //matrix.Invert();
-            mInvertedViewMatrix.TransformPoints(pointFs1);
-            return pointFs1[0];
-        }
-
-        /// <summary>
-        /// Converts the given rectangle from View coordinates to the absolute World coordinates.
-        /// </summary>
-        /// <param name="rcView">The rc view.</param>
-        /// <returns></returns>
-        public RectangleF ViewToWorld(RectangleF rcView)
-        {
-            PointF[] pointFs = new PointF[2];
-            pointFs[0].X = rcView.Left;
-            pointFs[0].Y = rcView.Top;
-            pointFs[1].X = rcView.Right;
-            pointFs[1].Y = rcView.Bottom;
-            //Matrix matrix = GetViewMatrix();
-            //matrix.Invert();
-            mInvertedViewMatrix.TransformPoints(pointFs);
-            return new RectangleF(pointFs[0].X, pointFs[0].Y, pointFs[1].X - pointFs[0].X, pointFs[1].Y - pointFs[0].Y);
-        }
-
-        /// <summary>
-        /// Converts the given rectangle from View coordinates to the absolute World coordinates.
-        /// </summary>
-        /// <param name="rectangle">The rectangle.</param>
-        /// <returns></returns>
-        public Rectangle ViewToWorld(Rectangle rectangle)
-        {
-            Point[] pts = new Point[2];
-            pts[0].X = rectangle.Left;
-            pts[0].Y = rectangle.Top;
-            pts[1].X = rectangle.Right;
-            pts[1].Y = rectangle.Bottom;
-            //Matrix matrix = GetViewMatrix();
-            //matrix.Invert();
-            mInvertedViewMatrix.TransformPoints(pts);
-            return new Rectangle(pts[0].X, pts[0].Y, pts[1].X - pts[0].X, pts[1].Y - pts[0].Y);
-        }
-
-        /// <summary>
-        /// Converts the given size from View coordinates to the absolute World coordinates.
-        /// </summary>
-        /// <param name="szView">The sz view.</param>
-        /// <returns></returns>
-        public SizeF ViewToWorld(SizeF szView)
-        {
-            PointF[] pointFs1 = new PointF[] { new PointF(szView.Width, szView.Height) };
-            Matrix matrix = new Matrix();
-            matrix.Scale(Magnification.Width / 100.0F, Magnification.Height / 100.0F);
-            matrix.Invert();
-            matrix.TransformPoints(pointFs1);
-            return new SizeF(pointFs1[0].X, pointFs1[0].Y);
-        }
-
-        /// <summary>
-        /// Converts the given point array from View coordinates to the absolute World coordinates.
-        /// </summary>
-        /// <param name="viewPts">The view PTS.</param>
-        /// <param name="worldPts">The world PTS.</param>
-        public void ViewToWorld(PointF[] viewPts, out PointF[] worldPts)
-        {
-            worldPts = (PointF[])viewPts.Clone();
-            //Matrix matrix = GetViewMatrix();
-            //matrix.Invert();
-            mInvertedViewMatrix.TransformPoints(worldPts);
-        }
-
-        #endregion
-
-        #region Device to view
-
-        public PointF DeviceToView(Point ptDevice)
-        {
-            float f3 = 1.0F;
-            float f4 = 1.0F;
-            float f5 = 1.0F;
-            float f6 = 1.0F;
-            if (mModel != null)
-            {
-                if (mModel.MeasurementUnits != GraphicsUnit.Pixel)
-                {
-                    f3 = Measurements.UnitsPerInch(mModel.MeasurementUnits);
-                    f5 = dpiX / f3;
-                    f6 = dpiY / f3;
-                }
-                f4 = mModel.MeasurementScale;
-            }
-            float f1 = (float)ptDevice.X / (f4 * f5);
-            float f2 = (float)ptDevice.Y / (f4 * f6);
-            return new PointF(f1, f2);
-        }
-
-        public void DeviceToView(Point[] devicePts, out PointF[] viewPts)
-        {
-            viewPts = new PointF[(int)devicePts.Length];
-            for (int i = 0; i < (int)devicePts.Length; i++)
-            {
-                viewPts[i] = DeviceToView(devicePts[i]);
-            }
-        }
-
-        public RectangleF DeviceToView(Rectangle rcDevice)
-        {
-            Point point1 = new Point(rcDevice.Left, rcDevice.Top);
-            Point point2 = new Point(rcDevice.Right, rcDevice.Bottom);
-            PointF pointF1 = DeviceToView(point1);
-            PointF pointF2 = DeviceToView(point2);
-            return new RectangleF(pointF1.X, pointF1.Y, pointF2.X - pointF1.X, pointF2.Y - pointF1.Y);
-        }
-
-        public SizeF DeviceToView(Size szDevice)
-        {
-            float f3 = 1.0F;
-            float f4 = 1.0F;
-            float f5 = 1.0F;
-            float f6 = 1.0F;
-            if (mModel != null)
-            {
-                if (mModel.MeasurementUnits != GraphicsUnit.Pixel)
-                {
-                    f3 = Measurements.UnitsPerInch(mModel.MeasurementUnits);
-                    f5 = dpiX / f3;
-                    f6 = dpiY / f3;
-                }
-                f4 = mModel.MeasurementScale;
-            }
-            float f1 = (float)szDevice.Width / (f4 * f5);
-            float f2 = (float)szDevice.Height / (f4 * f6);
-            return new SizeF(f1, f2);
-        }
-
-        #endregion
-
-        #endregion
-
-        // ------------------------------------------------------------------
-        /// <summary>
-        /// Returns the matrix corresponding to the translation and scaling 
-        /// of the canvas.
-        /// </summary>
-        /// <returns>Matrix</returns>
-        // ------------------------------------------------------------------
-        public Matrix GetViewMatrix()
-        {
-            Matrix matrix = new Matrix();
-
-            matrix.Scale(
-                Magnification.Width / 100.0F,
-                Magnification.Height / 100.0F);
-
-            matrix.Translate(-Origin.X, -Origin.Y);
-
-            Size size = new Size(LeftMargin, TopMargin);
-            SizeF sizeF = ViewToWorld(DeviceToView(size));
-            matrix.Translate(sizeF.Width, sizeF.Height);
-            return matrix;
-        }
-
-        // ------------------------------------------------------------------
-        /// <summary>
-        /// Sets the magnification and origin of the diagram such that
-        /// all entities in the current page are in view.
-        /// </summary>
-        // ------------------------------------------------------------------
-        public virtual void ZoomFit()
-        {
-            Bundle bundle = new Bundle(this.Model.CurrentPage.Entities);
-            Rectangle bundleBounds = bundle.Rectangle;
-            bundleBounds.Inflate(20, 20);
-            bundleBounds.Offset(-10, -10);
-            this.ZoomArea(bundleBounds);
-        }
-
-        // ------------------------------------------------------------------
-        /// <summary>
-        /// Zooms the diagram to the area specified.
-        /// </summary>
-        /// <param name="areaInWorldCoords">Rectangle: The area to zoom in world 
-        /// coordinates.</param>
-        // ------------------------------------------------------------------
-        public virtual void ZoomArea(Rectangle areaInWorldCoords)
-        {
-            Rectangle areaToZoom = Rectangle.Round(WorldToView(areaInWorldCoords));
-            areaToZoom = areaInWorldCoords;
-
-            float zoom = Math.Min(
-                ((float)WorkArea.Width / (float)areaToZoom.Width) * 100.0F,
-                 ((float)WorkArea.Height / (float)areaToZoom.Height) * 100.0F);
-
-            if (zoom == 0)
-            {
-                zoom = 1F;
-            }
-
-            Magnification = new SizeF(
-                zoom,
-                zoom);
-            Origin = areaInWorldCoords.Location;
-        }
-
-        #endregion
-
-        #region Standard IDispose implementation
-        /// <summary>
-        /// Disposes the view
-        /// </summary>
-        public void Dispose()
-        {
-            Dispose(true);
-            GC.SuppressFinalize(this);
-
-            
-        }
-        /// <summary>
-        /// Disposes this instance.
-        /// </summary>
-        /// <param name="disposing">if set to <c>true</c> [disposing].</param>
-        protected virtual void Dispose(bool disposing)
-        {
-            if(disposing)
-            {
-                #region free managed resources
-                if(mBackgroundBrush != null)
-                {
-                    mBackgroundBrush.Dispose();
-                    mBackgroundBrush = null;
-                }
-                #endregion
-            }
-           
-        }
-
-        #endregion
-    
-    }
+      }
+
+    }
+
+    #endregion
+
+  }
 }
Index: /trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.Netron/3.0.2672.12446/Netron.Diagramming.Core-3.0.2672.12446/Declarations/Attributes/Attributes.cs
===================================================================
--- /trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.Netron/3.0.2672.12446/Netron.Diagramming.Core-3.0.2672.12446/Declarations/Attributes/Attributes.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.Netron/3.0.2672.12446/Netron.Diagramming.Core-3.0.2672.12446/Declarations/Attributes/Attributes.cs	(revision 4068)
@@ -1,188 +1,173 @@
 using System;
-using System.Collections.Generic;
-using System.Text;
 
-namespace Netron.Diagramming.Core
-{
+namespace Netron.Diagramming.Core {
+  /// <summary>
+  /// Abstract base class for the attributes related to serialization
+  /// </summary>
+  public abstract class BaseAttribute : System.Attribute {
+    #region Fields
     /// <summary>
-    /// Abstract base class for the attributes related to serialization
+    /// the key of the shape, usually a GUID
     /// </summary>
-    public abstract class BaseAttribute : System.Attribute
-    {
-        #region Fields
-        /// <summary>
-        /// the key of the shape, usually a GUID
-        /// </summary>
-        protected string mKey;
-        /// <summary>
-        /// the name of the shape
-        /// </summary>
-        protected string mName;       
-        /// <summary>
-        /// a description
-        /// </summary>
-        protected string mDescription = "No description available.";
-        /// <summary>
-        /// whether the shape is only accessible via code or internally
-        /// </summary>
-        protected bool mIsInternal;
-        #endregion
+    protected string mKey;
+    /// <summary>
+    /// the name of the shape
+    /// </summary>
+    protected string mName;
+    /// <summary>
+    /// a description
+    /// </summary>
+    protected string mDescription = "No description available.";
+    /// <summary>
+    /// whether the shape is only accessible via code or internally
+    /// </summary>
+    protected bool mIsInternal;
+    #endregion
 
-        #region Properties
-        
-        /// <summary>
-        /// Gets a mDescription of the shape
-        /// </summary>
-        public string Description
-        {
-            get { return mDescription; }
-        }
-        /// <summary>
-        /// Gets the unique identifier of the shape
-        /// </summary>
-        public string Key
-        {
-            get { return mKey; }
-        }
-        /// <summary>
-        /// Gets the shape name
-        /// </summary>
-        public string Name
-        {
-            get { return mName; }
-        }
-        /// <summary>
-        /// Gets whether the entity is available via the interface or false if only via code
-        /// </summary>
-        public bool IsInternal
-        {
-            get { return mIsInternal; }
-        }
-        #endregion
+    #region Properties
+
+    /// <summary>
+    /// Gets a mDescription of the shape
+    /// </summary>
+    public string Description {
+      get { return mDescription; }
     }
     /// <summary>
-    /// Attribute to tag a class as a diagram shape
+    /// Gets the unique identifier of the shape
     /// </summary>
-    [Serializable, AttributeUsage(AttributeTargets.Class)]
-    public class ShapeAttribute : BaseAttribute
-    {
-        #region Fields
+    public string Key {
+      get { return mKey; }
+    }
+    /// <summary>
+    /// Gets the shape name
+    /// </summary>
+    public string Name {
+      get { return mName; }
+    }
+    /// <summary>
+    /// Gets whether the entity is available via the interface or false if only via code
+    /// </summary>
+    public bool IsInternal {
+      get { return mIsInternal; }
+    }
+    #endregion
+  }
+  /// <summary>
+  /// Attribute to tag a class as a diagram shape
+  /// </summary>
+  [Serializable, AttributeUsage(AttributeTargets.Class)]
+  public class ShapeAttribute : BaseAttribute {
+    #region Fields
 
-        /// <summary>
-        /// the cateogry under which it will stay
-        /// </summary>
-        protected string mCategory;
+    /// <summary>
+    /// the cateogry under which it will stay
+    /// </summary>
+    protected string mCategory;
 
-        #endregion
+    #endregion
 
-        #region Properties
+    #region Properties
 
-        /// <summary>
-        /// Gets the category of the shape under which it will reside in a viewer
-        /// </summary>
-        public string Category
-        {
-            get { return mCategory; }
+    /// <summary>
+    /// Gets the category of the shape under which it will reside in a viewer
+    /// </summary>
+    public string Category {
+      get { return mCategory; }
 
-        }
-        #endregion
+    }
+    #endregion
 
-        #region Constructor
-        /// <summary>
-        /// Constructor, marks a class as a shape-class for the Netron graph library
-        /// </summary>
-        /// <param name="mShapeName"></param>
-        /// <param name="mShapeKey"></param>
-        /// <param name="mCategory"></param>
-        /// <param name="reflectionName"></param>
-        public ShapeAttribute(
-            string shapeName, 
-            string shapeKey, 
-            string category)
-        {
-            this.mName = shapeName;
-            this.mKey = shapeKey;
-            this.mCategory = category;
-        }
-        /// <summary>
-        /// Constructor, marks a class as a shape-class for the Netron graph library
-        /// </summary>
-        /// <param name="mShapeName"></param>
-        /// <param name="mShapeKey"></param>
-        /// <param name="mCategory"></param>
-        /// <param name="reflectionName"></param>
-        /// <param name="mDescription"></param>
-        public ShapeAttribute(
-            string shapeName, 
-            string shapeKey, 
-            string category, 
-            string description) : 
-            this(shapeName, shapeKey, category)
-        {
-            this.mDescription = description;
-        }
-        /// <summary>
-        /// Constructor, marks a class as a shape-class for the Netron graph library
-        /// </summary>
-        /// <param name="mShapeName"></param>
-        /// <param name="mShapeKey"></param>
-        /// <param name="mCategory"></param>
-        /// <param name="reflectionName"></param>
-        /// <param name="mDescription"></param>
-        /// <param name="internalUsage"></param>
-        public ShapeAttribute(
-            string shapeName, 
-            string shapeKey, 
-            string category, 
-            string description, 
-            bool internalUsage) : 
-            this(shapeName, shapeKey, category, description)
-        {
-            this.mIsInternal = internalUsage;
-        }
-        #endregion
+    #region Constructor
+    /// <summary>
+    /// Constructor, marks a class as a shape-class for the Netron graph library
+    /// </summary>
+    /// <param name="mShapeName"></param>
+    /// <param name="mShapeKey"></param>
+    /// <param name="mCategory"></param>
+    /// <param name="reflectionName"></param>
+    public ShapeAttribute(
+        string shapeName,
+        string shapeKey,
+        string category) {
+      this.mName = shapeName;
+      this.mKey = shapeKey;
+      this.mCategory = category;
+    }
+    /// <summary>
+    /// Constructor, marks a class as a shape-class for the Netron graph library
+    /// </summary>
+    /// <param name="mShapeName"></param>
+    /// <param name="mShapeKey"></param>
+    /// <param name="mCategory"></param>
+    /// <param name="reflectionName"></param>
+    /// <param name="mDescription"></param>
+    public ShapeAttribute(
+        string shapeName,
+        string shapeKey,
+        string category,
+        string description) :
+      this(shapeName, shapeKey, category) {
+      this.mDescription = description;
+    }
+    /// <summary>
+    /// Constructor, marks a class as a shape-class for the Netron graph library
+    /// </summary>
+    /// <param name="mShapeName"></param>
+    /// <param name="mShapeKey"></param>
+    /// <param name="mCategory"></param>
+    /// <param name="reflectionName"></param>
+    /// <param name="mDescription"></param>
+    /// <param name="internalUsage"></param>
+    public ShapeAttribute(
+        string shapeName,
+        string shapeKey,
+        string category,
+        string description,
+        bool internalUsage) :
+      this(shapeName, shapeKey, category, description) {
+      this.mIsInternal = internalUsage;
+    }
+    #endregion
 
-        #region Methods
+    #region Methods
 
 
-        #endregion
+    #endregion
+  }
+
+  /// <summary>
+  /// Attribute to tag a class as a Netron connection
+  /// </summary>
+  [Serializable]
+  public class ConnectionAttribute : BaseAttribute {
+    #region Fields
+
+
+    #endregion
+
+    #region Properties
+
+
+    #endregion
+
+    #region Constructor
+
+    /// <summary>
+    /// Constructor
+    /// </summary>
+    /// <param name="connectionName"></param>
+    /// <param name="key"></param>
+    /// <param name="reflectionName"></param>
+    public ConnectionAttribute(string connectionName, string key) {
+      this.mKey = key;
+      this.mName = connectionName;
     }
 
-    /// <summary>
-    /// Attribute to tag a class as a Netron connection
-    /// </summary>
-    [Serializable]
-    public class ConnectionAttribute : BaseAttribute
-    {
-        #region Fields
+    #endregion
+
+    #region Methods
 
 
-        #endregion
-
-        #region Properties
-
-
-        #endregion
-
-        #region Constructor
-
-        /// <summary>
-        /// Constructor
-        /// </summary>
-        /// <param name="connectionName"></param>
-        /// <param name="key"></param>
-        /// <param name="reflectionName"></param>
-        public ConnectionAttribute(string connectionName, string key)
-        {
-            this.mKey = key;
-            this.mName = connectionName;
-        }
-
-        #endregion
-
-        #region Methods
-
-
-        #endregion
-    }
+    #endregion
+  }
 }
Index: /trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.Netron/3.0.2672.12446/Netron.Diagramming.Core-3.0.2672.12446/Declarations/Delegates/Delegates.cs
===================================================================
--- /trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.Netron/3.0.2672.12446/Netron.Diagramming.Core-3.0.2672.12446/Declarations/Delegates/Delegates.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.Netron/3.0.2672.12446/Netron.Diagramming.Core-3.0.2672.12446/Declarations/Delegates/Delegates.cs	(revision 4068)
@@ -1,83 +1,81 @@
 using System;
-using System.Windows.Forms;
 
-namespace Netron.Diagramming.Core
-{
-    // ----------------------------------------------------------------------
-    /// <summary>
-    /// Delegate for the current page changed event.
-    /// </summary>
-    /// <param name="sender">object</param>
-    /// <param name="e">PageEventArgs</param>
-    // ----------------------------------------------------------------------
-    public delegate void CurrentPageChangedEventHandler(
-        object sender,
-        PageEventArgs e);
+namespace Netron.Diagramming.Core {
+  // ----------------------------------------------------------------------
+  /// <summary>
+  /// Delegate for the current page changed event.
+  /// </summary>
+  /// <param name="sender">object</param>
+  /// <param name="e">PageEventArgs</param>
+  // ----------------------------------------------------------------------
+  public delegate void CurrentPageChangedEventHandler(
+      object sender,
+      PageEventArgs e);
 
-    // ----------------------------------------------------------------------
-    /// <summary>
-    /// Delegate for the page added event.
-    /// </summary>
-    /// <param name="sender">object</param>
-    /// <param name="e">PageEventArgs</param>
-    // ----------------------------------------------------------------------
-    public delegate void PageAddedEventHandler(
-        object sender,
-        PageEventArgs e);
+  // ----------------------------------------------------------------------
+  /// <summary>
+  /// Delegate for the page added event.
+  /// </summary>
+  /// <param name="sender">object</param>
+  /// <param name="e">PageEventArgs</param>
+  // ----------------------------------------------------------------------
+  public delegate void PageAddedEventHandler(
+      object sender,
+      PageEventArgs e);
 
-    // ----------------------------------------------------------------------
-    /// <summary>
-    ///  Delegate for the PaintStyleChanged event.
-    /// </summary>
-    /// <param name="sender">object</param>
-    /// <param name="e">PaintStyleChangedEventArgs</param>
-    // ----------------------------------------------------------------------
-    public delegate void PaintStyleChangedEventHandler(object sender,
-            PaintStyleChangedEventArgs e);
+  // ----------------------------------------------------------------------
+  /// <summary>
+  ///  Delegate for the PaintStyleChanged event.
+  /// </summary>
+  /// <param name="sender">object</param>
+  /// <param name="e">PaintStyleChangedEventArgs</param>
+  // ----------------------------------------------------------------------
+  public delegate void PaintStyleChangedEventHandler(object sender,
+          PaintStyleChangedEventArgs e);
 
-    // ----------------------------------------------------------------------
-    /// <summary>
-    ///  Delegate for the TextStyleChanged event.
-    /// </summary>
-    /// <param name="sender">object</param>
-    /// <param name="e">TextStyleChangedEventArgs</param>
-    // ----------------------------------------------------------------------
-    public delegate void TextStyleChangedEventHandler(object sender,
-            TextStyleChangedEventArgs e);
+  // ----------------------------------------------------------------------
+  /// <summary>
+  ///  Delegate for the TextStyleChanged event.
+  /// </summary>
+  /// <param name="sender">object</param>
+  /// <param name="e">TextStyleChangedEventArgs</param>
+  // ----------------------------------------------------------------------
+  public delegate void TextStyleChangedEventHandler(object sender,
+          TextStyleChangedEventArgs e);
 
-    // ----------------------------------------------------------------------
-	/// <summary>
-	/// Information regarding the addition of a new item to the collection.
-    /// </summary>
-    // ----------------------------------------------------------------------
-    public delegate void CollectionAddInfo<T>(
-    CollectionBase<T> collection, 
-    EntityEventArgs e);
+  // ----------------------------------------------------------------------
+  /// <summary>
+  /// Information regarding the addition of a new item to the collection.
+  /// </summary>
+  // ----------------------------------------------------------------------
+  public delegate void CollectionAddInfo<T>(
+  CollectionBase<T> collection,
+  EntityEventArgs e);
 
-    // ----------------------------------------------------------------------
-    /// <summary>
-	/// Information regarding the removal of an item from the collection.
-    /// </summary>
-    // ----------------------------------------------------------------------
-    public delegate void CollectionRemoveInfo<T>(
-    CollectionBase<T> collection, 
-    EntityEventArgs e);
+  // ----------------------------------------------------------------------
+  /// <summary>
+  /// Information regarding the removal of an item from the collection.
+  /// </summary>
+  // ----------------------------------------------------------------------
+  public delegate void CollectionRemoveInfo<T>(
+  CollectionBase<T> collection,
+  EntityEventArgs e);
 
-    // ----------------------------------------------------------------------
-    /// <summary>
-	/// Information regarding the removal/clear of all items from the 
-    /// collection.
-    /// </summary>
-    // ----------------------------------------------------------------------
-    public delegate void CollectionClearInfo<T>(
-    CollectionBase<T> collection, 
-    EventArgs e);
+  // ----------------------------------------------------------------------
+  /// <summary>
+  /// Information regarding the removal/clear of all items from the 
+  /// collection.
+  /// </summary>
+  // ----------------------------------------------------------------------
+  public delegate void CollectionClearInfo<T>(
+  CollectionBase<T> collection,
+  EventArgs e);
 
-    // ----------------------------------------------------------------------
-    /// <summary>
-	/// The info coming with the show-props event.
-    /// </summary>
-    // ----------------------------------------------------------------------
-	public delegate void PropertiesInfo(object ent);	
-	
+  // ----------------------------------------------------------------------
+  /// <summary>
+  /// The info coming with the show-props event.
+  /// </summary>
+  // ----------------------------------------------------------------------
+  public delegate void PropertiesInfo(object ent);
+
 }
Index: /trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.Netron/3.0.2672.12446/Netron.Diagramming.Core-3.0.2672.12446/Declarations/Delegates/EventArguments.cs
===================================================================
--- /trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.Netron/3.0.2672.12446/Netron.Diagramming.Core-3.0.2672.12446/Declarations/Delegates/EventArguments.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.Netron/3.0.2672.12446/Netron.Diagramming.Core-3.0.2672.12446/Declarations/Delegates/EventArguments.cs	(revision 4068)
@@ -1,1091 +1,964 @@
 using System;
+using System.Drawing;
+using System.IO;
 using System.Windows.Forms;
-using System.Drawing;
-using System.Collections.Generic;
-using System.IO;
-namespace Netron.Diagramming.Core
-{
-    #region PaintStyle EventArgs
-
-    // ----------------------------------------------------------------------
-    /// <summary>
-    /// Provides information about a PaintStyleChanged event.
-    /// </summary>
-    // ----------------------------------------------------------------------
-    public class PaintStyleChangedEventArgs : EventArgs
-    {
-        IPaintStyle mPaintStyle;
-        FillType mFillType;
-
-        // ------------------------------------------------------------------
-        /// <summary>
-        /// Gets the paint style that changed.
-        /// </summary>
-        // ------------------------------------------------------------------
-        public IPaintStyle PaintStyle
-        {
-            get
-            {
-                return mPaintStyle;
-            }
-        }
-
-        // ------------------------------------------------------------------
-        /// <summary>
-        /// Gets the new FillType.
-        /// </summary>
-        // ------------------------------------------------------------------
-        public FillType FillType
-        {
-            get
-            {
-                return mFillType;
-            }
-        }
-
-        // ------------------------------------------------------------------
-        /// <summary>
-        /// Constructor.
-        /// </summary>
-        /// <param name="paintStyle">IPaintStyle: The IPaintStyle that
-        /// changed.</param>
-        /// <param name="newFillType">FillType: The new fill type.</param>
-        // ------------------------------------------------------------------
-        public PaintStyleChangedEventArgs(
-            IPaintStyle paintStyle,
-            FillType newFillType)
-        {
-            mPaintStyle = paintStyle;
-            mFillType = newFillType;
-        }
-    }
-
-    #endregion
-
-    #region TextStyle EventArgs
-
-    // ----------------------------------------------------------------------
-    /// <summary>
-    /// Provides information about a TextStyleChanged event.
-    /// </summary>
-    // ----------------------------------------------------------------------
-    public class TextStyleChangedEventArgs : EventArgs
-    {
-        ITextStyle mTextStyle;
-
-        // ------------------------------------------------------------------
-        /// <summary>
-        /// Gets the text style that changed.
-        /// </summary>
-        // ------------------------------------------------------------------
-        public ITextStyle TextStyle
-        {
-            get
-            {
-                return mTextStyle;
-            }
-        }
-
-        // ------------------------------------------------------------------
-        /// <summary>
-        /// Constructor.
-        /// </summary>
-        /// <param name="textStyle">ITextStyle: The ITextStyle that
-        /// changed.</param>
-        // ------------------------------------------------------------------
-        public TextStyleChangedEventArgs(ITextStyle textStyle)
-        {
-            mTextStyle = textStyle;
-        }
-    }
-
-    #endregion
-
-    #region ConnectorAttachmentEventArgs
-    /// <summary>
-    /// Event argument on connecting a connection to a connector
-    /// </summary>
-    public sealed class ConnectorAttachmentEventArgs : EventArgs
-    {
-        /// <summary>
-        /// the child connector
-        /// </summary>
-        IConnector child;
-        /// <summary>
-        /// the parent connector
-        /// </summary>
-        IConnector parent;
-        /// <summary>
-        /// the actual connection
-        /// </summary>
-        IConnection connection;
-
-
-        /// <summary>
-        /// Gets the child connector.
-        /// </summary>
-        /// <value>The child.</value>
-        public IConnector Child
-        {
-            get
-            {
-                return child;
-            }
-        }
-
-        /// <summary>
-        /// Gets the parent connector.
-        /// </summary>
-        /// <value>The parent.</value>
-        public IConnector Parent
-        {
-            get
-            {
-                return parent;
-            }
-        }
-
-        /// <summary>
-        /// Gets the connection.
-        /// </summary>
-        /// <value>The connection.</value>
-        public IConnection Connection
-        {
-            get
-            {
-                return connection;
-            }
-        }
-
-        /// <summary>
-        /// Initializes a new instance of the <see cref="T:ConnectorAttachmentEventArgs"/> class.
-        /// </summary>
-        /// <param name="child">The child.</param>
-        /// <param name="parent">The parent.</param>
-        /// <param name="connection">The connection.</param>
-        public ConnectorAttachmentEventArgs(IConnector child, IConnector parent, IConnection connection)
-        {
-            this.child = child;
-            this.parent = parent;
-            this.connection = connection;
-        }
-    }
-    #endregion
-
-    #region EntityMenuEventArgs
-    /// <summary>
-    /// Event argument on creation of the contextmenu f an entity
-    /// </summary>
-    public sealed class EntityMenuEventArgs : EventArgs
-    {
-        #region Fields
-        /// <summary>
-        /// the entity
-        /// </summary>
-        private IDiagramEntity entity;
-        /// <summary>
-        /// the mouse event argument containing location etc.
-        /// </summary>
-        private MouseEventArgs e;
-        /// <summary>
-        /// the additional menu items to add
-        /// </summary>
-        private ToolStripItem[] additionalItems;
-        #endregion;
-
-        #region Properties
-        /// <summary>
-        /// Gets the entity.
-        /// </summary>
-        /// <value>The entity.</value>
-        public IDiagramEntity Entity
-        {
-            get
-            {
-                return entity;
-            }
-        }
-
-        /// <summary>
-        /// Gets the mouse event args.
-        /// </summary>
-        /// <value>The mouse event args.</value>
-        public MouseEventArgs MouseEventArgs
-        {
-            get
-            {
-                return e;
-            }
-        }
-
-        /// <summary>
-        /// Gets the additional items.
-        /// </summary>
-        /// <value>The additional items.</value>
-        public ToolStripItem[] AdditionalItems
-        {
-            get
-            {
-                return additionalItems;
-            }
-        }
-
-        #endregion
-
-        #region Constructor
-        /// <summary>
-        /// Initializes a new instance of the <see cref="T:EntityMenuEventArgs"/> class.
-        /// </summary>
-        /// <param name="entity">The entity.</param>
-        /// <param name="e">The <see cref="T:System.Windows.Forms.MouseEventArgs"/> instance containing the event data.</param>
-        /// <param name="additionalItems">The additional items.</param>
-        public EntityMenuEventArgs(
-            IDiagramEntity entity, 
-            MouseEventArgs e,
-            ref ToolStripItem[] additionalItems)
-        {
-            this.entity = entity;
-            this.e = e;
-            this.additionalItems = additionalItems;
-        }
-        #endregion
-
-    }
-    #endregion
-
-    #region CursorEventArgs
-    /// <summary>
-    /// Cursor event argument
-    /// </summary>
-    public sealed class CursorEventArgs : EventArgs
-    {
-        /// <summary>
-        /// the Empty argument
-        /// </summary>
-        public static readonly new CursorEventArgs Empty = new CursorEventArgs();
-        /// <summary>
-        /// the Tool field
-        /// </summary>
-        private Cursor mCursor;
-        /// <summary>
-        /// Gets or sets the Cursor
-        /// </summary>
-        public Cursor Cursor
-        {
-            get
-            {
-                return mCursor;
-            }
-            set
-            {
-                mCursor = value;
-            }
-        }
-
-
-
-        #region Constructor
-        ///<summary>
-        ///Default constructor
-        ///</summary>
-        public CursorEventArgs(Cursor cursor)
-        {
-            this.mCursor = cursor;
-        }
-        /// <summary>
-        /// Initializes a new instance of the <see cref="T:CursorEventArgs"/> class.
-        /// </summary>
-        public CursorEventArgs()
-        {
-        }
-        #endregion
-
-    }
-    #endregion
-
-
-    #region CursorEventArgs
-    /// <summary>
-    /// Cursor event argument
-    /// </summary>
-    public sealed class ColorEventArgs : EventArgs
-    {
-        /// <summary>
-        /// the Empty argument
-        /// </summary>
-        public static readonly new CursorEventArgs Empty = new CursorEventArgs();
-        /// <summary>
-        /// the Color field
-        /// </summary>
-        private Color mColor;
-        /// <summary>
-        /// Gets or sets the Color
-        /// </summary>
-        public Color Color
-        {
-            get
-            {
-                return mColor;
-            }
-            set
-            {
-                mColor = value;
-            }
-        }
-
-        #region Constructor
-        ///<summary>
-        ///Default constructor
-        ///</summary>
-        public ColorEventArgs(Color color)
-        {
-            this.mColor = color;
-        }
-        /// <summary>
-        /// Initializes a new instance of the <see cref="T:CursorEventArgs"/> class.
-        /// </summary>
-        public ColorEventArgs()
-        {
-        }
-        #endregion
-
-    }
-    #endregion
-
-    #region PageEventArgs
-
-    // ----------------------------------------------------------------------
-    /// <summary>
-    /// Provides information about a page event (page added, current page
-    /// changed, etc.).
-    /// </summary>
-    // ----------------------------------------------------------------------
-    public sealed class PageEventArgs : EventArgs
-    {
-        // ------------------------------------------------------------------
-        /// <summary>
-        /// The page.
-        /// </summary>
-        // ------------------------------------------------------------------
-        IPage mPage;
-
-        // ------------------------------------------------------------------
-        /// <summary>
-        /// Gets the page for the event argument.
-        /// </summary>
-        // ------------------------------------------------------------------
-        public IPage Page
-        {
-            get
-            {
-                return mPage;
-            }
-        }
-
-        // ------------------------------------------------------------------
-        /// <summary>
-        /// Constructor.
-        /// </summary>
-        /// <param name="page">IPage</param>
-        // ------------------------------------------------------------------
-        public PageEventArgs(IPage page)
-        {
-            mPage = page;
-        }
-    }
-
-    #endregion
-
-    #region ToolEventArgs
-    /// <summary>
-    /// Tool event argument
-    /// </summary>
-    public sealed class ToolEventArgs : EventArgs
-    {
-
-        /// <summary>
-        /// the Tool field
-        /// </summary>
-        private ITool mTool;
-        /// <summary>
-        /// Gets or sets the Properties
-        /// </summary>
-        public ITool Properties
-        {
-            get
-            {
-                return mTool;
-            }
-            set
-            {
-                mTool = value;
-            }
-        }
-        /// <summary>
-        /// The empty argument.
-        /// </summary>
-        public static readonly new ToolEventArgs Empty = new ToolEventArgs();
-
-        #region Constructor
-        ///<summary>
-        ///Default constructor
-        ///</summary>
-        public ToolEventArgs(ITool tool)
-        {
-            this.mTool = tool;
-        }
-        /// <summary>
-        /// Initializes a new instance of the <see cref="T:ToolEventArgs"/> class.
-        /// </summary>
-        public ToolEventArgs()
-        {
-        }
-        #endregion
-
-    }
-    #endregion
-
-    #region PropertiesEventArgs
-    /// <summary>
-    /// Properties event argument
-    /// </summary>
-    public sealed class PropertiesEventArgs : EventArgs
-    {
-
-        /// <summary>
-        /// the Properties field
-        /// </summary>
-        private Document mProperties;
-        /// <summary>
-        /// Gets or sets the Properties
-        /// </summary>
-        public Document Properties
-        {
-            get
-            {
-                return mProperties;
-            }
-            set
-            {
-                mProperties = value;
-            }
-        }
-        /// <summary>
-        /// The empty argument.
-        /// </summary>
-        public static readonly new PropertiesEventArgs Empty = new PropertiesEventArgs();
-
-        #region Constructor
-        ///<summary>
-        ///Default constructor
-        ///</summary>
-        public PropertiesEventArgs(Document document)
-        {
-            this.mProperties = document;
-        }
-        /// <summary>
-        /// Initializes a new instance of the <see cref="T:PropertiesEventArgs"/> class.
-        /// </summary>
-        public PropertiesEventArgs()
-        {
-        }
-        #endregion
-
-    }
-    #endregion
-
-    #region AmbienceEventArgs
-    /// <summary>
-    /// Ambience event argument
-    /// </summary>
-    public sealed class AmbienceEventArgs : EventArgs
-    {
-
-
-        /// <summary>
-        /// the Ambience field
-        /// </summary>
-        private Ambience mAmbience;
-        /// <summary>
-        /// Gets or sets the Ambience
-        /// </summary>
-        public Ambience Ambience
-        {
-            get
-            {
-                return mAmbience;
-            }
-            set
-            {
-                mAmbience = value;
-            }
-        }
-
-        /// <summary>
-        /// The Empty event argument
-        /// </summary>
-        public static readonly new AmbienceEventArgs Empty = new AmbienceEventArgs();
-
-
-        #region Constructor
-        ///<summary>
-        ///Default constructor
-        ///</summary>
-        public AmbienceEventArgs()
-        {
-
-        }
-        /// <summary>
-        /// Initializes a new instance of the <see cref="T:AmbienceEventArgs"/> class.
-        /// </summary>
-        /// <param name="ambience">The ambience.</param>
-        public AmbienceEventArgs(Ambience ambience)
-        {
-            this.mAmbience = ambience;
-        }
-        #endregion
-
-    }
-    #endregion
-
-    #region ConnectionCollectionEventArgs
-    /// <summary>
-    /// ConnectionCollection event argument
-    /// </summary>
-    public sealed class ConnectionCollectionEventArgs : EventArgs
-    {
-
-        /// <summary>
-        /// the Connection field
-        /// </summary>
-        private IConnection mConnection;
-        /// <summary>
-        /// Gets or sets the Connection
-        /// </summary>
-        public IConnection Connection
-        {
-            get
-            {
-                return mConnection;
-            }
-            set
-            {
-                mConnection = value;
-            }
-        }
-
-        /// <summary>
-        /// The Empty event argument
-        /// </summary>
-        public static readonly new ConnectionCollectionEventArgs Empty = new ConnectionCollectionEventArgs();
-
-
-        #region Constructor
-        ///<summary>
-        ///Default constructor
-        ///</summary>
-        public ConnectionCollectionEventArgs()
-        {
-
-        }
-        /// <summary>
-        /// Initializes a new instance of the <see cref="T:ConnectionCollectionEventArgs"/> class.
-        /// </summary>
-        /// <param name="connection">The connection.</param>
-        public ConnectionCollectionEventArgs(IConnection connection)
-        {
-            this.mConnection = connection;
-        }
-        #endregion
-
-    }
-    #endregion
-
-    #region DiagramInformationEventArgs
-    /// <summary>
-    /// Event argument on passing diagram information (metdata)
-    /// </summary>
-    public sealed class DiagramInformationEventArgs : EventArgs
-    {
-
-        /// <summary>
-        /// the Information field
-        /// </summary>
-        private DocumentInformation mInformation;
-        /// <summary>
-        /// Gets or sets the Information
-        /// </summary>
-        public DocumentInformation Information
-        {
-            get
-            {
-                return mInformation;
-            }
-            set
-            {
-                mInformation = value;
-            }
-        }
-
-        #region Constructor
-        ///<summary>
-        ///Default constructor
-        ///</summary>
-        private DiagramInformationEventArgs()
-        {
-
-        }
-        /// <summary>
-        /// Initializes a new instance of the <see cref="T:DiagramInformationEventArgs"/> class.
-        /// </summary>
-        /// <param name="info">The info.</param>
-        public DiagramInformationEventArgs(DocumentInformation info)
-        {
-            this.mInformation = info;
-        }
-        #endregion
-        /// <summary>
-        /// The Empty event argument
-        /// </summary>
-        public static readonly new DiagramInformationEventArgs Empty = new DiagramInformationEventArgs();
-    }
-    #endregion
-
-    #region CollectionEventArgs
-    /// <summary>
-    /// Event argument to pass <see cref="CollectionBase"/> information via events
-    /// </summary>
-    /// <typeparam name="T"></typeparam>
-    public class CollectionEventArgs<T> : EventArgs
-    {
-        private T item;
-
-        /// <summary>
-        /// Gets the item.
-        /// </summary>
-        /// <value>The item.</value>
-        public T Item
-        {
-            get { return item; }
-        }
-        /// <summary>
-        /// Initializes a new instance of the <see cref="T:CollectionEventArgs&lt;T&gt;"/> class.
-        /// </summary>
-        /// <param name="item">A parameter of the generics Type T</param>
-        public CollectionEventArgs(T item)
-        {
-            this.item = item;
-        }
-    }
-    #endregion
-
-    #region RectangleEventArgs
-    /// <summary>
-    /// Event argument to pass <see cref="Rectangle"/> information via events
-    /// </summary>
-    public sealed class RectangleEventArgs : EventArgs
-    {
-        /// <summary>
-        /// the rectangle
-        /// </summary>
-        private Rectangle mRectangle;
-
-        /// <summary>
-        /// Gets the rectangle.
-        /// </summary>
-        /// <value>The rectangle.</value>
-        public Rectangle Rectangle
-        {
-            get
-            {
-                return mRectangle;
-            }
-        }
-        /// <summary>
-        /// The Empty event argument
-        /// </summary>
-        public static readonly new RectangleEventArgs Empty = new RectangleEventArgs();
-
-
-        #region Constructor
-        ///<summary>
-        ///Default constructor
-        ///</summary>
-        public RectangleEventArgs(Rectangle rectangle)
-        {
-            this.mRectangle = rectangle;
-        }
-        /// <summary>
-        /// Initializes a new instance of the <see cref="T:RectangleEventArgs"/> class.
-        /// </summary>
-        private RectangleEventArgs()
-        {
-        }
-        #endregion
-
-    }
-    #endregion
-
-    #region EntityEventArgs
-    /// <summary>
-    /// Event argument carrying an item
-    /// </summary>
-    public sealed class EntityEventArgs : EventArgs
-    {
-        /// <summary>
-        /// Gets or sets the entity
-        /// </summary>
-        IDiagramEntity mEntity;
-
-        /// <summary>
-        /// Gets or sets the entity.
-        /// </summary>
-        /// <value>The entity.</value>
-        public IDiagramEntity Entity
-        {
-            get
-            {
-                return mEntity;
-            }
-            set
-            {
-                mEntity = value;
-            }
-        }
-        /// <summary>
-        /// Default constructor
-        /// </summary>
-        /// <param name="entity"></param>
-        public EntityEventArgs(IDiagramEntity entity)
-        {
-            this.Entity = entity;
-        }
-    }
-    #endregion
-
-    #region EntityMouseEventArgs
-    /// <summary>
-    /// MouseEvent argument carrying an item
-    /// </summary>
-    public sealed class EntityMouseEventArgs : MouseEventArgs
-    {
-
-
-        /// <summary>
-        /// Gets or sets the entity
-        /// </summary>
-        IDiagramEntity mEntity;
-
-        /// <summary>
-        /// Gets or sets the entity.
-        /// </summary>
-        /// <value>The entity.</value>
-        public IDiagramEntity Entity
-        {
-            get
-            {
-                return mEntity;
-            }
-            set
-            {
-                mEntity = value;
-            }
-        }
-        /// <summary>
-        /// Default constructor
-        /// </summary>
-        /// <param name="entity">The entity.</param>
-        /// <param name="button">The button.</param>
-        /// <param name="clicks">The clicks.</param>
-        /// <param name="x">The x.</param>
-        /// <param name="y">The y.</param>
-        /// <param name="delta">The delta.</param>
-        public EntityMouseEventArgs(IDiagramEntity entity, MouseButtons button, int clicks, int x, int y, int delta)
-            : base(button, clicks, x, y, delta)
-        {
-            this.mEntity = entity;
-        }
-        /// <summary>
-        /// Initializes a new instance of the <see cref="T:EntityMouseEventArgs"/> class.
-        /// </summary>
-        /// <param name="entity">The entity.</param>
-        /// <param name="e">The <see cref="T:System.Windows.Forms.MouseEventArgs"/> instance containing the event data.</param>
-        public EntityMouseEventArgs(IDiagramEntity entity, MouseEventArgs e)
-            : base(e.Button, e.Clicks, e.X, e.Y, e.Delta)
-        {
-            if(e == null)
-                throw new ArgumentNullException("The argument object is 'null'");
-            this.mEntity = entity;
-        }
-    }
-    #endregion
-
-    #region StringEventArgs
-    /// <summary>
-    /// Contains a string event argument
-    /// </summary>
-    public sealed class StringEventArgs : EventArgs
-    {
-
-        string mData;
-        /// <summary>
-        /// Gets or sets the string data 
-        /// </summary>
-        public string Data
-        {
-            get
-            {
-                return mData;
-            }
-
-        }
-        /// <summary>
-        /// Default constructor
-        /// </summary>
-        /// <param name="data"></param>
-        public StringEventArgs(string data)
-        {
-            this.mData = data;
-        }
-    }
-    #endregion
-
-    #region SingleDataEventArgs
-    /// <summary>
-    /// A single-bucket data transfer event argument
-    /// </summary>
-    /// <typeparam name="T"></typeparam>
-    public sealed class SingleDataEventArgs<T> : EventArgs
-    {
-        /// <summary>
-        /// whatever data
-        /// </summary>
-        T mData;
-
-        /// <summary>
-        /// Gets the data.
-        /// </summary>
-        /// <value>The data.</value>
-        public T Data
-        {
-            get
-            {
-                return mData;
-            }
-        }
-
-        /// <summary>
-        /// Initializes a new instance of the <see cref="T:SingleDataEventArgs&lt;T&gt;"/> class.
-        /// </summary>
-        /// <param name="data">A parameter of the generics Type T</param>
-        public SingleDataEventArgs(T data)
-        {
-            //if (data is default(T))
-            //    throw new ArgumentNullException("The argument does not contain any data.");
-
-            this.mData = data;
-        }
-    }
-
-    #endregion
-
-    #region HistoryChangeEventArgs
-
-    /// <summary>
-    /// Event argument to communicate history changes in the undo/redo mechanism
-    /// </summary>
-    public sealed class HistoryChangeEventArgs : EventArgs
-    {
-        /// <summary>
-        /// the RedoText field
-        /// </summary>
-        private string mRedoText;
-        /// <summary>
-        /// Gets or sets the RedoText
-        /// </summary>
-        public string RedoText
-        {
-            get
-            {
-                return mRedoText;
-            }
-            set
-            {
-                mRedoText = value;
-            }
-        }
-
-        /// <summary>
-        /// the UndoText field
-        /// </summary>
-        private string mUndoText;
-        /// <summary>
-        /// Gets or sets the UndoText
-        /// </summary>
-        public string UndoText
-        {
-            get
-            {
-                return mUndoText;
-            }
-            set
-            {
-                mUndoText = value;
-            }
-        }
-
-        #region Constructor
-        ///<summary>
-        ///Default constructor
-        ///</summary>
-        public HistoryChangeEventArgs(string redoText, string undoText)
-        {
-            this.mRedoText = redoText;
-            this.mUndoText = undoText;
-        }
-
-        #endregion
-
-    }
-    #endregion
-
-    #region SelectionEventArgs
-    /// <summary>
-    /// Properties event argument
-    /// </summary>
-    public sealed class SelectionEventArgs : EventArgs
-    {
-        /// <summary>
-        /// the Properties field
-        /// </summary>
-        private object[] mObjects;
-        /// <summary>
-        /// Gets or sets the selected objects
-        /// </summary>
-        public object[] SelectedObjects
-        {
-            get
-            {
-                return mObjects;
-            }
-            set
-            {
-                mObjects = value;
-            }
-        }
-        /// <summary>
-        /// The empty argument.
-        /// </summary>
-        public static readonly new PropertiesEventArgs Empty = new PropertiesEventArgs();
-
-        #region Constructor
-        ///<summary>
-        ///Default constructor
-        ///</summary>
-        public SelectionEventArgs(object[] objects)
-        {
-            this.mObjects = objects;
-        }
-        /// <summary>
-        /// Initializes a new instance of the <see cref="T:SelectionEventArgs"/> class.
-        /// </summary>
-        public SelectionEventArgs()
-        {
-        }
-        #endregion
-
-    }
-    #endregion
-
-    #region CancelableEntityEventArgs
-    /// <summary>
-    /// Event argument carrying an item
-    /// </summary>
-    public sealed class CancelableEntityEventArgs : EventArgs
-    {
-
-        /// <summary>
-        /// the Cancel field
-        /// </summary>
-        private bool mCancel;
-        /// <summary>
-        /// Gets or sets the Cancel
-        /// </summary>
-        public bool Cancel
-        {
-            get
-            {
-                return mCancel;
-            }
-            set
-            {
-                mCancel = value;
-            }
-        }
-
-
-        /// <summary>
-        /// Gets or sets the entity
-        /// </summary>
-        IDiagramEntity mEntity;
-
-        /// <summary>
-        /// Gets or sets the entity.
-        /// </summary>
-        /// <value>The entity.</value>
-        public IDiagramEntity Entity
-        {
-            get
-            {
-                return mEntity;
-            }
-            set
-            {
-                mEntity = value;
-            }
-        }
-        /// <summary>
-        /// Default constructor
-        /// </summary>
-        /// <param name="entity"></param>
-        public CancelableEntityEventArgs(IDiagramEntity entity)
-        {
-            this.Entity = entity;
-        }
-    }
-    #endregion
-
-    #region FileEventArgs
-    /// <summary>
-    /// Contains a string event argument
-    /// </summary>
-    public sealed class FileEventArgs : EventArgs
-    {
-
-
-        /// <summary>
-        /// the File field
-        /// </summary>
-        private FileInfo mFile;
-        /// <summary>
-        /// Gets or sets the file information
-        /// </summary>
-        public FileInfo File
-        {
-            get
-            {
-                return mFile;
-            }
-        }
-
-        /// <summary>
-        /// Default constructor
-        /// </summary>
-        /// <param name="info">The info.</param>
-        public FileEventArgs(FileInfo info)
-        {
-            this.mFile = info;
-        }
-    }
-    #endregion
+namespace Netron.Diagramming.Core {
+  #region PaintStyle EventArgs
+
+  // ----------------------------------------------------------------------
+  /// <summary>
+  /// Provides information about a PaintStyleChanged event.
+  /// </summary>
+  // ----------------------------------------------------------------------
+  public class PaintStyleChangedEventArgs : EventArgs {
+    IPaintStyle mPaintStyle;
+    FillType mFillType;
+
+    // ------------------------------------------------------------------
+    /// <summary>
+    /// Gets the paint style that changed.
+    /// </summary>
+    // ------------------------------------------------------------------
+    public IPaintStyle PaintStyle {
+      get {
+        return mPaintStyle;
+      }
+    }
+
+    // ------------------------------------------------------------------
+    /// <summary>
+    /// Gets the new FillType.
+    /// </summary>
+    // ------------------------------------------------------------------
+    public FillType FillType {
+      get {
+        return mFillType;
+      }
+    }
+
+    // ------------------------------------------------------------------
+    /// <summary>
+    /// Constructor.
+    /// </summary>
+    /// <param name="paintStyle">IPaintStyle: The IPaintStyle that
+    /// changed.</param>
+    /// <param name="newFillType">FillType: The new fill type.</param>
+    // ------------------------------------------------------------------
+    public PaintStyleChangedEventArgs(
+        IPaintStyle paintStyle,
+        FillType newFillType) {
+      mPaintStyle = paintStyle;
+      mFillType = newFillType;
+    }
+  }
+
+  #endregion
+
+  #region TextStyle EventArgs
+
+  // ----------------------------------------------------------------------
+  /// <summary>
+  /// Provides information about a TextStyleChanged event.
+  /// </summary>
+  // ----------------------------------------------------------------------
+  public class TextStyleChangedEventArgs : EventArgs {
+    ITextStyle mTextStyle;
+
+    // ------------------------------------------------------------------
+    /// <summary>
+    /// Gets the text style that changed.
+    /// </summary>
+    // ------------------------------------------------------------------
+    public ITextStyle TextStyle {
+      get {
+        return mTextStyle;
+      }
+    }
+
+    // ------------------------------------------------------------------
+    /// <summary>
+    /// Constructor.
+    /// </summary>
+    /// <param name="textStyle">ITextStyle: The ITextStyle that
+    /// changed.</param>
+    // ------------------------------------------------------------------
+    public TextStyleChangedEventArgs(ITextStyle textStyle) {
+      mTextStyle = textStyle;
+    }
+  }
+
+  #endregion
+
+  #region ConnectorAttachmentEventArgs
+  /// <summary>
+  /// Event argument on connecting a connection to a connector
+  /// </summary>
+  public sealed class ConnectorAttachmentEventArgs : EventArgs {
+    /// <summary>
+    /// the child connector
+    /// </summary>
+    IConnector child;
+    /// <summary>
+    /// the parent connector
+    /// </summary>
+    IConnector parent;
+    /// <summary>
+    /// the actual connection
+    /// </summary>
+    IConnection connection;
+
+
+    /// <summary>
+    /// Gets the child connector.
+    /// </summary>
+    /// <value>The child.</value>
+    public IConnector Child {
+      get {
+        return child;
+      }
+    }
+
+    /// <summary>
+    /// Gets the parent connector.
+    /// </summary>
+    /// <value>The parent.</value>
+    public IConnector Parent {
+      get {
+        return parent;
+      }
+    }
+
+    /// <summary>
+    /// Gets the connection.
+    /// </summary>
+    /// <value>The connection.</value>
+    public IConnection Connection {
+      get {
+        return connection;
+      }
+    }
+
+    /// <summary>
+    /// Initializes a new instance of the <see cref="T:ConnectorAttachmentEventArgs"/> class.
+    /// </summary>
+    /// <param name="child">The child.</param>
+    /// <param name="parent">The parent.</param>
+    /// <param name="connection">The connection.</param>
+    public ConnectorAttachmentEventArgs(IConnector child, IConnector parent, IConnection connection) {
+      this.child = child;
+      this.parent = parent;
+      this.connection = connection;
+    }
+  }
+  #endregion
+
+  #region EntityMenuEventArgs
+  /// <summary>
+  /// Event argument on creation of the contextmenu f an entity
+  /// </summary>
+  public sealed class EntityMenuEventArgs : EventArgs {
+    #region Fields
+    /// <summary>
+    /// the entity
+    /// </summary>
+    private IDiagramEntity entity;
+    /// <summary>
+    /// the mouse event argument containing location etc.
+    /// </summary>
+    private MouseEventArgs e;
+    /// <summary>
+    /// the additional menu items to add
+    /// </summary>
+    private ToolStripItem[] additionalItems;
+    #endregion;
+
+    #region Properties
+    /// <summary>
+    /// Gets the entity.
+    /// </summary>
+    /// <value>The entity.</value>
+    public IDiagramEntity Entity {
+      get {
+        return entity;
+      }
+    }
+
+    /// <summary>
+    /// Gets the mouse event args.
+    /// </summary>
+    /// <value>The mouse event args.</value>
+    public MouseEventArgs MouseEventArgs {
+      get {
+        return e;
+      }
+    }
+
+    /// <summary>
+    /// Gets the additional items.
+    /// </summary>
+    /// <value>The additional items.</value>
+    public ToolStripItem[] AdditionalItems {
+      get {
+        return additionalItems;
+      }
+    }
+
+    #endregion
+
+    #region Constructor
+    /// <summary>
+    /// Initializes a new instance of the <see cref="T:EntityMenuEventArgs"/> class.
+    /// </summary>
+    /// <param name="entity">The entity.</param>
+    /// <param name="e">The <see cref="T:System.Windows.Forms.MouseEventArgs"/> instance containing the event data.</param>
+    /// <param name="additionalItems">The additional items.</param>
+    public EntityMenuEventArgs(
+        IDiagramEntity entity,
+        MouseEventArgs e,
+        ref ToolStripItem[] additionalItems) {
+      this.entity = entity;
+      this.e = e;
+      this.additionalItems = additionalItems;
+    }
+    #endregion
+
+  }
+  #endregion
+
+  #region CursorEventArgs
+  /// <summary>
+  /// Cursor event argument
+  /// </summary>
+  public sealed class CursorEventArgs : EventArgs {
+    /// <summary>
+    /// the Empty argument
+    /// </summary>
+    public static readonly new CursorEventArgs Empty = new CursorEventArgs();
+    /// <summary>
+    /// the Tool field
+    /// </summary>
+    private Cursor mCursor;
+    /// <summary>
+    /// Gets or sets the Cursor
+    /// </summary>
+    public Cursor Cursor {
+      get {
+        return mCursor;
+      }
+      set {
+        mCursor = value;
+      }
+    }
+
+
+
+    #region Constructor
+    ///<summary>
+    ///Default constructor
+    ///</summary>
+    public CursorEventArgs(Cursor cursor) {
+      this.mCursor = cursor;
+    }
+    /// <summary>
+    /// Initializes a new instance of the <see cref="T:CursorEventArgs"/> class.
+    /// </summary>
+    public CursorEventArgs() {
+    }
+    #endregion
+
+  }
+  #endregion
+
+
+  #region CursorEventArgs
+  /// <summary>
+  /// Cursor event argument
+  /// </summary>
+  public sealed class ColorEventArgs : EventArgs {
+    /// <summary>
+    /// the Empty argument
+    /// </summary>
+    public static readonly new CursorEventArgs Empty = new CursorEventArgs();
+    /// <summary>
+    /// the Color field
+    /// </summary>
+    private Color mColor;
+    /// <summary>
+    /// Gets or sets the Color
+    /// </summary>
+    public Color Color {
+      get {
+        return mColor;
+      }
+      set {
+        mColor = value;
+      }
+    }
+
+    #region Constructor
+    ///<summary>
+    ///Default constructor
+    ///</summary>
+    public ColorEventArgs(Color color) {
+      this.mColor = color;
+    }
+    /// <summary>
+    /// Initializes a new instance of the <see cref="T:CursorEventArgs"/> class.
+    /// </summary>
+    public ColorEventArgs() {
+    }
+    #endregion
+
+  }
+  #endregion
+
+  #region PageEventArgs
+
+  // ----------------------------------------------------------------------
+  /// <summary>
+  /// Provides information about a page event (page added, current page
+  /// changed, etc.).
+  /// </summary>
+  // ----------------------------------------------------------------------
+  public sealed class PageEventArgs : EventArgs {
+    // ------------------------------------------------------------------
+    /// <summary>
+    /// The page.
+    /// </summary>
+    // ------------------------------------------------------------------
+    IPage mPage;
+
+    // ------------------------------------------------------------------
+    /// <summary>
+    /// Gets the page for the event argument.
+    /// </summary>
+    // ------------------------------------------------------------------
+    public IPage Page {
+      get {
+        return mPage;
+      }
+    }
+
+    // ------------------------------------------------------------------
+    /// <summary>
+    /// Constructor.
+    /// </summary>
+    /// <param name="page">IPage</param>
+    // ------------------------------------------------------------------
+    public PageEventArgs(IPage page) {
+      mPage = page;
+    }
+  }
+
+  #endregion
+
+  #region ToolEventArgs
+  /// <summary>
+  /// Tool event argument
+  /// </summary>
+  public sealed class ToolEventArgs : EventArgs {
+
+    /// <summary>
+    /// the Tool field
+    /// </summary>
+    private ITool mTool;
+    /// <summary>
+    /// Gets or sets the Properties
+    /// </summary>
+    public ITool Properties {
+      get {
+        return mTool;
+      }
+      set {
+        mTool = value;
+      }
+    }
+    /// <summary>
+    /// The empty argument.
+    /// </summary>
+    public static readonly new ToolEventArgs Empty = new ToolEventArgs();
+
+    #region Constructor
+    ///<summary>
+    ///Default constructor
+    ///</summary>
+    public ToolEventArgs(ITool tool) {
+      this.mTool = tool;
+    }
+    /// <summary>
+    /// Initializes a new instance of the <see cref="T:ToolEventArgs"/> class.
+    /// </summary>
+    public ToolEventArgs() {
+    }
+    #endregion
+
+  }
+  #endregion
+
+  #region PropertiesEventArgs
+  /// <summary>
+  /// Properties event argument
+  /// </summary>
+  public sealed class PropertiesEventArgs : EventArgs {
+
+    /// <summary>
+    /// the Properties field
+    /// </summary>
+    private Document mProperties;
+    /// <summary>
+    /// Gets or sets the Properties
+    /// </summary>
+    public Document Properties {
+      get {
+        return mProperties;
+      }
+      set {
+        mProperties = value;
+      }
+    }
+    /// <summary>
+    /// The empty argument.
+    /// </summary>
+    public static readonly new PropertiesEventArgs Empty = new PropertiesEventArgs();
+
+    #region Constructor
+    ///<summary>
+    ///Default constructor
+    ///</summary>
+    public PropertiesEventArgs(Document document) {
+      this.mProperties = document;
+    }
+    /// <summary>
+    /// Initializes a new instance of the <see cref="T:PropertiesEventArgs"/> class.
+    /// </summary>
+    public PropertiesEventArgs() {
+    }
+    #endregion
+
+  }
+  #endregion
+
+  #region AmbienceEventArgs
+  /// <summary>
+  /// Ambience event argument
+  /// </summary>
+  public sealed class AmbienceEventArgs : EventArgs {
+
+
+    /// <summary>
+    /// the Ambience field
+    /// </summary>
+    private Ambience mAmbience;
+    /// <summary>
+    /// Gets or sets the Ambience
+    /// </summary>
+    public Ambience Ambience {
+      get {
+        return mAmbience;
+      }
+      set {
+        mAmbience = value;
+      }
+    }
+
+    /// <summary>
+    /// The Empty event argument
+    /// </summary>
+    public static readonly new AmbienceEventArgs Empty = new AmbienceEventArgs();
+
+
+    #region Constructor
+    ///<summary>
+    ///Default constructor
+    ///</summary>
+    public AmbienceEventArgs() {
+
+    }
+    /// <summary>
+    /// Initializes a new instance of the <see cref="T:AmbienceEventArgs"/> class.
+    /// </summary>
+    /// <param name="ambience">The ambience.</param>
+    public AmbienceEventArgs(Ambience ambience) {
+      this.mAmbience = ambience;
+    }
+    #endregion
+
+  }
+  #endregion
+
+  #region ConnectionCollectionEventArgs
+  /// <summary>
+  /// ConnectionCollection event argument
+  /// </summary>
+  public sealed class ConnectionCollectionEventArgs : EventArgs {
+
+    /// <summary>
+    /// the Connection field
+    /// </summary>
+    private IConnection mConnection;
+    /// <summary>
+    /// Gets or sets the Connection
+    /// </summary>
+    public IConnection Connection {
+      get {
+        return mConnection;
+      }
+      set {
+        mConnection = value;
+      }
+    }
+
+    /// <summary>
+    /// The Empty event argument
+    /// </summary>
+    public static readonly new ConnectionCollectionEventArgs Empty = new ConnectionCollectionEventArgs();
+
+
+    #region Constructor
+    ///<summary>
+    ///Default constructor
+    ///</summary>
+    public ConnectionCollectionEventArgs() {
+
+    }
+    /// <summary>
+    /// Initializes a new instance of the <see cref="T:ConnectionCollectionEventArgs"/> class.
+    /// </summary>
+    /// <param name="connection">The connection.</param>
+    public ConnectionCollectionEventArgs(IConnection connection) {
+      this.mConnection = connection;
+    }
+    #endregion
+
+  }
+  #endregion
+
+  #region DiagramInformationEventArgs
+  /// <summary>
+  /// Event argument on passing diagram information (metdata)
+  /// </summary>
+  public sealed class DiagramInformationEventArgs : EventArgs {
+
+    /// <summary>
+    /// the Information field
+    /// </summary>
+    private DocumentInformation mInformation;
+    /// <summary>
+    /// Gets or sets the Information
+    /// </summary>
+    public DocumentInformation Information {
+      get {
+        return mInformation;
+      }
+      set {
+        mInformation = value;
+      }
+    }
+
+    #region Constructor
+    ///<summary>
+    ///Default constructor
+    ///</summary>
+    private DiagramInformationEventArgs() {
+
+    }
+    /// <summary>
+    /// Initializes a new instance of the <see cref="T:DiagramInformationEventArgs"/> class.
+    /// </summary>
+    /// <param name="info">The info.</param>
+    public DiagramInformationEventArgs(DocumentInformation info) {
+      this.mInformation = info;
+    }
+    #endregion
+    /// <summary>
+    /// The Empty event argument
+    /// </summary>
+    public static readonly new DiagramInformationEventArgs Empty = new DiagramInformationEventArgs();
+  }
+  #endregion
+
+  #region CollectionEventArgs
+  /// <summary>
+  /// Event argument to pass <see cref="CollectionBase"/> information via events
+  /// </summary>
+  /// <typeparam name="T"></typeparam>
+  public class CollectionEventArgs<T> : EventArgs {
+    private T item;
+
+    /// <summary>
+    /// Gets the item.
+    /// </summary>
+    /// <value>The item.</value>
+    public T Item {
+      get { return item; }
+    }
+    /// <summary>
+    /// Initializes a new instance of the <see cref="T:CollectionEventArgs&lt;T&gt;"/> class.
+    /// </summary>
+    /// <param name="item">A parameter of the generics Type T</param>
+    public CollectionEventArgs(T item) {
+      this.item = item;
+    }
+  }
+  #endregion
+
+  #region RectangleEventArgs
+  /// <summary>
+  /// Event argument to pass <see cref="Rectangle"/> information via events
+  /// </summary>
+  public sealed class RectangleEventArgs : EventArgs {
+    /// <summary>
+    /// the rectangle
+    /// </summary>
+    private Rectangle mRectangle;
+
+    /// <summary>
+    /// Gets the rectangle.
+    /// </summary>
+    /// <value>The rectangle.</value>
+    public Rectangle Rectangle {
+      get {
+        return mRectangle;
+      }
+    }
+    /// <summary>
+    /// The Empty event argument
+    /// </summary>
+    public static readonly new RectangleEventArgs Empty = new RectangleEventArgs();
+
+
+    #region Constructor
+    ///<summary>
+    ///Default constructor
+    ///</summary>
+    public RectangleEventArgs(Rectangle rectangle) {
+      this.mRectangle = rectangle;
+    }
+    /// <summary>
+    /// Initializes a new instance of the <see cref="T:RectangleEventArgs"/> class.
+    /// </summary>
+    private RectangleEventArgs() {
+    }
+    #endregion
+
+  }
+  #endregion
+
+  #region EntityEventArgs
+  /// <summary>
+  /// Event argument carrying an item
+  /// </summary>
+  public sealed class EntityEventArgs : EventArgs {
+    /// <summary>
+    /// Gets or sets the entity
+    /// </summary>
+    IDiagramEntity mEntity;
+
+    /// <summary>
+    /// Gets or sets the entity.
+    /// </summary>
+    /// <value>The entity.</value>
+    public IDiagramEntity Entity {
+      get {
+        return mEntity;
+      }
+      set {
+        mEntity = value;
+      }
+    }
+    /// <summary>
+    /// Default constructor
+    /// </summary>
+    /// <param name="entity"></param>
+    public EntityEventArgs(IDiagramEntity entity) {
+      this.Entity = entity;
+    }
+  }
+  #endregion
+
+  #region EntityMouseEventArgs
+  /// <summary>
+  /// MouseEvent argument carrying an item
+  /// </summary>
+  public sealed class EntityMouseEventArgs : MouseEventArgs {
+
+
+    /// <summary>
+    /// Gets or sets the entity
+    /// </summary>
+    IDiagramEntity mEntity;
+
+    /// <summary>
+    /// Gets or sets the entity.
+    /// </summary>
+    /// <value>The entity.</value>
+    public IDiagramEntity Entity {
+      get {
+        return mEntity;
+      }
+      set {
+        mEntity = value;
+      }
+    }
+    /// <summary>
+    /// Default constructor
+    /// </summary>
+    /// <param name="entity">The entity.</param>
+    /// <param name="button">The button.</param>
+    /// <param name="clicks">The clicks.</param>
+    /// <param name="x">The x.</param>
+    /// <param name="y">The y.</param>
+    /// <param name="delta">The delta.</param>
+    public EntityMouseEventArgs(IDiagramEntity entity, MouseButtons button, int clicks, int x, int y, int delta)
+      : base(button, clicks, x, y, delta) {
+      this.mEntity = entity;
+    }
+    /// <summary>
+    /// Initializes a new instance of the <see cref="T:EntityMouseEventArgs"/> class.
+    /// </summary>
+    /// <param name="entity">The entity.</param>
+    /// <param name="e">The <see cref="T:System.Windows.Forms.MouseEventArgs"/> instance containing the event data.</param>
+    public EntityMouseEventArgs(IDiagramEntity entity, MouseEventArgs e)
+      : base(e.Button, e.Clicks, e.X, e.Y, e.Delta) {
+      if (e == null)
+        throw new ArgumentNullException("The argument object is 'null'");
+      this.mEntity = entity;
+    }
+  }
+  #endregion
+
+  #region StringEventArgs
+  /// <summary>
+  /// Contains a string event argument
+  /// </summary>
+  public sealed class StringEventArgs : EventArgs {
+
+    string mData;
+    /// <summary>
+    /// Gets or sets the string data 
+    /// </summary>
+    public string Data {
+      get {
+        return mData;
+      }
+
+    }
+    /// <summary>
+    /// Default constructor
+    /// </summary>
+    /// <param name="data"></param>
+    public StringEventArgs(string data) {
+      this.mData = data;
+    }
+  }
+  #endregion
+
+  #region SingleDataEventArgs
+  /// <summary>
+  /// A single-bucket data transfer event argument
+  /// </summary>
+  /// <typeparam name="T"></typeparam>
+  public sealed class SingleDataEventArgs<T> : EventArgs {
+    /// <summary>
+    /// whatever data
+    /// </summary>
+    T mData;
+
+    /// <summary>
+    /// Gets the data.
+    /// </summary>
+    /// <value>The data.</value>
+    public T Data {
+      get {
+        return mData;
+      }
+    }
+
+    /// <summary>
+    /// Initializes a new instance of the <see cref="T:SingleDataEventArgs&lt;T&gt;"/> class.
+    /// </summary>
+    /// <param name="data">A parameter of the generics Type T</param>
+    public SingleDataEventArgs(T data) {
+      //if (data is default(T))
+      //    throw new ArgumentNullException("The argument does not contain any data.");
+
+      this.mData = data;
+    }
+  }
+
+  #endregion
+
+  #region HistoryChangeEventArgs
+
+  /// <summary>
+  /// Event argument to communicate history changes in the undo/redo mechanism
+  /// </summary>
+  public sealed class HistoryChangeEventArgs : EventArgs {
+    /// <summary>
+    /// the RedoText field
+    /// </summary>
+    private string mRedoText;
+    /// <summary>
+    /// Gets or sets the RedoText
+    /// </summary>
+    public string RedoText {
+      get {
+        return mRedoText;
+      }
+      set {
+        mRedoText = value;
+      }
+    }
+
+    /// <summary>
+    /// the UndoText field
+    /// </summary>
+    private string mUndoText;
+    /// <summary>
+    /// Gets or sets the UndoText
+    /// </summary>
+    public string UndoText {
+      get {
+        return mUndoText;
+      }
+      set {
+        mUndoText = value;
+      }
+    }
+
+    #region Constructor
+    ///<summary>
+    ///Default constructor
+    ///</summary>
+    public HistoryChangeEventArgs(string redoText, string undoText) {
+      this.mRedoText = redoText;
+      this.mUndoText = undoText;
+    }
+
+    #endregion
+
+  }
+  #endregion
+
+  #region SelectionEventArgs
+  /// <summary>
+  /// Properties event argument
+  /// </summary>
+  public sealed class SelectionEventArgs : EventArgs {
+    /// <summary>
+    /// the Properties field
+    /// </summary>
+    private object[] mObjects;
+    /// <summary>
+    /// Gets or sets the selected objects
+    /// </summary>
+    public object[] SelectedObjects {
+      get {
+        return mObjects;
+      }
+      set {
+        mObjects = value;
+      }
+    }
+    /// <summary>
+    /// The empty argument.
+    /// </summary>
+    public static readonly new PropertiesEventArgs Empty = new PropertiesEventArgs();
+
+    #region Constructor
+    ///<summary>
+    ///Default constructor
+    ///</summary>
+    public SelectionEventArgs(object[] objects) {
+      this.mObjects = objects;
+    }
+    /// <summary>
+    /// Initializes a new instance of the <see cref="T:SelectionEventArgs"/> class.
+    /// </summary>
+    public SelectionEventArgs() {
+    }
+    #endregion
+
+  }
+  #endregion
+
+  #region CancelableEntityEventArgs
+  /// <summary>
+  /// Event argument carrying an item
+  /// </summary>
+  public sealed class CancelableEntityEventArgs : EventArgs {
+
+    /// <summary>
+    /// the Cancel field
+    /// </summary>
+    private bool mCancel;
+    /// <summary>
+    /// Gets or sets the Cancel
+    /// </summary>
+    public bool Cancel {
+      get {
+        return mCancel;
+      }
+      set {
+        mCancel = value;
+      }
+    }
+
+
+    /// <summary>
+    /// Gets or sets the entity
+    /// </summary>
+    IDiagramEntity mEntity;
+
+    /// <summary>
+    /// Gets or sets the entity.
+    /// </summary>
+    /// <value>The entity.</value>
+    public IDiagramEntity Entity {
+      get {
+        return mEntity;
+      }
+      set {
+        mEntity = value;
+      }
+    }
+    /// <summary>
+    /// Default constructor
+    /// </summary>
+    /// <param name="entity"></param>
+    public CancelableEntityEventArgs(IDiagramEntity entity) {
+      this.Entity = entity;
+    }
+  }
+  #endregion
+
+  #region FileEventArgs
+  /// <summary>
+  /// Contains a string event argument
+  /// </summary>
+  public sealed class FileEventArgs : EventArgs {
+
+
+    /// <summary>
+    /// the File field
+    /// </summary>
+    private FileInfo mFile;
+    /// <summary>
+    /// Gets or sets the file information
+    /// </summary>
+    public FileInfo File {
+      get {
+        return mFile;
+      }
+    }
+
+    /// <summary>
+    /// Default constructor
+    /// </summary>
+    /// <param name="info">The info.</param>
+    public FileEventArgs(FileInfo info) {
+      this.mFile = info;
+    }
+  }
+  #endregion
 }
Index: /trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.Netron/3.0.2672.12446/Netron.Diagramming.Core-3.0.2672.12446/Declarations/Exceptions/InconsistencyException.cs
===================================================================
--- /trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.Netron/3.0.2672.12446/Netron.Diagramming.Core-3.0.2672.12446/Declarations/Exceptions/InconsistencyException.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.Netron/3.0.2672.12446/Netron.Diagramming.Core-3.0.2672.12446/Declarations/Exceptions/InconsistencyException.cs	(revision 4068)
@@ -1,33 +1,28 @@
 using System;
-using System.Collections.Generic;
-using System.Text;
-using System.Runtime.Serialization;
-namespace Netron.Diagramming.Core
-{
+namespace Netron.Diagramming.Core {
+  /// <summary>
+  /// This exception is rather generic in the sense that it's being used a bit everywhere in the code.
+  /// A more refined division could be constructed but since this is open source it's easy enough to 
+  /// pin down the problem and a complex exception handling is not necessary.
+  /// </summary>
+  [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Design", "CA1032:ImplementStandardExceptionConstructors")]
+  [Serializable()]
+  public sealed class InconsistencyException : Exception {
     /// <summary>
-    /// This exception is rather generic in the sense that it's being used a bit everywhere in the code.
-    /// A more refined division could be constructed but since this is open source it's easy enough to 
-    /// pin down the problem and a complex exception handling is not necessary.
+    /// Initializes a new instance of the <see cref="T:InconsistencyException"/> class.
     /// </summary>
-    [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Design", "CA1032:ImplementStandardExceptionConstructors")]
-    [Serializable()]
-    public sealed class InconsistencyException : Exception
-    {
-        /// <summary>
-        /// Initializes a new instance of the <see cref="T:InconsistencyException"/> class.
-        /// </summary>
-        /// <param name="message">The message.</param>
-        public InconsistencyException(string message) : base(message){ }
+    /// <param name="message">The message.</param>
+    public InconsistencyException(string message) : base(message) { }
 
-        /// <summary>
-        /// Initializes a new instance of the <see cref="T:InconsistencyException"/> class.
-        /// </summary>
-        public InconsistencyException() : base(){}
-        /// <summary>
-        /// Initializes a new instance of the <see cref="T:InconsistencyException"/> class.
-        /// </summary>
-        /// <param name="message">The message.</param>
-        /// <param name="e">The e.</param>
-        public InconsistencyException(string message, Exception e) :  base(message, e){}
-    }
+    /// <summary>
+    /// Initializes a new instance of the <see cref="T:InconsistencyException"/> class.
+    /// </summary>
+    public InconsistencyException() : base() { }
+    /// <summary>
+    /// Initializes a new instance of the <see cref="T:InconsistencyException"/> class.
+    /// </summary>
+    /// <param name="message">The message.</param>
+    /// <param name="e">The e.</param>
+    public InconsistencyException(string message, Exception e) : base(message, e) { }
+  }
 }
Index: /trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.Netron/3.0.2672.12446/Netron.Diagramming.Core-3.0.2672.12446/Diagram elements/Group/CollapsibleGroupShape.cs
===================================================================
--- /trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.Netron/3.0.2672.12446/Netron.Diagramming.Core-3.0.2672.12446/Diagram elements/Group/CollapsibleGroupShape.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.Netron/3.0.2672.12446/Netron.Diagramming.Core-3.0.2672.12446/Diagram elements/Group/CollapsibleGroupShape.cs	(revision 4068)
@@ -1,580 +1,515 @@
 using System;
 using System.Collections.Generic;
-using System.Text;
 using System.Drawing;
 using System.Windows.Forms;
-namespace Netron.Diagramming.Core
-{
-    // ----------------------------------------------------------------------
-    /// <summary>
-    /// This is an extension of the <see cref="GroupShape"/> which paints 
-    /// itself and allows to collapse/expand its content. Note that it does 
-    /// not inherit from the <see cref="GroupShape"/> though because it requires 
-    /// the <see cref="ShapeMaterialBase"/> mechanism and, hence, inherits 
-    /// from the <see cref="ComplexShapeBase"/> class.
-    /// </summary>
-    // ----------------------------------------------------------------------
-    public partial class CollapsibleGroupShape : ComplexShapeBase, IGroup
-    {
-        #region Fields
-
-        // ------------------------------------------------------------------
-        /// <summary>
-        /// Implementation of IVersion - the current version of 
-        /// CollapsibleGroupShape.
-        /// </summary>
-        // ------------------------------------------------------------------
-        protected const double collapsibleGroupShapeVersion = 1.0;
-
-        // ------------------------------------------------------------------
-        /// <summary>
-        /// the Entities field
-        /// </summary>
-        // ------------------------------------------------------------------
-        private CollectionBase<IDiagramEntity> mEntities;
-
-        // ------------------------------------------------------------------
-        /// <summary>
-        /// in essence, whether the group shape should be painted
-        /// </summary>
-        // ------------------------------------------------------------------
-        private bool mEmphasizeGroup = true;
-
-        // ------------------------------------------------------------------
-        /// <summary>
-        /// the collapse/expand icon
-        /// </summary>
-        // ------------------------------------------------------------------
-        private SwitchIconMaterial xicon;
-
-        // ------------------------------------------------------------------
-        /// <summary>
-        /// the rectangle before it's being collapsed
-        /// </summary>
-        // ------------------------------------------------------------------
-        private Rectangle rectangleMemory;
-
-        // ------------------------------------------------------------------
-        /// <summary>
-        /// the location memory of the externally connected connectors
-        /// </summary>
-        // ------------------------------------------------------------------
-        private Dictionary<IConnector, Point> connectorMemory;
-
-        // ------------------------------------------------------------------
-        /// <summary>
-        /// global offset when a collapsed group is moved around
-        /// </summary>
-        // ------------------------------------------------------------------
-        private Point groupConnectorOffset = Point.Empty;
-
-        // ------------------------------------------------------------------
-        /// <summary>
-        /// the Collapsed field
-        /// </summary>
-        // ------------------------------------------------------------------
-        private bool mCollapsed;
-
-        // ------------------------------------------------------------------
-        /// <summary>
-        /// the expand hyperlink
-        /// </summary>
-        // ------------------------------------------------------------------
-        private ClickableLabelMaterial expandLabel;
-
-        // ------------------------------------------------------------------
-        /// <summary>
-        /// Specifies if ungrouping is allowed.
-        /// </summary>
-        // ------------------------------------------------------------------
-        bool mAllowUnGroup = false;
-
-        #endregion
-
-        #region Properties
-
-        // ------------------------------------------------------------------
-        /// <summary>
-        /// Gets the current version.
-        /// </summary>
-        // ------------------------------------------------------------------
-        public override double Version
-        {
-            get
-            {
-                return collapsibleGroupShapeVersion;
+namespace Netron.Diagramming.Core {
+  // ----------------------------------------------------------------------
+  /// <summary>
+  /// This is an extension of the <see cref="GroupShape"/> which paints 
+  /// itself and allows to collapse/expand its content. Note that it does 
+  /// not inherit from the <see cref="GroupShape"/> though because it requires 
+  /// the <see cref="ShapeMaterialBase"/> mechanism and, hence, inherits 
+  /// from the <see cref="ComplexShapeBase"/> class.
+  /// </summary>
+  // ----------------------------------------------------------------------
+  public partial class CollapsibleGroupShape : ComplexShapeBase, IGroup {
+    #region Fields
+
+    // ------------------------------------------------------------------
+    /// <summary>
+    /// Implementation of IVersion - the current version of 
+    /// CollapsibleGroupShape.
+    /// </summary>
+    // ------------------------------------------------------------------
+    protected const double collapsibleGroupShapeVersion = 1.0;
+
+    // ------------------------------------------------------------------
+    /// <summary>
+    /// the Entities field
+    /// </summary>
+    // ------------------------------------------------------------------
+    private CollectionBase<IDiagramEntity> mEntities;
+
+    // ------------------------------------------------------------------
+    /// <summary>
+    /// in essence, whether the group shape should be painted
+    /// </summary>
+    // ------------------------------------------------------------------
+    private bool mEmphasizeGroup = true;
+
+    // ------------------------------------------------------------------
+    /// <summary>
+    /// the collapse/expand icon
+    /// </summary>
+    // ------------------------------------------------------------------
+    private SwitchIconMaterial xicon;
+
+    // ------------------------------------------------------------------
+    /// <summary>
+    /// the rectangle before it's being collapsed
+    /// </summary>
+    // ------------------------------------------------------------------
+    private Rectangle rectangleMemory;
+
+    // ------------------------------------------------------------------
+    /// <summary>
+    /// the location memory of the externally connected connectors
+    /// </summary>
+    // ------------------------------------------------------------------
+    private Dictionary<IConnector, Point> connectorMemory;
+
+    // ------------------------------------------------------------------
+    /// <summary>
+    /// global offset when a collapsed group is moved around
+    /// </summary>
+    // ------------------------------------------------------------------
+    private Point groupConnectorOffset = Point.Empty;
+
+    // ------------------------------------------------------------------
+    /// <summary>
+    /// the Collapsed field
+    /// </summary>
+    // ------------------------------------------------------------------
+    private bool mCollapsed;
+
+    // ------------------------------------------------------------------
+    /// <summary>
+    /// the expand hyperlink
+    /// </summary>
+    // ------------------------------------------------------------------
+    private ClickableLabelMaterial expandLabel;
+
+    // ------------------------------------------------------------------
+    /// <summary>
+    /// Specifies if ungrouping is allowed.
+    /// </summary>
+    // ------------------------------------------------------------------
+    bool mAllowUnGroup = false;
+
+    #endregion
+
+    #region Properties
+
+    // ------------------------------------------------------------------
+    /// <summary>
+    /// Gets the current version.
+    /// </summary>
+    // ------------------------------------------------------------------
+    public override double Version {
+      get {
+        return collapsibleGroupShapeVersion;
+      }
+    }
+
+    // ------------------------------------------------------------------
+    /// <summary>
+    /// Gets or sets if un-grouping of the entities is allowed.
+    /// </summary>
+    // ------------------------------------------------------------------
+    public virtual bool CanUnGroup {
+      get {
+        return mAllowUnGroup;
+      }
+      set {
+        mAllowUnGroup = value;
+      }
+    }
+
+    /// <summary>
+    /// Gets or sets whether the group is in a collapsed state
+    /// </summary>
+    public bool Collapsed {
+      get { return mCollapsed; }
+      set { mCollapsed = value; }
+    }
+
+
+    /// <summary>
+    /// Gets or sets whether the group as a shape should be painted on the canvas.
+    /// </summary>
+    /// <value><c>true</c> to paint the group shape; otherwise, <c>false</c>.</value>
+    public bool EmphasizeGroup {
+      get { return mEmphasizeGroup; }
+      set { mEmphasizeGroup = value; }
+    }
+    /// <summary>
+    /// Gets the friendly name of the entity to be displayed in the UI
+    /// </summary>
+    /// <value></value>
+    public override string EntityName {
+      get {
+        return "Group shape";
+      }
+    }
+
+    /// <summary>
+    /// Gets or sets the rectangle.
+    /// </summary>
+    /// <value>The rectangle.</value>
+    public override Rectangle Rectangle {
+      get {
+        return mRectangle;
+      }
+    }
+    /// <summary>
+    /// Gets or sets the entities directly underneath. To get the whole branch of entities in case of nested groups, <see cref="Leafs"/>.
+    /// </summary>
+    public CollectionBase<IDiagramEntity> Entities {
+      get { return mEntities; }
+      set {
+
+        throw new InconsistencyException("You cannot set the entities, use the already instantiated collection to add or remove items.");
+
+
+      }
+    }
+    /// <summary>
+    /// Gets the whole branch of entities if this group has sub-groups. Contrary to the <see cref="GroupShape"/> the result WILLl contain the group shapes.
+    /// </summary>
+    /// <value>The branch.</value>
+    public CollectionBase<IDiagramEntity> Leafs {
+      get {
+        CollectionBase<IDiagramEntity> flatList = new CollectionBase<IDiagramEntity>();
+        foreach (IDiagramEntity entity in mEntities) {
+          if (entity is IGroup) {
+            Utils.TraverseCollect(entity as IGroup, ref flatList);
+          }
+          flatList.Add(entity);
+        }
+        return flatList;
+      }
+    }
+
+    #endregion
+
+    #region Constructor
+    ///<summary>
+    ///Default constructor
+    ///</summary>
+    public CollapsibleGroupShape(IModel model)
+      : base(model) {
+      this.mEntities = new CollectionBase<IDiagramEntity>();
+      this.mEntities.OnItemAdded += new EventHandler<CollectionEventArgs<IDiagramEntity>>(mEntities_OnItemAdded);
+      this.mEntities.OnClear += new EventHandler(mEntities_OnClear);
+      this.mEntities.OnItemRemoved += new EventHandler<CollectionEventArgs<IDiagramEntity>>(mEntities_OnItemRemoved);
+
+      xicon = new SwitchIconMaterial(SwitchIconType.PlusMinus);
+      this.Children.Add(xicon);
+      //do this before attaching the next event handler, otherwise the shape will be added twice to the paintables
+      xicon.Collapsed = false;
+
+      xicon.OnCollapse += new EventHandler(xicon_OnCollapse);
+      xicon.OnExpand += new EventHandler(xicon_OnExpand);
+
+      connectorMemory = new Dictionary<IConnector, Point>();
+
+      expandLabel = new ClickableLabelMaterial("Expand...");
+      this.Children.Add(expandLabel);
+      expandLabel.Visible = false;
+      expandLabel.OnClick += new EventHandler(expandLabel_OnClick);
+    }
+
+    void expandLabel_OnClick(object sender, EventArgs e) {
+      xicon.Collapsed = false;
+    }
+
+    void xicon_OnExpand(object sender, EventArgs e) {
+      Expand();
+    }
+
+    void xicon_OnCollapse(object sender, EventArgs e) {
+      Collapse();
+    }
+    #endregion
+
+    #region Methods
+
+    /// <summary>
+    /// Collapses this instance.
+    /// </summary>
+    public void Collapse() {
+      rectangleMemory = mRectangle;
+      mRectangle = new Rectangle(mRectangle.Location, new Size(110, 25));
+
+      foreach (IDiagramEntity entity in Entities) {
+        RemoveFromPaintables(entity);
+      }
+      this.Resizable = false;
+
+
+      connectorMemory.Clear();//forget the previous memory
+      groupConnectorOffset = Point.Empty;
+      //use the flattened collection (Leafs) in case there are sub-groups
+      MoveConnectors(Leafs, new Point((int)(Rectangle.Left + Rectangle.Width / 2), Rectangle.Bottom));
+
+      Rectangle rec = rectangleMemory;
+      rec.Inflate(20, 20);
+      Invalidate(rec);
+      mCollapsed = true;
+      expandLabel.Visible = true;
+    }
+    internal void RemoveFromPaintables(IDiagramEntity entity) {
+      this.Model.Paintables.Remove(entity);
+      if (entity is CollapsibleGroupShape && !(entity as CollapsibleGroupShape).Collapsed) {
+        foreach (IDiagramEntity ent in (entity as CollapsibleGroupShape).Entities) {
+          RemoveFromPaintables(ent);
+        }
+
+      }
+    }
+
+    internal void AddToPaintables(IDiagramEntity entity) {
+      this.Model.Paintables.Add(entity);
+      if (entity is CollapsibleGroupShape && !(entity as CollapsibleGroupShape).Collapsed) {
+        foreach (IDiagramEntity ent in (entity as CollapsibleGroupShape).Entities) {
+          AddToPaintables(ent);
+        }
+
+      }
+
+    }
+    /// <summary>
+    /// Expands this instance.
+    /// </summary>
+    public void Expand() {
+      mRectangle = rectangleMemory;
+      foreach (IDiagramEntity entity in Entities) {
+        AddToPaintables(entity);
+      }
+      this.Resizable = true;
+      UnMoveConnectors();
+      Invalidate(mRectangle);
+      mCollapsed = false;
+      connectorMemory.Clear();
+      expandLabel.Visible = false;
+    }
+
+
+
+    /// <summary>
+    /// Moves the connectors of the children to the central group connector location.
+    /// </summary>
+    internal void MoveConnectors(CollectionBase<IDiagramEntity> entities, Point point) {
+      IConnection cnn;
+      foreach (IDiagramEntity entity in entities) {
+        if (entity is IGroup) {
+          continue; //since we use a flattened collection (the Leafs) we don't care about the groups here
+          //the inclusion of the subgroups in the Leafs is however important to make the subgroups
+          //(in)visible when collapsed/expanded.
+        }
+        if (entity is IShape) {
+          foreach (IConnector cn in (entity as IShape).Connectors) {
+            if (cn.AttachedConnectors.Count > 0) {
+              foreach (IConnector cn2 in cn.AttachedConnectors) {
+                if (cn2.Parent is IConnection) {
+                  cnn = cn2.Parent as IConnection;
+                  //the ends have to be connected
+                  if (cnn.From.AttachedTo.Parent is IShape && cnn.To.AttachedTo.Parent is IShape) {
+                    if (entities.Contains(cnn.From.AttachedTo.Parent as IShape) && entities.Contains(cnn.To.AttachedTo.Parent as IShape))
+                      continue;//both endconnectors are internal
+                    else//one of the connectors is external
+                                        {
+                      if (entities.Contains(cnn.From.AttachedTo.Parent as IShape)) //the From is internal
+                                            {
+                        MoveConnector(cnn.From, point);
+                      } else //the To is internal                            
+                                            {
+                        MoveConnector(cnn.To, point);
+                      }
+                    }
+                  }
+                }
+              }
             }
+          }
         }
-
-        // ------------------------------------------------------------------
-        /// <summary>
-        /// Gets or sets if un-grouping of the entities is allowed.
-        /// </summary>
-        // ------------------------------------------------------------------
-        public virtual bool CanUnGroup
-        {
-            get
-            {
-                return mAllowUnGroup;
-            }
-            set
-            {
-                mAllowUnGroup = value;
-            }
+      }
+    }
+
+    /// <summary>
+    /// Moves the connector to the given location.
+    /// </summary>
+    /// <param name="cn">The cn.</param>
+    /// <param name="point">The point.</param>
+    private void MoveConnector(IConnector cn, Point point) {
+      connectorMemory.Add(cn, cn.Point);//luckily the Point is a struct so the value will be actually copied and we can safely change the value next
+      cn.MoveBy(new Point(point.X - cn.Point.X, point.Y - cn.Point.Y));
+      cn.Enabled = false;
+    }
+
+    /// <summary>
+    /// Moves the connectors back from the central group connector to their original location.
+    /// </summary>
+    private void UnMoveConnectors() {
+      //some things will go wrong here if the content of the Entities has changed
+
+      //recall the memory and move them;
+
+      Dictionary<IConnector, Point>.KeyCollection keys = connectorMemory.Keys;
+      Point p;
+      foreach (IConnector cn in keys) {
+        p = connectorMemory[cn];
+        cn.MoveBy(new Point(p.X - cn.Point.X + groupConnectorOffset.X, p.Y - cn.Point.Y + groupConnectorOffset.Y));
+        cn.Enabled = true;
+      }
+    }
+
+    /// <summary>
+    /// The custom menu to be added to the base menu of this entity
+    /// </summary>
+    /// <returns>ToolStripItem[]</returns>
+    public override ToolStripItem[] Menu() {
+      return null;
+    }
+    /// <summary>
+    /// Handles the OnItemRemoved of the Entities
+    /// </summary>
+    /// <param name="sender">The sender.</param>
+    /// <param name="e">The e.</param>
+    void mEntities_OnItemRemoved(object sender, CollectionEventArgs<IDiagramEntity> e) {
+      CalculateRectangle();
+    }
+
+    /// <summary>
+    /// Handles the OnClear event of the Entities.
+    /// </summary>
+    /// <param name="sender">The source of the event.</param>
+    /// <param name="e">The <see cref="T:System.EventArgs"/> instance containing the event data.</param>
+    void mEntities_OnClear(object sender, EventArgs e) {
+      mRectangle = Rectangle.Empty;
+    }
+
+    /// <summary>
+    /// Handles the OnItemAdded event of the Entities
+    /// </summary>
+    /// <param name="sender">The sender.</param>
+    /// <param name="e">The e.</param>
+    void mEntities_OnItemAdded(object sender, CollectionEventArgs<IDiagramEntity> e) {
+      //if(mEntities.Count == 1)
+      //    mRectangle = e.Item.Rectangle;
+      //else
+      //{
+      //    mRectangle = Rectangle.Union((Rectangle) mRectangle, e.Item.Rectangle);
+      //}
+      CalculateRectangle();
+    }
+
+    /// <summary>
+    /// Calculates the bounding rectangle of this group.
+    /// </summary>
+    public void CalculateRectangle() {
+      if (mEntities == null || mEntities.Count == 0)
+        return;
+      Rectangle rec = mEntities[0].Rectangle;
+      foreach (IDiagramEntity entity in Entities) {
+        //cascade the calculation if necessary
+        if ((entity is CollapsibleGroupShape) && !(entity as CollapsibleGroupShape).Collapsed) (entity as IGroup).CalculateRectangle();
+
+        rec = Rectangle.Union(rec, entity.Rectangle);
+      }
+      rec.Inflate(20, 20);
+      this.mRectangle = rec;
+      rec.Offset(5, 5);
+      xicon.Transform(new Rectangle(rec.Location, new Size(16, 16)));
+
+      expandLabel.Transform(new Rectangle(rec.Location.X + 20, rec.Location.Y, 50, 12));
+    }
+
+
+    /// <summary>
+    /// Paints the entity on the control
+    /// <remarks>This method should not be called since the painting occurs via the <see cref="Model.Paintables"/>.</remarks>
+    /// </summary>
+    /// <param name="g"></param>
+    public override void Paint(System.Drawing.Graphics g) {
+      Rectangle rec = Rectangle;
+      Utils.DrawRoundRect(g, ArtPalette.ConnectionShadow, rec);
+
+      base.Paint(g);
+    }
+
+    /// <summary>
+    /// Tests whether the group is hit by the mouse
+    /// </summary>
+    /// <param name="p"></param>
+    /// <returns></returns>
+    public override bool Hit(System.Drawing.Point p) {
+      if (mCollapsed)
+        return mRectangle.Contains(p);
+
+      foreach (IDiagramEntity entity in mEntities) {
+        if (entity.Hit(p))
+          return true;
+      }
+      return false;
+    }
+
+    /// <summary>
+    /// Invalidates the entity
+    /// </summary>
+    public override void Invalidate() {
+
+      if (mRectangle == null)
+        return;
+
+      Rectangle rec = mRectangle;
+      rec.Inflate(20, 20);
+      Model.RaiseOnInvalidateRectangle(rec);
+    }
+
+    /// <summary>
+    /// Moves the entity on the canvas
+    /// </summary>
+    /// <param name="p"></param>
+    public override void MoveBy(System.Drawing.Point p) {
+      base.MoveBy(p);
+
+      Rectangle recBefore = mRectangle;
+      recBefore.Inflate(20, 20);
+
+      //no need to invalidate since it'll be done by the individual move actions
+      foreach (IDiagramEntity entity in mEntities) {
+        entity.MoveBy(p);
+      }
+
+      mRectangle.X += p.X;
+      mRectangle.Y += p.Y;
+      //shift the latent copy of the real rectangle if the group is in a collapsed state
+      if (mCollapsed) {
+        rectangleMemory.X += p.X;
+        rectangleMemory.Y += p.Y;
+        //the global offset has to be memorized; when we'll expand the group this offset has to be added to the original values
+        groupConnectorOffset.Offset(p);
+      }
+
+
+      //refresh things
+      this.Invalidate(recBefore);//position before the move
+      this.Invalidate();//current position
+
+    }
+
+    public override bool MouseDown(MouseEventArgs e) {
+      // Was a material hit in the base ComplexShape?
+      if (base.MouseDown(e)) {
+        return true;
+      }
+
+      // If not, should we pass it on to the entities in this
+      // group?
+      foreach (IDiagramEntity entity in this.mEntities) {
+        if (entity.Hit(e.Location)) {
+          if (entity.MouseDown(e)) {
+            return true;
+          }
         }
-
-        /// <summary>
-        /// Gets or sets whether the group is in a collapsed state
-        /// </summary>
-        public bool Collapsed
-        {
-            get { return mCollapsed; }
-            set { mCollapsed = value; }
-        }
-
-
-        /// <summary>
-        /// Gets or sets whether the group as a shape should be painted on the canvas.
-        /// </summary>
-        /// <value><c>true</c> to paint the group shape; otherwise, <c>false</c>.</value>
-        public bool EmphasizeGroup
-        {
-            get { return mEmphasizeGroup; }
-            set { mEmphasizeGroup = value; }
-        }
-        /// <summary>
-        /// Gets the friendly name of the entity to be displayed in the UI
-        /// </summary>
-        /// <value></value>
-        public override string EntityName
-        {
-            get
-            {
-                return "Group shape";
-            }
-        }
-
-        /// <summary>
-        /// Gets or sets the rectangle.
-        /// </summary>
-        /// <value>The rectangle.</value>
-        public override Rectangle Rectangle
-        {
-            get
-            {
-                return mRectangle;
-            }
-        }
-        /// <summary>
-        /// Gets or sets the entities directly underneath. To get the whole branch of entities in case of nested groups, <see cref="Leafs"/>.
-        /// </summary>
-        public CollectionBase<IDiagramEntity> Entities
-        {
-            get { return mEntities; }
-            set
-            {
-
-                throw new InconsistencyException("You cannot set the entities, use the already instantiated collection to add or remove items.");
-
-
-            }
-        }
-        /// <summary>
-        /// Gets the whole branch of entities if this group has sub-groups. Contrary to the <see cref="GroupShape"/> the result WILLl contain the group shapes.
-        /// </summary>
-        /// <value>The branch.</value>
-        public CollectionBase<IDiagramEntity> Leafs
-        {
-            get
-            {
-                CollectionBase<IDiagramEntity> flatList = new CollectionBase<IDiagramEntity>();
-                foreach (IDiagramEntity entity in mEntities)
-                {
-                    if (entity is IGroup)
-                    {                        
-                        Utils.TraverseCollect(entity as IGroup, ref flatList);
-                    }
-                    flatList.Add(entity);
-                }
-                return flatList;
-            }
-        }
-
-        #endregion
-
-        #region Constructor
-        ///<summary>
-        ///Default constructor
-        ///</summary>
-        public CollapsibleGroupShape(IModel model)
-            : base(model)
-        {
-            this.mEntities = new CollectionBase<IDiagramEntity>();
-            this.mEntities.OnItemAdded += new EventHandler<CollectionEventArgs<IDiagramEntity>>(mEntities_OnItemAdded);
-            this.mEntities.OnClear += new EventHandler(mEntities_OnClear);
-            this.mEntities.OnItemRemoved += new EventHandler<CollectionEventArgs<IDiagramEntity>>(mEntities_OnItemRemoved);
-
-            xicon = new SwitchIconMaterial(SwitchIconType.PlusMinus);
-            this.Children.Add(xicon);
-            //do this before attaching the next event handler, otherwise the shape will be added twice to the paintables
-            xicon.Collapsed = false;
-
-            xicon.OnCollapse += new EventHandler(xicon_OnCollapse);
-            xicon.OnExpand += new EventHandler(xicon_OnExpand);
-
-            connectorMemory = new Dictionary<IConnector, Point>();
-
-            expandLabel = new ClickableLabelMaterial("Expand...");
-            this.Children.Add(expandLabel);
-            expandLabel.Visible = false;
-            expandLabel.OnClick += new EventHandler(expandLabel_OnClick);
-        }
-
-        void expandLabel_OnClick(object sender, EventArgs e)
-        {
-            xicon.Collapsed = false;
-        }
-
-        void xicon_OnExpand(object sender, EventArgs e)
-        {
-            Expand();
-        }
-
-        void xicon_OnCollapse(object sender, EventArgs e)
-        {
-            Collapse();
-        }
-        #endregion
-
-        #region Methods
-
-        /// <summary>
-        /// Collapses this instance.
-        /// </summary>
-        public void Collapse()
-        {
-            rectangleMemory = mRectangle;
-            mRectangle = new Rectangle(mRectangle.Location, new Size(110, 25));
-
-            foreach (IDiagramEntity entity in Entities)
-            {
-                RemoveFromPaintables(entity);
-            }
-            this.Resizable = false;
-          
-
-            connectorMemory.Clear();//forget the previous memory
-            groupConnectorOffset = Point.Empty;
-            //use the flattened collection (Leafs) in case there are sub-groups
-            MoveConnectors(Leafs, new Point((int)(Rectangle.Left + Rectangle.Width / 2), Rectangle.Bottom));
-
-            Rectangle rec = rectangleMemory;
-            rec.Inflate(20, 20);
-            Invalidate(rec);
-            mCollapsed = true;
-            expandLabel.Visible = true;
-        }
-        internal void RemoveFromPaintables(IDiagramEntity entity)
-        {
-            this.Model.Paintables.Remove(entity);
-            if (entity is CollapsibleGroupShape && !(entity as CollapsibleGroupShape).Collapsed)
-            {
-                foreach (IDiagramEntity  ent in (entity as CollapsibleGroupShape).Entities)
-                {
-                    RemoveFromPaintables(ent);
-                }
-                
-            }
-        }
-
-        internal void AddToPaintables(IDiagramEntity entity)
-        {
-            this.Model.Paintables.Add(entity);
-            if (entity is CollapsibleGroupShape && !(entity as CollapsibleGroupShape).Collapsed)
-            {
-                foreach (IDiagramEntity ent in (entity as CollapsibleGroupShape).Entities)
-                {
-                    AddToPaintables(ent);
-                }
-
-            }
-
-        }
-        /// <summary>
-        /// Expands this instance.
-        /// </summary>
-        public void Expand()
-        {
-            mRectangle = rectangleMemory;
-            foreach (IDiagramEntity entity in Entities)
-            {
-                AddToPaintables(entity);
-            }
-            this.Resizable = true;
-            UnMoveConnectors();
-            Invalidate(mRectangle);
-            mCollapsed = false;
-            connectorMemory.Clear();
-            expandLabel.Visible = false;
-        }
-
-    
-
-        /// <summary>
-        /// Moves the connectors of the children to the central group connector location.
-        /// </summary>
-        internal void MoveConnectors(CollectionBase<IDiagramEntity> entities, Point point)
-        {
-            IConnection cnn;
-            foreach (IDiagramEntity entity in entities)
-            {
-                if (entity is IGroup)
-                {
-                    continue; //since we use a flattened collection (the Leafs) we don't care about the groups here
-                    //the inclusion of the subgroups in the Leafs is however important to make the subgroups
-                    //(in)visible when collapsed/expanded.
-                }
-                if (entity is IShape )
-                {
-                    foreach (IConnector cn in (entity as IShape).Connectors)
-                    {
-                        if (cn.AttachedConnectors.Count > 0)
-                        {
-                            foreach (IConnector cn2 in cn.AttachedConnectors)
-                            {
-                                if (cn2.Parent is IConnection)
-                                {
-                                    cnn = cn2.Parent as IConnection;
-                                    //the ends have to be connected
-                                    if (cnn.From.AttachedTo.Parent is IShape && cnn.To.AttachedTo.Parent is IShape)
-                                    {
-                                        if (entities.Contains(cnn.From.AttachedTo.Parent as IShape) && entities.Contains(cnn.To.AttachedTo.Parent as IShape))
-                                            continue;//both endconnectors are internal
-                                        else//one of the connectors is external
-                                        {
-                                            if (entities.Contains(cnn.From.AttachedTo.Parent as IShape)) //the From is internal
-                                            {
-                                                MoveConnector(cnn.From, point);
-                                            }
-                                            else //the To is internal                            
-                                            {
-                                                MoveConnector(cnn.To, point);
-                                            }
-                                        }
-                                    }
-                                }
-                            }
-                        }
-                    }
-                }
-            }
-        }
-
-        /// <summary>
-        /// Moves the connector to the given location.
-        /// </summary>
-        /// <param name="cn">The cn.</param>
-        /// <param name="point">The point.</param>
-        private void MoveConnector(IConnector cn, Point point)
-        {
-            connectorMemory.Add(cn, cn.Point);//luckily the Point is a struct so the value will be actually copied and we can safely change the value next
-            cn.MoveBy(new Point(point.X - cn.Point.X, point.Y - cn.Point.Y));
-            cn.Enabled = false;
-        }
-
-        /// <summary>
-        /// Moves the connectors back from the central group connector to their original location.
-        /// </summary>
-        private void UnMoveConnectors()
-        {
-            //some things will go wrong here if the content of the Entities has changed
-
-            //recall the memory and move them;
-
-            Dictionary<IConnector, Point>.KeyCollection keys = connectorMemory.Keys;
-            Point p;
-            foreach (IConnector cn in keys)
-            {
-                p = connectorMemory[cn];
-                cn.MoveBy(new Point(p.X - cn.Point.X + groupConnectorOffset.X, p.Y - cn.Point.Y + groupConnectorOffset.Y));
-                cn.Enabled = true;
-            }
-        }
-
-        /// <summary>
-        /// The custom menu to be added to the base menu of this entity
-        /// </summary>
-        /// <returns>ToolStripItem[]</returns>
-        public override ToolStripItem[] Menu()
-        {
-            return null;
-        }
-        /// <summary>
-        /// Handles the OnItemRemoved of the Entities
-        /// </summary>
-        /// <param name="sender">The sender.</param>
-        /// <param name="e">The e.</param>
-        void mEntities_OnItemRemoved(object sender, CollectionEventArgs<IDiagramEntity> e)
-        {
-            CalculateRectangle();
-        }
-
-        /// <summary>
-        /// Handles the OnClear event of the Entities.
-        /// </summary>
-        /// <param name="sender">The source of the event.</param>
-        /// <param name="e">The <see cref="T:System.EventArgs"/> instance containing the event data.</param>
-        void mEntities_OnClear(object sender, EventArgs e)
-        {
-            mRectangle = Rectangle.Empty;
-        }
-
-        /// <summary>
-        /// Handles the OnItemAdded event of the Entities
-        /// </summary>
-        /// <param name="sender">The sender.</param>
-        /// <param name="e">The e.</param>
-        void mEntities_OnItemAdded(object sender, CollectionEventArgs<IDiagramEntity> e)
-        {
-            //if(mEntities.Count == 1)
-            //    mRectangle = e.Item.Rectangle;
-            //else
-            //{
-            //    mRectangle = Rectangle.Union((Rectangle) mRectangle, e.Item.Rectangle);
-            //}
-            CalculateRectangle();
-        }
-
-        /// <summary>
-        /// Calculates the bounding rectangle of this group.
-        /// </summary>
-        public void CalculateRectangle()
-        {
-            if (mEntities == null || mEntities.Count == 0)
-                return;
-            Rectangle rec = mEntities[0].Rectangle;
-            foreach (IDiagramEntity entity in Entities)
-            {
-                //cascade the calculation if necessary
-                if ((entity is CollapsibleGroupShape) && !(entity as CollapsibleGroupShape).Collapsed) (entity as IGroup).CalculateRectangle();
-
-                rec = Rectangle.Union(rec, entity.Rectangle);
-            }
-            rec.Inflate(20, 20);
-            this.mRectangle = rec;
-            rec.Offset(5, 5);
-            xicon.Transform(new Rectangle(rec.Location, new Size(16, 16)));
-
-            expandLabel.Transform(new Rectangle(rec.Location.X + 20, rec.Location.Y,50, 12));
-        }
-
-
-        /// <summary>
-        /// Paints the entity on the control
-        /// <remarks>This method should not be called since the painting occurs via the <see cref="Model.Paintables"/>.</remarks>
-        /// </summary>
-        /// <param name="g"></param>
-        public override void Paint(System.Drawing.Graphics g)
-        {
-            Rectangle rec = Rectangle;
-            Utils.DrawRoundRect(g, ArtPalette.ConnectionShadow, rec);
-
-            base.Paint(g);
-        }
-
-        /// <summary>
-        /// Tests whether the group is hit by the mouse
-        /// </summary>
-        /// <param name="p"></param>
-        /// <returns></returns>
-        public override bool Hit(System.Drawing.Point p)
-        {
-            if (mCollapsed)
-                return mRectangle.Contains(p);
-
-            foreach (IDiagramEntity entity in mEntities)
-            {
-                if (entity.Hit(p))
-                    return true;
-            }
-            return false;
-        }
-
-        /// <summary>
-        /// Invalidates the entity
-        /// </summary>
-        public override void Invalidate()
-        {
-
-            if (mRectangle == null)
-                return;
-
-            Rectangle rec = mRectangle;
-            rec.Inflate(20, 20);
-            Model.RaiseOnInvalidateRectangle(rec);
-        }
-
-        /// <summary>
-        /// Moves the entity on the canvas
-        /// </summary>
-        /// <param name="p"></param>
-        public override void MoveBy(System.Drawing.Point p)
-        {
-            base.MoveBy(p);
-
-            Rectangle recBefore = mRectangle;
-            recBefore.Inflate(20, 20);
-
-            //no need to invalidate since it'll be done by the individual move actions
-            foreach (IDiagramEntity entity in mEntities)
-            {
-                entity.MoveBy(p);
-            }
-
-            mRectangle.X += p.X;
-            mRectangle.Y += p.Y;
-            //shift the latent copy of the real rectangle if the group is in a collapsed state
-            if (mCollapsed)
-            {
-                rectangleMemory.X += p.X;
-                rectangleMemory.Y += p.Y;
-                //the global offset has to be memorized; when we'll expand the group this offset has to be added to the original values
-                groupConnectorOffset.Offset(p);
-            }
-
-
-            //refresh things
-            this.Invalidate(recBefore);//position before the move
-            this.Invalidate();//current position
-
-        }
-
-        public override bool MouseDown(MouseEventArgs e)
-        {
-            // Was a material hit in the base ComplexShape?
-            if (base.MouseDown(e))
-            {
-                return true;
-            }
-
-            // If not, should we pass it on to the entities in this
-            // group?
-            foreach (IDiagramEntity entity in this.mEntities)
-            {
-                if (entity.Hit(e.Location))
-                {
-                    if (entity.MouseDown(e))
-                    {
-                        return true;
-                    }
-                }
-            }
-
-            return false;
-        }
-
-
-        #endregion
-    }
+      }
+
+      return false;
+    }
+
+
+    #endregion
+  }
 
 
Index: /trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.Netron/3.0.2672.12446/Netron.Diagramming.Core-3.0.2672.12446/Diagram elements/Group/GroupShape.cs
===================================================================
--- /trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.Netron/3.0.2672.12446/Netron.Diagramming.Core-3.0.2672.12446/Diagram elements/Group/GroupShape.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.Netron/3.0.2672.12446/Netron.Diagramming.Core-3.0.2672.12446/Diagram elements/Group/GroupShape.cs	(revision 4068)
@@ -1,510 +1,452 @@
 using System;
-using System.Collections.Generic;
-using System.Text;
 using System.Drawing;
 using System.Windows.Forms;
-namespace Netron.Diagramming.Core
-{
-    // ----------------------------------------------------------------------
-    /// <summary>
-    /// This entity represents a group of entities and corresponds to the 
-    /// '(un)grouping' feature.
-    /// </summary>
-    // ----------------------------------------------------------------------
-    partial class GroupShape : DiagramEntityBase, IGroup
-    {
-        #region Fields
-
-        // ------------------------------------------------------------------
-        /// <summary>
-        /// Implementation of IVersion - the current version of 
-        /// GroupShape.
-        /// </summary>
-        // ------------------------------------------------------------------
-        protected const double groupShapeVersion = 1.0;
-
-        // ------------------------------------------------------------------
-        /// <summary>
-        /// The spacing between the bounds (union) of the entities and the
-        /// outter edge of the group.
-        /// </summary>
-        // ------------------------------------------------------------------
-        protected int myMargin = 10;
-
-        // ------------------------------------------------------------------
-        /// <summary>
-        /// The Entities field.
-        /// </summary>
-        // ------------------------------------------------------------------
-        private CollectionBase<IDiagramEntity> mEntities;
-
-        // ------------------------------------------------------------------
-        /// <summary>
-        /// Specifies if ungrouping is allowed.
-        /// </summary>
-        // ------------------------------------------------------------------
-        bool mAllowUnGroup = false;
-
-        // ------------------------------------------------------------------
-        /// <summary>
-        /// in essence, whether the group shape should be painted.
-        /// </summary>
-        // ------------------------------------------------------------------
-        private bool mEmphasizeGroup = true;
-
-        #endregion
-
-        #region Properties
-
-        // ------------------------------------------------------------------
-        /// <summary>
-        /// Gets the current version.
-        /// </summary>
-        // ------------------------------------------------------------------
-        public override double Version
-        {
-            get
-            {
-                return groupShapeVersion;
-            }
-        }
-
-        // ------------------------------------------------------------------
-        /// <summary>
-        /// Gets or sets the current magnification level used by the view.
-        /// Overriden to update each entity in this group.
-        /// </summary>
-        // ------------------------------------------------------------------
-        public override SizeF Magnification
-        {
-            get
-            {
-                return base.Magnification;
-            }
-            set
-            {
-                base.Magnification = value;
-                foreach (IDiagramEntity entiy in Entities)
-                {
-                    entiy.Magnification = value;
-                }
-            }
-        }
-
-        // ------------------------------------------------------------------
-        /// <summary>
-        /// The spacing between the bounds (union) of the entities and the
-        /// outter edge of the group.
-        /// </summary>
-        // ------------------------------------------------------------------
-        public int Margin
-        {
-            get
-            {
-                return myMargin;
-            }
-            set
-            {
-                myMargin = value;
-                Invalidate();
-            }
-        }
-
-        // ------------------------------------------------------------------
-        /// <summary>
-        /// Gets or sets whether the group as a shape should be painted on 
-        /// the canvas.
-        /// </summary>
-        /// <value><c>true</c> To paint the group shape; otherwise, 
-        /// <c>false</c>.</value>
-        // ------------------------------------------------------------------
-        public bool EmphasizeGroup
-        {
-            get { return mEmphasizeGroup; }
-            set { mEmphasizeGroup = value; }
-        }
-
-        // ------------------------------------------------------------------
-        /// <summary>
-        /// Gets or sets if un-grouping of the entities is allowed.
-        /// </summary>
-        // ------------------------------------------------------------------
-        public virtual bool CanUnGroup
-        {
-            get
-            {
-                return mAllowUnGroup;
-            }
-            set
-            {
-                mAllowUnGroup = value;
-            }
-        }
-
-        // ------------------------------------------------------------------
-        /// <summary>
-        /// Gets the friendly name of the entity to be displayed in the UI.
-        /// </summary>
-        /// <value></value>
-        // ------------------------------------------------------------------
-        public override string EntityName
-        {
-            get
-            {
-                return "Group shape";
-            }
-        }
-
-        // ------------------------------------------------------------------
-        /// <summary>
-        /// Gets or sets the rectangle.
-        /// </summary>
-        /// <value>The rectangle.</value>
-        // ------------------------------------------------------------------
-        public override Rectangle Rectangle
-        {
-            get
-            {            
-                return  mRectangle;
-            }
-        }
-
-        // ------------------------------------------------------------------
-        /// <summary>
-        /// Gets or sets the entities directly underneath. To get the whole 
-        /// branch of entities in case of nested groups, <see cref="Leafs"/>.
-        /// </summary>
-        // ------------------------------------------------------------------
-        public CollectionBase<IDiagramEntity> Entities
-        {
-            get 
-            { 
-                return mEntities; 
-            }
-            set 
-            {
-                mEntities = value;
-                AttachEventsToEnityCollection(mEntities);
-            }
-        }
-
-        // ------------------------------------------------------------------
-        /// <summary>
-        /// Gets the whole branch of entities if this group has sub-groups. 
-        /// The result will not contain the group shapes.
-        /// </summary>
-        /// <value>The branch.</value>
-        // ------------------------------------------------------------------
-        public CollectionBase<IDiagramEntity> Leafs
-        {
-            get
-            {
-                CollectionBase<IDiagramEntity> flatList = 
-                    new CollectionBase<IDiagramEntity>();
-
-                foreach (IDiagramEntity entity in mEntities)
-                {
-                    if (entity is IGroup)
-                        Utils.TraverseCollect(entity as IGroup, ref flatList);
-                    else
-                        flatList.Add(entity);
-                }
-                return flatList;
-            }
-        }
-        #endregion
-
-        #region Constructor
-
-        // ------------------------------------------------------------------
-        /// <summary>
-        /// Default constructor.
-        /// </summary>
-        // ------------------------------------------------------------------
-        public GroupShape()
-            : base()
-        {
-            this.PaintStyle = null;
-            PenStyle = null;
-        }
-
-        // ------------------------------------------------------------------
-        ///<summary>
-        ///Constructor that receives the parent Model.
-        ///</summary>
-        ///<param name="model">Model</param>
-        // ------------------------------------------------------------------
-        public GroupShape(IModel model) : base(model)
-        {
-            this.PaintStyle = null;
-            PenStyle = null;
-        }
-        #endregion
-
-        #region Methods
-
-        // ------------------------------------------------------------------
-        /// <summary>
-        /// Initializes the group shape.
-        /// </summary>
-        // ------------------------------------------------------------------
-        protected override void Initialize()
-        {
-            base.Initialize(); 
-            this.mEntities = new CollectionBase<IDiagramEntity>();
-            AttachEventsToEnityCollection(mEntities);
-        }
-
-        // ------------------------------------------------------------------
-        /// <summary>
-        /// Hooks-up the required events to monitor the collection of entities
-        /// specified.
-        /// </summary>
-        /// <param name="entities">CollectionBase<IDiagramEntity></param>
-        // ------------------------------------------------------------------
-        protected virtual void AttachEventsToEnityCollection(
-            CollectionBase<IDiagramEntity> entities)
-        {
-            this.mEntities.OnItemAdded +=
-                new EventHandler<CollectionEventArgs<IDiagramEntity>>(
-                OnEntityAdded);
-
-            this.mEntities.OnClear += new EventHandler(OnClearEntities);
-
-            this.mEntities.OnItemRemoved +=
-                new EventHandler<CollectionEventArgs<IDiagramEntity>>(
-                OnEntityRemoved);
-        }
-
-        // ------------------------------------------------------------------
-        /// <summary>
-        /// The custom menu to be added to the base menu of this entity.
-        /// </summary>
-        /// <returns>ToolStripItem[]</returns>
-        // ------------------------------------------------------------------
-        public override ToolStripItem[] Menu()
-        {
-            return null;
-        }
-
-        // ------------------------------------------------------------------
-        /// <summary>
-        /// Handles the OnItemRemoved of the Entities
-        /// </summary>
-        /// <param name="sender">object</param>
-        /// <param name="e">CollectionEventArgs<IDiagramEntity></param>
-        // ------------------------------------------------------------------
-        protected virtual void OnEntityRemoved(
-            object sender, 
-            CollectionEventArgs<IDiagramEntity> e)
-        {
-            CalculateRectangle();
-        }
-
-        // ------------------------------------------------------------------
-        /// <summary>
-        /// Handles the OnClear event of the Entities.
-        /// </summary>
-        /// <param name="sender">The source of the event.</param>
-        /// <param name="e">The <see cref="T:System.EventArgs"/> Instance 
-        /// containing the event data.</param>
-        // ------------------------------------------------------------------
-        protected virtual void OnClearEntities(object sender, EventArgs e)
-        {
-            mRectangle = Rectangle.Empty;
-        }
-
-        // ------------------------------------------------------------------
-        /// <summary>
-        /// Handles the OnItemAdded event of the Entities
-        /// </summary>
-        /// <param name="sender">The sender.</param>
-        /// <param name="e">The e.</param>
-        // ------------------------------------------------------------------
-        protected virtual void OnEntityAdded(
-            object sender, 
-            CollectionEventArgs<IDiagramEntity> e)
-        {
-            // I'm changing the behavior of the Group.  Rather than the
-            // entities still being attached to the Model and this not,
-            // I'm switching that - the Group is added to the Model and
-            // the entities are removed because they're contained within
-            // this.
-            if (Model.Paintables.Contains(e.Item))
-            {
-                Model.Paintables.Remove(e.Item);
-            }
-            e.Item.Group = this;
-            CalculateRectangle();
-            Invalidate();
-        }
-
-        // ------------------------------------------------------------------
-        /// <summary>
-        /// Calculates the bounding rectangle of this group.
-        /// </summary>
-        // ------------------------------------------------------------------
-        public void CalculateRectangle()
-        {
-            if (mEntities == null || mEntities.Count == 0)
-                return;
-            Rectangle rec = mEntities[0].Rectangle;                        
-            foreach (IDiagramEntity entity in Entities)
-            {
-                //cascade the calculation if necessary
-                if (entity is IGroup) (entity as IGroup).CalculateRectangle();
-
-                rec = Rectangle.Union(rec, entity.Rectangle);
-            }
-
-            rec.Inflate(myMargin, myMargin);
-            this.mRectangle = rec;                      
-        }
-
-        // ------------------------------------------------------------------
-        /// <summary>
-        /// Paints the entity on the control
-        /// <remarks>This method should not be called since the painting 
-        /// occurs via the <see cref="Model.Paintables"/>.
-        /// Use the <see cref="CollapsibleGroupShape"/> if you want a visible 
-        /// group.
-        /// </remarks>
-        /// </summary>
-        /// <param name="g">Graphics</param>
-        // ------------------------------------------------------------------
-        public override void Paint(Graphics g)
-        {
-            // Only draw the background and border of the group if we're
-            // supposed to.
-            if (EmphasizeGroup)
-            {
-                if (mPaintStyle != null)
-                {
-                    g.FillRectangle(mPaintStyle.GetBrush(mRectangle), mRectangle);
-                }
-
-                if ((Hovered) && (ArtPalette.EnableShadows))
-                {
-                    g.DrawRectangle(ArtPalette.HighlightPen, mRectangle);
-                }
-                else if (mPenStyle != null)
-                {
-                    g.DrawRectangle(mPenStyle.DrawingPen(), mRectangle);
-                }
-            }
-
-            // Now draw each entity (child) in this group.
-            foreach (IDiagramEntity entity in mEntities)
-            {
-                entity.Paint(g);
-            }
-        }
-
-        // ------------------------------------------------------------------
-        /// <summary>
-        /// Tests whether the group is hit by the mouse
-        /// </summary>
-        /// <param name="p">Point</param>
-        /// <returns>bool</returns>
-        // ------------------------------------------------------------------
-        public override bool Hit(Point p)
-        {
-            if (EmphasizeGroup)
-            {
-                Rectangle r = new Rectangle(p, new Size(5, 5));
-                return Rectangle.Contains(r);
-            }
-            else
-            {
-                foreach (IDiagramEntity entity in mEntities)
-                {
-                    if (entity.Hit(p))
-                    {
-                        return true;
-                    }
-                }
-
-                // If we made it this far then no entity was hit so
-                // return false.
-                return false;
-            }
-        }
-
-        // ------------------------------------------------------------------
-        /// <summary>
-        /// Invalidates the entity
-        /// </summary>
-        // ------------------------------------------------------------------
-        public override void Invalidate()
-        {
-
-            if(mRectangle == null) 
-                return;
-
-            Rectangle rec = mRectangle;
-            rec.Inflate(20, 20);
-            Model.RaiseOnInvalidateRectangle(rec);
-        }
-
-        // ------------------------------------------------------------------
-        /// <summary>
-        /// Moves the entity on the canvas
-        /// </summary>
-        /// <param name="p">Point</param>
-        // ------------------------------------------------------------------
-        public override void MoveBy(Point p)
-        {
-            
-            Rectangle recBefore = mRectangle;
-            recBefore.Inflate(20, 20);
-
-            // No need to invalidate since it'll be done by the individual 
-            // move actions.
-            foreach(IDiagramEntity entity in mEntities)
-            {
-                entity.MoveBy(p);
-            }
-            mRectangle.X += p.X;
-            mRectangle.Y += p.Y;
-
-            //refresh things
-            this.Invalidate(recBefore);//position before the move
-            this.Invalidate();//current position
-
-        }     
-
-        #endregion
-
-        // ------------------------------------------------------------------
-        /// <summary>
-        /// Passes the mouse down event to all entities in the collection.
-        /// </summary>
-        /// <param name="e">MouseEventArgs</param>
-        /// <returns>bool: Returns 'true' if the mouse down event was
-        /// handled here, 'false' if not.</returns>
-        // ------------------------------------------------------------------
-        public override bool MouseDown(MouseEventArgs e)
-        {
-            base.MouseDown(e);
-            bool result = false;
-
-            // Only pass the mouse down event on if we're already selected.
-            if (IsSelected == false)
-            {
-                return false;
-            }
-
-            foreach (IDiagramEntity entity in mEntities)
-            {
-                if (entity.Hit(e.Location))
-                {
-                    if (entity.MouseDown(e))
-                    {
-                        result = true;
-                    }
-                }
-            }
-            return result;
-        }
-    }
+namespace Netron.Diagramming.Core {
+  // ----------------------------------------------------------------------
+  /// <summary>
+  /// This entity represents a group of entities and corresponds to the 
+  /// '(un)grouping' feature.
+  /// </summary>
+  // ----------------------------------------------------------------------
+  partial class GroupShape : DiagramEntityBase, IGroup {
+    #region Fields
+
+    // ------------------------------------------------------------------
+    /// <summary>
+    /// Implementation of IVersion - the current version of 
+    /// GroupShape.
+    /// </summary>
+    // ------------------------------------------------------------------
+    protected const double groupShapeVersion = 1.0;
+
+    // ------------------------------------------------------------------
+    /// <summary>
+    /// The spacing between the bounds (union) of the entities and the
+    /// outter edge of the group.
+    /// </summary>
+    // ------------------------------------------------------------------
+    protected int myMargin = 10;
+
+    // ------------------------------------------------------------------
+    /// <summary>
+    /// The Entities field.
+    /// </summary>
+    // ------------------------------------------------------------------
+    private CollectionBase<IDiagramEntity> mEntities;
+
+    // ------------------------------------------------------------------
+    /// <summary>
+    /// Specifies if ungrouping is allowed.
+    /// </summary>
+    // ------------------------------------------------------------------
+    bool mAllowUnGroup = false;
+
+    // ------------------------------------------------------------------
+    /// <summary>
+    /// in essence, whether the group shape should be painted.
+    /// </summary>
+    // ------------------------------------------------------------------
+    private bool mEmphasizeGroup = true;
+
+    #endregion
+
+    #region Properties
+
+    // ------------------------------------------------------------------
+    /// <summary>
+    /// Gets the current version.
+    /// </summary>
+    // ------------------------------------------------------------------
+    public override double Version {
+      get {
+        return groupShapeVersion;
+      }
+    }
+
+    // ------------------------------------------------------------------
+    /// <summary>
+    /// Gets or sets the current magnification level used by the view.
+    /// Overriden to update each entity in this group.
+    /// </summary>
+    // ------------------------------------------------------------------
+    public override SizeF Magnification {
+      get {
+        return base.Magnification;
+      }
+      set {
+        base.Magnification = value;
+        foreach (IDiagramEntity entiy in Entities) {
+          entiy.Magnification = value;
+        }
+      }
+    }
+
+    // ------------------------------------------------------------------
+    /// <summary>
+    /// The spacing between the bounds (union) of the entities and the
+    /// outter edge of the group.
+    /// </summary>
+    // ------------------------------------------------------------------
+    public int Margin {
+      get {
+        return myMargin;
+      }
+      set {
+        myMargin = value;
+        Invalidate();
+      }
+    }
+
+    // ------------------------------------------------------------------
+    /// <summary>
+    /// Gets or sets whether the group as a shape should be painted on 
+    /// the canvas.
+    /// </summary>
+    /// <value><c>true</c> To paint the group shape; otherwise, 
+    /// <c>false</c>.</value>
+    // ------------------------------------------------------------------
+    public bool EmphasizeGroup {
+      get { return mEmphasizeGroup; }
+      set { mEmphasizeGroup = value; }
+    }
+
+    // ------------------------------------------------------------------
+    /// <summary>
+    /// Gets or sets if un-grouping of the entities is allowed.
+    /// </summary>
+    // ------------------------------------------------------------------
+    public virtual bool CanUnGroup {
+      get {
+        return mAllowUnGroup;
+      }
+      set {
+        mAllowUnGroup = value;
+      }
+    }
+
+    // ------------------------------------------------------------------
+    /// <summary>
+    /// Gets the friendly name of the entity to be displayed in the UI.
+    /// </summary>
+    /// <value></value>
+    // ------------------------------------------------------------------
+    public override string EntityName {
+      get {
+        return "Group shape";
+      }
+    }
+
+    // ------------------------------------------------------------------
+    /// <summary>
+    /// Gets or sets the rectangle.
+    /// </summary>
+    /// <value>The rectangle.</value>
+    // ------------------------------------------------------------------
+    public override Rectangle Rectangle {
+      get {
+        return mRectangle;
+      }
+    }
+
+    // ------------------------------------------------------------------
+    /// <summary>
+    /// Gets or sets the entities directly underneath. To get the whole 
+    /// branch of entities in case of nested groups, <see cref="Leafs"/>.
+    /// </summary>
+    // ------------------------------------------------------------------
+    public CollectionBase<IDiagramEntity> Entities {
+      get {
+        return mEntities;
+      }
+      set {
+        mEntities = value;
+        AttachEventsToEnityCollection(mEntities);
+      }
+    }
+
+    // ------------------------------------------------------------------
+    /// <summary>
+    /// Gets the whole branch of entities if this group has sub-groups. 
+    /// The result will not contain the group shapes.
+    /// </summary>
+    /// <value>The branch.</value>
+    // ------------------------------------------------------------------
+    public CollectionBase<IDiagramEntity> Leafs {
+      get {
+        CollectionBase<IDiagramEntity> flatList =
+            new CollectionBase<IDiagramEntity>();
+
+        foreach (IDiagramEntity entity in mEntities) {
+          if (entity is IGroup)
+            Utils.TraverseCollect(entity as IGroup, ref flatList);
+          else
+            flatList.Add(entity);
+        }
+        return flatList;
+      }
+    }
+    #endregion
+
+    #region Constructor
+
+    // ------------------------------------------------------------------
+    /// <summary>
+    /// Default constructor.
+    /// </summary>
+    // ------------------------------------------------------------------
+    public GroupShape()
+      : base() {
+      this.PaintStyle = null;
+      PenStyle = null;
+    }
+
+    // ------------------------------------------------------------------
+    ///<summary>
+    ///Constructor that receives the parent Model.
+    ///</summary>
+    ///<param name="model">Model</param>
+    // ------------------------------------------------------------------
+    public GroupShape(IModel model)
+      : base(model) {
+      this.PaintStyle = null;
+      PenStyle = null;
+    }
+    #endregion
+
+    #region Methods
+
+    // ------------------------------------------------------------------
+    /// <summary>
+    /// Initializes the group shape.
+    /// </summary>
+    // ------------------------------------------------------------------
+    protected override void Initialize() {
+      base.Initialize();
+      this.mEntities = new CollectionBase<IDiagramEntity>();
+      AttachEventsToEnityCollection(mEntities);
+    }
+
+    // ------------------------------------------------------------------
+    /// <summary>
+    /// Hooks-up the required events to monitor the collection of entities
+    /// specified.
+    /// </summary>
+    /// <param name="entities">CollectionBase<IDiagramEntity></param>
+    // ------------------------------------------------------------------
+    protected virtual void AttachEventsToEnityCollection(
+        CollectionBase<IDiagramEntity> entities) {
+      this.mEntities.OnItemAdded +=
+          new EventHandler<CollectionEventArgs<IDiagramEntity>>(
+          OnEntityAdded);
+
+      this.mEntities.OnClear += new EventHandler(OnClearEntities);
+
+      this.mEntities.OnItemRemoved +=
+          new EventHandler<CollectionEventArgs<IDiagramEntity>>(
+          OnEntityRemoved);
+    }
+
+    // ------------------------------------------------------------------
+    /// <summary>
+    /// The custom menu to be added to the base menu of this entity.
+    /// </summary>
+    /// <returns>ToolStripItem[]</returns>
+    // ------------------------------------------------------------------
+    public override ToolStripItem[] Menu() {
+      return null;
+    }
+
+    // ------------------------------------------------------------------
+    /// <summary>
+    /// Handles the OnItemRemoved of the Entities
+    /// </summary>
+    /// <param name="sender">object</param>
+    /// <param name="e">CollectionEventArgs<IDiagramEntity></param>
+    // ------------------------------------------------------------------
+    protected virtual void OnEntityRemoved(
+        object sender,
+        CollectionEventArgs<IDiagramEntity> e) {
+      CalculateRectangle();
+    }
+
+    // ------------------------------------------------------------------
+    /// <summary>
+    /// Handles the OnClear event of the Entities.
+    /// </summary>
+    /// <param name="sender">The source of the event.</param>
+    /// <param name="e">The <see cref="T:System.EventArgs"/> Instance 
+    /// containing the event data.</param>
+    // ------------------------------------------------------------------
+    protected virtual void OnClearEntities(object sender, EventArgs e) {
+      mRectangle = Rectangle.Empty;
+    }
+
+    // ------------------------------------------------------------------
+    /// <summary>
+    /// Handles the OnItemAdded event of the Entities
+    /// </summary>
+    /// <param name="sender">The sender.</param>
+    /// <param name="e">The e.</param>
+    // ------------------------------------------------------------------
+    protected virtual void OnEntityAdded(
+        object sender,
+        CollectionEventArgs<IDiagramEntity> e) {
+      // I'm changing the behavior of the Group.  Rather than the
+      // entities still being attached to the Model and this not,
+      // I'm switching that - the Group is added to the Model and
+      // the entities are removed because they're contained within
+      // this.
+      if (Model.Paintables.Contains(e.Item)) {
+        Model.Paintables.Remove(e.Item);
+      }
+      e.Item.Group = this;
+      CalculateRectangle();
+      Invalidate();
+    }
+
+    // ------------------------------------------------------------------
+    /// <summary>
+    /// Calculates the bounding rectangle of this group.
+    /// </summary>
+    // ------------------------------------------------------------------
+    public void CalculateRectangle() {
+      if (mEntities == null || mEntities.Count == 0)
+        return;
+      Rectangle rec = mEntities[0].Rectangle;
+      foreach (IDiagramEntity entity in Entities) {
+        //cascade the calculation if necessary
+        if (entity is IGroup) (entity as IGroup).CalculateRectangle();
+
+        rec = Rectangle.Union(rec, entity.Rectangle);
+      }
+
+      rec.Inflate(myMargin, myMargin);
+      this.mRectangle = rec;
+    }
+
+    // ------------------------------------------------------------------
+    /// <summary>
+    /// Paints the entity on the control
+    /// <remarks>This method should not be called since the painting 
+    /// occurs via the <see cref="Model.Paintables"/>.
+    /// Use the <see cref="CollapsibleGroupShape"/> if you want a visible 
+    /// group.
+    /// </remarks>
+    /// </summary>
+    /// <param name="g">Graphics</param>
+    // ------------------------------------------------------------------
+    public override void Paint(Graphics g) {
+      // Only draw the background and border of the group if we're
+      // supposed to.
+      if (EmphasizeGroup) {
+        if (mPaintStyle != null) {
+          g.FillRectangle(mPaintStyle.GetBrush(mRectangle), mRectangle);
+        }
+
+        if ((Hovered) && (ArtPalette.EnableShadows)) {
+          g.DrawRectangle(ArtPalette.HighlightPen, mRectangle);
+        } else if (mPenStyle != null) {
+          g.DrawRectangle(mPenStyle.DrawingPen(), mRectangle);
+        }
+      }
+
+      // Now draw each entity (child) in this group.
+      foreach (IDiagramEntity entity in mEntities) {
+        entity.Paint(g);
+      }
+    }
+
+    // ------------------------------------------------------------------
+    /// <summary>
+    /// Tests whether the group is hit by the mouse
+    /// </summary>
+    /// <param name="p">Point</param>
+    /// <returns>bool</returns>
+    // ------------------------------------------------------------------
+    public override bool Hit(Point p) {
+      if (EmphasizeGroup) {
+        Rectangle r = new Rectangle(p, new Size(5, 5));
+        return Rectangle.Contains(r);
+      } else {
+        foreach (IDiagramEntity entity in mEntities) {
+          if (entity.Hit(p)) {
+            return true;
+          }
+        }
+
+        // If we made it this far then no entity was hit so
+        // return false.
+        return false;
+      }
+    }
+
+    // ------------------------------------------------------------------
+    /// <summary>
+    /// Invalidates the entity
+    /// </summary>
+    // ------------------------------------------------------------------
+    public override void Invalidate() {
+
+      if (mRectangle == null)
+        return;
+
+      Rectangle rec = mRectangle;
+      rec.Inflate(20, 20);
+      Model.RaiseOnInvalidateRectangle(rec);
+    }
+
+    // ------------------------------------------------------------------
+    /// <summary>
+    /// Moves the entity on the canvas
+    /// </summary>
+    /// <param name="p">Point</param>
+    // ------------------------------------------------------------------
+    public override void MoveBy(Point p) {
+
+      Rectangle recBefore = mRectangle;
+      recBefore.Inflate(20, 20);
+
+      // No need to invalidate since it'll be done by the individual 
+      // move actions.
+      foreach (IDiagramEntity entity in mEntities) {
+        entity.MoveBy(p);
+      }
+      mRectangle.X += p.X;
+      mRectangle.Y += p.Y;
+
+      //refresh things
+      this.Invalidate(recBefore);//position before the move
+      this.Invalidate();//current position
+
+    }
+
+    #endregion
+
+    // ------------------------------------------------------------------
+    /// <summary>
+    /// Passes the mouse down event to all entities in the collection.
+    /// </summary>
+    /// <param name="e">MouseEventArgs</param>
+    /// <returns>bool: Returns 'true' if the mouse down event was
+    /// handled here, 'false' if not.</returns>
+    // ------------------------------------------------------------------
+    public override bool MouseDown(MouseEventArgs e) {
+      base.MouseDown(e);
+      bool result = false;
+
+      // Only pass the mouse down event on if we're already selected.
+      if (IsSelected == false) {
+        return false;
+      }
+
+      foreach (IDiagramEntity entity in mEntities) {
+        if (entity.Hit(e.Location)) {
+          if (entity.MouseDown(e)) {
+            result = true;
+          }
+        }
+      }
+      return result;
+    }
+  }
 }
Index: /trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.Netron/3.0.2672.12446/Netron.Diagramming.Core-3.0.2672.12446/Diagram elements/Materials/ClickableIconLabelMaterial.cs
===================================================================
--- /trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.Netron/3.0.2672.12446/Netron.Diagramming.Core-3.0.2672.12446/Diagram elements/Materials/ClickableIconLabelMaterial.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.Netron/3.0.2672.12446/Netron.Diagramming.Core-3.0.2672.12446/Diagram elements/Materials/ClickableIconLabelMaterial.cs	(revision 4068)
@@ -1,223 +1,197 @@
 using System;
-using System.Drawing.Drawing2D;
-using System.Collections.Generic;
-using System.Text;
-using System.Drawing;
-using System.IO;
 using System.Diagnostics;
 using System.Windows.Forms;
-namespace Netron.Diagramming.Core
-{  
+namespace Netron.Diagramming.Core {
+  /// <summary>
+  /// Clickable icon-and-label shape material, i.e. an hyperlink with an icon. This material combines
+  /// the <see cref="IconMaterial"/> and the <see cref="ClcikableLabelMaterial"/>
+  /// </summary>
+  public partial class ClickableIconLabelMaterial :
+      IconLabelMaterial,
+      IMouseListener,
+      IHoverListener {
+    #region Fields
     /// <summary>
-    /// Clickable icon-and-label shape material, i.e. an hyperlink with an icon. This material combines
-    /// the <see cref="IconMaterial"/> and the <see cref="ClcikableLabelMaterial"/>
+    /// the url of this link
     /// </summary>
-    public partial class ClickableIconLabelMaterial : 
-        IconLabelMaterial, 
-        IMouseListener, 
-        IHoverListener
-    {
-        #region Fields
-        /// <summary>
-        /// the url of this link
-        /// </summary>
-        private string mUrl = string.Empty;
+    private string mUrl = string.Empty;
 
-        // ------------------------------------------------------------------
-        /// <summary>
-        /// Implementation of IVersion - the current version of 
-        /// ClickableIconLabelMaterial.
-        /// </summary>
-        // ------------------------------------------------------------------
-        protected double clickableIconLabelMaterialVersion = 1.0;
-        
-        #endregion
-        
-        #region Properties
+    // ------------------------------------------------------------------
+    /// <summary>
+    /// Implementation of IVersion - the current version of 
+    /// ClickableIconLabelMaterial.
+    /// </summary>
+    // ------------------------------------------------------------------
+    protected double clickableIconLabelMaterialVersion = 1.0;
 
-        // ------------------------------------------------------------------
-        /// <summary>
-        /// Gets or sets the URL of this clickable material. Note that the 
-        /// material can handle more than just Url's by overriding the mouse 
-        /// event handlers.  Settings this property is just a convenient way 
-        /// to accelerate the development or customization of shapes.
-        /// </summary>
-        /// <value>The URL.</value>
-        // ------------------------------------------------------------------
-        public string Url
-        {
-            get { return mUrl; }
-            set { mUrl = value; }
+    #endregion
+
+    #region Properties
+
+    // ------------------------------------------------------------------
+    /// <summary>
+    /// Gets or sets the URL of this clickable material. Note that the 
+    /// material can handle more than just Url's by overriding the mouse 
+    /// event handlers.  Settings this property is just a convenient way 
+    /// to accelerate the development or customization of shapes.
+    /// </summary>
+    /// <value>The URL.</value>
+    // ------------------------------------------------------------------
+    public string Url {
+      get { return mUrl; }
+      set { mUrl = value; }
+    }
+
+    // ------------------------------------------------------------------
+    /// <summary>
+    /// Gets the current version.
+    /// </summary>
+    // ------------------------------------------------------------------
+    public override double Version {
+      get {
+        return clickableIconLabelMaterialVersion;
+      }
+    }
+    #endregion
+
+    #region Constructor
+    /// <summary>
+    /// Initializes a new instance of the <see cref="T:ClickableIconLabelMaterial"/> class.
+    /// </summary>
+    public ClickableIconLabelMaterial()
+      : base() {
+      //Resizable = false;
+    }
+
+    /// <summary>
+    /// Initializes a new instance of the <see cref="T:ClickableIconLabelMaterial"/> class.
+    /// </summary>
+    /// <param name="text">The text.</param>
+    public ClickableIconLabelMaterial(string text) : base(text) { }
+
+    /// <summary>
+    /// Initializes a new instance of the <see cref="T:ClickableIconLabelMaterial"/> class.
+    /// </summary>
+    /// <param name="text">The text.</param>
+    /// <param name="resourceLocation">The resource location.</param>
+    public ClickableIconLabelMaterial(string text, string resourceLocation)
+      : base(text, resourceLocation) {
+
+    }
+
+    /// <summary>
+    /// Initializes a new instance of the <see cref="T:ClickableIconLabelMaterial"/> class.
+    /// </summary>
+    /// <param name="text">The text.</param>
+    /// <param name="resourceLocation">The resource location.</param>
+    /// <param name="url">The URL.</param>
+    public ClickableIconLabelMaterial(string text, string resourceLocation, string url)
+      : base(text, resourceLocation) {
+      this.mUrl = url;
+    }
+    #endregion
+
+    #region Methods
+
+    #region IMouseListener Members
+    /// <summary>
+    /// Gets the service object of the specified type.
+    /// </summary>
+    /// <param name="serviceType">An object that specifies the type of service object to get.</param>
+    /// <returns>
+    /// A service object of type serviceType.-or- null if there is no service object of type serviceType.
+    /// </returns>
+    public override object GetService(Type serviceType) {
+      if (serviceType.Equals(typeof(IMouseListener)))
+        return this;
+      else if (serviceType.Equals(typeof(IHoverListener)))
+        return this;
+      else
+        return null;
+    }
+
+    /// <summary>
+    /// Handles the mouse-down event
+    /// </summary>
+    /// <param name="e">The <see cref="T:MouseEventArgs"/> instance containing the event data.</param>
+    public virtual bool MouseDown(MouseEventArgs e) {
+      if (this.Rectangle.Contains(e.Location)) {
+        if (mUrl.Length > 0) {
+          try {
+            Process.Start(mUrl);
+          }
+
+          catch (ObjectDisposedException oex) {
+            Trace.WriteLine(oex.Message);
+          }
+          catch (System.ComponentModel.Win32Exception wex) {
+            Trace.WriteLine(wex.Message);
+          }
+          catch (ArgumentException aex) {
+            Trace.WriteLine(aex.Message);
+          }
+          catch (InvalidOperationException iex) {
+            Trace.WriteLine(iex.Message);
+          }
         }
+        return true;//let the rest of the loop go, the event was handled
+      }
+      return false;
+    }
 
-        // ------------------------------------------------------------------
-        /// <summary>
-        /// Gets the current version.
-        /// </summary>
-        // ------------------------------------------------------------------
-        public override double Version
-        {
-            get
-            {
-                return clickableIconLabelMaterialVersion;
-            }
-        }
-        #endregion
+    /// <summary>
+    /// Handles the mouse-move event
+    /// </summary>
+    /// <param name="e">The <see cref="T:MouseEventArgs"/> instance containing the event data.</param>
+    public void MouseMove(MouseEventArgs e) {
+      System.Diagnostics.Trace.WriteLine(e.Location.ToString());
+    }
 
-        #region Constructor
-        /// <summary>
-        /// Initializes a new instance of the <see cref="T:ClickableIconLabelMaterial"/> class.
-        /// </summary>
-        public ClickableIconLabelMaterial()   : base()
-        {
-            //Resizable = false;
-        }
+    /// <summary>
+    /// Handles the mouse-up event
+    /// </summary>
+    /// <param name="e">The <see cref="T:MouseEventArgs"/> instance containing the event data.</param>
+    public virtual void MouseUp(MouseEventArgs e) {
 
-        /// <summary>
-        /// Initializes a new instance of the <see cref="T:ClickableIconLabelMaterial"/> class.
-        /// </summary>
-        /// <param name="text">The text.</param>
-        public ClickableIconLabelMaterial(string text) : base(text) { }
+    }
 
-        /// <summary>
-        /// Initializes a new instance of the <see cref="T:ClickableIconLabelMaterial"/> class.
-        /// </summary>
-        /// <param name="text">The text.</param>
-        /// <param name="resourceLocation">The resource location.</param>
-        public ClickableIconLabelMaterial(string text, string resourceLocation)
-            : base(text, resourceLocation)
-        {
-           
-        }
+    #endregion
 
-        /// <summary>
-        /// Initializes a new instance of the <see cref="T:ClickableIconLabelMaterial"/> class.
-        /// </summary>
-        /// <param name="text">The text.</param>
-        /// <param name="resourceLocation">The resource location.</param>
-        /// <param name="url">The URL.</param>
-        public ClickableIconLabelMaterial(string text, string resourceLocation, string url)
-            : base(text, resourceLocation)
-        {
-            this.mUrl = url;
-         }
-        #endregion
+    #region IHoverListener Members
+    /// <summary>
+    /// Handles the <see cref="OnMouseHover"/> event.
+    /// </summary>
+    /// <param name="e">The <see cref="T:System.Windows.Forms.MouseEventArgs"/> instance containing the event data.</param>
+    public void MouseHover(MouseEventArgs e) {
 
-        #region Methods        
+    }
+    private Cursor previousCursor;
 
-        #region IMouseListener Members
-        /// <summary>
-        /// Gets the service object of the specified type.
-        /// </summary>
-        /// <param name="serviceType">An object that specifies the type of service object to get.</param>
-        /// <returns>
-        /// A service object of type serviceType.-or- null if there is no service object of type serviceType.
-        /// </returns>
-        public override object GetService(Type serviceType)
-        {
-            if (serviceType.Equals(typeof(IMouseListener)))
-                return this;
-            else if (serviceType.Equals(typeof(IHoverListener)))
-                return this;
-            else
-                return null;
-        }
+    /// <summary>
+    /// Handles the OnMouseEnter event.
+    /// </summary>
+    /// <param name="e">The <see cref="T:System.Windows.Forms.MouseEventArgs"/> instance containing the event data.</param>
+    public void MouseEnter(MouseEventArgs e) {
+      previousCursor = Cursor.Current;
+      this.Shape.Model.RaiseOnCursorChange(Cursors.Hand);
+    }
 
-        /// <summary>
-        /// Handles the mouse-down event
-        /// </summary>
-        /// <param name="e">The <see cref="T:MouseEventArgs"/> instance containing the event data.</param>
-        public virtual bool MouseDown(MouseEventArgs e)
-        {
-            if (this.Rectangle.Contains(e.Location))
-            {
-                if (mUrl.Length > 0)
-                {
-                    try
-                    {
-                        Process.Start(mUrl);
-                    }
-                   
-                    catch (ObjectDisposedException oex)
-                    {
-                        Trace.WriteLine(oex.Message);
-                    }
-                    catch (System.ComponentModel.Win32Exception wex)
-                    {
-                        Trace.WriteLine(wex.Message);
-                    }
-                    catch (ArgumentException aex)
-                    {
-                        Trace.WriteLine(aex.Message);
-                    }
-                    catch (InvalidOperationException iex)
-                    {
-                        Trace.WriteLine(iex.Message);
-                    }
-                }
-                return true;//let the rest of the loop go, the event was handled
-            }
-            return false;
-        }
+    /// <summary>
+    /// Handles the OnMouseLeave event.
+    /// </summary>
+    /// <param name="e">The <see cref="T:System.Windows.Forms.MouseEventArgs"/> instance containing the event data.</param>
+    public void MouseLeave(MouseEventArgs e) {
+      this.Shape.Model.RaiseOnCursorChange(previousCursor);
+    }
 
-        /// <summary>
-        /// Handles the mouse-move event
-        /// </summary>
-        /// <param name="e">The <see cref="T:MouseEventArgs"/> instance containing the event data.</param>
-        public void MouseMove(MouseEventArgs e)
-        {
-            System.Diagnostics.Trace.WriteLine(e.Location.ToString());
-        }
+    //public override void Paint(Graphics g)
+    //{
+    //    g.DrawRectangle(Pens.Violet, Rectangle);
+    //    base.Paint(g);
+    //}
+    #endregion
 
-        /// <summary>
-        /// Handles the mouse-up event
-        /// </summary>
-        /// <param name="e">The <see cref="T:MouseEventArgs"/> instance containing the event data.</param>
-        public virtual void MouseUp(MouseEventArgs e)
-        {
+    #endregion
 
-        }
-
-         #endregion
-
-        #region IHoverListener Members
-        /// <summary>
-        /// Handles the <see cref="OnMouseHover"/> event.
-        /// </summary>
-        /// <param name="e">The <see cref="T:System.Windows.Forms.MouseEventArgs"/> instance containing the event data.</param>
-        public void MouseHover(MouseEventArgs e)
-        {
-
-        }
-        private Cursor previousCursor;
-
-        /// <summary>
-        /// Handles the OnMouseEnter event.
-        /// </summary>
-        /// <param name="e">The <see cref="T:System.Windows.Forms.MouseEventArgs"/> instance containing the event data.</param>
-        public void MouseEnter(MouseEventArgs e)
-        {
-            previousCursor = Cursor.Current;
-            this.Shape.Model.RaiseOnCursorChange(Cursors.Hand);
-        }
-
-        /// <summary>
-        /// Handles the OnMouseLeave event.
-        /// </summary>
-        /// <param name="e">The <see cref="T:System.Windows.Forms.MouseEventArgs"/> instance containing the event data.</param>
-        public void MouseLeave(MouseEventArgs e)
-        {
-            this.Shape.Model.RaiseOnCursorChange(previousCursor);
-        }
-
-        //public override void Paint(Graphics g)
-        //{
-        //    g.DrawRectangle(Pens.Violet, Rectangle);
-        //    base.Paint(g);
-        //}
-        #endregion
-      
-        #endregion
-      
-    }
+  }
 }
Index: /trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.Netron/3.0.2672.12446/Netron.Diagramming.Core-3.0.2672.12446/Diagram elements/Materials/ClickableIconMaterial.cs
===================================================================
--- /trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.Netron/3.0.2672.12446/Netron.Diagramming.Core-3.0.2672.12446/Diagram elements/Materials/ClickableIconMaterial.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.Netron/3.0.2672.12446/Netron.Diagramming.Core-3.0.2672.12446/Diagram elements/Materials/ClickableIconMaterial.cs	(revision 4068)
@@ -1,144 +1,127 @@
 using System;
-using System.Collections.Generic;
-using System.Text;
-using System.Drawing;
-using System.IO;
-using System.Diagnostics;
 using System.Windows.Forms;
-namespace Netron.Diagramming.Core
-{  
+namespace Netron.Diagramming.Core {
+  /// <summary>
+  /// Clickable icon shape material
+  /// </summary>
+  public partial class ClickableIconMaterial : IconMaterial, IMouseListener, IHoverListener {
+    #region Fields
+
+    // ------------------------------------------------------------------
     /// <summary>
-    /// Clickable icon shape material
+    /// Implementation of IVersion - the current version of 
+    /// ClickableIconMaterial.
     /// </summary>
-    public partial class ClickableIconMaterial : IconMaterial, IMouseListener, IHoverListener
-    {
-        #region Fields
+    // ------------------------------------------------------------------
+    protected double clickableIconMaterialVersion = 1.0;
 
-        // ------------------------------------------------------------------
-        /// <summary>
-        /// Implementation of IVersion - the current version of 
-        /// ClickableIconMaterial.
-        /// </summary>
-        // ------------------------------------------------------------------
-        protected double clickableIconMaterialVersion = 1.0;
+    #endregion
 
-        #endregion
+    #region Properties
 
-        #region Properties
+    // ------------------------------------------------------------------
+    /// <summary>
+    /// Gets the current version.
+    /// </summary>
+    // ------------------------------------------------------------------
+    public override double Version {
+      get {
+        return clickableIconMaterialVersion;
+      }
+    }
 
-        // ------------------------------------------------------------------
-        /// <summary>
-        /// Gets the current version.
-        /// </summary>
-        // ------------------------------------------------------------------
-        public override double Version
-        {
-            get
-            {
-                return clickableIconMaterialVersion;
-            }
-        }
+    #endregion
 
-        #endregion
+    #region Constructor
+    /// <summary>
+    /// Initializes a new instance of the <see cref="T:ClickableIconMaterial"/> class.
+    /// </summary>
+    /// <param name="resourceLocation">The resource location.</param>
+    public ClickableIconMaterial(string resourceLocation)
+      : base(resourceLocation) {
+      Resizable = false;
+    }
+    /// <summary>
+    /// Initializes a new instance of the <see cref="T:ClickableIconMaterial"/> class.
+    /// </summary>
+    public ClickableIconMaterial()
+      : base() {
+      Resizable = false;
+    }
+    #endregion
 
-        #region Constructor
-        /// <summary>
-        /// Initializes a new instance of the <see cref="T:ClickableIconMaterial"/> class.
-        /// </summary>
-        /// <param name="resourceLocation">The resource location.</param>
-        public ClickableIconMaterial( string resourceLocation)   : base( resourceLocation)
-        {
-            Resizable = false;
-        }
-        /// <summary>
-        /// Initializes a new instance of the <see cref="T:ClickableIconMaterial"/> class.
-        /// </summary>
-        public ClickableIconMaterial()
-            : base()
-        {
-            Resizable = false;
-        }
-        #endregion
+    #region Methods
+    /// <summary>
+    /// Gets the service object of the specified type.
+    /// </summary>
+    /// <param name="serviceType">An object that specifies the type of service object to get.</param>
+    /// <returns>
+    /// A service object of type serviceType.-or- null if there is no service object of type serviceType.
+    /// </returns>
+    public override object GetService(Type serviceType) {
+      if (serviceType.Equals(typeof(IMouseListener)))
+        return this;
+      else if (serviceType.Equals(typeof(IHoverListener)))
+        return this;
+      else
+        return null;
+    }
 
-        #region Methods
-        /// <summary>
-        /// Gets the service object of the specified type.
-        /// </summary>
-        /// <param name="serviceType">An object that specifies the type of service object to get.</param>
-        /// <returns>
-        /// A service object of type serviceType.-or- null if there is no service object of type serviceType.
-        /// </returns>
-        public override object GetService(Type serviceType)
-        {
-            if (serviceType.Equals(typeof(IMouseListener)))
-                return this;
-            else if (serviceType.Equals(typeof(IHoverListener)))
-                return this;
-            else
-                return null;
-        }
+    /// <summary>
+    /// Handles the mouse-down event
+    /// </summary>
+    /// <param name="e">The <see cref="T:MouseEventArgs"/> instance containing the event data.</param>
+    public virtual bool MouseDown(MouseEventArgs e) {
+      //if(this.Rectangle.Contains(e.Location))
+      //    this.Shape.ShapeColor = Color.Yellow;            
+      return false;
+    }
 
-        /// <summary>
-        /// Handles the mouse-down event
-        /// </summary>
-        /// <param name="e">The <see cref="T:MouseEventArgs"/> instance containing the event data.</param>
-        public virtual bool MouseDown(MouseEventArgs e)
-        {
-            //if(this.Rectangle.Contains(e.Location))
-            //    this.Shape.ShapeColor = Color.Yellow;            
-            return false;
-        }
+    /// <summary>
+    /// Handles the mouse-move event
+    /// </summary>
+    /// <param name="e">The <see cref="T:MouseEventArgs"/> instance containing the event data.</param>
+    public void MouseMove(MouseEventArgs e) {
+      System.Diagnostics.Trace.WriteLine(e.Location.ToString());
+    }
 
-        /// <summary>
-        /// Handles the mouse-move event
-        /// </summary>
-        /// <param name="e">The <see cref="T:MouseEventArgs"/> instance containing the event data.</param>
-        public void MouseMove(MouseEventArgs e)
-        {
-            System.Diagnostics.Trace.WriteLine(e.Location.ToString());
-        }
+    /// <summary>
+    /// Handles the mouse-up event
+    /// </summary>
+    /// <param name="e">The <see cref="T:MouseEventArgs"/> instance containing the event data.</param>
+    public virtual void MouseUp(MouseEventArgs e) {
 
-        /// <summary>
-        /// Handles the mouse-up event
-        /// </summary>
-        /// <param name="e">The <see cref="T:MouseEventArgs"/> instance containing the event data.</param>
-        public virtual void MouseUp(MouseEventArgs e)
-        {
-            
-        }
-        #endregion
+    }
+    #endregion
 
-       
 
-        #region IHoverListener Members
-        /// <summary>
-        /// Handles the <see cref="OnMouseHover"/> event.
-        /// </summary>
-        /// <param name="e">The <see cref="T:System.Windows.Forms.MouseEventArgs"/> instance containing the event data.</param>
-        public void MouseHover(MouseEventArgs e)
-        {
-           
-        }
-        private Cursor previousCursor;
-        /// <summary>
-        /// Handles the OnMouseEnter event.
-        /// </summary>
-        /// <param name="e">The <see cref="T:System.Windows.Forms.MouseEventArgs"/> instance containing the event data.</param>
-        public void MouseEnter(MouseEventArgs e)
-        {
-                previousCursor = Cursor.Current;                
-                this.Shape.Model.RaiseOnCursorChange(Cursors.Hand);
-        }
 
-        /// <summary>
-        /// Handles the OnMouseLeave event.
-        /// </summary>
-        /// <param name="e">The <see cref="T:System.Windows.Forms.MouseEventArgs"/> instance containing the event data.</param>
-        public void MouseLeave(MouseEventArgs e)
-        {
-            this.Shape.Model.RaiseOnCursorChange(previousCursor);
-        }
+    #region IHoverListener Members
+    /// <summary>
+    /// Handles the <see cref="OnMouseHover"/> event.
+    /// </summary>
+    /// <param name="e">The <see cref="T:System.Windows.Forms.MouseEventArgs"/> instance containing the event data.</param>
+    public void MouseHover(MouseEventArgs e) {
 
-        #endregion
     }
+    private Cursor previousCursor;
+    /// <summary>
+    /// Handles the OnMouseEnter event.
+    /// </summary>
+    /// <param name="e">The <see cref="T:System.Windows.Forms.MouseEventArgs"/> instance containing the event data.</param>
+    public void MouseEnter(MouseEventArgs e) {
+      previousCursor = Cursor.Current;
+      this.Shape.Model.RaiseOnCursorChange(Cursors.Hand);
+    }
+
+    /// <summary>
+    /// Handles the OnMouseLeave event.
+    /// </summary>
+    /// <param name="e">The <see cref="T:System.Windows.Forms.MouseEventArgs"/> instance containing the event data.</param>
+    public void MouseLeave(MouseEventArgs e) {
+      this.Shape.Model.RaiseOnCursorChange(previousCursor);
+    }
+
+    #endregion
+  }
 }
Index: /trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.Netron/3.0.2672.12446/Netron.Diagramming.Core-3.0.2672.12446/Diagram elements/Materials/ClickableLabelMaterial.cs
===================================================================
--- /trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.Netron/3.0.2672.12446/Netron.Diagramming.Core-3.0.2672.12446/Diagram elements/Materials/ClickableLabelMaterial.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.Netron/3.0.2672.12446/Netron.Diagramming.Core-3.0.2672.12446/Diagram elements/Materials/ClickableLabelMaterial.cs	(revision 4068)
@@ -1,194 +1,176 @@
 using System;
-using System.Collections.Generic;
-using System.Text;
-using System.Drawing;
-using System.IO;
 using System.Diagnostics;
 using System.Windows.Forms;
-namespace Netron.Diagramming.Core
-{  
+namespace Netron.Diagramming.Core {
+  /// <summary>
+  /// Clickable label shape material, i.e. an hyperlink.
+  /// </summary>
+  public partial class ClickableLabelMaterial :
+      LabelMaterial,
+      IMouseListener,
+      IHoverListener {
+
+    // ------------------------------------------------------------------
     /// <summary>
-    /// Clickable label shape material, i.e. an hyperlink.
+    /// Occurs when the lable is clicked
     /// </summary>
-    public partial class ClickableLabelMaterial : 
-        LabelMaterial, 
-        IMouseListener, 
-        IHoverListener
-    {
+    // ------------------------------------------------------------------
+    public event EventHandler OnClick;
 
-        // ------------------------------------------------------------------
-        /// <summary>
-        /// Occurs when the lable is clicked
-        /// </summary>
-        // ------------------------------------------------------------------
-        public event EventHandler OnClick;
+    #region Fields
 
-        #region Fields
+    // ------------------------------------------------------------------
+    /// <summary>
+    /// the url of this link
+    /// </summary>
+    // ------------------------------------------------------------------
+    private string mUrl = string.Empty;
 
-        // ------------------------------------------------------------------
-        /// <summary>
-        /// the url of this link
-        /// </summary>
-        // ------------------------------------------------------------------
-        private string mUrl = string.Empty;
+    // ------------------------------------------------------------------
+    /// <summary>
+    /// Implementation of IVersion - the current version of 
+    /// ClickableLabelMaterial.
+    /// </summary>
+    // ------------------------------------------------------------------
+    protected double clickableLabelMaterialVersion = 1.0;
 
-        // ------------------------------------------------------------------
-        /// <summary>
-        /// Implementation of IVersion - the current version of 
-        /// ClickableLabelMaterial.
-        /// </summary>
-        // ------------------------------------------------------------------
-        protected double clickableLabelMaterialVersion = 1.0;
+    #endregion
 
-        #endregion
+    #region Properties
 
-        #region Properties
+    // ------------------------------------------------------------------
+    /// <summary>
+    /// Gets the current version.
+    /// </summary>
+    // ------------------------------------------------------------------
+    public override double Version {
+      get {
+        return clickableLabelMaterialVersion;
+      }
+    }
 
-        // ------------------------------------------------------------------
-        /// <summary>
-        /// Gets the current version.
-        /// </summary>
-        // ------------------------------------------------------------------
-        public override double Version
-        {
-            get
-            {
-                return clickableLabelMaterialVersion;
-            }
-        }
+    // ------------------------------------------------------------------
+    /// <summary>
+    /// Gets or sets the URL of this clickable material. Note that the 
+    /// material can handle more than just Url's by overriding the mouse 
+    /// event handlers.  Settings this property is just a convenient way 
+    /// to accelerate the development or customization of shapes.
+    /// </summary>
+    /// <value>The URL.</value>
+    // ------------------------------------------------------------------
+    public string Url {
+      get { return mUrl; }
+      set { mUrl = value; }
+    }
 
-        // ------------------------------------------------------------------
-        /// <summary>
-        /// Gets or sets the URL of this clickable material. Note that the 
-        /// material can handle more than just Url's by overriding the mouse 
-        /// event handlers.  Settings this property is just a convenient way 
-        /// to accelerate the development or customization of shapes.
-        /// </summary>
-        /// <value>The URL.</value>
-        // ------------------------------------------------------------------
-        public string Url
-        {
-            get { return mUrl; }
-            set { mUrl = value; }
-        }
+    #endregion
 
-        #endregion
+    #region Constructor
+    /// <summary>
+    /// Initializes a new instance of the <see cref="T:ClickableLabelMaterial"/> class.
+    /// </summary>
+    public ClickableLabelMaterial()
+      : base() {
+      //Resizable = false;
+    }
 
-        #region Constructor
-        /// <summary>
-        /// Initializes a new instance of the <see cref="T:ClickableLabelMaterial"/> class.
-        /// </summary>
-        public ClickableLabelMaterial()   : base()
-        {
-            //Resizable = false;
-        }
+    /// <summary>
+    /// Initializes a new instance of the <see cref="T:ClickableLabelMaterial"/> class.
+    /// </summary>
+    /// <param name="text">The text.</param>
+    public ClickableLabelMaterial(string text) : base(text) { }
 
-        /// <summary>
-        /// Initializes a new instance of the <see cref="T:ClickableLabelMaterial"/> class.
-        /// </summary>
-        /// <param name="text">The text.</param>
-        public ClickableLabelMaterial(string text) : base(text) { }
-        
-        #endregion
+    #endregion
 
-        #region Methods
+    #region Methods
 
-        private void RaiseOnClicked()
-        {
-            if (OnClick != null)
-                OnClick(this, EventArgs.Empty);
-        }
+    private void RaiseOnClicked() {
+      if (OnClick != null)
+        OnClick(this, EventArgs.Empty);
+    }
 
-        #region IMouseListener Members
-        /// <summary>
-        /// Gets the service object of the specified type.
-        /// </summary>
-        /// <param name="serviceType">An object that specifies the type of service object to get.</param>
-        /// <returns>
-        /// A service object of type serviceType.-or- null if there is no service object of type serviceType.
-        /// </returns>
-        public override object GetService(Type serviceType)
-        {
-            if (serviceType.Equals(typeof(IMouseListener)))
-                return this;
-            else if (serviceType.Equals(typeof(IHoverListener)))
-                return this;
-            else
-                return null;
-        }
+    #region IMouseListener Members
+    /// <summary>
+    /// Gets the service object of the specified type.
+    /// </summary>
+    /// <param name="serviceType">An object that specifies the type of service object to get.</param>
+    /// <returns>
+    /// A service object of type serviceType.-or- null if there is no service object of type serviceType.
+    /// </returns>
+    public override object GetService(Type serviceType) {
+      if (serviceType.Equals(typeof(IMouseListener)))
+        return this;
+      else if (serviceType.Equals(typeof(IHoverListener)))
+        return this;
+      else
+        return null;
+    }
 
-        /// <summary>
-        /// Handles the mouse-down event
-        /// </summary>
-        /// <param name="e">The <see cref="T:MouseEventArgs"/> instance containing the event data.</param>
-        public virtual bool MouseDown(MouseEventArgs e)
-        {
-            if (this.Rectangle.Contains(e.Location))
-            {
-                if (mUrl.Length > 0)
-                    Process.Start(mUrl);
-                RaiseOnClicked();
-                return true;//let the rest of the loop go, the event was handled
-            }
-            return false;
-        }
+    /// <summary>
+    /// Handles the mouse-down event
+    /// </summary>
+    /// <param name="e">The <see cref="T:MouseEventArgs"/> instance containing the event data.</param>
+    public virtual bool MouseDown(MouseEventArgs e) {
+      if (this.Rectangle.Contains(e.Location)) {
+        if (mUrl.Length > 0)
+          Process.Start(mUrl);
+        RaiseOnClicked();
+        return true;//let the rest of the loop go, the event was handled
+      }
+      return false;
+    }
 
-        /// <summary>
-        /// Handles the mouse-move event
-        /// </summary>
-        /// <param name="e">The <see cref="T:MouseEventArgs"/> instance containing the event data.</param>
-        public void MouseMove(MouseEventArgs e)
-        {
-            System.Diagnostics.Trace.WriteLine(e.Location.ToString());
-        }
+    /// <summary>
+    /// Handles the mouse-move event
+    /// </summary>
+    /// <param name="e">The <see cref="T:MouseEventArgs"/> instance containing the event data.</param>
+    public void MouseMove(MouseEventArgs e) {
+      System.Diagnostics.Trace.WriteLine(e.Location.ToString());
+    }
 
-        /// <summary>
-        /// Handles the mouse-up event
-        /// </summary>
-        /// <param name="e">The <see cref="T:MouseEventArgs"/> instance containing the event data.</param>
-        public virtual void MouseUp(MouseEventArgs e)
-        {
+    /// <summary>
+    /// Handles the mouse-up event
+    /// </summary>
+    /// <param name="e">The <see cref="T:MouseEventArgs"/> instance containing the event data.</param>
+    public virtual void MouseUp(MouseEventArgs e) {
 
-        }
+    }
 
-        #endregion
+    #endregion
 
-        #region IHoverListener Members
-        /// <summary>
-        /// Handles the <see cref="OnMouseHover"/> event.
-        /// </summary>
-        /// <param name="e">The <see cref="T:System.Windows.Forms.MouseEventArgs"/> instance containing the event data.</param>
-        public void MouseHover(MouseEventArgs e)
-        {
-           
-        }
-        private Cursor previousCursor;
+    #region IHoverListener Members
+    /// <summary>
+    /// Handles the <see cref="OnMouseHover"/> event.
+    /// </summary>
+    /// <param name="e">The <see cref="T:System.Windows.Forms.MouseEventArgs"/> instance containing the event data.</param>
+    public void MouseHover(MouseEventArgs e) {
 
-        /// <summary>
-        /// Handles the OnMouseEnter event.
-        /// </summary>
-        /// <param name="e">The <see cref="T:System.Windows.Forms.MouseEventArgs"/> instance containing the event data.</param>
-        public void MouseEnter(MouseEventArgs e)
-        {
-                previousCursor = Cursor.Current;                
-                this.Shape.Model.RaiseOnCursorChange(Cursors.Hand);
-        }
+    }
+    private Cursor previousCursor;
 
-        /// <summary>
-        /// Handles the OnMouseLeave event.
-        /// </summary>
-        /// <param name="e">The <see cref="T:System.Windows.Forms.MouseEventArgs"/> instance containing the event data.</param>
-        public void MouseLeave(MouseEventArgs e)
-        {
-            this.Shape.Model.RaiseOnCursorChange(previousCursor);
-        }
+    /// <summary>
+    /// Handles the OnMouseEnter event.
+    /// </summary>
+    /// <param name="e">The <see cref="T:System.Windows.Forms.MouseEventArgs"/> instance containing the event data.</param>
+    public void MouseEnter(MouseEventArgs e) {
+      previousCursor = Cursor.Current;
+      this.Shape.Model.RaiseOnCursorChange(Cursors.Hand);
+    }
 
-        //public override void Paint(Graphics g)
-        //{
-        //    g.DrawRectangle(Pens.Violet, Rectangle);
-        //    base.Paint(g);
-        //}
-        #endregion            
-        #endregion
+    /// <summary>
+    /// Handles the OnMouseLeave event.
+    /// </summary>
+    /// <param name="e">The <see cref="T:System.Windows.Forms.MouseEventArgs"/> instance containing the event data.</param>
+    public void MouseLeave(MouseEventArgs e) {
+      this.Shape.Model.RaiseOnCursorChange(previousCursor);
     }
+
+    //public override void Paint(Graphics g)
+    //{
+    //    g.DrawRectangle(Pens.Violet, Rectangle);
+    //    base.Paint(g);
+    //}
+    #endregion
+    #endregion
+  }
 }
Index: /trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.Netron/3.0.2672.12446/Netron.Diagramming.Core-3.0.2672.12446/Diagram elements/Materials/FolderMaterial.cs
===================================================================
--- /trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.Netron/3.0.2672.12446/Netron.Diagramming.Core-3.0.2672.12446/Diagram elements/Materials/FolderMaterial.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.Netron/3.0.2672.12446/Netron.Diagramming.Core-3.0.2672.12446/Diagram elements/Materials/FolderMaterial.cs	(revision 4068)
@@ -1,706 +1,633 @@
 using System;
-using System.Windows.Forms;
-using System.Collections.Generic;
-using System.Text;
+using System.ComponentModel;
 using System.Drawing;
-using System.ComponentModel.Design;
-using System.ComponentModel;
 using System.Drawing.Design;
 using System.Drawing.Drawing2D;
-namespace Netron.Diagramming.Core
-{
-    /// <summary>
-    /// This material holds other shape material entries which can be 
-    /// collapsed or expanded like a tree-node or folder.
-    /// </summary>
-    public partial class FolderMaterial : 
-        ShapeMaterialBase, 
-        IMouseListener, 
-        IHoverListener
-    {
-        #region Constants
-        /// <summary>
-        /// the height of the entries
-        /// </summary>
-        public const int ItemHeight = 16; 
-        /// <summary>
-        /// the height of the folder header
-        /// </summary>
-        public const int HeaderHeight = 16;
-        /// <summary>
-        /// the vertical spacing between entries
-        /// </summary>
-        public const int ItemSpacing = 1;
-        /// <summary>
-        /// the horizontal shift between the plusminus icon and the header
-        /// </summary>
-        public const int HeaderSpacing = 4;
-        #endregion
-
-        #region Events
-        /// <summary>
-        /// Occurs when the state of this folder has changed; on collasping or expanding the entries this folder contains.
-        /// </summary>
-        public event EventHandler<RectangleEventArgs> OnFolderChanged;
-        #endregion
-
-        #region Fields
-
-        // ------------------------------------------------------------------
-        /// <summary>
-        /// Implementation of IVersion - the current version of 
-        /// FolderMaterial.
-        /// </summary>
-        // ------------------------------------------------------------------
-        protected double folderMaterialVersion = 1.0;
-
-        /// <summary>
-        /// the Text field
-        /// </summary>
-        protected string mText;
-
-        /// <summary>
-        /// volatile pointer to a hovered material
-        /// </summary>
-        protected IHoverListener currentHoveredMaterial = null;
-
-        /// <summary>
-        /// the width of the individual items
-        /// </summary>
-        protected int itemWidth = 100;
-
-        /// <summary>
-        /// the collection of material entries
-        /// </summary>
-        protected CollectionBase<IShapeMaterial> mEntries;
-
-        /// <summary>
-        /// the plus/minus icon to collapse expand the items
-        /// </summary>
-        protected SwitchIconMaterial plusminus;
-
-        /// <summary>
-        /// the header of the folder
-        /// </summary>
-        protected ClickableLabelMaterial header;
-
-        /// <summary>
-        /// whether the folder is collapsed
-        /// </summary>
-        protected bool mCollapsed = true;
-
-        /// <summary>
-        /// the ShowLines field
-        /// </summary>
-        protected bool mShowLines = true;
-
-        #endregion
-
-        #region Properties
-
-        // ------------------------------------------------------------------
-        /// <summary>
-        /// Gets the current version.
-        /// </summary>
-        // ------------------------------------------------------------------
-        public override double Version
-        {
-            get
+using System.Windows.Forms;
+namespace Netron.Diagramming.Core {
+  /// <summary>
+  /// This material holds other shape material entries which can be 
+  /// collapsed or expanded like a tree-node or folder.
+  /// </summary>
+  public partial class FolderMaterial :
+      ShapeMaterialBase,
+      IMouseListener,
+      IHoverListener {
+    #region Constants
+    /// <summary>
+    /// the height of the entries
+    /// </summary>
+    public const int ItemHeight = 16;
+    /// <summary>
+    /// the height of the folder header
+    /// </summary>
+    public const int HeaderHeight = 16;
+    /// <summary>
+    /// the vertical spacing between entries
+    /// </summary>
+    public const int ItemSpacing = 1;
+    /// <summary>
+    /// the horizontal shift between the plusminus icon and the header
+    /// </summary>
+    public const int HeaderSpacing = 4;
+    #endregion
+
+    #region Events
+    /// <summary>
+    /// Occurs when the state of this folder has changed; on collasping or expanding the entries this folder contains.
+    /// </summary>
+    public event EventHandler<RectangleEventArgs> OnFolderChanged;
+    #endregion
+
+    #region Fields
+
+    // ------------------------------------------------------------------
+    /// <summary>
+    /// Implementation of IVersion - the current version of 
+    /// FolderMaterial.
+    /// </summary>
+    // ------------------------------------------------------------------
+    protected double folderMaterialVersion = 1.0;
+
+    /// <summary>
+    /// the Text field
+    /// </summary>
+    protected string mText;
+
+    /// <summary>
+    /// volatile pointer to a hovered material
+    /// </summary>
+    protected IHoverListener currentHoveredMaterial = null;
+
+    /// <summary>
+    /// the width of the individual items
+    /// </summary>
+    protected int itemWidth = 100;
+
+    /// <summary>
+    /// the collection of material entries
+    /// </summary>
+    protected CollectionBase<IShapeMaterial> mEntries;
+
+    /// <summary>
+    /// the plus/minus icon to collapse expand the items
+    /// </summary>
+    protected SwitchIconMaterial plusminus;
+
+    /// <summary>
+    /// the header of the folder
+    /// </summary>
+    protected ClickableLabelMaterial header;
+
+    /// <summary>
+    /// whether the folder is collapsed
+    /// </summary>
+    protected bool mCollapsed = true;
+
+    /// <summary>
+    /// the ShowLines field
+    /// </summary>
+    protected bool mShowLines = true;
+
+    #endregion
+
+    #region Properties
+
+    // ------------------------------------------------------------------
+    /// <summary>
+    /// Gets the current version.
+    /// </summary>
+    // ------------------------------------------------------------------
+    public override double Version {
+      get {
+        return folderMaterialVersion;
+      }
+    }
+
+    /// <summary>
+    /// Gets or sets the text style for all nodes.
+    /// </summary>
+    public override ITextStyle TextStyle {
+      get {
+        return base.TextStyle;
+      }
+      set {
+        base.TextStyle = value;
+        header.TextStyle = myTextStyle;
+        myTextStyle.TextStyleChanged +=
+            new TextStyleChangedEventHandler(
+            HandleTextStyleChanged);
+
+        foreach (IShapeMaterial matl in Entries) {
+          matl.TextStyle = value;
+        }
+      }
+    }
+
+    /// <summary>
+    /// Gets or sets whether the connecting line between nodes is desplayed.
+    /// </summary>
+    public bool ShowLines {
+      get { return mShowLines; }
+      set { mShowLines = value; }
+    }
+    /// <summary>
+    /// Gets or sets the Shape
+    /// </summary>
+    /// <value></value>
+    public override IShape Shape {
+      get {
+        return base.Shape;
+      }
+      set {
+        base.Shape = value;
+        plusminus.Shape = value;
+        header.Shape = value;
+        //have to go one level deeper than the normal material here
+        foreach (IShapeMaterial material in mEntries) {
+          material.Shape = value;
+        }
+      }
+    }
+    /// <summary>
+    /// Gets or sets the text or name of the folder
+    /// </summary>
+    public string Text {
+      get { return header.Text; }
+      set { header.Text = value; }
+    }
+    /// <summary>
+    /// Gets the entries.
+    /// </summary>
+    /// <value>The entries.</value>
+    [Editor(typeof(ShapeMaterialCollectionEditor<IconLabelMaterial>), typeof(UITypeEditor))]
+    public CollectionBase<IShapeMaterial> Entries {
+      get {
+        return mEntries;
+      }
+      internal set { mEntries = value; }
+    }
+
+    /// <summary>
+    /// Gets if the root node is collapsed.
+    /// </summary>
+    public bool IsCollapsed {
+      get {
+        return mCollapsed;
+      }
+      set {
+        mCollapsed = value;
+        plusminus.Collapsed = value;
+      }
+    }
+    #endregion
+
+    #region Constructor
+    ///<summary>
+    ///Default constructor
+    ///</summary>
+    public FolderMaterial(string title)
+      : base() {
+      myTextStyle = new TextStyle(
+          Color.Black,
+          new Font("Arial", 10),
+          StringAlignment.Near,
+          StringAlignment.Near);
+      mEntries = new CollectionBase<IShapeMaterial>();
+      mEntries.OnItemAdded +=
+          new EventHandler<CollectionEventArgs<IShapeMaterial>>(
+          mEntries_OnItemAdded);
+
+      Gliding = false;
+      Resizable = true;
+
+      plusminus = new SwitchIconMaterial(SwitchIconType.PlusMinus);
+      plusminus.TextStyle = myTextStyle;
+      plusminus.Transform(new Rectangle(0, 0, 16, 16));
+      plusminus.Visible = true;
+      plusminus.Gliding = false;
+      plusminus.OnExpand += new EventHandler(plusminus_OnExpand);
+      plusminus.OnCollapse += new EventHandler(plusminus_OnCollapse);
+
+
+      header = new ClickableLabelMaterial();
+      header.TextStyle = myTextStyle;
+      header.Transform(new Rectangle(0, 0, 100, HeaderHeight));
+      header.Text = title;
+      header.Gliding = false;
+      header.Visible = true;
+      header.Resizable = true;
+    }
+
+    /// <summary>
+    /// Initializes a new instance of the <see cref="T:FolderMaterial"/> class.
+    /// </summary>
+    /// <param name="title">The title.</param>
+    /// <param name="entries">The entries.</param>
+    public FolderMaterial(string title, string[] entries)
+      : this(title) {
+      myTextStyle = new TextStyle(
+          Color.Black,
+          new Font("Arial", 10),
+          StringAlignment.Near,
+          StringAlignment.Near);
+      IconLabelMaterial label;
+      for (int k = 0; k < entries.Length; k++) {
+        label = new IconLabelMaterial("Resources.Text.png", entries[k]);
+
+        // We attach our ITextStyle to items when they're added to the
+        // collection.
+        mEntries.Add(label);
+      }
+      Collapse();
+    }
+
+    /// <summary>
+    /// Initializes a new instance of the <see cref="T:FolderMaterial"/> class.
+    /// </summary>
+    /// <param name="title">The title.</param>
+    /// <param name="entries">The entries.</param>
+    /// <param name="defaultIconLocation">The default icon location.</param>
+    public FolderMaterial(
+        string title,
+        string[] entries,
+        string defaultIconLocation)
+      : this(title) {
+      IconLabelMaterial label;
+      myTextStyle = new TextStyle(
+           Color.Black,
+           new Font("Arial", 10),
+           StringAlignment.Near,
+           StringAlignment.Near);
+
+      for (int k = 0; k < entries.Length; k++) {
+        label = new IconLabelMaterial(entries[k], defaultIconLocation);
+        mEntries.Add(label);
+      }
+      Collapse();
+
+      myTextStyle.TextStyleChanged +=
+          new TextStyleChangedEventHandler(HandleTextStyleChanged);
+    }
+
+    // ------------------------------------------------------------------
+    /// <summary>
+    /// Called when our TextStyle has changed, each item in our mEntries
+    /// is updated.
+    /// </summary>
+    /// <param name="sender">object</param>
+    /// <param name="e">TextStyleChangedEventArgs</param>
+    // ------------------------------------------------------------------
+    protected virtual void HandleTextStyleChanged(
+        object sender,
+        TextStyleChangedEventArgs e) {
+      header.TextStyle = myTextStyle;
+      foreach (IShapeMaterial item in mEntries) {
+        item.TextStyle = myTextStyle;
+      }
+    }
+
+
+    #endregion
+
+    #region Methods
+    /// <summary>
+    /// Recalculates and initializes things when an entry has been added.
+    /// </summary>
+    /// <param name="sender">The sender.</param>
+    /// <param name="e">The e.</param>
+    protected virtual void mEntries_OnItemAdded(
+        object sender,
+        CollectionEventArgs<IShapeMaterial> e) {
+      e.Item.Shape = this.Shape;
+      e.Item.TextStyle = myTextStyle;
+      Transform(this.Rectangle);//simply recalculate with the same base rectangle
+      //notify the hierarchy
+      RaiseOnFolderChanged(new RectangleEventArgs(Rectangle));
+      e.Item.Visible = !mCollapsed;
+
+    }
+
+    // ------------------------------------------------------------------
+    /// <summary>
+    /// Calculates the size needed to fit all items for the specified
+    /// GDI+ drawing surface.
+    /// </summary>
+    /// <param name="g"></param>
+    /// <returns></returns>
+    // ------------------------------------------------------------------
+    public override Size CalculateMinSize(Graphics g) {
+      // When collapsed, the only thing drawn is the header (root node).
+      Size minSizeNeeded = header.CalculateMinSize(g);
+      Size plusMinusSize;
+      Size materialSize;
+      int linesLength = 0;  // The lenght of the lines that are drawn
+      // connecting the folders.
+
+      int padding = 20;  // Accounts for the spacing around materials.
+
+      if (mShowLines) {
+        // 7 for the lines themselves, another 7 for the space between
+        // the line and the material.
+        linesLength = 14;
+      }
+
+      if (minSizeNeeded == Size.Empty) {
+        minSizeNeeded = new Size(1, 1);
+      } else {
+        // Account for the padding around the header.
+        minSizeNeeded.Height += (padding / 2);
+        minSizeNeeded.Width += padding;
+      }
+
+      // The plus-minus icon is placed to the left of the header text,
+      // so it's width gets added to the current min size.
+      if (plusminus != null) {
+        plusMinusSize = plusminus.CalculateMinSize(g);
+
+        if (plusMinusSize != Size.Empty) {
+          plusMinusSize.Width += linesLength;
+          plusMinusSize.Width += padding;
+
+          minSizeNeeded.Width += plusMinusSize.Width;
+
+          if (plusMinusSize.Height > minSizeNeeded.Height) {
+            minSizeNeeded.Height = plusMinusSize.Height;
+          }
+        }
+      }
+
+      foreach (IShapeMaterial matl in Entries) {
+        if (matl.Visible) {
+          materialSize = matl.CalculateMinSize(g);
+          if (materialSize != Size.Empty) {
+            materialSize.Width += linesLength;
+            materialSize.Width += padding;
+            if (materialSize.Width > minSizeNeeded.Width) {
+              minSizeNeeded.Width = materialSize.Width;
+            }
+            minSizeNeeded.Height += materialSize.Height + 3;
+          }
+        }
+      }
+
+      return minSizeNeeded;
+    }
+
+    /// <summary>
+    /// Handles the OnExpand event of the plusminus control.
+    /// </summary>
+    /// <param name="sender">The source of the event.</param>
+    /// <param name="e">The <see cref="T:System.EventArgs"/> instance containing the event data.</param>
+    protected virtual void plusminus_OnExpand(
+        object sender,
+        EventArgs e) {
+      Expand();
+    }
+    /// <summary>
+    /// Handles the OnCollapse event of the plusminus control.
+    /// </summary>
+    /// <param name="sender">The source of the event.</param>
+    /// <param name="e">The <see cref="T:System.EventArgs"/> instance containing the event data.</param>
+    protected virtual void plusminus_OnCollapse(
+        object sender,
+        EventArgs e) {
+      Collapse();
+    }
+    /// <summary>
+    /// Gets the service object of the specified type.
+    /// </summary>
+    /// <param name="serviceType">An object that specifies the type of service object to get.</param>
+    /// <returns>
+    /// A service object of type serviceType.-or- null if there is no service object of type serviceType.
+    /// </returns>
+    public override object GetService(Type serviceType) {
+      if (serviceType.Equals(typeof(IMouseListener)))
+        return this;
+      else if (serviceType.Equals(typeof(IHoverListener)))
+        return this;
+      else
+        return null;
+    }
+    /// <summary>
+    /// Expands the items.
+    /// </summary>
+    public virtual void Expand() {
+      mCollapsed = false;
+      foreach (IShapeMaterial material in mEntries) {
+        material.Visible = true;
+      }
+
+      Transform(Rectangle);
+      RaiseOnFolderChanged(new RectangleEventArgs(Rectangle));
+    }
+    /// <summary>
+    /// Collapses the items.
+    /// </summary>
+    public virtual void Collapse() {
+      mCollapsed = true;
+
+      foreach (IShapeMaterial material in mEntries) {
+        material.Visible = false;
+      }
+
+      Transform(Rectangle);
+
+      RaiseOnFolderChanged(new RectangleEventArgs(Rectangle));
+    }
+    /// <summary>
+    /// Transforms the specified rectangle.
+    /// </summary>
+    /// <param name="rectangle">The rectangle of the COLLAPSED FOLDER!
+    /// </param>
+    public override void Transform(Rectangle rectangle) {
+      //IMPORTANT: the rectangle given as the transformation parameter 
+      // is supposed to be the rectangle of the collapsed folder!
+
+      itemWidth = rectangle.Width - plusminus.Rectangle.Width - HeaderSpacing;
+      //shift the plusminus icon
+      plusminus.Transform(new Rectangle(rectangle.Location, plusminus.Rectangle.Size));
+      //header
+      header.Transform(new Rectangle(rectangle.Location.X + plusminus.Rectangle.Width + 10, rectangle.Location.Y, itemWidth, header.Rectangle.Height));
+      //transform the entries
+      int k = 0;
+      foreach (IShapeMaterial material in mEntries) {
+        material.Transform(new Rectangle(rectangle.X + plusminus.Rectangle.Width + 10, rectangle.Y + HeaderHeight + 7 + k * (ItemHeight + ItemSpacing), itemWidth, ItemHeight));
+        k++;
+      }
+
+      if (mCollapsed)
+        base.Transform(new Rectangle(rectangle.X, rectangle.Y, rectangle.Width, HeaderHeight));
+      else
+        base.Transform(new Rectangle(rectangle.X, rectangle.Y, rectangle.Width, HeaderHeight + ItemSpacing + mEntries.Count * (ItemSpacing + ItemHeight)));
+    }
+    /// <summary>
+    /// Raises the OnFolderChanged event.
+    /// </summary>
+    /// <param name="e">The <see cref="T:Netron.Diagramming.Core.RectangleEventArgs"/> instance containing the event data.</param>
+    protected virtual void RaiseOnFolderChanged(RectangleEventArgs e) {
+      EventHandler<RectangleEventArgs> handler = OnFolderChanged;
+      if (handler != null) {
+        handler(this, e);
+      }
+    }
+    /// <summary>
+    /// Paints the entity using the given graphics object
+    /// </summary>
+    /// <param name="g"></param>
+    public override void Paint(System.Drawing.Graphics g) {
+      if (!Visible) return;
+
+      //g.DrawRectangle(Pens.OrangeRed, Rectangle);
+      GraphicsContainer cto = g.BeginContainer();
+      g.SetClip(Shape.Rectangle);
+      plusminus.Paint(g);
+      header.Paint(g);
+      if (!mCollapsed && mShowLines) {
+        g.DrawLine(
+            ArtPalette.FolderLinesPen,
+            Rectangle.X + 7,
+            plusminus.Rectangle.Bottom,
+            Rectangle.X + 7,
+            plusminus.Rectangle.Bottom + mEntries.Count * (ItemHeight + ItemSpacing));
+      }
+      int k = 1;
+      foreach (IShapeMaterial material in mEntries) {
+        material.Paint(g);
+        if (!mCollapsed && mShowLines) {
+          g.DrawLine(
+              ArtPalette.FolderLinesPen,
+              Rectangle.X + 7,
+              plusminus.Rectangle.Bottom + k * (ItemHeight + ItemSpacing),
+              Rectangle.X + 16,
+              plusminus.Rectangle.Bottom + k * (ItemHeight + ItemSpacing));
+          k++;
+        }
+      }
+      g.EndContainer(cto);
+    }
+    /// <summary>
+    /// Handles the mouse-down event
+    /// </summary>
+    /// <param name="e">The <see cref="T:MouseEventArgs"/> instance containing the event data.</param>
+    public virtual bool MouseDown(MouseEventArgs e) {
+
+      if (header.Rectangle.Contains(e.Location)) {
+        header.MouseDown(e);
+        return true;
+      }
+      if (plusminus.Rectangle.Contains(e.Location)) {
+        plusminus.MouseDown(e);
+        return true;
+      }
+
+      if (mCollapsed) return false;
+      IMouseListener listener;
+      foreach (IShapeMaterial material in Entries) {
+        if (material.Rectangle.Contains(e.Location)) {
+          listener = material.GetService(typeof(IMouseListener)) as IMouseListener;
+          if (listener != null)
+            if (listener.MouseDown(e))
+              return true;
+        }
+
+      }
+      return false;
+    }
+    /// <summary>
+    /// Handles the mouse-move event
+    /// </summary>
+    /// <param name="e">The <see cref="T:MouseEventArgs"/> instance containing the event data.</param>
+    public virtual void MouseMove(MouseEventArgs e) {
+      //System.Diagnostics.Trace.WriteLine(e.Location.ToString());
+    }
+    /// <summary>
+    /// Handles the mouse-up event
+    /// </summary>
+    /// <param name="e">The <see cref="T:MouseEventArgs"/> instance containing the event data.</param>
+    public virtual void MouseUp(MouseEventArgs e) {
+
+    }
+    #region IHoverListener Members
+    /// <summary>
+    /// <see cref="IHoverListener"/> implementation
+    /// </summary>
+    /// <param name="e">The <see cref="T:System.Windows.Forms.MouseEventArgs"/> instance containing the event data.</param>
+    public virtual void MouseHover(MouseEventArgs e) {
+      if (header.Rectangle.Contains(e.Location)) {
+        HoverEntity(e, header);
+        return;
+      }
+      if (plusminus.Rectangle.Contains(e.Location)) {
+        HoverEntity(e, plusminus);
+        return;
+      }
+
+      if (!mCollapsed) //no need to check the rest if the folder is collapsed!
             {
-                return folderMaterialVersion;
-            }
-        }
-
-        /// <summary>
-        /// Gets or sets the text style for all nodes.
-        /// </summary>
-        public override ITextStyle TextStyle
-        {
-            get
+        IHoverListener listener;
+
+        foreach (IShapeMaterial material in this.Entries) {
+          if (material.Rectangle.Contains(e.Location)) //we caught an material
+                    {
+            listener = HoverEntity(e, material);
+            return; //only one material at a time
+          }
+
+        }
+      }
+      if (currentHoveredMaterial != null) {
+        currentHoveredMaterial.MouseLeave(e);
+        currentHoveredMaterial = null;
+      }
+
+    }
+    protected virtual IHoverListener HoverEntity(
+        MouseEventArgs e,
+        IShapeMaterial material) {
+      IHoverListener listener;
+      listener = material.GetService(typeof(IHoverListener)) as IHoverListener;
+      if (listener != null) //the caught material does listen
             {
-                return base.TextStyle;
-            }
-            set
+        if (currentHoveredMaterial == listener) //it's the same as the previous time
+          listener.MouseHover(e);
+        else //we moved from one material to another listening material
+                {
+          if (currentHoveredMaterial != null) //tell the previous material we are leaving
+            currentHoveredMaterial.MouseLeave(e);
+          listener.MouseEnter(e); //tell the current one we enter
+          currentHoveredMaterial = listener;
+        }
+      } else //the caught material does not listen
             {
-                base.TextStyle = value;
-                header.TextStyle = myTextStyle;
-                myTextStyle.TextStyleChanged += 
-                    new TextStyleChangedEventHandler(
-                    HandleTextStyleChanged);
-
-                foreach (IShapeMaterial matl in Entries)
-                {
-                    matl.TextStyle = value;
-                }
-            }
-        }
-        
-        /// <summary>
-        /// Gets or sets whether the connecting line between nodes is desplayed.
-        /// </summary>
-        public bool ShowLines
-        {
-            get { return mShowLines; }
-            set { mShowLines = value; }
-        }
-        /// <summary>
-        /// Gets or sets the Shape
-        /// </summary>
-        /// <value></value>
-        public override IShape Shape
-        {
-            get
-            {
-                return base.Shape;
-            }
-            set
-            {
-                base.Shape = value;
-                plusminus.Shape = value;
-                header.Shape = value;
-                //have to go one level deeper than the normal material here
-                foreach (IShapeMaterial material in mEntries)
-                {
-                    material.Shape = value;
-                }
-            }
-        }
-        /// <summary>
-        /// Gets or sets the text or name of the folder
-        /// </summary>
-        public string Text
-        {
-            get { return header.Text; }
-            set { header.Text = value; }
-        }
-        /// <summary>
-        /// Gets the entries.
-        /// </summary>
-        /// <value>The entries.</value>
-        [Editor(typeof(ShapeMaterialCollectionEditor<IconLabelMaterial>), typeof(UITypeEditor))] 
-        public CollectionBase<IShapeMaterial> Entries
-        {
-            get
-            {
-                return mEntries;
-            }
-            internal set { mEntries = value; }
-        }
-
-        /// <summary>
-        /// Gets if the root node is collapsed.
-        /// </summary>
-        public bool IsCollapsed
-        {
-            get
-            {
-                return mCollapsed;
-            }
-            set
-            {
-                mCollapsed = value;
-                plusminus.Collapsed = value;
-            }
-        }
-        #endregion
-
-        #region Constructor
-        ///<summary>
-        ///Default constructor
-        ///</summary>
-        public FolderMaterial(string title) : base()
-        {
-            myTextStyle = new TextStyle(
-                Color.Black,
-                new Font("Arial", 10),
-                StringAlignment.Near,
-                StringAlignment.Near);
-            mEntries = new CollectionBase<IShapeMaterial>();
-            mEntries.OnItemAdded += 
-                new EventHandler<CollectionEventArgs<IShapeMaterial>>(
-                mEntries_OnItemAdded);
-
-            Gliding = false;
-            Resizable = true;
-
-            plusminus = new SwitchIconMaterial(SwitchIconType.PlusMinus);
-            plusminus.TextStyle = myTextStyle;
-            plusminus.Transform(new Rectangle(0, 0, 16, 16));            
-            plusminus.Visible = true;
-            plusminus.Gliding = false;
-            plusminus.OnExpand += new EventHandler(plusminus_OnExpand);
-            plusminus.OnCollapse += new EventHandler(plusminus_OnCollapse);
-
-
-            header = new ClickableLabelMaterial();
-            header.TextStyle = myTextStyle;
-            header.Transform(new Rectangle(0, 0, 100, HeaderHeight));
-            header.Text = title;
-            header.Gliding = false;
-            header.Visible = true;
-            header.Resizable = true;
-        }     
-        
-        /// <summary>
-        /// Initializes a new instance of the <see cref="T:FolderMaterial"/> class.
-        /// </summary>
-        /// <param name="title">The title.</param>
-        /// <param name="entries">The entries.</param>
-        public FolderMaterial(string title, string[] entries)
-            : this(title)
-        {
-            myTextStyle = new TextStyle(
-                Color.Black,
-                new Font("Arial", 10),
-                StringAlignment.Near,
-                StringAlignment.Near);
-            IconLabelMaterial label;
-            for (int k = 0; k < entries.Length; k++)
-            {
-                label = new IconLabelMaterial("Resources.Text.png" ,entries[k]);
-
-                // We attach our ITextStyle to items when they're added to the
-                // collection.
-                mEntries.Add(label);
-            }
-            Collapse();
-        }
-
-        /// <summary>
-        /// Initializes a new instance of the <see cref="T:FolderMaterial"/> class.
-        /// </summary>
-        /// <param name="title">The title.</param>
-        /// <param name="entries">The entries.</param>
-        /// <param name="defaultIconLocation">The default icon location.</param>
-        public FolderMaterial(
-            string title, 
-            string[] entries, 
-            string defaultIconLocation)
-            : this(title)
-        {
-            IconLabelMaterial label; 
-            myTextStyle = new TextStyle(
-                 Color.Black,
-                 new Font("Arial", 10),
-                 StringAlignment.Near,
-                 StringAlignment.Near);
-
-            for (int k = 0; k < entries.Length; k++)
-            {
-                label = new IconLabelMaterial(entries[k], defaultIconLocation);
-                mEntries.Add(label);
-            }
-            Collapse();
-
-            myTextStyle.TextStyleChanged +=
-                new TextStyleChangedEventHandler(HandleTextStyleChanged);
-        }
-
-        // ------------------------------------------------------------------
-        /// <summary>
-        /// Called when our TextStyle has changed, each item in our mEntries
-        /// is updated.
-        /// </summary>
-        /// <param name="sender">object</param>
-        /// <param name="e">TextStyleChangedEventArgs</param>
-        // ------------------------------------------------------------------
-        protected virtual void HandleTextStyleChanged(
-            object sender, 
-            TextStyleChangedEventArgs e)
-        {
-            header.TextStyle = myTextStyle;
-            foreach (IShapeMaterial item in mEntries)
-            {
-                item.TextStyle = myTextStyle;
-            }
-        }
-
-        
-        #endregion
-  
-        #region Methods
-        /// <summary>
-        /// Recalculates and initializes things when an entry has been added.
-        /// </summary>
-        /// <param name="sender">The sender.</param>
-        /// <param name="e">The e.</param>
-        protected virtual void mEntries_OnItemAdded(
-            object sender, 
-            CollectionEventArgs<IShapeMaterial> e)
-        {
-            e.Item.Shape = this.Shape;
-            e.Item.TextStyle = myTextStyle;
-            Transform(this.Rectangle);//simply recalculate with the same base rectangle
-            //notify the hierarchy
-            RaiseOnFolderChanged(new RectangleEventArgs(Rectangle));            
-            e.Item.Visible = !mCollapsed;
-            
-        }
-
-        // ------------------------------------------------------------------
-        /// <summary>
-        /// Calculates the size needed to fit all items for the specified
-        /// GDI+ drawing surface.
-        /// </summary>
-        /// <param name="g"></param>
-        /// <returns></returns>
-        // ------------------------------------------------------------------
-        public override Size CalculateMinSize(Graphics g)
-        {
-            // When collapsed, the only thing drawn is the header (root node).
-            Size minSizeNeeded = header.CalculateMinSize(g);
-            Size plusMinusSize;
-            Size materialSize;
-            int linesLength = 0;  // The lenght of the lines that are drawn
-                                // connecting the folders.
-
-            int padding = 20;  // Accounts for the spacing around materials.
-
-            if (mShowLines)
-            {
-                // 7 for the lines themselves, another 7 for the space between
-                // the line and the material.
-                linesLength = 14;
-            }
-
-            if (minSizeNeeded == Size.Empty)
-            {
-                minSizeNeeded = new Size(1, 1);
-            }
-            else
-            {
-                // Account for the padding around the header.
-                minSizeNeeded.Height += (padding / 2);
-                minSizeNeeded.Width += padding;
-            }
-
-            // The plus-minus icon is placed to the left of the header text,
-            // so it's width gets added to the current min size.
-            if (plusminus != null)
-            {
-                plusMinusSize = plusminus.CalculateMinSize(g);
-
-                if (plusMinusSize != Size.Empty)
-                {
-                    plusMinusSize.Width += linesLength;
-                    plusMinusSize.Width += padding;
-
-                    minSizeNeeded.Width += plusMinusSize.Width;
-
-                    if (plusMinusSize.Height > minSizeNeeded.Height)
-                    {
-                        minSizeNeeded.Height = plusMinusSize.Height;
-                    }
-                }
-            }
-
-            foreach (IShapeMaterial matl in Entries)
-            {
-                if (matl.Visible)
-                {
-                    materialSize = matl.CalculateMinSize(g);
-                    if (materialSize != Size.Empty)
-                    {
-                        materialSize.Width += linesLength;
-                        materialSize.Width += padding;
-                        if (materialSize.Width > minSizeNeeded.Width)
-                        {
-                            minSizeNeeded.Width = materialSize.Width;
-                        }
-                        minSizeNeeded.Height += materialSize.Height + 3;
-                    }
-                }
-            }
-
-            return minSizeNeeded;
-        }
-
-        /// <summary>
-        /// Handles the OnExpand event of the plusminus control.
-        /// </summary>
-        /// <param name="sender">The source of the event.</param>
-        /// <param name="e">The <see cref="T:System.EventArgs"/> instance containing the event data.</param>
-        protected virtual void plusminus_OnExpand(
-            object sender, 
-            EventArgs e)
-        {
-            Expand();
-        }
-        /// <summary>
-        /// Handles the OnCollapse event of the plusminus control.
-        /// </summary>
-        /// <param name="sender">The source of the event.</param>
-        /// <param name="e">The <see cref="T:System.EventArgs"/> instance containing the event data.</param>
-        protected virtual void plusminus_OnCollapse(
-            object sender, 
-            EventArgs e)
-        {
-            Collapse();
-        }
-        /// <summary>
-        /// Gets the service object of the specified type.
-        /// </summary>
-        /// <param name="serviceType">An object that specifies the type of service object to get.</param>
-        /// <returns>
-        /// A service object of type serviceType.-or- null if there is no service object of type serviceType.
-        /// </returns>
-        public override object GetService(Type serviceType)
-        {
-            if (serviceType.Equals(typeof(IMouseListener)))
-                return this;
-            else if (serviceType.Equals(typeof(IHoverListener)))
-                return this;
-            else
-                return null;
-        }
-        /// <summary>
-        /// Expands the items.
-        /// </summary>
-        public virtual void Expand()
-        {
-            mCollapsed = false;
-            foreach (IShapeMaterial material in mEntries)
-            {
-                material.Visible = true;
-            }
-
-            Transform(Rectangle);
-            RaiseOnFolderChanged(new RectangleEventArgs(Rectangle));
-        }
-        /// <summary>
-        /// Collapses the items.
-        /// </summary>
-        public virtual void Collapse()
-        {
-            mCollapsed = true;
-            
-            foreach (IShapeMaterial material in mEntries)
-            {
-                material.Visible = false;
-            }
-
-            Transform(Rectangle);
-            
-            RaiseOnFolderChanged(new RectangleEventArgs(Rectangle));
-        }
-        /// <summary>
-        /// Transforms the specified rectangle.
-        /// </summary>
-        /// <param name="rectangle">The rectangle of the COLLAPSED FOLDER!
-        /// </param>
-        public override void Transform(Rectangle rectangle)
-        {
-            //IMPORTANT: the rectangle given as the transformation parameter 
-            // is supposed to be the rectangle of the collapsed folder!
-
-            itemWidth = rectangle.Width - plusminus.Rectangle.Width - HeaderSpacing;
-            //shift the plusminus icon
-            plusminus.Transform(new Rectangle(rectangle.Location, plusminus.Rectangle.Size));
-            //header
-            header.Transform(new Rectangle(rectangle.Location.X + plusminus.Rectangle.Width + 10, rectangle.Location.Y, itemWidth, header.Rectangle.Height));
-            //transform the entries
-            int k = 0;
-            foreach (IShapeMaterial material in mEntries)
-            {                  
-                material.Transform(new Rectangle(rectangle.X + plusminus.Rectangle.Width + 10, rectangle.Y + HeaderHeight + 7 +  k*( ItemHeight + ItemSpacing), itemWidth, ItemHeight));
-                k++;                                                                                                                                                                               
-            }
-
-             if(mCollapsed)
-                base.Transform(new Rectangle(rectangle.X, rectangle.Y, rectangle.Width, HeaderHeight));
-            else
-                base.Transform(new Rectangle(rectangle.X, rectangle.Y, rectangle.Width, HeaderHeight + ItemSpacing + mEntries.Count * (ItemSpacing + ItemHeight)));
-        }
-        /// <summary>
-        /// Raises the OnFolderChanged event.
-        /// </summary>
-        /// <param name="e">The <see cref="T:Netron.Diagramming.Core.RectangleEventArgs"/> instance containing the event data.</param>
-        protected virtual void RaiseOnFolderChanged(RectangleEventArgs e)
-        {
-            EventHandler<RectangleEventArgs> handler = OnFolderChanged;
-            if(handler != null)
-            {
-                handler(this, e);
-            }
-        }
-        /// <summary>
-        /// Paints the entity using the given graphics object
-        /// </summary>
-        /// <param name="g"></param>
-        public override void Paint(System.Drawing.Graphics g)
-        {
-            if (!Visible) return;
-
-            //g.DrawRectangle(Pens.OrangeRed, Rectangle);
-            GraphicsContainer cto = g.BeginContainer();
-            g.SetClip(Shape.Rectangle);
-            plusminus.Paint(g);
-            header.Paint(g);
-            if (!mCollapsed && mShowLines)
-            {
-                g.DrawLine(
-                    ArtPalette.FolderLinesPen, 
-                    Rectangle.X + 7, 
-                    plusminus.Rectangle.Bottom, 
-                    Rectangle.X + 7, 
-                    plusminus.Rectangle.Bottom+ mEntries.Count * (ItemHeight + ItemSpacing));
-            }
-            int k = 1;
-            foreach (IShapeMaterial material in mEntries)
-            {
-                material.Paint(g);
-                if (!mCollapsed && mShowLines)
-                {                      
-                    g.DrawLine(
-                        ArtPalette.FolderLinesPen,
-                        Rectangle.X + 7, 
-                        plusminus.Rectangle.Bottom + k * (ItemHeight + ItemSpacing), 
-                        Rectangle.X + 16, 
-                        plusminus.Rectangle.Bottom + k * (ItemHeight + ItemSpacing));
-                    k++;
-                }
-            }
-            g.EndContainer(cto);
-        }
-        /// <summary>
-        /// Handles the mouse-down event
-        /// </summary>
-        /// <param name="e">The <see cref="T:MouseEventArgs"/> instance containing the event data.</param>
-        public virtual bool MouseDown(MouseEventArgs e)
-        {
-
-            if (header.Rectangle.Contains(e.Location))
-            {
-                header.MouseDown(e);
-                return true;
-            }
-            if (plusminus.Rectangle.Contains(e.Location))
-            {
-                plusminus.MouseDown(e);
-                return true;
-            }
-
-            if (mCollapsed) return false;
-            IMouseListener listener;
-            foreach (IShapeMaterial material in Entries)
-            {
-                if (material.Rectangle.Contains(e.Location))
-                {
-                    listener = material.GetService(typeof(IMouseListener)) as IMouseListener;
-                    if (listener != null)
-                        if (listener.MouseDown(e))
-                            return true;                        
-                }
-
-            }
-            return false;
-        }
-        /// <summary>
-        /// Handles the mouse-move event
-        /// </summary>
-        /// <param name="e">The <see cref="T:MouseEventArgs"/> instance containing the event data.</param>
-        public virtual void MouseMove(MouseEventArgs e)
-        {
-            //System.Diagnostics.Trace.WriteLine(e.Location.ToString());
-        }
-        /// <summary>
-        /// Handles the mouse-up event
-        /// </summary>
-        /// <param name="e">The <see cref="T:MouseEventArgs"/> instance containing the event data.</param>
-        public virtual void MouseUp(MouseEventArgs e)
-        {
-
-        }
-        #region IHoverListener Members
-        /// <summary>
-        /// <see cref="IHoverListener"/> implementation
-        /// </summary>
-        /// <param name="e">The <see cref="T:System.Windows.Forms.MouseEventArgs"/> instance containing the event data.</param>
-        public virtual void MouseHover(MouseEventArgs e)
-        {
-            if (header.Rectangle.Contains(e.Location))
-            {
-                HoverEntity(e, header);
-                return;
-            }
-            if (plusminus.Rectangle.Contains(e.Location))
-            {
-                HoverEntity(e, plusminus);
-                return;
-            }
-
-            if (!mCollapsed) //no need to check the rest if the folder is collapsed!
-            {
-                IHoverListener listener;
-
-                foreach (IShapeMaterial material in this.Entries)
-                {
-                    if (material.Rectangle.Contains(e.Location)) //we caught an material
-                    {
-                        listener = HoverEntity(e, material);
-                        return; //only one material at a time
-                    }
-
-                }
-            }
-            if (currentHoveredMaterial != null)
-            {
-                currentHoveredMaterial.MouseLeave(e);
-                currentHoveredMaterial = null;
-            }
-            
-        }
-        protected virtual IHoverListener HoverEntity(
-            MouseEventArgs e, 
-            IShapeMaterial material)
-        {
-            IHoverListener listener;
-            listener = material.GetService(typeof(IHoverListener)) as IHoverListener;
-            if (listener != null) //the caught material does listen
-            {
-                if (currentHoveredMaterial == listener) //it's the same as the previous time
-                    listener.MouseHover(e);
-                else //we moved from one material to another listening material
-                {
-                    if (currentHoveredMaterial != null) //tell the previous material we are leaving
-                        currentHoveredMaterial.MouseLeave(e);
-                    listener.MouseEnter(e); //tell the current one we enter
-                    currentHoveredMaterial = listener;
-                }
-            }
-            else //the caught material does not listen
-            {
-                if (currentHoveredMaterial != null)
-                {
-                    currentHoveredMaterial.MouseLeave(e);
-                    currentHoveredMaterial = null;
-                }
-            }
-            return listener;
-        }
-
-        /// <summary>
-        /// <see cref="IHoverListener"/> implementation
-        /// </summary>
-        /// <param name="e">The <see cref="T:System.Windows.Forms.MouseEventArgs"/> instance containing the event data.</param>
-        public virtual void MouseEnter(MouseEventArgs e)
-        {
-           
-        }
-        /// <summary>
-        /// <see cref="IHoverListener"/> implementation
-        /// </summary>
-        /// <param name="e">The <see cref="T:System.Windows.Forms.MouseEventArgs"/> instance containing the event data.</param>
-        public virtual void MouseLeave(MouseEventArgs e)
-        {
-            currentHoveredMaterial = null;
-            this.Shape.Model.RaiseOnCursorChange(Cursors.Default);//HACK: should be the cursor before entering into another one
-        }
-
-        #endregion
-        #endregion
-
-    }
-
-   
+        if (currentHoveredMaterial != null) {
+          currentHoveredMaterial.MouseLeave(e);
+          currentHoveredMaterial = null;
+        }
+      }
+      return listener;
+    }
+
+    /// <summary>
+    /// <see cref="IHoverListener"/> implementation
+    /// </summary>
+    /// <param name="e">The <see cref="T:System.Windows.Forms.MouseEventArgs"/> instance containing the event data.</param>
+    public virtual void MouseEnter(MouseEventArgs e) {
+
+    }
+    /// <summary>
+    /// <see cref="IHoverListener"/> implementation
+    /// </summary>
+    /// <param name="e">The <see cref="T:System.Windows.Forms.MouseEventArgs"/> instance containing the event data.</param>
+    public virtual void MouseLeave(MouseEventArgs e) {
+      currentHoveredMaterial = null;
+      this.Shape.Model.RaiseOnCursorChange(Cursors.Default);//HACK: should be the cursor before entering into another one
+    }
+
+    #endregion
+    #endregion
+
+  }
+
+
 }
Index: /trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.Netron/3.0.2672.12446/Netron.Diagramming.Core-3.0.2672.12446/Diagram elements/Materials/IconLabelMaterial.cs
===================================================================
--- /trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.Netron/3.0.2672.12446/Netron.Diagramming.Core-3.0.2672.12446/Diagram elements/Materials/IconLabelMaterial.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.Netron/3.0.2672.12446/Netron.Diagramming.Core-3.0.2672.12446/Diagram elements/Materials/IconLabelMaterial.cs	(revision 4068)
@@ -1,245 +1,214 @@
 using System;
-using System.Reflection;
-using System.Collections.Generic;
-using System.Text;
 using System.Drawing;
+using System.Drawing.Drawing2D;
 using System.IO;
-using System.Drawing.Drawing2D;
-using System.Diagnostics;
-namespace Netron.Diagramming.Core
-{
-    /// <summary>
-    /// Icon shape material without <see cref="IMouseListener"/> service.
-    /// <seealso cref="ClickableIconMaterial"/>
-    /// </summary>
-    public partial class IconLabelMaterial : ShapeMaterialBase
-    {
-
-        /// <summary>
-        /// The distance between the icon and the text.
-        /// </summary>
-        public const int constTextShift = 2;
-
-        #region Fields
-
-        // ------------------------------------------------------------------
-        /// <summary>
-        /// Implementation of IVersion - the current version of 
-        /// IconLabelMaterial.
-        /// </summary>
-        // ------------------------------------------------------------------
-        protected double iconLabelMaterialVersion = 1.0;
-
-        // ------------------------------------------------------------------
-        /// <summary>
-        /// the Text field
-        /// </summary>
-        // ------------------------------------------------------------------
-        private Bitmap mIcon;
-
-        // ------------------------------------------------------------------
-        /// <summary>
-        /// the Text field
-        /// </summary>
-        // ------------------------------------------------------------------
-        private string mText = string.Empty;
-
-        private Rectangle textRectangle = Rectangle.Empty;
-
-        #endregion
-
-        #region Properties
-
-        // ------------------------------------------------------------------
-        /// <summary>
-        /// Gets the current version.
-        /// </summary>
-        // ------------------------------------------------------------------
-        public override double Version
-        {
-            get
-            {
-                return iconLabelMaterialVersion;
-            }
+namespace Netron.Diagramming.Core {
+  /// <summary>
+  /// Icon shape material without <see cref="IMouseListener"/> service.
+  /// <seealso cref="ClickableIconMaterial"/>
+  /// </summary>
+  public partial class IconLabelMaterial : ShapeMaterialBase {
+
+    /// <summary>
+    /// The distance between the icon and the text.
+    /// </summary>
+    public const int constTextShift = 2;
+
+    #region Fields
+
+    // ------------------------------------------------------------------
+    /// <summary>
+    /// Implementation of IVersion - the current version of 
+    /// IconLabelMaterial.
+    /// </summary>
+    // ------------------------------------------------------------------
+    protected double iconLabelMaterialVersion = 1.0;
+
+    // ------------------------------------------------------------------
+    /// <summary>
+    /// the Text field
+    /// </summary>
+    // ------------------------------------------------------------------
+    private Bitmap mIcon;
+
+    // ------------------------------------------------------------------
+    /// <summary>
+    /// the Text field
+    /// </summary>
+    // ------------------------------------------------------------------
+    private string mText = string.Empty;
+
+    private Rectangle textRectangle = Rectangle.Empty;
+
+    #endregion
+
+    #region Properties
+
+    // ------------------------------------------------------------------
+    /// <summary>
+    /// Gets the current version.
+    /// </summary>
+    // ------------------------------------------------------------------
+    public override double Version {
+      get {
+        return iconLabelMaterialVersion;
+      }
+    }
+
+    /// <summary>
+    /// Gets the bounds of the text.
+    /// </summary>
+    public Rectangle TextArea {
+      get {
+        return textRectangle;
+      }
+    }
+
+    /// <summary>
+    /// Gets or sets the Text
+    /// </summary>
+    public string Text {
+      get {
+        return mText;
+      }
+      set {
+        mText = value;
+      }
+    }
+
+    /// <summary>
+    /// Gets or sets the Text
+    /// </summary>
+    public Bitmap Icon {
+      get {
+        return mIcon;
+      }
+      set {
+        mIcon = value;
+      }
+    }
+    #endregion
+
+    #region Constructor
+    public IconLabelMaterial(string text)
+      : base() {
+      mText = text;
+    }
+
+    /// <summary>
+    /// Initializes a new instance of the <see cref="IconLabelMaterial"/> class.
+    /// </summary>
+    /// <param name="resourceLocation">The resource location.</param>
+    /// <param name="text">The text.</param>
+    public IconLabelMaterial(string text, string resourceLocation)
+      : this(text) {
+      mIcon = GetBitmap(resourceLocation);
+    }
+
+    /// <summary>
+    /// Opens the icon (image) from the location specified and sets it
+    /// as the image to use.
+    /// </summary>
+    /// <param name="resourceLocation">string: The resource location.
+    /// </param>
+    public void SetIcon(string resourceLocation) {
+      mIcon = GetBitmap(resourceLocation);
+    }
+
+    /// <summary>
+    /// Gets the bitmap at the location specified.
+    /// </summary>
+    /// <param name="resourceLocation">The resource location.</param>
+    /// <returns></returns>
+    protected Bitmap GetBitmap(string resourceLocation) {
+      if (resourceLocation.Length == 0)
+        return null;
+      try {
+        //first try if it's defined in this assembly somewhere                
+        return new Bitmap(this.GetType(), resourceLocation);
+      }
+      catch {
+
+        if (File.Exists(resourceLocation)) {
+          return new Bitmap(resourceLocation);
+        } else
+          return null;
+      }
+    }
+    /// <summary>
+    /// Initializes a new instance of the <see cref="T:IconLabelMaterial"/> class.
+    /// </summary>
+    public IconLabelMaterial()
+      : base() {
+    }
+
+    #endregion
+
+    #region Methods
+
+    // ------------------------------------------------------------------
+    /// <summary>
+    /// Calculates the min size needed to fit this material in.
+    /// </summary>
+    /// <param name="g">Graphics</param>
+    /// <returns>Size</returns>
+    // ------------------------------------------------------------------
+    public override Size CalculateMinSize(Graphics g) {
+      Size minSizeNeeded = new Size(0, 0);
+
+      if (mText != String.Empty) {
+        minSizeNeeded = Size.Round(g.MeasureString(
+        this.myTextStyle.GetFormattedText(this.mText),
+        this.myTextStyle.Font));
+      }
+
+      minSizeNeeded.Width += constTextShift;
+
+      if (mIcon != null) {
+        minSizeNeeded.Width += mIcon.Width;
+
+        if (mIcon.Height > minSizeNeeded.Height) {
+          minSizeNeeded.Height = mIcon.Height;
         }
-
-        /// <summary>
-        /// Gets the bounds of the text.
-        /// </summary>
-        public Rectangle TextArea
-        {
-            get
-            {
-                return textRectangle;
-            }
-        }
-
-        /// <summary>
-        /// Gets or sets the Text
-        /// </summary>
-        public string Text
-        {
-            get
-            {
-                return mText;
-            }
-            set
-            {
-                mText = value;
-            }
-        }
-
-        /// <summary>
-        /// Gets or sets the Text
-        /// </summary>
-        public Bitmap Icon
-        {
-            get
-            {
-                return mIcon;
-            }
-            set
-            {
-                mIcon = value;
-            }
-        }        
-        #endregion
-
-        #region Constructor
-        public IconLabelMaterial(string text) : base()
-        {
-            mText = text;            
-        }
-
-        /// <summary>
-        /// Initializes a new instance of the <see cref="IconLabelMaterial"/> class.
-        /// </summary>
-        /// <param name="resourceLocation">The resource location.</param>
-        /// <param name="text">The text.</param>
-        public IconLabelMaterial(string text, string resourceLocation)
-            : this(text)
-        {
-            mIcon = GetBitmap(resourceLocation);
-        }
-
-        /// <summary>
-        /// Opens the icon (image) from the location specified and sets it
-        /// as the image to use.
-        /// </summary>
-        /// <param name="resourceLocation">string: The resource location.
-        /// </param>
-        public void SetIcon(string resourceLocation)
-        {
-            mIcon = GetBitmap(resourceLocation);
-        }
-
-        /// <summary>
-        /// Gets the bitmap at the location specified.
-        /// </summary>
-        /// <param name="resourceLocation">The resource location.</param>
-        /// <returns></returns>
-        protected Bitmap GetBitmap(string resourceLocation)
-        {
-            if (resourceLocation.Length == 0)
-                return null;
-            try
-            {
-                 //first try if it's defined in this assembly somewhere                
-                return new Bitmap(this.GetType(), resourceLocation);
-            }
-            catch
-            {
-
-                if (File.Exists(resourceLocation))
-                {
-                    return new Bitmap(resourceLocation);
-                }
-                else
-                    return null;
-            }
-        }
-        /// <summary>
-        /// Initializes a new instance of the <see cref="T:IconLabelMaterial"/> class.
-        /// </summary>
-        public IconLabelMaterial()
-            : base()
-        {
-        }
-
-        #endregion
-
-        #region Methods
-
-        // ------------------------------------------------------------------
-        /// <summary>
-        /// Calculates the min size needed to fit this material in.
-        /// </summary>
-        /// <param name="g">Graphics</param>
-        /// <returns>Size</returns>
-        // ------------------------------------------------------------------
-        public override Size CalculateMinSize(Graphics g)
-        {
-            Size minSizeNeeded = new Size(0, 0);
-
-            if (mText != String.Empty)
-            {
-                minSizeNeeded = Size.Round(g.MeasureString(
-                this.myTextStyle.GetFormattedText(this.mText), 
-                this.myTextStyle.Font));
-            }
-
-            minSizeNeeded.Width += constTextShift;
-
-            if (mIcon != null)
-            {
-                minSizeNeeded.Width += mIcon.Width;
-
-                if (mIcon.Height > minSizeNeeded.Height)
-                {
-                    minSizeNeeded.Height = mIcon.Height;
-                }
-            }
-            return minSizeNeeded;
-        }
-
-        public override void Transform(Rectangle rectangle)
-        {
-            textRectangle = new Rectangle(
-                rectangle.X + (mIcon == null ? 0 : mIcon.Width) + constTextShift, 
-                rectangle.Y, 
-                rectangle.Width - (mIcon == null ? 0 : mIcon.Width) - constTextShift, 
-                rectangle.Height);
-            base.Transform(rectangle);
-
-        }
-        /// <summary>
-        /// Paints the entity using the given graphics object
-        /// </summary>
-        /// <param name="g"></param>
-        public override void Paint(Graphics g)
-        {
-            if(!Visible)
-                return;
-            GraphicsContainer cto = g.BeginContainer();
-            g.SetClip(Shape.Rectangle);
-            if(mIcon != null)
-            {
-                g.DrawImage(mIcon, new Rectangle(Rectangle.Location, mIcon.Size));
-            }
-
-            StringFormat stringFormat = myTextStyle.StringFormat;
-            stringFormat.Trimming = StringTrimming.EllipsisWord;
-            stringFormat.FormatFlags = StringFormatFlags.LineLimit;
-
-            g.DrawString(
-                myTextStyle.GetFormattedText(mText),
-                this.myTextStyle.Font, 
-                this.myTextStyle.GetBrush(), 
-                textRectangle,
-                stringFormat);
-            g.EndContainer(cto);
-        }
-        #endregion
-
-    }
+      }
+      return minSizeNeeded;
+    }
+
+    public override void Transform(Rectangle rectangle) {
+      textRectangle = new Rectangle(
+          rectangle.X + (mIcon == null ? 0 : mIcon.Width) + constTextShift,
+          rectangle.Y,
+          rectangle.Width - (mIcon == null ? 0 : mIcon.Width) - constTextShift,
+          rectangle.Height);
+      base.Transform(rectangle);
+
+    }
+    /// <summary>
+    /// Paints the entity using the given graphics object
+    /// </summary>
+    /// <param name="g"></param>
+    public override void Paint(Graphics g) {
+      if (!Visible)
+        return;
+      GraphicsContainer cto = g.BeginContainer();
+      g.SetClip(Shape.Rectangle);
+      if (mIcon != null) {
+        g.DrawImage(mIcon, new Rectangle(Rectangle.Location, mIcon.Size));
+      }
+
+      StringFormat stringFormat = myTextStyle.StringFormat;
+      stringFormat.Trimming = StringTrimming.EllipsisWord;
+      stringFormat.FormatFlags = StringFormatFlags.LineLimit;
+
+      g.DrawString(
+          myTextStyle.GetFormattedText(mText),
+          this.myTextStyle.Font,
+          this.myTextStyle.GetBrush(),
+          textRectangle,
+          stringFormat);
+      g.EndContainer(cto);
+    }
+    #endregion
+
+  }
 }
Index: /trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.Netron/3.0.2672.12446/Netron.Diagramming.Core-3.0.2672.12446/Diagram elements/Materials/IconMaterial.cs
===================================================================
--- /trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.Netron/3.0.2672.12446/Netron.Diagramming.Core-3.0.2672.12446/Diagram elements/Materials/IconMaterial.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.Netron/3.0.2672.12446/Netron.Diagramming.Core-3.0.2672.12446/Diagram elements/Materials/IconMaterial.cs	(revision 4068)
@@ -1,144 +1,123 @@
-using System;
+using System.Drawing;
 using System.Drawing.Drawing2D;
-using System.Collections.Generic;
-using System.Text;
-using System.Drawing;
-using System.IO;
-using System.Diagnostics;
-namespace Netron.Diagramming.Core
-{
+namespace Netron.Diagramming.Core {
+  /// <summary>
+  /// Icon shape material without <see cref="IMouseListener"/> service.
+  /// <seealso cref="ClickableIconMaterial"/>
+  /// </summary>
+  public partial class IconMaterial : ShapeMaterialBase {
+    #region Fields
+
+    // ------------------------------------------------------------------
     /// <summary>
-    /// Icon shape material without <see cref="IMouseListener"/> service.
-    /// <seealso cref="ClickableIconMaterial"/>
+    /// Implementation of IVersion - the current version of 
+    /// IconMaterial.
     /// </summary>
-    public partial class IconMaterial : ShapeMaterialBase
-    {
-        #region Fields
+    // ------------------------------------------------------------------
+    protected double iconMaterialVersion = 1.0;
 
-        // ------------------------------------------------------------------
-        /// <summary>
-        /// Implementation of IVersion - the current version of 
-        /// IconMaterial.
-        /// </summary>
-        // ------------------------------------------------------------------
-        protected double iconMaterialVersion = 1.0;
+    // ------------------------------------------------------------------
+    /// <summary>
+    /// the Text field
+    /// </summary>
+    // ------------------------------------------------------------------
+    private Bitmap mIcon;
 
-        // ------------------------------------------------------------------
-        /// <summary>
-        /// the Text field
-        /// </summary>
-        // ------------------------------------------------------------------
-        private Bitmap mIcon;
+    #endregion
 
-        #endregion
+    #region Properties
 
-        #region Properties
+    // ------------------------------------------------------------------
+    /// <summary>
+    /// Gets the current version.
+    /// </summary>
+    // ------------------------------------------------------------------
+    public override double Version {
+      get {
+        return iconMaterialVersion;
+      }
+    }
 
-        // ------------------------------------------------------------------
-        /// <summary>
-        /// Gets the current version.
-        /// </summary>
-        // ------------------------------------------------------------------
-        public override double Version
-        {
-            get
-            {
-                return iconMaterialVersion;
-            }
-        }
+    // ------------------------------------------------------------------
+    /// <summary>
+    /// Gets or sets the Text
+    /// </summary>
+    // ------------------------------------------------------------------
+    public Bitmap Icon {
+      get {
+        return mIcon;
+      }
+      set {
+        mIcon = value;
+      }
+    }
 
-        // ------------------------------------------------------------------
-        /// <summary>
-        /// Gets or sets the Text
-        /// </summary>
-        // ------------------------------------------------------------------
-        public Bitmap Icon
-        {
-            get
-            {
-                return mIcon;
-            }
-            set
-            {
-                mIcon = value;
-            }
-        }
+    #endregion
 
-        #endregion
+    #region Constructor
+    /// <summary>
+    /// Initializes a new instance of the <see cref="IconMaterial"/> class.
+    /// </summary>
+    /// <param name="resourceLocation">The resource location.</param>
+    public IconMaterial(string resourceLocation)
+      : base() {
 
-        #region Constructor
-        /// <summary>
-        /// Initializes a new instance of the <see cref="IconMaterial"/> class.
-        /// </summary>
-        /// <param name="resourceLocation">The resource location.</param>
-        public IconMaterial(string resourceLocation)
-            : base()
-        {
+      mIcon = GetBitmap(resourceLocation);
+    }
 
-            mIcon = GetBitmap(resourceLocation);
-        }
+    protected Bitmap GetBitmap(string resourceLocation) {
+      if (resourceLocation.Length == 0)
+        throw new InconsistencyException("Invalid icon specification.");
+      try {
+        return new Bitmap(this.GetType(), resourceLocation);
+      }
+      catch {
 
-        protected Bitmap GetBitmap(string resourceLocation)
-        {
-            if(resourceLocation.Length == 0)
-                throw new InconsistencyException("Invalid icon specification.");
-            try
-            {
-                return new Bitmap(this.GetType(), resourceLocation);
-            }
-            catch
-            {
+        throw;
+      }
+    }
+    public IconMaterial()
+      : base() {
+    }
 
-                throw;
-            }
-        }
-        public IconMaterial()
-            : base()
-        {
-        }
+    #endregion
 
-        #endregion
+    #region Methods
 
-        #region Methods
+    // ------------------------------------------------------------------
+    /// <summary>
+    /// Calculates the min size needed to fit this material in.  The
+    /// min size is determined by the size of the icon used.  If there
+    /// isn't an icon specified, then 'Size.Empty' is returned.
+    /// </summary>
+    /// <param name="g">Graphics</param>
+    /// <returns>Size</returns>
+    // ------------------------------------------------------------------
+    public override Size CalculateMinSize(Graphics g) {
+      Size minSizeNeeded = Size.Empty;
 
-        // ------------------------------------------------------------------
-        /// <summary>
-        /// Calculates the min size needed to fit this material in.  The
-        /// min size is determined by the size of the icon used.  If there
-        /// isn't an icon specified, then 'Size.Empty' is returned.
-        /// </summary>
-        /// <param name="g">Graphics</param>
-        /// <returns>Size</returns>
-        // ------------------------------------------------------------------
-        public override Size CalculateMinSize(Graphics g)
-        {
-            Size minSizeNeeded = Size.Empty;
+      if (mIcon != null) {
+        minSizeNeeded = new Size(mIcon.Width, mIcon.Height);
+      }
+      return minSizeNeeded;
+    }
 
-            if (mIcon != null)
-            {
-                minSizeNeeded = new Size(mIcon.Width, mIcon.Height);
-            }
-            return minSizeNeeded;
-        }
+    /// <summary>
+    /// Paints the entity using the given graphics object
+    /// </summary>
+    /// <param name="g"></param>
+    public override void Paint(Graphics g) {
+      if (!Visible)
+        return;
 
-        /// <summary>
-        /// Paints the entity using the given graphics object
-        /// </summary>
-        /// <param name="g"></param>
-        public override void Paint(Graphics g)
-        {
-            if(!Visible)
-                return;
+      if (mIcon != null) {
+        GraphicsContainer cto = g.BeginContainer();
+        g.SetClip(Shape.Rectangle);
+        g.DrawImage(mIcon, Rectangle);
+        g.EndContainer(cto);
+      }
+    }
+    #endregion
 
-            if(mIcon != null)
-            {
-                GraphicsContainer cto = g.BeginContainer();
-                g.SetClip(Shape.Rectangle);
-                g.DrawImage(mIcon, Rectangle);
-                g.EndContainer(cto);
-            }
-        }
-        #endregion
-
-    }
+  }
 }
Index: /trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.Netron/3.0.2672.12446/Netron.Diagramming.Core-3.0.2672.12446/Diagram elements/Materials/LabelMaterial.cs
===================================================================
--- /trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.Netron/3.0.2672.12446/Netron.Diagramming.Core-3.0.2672.12446/Diagram elements/Materials/LabelMaterial.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.Netron/3.0.2672.12446/Netron.Diagramming.Core-3.0.2672.12446/Diagram elements/Materials/LabelMaterial.cs	(revision 4068)
@@ -1,145 +1,127 @@
 using System;
-using System.Collections.Generic;
-using System.Text;
 using System.Drawing;
-namespace Netron.Diagramming.Core
-{
+namespace Netron.Diagramming.Core {
+  /// <summary>
+  /// Simple label material
+  /// </summary>
+  public partial class LabelMaterial : ShapeMaterialBase {
+    #region Fields
+
+    // ------------------------------------------------------------------
     /// <summary>
-    /// Simple label material
+    /// Implementation of IVersion - the current version of 
+    /// LabelMaterial.
     /// </summary>
-    public partial class LabelMaterial : ShapeMaterialBase
-    {
-        #region Fields
+    // ------------------------------------------------------------------
+    protected double labelMaterialVersion = 1.0;
 
-        // ------------------------------------------------------------------
-        /// <summary>
-        /// Implementation of IVersion - the current version of 
-        /// LabelMaterial.
-        /// </summary>
-        // ------------------------------------------------------------------
-        protected double labelMaterialVersion = 1.0;
+    // ------------------------------------------------------------------
+    /// <summary>
+    /// the Text field
+    /// </summary>
+    // ------------------------------------------------------------------
+    private string mText;
+    #endregion
 
-        // ------------------------------------------------------------------
-        /// <summary>
-        /// the Text field
-        /// </summary>
-        // ------------------------------------------------------------------
-        private string mText;
-        #endregion
+    #region Properties
 
-        #region Properties
+    // ------------------------------------------------------------------
+    /// <summary>
+    /// Gets the current version.
+    /// </summary>
+    // ------------------------------------------------------------------
+    public override double Version {
+      get {
+        return labelMaterialVersion;
+      }
+    }
 
-        // ------------------------------------------------------------------
-        /// <summary>
-        /// Gets the current version.
-        /// </summary>
-        // ------------------------------------------------------------------
-        public override double Version
-        {
-            get
-            {
-                return labelMaterialVersion;
-            }
-        }
+    // ------------------------------------------------------------------
+    /// <summary>
+    /// Gets or sets the font for this label.
+    /// </summary>
+    // ------------------------------------------------------------------
+    public Font Font {
+      get {
+        return this.myTextStyle.Font;
+      }
+      set {
+        this.myTextStyle.Font = value;
+      }
+    }
 
-        // ------------------------------------------------------------------
-        /// <summary>
-        /// Gets or sets the font for this label.
-        /// </summary>
-        // ------------------------------------------------------------------
-        public Font Font
-        {
-            get
-            {
-                return this.myTextStyle.Font;
-            }
-            set
-            {
-                this.myTextStyle.Font = value;
-            }
-        }
+    // ------------------------------------------------------------------
+    /// <summary>
+    /// Gets or sets the Text
+    /// </summary>
+    // ------------------------------------------------------------------
+    public string Text {
+      get {
+        return mText;
+      }
+      set {
+        mText = value;
+      }
+    }
 
-        // ------------------------------------------------------------------
-        /// <summary>
-        /// Gets or sets the Text
-        /// </summary>
-        // ------------------------------------------------------------------
-        public string Text
-        {
-            get
-            {
-                return mText;
-            }
-            set
-            {
-                mText = value;
-            }
-        }
+    #endregion
 
-        #endregion
-
-        #region Constructor
-        ///<summary>
-        ///Default constructor
-        ///</summary>
-        public LabelMaterial()
-            : base()
-        {
-            
-        }
-        public LabelMaterial(string text)
-            : this()
-        {
-            this.mText = text;
-        }
-        #endregion
-
-        #region Methods
-
-        // ------------------------------------------------------------------
-        /// <summary>
-        /// Calculates the min size needed to fit the text in.  If there is
-        /// no text assigned, then 'Size.Empty' is returned.
-        /// </summary>
-        /// <param name="g">Graphics</param>
-        /// <returns>Size</returns>
-        // ------------------------------------------------------------------
-        public override Size CalculateMinSize(Graphics g)
-        {
-            Size minSizeNeeded = Size.Empty;
-
-            if (mText != String.Empty)
-            {
-                minSizeNeeded = Size.Round(
-                    g.MeasureString(mText, this.myTextStyle.Font));
-            }
-            return minSizeNeeded;
-        }
-
-        /// <summary>
-        /// Paints the material using the given graphics object.
-        /// </summary>
-        /// <param name="g"></param>
-        public override void Paint(System.Drawing.Graphics g)
-        {
-            if (!Visible) return;
-            //the text		
-            if (!string.IsNullOrEmpty(Text))
-            {
-                //g.DrawRectangle(Pens.Orange, Rectangle);
-                StringFormat stringFormat = myTextStyle.StringFormat;
-                stringFormat.Trimming = StringTrimming.EllipsisWord;
-                stringFormat.FormatFlags = StringFormatFlags.LineLimit;
-
-                g.DrawString(
-                    this.myTextStyle.GetFormattedText(Text),
-                    this.myTextStyle.Font, 
-                    myTextStyle.GetBrush(), 
-                    Rectangle,
-                    stringFormat);
-            }
-        }
-        #endregion
+    #region Constructor
+    ///<summary>
+    ///Default constructor
+    ///</summary>
+    public LabelMaterial()
+      : base() {
 
     }
+    public LabelMaterial(string text)
+      : this() {
+      this.mText = text;
+    }
+    #endregion
+
+    #region Methods
+
+    // ------------------------------------------------------------------
+    /// <summary>
+    /// Calculates the min size needed to fit the text in.  If there is
+    /// no text assigned, then 'Size.Empty' is returned.
+    /// </summary>
+    /// <param name="g">Graphics</param>
+    /// <returns>Size</returns>
+    // ------------------------------------------------------------------
+    public override Size CalculateMinSize(Graphics g) {
+      Size minSizeNeeded = Size.Empty;
+
+      if (mText != String.Empty) {
+        minSizeNeeded = Size.Round(
+            g.MeasureString(mText, this.myTextStyle.Font));
+      }
+      return minSizeNeeded;
+    }
+
+    /// <summary>
+    /// Paints the material using the given graphics object.
+    /// </summary>
+    /// <param name="g"></param>
+    public override void Paint(System.Drawing.Graphics g) {
+      if (!Visible) return;
+      //the text		
+      if (!string.IsNullOrEmpty(Text)) {
+        //g.DrawRectangle(Pens.Orange, Rectangle);
+        StringFormat stringFormat = myTextStyle.StringFormat;
+        stringFormat.Trimming = StringTrimming.EllipsisWord;
+        stringFormat.FormatFlags = StringFormatFlags.LineLimit;
+
+        g.DrawString(
+            this.myTextStyle.GetFormattedText(Text),
+            this.myTextStyle.Font,
+            myTextStyle.GetBrush(),
+            Rectangle,
+            stringFormat);
+      }
+    }
+    #endregion
+
+  }
 }
Index: /trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.Netron/3.0.2672.12446/Netron.Diagramming.Core-3.0.2672.12446/Diagram elements/Materials/SwitchIconMaterial.cs
===================================================================
--- /trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.Netron/3.0.2672.12446/Netron.Diagramming.Core-3.0.2672.12446/Diagram elements/Materials/SwitchIconMaterial.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.Netron/3.0.2672.12446/Netron.Diagramming.Core-3.0.2672.12446/Diagram elements/Materials/SwitchIconMaterial.cs	(revision 4068)
@@ -1,238 +1,203 @@
-using System.Diagnostics;
-using System.Collections.Generic;
-using System.Text;
-using System.Reflection;
 using System;
-using System.Data;
-using System.Collections;
-using System.ComponentModel;
 using System.Drawing;
-using System.Drawing.Design;
-using System.Drawing.Drawing2D;
-using Netron.Diagramming.Core;
 using System.Windows.Forms;
-using System.Runtime.Serialization;
-using System.IO;
-
-namespace Netron.Diagramming.Core
-{
-    public partial class SwitchIconMaterial : ClickableIconMaterial
-    {
-
-        #region Events
-        /// <summary>
-        /// Occurs when the icon is switched into the 'collapsed' state.
-        /// </summary>
-        public event EventHandler OnCollapse;
-        /// <summary>
-        /// Occurs when the icon is switched into the 'expanded' state.
-        /// </summary>
-        public event EventHandler OnExpand;
-        #endregion
-
-        #region Fields
-
-        // ------------------------------------------------------------------
-        /// <summary>
-        /// Implementation of IVersion - the current version of 
-        /// SwitchIconMaterial.
-        /// </summary>
-        // ------------------------------------------------------------------
-        protected double switchIconMaterialVersion = 1.0;
-
-        // ------------------------------------------------------------------
-        /// <summary>
-        /// the 'down/expanded' icon
-        /// </summary>
-        // ------------------------------------------------------------------
-        private Bitmap downBmp;
-
-        // ------------------------------------------------------------------
-        /// <summary>
-        /// the 'up/collapsed' icon
-        /// </summary>
-        // ------------------------------------------------------------------
-        private Bitmap upBmp;
-
-        // ------------------------------------------------------------------
-        /// <summary>
-        /// the mCollapsed field
-        /// </summary>
-        // ------------------------------------------------------------------
-        private bool mCollapsed = true;
-
-        // ------------------------------------------------------------------
-        /// <summary>
-        /// the current switch type
-        /// </summary>
-        // ------------------------------------------------------------------
-        private SwitchIconType mSwitchType;
-
-        #endregion
-
-        #region Properties
-
-        // ------------------------------------------------------------------
-        /// <summary>
-        /// Gets the current version.
-        /// </summary>
-        // ------------------------------------------------------------------
-        public override double Version
-        {
-            get
-            {
-                return switchIconMaterialVersion;
-            }
+
+namespace Netron.Diagramming.Core {
+  public partial class SwitchIconMaterial : ClickableIconMaterial {
+
+    #region Events
+    /// <summary>
+    /// Occurs when the icon is switched into the 'collapsed' state.
+    /// </summary>
+    public event EventHandler OnCollapse;
+    /// <summary>
+    /// Occurs when the icon is switched into the 'expanded' state.
+    /// </summary>
+    public event EventHandler OnExpand;
+    #endregion
+
+    #region Fields
+
+    // ------------------------------------------------------------------
+    /// <summary>
+    /// Implementation of IVersion - the current version of 
+    /// SwitchIconMaterial.
+    /// </summary>
+    // ------------------------------------------------------------------
+    protected double switchIconMaterialVersion = 1.0;
+
+    // ------------------------------------------------------------------
+    /// <summary>
+    /// the 'down/expanded' icon
+    /// </summary>
+    // ------------------------------------------------------------------
+    private Bitmap downBmp;
+
+    // ------------------------------------------------------------------
+    /// <summary>
+    /// the 'up/collapsed' icon
+    /// </summary>
+    // ------------------------------------------------------------------
+    private Bitmap upBmp;
+
+    // ------------------------------------------------------------------
+    /// <summary>
+    /// the mCollapsed field
+    /// </summary>
+    // ------------------------------------------------------------------
+    private bool mCollapsed = true;
+
+    // ------------------------------------------------------------------
+    /// <summary>
+    /// the current switch type
+    /// </summary>
+    // ------------------------------------------------------------------
+    private SwitchIconType mSwitchType;
+
+    #endregion
+
+    #region Properties
+
+    // ------------------------------------------------------------------
+    /// <summary>
+    /// Gets the current version.
+    /// </summary>
+    // ------------------------------------------------------------------
+    public override double Version {
+      get {
+        return switchIconMaterialVersion;
+      }
+    }
+
+    // ------------------------------------------------------------------
+    /// <summary>
+    /// Gets or sets the type of the switch.
+    /// </summary>
+    /// <value>The type of the switch.</value>
+    // ------------------------------------------------------------------
+    public SwitchIconType SwitchType {
+      get {
+        return mSwitchType;
+      }
+
+      internal set {
+        SwitchToType(value);
+        Collapsed = true;
+        mSwitchType = value;
+      }
+    }
+
+    #endregion
+
+    #region Constructor
+    /// <summary>
+    /// Initializes a new instance of the <see cref="SwitchIconMaterial"/> class.
+    /// </summary>
+    /// <param name="type">The type.</param>
+    public SwitchIconMaterial(SwitchIconType type)
+      : base() {
+      Gliding = false;
+      mSwitchType = type;
+      //fetch the two bitmaps
+      try {
+        SwitchToType(type);
+
+      }
+      catch (Exception exc) {
+        throw new InconsistencyException("The necessary resource could not be found.", exc);
+      }
+
+    }
+    /// <summary>
+    /// Sets the switch to the given <see cref="SwitchIconType"/>
+    /// </summary>
+    /// <param name="type"></param>
+    private void SwitchToType(SwitchIconType type) {
+      switch (type) {
+        case SwitchIconType.UpDown:
+          downBmp = GetBitmap("Resources.down.ico");
+          upBmp = GetBitmap("Resources.up.ico");
+          this.Icon = downBmp;
+          break;
+        case SwitchIconType.PlusMinus:
+          downBmp = GetBitmap("Resources.plus.ico");
+          upBmp = GetBitmap("Resources.minus.ico");
+          this.Icon = downBmp;
+          break;
+        default:
+          break;
+      }
+    }
+    #endregion
+
+    #region Methods
+    /// <summary>
+    /// Handles the mouse-down event. 
+    /// </summary>
+    /// <param name="e">The <see cref="T:MouseEventArgs"/> instance containing the event data.</param>
+    /// <returns>Returns 'true' if the event was handled, otherwise 'false'.</returns>
+    public override bool MouseDown(MouseEventArgs e) {
+      base.MouseDown(e);
+      if (e.Clicks == 1) {
+        Collapsed = !Collapsed;
+        return true;
+      }
+      return false;
+    }
+
+    /// <summary>
+    /// Gets or sets the Collapsed
+    /// </summary>
+    public bool Collapsed {
+      get {
+        return mCollapsed;
+      }
+      set {
+        if (value) {
+          this.Icon = downBmp;
+          RaiseOnCollapse();
+        } else {
+          this.Icon = upBmp;
+          RaiseOnExpand();
         }
 
-        // ------------------------------------------------------------------
-        /// <summary>
-        /// Gets or sets the type of the switch.
-        /// </summary>
-        /// <value>The type of the switch.</value>
-        // ------------------------------------------------------------------
-        public SwitchIconType SwitchType
-        {
-            get
-            {
-                return mSwitchType;
-            }
-            
-            internal set
-            {
-                SwitchToType(value);
-                Collapsed = true;
-                mSwitchType = value;
-            }
-        }
-
-        #endregion
-
-        #region Constructor
-        /// <summary>
-        /// Initializes a new instance of the <see cref="SwitchIconMaterial"/> class.
-        /// </summary>
-        /// <param name="type">The type.</param>
-        public SwitchIconMaterial(SwitchIconType type)
-            : base()
-        {
-            Gliding = false;
-            mSwitchType = type;
-            //fetch the two bitmaps
-            try
-            {
-                SwitchToType(type);
-                
-            }
-            catch (Exception exc)
-            {
-                throw new InconsistencyException("The necessary resource could not be found.", exc);
-            }
-
-        }
-        /// <summary>
-        /// Sets the switch to the given <see cref="SwitchIconType"/>
-        /// </summary>
-        /// <param name="type"></param>
-        private void SwitchToType(SwitchIconType type)
-        {
-            switch(type)
-            {
-                case SwitchIconType.UpDown:
-                    downBmp = GetBitmap("Resources.down.ico");
-                    upBmp = GetBitmap("Resources.up.ico");
-                    this.Icon = downBmp;
-                    break;
-                case SwitchIconType.PlusMinus:
-                    downBmp = GetBitmap("Resources.plus.ico");
-                    upBmp = GetBitmap("Resources.minus.ico");
-                    this.Icon = downBmp;
-                    break;
-                default:
-                    break;
-            }
-        }
-        #endregion
-
-        #region Methods
-        /// <summary>
-        /// Handles the mouse-down event. 
-        /// </summary>
-        /// <param name="e">The <see cref="T:MouseEventArgs"/> instance containing the event data.</param>
-        /// <returns>Returns 'true' if the event was handled, otherwise 'false'.</returns>
-        public override bool MouseDown(MouseEventArgs e)
-        {
-            base.MouseDown(e);
-            if(e.Clicks == 1)
-            {
-                Collapsed = !Collapsed;
-                return true;
-            }
-            return false;
-        }
-
-        /// <summary>
-        /// Gets or sets the Collapsed
-        /// </summary>
-        public bool Collapsed
-        {
-            get
-            {
-                return mCollapsed;
-            }
-            set
-            {
-                if(value)
-                {
-                    this.Icon = downBmp;
-                    RaiseOnCollapse();
-                }
-                else
-                {
-                    this.Icon = upBmp;
-                    RaiseOnExpand();
-                }
-
-                mCollapsed = value;
-            }
-        }
-
-
-        /// <summary>
-        /// Raises the <see cref="OnExpand"/> event.
-        /// </summary>
-        private void RaiseOnExpand()
-        {
-            if(OnExpand != null)
-                OnExpand(this, EventArgs.Empty);
-        }
-        /// <summary>
-        /// Raises the <see cref="OnCollapse"/> event
-        /// </summary>
-        private void RaiseOnCollapse()
-        {
-            if(OnCollapse != null)
-                OnCollapse(this, EventArgs.Empty);
-        }
-        #endregion
-
-    }
-
-    // ----------------------------------------------------------------------
-    /// <summary>
-    /// The two type of bitmaps intrinsically defined by the 
-    /// <see cref="SwitchIconMaterial"/>
-    /// </summary>
-    // ----------------------------------------------------------------------
-    public enum SwitchIconType
-    { 
-        /// <summary>
-        /// The up/down arrows are displayed
-        /// </summary>
-        UpDown,
-        /// <summary>
-        /// The plus/minus icon are displayed
-        /// </summary>
-        PlusMinus
-    }
+        mCollapsed = value;
+      }
+    }
+
+
+    /// <summary>
+    /// Raises the <see cref="OnExpand"/> event.
+    /// </summary>
+    private void RaiseOnExpand() {
+      if (OnExpand != null)
+        OnExpand(this, EventArgs.Empty);
+    }
+    /// <summary>
+    /// Raises the <see cref="OnCollapse"/> event
+    /// </summary>
+    private void RaiseOnCollapse() {
+      if (OnCollapse != null)
+        OnCollapse(this, EventArgs.Empty);
+    }
+    #endregion
+
+  }
+
+  // ----------------------------------------------------------------------
+  /// <summary>
+  /// The two type of bitmaps intrinsically defined by the 
+  /// <see cref="SwitchIconMaterial"/>
+  /// </summary>
+  // ----------------------------------------------------------------------
+  public enum SwitchIconType {
+    /// <summary>
+    /// The up/down arrows are displayed
+    /// </summary>
+    UpDown,
+    /// <summary>
+    /// The plus/minus icon are displayed
+    /// </summary>
+    PlusMinus
+  }
 }
Index: /trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.Netron/3.0.2672.12446/Netron.Diagramming.Core-3.0.2672.12446/Diagram elements/Shapes/ClassShape.cs
===================================================================
--- /trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.Netron/3.0.2672.12446/Netron.Diagramming.Core-3.0.2672.12446/Diagram elements/Shapes/ClassShape.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.Netron/3.0.2672.12446/Netron.Diagramming.Core-3.0.2672.12446/Diagram elements/Shapes/ClassShape.cs	(revision 4068)
@@ -1,839 +1,748 @@
-using System.Diagnostics;
+using System;
 using System.Collections.Generic;
-using System.Text;
+using System.Drawing;
+using System.Drawing.Drawing2D;
+using System.IO;
 using System.Reflection;
-using System;
-using System.Data;
-using System.Collections;
-using System.ComponentModel;
-using System.Drawing;
-using System.Drawing.Design;
-using System.Drawing.Drawing2D;
-using Netron.Diagramming.Core;
-using System.Windows.Forms;
-using System.Runtime.Serialization;
-using System.IO;
-
-namespace Netron.Diagramming.Core
-{
-    // ----------------------------------------------------------------------
-    /// <summary>
-    /// The typical shape shipping with Visual Studio 2005 in the class 
-    /// designer.
-    /// </summary>	
-    // ----------------------------------------------------------------------
-    [Shape(
-        "Class shape", 
-        "ClassShape", 
-        "Special", 
-        "The typical shape shipping with Visual Studio 2005 in the class " +
-        "designer.")]
-    public partial class ClassShape : ComplexShapeBase
-    {
-
-        #region Fields
-
-        // ------------------------------------------------------------------
-        /// <summary>
-        /// Implementation of IVersion - the current version of 
-        /// ClassShape.
-        /// </summary>
-        // ------------------------------------------------------------------
-        protected const double classShapeVersion = 1.0;
-
-        private Color mHeadColor = ArtPalette.RandomLowSaturationColor;
-
-        // ------------------------------------------------------------------
-        /// <summary>
-        /// the xpansion icon
-        /// </summary>
-        // ------------------------------------------------------------------
-        private SwitchIconMaterial xicon;
-
-        // ------------------------------------------------------------------
-        /// <summary>
-        /// the pen used to draw the edge of the shape, which is switching 
-        /// between the highlighted and normal state. 
-        /// </summary>
-        // ------------------------------------------------------------------
-        private Pen pen;
-
-        /// <summary>
-        /// holds the connectors
-        /// </summary>
-        private Connector cBottom, cLeft, cRight, cTop;
-        /// <summary>
-        /// the height of the body
-        /// </summary>
-        private int bodyHeight;
-        /// <summary>
-        /// the type of body
-        /// </summary>
-        private BodyType mBodyType = BodyType.None;
-        /// <summary>
-        /// the main text in the head
-        /// </summary>
-        private string mTitle;
-        /// <summary>
-        /// the mSubTitle
-        /// </summary>
-        private string mSubTitle;        
-        /// <summary>
-        /// the collapse state is a flagged enum
-        /// </summary>
-        private bool mCollapsed = true;
-        /// <summary>
-        /// the list of items when set to list-type
-        /// </summary>
-        private CollectionBase<ClassShapeItem> mList = new CollectionBase<ClassShapeItem>();       
-        /// <summary>
-        /// the <see cref="LabelMaterial"/> to display the free text
-        /// </summary>
-        private LabelMaterial textMaterial;
-        /// <summary>
-        /// graphics utility to paint the shape
-        /// </summary>
-        private GraphicsPath path, gradientPath;
-        /// <summary>
-        /// graphics utility to paint the shape
-        /// </summary>
-        private Region darkRegion, gradientRegion;
-        /// <summary>
-        /// the brush used to paint the gradient of the shape-head
-        /// </summary>
-        private Brush gradientBrush;
-        /// <summary>
-        /// typographic string formatting
-        /// </summary>
-        StringFormat sf = StringFormat.GenericTypographic;
-
-        // ------------------------------------------------------------------
-        /// <summary>
-        /// The collection of <see cref="FolderMaterial"/> folders displayed 
-        /// when the shape is in <see cref="BodyType.List"/> mode.
-        /// </summary>
-        // ------------------------------------------------------------------
-        private CollectionBase<FolderMaterial> mFolders = 
-            new CollectionBase<FolderMaterial>();
-
-        #endregion
-
-        #region Properties
-
-        // ------------------------------------------------------------------
-        /// <summary>
-        /// Gets the current version.
-        /// </summary>
-        // ------------------------------------------------------------------
-        public override double Version
-        {
-            get
-            {
-                return classShapeVersion;
-            }
-        }
-
-        private FolderMaterial mPropertiesNode;
-        private FolderMaterial mMethodsNode;
-
-        public FolderMaterial PropertiesNode
-        {
-            get { return mPropertiesNode; }
-        }
-        public FolderMaterial MethodsNode
-        {
-            get { return mMethodsNode; }
-        }
-
-        /// <summary>
-        /// Gets or sets the color of the head.
-        /// </summary>
-        /// <value>The color of the head.</value>
-        public Color HeadColor
-        {
-            get { return mHeadColor; }
-            set { mHeadColor = value;
-            
-                if (PaintStyle is GradientPaintStyle)
-                 (PaintStyle as GradientPaintStyle).StartColor = value;
-            else if (PaintStyle is SolidPaintStyle)
-                 (PaintStyle as SolidPaintStyle).SolidColor = value;
-            }
-        }
-
-        /// <summary>
-        /// Gets the friendly name of the entity to be displayed in the UI
-        /// </summary>
-        /// <value></value>
-        public override string EntityName
-        {
-            get
-            {
-                return "Class Shape";
-            }
-        }
-
-        /// <summary>
-        /// Gets or sets the type of content displayed in the body of the bundle
-        /// </summary>
-        public BodyType BodyType
-        {
-            get
-            {
-                return mBodyType;
-            }
-            set
-            {
-                mBodyType = value;
-                this.UpdateBody();
-            }
-        }
-
-        /// <summary>
-        /// Collapses the shape
-        /// </summary>
-        public void Collapse()
-        {
-            this.mCollapsed = true;            
-            UpdateBody();
-            this.Invalidate();
-        }
-
-        /// <summary>
-        /// Expands the bundle to display the body
-        /// </summary>
-        public void Expand()
-        {
-            mCollapsed = false;
-
-            UpdateBody();
-            this.Invalidate();
-        }
-
-        /// <summary>
-        /// Collapses the bundle and hides the body
-        /// </summary>
-        public bool Collapsed
-        {
-            get
-            {
-                return mCollapsed;
-            }
-            //set{mCollapsed = value;}
-        }
-
-        /// <summary>
-        /// Gets the list of items displayed in the body
-        /// </summary>
-        public CollectionBase<ClassShapeItem> List
-        {
-            get
-            {
-                return this.mList;
-            }
-        }
-
-        /// <summary>
-        /// Gets or sets the mSubTitle of the bundle
-        /// </summary>
-        public string SubTitle
-        {
-            get
-            {
-                return mSubTitle;
-            }
-            set
-            {
-                mSubTitle = value;
-                this.Invalidate();
-            }
-        }
-
-        /// <summary>
-        /// Gets or sets the text to be displayed if the body-type is set to FreeText
-        /// </summary>
-        public string FreeText
-        {
-            get
-            {
-                return textMaterial.Text;
-            }
-            set
-            {
-                textMaterial.Text = value;
-                //UpdateBody();
-            }
-        }
-        
-        /// <summary>
-        /// Gets or sets the mTitle of the bundle
-        /// </summary>
-        public string Title
-        {
-            get
-            {
-                return mTitle;
-            }
-            set
-            {
-                mTitle = value;
-            }
-        }
-        public override string Text
-        {
-            get
-            {
-                if (BodyType == BodyType.FreeText)
-                    return textMaterial.Text;
-                else
-                    return string.Empty;
-
-
-            }
-            set
-            {
-                if (BodyType == BodyType.FreeText)
-                    textMaterial.Text = value;
-            }
-        }
-
-        /// <summary>
-        /// Gets the folders of the shape which are displayed when its in <see cref="BodyType.List"/> mode.
-        /// </summary>
-        /// <value>The folders.</value>
-        public CollectionBase<FolderMaterial> Folders
-        {
-            get { return mFolders; }
-            internal set { mFolders = value; }
-        }
-        #endregion
-
-        #region Constructors
-
-        // ------------------------------------------------------------------
-        /// <summary>
-        /// Constructor
-        /// </summary>
-        // ------------------------------------------------------------------
-        public ClassShape(IModel model)
-            : base(model)
-        {
-        }
-
-        // ------------------------------------------------------------------
-        /// <summary>
-        /// Initializes a new instance of the <see cref="T:ClassShape"/> 
-        /// class.
-        /// </summary>
-        // ------------------------------------------------------------------
-        public ClassShape()
-            : base()
-        {
-        }
-
-        // ------------------------------------------------------------------
-        /// <summary>
-        /// Initialize of the bundle
-        /// </summary>
-        // ------------------------------------------------------------------
-        protected override void Initialize()
-        {
-            base.Initialize();
-            Name = "Class Shape";
-            mTitle = "Class shape";
-            mSubTitle = "by The Netron Project";
-            this.Resizable = false;
-            sf.Trimming = StringTrimming.EllipsisCharacter;
-            //the initial size
-            Transform(0, 0, 200, 50);
-
-            
-            //mList.OnItemAdded += new EventHandler<CollectionEventArgs<ClassShapeItem>>(mList_OnItemAdded);
-
-            #region The icon material
-            CreateShapeIcon();
-            #endregion
-
-            #region The xpand icon material
-            CreateXpansionIcon();
-            #endregion
-
-            #region The free text
-            textMaterial = new LabelMaterial();
-            textMaterial.Transform(new Rectangle(Rectangle.X + 5, Rectangle.Y + 18, Rectangle.Width - 10, bodyHeight));
-            textMaterial.Text = GetQuotation();
-            textMaterial.Visible = false;
-            Children.Add(textMaterial);
-
-            #endregion
-
-            #region The folders
-
-            /* The following code is only an example of what is possible.
+
+namespace Netron.Diagramming.Core {
+  // ----------------------------------------------------------------------
+  /// <summary>
+  /// The typical shape shipping with Visual Studio 2005 in the class 
+  /// designer.
+  /// </summary>	
+  // ----------------------------------------------------------------------
+  [Shape(
+      "Class shape",
+      "ClassShape",
+      "Special",
+      "The typical shape shipping with Visual Studio 2005 in the class " +
+      "designer.")]
+  public partial class ClassShape : ComplexShapeBase {
+
+    #region Fields
+
+    // ------------------------------------------------------------------
+    /// <summary>
+    /// Implementation of IVersion - the current version of 
+    /// ClassShape.
+    /// </summary>
+    // ------------------------------------------------------------------
+    protected const double classShapeVersion = 1.0;
+
+    private Color mHeadColor = ArtPalette.RandomLowSaturationColor;
+
+    // ------------------------------------------------------------------
+    /// <summary>
+    /// the xpansion icon
+    /// </summary>
+    // ------------------------------------------------------------------
+    private SwitchIconMaterial xicon;
+
+    // ------------------------------------------------------------------
+    /// <summary>
+    /// the pen used to draw the edge of the shape, which is switching 
+    /// between the highlighted and normal state. 
+    /// </summary>
+    // ------------------------------------------------------------------
+    private Pen pen;
+
+    /// <summary>
+    /// holds the connectors
+    /// </summary>
+    private Connector cBottom, cLeft, cRight, cTop;
+    /// <summary>
+    /// the height of the body
+    /// </summary>
+    private int bodyHeight;
+    /// <summary>
+    /// the type of body
+    /// </summary>
+    private BodyType mBodyType = BodyType.None;
+    /// <summary>
+    /// the main text in the head
+    /// </summary>
+    private string mTitle;
+    /// <summary>
+    /// the mSubTitle
+    /// </summary>
+    private string mSubTitle;
+    /// <summary>
+    /// the collapse state is a flagged enum
+    /// </summary>
+    private bool mCollapsed = true;
+    /// <summary>
+    /// the list of items when set to list-type
+    /// </summary>
+    private CollectionBase<ClassShapeItem> mList = new CollectionBase<ClassShapeItem>();
+    /// <summary>
+    /// the <see cref="LabelMaterial"/> to display the free text
+    /// </summary>
+    private LabelMaterial textMaterial;
+    /// <summary>
+    /// graphics utility to paint the shape
+    /// </summary>
+    private GraphicsPath path, gradientPath;
+    /// <summary>
+    /// graphics utility to paint the shape
+    /// </summary>
+    private Region darkRegion, gradientRegion;
+    /// <summary>
+    /// the brush used to paint the gradient of the shape-head
+    /// </summary>
+    private Brush gradientBrush;
+    /// <summary>
+    /// typographic string formatting
+    /// </summary>
+    StringFormat sf = StringFormat.GenericTypographic;
+
+    // ------------------------------------------------------------------
+    /// <summary>
+    /// The collection of <see cref="FolderMaterial"/> folders displayed 
+    /// when the shape is in <see cref="BodyType.List"/> mode.
+    /// </summary>
+    // ------------------------------------------------------------------
+    private CollectionBase<FolderMaterial> mFolders =
+        new CollectionBase<FolderMaterial>();
+
+    #endregion
+
+    #region Properties
+
+    // ------------------------------------------------------------------
+    /// <summary>
+    /// Gets the current version.
+    /// </summary>
+    // ------------------------------------------------------------------
+    public override double Version {
+      get {
+        return classShapeVersion;
+      }
+    }
+
+    private FolderMaterial mPropertiesNode;
+    private FolderMaterial mMethodsNode;
+
+    public FolderMaterial PropertiesNode {
+      get { return mPropertiesNode; }
+    }
+    public FolderMaterial MethodsNode {
+      get { return mMethodsNode; }
+    }
+
+    /// <summary>
+    /// Gets or sets the color of the head.
+    /// </summary>
+    /// <value>The color of the head.</value>
+    public Color HeadColor {
+      get { return mHeadColor; }
+      set {
+        mHeadColor = value;
+
+        if (PaintStyle is GradientPaintStyle)
+          (PaintStyle as GradientPaintStyle).StartColor = value;
+        else if (PaintStyle is SolidPaintStyle)
+          (PaintStyle as SolidPaintStyle).SolidColor = value;
+      }
+    }
+
+    /// <summary>
+    /// Gets the friendly name of the entity to be displayed in the UI
+    /// </summary>
+    /// <value></value>
+    public override string EntityName {
+      get {
+        return "Class Shape";
+      }
+    }
+
+    /// <summary>
+    /// Gets or sets the type of content displayed in the body of the bundle
+    /// </summary>
+    public BodyType BodyType {
+      get {
+        return mBodyType;
+      }
+      set {
+        mBodyType = value;
+        this.UpdateBody();
+      }
+    }
+
+    /// <summary>
+    /// Collapses the shape
+    /// </summary>
+    public void Collapse() {
+      this.mCollapsed = true;
+      UpdateBody();
+      this.Invalidate();
+    }
+
+    /// <summary>
+    /// Expands the bundle to display the body
+    /// </summary>
+    public void Expand() {
+      mCollapsed = false;
+
+      UpdateBody();
+      this.Invalidate();
+    }
+
+    /// <summary>
+    /// Collapses the bundle and hides the body
+    /// </summary>
+    public bool Collapsed {
+      get {
+        return mCollapsed;
+      }
+      //set{mCollapsed = value;}
+    }
+
+    /// <summary>
+    /// Gets the list of items displayed in the body
+    /// </summary>
+    public CollectionBase<ClassShapeItem> List {
+      get {
+        return this.mList;
+      }
+    }
+
+    /// <summary>
+    /// Gets or sets the mSubTitle of the bundle
+    /// </summary>
+    public string SubTitle {
+      get {
+        return mSubTitle;
+      }
+      set {
+        mSubTitle = value;
+        this.Invalidate();
+      }
+    }
+
+    /// <summary>
+    /// Gets or sets the text to be displayed if the body-type is set to FreeText
+    /// </summary>
+    public string FreeText {
+      get {
+        return textMaterial.Text;
+      }
+      set {
+        textMaterial.Text = value;
+        //UpdateBody();
+      }
+    }
+
+    /// <summary>
+    /// Gets or sets the mTitle of the bundle
+    /// </summary>
+    public string Title {
+      get {
+        return mTitle;
+      }
+      set {
+        mTitle = value;
+      }
+    }
+    public override string Text {
+      get {
+        if (BodyType == BodyType.FreeText)
+          return textMaterial.Text;
+        else
+          return string.Empty;
+
+
+      }
+      set {
+        if (BodyType == BodyType.FreeText)
+          textMaterial.Text = value;
+      }
+    }
+
+    /// <summary>
+    /// Gets the folders of the shape which are displayed when its in <see cref="BodyType.List"/> mode.
+    /// </summary>
+    /// <value>The folders.</value>
+    public CollectionBase<FolderMaterial> Folders {
+      get { return mFolders; }
+      internal set { mFolders = value; }
+    }
+    #endregion
+
+    #region Constructors
+
+    // ------------------------------------------------------------------
+    /// <summary>
+    /// Constructor
+    /// </summary>
+    // ------------------------------------------------------------------
+    public ClassShape(IModel model)
+      : base(model) {
+    }
+
+    // ------------------------------------------------------------------
+    /// <summary>
+    /// Initializes a new instance of the <see cref="T:ClassShape"/> 
+    /// class.
+    /// </summary>
+    // ------------------------------------------------------------------
+    public ClassShape()
+      : base() {
+    }
+
+    // ------------------------------------------------------------------
+    /// <summary>
+    /// Initialize of the bundle
+    /// </summary>
+    // ------------------------------------------------------------------
+    protected override void Initialize() {
+      base.Initialize();
+      Name = "Class Shape";
+      mTitle = "Class shape";
+      mSubTitle = "by The Netron Project";
+      this.Resizable = false;
+      sf.Trimming = StringTrimming.EllipsisCharacter;
+      //the initial size
+      Transform(0, 0, 200, 50);
+
+
+      //mList.OnItemAdded += new EventHandler<CollectionEventArgs<ClassShapeItem>>(mList_OnItemAdded);
+
+      #region The icon material
+      CreateShapeIcon();
+      #endregion
+
+      #region The xpand icon material
+      CreateXpansionIcon();
+      #endregion
+
+      #region The free text
+      textMaterial = new LabelMaterial();
+      textMaterial.Transform(new Rectangle(Rectangle.X + 5, Rectangle.Y + 18, Rectangle.Width - 10, bodyHeight));
+      textMaterial.Text = GetQuotation();
+      textMaterial.Visible = false;
+      Children.Add(textMaterial);
+
+      #endregion
+
+      #region The folders
+
+      /* The following code is only an example of what is possible.
              * You can add any shape material here but I guess the properties/methods nodes
              * are quite useful for many purposes.
              */
 
-            string[] props = new string[] { "Rectangle", "Size", "Visible" };
-            FolderMaterial folder1 = new FolderMaterial("Properties", props, "Resources.PublicProperty.ico");
-            folder1.Transform(new Rectangle(Rectangle.X + 5, Rectangle.Y + 55, Rectangle.Width - 10, FolderMaterial.HeaderHeight));
-            folder1.Visible = false;
-            folder1.ShowLines = true;
-            mFolders.Add(folder1);
-            folder1.OnFolderChanged += new EventHandler<RectangleEventArgs>(folders_OnFolderChanged);
-            Children.Add(folder1);
-            mPropertiesNode = folder1;
-
-            string[] methds = new string[] { "Invalidate", "Transform", "Update", "Reset", "Delete" };
-            FolderMaterial folder2 = new FolderMaterial("Methods", methds, "Resources.PublicMethod.ico");
-            folder2.Transform(new Rectangle(Rectangle.X + 5, Rectangle.Y + 55 + FolderMaterial.HeaderHeight + 10, Rectangle.Width - 10, FolderMaterial.HeaderHeight));
-            folder2.Visible = false;
-            folder2.ShowLines = true;
-            mFolders.Add(folder2);
-            folder2.OnFolderChanged += new EventHandler<RectangleEventArgs>(folders_OnFolderChanged);
-            Children.Add(folder2);
-            mMethodsNode = folder2;
-
-            #region this calculates the initial body height
-
-            
-            foreach (FolderMaterial folder in mFolders)
-                bodyHeight += folder.Rectangle.Height + 3;
-
-            //UpdateBody();
-            #endregion
-
-            #endregion
-
-            #region Connectors
-            cTop = new Connector(new Point((int)(Rectangle.Left + Rectangle.Width / 2), Rectangle.Top), Model);
-            cTop.Name = "Top connector";
-            cTop.Parent = this;
-            Connectors.Add(cTop);
-
-            cRight = new Connector(new Point(Rectangle.Right, (int)(Rectangle.Top + Rectangle.Height / 2)), Model);
-            cRight.Name = "Right connector";
-            cRight.Parent = this;
-            Connectors.Add(cRight);
-
-            cBottom = new Connector(new Point((int)(Rectangle.Left + Rectangle.Width / 2), Rectangle.Bottom), Model);
-            cBottom.Name = "Bottom connector";
-            cBottom.Parent = this;
-            Connectors.Add(cBottom);
-
-            cLeft = new Connector(new Point(Rectangle.Left, (int)(Rectangle.Top + Rectangle.Height / 2)), Model);
-            cLeft.Name = "Left connector";
-            cLeft.Parent = this;
-            Connectors.Add(cLeft);
-            #endregion
-
-
-
+      string[] props = new string[] { "Rectangle", "Size", "Visible" };
+      FolderMaterial folder1 = new FolderMaterial("Properties", props, "Resources.PublicProperty.ico");
+      folder1.Transform(new Rectangle(Rectangle.X + 5, Rectangle.Y + 55, Rectangle.Width - 10, FolderMaterial.HeaderHeight));
+      folder1.Visible = false;
+      folder1.ShowLines = true;
+      mFolders.Add(folder1);
+      folder1.OnFolderChanged += new EventHandler<RectangleEventArgs>(folders_OnFolderChanged);
+      Children.Add(folder1);
+      mPropertiesNode = folder1;
+
+      string[] methds = new string[] { "Invalidate", "Transform", "Update", "Reset", "Delete" };
+      FolderMaterial folder2 = new FolderMaterial("Methods", methds, "Resources.PublicMethod.ico");
+      folder2.Transform(new Rectangle(Rectangle.X + 5, Rectangle.Y + 55 + FolderMaterial.HeaderHeight + 10, Rectangle.Width - 10, FolderMaterial.HeaderHeight));
+      folder2.Visible = false;
+      folder2.ShowLines = true;
+      mFolders.Add(folder2);
+      folder2.OnFolderChanged += new EventHandler<RectangleEventArgs>(folders_OnFolderChanged);
+      Children.Add(folder2);
+      mMethodsNode = folder2;
+
+      #region this calculates the initial body height
+
+
+      foreach (FolderMaterial folder in mFolders)
+        bodyHeight += folder.Rectangle.Height + 3;
+
+      //UpdateBody();
+      #endregion
+
+      #endregion
+
+      #region Connectors
+      cTop = new Connector(new Point((int)(Rectangle.Left + Rectangle.Width / 2), Rectangle.Top), Model);
+      cTop.Name = "Top connector";
+      cTop.Parent = this;
+      Connectors.Add(cTop);
+
+      cRight = new Connector(new Point(Rectangle.Right, (int)(Rectangle.Top + Rectangle.Height / 2)), Model);
+      cRight.Name = "Right connector";
+      cRight.Parent = this;
+      Connectors.Add(cRight);
+
+      cBottom = new Connector(new Point((int)(Rectangle.Left + Rectangle.Width / 2), Rectangle.Bottom), Model);
+      cBottom.Name = "Bottom connector";
+      cBottom.Parent = this;
+      Connectors.Add(cBottom);
+
+      cLeft = new Connector(new Point(Rectangle.Left, (int)(Rectangle.Top + Rectangle.Height / 2)), Model);
+      cLeft.Name = "Left connector";
+      cLeft.Parent = this;
+      Connectors.Add(cLeft);
+      #endregion
+
+
+
+    }
+
+    private void CreateXpansionIcon() {
+      //we use a custom version of the ClickableIconMaterial
+      xicon = new SwitchIconMaterial(SwitchIconType.UpDown);
+      //Rectangle rec = new Rectangle(new Point(Rectangle.Right -20, Rectangle.Y + 5), xicon.Icon.Size);            
+      xicon.Transform(new Rectangle(new Point(Rectangle.Right - 20, Rectangle.Y + 7), xicon.Icon.Size));
+      xicon.Gliding = false;
+      xicon.OnExpand += new EventHandler(xicon_OnExpand);
+      xicon.OnCollapse += new EventHandler(xicon_OnCollapse);
+      Children.Add(xicon);
+    }
+
+    private void CreateShapeIcon() {
+      ClickableIconMaterial icon = new ClickableIconMaterial("Resources.ClassShape.png");
+      //IconMaterial icon = new IconMaterial("Resources.idea.gif");
+      if (icon.Icon == null)
+        throw new InconsistencyException("The icon resource of the class shape could not be found.");
+      //Rectangle rec = new Rectangle(new Point(Rectangle.X + 5, Rectangle.Y + 3), icon.Icon.Size);
+      icon.Transform(new Rectangle(new Point(Rectangle.X + 5, Rectangle.Y + 5), icon.Icon.Size));
+      icon.Gliding = false;
+      Children.Add(icon);
+    }
+    /// <summary>
+    /// Handles the <see cref="FolderMaterial.OnFolderChanged"/> event and recalculates the bounding rectangle of the body, which
+    /// depends on the state of the folders when the class shape is in <see cref="BodyType.List"/> mode.
+    /// </summary>
+    /// <param name="sender"></param>
+    /// <param name="e"></param>
+    void folders_OnFolderChanged(object sender, RectangleEventArgs e) {
+      if (mFolders.Count == 0) return;
+      bodyHeight = 0;
+      if (mFolders.Count > 1) //shifting of the folder with respect to its predecessor
+            {
+        for (int k = 1; k < mFolders.Count; k++) {
+          mFolders[k].Transform(new Rectangle(Rectangle.X + 5, mFolders[k - 1].Rectangle.Bottom + 10, Rectangle.Width - 10, FolderMaterial.HeaderHeight));
         }
-
-        private void CreateXpansionIcon()
-        {
-            //we use a custom version of the ClickableIconMaterial
-            xicon = new SwitchIconMaterial(SwitchIconType.UpDown);
-            //Rectangle rec = new Rectangle(new Point(Rectangle.Right -20, Rectangle.Y + 5), xicon.Icon.Size);            
-            xicon.Transform(new Rectangle(new Point(Rectangle.Right - 20, Rectangle.Y + 7), xicon.Icon.Size));
-            xicon.Gliding = false;
-            xicon.OnExpand += new EventHandler(xicon_OnExpand);
-            xicon.OnCollapse += new EventHandler(xicon_OnCollapse);
-            Children.Add(xicon);
+      }
+      foreach (FolderMaterial folder in mFolders)
+        bodyHeight += folder.Rectangle.Height + 3;
+
+      UpdateBody();
+    }
+    /// <summary>
+    /// Handles the <see cref="SwitchIconMaterial.OnCollapse"/> event and sets the state of the class shape to 'collapsed'.
+    /// </summary>
+    /// <param name="sender"></param>
+    /// <param name="e"></param>
+    void xicon_OnCollapse(object sender, EventArgs e) {
+      Collapse();
+    }
+
+    /// <summary>
+    /// Handles the <see cref="SwitchIconMaterial.OnCollapse"/> event and sets the state of the class shape to 'expanded'.
+    /// </summary>
+    /// <param name="sender"></param>
+    /// <param name="e"></param>
+    void xicon_OnExpand(object sender, EventArgs e) {
+      Expand();
+    }
+
+    #endregion
+
+    #region Methods
+
+    /// <summary>
+    /// Updates pens and brushes
+    /// </summary>
+    protected override void UpdatePaintingMaterial() {
+      base.UpdatePaintingMaterial();
+      if (PaintStyle is GradientPaintStyle)
+        mHeadColor = (PaintStyle as GradientPaintStyle).StartColor;
+      else if (PaintStyle is SolidPaintStyle)
+        mHeadColor = (PaintStyle as SolidPaintStyle).SolidColor;
+
+    }
+
+    /// <summary>
+    /// You can safely delete this method, it's gives some variety and tests different text sizes.
+    /// </summary>
+    /// <returns></returns>
+    private string GetQuotation() {
+      Stream stream = Assembly.GetExecutingAssembly().GetManifestResourceStream("Netron.Diagramming.Core.Resources.Quotations.txt");
+      if (stream != null) {
+        Random rnd = new Random();
+        StreamReader reader = new StreamReader(stream);
+        string all = reader.ReadToEnd();
+        string[] quotes = all.Split((char)10);
+        reader.Close();
+        stream.Close();
+        return quotes[rnd.Next(0, quotes.Length)];
+
+      } else
+        return "Intelligence is characterized by a natural incomprehension of life.";
+    }
+
+    /// <summary>
+    /// Paints the bundle on the canvas
+    /// </summary>
+    /// <param name="g"></param>
+    public override void Paint(Graphics g) {
+      #region Set the quality of the drawing
+      g.SmoothingMode = SmoothingMode.HighQuality;
+      #endregion
+
+      #region Artist's material
+      if (Hovered)
+        pen = ArtPalette.HighlightPen;
+      else
+        pen = mPenStyle.DrawingPen();
+      #endregion
+
+      #region Shape's shadow and container
+      path = new GraphicsPath();
+      path.AddArc(Rectangle.X, Rectangle.Y, 20, 20, -180, 90);
+      path.AddLine(Rectangle.X + 10, Rectangle.Y, Rectangle.X + Rectangle.Width - 10, Rectangle.Y);
+      path.AddArc(Rectangle.X + Rectangle.Width - 20, Rectangle.Y, 20, 20, -90, 90);
+      path.AddLine(Rectangle.X + Rectangle.Width, Rectangle.Y + 10, Rectangle.X + Rectangle.Width, Rectangle.Y + Rectangle.Height - 10);
+      path.AddArc(Rectangle.X + Rectangle.Width - 20, Rectangle.Y + Rectangle.Height - 20, 20, 20, 0, 90);
+      path.AddLine(Rectangle.X + Rectangle.Width - 10, Rectangle.Y + Rectangle.Height, Rectangle.X + 10, Rectangle.Y + Rectangle.Height);
+      path.AddArc(Rectangle.X, Rectangle.Y + Rectangle.Height - 20, 20, 20, 90, 90);
+      path.AddLine(Rectangle.X, Rectangle.Y + Rectangle.Height - 10, Rectangle.X, Rectangle.Y + 10);
+      //shadow
+      if (ArtPalette.EnableShadows) {
+        darkRegion = new Region(path);
+        darkRegion.Translate(5, 5);
+        g.FillRegion(ArtPalette.ShadowBrush, darkRegion);
+      }
+      //background
+      g.FillPath(Brush, path);
+
+      #endregion
+
+      #region the header
+      if (mCollapsed) {
+        //paint the gradient                
+        using (gradientBrush = new LinearGradientBrush(Rectangle.Location, new Point(Rectangle.X + Rectangle.Width, Rectangle.Y), HeadColor, Color.White)) {
+          gradientRegion = new Region(path);
+          g.FillRegion(gradientBrush, gradientRegion);
         }
-
-        private void CreateShapeIcon()
-        {
-            ClickableIconMaterial icon = new ClickableIconMaterial("Resources.ClassShape.png");
-            //IconMaterial icon = new IconMaterial("Resources.idea.gif");
-            if(icon.Icon == null)
-                throw new InconsistencyException("The icon resource of the class shape could not be found.");
-            //Rectangle rec = new Rectangle(new Point(Rectangle.X + 5, Rectangle.Y + 3), icon.Icon.Size);
-            icon.Transform(new Rectangle(new Point(Rectangle.X + 5, Rectangle.Y + 5), icon.Icon.Size));
-            icon.Gliding = false;
-            Children.Add(icon);
+      } else {
+        gradientPath = new GraphicsPath();
+        gradientPath.AddArc(Rectangle.X + 1, Rectangle.Y + 1, 18, 18, -180, 90);
+        gradientPath.AddLine(Rectangle.X + 11, Rectangle.Y + 1, Rectangle.X + Rectangle.Width - 11, Rectangle.Y + 1);
+        gradientPath.AddArc(Rectangle.X + Rectangle.Width - 19, Rectangle.Y + 1, 18, 18, -90, 90);
+        gradientPath.AddLine(Rectangle.X + Rectangle.Width - 1, Rectangle.Y + 50, Rectangle.X + 1, Rectangle.Y + 50);
+        //gradient
+        using (gradientBrush = new LinearGradientBrush(Rectangle.Location, new Point(((int)(Rectangle.X + Rectangle.Width)), ((int)(Rectangle.Y))), HeadColor, Color.White)) {
+          gradientRegion = new Region(gradientPath);
+          g.FillRegion(gradientBrush, gradientRegion);
         }
-        /// <summary>
-        /// Handles the <see cref="FolderMaterial.OnFolderChanged"/> event and recalculates the bounding rectangle of the body, which
-        /// depends on the state of the folders when the class shape is in <see cref="BodyType.List"/> mode.
-        /// </summary>
-        /// <param name="sender"></param>
-        /// <param name="e"></param>
-        void folders_OnFolderChanged(object sender, RectangleEventArgs e)
-        {
-            if (mFolders.Count == 0) return;
-            bodyHeight = 0;
-            if (mFolders.Count > 1) //shifting of the folder with respect to its predecessor
-            {
-                for (int k = 1; k < mFolders.Count; k++)
-                {
-                    mFolders[k].Transform(new Rectangle(Rectangle.X + 5, mFolders[k-1].Rectangle.Bottom + 10, Rectangle.Width - 10, FolderMaterial.HeaderHeight));
-                }
-            }
-            foreach (FolderMaterial folder in mFolders)
-                bodyHeight += folder.Rectangle.Height + 3;
-
-            UpdateBody();
+      }
+      #endregion
+
+      #region Border
+      //the border
+      g.DrawPath(pen, path);
+      #endregion
+
+      #region Text and body
+
+      g.DrawString(mTitle, ArtPalette.DefaultBoldFont, Brushes.Black, new Rectangle(Rectangle.X + 20, Rectangle.Y + 5, Rectangle.Width - 45, 27));
+      g.DrawString(mSubTitle, ArtPalette.DefaultFont, Brushes.Black, new RectangleF(Rectangle.X + 20, Rectangle.Y + 35, Rectangle.Width - 10, 30), sf);
+
+
+      #endregion
+
+      #region The material
+      foreach (IPaintable material in Children) {
+        material.Paint(g);
+      }
+      #endregion
+
+      #region The connectors
+      //the connectors
+      if (this.ShowConnectors) {
+        for (int k = 0; k < Connectors.Count; k++) {
+          Connectors[k].Paint(g);
         }
-        /// <summary>
-        /// Handles the <see cref="SwitchIconMaterial.OnCollapse"/> event and sets the state of the class shape to 'collapsed'.
-        /// </summary>
-        /// <param name="sender"></param>
-        /// <param name="e"></param>
-        void xicon_OnCollapse(object sender, EventArgs e)
-        {
-            Collapse();
+      }
+      #endregion
+
+    }
+
+    /// <summary>
+    /// Updates the collapsible body in function of the added properties and methods
+    /// </summary>
+    private void UpdateBody() {
+      if (mCollapsed) {
+
+        if (BodyType == BodyType.None) {
+          xicon.Visible = false;
+        } else
+          xicon.Visible = true;
+        Transform(Rectangle.X, Rectangle.Y, 200, 50);
+
+        textMaterial.Visible = false;
+        foreach (IShapeMaterial material in mFolders)
+          material.Visible = false;
+        return;
+      } else {
+
+        if (BodyType == BodyType.FreeText) {
+          textMaterial.Visible = true;
+          xicon.Visible = true;
+          foreach (IShapeMaterial material in mFolders)
+            material.Visible = false;
+          Transform(Rectangle.X, Rectangle.Y, 200, 90 + 60 + 10);
+
+        } else if (BodyType == BodyType.List) {
+          xicon.Visible = true;
+          textMaterial.Visible = false;
+          foreach (IShapeMaterial material in mFolders)
+            material.Visible = true;
+          Transform(Rectangle.X, Rectangle.Y, 200, bodyHeight + 60 + 10);
+        } else if (BodyType == BodyType.None) {
+          textMaterial.Visible = false;
+          foreach (IShapeMaterial material in mFolders)
+            material.Visible = false;
+          Transform(Rectangle.X, Rectangle.Y, 200, 60 + 10);
+          xicon.Visible = false;
         }
-
-        /// <summary>
-        /// Handles the <see cref="SwitchIconMaterial.OnCollapse"/> event and sets the state of the class shape to 'expanded'.
-        /// </summary>
-        /// <param name="sender"></param>
-        /// <param name="e"></param>
-        void xicon_OnExpand(object sender, EventArgs e)
-        {
-            Expand();
-        }
-
-        #endregion
-
-        #region Methods
-
-        /// <summary>
-        /// Updates pens and brushes
-        /// </summary>
-        protected override void UpdatePaintingMaterial()
-        {
-            base.UpdatePaintingMaterial();
-            if (PaintStyle is GradientPaintStyle)
-                mHeadColor = (PaintStyle as GradientPaintStyle).StartColor;
-            else if (PaintStyle is SolidPaintStyle)
-                mHeadColor = (PaintStyle as SolidPaintStyle).SolidColor;
-               
-        }
-
-        /// <summary>
-        /// You can safely delete this method, it's gives some variety and tests different text sizes.
-        /// </summary>
-        /// <returns></returns>
-        private string GetQuotation()
-        {
-            Stream stream = Assembly.GetExecutingAssembly().GetManifestResourceStream("Netron.Diagramming.Core.Resources.Quotations.txt");
-            if (stream != null)
-            {
-                Random rnd = new Random();
-                StreamReader reader = new StreamReader(stream);
-                string all = reader.ReadToEnd();
-                string[] quotes = all.Split((char)10);
-                reader.Close();
-                stream.Close();
-                return quotes[rnd.Next(0, quotes.Length)];
-
-            }
-            else
-                return "Intelligence is characterized by a natural incomprehension of life.";
-        }
-         
-        /// <summary>
-        /// Paints the bundle on the canvas
-        /// </summary>
-        /// <param name="g"></param>
-        public override void Paint(Graphics g)
-        {
-            #region Set the quality of the drawing
-            g.SmoothingMode = SmoothingMode.HighQuality;
-            #endregion
-
-            #region Artist's material
-            if (Hovered)
-                pen = ArtPalette.HighlightPen;
-            else
-                pen = mPenStyle.DrawingPen();
-            #endregion
-
-            #region Shape's shadow and container
-            path = new GraphicsPath();
-            path.AddArc(Rectangle.X, Rectangle.Y, 20, 20, -180, 90);
-            path.AddLine(Rectangle.X + 10, Rectangle.Y, Rectangle.X + Rectangle.Width - 10, Rectangle.Y);
-            path.AddArc(Rectangle.X + Rectangle.Width - 20, Rectangle.Y, 20, 20, -90, 90);
-            path.AddLine(Rectangle.X + Rectangle.Width, Rectangle.Y + 10, Rectangle.X + Rectangle.Width, Rectangle.Y + Rectangle.Height - 10);
-            path.AddArc(Rectangle.X + Rectangle.Width - 20, Rectangle.Y + Rectangle.Height - 20, 20, 20, 0, 90);
-            path.AddLine(Rectangle.X + Rectangle.Width - 10, Rectangle.Y + Rectangle.Height, Rectangle.X + 10, Rectangle.Y + Rectangle.Height);
-            path.AddArc(Rectangle.X, Rectangle.Y + Rectangle.Height - 20, 20, 20, 90, 90);
-            path.AddLine(Rectangle.X, Rectangle.Y + Rectangle.Height - 10, Rectangle.X, Rectangle.Y + 10);
-            //shadow
-            if (ArtPalette.EnableShadows)
-            {
-                darkRegion = new Region(path);
-                darkRegion.Translate(5, 5);
-                g.FillRegion(ArtPalette.ShadowBrush, darkRegion);
-            }
-            //background
-            g.FillPath(Brush, path);
-
-            #endregion
-
-            #region the header
-            if (mCollapsed)
-            {
-                //paint the gradient                
-                using (gradientBrush = new LinearGradientBrush(Rectangle.Location, new Point(Rectangle.X + Rectangle.Width, Rectangle.Y), HeadColor, Color.White))
-                {
-                    gradientRegion = new Region(path);
-                    g.FillRegion(gradientBrush, gradientRegion);
-                }
-            }
-            else
-            {
-                gradientPath = new GraphicsPath();
-                gradientPath.AddArc(Rectangle.X + 1, Rectangle.Y + 1, 18, 18, -180, 90);
-                gradientPath.AddLine(Rectangle.X + 11, Rectangle.Y + 1, Rectangle.X + Rectangle.Width - 11, Rectangle.Y + 1);
-                gradientPath.AddArc(Rectangle.X + Rectangle.Width - 19, Rectangle.Y + 1, 18, 18, -90, 90);
-                gradientPath.AddLine(Rectangle.X + Rectangle.Width - 1, Rectangle.Y + 50, Rectangle.X + 1, Rectangle.Y + 50);
-                //gradient
-                using (gradientBrush = new LinearGradientBrush(Rectangle.Location, new Point(((int)(Rectangle.X + Rectangle.Width)), ((int)(Rectangle.Y))), HeadColor, Color.White))
-                {
-                    gradientRegion = new Region(gradientPath);
-                    g.FillRegion(gradientBrush, gradientRegion);
-                }
-            }
-            #endregion
-
-            #region Border
-            //the border
-            g.DrawPath(pen, path);
-            #endregion
-
-            #region Text and body
-
-            g.DrawString(mTitle, ArtPalette.DefaultBoldFont, Brushes.Black, new Rectangle(Rectangle.X + 20, Rectangle.Y + 5, Rectangle.Width - 45, 27));
-            g.DrawString(mSubTitle, ArtPalette.DefaultFont, Brushes.Black, new RectangleF(Rectangle.X + 20, Rectangle.Y + 35, Rectangle.Width - 10, 30), sf);
-
-           
-            #endregion
-
-            #region The material
-            foreach (IPaintable material in Children)
-            {
-                material.Paint(g);
-            }
-            #endregion
-
-            #region The connectors
-            //the connectors
-            if (this.ShowConnectors)
-            {
-                for (int k = 0; k < Connectors.Count; k++)
-                {
-                    Connectors[k].Paint(g);
-                }
-            }
-            #endregion
-
-        }
-
-        /// <summary>
-        /// Updates the collapsible body in function of the added properties and methods
-        /// </summary>
-        private void UpdateBody()
-        {
-            if (mCollapsed)
-            {
-
-                if (BodyType == BodyType.None)
-                {
-                    xicon.Visible = false;
-                }
-                else
-                    xicon.Visible = true;
-                Transform(Rectangle.X, Rectangle.Y, 200, 50);
-
-                textMaterial.Visible = false;
-                foreach (IShapeMaterial material in mFolders)
-                    material.Visible = false;
-                return;
-            }
-            else
-            {
-                
-                if (BodyType == BodyType.FreeText)
-                {
-                    textMaterial.Visible = true;
-                    xicon.Visible = true;
-                    foreach (IShapeMaterial material in mFolders)
-                        material.Visible = false;
-                    Transform(Rectangle.X, Rectangle.Y, 200, 90 + 60 + 10);
-
-                }
-                else if (BodyType == BodyType.List)
-                {
-                    xicon.Visible = true;
-                    textMaterial.Visible = false;
-                    foreach (IShapeMaterial material in mFolders)
-                        material.Visible = true;
-                    Transform(Rectangle.X, Rectangle.Y, 200, bodyHeight + 60 + 10);
-                }
-                else if (BodyType == BodyType.None)
-                {
-                    textMaterial.Visible = false;
-                    foreach (IShapeMaterial material in mFolders)
-                        material.Visible = false;
-                    Transform(Rectangle.X, Rectangle.Y, 200, 60 + 10);
-                    xicon.Visible = false;
-                }
-            }
-           
-
-        }
-
-        /// <summary>
-        /// Updates the body of the bundle when an item is added to the list
-        /// </summary>
-        /// <param name="sender">The sender.</param>
-        /// <param name="e">The e.</param>
-        private void mList_OnItemAdded(object sender, CollectionEventArgs<ClassShapeItem> e)
-        {
-            if (this.mBodyType == BodyType.List)
-                this.UpdateBody();
-        }
-        #endregion
-    }
-
-    #region Utility classes
-    /// <summary>
-    /// The <see cref="ClassShape"/>'s two possible variations
-    /// </summary>
-    public enum BodyType
-    {
-        /// <summary>
-        /// The class shape displays a series of <see cref="FolderMaterial"/> folders.
-        /// </summary>
-        List,
-        /// <summary>
-        /// The class shape displays a simple <see cref="LabelMaterial"/> in its body.
-        /// </summary>
-        FreeText,
-        /// <summary>
-        /// The class shape displays only a header and no body content.
-        /// </summary>
-        None
-    }
-
-    [Obsolete]
-    public class ClassShapeItemCollection : Netron.Diagramming.Core.CollectionBase<ClassShapeItem>, IEnumerable<ClassShapeItem>
-    {
-
-
-    }
-
-
-
-
-    /// <summary>
-    /// An item in the <see cref="ClassShape"/>.
-    /// </summary>
-    public class ClassShapeItem
-    {
-        #region Fields
-        private string mText;
-        private Bitmap mIcon;
-        #endregion
-
-        #region Properties
-        /// <summary>
-        /// Gets or sets the text.
-        /// </summary>
-        /// <value>The text.</value>
-        public string Text
-        {
-            get
-            {
-                return mText;
-            }
-            set
-            {
-                mText = value;
-            }
-        }
-
-        /// <summary>
-        /// Gets or sets the icon.
-        /// </summary>
-        /// <value>The icon.</value>
-        public Bitmap Icon
-        {
-            get
-            {
-                return mIcon;
-            }
-            set
-            {
-                mIcon = value;
-            }
-        }
-
-        #endregion
-
-        /// <summary>
-        /// Initializes a new instance of the <see cref="T:ClassShapeItem"/> class.
-        /// </summary>
-        public ClassShapeItem()
-        {
-        }
-
-        /// <summary>
-        /// Initializes a new instance of the <see cref="T:ClassShapeItem"/> class.
-        /// </summary>
-        /// <param name="text">The text.</param>
-        public ClassShapeItem(string text)
-        {
-            this.mText = text;
-        }
-
-        /// <summary>
-        /// Initializes a new instance of the <see cref="T:ClassShapeItem"/> class.
-        /// </summary>
-        /// <param name="text">The text.</param>
-        /// <param name="icon">The icon.</param>
-        public ClassShapeItem(string text, Bitmap icon)
-            : this(text)
-        {
-            this.mIcon = icon;
-        }
-
-    }
-    /// <summary>
-    /// Utility class to pass ClassShape info via events.
-    /// </summary>
-    public class ClassShapeEventArgs : EventArgs
-    {
-        private ClassShapeItem item;
-
-        /// <summary>
-        /// Gets or sets the item.
-        /// </summary>
-        /// <value>The item.</value>
-        public ClassShapeItem Item
-        {
-            get
-            {
-                return item;
-            }
-            set
-            {
-                item = value;
-            }
-        }
-
-        /// <summary>
-        /// Initializes a new instance of the <see cref="T:ClassShapeEventArgs"/> class.
-        /// </summary>
-        /// <param name="item">The item.</param>
-        public ClassShapeEventArgs(ClassShapeItem item)
-        {
-            this.item = item;
-        }
+      }
+
+
+    }
+
+    /// <summary>
+    /// Updates the body of the bundle when an item is added to the list
+    /// </summary>
+    /// <param name="sender">The sender.</param>
+    /// <param name="e">The e.</param>
+    private void mList_OnItemAdded(object sender, CollectionEventArgs<ClassShapeItem> e) {
+      if (this.mBodyType == BodyType.List)
+        this.UpdateBody();
     }
     #endregion
+  }
+
+  #region Utility classes
+  /// <summary>
+  /// The <see cref="ClassShape"/>'s two possible variations
+  /// </summary>
+  public enum BodyType {
+    /// <summary>
+    /// The class shape displays a series of <see cref="FolderMaterial"/> folders.
+    /// </summary>
+    List,
+    /// <summary>
+    /// The class shape displays a simple <see cref="LabelMaterial"/> in its body.
+    /// </summary>
+    FreeText,
+    /// <summary>
+    /// The class shape displays only a header and no body content.
+    /// </summary>
+    None
+  }
+
+  [Obsolete]
+  public class ClassShapeItemCollection : Netron.Diagramming.Core.CollectionBase<ClassShapeItem>, IEnumerable<ClassShapeItem> {
+
+
+  }
+
+
+
+
+  /// <summary>
+  /// An item in the <see cref="ClassShape"/>.
+  /// </summary>
+  public class ClassShapeItem {
+    #region Fields
+    private string mText;
+    private Bitmap mIcon;
+    #endregion
+
+    #region Properties
+    /// <summary>
+    /// Gets or sets the text.
+    /// </summary>
+    /// <value>The text.</value>
+    public string Text {
+      get {
+        return mText;
+      }
+      set {
+        mText = value;
+      }
+    }
+
+    /// <summary>
+    /// Gets or sets the icon.
+    /// </summary>
+    /// <value>The icon.</value>
+    public Bitmap Icon {
+      get {
+        return mIcon;
+      }
+      set {
+        mIcon = value;
+      }
+    }
+
+    #endregion
+
+    /// <summary>
+    /// Initializes a new instance of the <see cref="T:ClassShapeItem"/> class.
+    /// </summary>
+    public ClassShapeItem() {
+    }
+
+    /// <summary>
+    /// Initializes a new instance of the <see cref="T:ClassShapeItem"/> class.
+    /// </summary>
+    /// <param name="text">The text.</param>
+    public ClassShapeItem(string text) {
+      this.mText = text;
+    }
+
+    /// <summary>
+    /// Initializes a new instance of the <see cref="T:ClassShapeItem"/> class.
+    /// </summary>
+    /// <param name="text">The text.</param>
+    /// <param name="icon">The icon.</param>
+    public ClassShapeItem(string text, Bitmap icon)
+      : this(text) {
+      this.mIcon = icon;
+    }
+
+  }
+  /// <summary>
+  /// Utility class to pass ClassShape info via events.
+  /// </summary>
+  public class ClassShapeEventArgs : EventArgs {
+    private ClassShapeItem item;
+
+    /// <summary>
+    /// Gets or sets the item.
+    /// </summary>
+    /// <value>The item.</value>
+    public ClassShapeItem Item {
+      get {
+        return item;
+      }
+      set {
+        item = value;
+      }
+    }
+
+    /// <summary>
+    /// Initializes a new instance of the <see cref="T:ClassShapeEventArgs"/> class.
+    /// </summary>
+    /// <param name="item">The item.</param>
+    public ClassShapeEventArgs(ClassShapeItem item) {
+      this.item = item;
+    }
+  }
+  #endregion
 }
Index: /trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.Netron/3.0.2672.12446/Netron.Diagramming.Core-3.0.2672.12446/Diagram elements/Shapes/FileShape.cs
===================================================================
--- /trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.Netron/3.0.2672.12446/Netron.Diagramming.Core-3.0.2672.12446/Diagram elements/Shapes/FileShape.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.Netron/3.0.2672.12446/Netron.Diagramming.Core-3.0.2672.12446/Diagram elements/Shapes/FileShape.cs	(revision 4068)
@@ -1,346 +1,310 @@
 using System;
-using System.Collections.Generic;
-using System.Text;
+using System.Diagnostics;
+using System.Drawing;
 using System.IO;
-using System.Drawing;
 using System.Runtime.InteropServices;
 using System.Windows.Forms;
-using System.Diagnostics;
-
-namespace Netron.Diagramming.Core
-{
-    // ----------------------------------------------------------------------
-    /// <summary>
-    /// A shape used for a shortcut to a file.
-    /// </summary>
-    // ----------------------------------------------------------------------
-    [Serializable()]
-    public class FileShape : ComplexShapeBase
-    {
-        // ------------------------------------------------------------------
-        /// <summary>
-        /// Implementation of IVersion - the FileShape's current version.
-        /// </summary>
-        // ------------------------------------------------------------------
-        protected double fileShapeVersion = 1.0;
-
-        // ------------------------------------------------------------------
-        /// <summary>
-        /// The complete path to the file we're to open when this shape is
-        /// double-clicked.
-        /// </summary>
-        // ------------------------------------------------------------------
-        protected string myFileName = String.Empty;
-
-        // ------------------------------------------------------------------
-        /// <summary>
-        /// The IconLabelMaterial used to show the file's icon.
-        /// </summary>
-        // ------------------------------------------------------------------
-        IconLabelMaterial myIcon = null;
-
-        // ------------------------------------------------------------------
-        /// <summary>
-        /// The LabelMaterial used to show the file's name.
-        /// </summary>
-        // ------------------------------------------------------------------
-        LabelMaterial myLabel = null;
-
-        // ------------------------------------------------------------------
-        /// <summary>
-        /// Gets the 'friendly' name of this shape.
-        /// </summary>
-        // ------------------------------------------------------------------
-        public override string EntityName
-        {
-            get 
-            {
-                return "File";
-            }
+
+namespace Netron.Diagramming.Core {
+  // ----------------------------------------------------------------------
+  /// <summary>
+  /// A shape used for a shortcut to a file.
+  /// </summary>
+  // ----------------------------------------------------------------------
+  [Serializable()]
+  public class FileShape : ComplexShapeBase {
+    // ------------------------------------------------------------------
+    /// <summary>
+    /// Implementation of IVersion - the FileShape's current version.
+    /// </summary>
+    // ------------------------------------------------------------------
+    protected double fileShapeVersion = 1.0;
+
+    // ------------------------------------------------------------------
+    /// <summary>
+    /// The complete path to the file we're to open when this shape is
+    /// double-clicked.
+    /// </summary>
+    // ------------------------------------------------------------------
+    protected string myFileName = String.Empty;
+
+    // ------------------------------------------------------------------
+    /// <summary>
+    /// The IconLabelMaterial used to show the file's icon.
+    /// </summary>
+    // ------------------------------------------------------------------
+    IconLabelMaterial myIcon = null;
+
+    // ------------------------------------------------------------------
+    /// <summary>
+    /// The LabelMaterial used to show the file's name.
+    /// </summary>
+    // ------------------------------------------------------------------
+    LabelMaterial myLabel = null;
+
+    // ------------------------------------------------------------------
+    /// <summary>
+    /// Gets the 'friendly' name of this shape.
+    /// </summary>
+    // ------------------------------------------------------------------
+    public override string EntityName {
+      get {
+        return "File";
+      }
+    }
+
+    // ------------------------------------------------------------------
+    /// <summary>
+    /// Gets the version of this file shape.
+    /// </summary>
+    // ------------------------------------------------------------------
+    public override double Version {
+      get {
+        return fileShapeVersion;
+      }
+    }
+
+    // ------------------------------------------------------------------
+    /// <summary>
+    /// Gets or sets the complete path to the file we're to open when this
+    /// shape is double-clicked.
+    /// </summary>
+    // ------------------------------------------------------------------
+    public string FileName {
+      get {
+        return myFileName;
+      }
+      set {
+        try {
+          FileInfo info = new FileInfo(value);
+          if (info.Exists) {
+            myFileName = value;
+            CreateIcon(myFileName);
+            CreateLabel(info.Name);
+          }
         }
-
-        // ------------------------------------------------------------------
-        /// <summary>
-        /// Gets the version of this file shape.
-        /// </summary>
-        // ------------------------------------------------------------------
-        public override double Version
-        {
-            get
-            {
-                return fileShapeVersion;
-            }
+        catch {
         }
-
-        // ------------------------------------------------------------------
-        /// <summary>
-        /// Gets or sets the complete path to the file we're to open when this
-        /// shape is double-clicked.
-        /// </summary>
-        // ------------------------------------------------------------------
-        public string FileName
-        {
-            get
-            {
-                return myFileName;
-            }
-            set
-            {
-                try
-                {
-                    FileInfo info = new FileInfo(value);
-                    if (info.Exists)
-                    {
-                        myFileName = value;
-                        CreateIcon(myFileName);
-                        CreateLabel(info.Name);
-                    }
-                }
-                catch
-                {
-                }
-            }
+      }
+    }
+
+    // ------------------------------------------------------------------
+    /// <summary>
+    /// Gets or sets if this shape is resizable - the FileShape is not
+    /// resizable.
+    /// </summary>
+    // ------------------------------------------------------------------
+    public override bool Resizable {
+      get {
+        return false;
+      }
+      set {
+        base.Resizable = value;
+      }
+    }
+
+    // ------------------------------------------------------------------
+    /// <summary>
+    /// Constructor.
+    /// </summary>
+    // ------------------------------------------------------------------
+    public FileShape()
+      : base() {
+      myIcon = new IconLabelMaterial();
+      myIcon.Icon = (Bitmap)ImagePalette.Shortcut;
+      myIcon.Shape = this;
+      Children.Add(myIcon);
+    }
+
+    // ------------------------------------------------------------------
+    /// <summary>
+    /// Constructor that receives the path to the file.
+    /// </summary>
+    /// <param name="filename">string: The complete path to the file we're 
+    /// to open when this shape is double-clicked.</param>
+    // ------------------------------------------------------------------
+    public FileShape(string filename)
+      : base() {
+      FileName = filename;
+    }
+
+    #region Overrides
+
+    // ------------------------------------------------------------------
+    /// <summary>
+    /// Opens the file when this shape is double-clicked.
+    /// </summary>
+    /// <param name="e">MouseEventArgs</param>
+    /// <returns>bool: True if handled.</returns>
+    // ------------------------------------------------------------------
+    public override bool MouseDown(MouseEventArgs e) {
+      if ((e.Button == MouseButtons.Left) &&
+          (e.Clicks == 2) &&
+          (this.myFileName != String.Empty)) {
+        try {
+          Process.Start(this.myFileName);
+          return true;
         }
-
-        // ------------------------------------------------------------------
-        /// <summary>
-        /// Gets or sets if this shape is resizable - the FileShape is not
-        /// resizable.
-        /// </summary>
-        // ------------------------------------------------------------------
-        public override bool Resizable
-        {
-            get
-            {
-                return false;
-            }
-            set
-            {
-                base.Resizable = value;
-            }
+        catch (Exception ex) {
+          MessageBox.Show("Unable to open the file.\n" + ex.Message);
+          return false;
         }
-
-        // ------------------------------------------------------------------
-        /// <summary>
-        /// Constructor.
-        /// </summary>
-        // ------------------------------------------------------------------
-        public FileShape()
-            : base()
-        {
-            myIcon = new IconLabelMaterial();
-            myIcon.Icon = (Bitmap) ImagePalette.Shortcut;
-            myIcon.Shape = this;
-            Children.Add(myIcon);
-        }
-
-        // ------------------------------------------------------------------
-        /// <summary>
-        /// Constructor that receives the path to the file.
-        /// </summary>
-        /// <param name="filename">string: The complete path to the file we're 
-        /// to open when this shape is double-clicked.</param>
-        // ------------------------------------------------------------------
-        public FileShape(string filename) : base()
-        {
-            FileName = filename;
-        }
-
-        #region Overrides
-
-        // ------------------------------------------------------------------
-        /// <summary>
-        /// Opens the file when this shape is double-clicked.
-        /// </summary>
-        /// <param name="e">MouseEventArgs</param>
-        /// <returns>bool: True if handled.</returns>
-        // ------------------------------------------------------------------
-        public override bool MouseDown(MouseEventArgs e)
-        {
-            if ((e.Button == MouseButtons.Left) &&
-                (e.Clicks == 2) &&
-                (this.myFileName != String.Empty) )
-            {
-                try
-                {
-                    Process.Start(this.myFileName);
-                    return true;
-                }
-                catch (Exception ex)
-                {
-                    MessageBox.Show("Unable to open the file.\n" + ex.Message);
-                    return false;
-                }
-            }
-            return base.MouseDown(e);
-        }
-
-        #endregion
-
-        // ------------------------------------------------------------------
-        /// <summary>
-        /// Loads the icon from Windows for the filename specified and
-        /// creates our 'icon'.
-        /// </summary>
-        /// <param name="filename">string</param>
-        // ------------------------------------------------------------------
-        void CreateIcon(string filename)
-        {
-            if (this.myIcon == null)
-            {
-                this.myIcon = new IconLabelMaterial();
-                Children.Add(myIcon);
-                this.myIcon.Shape = this;
-            }
-
-            try
-            {
-                this.myIcon.Icon = GetIconForFile(filename, false).ToBitmap();               
-            }
-            catch
-            {
-                this.myIcon.Icon = (Bitmap) ImagePalette.Shortcut;
-            }
-            this.myIcon.Transform(new Rectangle(Location, new Size(1, 1)));
-            Transform(myIcon.Rectangle);
-        }
-
-        // ------------------------------------------------------------------
-        /// <summary>
-        /// Creates the label that shows the file's name.
-        /// </summary>
-        /// <param name="filename">string: The name to show in the 
-        /// label.</param>
-        // ------------------------------------------------------------------
-        void CreateLabel(string filename)
-        {
-            if (this.myLabel == null)
-            {
-                this.myLabel = new LabelMaterial();
-                Children.Add(this.myLabel);
-            }
-
-            this.myLabel.Text = filename;
-        }
-
-        // ------------------------------------------------------------------
-        /// <summary>
-        /// Draws this shape to the GDI+ graphics surface specified.
-        /// </summary>
-        /// <param name="g">Graphics</param>
-        // ------------------------------------------------------------------
-        public override void Paint(Graphics g)
-        {
-            this.myIcon.Paint(g);
-
-            int iconWidth = myIcon.Icon.Width;
-            int iconHeight = myIcon.Icon.Height;
-
-            // Make the max available label width a little bigger than the
-            // icon.
-            SizeF labelSize = g.MeasureString(myLabel.Text,
-                myLabel.Font,
-                myIcon.Icon.Width + 100);
-            
-            // Position the label just under the icon and center it.
-            int xOffset = ((int)labelSize.Width - iconWidth) / 2;
-
-            Point labelLocation = new Point(
-                myIcon.Rectangle.Location.X - xOffset,
-                myIcon.Rectangle.Location.Y + iconHeight + 5);            
-
-            this.myLabel.Transform(new Rectangle(
-                labelLocation,
-                Size.Round(labelSize)));
-
-            this.myLabel.Paint(g);
-
-            mRectangle.Width = myIcon.Icon.Width + 20;
-            mRectangle.Location = new Point(
-                myIcon.Rectangle.X - 10,
-                mRectangle.Y);
-
-            if (labelSize.Width > iconWidth)
-            {
-                mRectangle.Width = (int)labelSize.Width + 20;
-                mRectangle.Location = new Point(
-                    myLabel.Rectangle.X - 10,
-                    mRectangle.Y);
-            }
-
-            mRectangle.Height = 
-                myIcon.Icon.Height + 
-                myLabel.Rectangle.Height + 20;
-        }
-
-        #region Get Icon Associated With A File
-
-        [StructLayout(LayoutKind.Sequential)]
-        public struct SHFILEINFO
-        {
-            public IntPtr hIcon;
-            public IntPtr iIcon;
-            public int dwAttributes;
-            [MarshalAs(UnmanagedType.ByValTStr, SizeConst = 260)]
-            public string szDisplayName;
-            [MarshalAs(UnmanagedType.ByValTStr, SizeConst = 80)]
-            public string szTypeName;
-        };
-
-        internal class Win32
-        {
-            public const uint SHGFI_ICON = 0x100;
-            public const uint SHGFI_LARGEICON = 0x0;    // 'Large icon
-            public const uint SHGFI_SMALLICON = 0x1;    // 'Small icon
-
-            [DllImport("shell32.dll")]
-            public static extern IntPtr SHGetFileInfo(string pszPath,
-                uint dwFileAttributes,
-                ref SHFILEINFO psfi,
-                uint cbSizeFileInfo,
-                uint uFlags);
-        }
-
-        // ------------------------------------------------------------------
-        /// <summary>
-        /// Returns the Icon associated with the file specified.
-        /// </summary>
-        /// <param name="fileName"></param>
-        /// <param name="smallImage">bool: Get the small image or the
-        /// big one?</param>
-        /// <returns></returns>
-        // ------------------------------------------------------------------
-        public static Icon GetIconForFile(string fileName, bool smallImage)
-        {
-            IntPtr hImgSmall;    //the handle to the system small image list
-            IntPtr hImgLarge;    //the handle to the system large image list
-            SHFILEINFO shinfo = new SHFILEINFO();
-
-            // Get the small image if we're supposed to.
-            if (smallImage)
-            {
-                hImgSmall = Win32.SHGetFileInfo(
-                    fileName,
-                    0,
-                    ref shinfo,
-                    (uint)Marshal.SizeOf(shinfo),
-                    Win32.SHGFI_ICON | Win32.SHGFI_SMALLICON);
-            }
-            else
-            {
-                // Otherwise get the large image.
-                hImgLarge = Win32.SHGetFileInfo(
-                    fileName,
-                    0,
-                    ref shinfo,
-                    (uint)Marshal.SizeOf(shinfo),
-                    Win32.SHGFI_ICON | Win32.SHGFI_LARGEICON);
-            }
-
-            // Return the image.
-            return System.Drawing.Icon.FromHandle(shinfo.hIcon);
-        }
-
-        #endregion
-    }
+      }
+      return base.MouseDown(e);
+    }
+
+    #endregion
+
+    // ------------------------------------------------------------------
+    /// <summary>
+    /// Loads the icon from Windows for the filename specified and
+    /// creates our 'icon'.
+    /// </summary>
+    /// <param name="filename">string</param>
+    // ------------------------------------------------------------------
+    void CreateIcon(string filename) {
+      if (this.myIcon == null) {
+        this.myIcon = new IconLabelMaterial();
+        Children.Add(myIcon);
+        this.myIcon.Shape = this;
+      }
+
+      try {
+        this.myIcon.Icon = GetIconForFile(filename, false).ToBitmap();
+      }
+      catch {
+        this.myIcon.Icon = (Bitmap)ImagePalette.Shortcut;
+      }
+      this.myIcon.Transform(new Rectangle(Location, new Size(1, 1)));
+      Transform(myIcon.Rectangle);
+    }
+
+    // ------------------------------------------------------------------
+    /// <summary>
+    /// Creates the label that shows the file's name.
+    /// </summary>
+    /// <param name="filename">string: The name to show in the 
+    /// label.</param>
+    // ------------------------------------------------------------------
+    void CreateLabel(string filename) {
+      if (this.myLabel == null) {
+        this.myLabel = new LabelMaterial();
+        Children.Add(this.myLabel);
+      }
+
+      this.myLabel.Text = filename;
+    }
+
+    // ------------------------------------------------------------------
+    /// <summary>
+    /// Draws this shape to the GDI+ graphics surface specified.
+    /// </summary>
+    /// <param name="g">Graphics</param>
+    // ------------------------------------------------------------------
+    public override void Paint(Graphics g) {
+      this.myIcon.Paint(g);
+
+      int iconWidth = myIcon.Icon.Width;
+      int iconHeight = myIcon.Icon.Height;
+
+      // Make the max available label width a little bigger than the
+      // icon.
+      SizeF labelSize = g.MeasureString(myLabel.Text,
+          myLabel.Font,
+          myIcon.Icon.Width + 100);
+
+      // Position the label just under the icon and center it.
+      int xOffset = ((int)labelSize.Width - iconWidth) / 2;
+
+      Point labelLocation = new Point(
+          myIcon.Rectangle.Location.X - xOffset,
+          myIcon.Rectangle.Location.Y + iconHeight + 5);
+
+      this.myLabel.Transform(new Rectangle(
+          labelLocation,
+          Size.Round(labelSize)));
+
+      this.myLabel.Paint(g);
+
+      mRectangle.Width = myIcon.Icon.Width + 20;
+      mRectangle.Location = new Point(
+          myIcon.Rectangle.X - 10,
+          mRectangle.Y);
+
+      if (labelSize.Width > iconWidth) {
+        mRectangle.Width = (int)labelSize.Width + 20;
+        mRectangle.Location = new Point(
+            myLabel.Rectangle.X - 10,
+            mRectangle.Y);
+      }
+
+      mRectangle.Height =
+          myIcon.Icon.Height +
+          myLabel.Rectangle.Height + 20;
+    }
+
+    #region Get Icon Associated With A File
+
+    [StructLayout(LayoutKind.Sequential)]
+    public struct SHFILEINFO {
+      public IntPtr hIcon;
+      public IntPtr iIcon;
+      public int dwAttributes;
+      [MarshalAs(UnmanagedType.ByValTStr, SizeConst = 260)]
+      public string szDisplayName;
+      [MarshalAs(UnmanagedType.ByValTStr, SizeConst = 80)]
+      public string szTypeName;
+    };
+
+    internal class Win32 {
+      public const uint SHGFI_ICON = 0x100;
+      public const uint SHGFI_LARGEICON = 0x0;    // 'Large icon
+      public const uint SHGFI_SMALLICON = 0x1;    // 'Small icon
+
+      [DllImport("shell32.dll")]
+      public static extern IntPtr SHGetFileInfo(string pszPath,
+          uint dwFileAttributes,
+          ref SHFILEINFO psfi,
+          uint cbSizeFileInfo,
+          uint uFlags);
+    }
+
+    // ------------------------------------------------------------------
+    /// <summary>
+    /// Returns the Icon associated with the file specified.
+    /// </summary>
+    /// <param name="fileName"></param>
+    /// <param name="smallImage">bool: Get the small image or the
+    /// big one?</param>
+    /// <returns></returns>
+    // ------------------------------------------------------------------
+    public static Icon GetIconForFile(string fileName, bool smallImage) {
+      IntPtr hImgSmall;    //the handle to the system small image list
+      IntPtr hImgLarge;    //the handle to the system large image list
+      SHFILEINFO shinfo = new SHFILEINFO();
+
+      // Get the small image if we're supposed to.
+      if (smallImage) {
+        hImgSmall = Win32.SHGetFileInfo(
+            fileName,
+            0,
+            ref shinfo,
+            (uint)Marshal.SizeOf(shinfo),
+            Win32.SHGFI_ICON | Win32.SHGFI_SMALLICON);
+      } else {
+        // Otherwise get the large image.
+        hImgLarge = Win32.SHGetFileInfo(
+            fileName,
+            0,
+            ref shinfo,
+            (uint)Marshal.SizeOf(shinfo),
+            Win32.SHGFI_ICON | Win32.SHGFI_LARGEICON);
+      }
+
+      // Return the image.
+      return System.Drawing.Icon.FromHandle(shinfo.hIcon);
+    }
+
+    #endregion
+  }
 }
Index: /trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.Netron/3.0.2672.12446/Netron.Diagramming.Core-3.0.2672.12446/Diagram elements/Shapes/ImageShape.cs
===================================================================
--- /trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.Netron/3.0.2672.12446/Netron.Diagramming.Core-3.0.2672.12446/Diagram elements/Shapes/ImageShape.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.Netron/3.0.2672.12446/Netron.Diagramming.Core-3.0.2672.12446/Diagram elements/Shapes/ImageShape.cs	(revision 4068)
@@ -1,239 +1,209 @@
 using System;
-using System.Collections;
-using System.ComponentModel;
 using System.Diagnostics;
 using System.Drawing;
-using System.Drawing.Drawing2D;
-using System.Drawing.Printing;
 using System.IO;
-using System.Drawing.Design;
-using System.Runtime.CompilerServices;
-using System.Runtime.Serialization;
-using System.Runtime.Serialization.Formatters.Binary;
 using System.Reflection;
-using System.Threading;
 using System.Windows.Forms;
 
-namespace Netron.Diagramming.Core
-{
-	/// <summary>
-	/// This shape allows you to use any picture as inside a rectangular area.
-	/// </summary>	
-    public partial class ImageShape : SimpleShapeBase
-	{
-        #region Fields
-
-        // ------------------------------------------------------------------
-        /// <summary>
-        /// Implementation of IVersion - the current version of 
-        /// ImageShape.
-        /// </summary>
-        // ------------------------------------------------------------------
-        protected const double imageShapeVersion = 1.0;
-
-		#region the connectors
-        private Connector cBottom, cLeft, cRight, cTop;	
-		private string mImagePath;
-		private Image mImage;
-		#endregion
-		#endregion
-
-        #region Properties
-
-        // ------------------------------------------------------------------
-        /// <summary>
-        /// Gets the current version.
-        /// </summary>
-        // ------------------------------------------------------------------
-        public override double Version
-        {
-            get
-            {
-                return imageShapeVersion;
-            }
-        }
-
-        /// <summary>
-        /// Gets the friendly name of the entity to be displayed in the UI
-        /// </summary>
-        /// <value></value>
-        public override string EntityName
-        {
-            get
-            {
-                return "Image shape";
-            }
-        }
-        /// <summary>
-        /// Gets or sets the image path.
-        /// </summary>
-        /// <value>The image path.</value>
-		public string ImagePath
-		{
-			get{return mImagePath;}
-			set{
-				if(value==string.Empty) return;
-				if(File.Exists(value))
-				{
-					try
-					{
-						mImage = Image.FromFile(value);
-						Transform(Rectangle.X, Rectangle.Y, mImage.Width, mImage.Height);
-					}
-					catch(Exception exc)
-					{
-                        Trace.WriteLine(exc.Message);
-					}
-					mImagePath = value;
-				}
-				else
-					MessageBox.Show("The specified file does not exist.","Error", MessageBoxButtons.OK, MessageBoxIcon.Warning);
-			}
-		}
-
-        /// <summary>
-        /// Gets or sets the image.
-        /// </summary>
-        /// <value>The image.</value>
-		public Image Image
-		{
-			get{return mImage;}
-			set{
-				if(value==null) return;
-				mImage = value;
-				mImagePath = string.Empty;
-				Transform(Rectangle.X, Rectangle.Y, mImage.Width, mImage.Height);			
-			}
-		}
-		#endregion
-
-		#region Constructor
-
-		/// <summary>
-		/// Constructor
-		/// </summary>
-		public ImageShape() : base()
-		{
-		}
-		/// <summary>
-		/// This is the default constructor of the class.
-		/// </summary>
-		public ImageShape(IModel site) : base(site)
-		{
-		}
-		
-		#endregion	
-
-		#region Methods
-
-        // -----------------------------------------------------------------
-        /// <summary>
-        /// Initializes this instance.
-        /// </summary>
-        // -----------------------------------------------------------------
-        protected override void Initialize()
-        {
-            base.Initialize();
-            //the initial size
-            Transform(0, 0, 200, 50);
-            #region Connectors
-            cTop = new Connector(new Point((int)(Rectangle.Left + Rectangle.Width / 2), Rectangle.Top), Model);
-            cTop.Name = "Top connector";
-            cTop.Parent = this;
-            Connectors.Add(cTop);
-
-            cRight = new Connector(new Point(Rectangle.Right, (int)(Rectangle.Top + Rectangle.Height / 2)), Model);
-            cRight.Name = "Right connector";
-            cRight.Parent = this;
-            Connectors.Add(cRight);
-
-            cBottom = new Connector(new Point((int)(Rectangle.Left + Rectangle.Width / 2), Rectangle.Bottom), Model);
-            cBottom.Name = "Bottom connector";
-            cBottom.Parent = this;
-            Connectors.Add(cBottom);
-
-            cLeft = new Connector(new Point(Rectangle.Left, (int)(Rectangle.Top + Rectangle.Height / 2)), Model);
-            cLeft.Name = "Left connector";
-            cLeft.Parent = this;
-            Connectors.Add(cLeft);
-            #endregion
-        }
-
-		/// <summary>
-		/// Adds additional stuff to the shape's menu
-		/// </summary>
-        /// <returns>ToolStripItem[]</returns>
-        public override ToolStripItem[] Menu()
-		{
-
-            ToolStripMenuItem item = new ToolStripMenuItem(
-                "Reset image size");
-
-            item.Click += new EventHandler(OnResetImageSize);
-
-            ToolStripItem[] items = new ToolStripItem[] { item };
-
-			return items;
-		}
-		/// <summary>
-		/// Resets the original image size
-		/// </summary>
-		/// <param name="sender"></param>
-		/// <param name="e"></param>
-		private void OnResetImageSize(object sender, EventArgs e)
-		{
-			Transform(Rectangle.X, Rectangle.Y, mImage.Width, mImage.Height);
-			this.Invalidate();
-		}
-
-		/// <summary>
-		/// Overrides the default bitmap used in the shape viewer
-		/// </summary>
-		/// <returns></returns>
-		public  Bitmap GetThumbnail()
-		{
-			Bitmap bmp=null;
-			try
-			{
-				Stream stream=Assembly.GetExecutingAssembly().GetManifestResourceStream("Netron.GraphLib.BasicShapes.Resources.ImageShape.gif");
-					
-				bmp= Bitmap.FromStream(stream) as Bitmap;
-				stream.Close();
-				stream=null;
-			}
-			catch(Exception exc)
-			{
-				Trace.WriteLine(exc.Message,"ImageShape.GetThumbnail");
-			}
-			return bmp;
-		}
-		
-		/// <summary>
-		/// Paints the shape of the person object in the plex. Here you can let your imagination go.
-		/// MAKE IT PERFORMANT, this is a killer method called 200.000 times a minute!
-		/// </summary>
-		/// <param name="g">The graphics canvas onto which to paint</param>
-		public override void Paint(Graphics g)
-		{
-			base.Paint(g);
-            //if(RecalculateSize)
-            //{
-            //    Rectangle = new RectangleF(new PointF(Rectangle.X,Rectangle.Y),
-            //        g.MeasureString(this.Text,Font));	
-            //    Rectangle = System.Drawing.RectangleF.Inflate(Rectangle,10,10);
-            //    RecalculateSize = false; //very important!
-            //}
-			if(mImage==null)
-			{
-				g.FillRectangle(Brush, Rectangle);
-				StringFormat sf = new StringFormat();
-				sf.Alignment = StringAlignment.Center;
-				g.DrawString("Image shape", ArtPalette.DefaultFont, Brushes.Black, Rectangle.X + (Rectangle.Width / 2), Rectangle.Y + 3, sf);
-			}
-			else
-				g.DrawImage(mImage, Rectangle);				
-		}
-		#endregion
-	}
+namespace Netron.Diagramming.Core {
+  /// <summary>
+  /// This shape allows you to use any picture as inside a rectangular area.
+  /// </summary>	
+  public partial class ImageShape : SimpleShapeBase {
+    #region Fields
+
+    // ------------------------------------------------------------------
+    /// <summary>
+    /// Implementation of IVersion - the current version of 
+    /// ImageShape.
+    /// </summary>
+    // ------------------------------------------------------------------
+    protected const double imageShapeVersion = 1.0;
+
+    #region the connectors
+    private Connector cBottom, cLeft, cRight, cTop;
+    private string mImagePath;
+    private Image mImage;
+    #endregion
+    #endregion
+
+    #region Properties
+
+    // ------------------------------------------------------------------
+    /// <summary>
+    /// Gets the current version.
+    /// </summary>
+    // ------------------------------------------------------------------
+    public override double Version {
+      get {
+        return imageShapeVersion;
+      }
+    }
+
+    /// <summary>
+    /// Gets the friendly name of the entity to be displayed in the UI
+    /// </summary>
+    /// <value></value>
+    public override string EntityName {
+      get {
+        return "Image shape";
+      }
+    }
+    /// <summary>
+    /// Gets or sets the image path.
+    /// </summary>
+    /// <value>The image path.</value>
+    public string ImagePath {
+      get { return mImagePath; }
+      set {
+        if (value == string.Empty) return;
+        if (File.Exists(value)) {
+          try {
+            mImage = Image.FromFile(value);
+            Transform(Rectangle.X, Rectangle.Y, mImage.Width, mImage.Height);
+          }
+          catch (Exception exc) {
+            Trace.WriteLine(exc.Message);
+          }
+          mImagePath = value;
+        } else
+          MessageBox.Show("The specified file does not exist.", "Error", MessageBoxButtons.OK, MessageBoxIcon.Warning);
+      }
+    }
+
+    /// <summary>
+    /// Gets or sets the image.
+    /// </summary>
+    /// <value>The image.</value>
+    public Image Image {
+      get { return mImage; }
+      set {
+        if (value == null) return;
+        mImage = value;
+        mImagePath = string.Empty;
+        Transform(Rectangle.X, Rectangle.Y, mImage.Width, mImage.Height);
+      }
+    }
+    #endregion
+
+    #region Constructor
+
+    /// <summary>
+    /// Constructor
+    /// </summary>
+    public ImageShape()
+      : base() {
+    }
+    /// <summary>
+    /// This is the default constructor of the class.
+    /// </summary>
+    public ImageShape(IModel site)
+      : base(site) {
+    }
+
+    #endregion
+
+    #region Methods
+
+    // -----------------------------------------------------------------
+    /// <summary>
+    /// Initializes this instance.
+    /// </summary>
+    // -----------------------------------------------------------------
+    protected override void Initialize() {
+      base.Initialize();
+      //the initial size
+      Transform(0, 0, 200, 50);
+      #region Connectors
+      cTop = new Connector(new Point((int)(Rectangle.Left + Rectangle.Width / 2), Rectangle.Top), Model);
+      cTop.Name = "Top connector";
+      cTop.Parent = this;
+      Connectors.Add(cTop);
+
+      cRight = new Connector(new Point(Rectangle.Right, (int)(Rectangle.Top + Rectangle.Height / 2)), Model);
+      cRight.Name = "Right connector";
+      cRight.Parent = this;
+      Connectors.Add(cRight);
+
+      cBottom = new Connector(new Point((int)(Rectangle.Left + Rectangle.Width / 2), Rectangle.Bottom), Model);
+      cBottom.Name = "Bottom connector";
+      cBottom.Parent = this;
+      Connectors.Add(cBottom);
+
+      cLeft = new Connector(new Point(Rectangle.Left, (int)(Rectangle.Top + Rectangle.Height / 2)), Model);
+      cLeft.Name = "Left connector";
+      cLeft.Parent = this;
+      Connectors.Add(cLeft);
+      #endregion
+    }
+
+    /// <summary>
+    /// Adds additional stuff to the shape's menu
+    /// </summary>
+    /// <returns>ToolStripItem[]</returns>
+    public override ToolStripItem[] Menu() {
+
+      ToolStripMenuItem item = new ToolStripMenuItem(
+          "Reset image size");
+
+      item.Click += new EventHandler(OnResetImageSize);
+
+      ToolStripItem[] items = new ToolStripItem[] { item };
+
+      return items;
+    }
+    /// <summary>
+    /// Resets the original image size
+    /// </summary>
+    /// <param name="sender"></param>
+    /// <param name="e"></param>
+    private void OnResetImageSize(object sender, EventArgs e) {
+      Transform(Rectangle.X, Rectangle.Y, mImage.Width, mImage.Height);
+      this.Invalidate();
+    }
+
+    /// <summary>
+    /// Overrides the default bitmap used in the shape viewer
+    /// </summary>
+    /// <returns></returns>
+    public Bitmap GetThumbnail() {
+      Bitmap bmp = null;
+      try {
+        Stream stream = Assembly.GetExecutingAssembly().GetManifestResourceStream("Netron.GraphLib.BasicShapes.Resources.ImageShape.gif");
+
+        bmp = Bitmap.FromStream(stream) as Bitmap;
+        stream.Close();
+        stream = null;
+      }
+      catch (Exception exc) {
+        Trace.WriteLine(exc.Message, "ImageShape.GetThumbnail");
+      }
+      return bmp;
+    }
+
+    /// <summary>
+    /// Paints the shape of the person object in the plex. Here you can let your imagination go.
+    /// MAKE IT PERFORMANT, this is a killer method called 200.000 times a minute!
+    /// </summary>
+    /// <param name="g">The graphics canvas onto which to paint</param>
+    public override void Paint(Graphics g) {
+      base.Paint(g);
+      //if(RecalculateSize)
+      //{
+      //    Rectangle = new RectangleF(new PointF(Rectangle.X,Rectangle.Y),
+      //        g.MeasureString(this.Text,Font));	
+      //    Rectangle = System.Drawing.RectangleF.Inflate(Rectangle,10,10);
+      //    RecalculateSize = false; //very important!
+      //}
+      if (mImage == null) {
+        g.FillRectangle(Brush, Rectangle);
+        StringFormat sf = new StringFormat();
+        sf.Alignment = StringAlignment.Center;
+        g.DrawString("Image shape", ArtPalette.DefaultFont, Brushes.Black, Rectangle.X + (Rectangle.Width / 2), Rectangle.Y + 3, sf);
+      } else
+        g.DrawImage(mImage, Rectangle);
+    }
+    #endregion
+  }
 
 }
@@ -245,3 +215,3 @@
 
 
-		
+
Index: /trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.Netron/3.0.2672.12446/Netron.Diagramming.Core-3.0.2672.12446/Diagram elements/Shapes/ShapeFactory.cs
===================================================================
--- /trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.Netron/3.0.2672.12446/Netron.Diagramming.Core-3.0.2672.12446/Diagram elements/Shapes/ShapeFactory.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.Netron/3.0.2672.12446/Netron.Diagramming.Core-3.0.2672.12446/Diagram elements/Shapes/ShapeFactory.cs	(revision 4068)
@@ -1,62 +1,53 @@
 using System;
-using System.Collections.Generic;
-using System.Text;
 
-namespace Netron.Diagramming.Core
-{
+namespace Netron.Diagramming.Core {
+  /// <summary>
+  /// Shape factory for the internally defined shape types.
+  /// </summary>
+  public static class ShapeFactory {
+
     /// <summary>
-    /// Shape factory for the internally defined shape types.
+    /// Gets the shape.
     /// </summary>
-    public static class ShapeFactory
-    {
+    /// <param name="shapeName">Name of the shape.</param>
+    /// <returns></returns>
+    public static IShape GetShape(string shapeName) {
+      if (string.IsNullOrEmpty(shapeName))
+        return null;
 
-        /// <summary>
-        /// Gets the shape.
-        /// </summary>
-        /// <param name="shapeName">Name of the shape.</param>
-        /// <returns></returns>
-        public static IShape GetShape(string shapeName)
-        {
-            if(string.IsNullOrEmpty(shapeName))
-                return null;
+      foreach (string shapeType in Enum.GetNames(typeof(ShapeTypes))) {
+        if (shapeType.ToString().ToLower() == shapeName.ToLower()) {
+          return GetShape((ShapeTypes)Enum.Parse(typeof(ShapeTypes), shapeType));
+        }
+      }
+      return null;
+    }
 
-            foreach(string shapeType in Enum.GetNames(typeof(ShapeTypes)))
-            {
-                if(shapeType.ToString().ToLower() ==shapeName.ToLower())
-                {
-                      return GetShape((ShapeTypes) Enum.Parse(typeof(ShapeTypes), shapeType));                    
-                }
-            }
-            return null;
-        }
+    /// <summary>
+    /// Gets the shape.
+    /// </summary>
+    /// <param name="shapeType">Type of the shape.</param>
+    /// <returns></returns>
+    public static IShape GetShape(ShapeTypes shapeType) {
+      switch (shapeType) {
+        case ShapeTypes.SimpleRectangle:
+          return new SimpleRectangle();
+        case ShapeTypes.SimpleEllipse:
+          return new SimpleEllipse();
+        case ShapeTypes.TextLabel:
+          return new TextLabel();
+        case ShapeTypes.ClassShape:
+          return new ClassShape();
+        case ShapeTypes.TextOnly:
+          return new TextOnly();
+        case ShapeTypes.ImageShape:
+          return new ImageShape();
+        case ShapeTypes.ComplexRectangle:
+          return new ComplexRectangle();
+        default:
+          return null;
+      }
+    }
 
-        /// <summary>
-        /// Gets the shape.
-        /// </summary>
-        /// <param name="shapeType">Type of the shape.</param>
-        /// <returns></returns>
-        public static IShape GetShape(ShapeTypes shapeType)
-        {
-            switch(shapeType)
-            {
-                case ShapeTypes.SimpleRectangle:
-                    return new SimpleRectangle();
-                case ShapeTypes.SimpleEllipse:
-                    return new SimpleEllipse();
-                case ShapeTypes.TextLabel:
-                    return new TextLabel();
-                case ShapeTypes.ClassShape:
-                    return new ClassShape();
-                case ShapeTypes.TextOnly:
-                    return new TextOnly();                    
-                case ShapeTypes.ImageShape:
-                    return new ImageShape();                
-                case ShapeTypes.ComplexRectangle:
-                    return new ComplexRectangle();
-                default:
-                    return null;
-            }
-        }
-  
-    }
+  }
 }
Index: /trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.Netron/3.0.2672.12446/Netron.Diagramming.Core-3.0.2672.12446/Diagram elements/Shapes/SimpleEllipse.cs
===================================================================
--- /trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.Netron/3.0.2672.12446/Netron.Diagramming.Core-3.0.2672.12446/Diagram elements/Shapes/SimpleEllipse.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.Netron/3.0.2672.12446/Netron.Diagramming.Core-3.0.2672.12446/Diagram elements/Shapes/SimpleEllipse.cs	(revision 4068)
@@ -1,185 +1,168 @@
-using System;
 using System.Drawing;
 using System.Drawing.Drawing2D;
-namespace Netron.Diagramming.Core
-{
-	/// <summary>
-	/// A simple elliptic shape
-	/// </summary>
-    [Shape("Ellipse", "SimpleEllipse", "Standard", "A simple elliptic shape.")] 
-    partial class SimpleEllipse : SimpleShapeBase
-	{
-        #region Fields
+namespace Netron.Diagramming.Core {
+  /// <summary>
+  /// A simple elliptic shape
+  /// </summary>
+  [Shape("Ellipse", "SimpleEllipse", "Standard", "A simple elliptic shape.")]
+  partial class SimpleEllipse : SimpleShapeBase {
+    #region Fields
 
-        // ------------------------------------------------------------------
-        /// <summary>
-        /// Implementation of IVersion - the current version of 
-        /// SimpleEllipse.
-        /// </summary>
-        // ------------------------------------------------------------------
-        protected const double simpleEllipseVersion = 1.0;
+    // ------------------------------------------------------------------
+    /// <summary>
+    /// Implementation of IVersion - the current version of 
+    /// SimpleEllipse.
+    /// </summary>
+    // ------------------------------------------------------------------
+    protected const double simpleEllipseVersion = 1.0;
 
-		/// <summary>
-		/// the connectors
-		/// </summary>
+    /// <summary>
+    /// the connectors
+    /// </summary>
     //Connector cBottom, cLeft, cRight, cTop;
-		#endregion
+    #endregion
 
-        #region Properties
+    #region Properties
 
-        // ------------------------------------------------------------------
-        /// <summary>
-        /// Gets the current version.
-        /// </summary>
-        // ------------------------------------------------------------------
-        public override double Version
-        {
-            get
-            {
-                return simpleEllipseVersion;
-            }
+    // ------------------------------------------------------------------
+    /// <summary>
+    /// Gets the current version.
+    /// </summary>
+    // ------------------------------------------------------------------
+    public override double Version {
+      get {
+        return simpleEllipseVersion;
+      }
+    }
+
+    /// <summary>
+    /// Gets the friendly name of the entity to be displayed in the UI
+    /// </summary>
+    /// <value></value>
+    public override string EntityName {
+      get { return "Simple Ellipse"; }
+    }
+    #endregion
+
+    #region Constructor
+    /// <summary>
+    /// Default ctor
+    /// </summary>
+    /// <param name="s"></param>
+    public SimpleEllipse(IModel s)
+      : base(s) {
+    }
+
+    /// <summary>
+    /// Initializes a new instance of the <see cref="T:SimpleEllipse"/> class.
+    /// </summary>
+    public SimpleEllipse()
+      : base() {
+    }
+
+    #endregion
+
+    #region Methods
+
+    // -----------------------------------------------------------------
+    /// <summary>
+    /// Initializes this instance.
+    /// </summary>
+    // -----------------------------------------------------------------
+    protected override void Initialize() {
+      base.Initialize();
+
+      //the initial size
+      Transform(0, 0, 200, 50);
+      this.mTextArea = Rectangle;
+
+      // I'm changing the "simple" shapes to have no connectors.
+      #region Connectors
+      //cTop = new Connector(new Point((int)(Rectangle.Left + Rectangle.Width / 2), Rectangle.Top), Model);
+      //cTop.Name = "Top connector";
+      //cTop.Parent = this;
+      //Connectors.Add(cTop);
+
+      //cRight = new Connector(new Point(Rectangle.Right, (int)(Rectangle.Top + Rectangle.Height / 2)), Model);
+      //cRight.Name = "Right connector";
+      //cRight.Parent = this;
+      //Connectors.Add(cRight);
+
+      //cBottom = new Connector(new Point((int)(Rectangle.Left + Rectangle.Width / 2), Rectangle.Bottom), Model);
+      //cBottom.Name = "Bottom connector";
+      //cBottom.Parent = this;
+      //Connectors.Add(cBottom);
+
+      //cLeft = new Connector(new Point(Rectangle.Left, (int)(Rectangle.Top + Rectangle.Height / 2)), Model);
+      //cLeft.Name = "Left connector";
+      //cLeft.Parent = this;
+      //Connectors.Add(cLeft);
+      #endregion
+    }
+
+    /// <summary>
+    /// Tests whether the mouse hits this shape.
+    /// </summary>
+    /// <param name="p"></param>
+    /// <returns></returns>
+    public override bool Hit(Point p) {
+      GraphicsPath path = new GraphicsPath();
+      path.AddEllipse(Rectangle);
+      return path.IsVisible(p);
+    }
+
+    /// <summary>
+    /// Paints the bundle on the canvas
+    /// </summary>
+    /// <param name="g"></param>
+    public override void Paint(Graphics g) {
+      g.SmoothingMode = SmoothingMode.HighQuality;
+      //the shadow
+      if (ArtPalette.EnableShadows) {
+        g.FillEllipse(
+            ArtPalette.ShadowBrush,
+            Rectangle.X + 5,
+            Rectangle.Y + 5,
+            Rectangle.Width,
+            Rectangle.Height);
+      }
+
+      //the actual bundle
+      g.FillEllipse(mPaintStyle.GetBrush(Rectangle), Rectangle);
+
+      //the edge of the bundle
+      if (Hovered) {
+        g.DrawEllipse(ArtPalette.HighlightPen, Rectangle);
+      } else {
+        g.DrawEllipse(mPenStyle.DrawingPen(), Rectangle);
+      }
+      //the connectors
+      if (this.ShowConnectors) {
+        for (int k = 0; k < Connectors.Count; k++) {
+          Connectors[k].Paint(g);
         }
+      }
 
-        /// <summary>
-        /// Gets the friendly name of the entity to be displayed in the UI
-        /// </summary>
-        /// <value></value>
-        public override string EntityName
-        {
-            get { return "Simple Ellipse"; }
-        }
-        #endregion
+      //here we keep it really simple:
+      if (!string.IsNullOrEmpty(Text)) {
+        //g.DrawString(
+        //    Text, 
+        //    ArtPalette.DefaultFont, 
+        //    Brushes.Black, 
+        //    TextArea);
+        g.DrawString(
+            mTextStyle.GetFormattedText(Text),
+            mTextStyle.Font,
+            mTextStyle.GetBrush(),
+            TextArea,
+            mTextStyle.StringFormat);
+      }
+    }
 
-		#region Constructor
-		/// <summary>
-		/// Default ctor
-		/// </summary>
-		/// <param name="s"></param>
-		public SimpleEllipse(IModel s) : base(s)
-		{
-		}
 
-        /// <summary>
-        /// Initializes a new instance of the <see cref="T:SimpleEllipse"/> class.
-        /// </summary>
-         public SimpleEllipse()
-             : base()
-         {
-         }
 
-		#endregion
 
-		#region Methods
 
-         // -----------------------------------------------------------------
-         /// <summary>
-         /// Initializes this instance.
-         /// </summary>
-         // -----------------------------------------------------------------
-         protected override void Initialize()
-         {
-             base.Initialize();
-             
-             //the initial size
-             Transform(0, 0, 200, 50);
-             this.mTextArea = Rectangle;
-
-             // I'm changing the "simple" shapes to have no connectors.
-             #region Connectors
-             //cTop = new Connector(new Point((int)(Rectangle.Left + Rectangle.Width / 2), Rectangle.Top), Model);
-             //cTop.Name = "Top connector";
-             //cTop.Parent = this;
-             //Connectors.Add(cTop);
-
-             //cRight = new Connector(new Point(Rectangle.Right, (int)(Rectangle.Top + Rectangle.Height / 2)), Model);
-             //cRight.Name = "Right connector";
-             //cRight.Parent = this;
-             //Connectors.Add(cRight);
-
-             //cBottom = new Connector(new Point((int)(Rectangle.Left + Rectangle.Width / 2), Rectangle.Bottom), Model);
-             //cBottom.Name = "Bottom connector";
-             //cBottom.Parent = this;
-             //Connectors.Add(cBottom);
-
-             //cLeft = new Connector(new Point(Rectangle.Left, (int)(Rectangle.Top + Rectangle.Height / 2)), Model);
-             //cLeft.Name = "Left connector";
-             //cLeft.Parent = this;
-             //Connectors.Add(cLeft);
-             #endregion
-         }
-
-		/// <summary>
-		/// Tests whether the mouse hits this shape.
-		/// </summary>
-		/// <param name="p"></param>
-		/// <returns></returns>
-		public override bool Hit(Point p)
-		{            
-            GraphicsPath path = new GraphicsPath();
-            path.AddEllipse(Rectangle);
-            return path.IsVisible(p);
-		}
-
-		/// <summary>
-		/// Paints the bundle on the canvas
-		/// </summary>
-		/// <param name="g"></param>
-		public override void Paint(Graphics g)
-		{
-			g.SmoothingMode = SmoothingMode.HighQuality;
-			//the shadow
-            if (ArtPalette.EnableShadows)
-            {
-                g.FillEllipse(
-                    ArtPalette.ShadowBrush,
-                    Rectangle.X + 5,
-                    Rectangle.Y + 5,
-                    Rectangle.Width,
-                    Rectangle.Height);
-            }
-
-			//the actual bundle
-			g.FillEllipse(mPaintStyle.GetBrush(Rectangle), Rectangle);
-
-			//the edge of the bundle
-            if (Hovered)
-            {
-                g.DrawEllipse(ArtPalette.HighlightPen, Rectangle);
-            }
-            else
-            {
-                g.DrawEllipse(mPenStyle.DrawingPen(), Rectangle);
-            }
-			//the connectors
-            if (this.ShowConnectors)
-            {
-                for (int k = 0; k < Connectors.Count; k++)
-                {
-                    Connectors[k].Paint(g);
-                }
-            }
-			
-			//here we keep it really simple:
-            if (!string.IsNullOrEmpty(Text))
-            {
-                //g.DrawString(
-                //    Text, 
-                //    ArtPalette.DefaultFont, 
-                //    Brushes.Black, 
-                //    TextArea);
-                g.DrawString(
-                    mTextStyle.GetFormattedText(Text),
-                    mTextStyle.Font,
-                    mTextStyle.GetBrush(),
-                    TextArea,
-                    mTextStyle.StringFormat);
-            }
-		}
-
-	
-
-	
-
-		#endregion	
-	}
+    #endregion
+  }
 }
Index: /trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.Netron/3.0.2672.12446/Netron.Diagramming.Core-3.0.2672.12446/Diagram elements/Shapes/SimpleRectangle.cs
===================================================================
--- /trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.Netron/3.0.2672.12446/Netron.Diagramming.Core-3.0.2672.12446/Diagram elements/Shapes/SimpleRectangle.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.Netron/3.0.2672.12446/Netron.Diagramming.Core-3.0.2672.12446/Diagram elements/Shapes/SimpleRectangle.cs	(revision 4068)
@@ -1,224 +1,204 @@
-using System;
 using System.Drawing;
-using System.Drawing.Drawing2D;
-namespace Netron.Diagramming.Core
-{
-    // ----------------------------------------------------------------------
-    /// <summary>
-    /// A simple rectangular shape.
-    /// </summary>
-    // ----------------------------------------------------------------------
-    [Shape(
-        "Rectangle",
-        "SimpleRectangle",
-        "Standard",
-        "A simple rectangular shape.")]
-    public partial class SimpleRectangle : SimpleShapeBase
-    {
-        #region Fields
-
-        // ------------------------------------------------------------------
-        /// <summary>
-        /// Implementation of IVersion - the current version of 
-        /// SimpleRectangle.
-        /// </summary>
-        // ------------------------------------------------------------------
-        protected const double simpleRectangleVersion = 1.0;
-
-        // ------------------------------------------------------------------
-        /// <summary>
-        /// The bottom connector.
-        /// </summary>
-        // ------------------------------------------------------------------
-        //Connector cBottom;
-
-        // ------------------------------------------------------------------
-        /// <summary>
-        /// The left connector.
-        /// </summary>
-        // ------------------------------------------------------------------
-        //Connector cLeft;
-
-        // ------------------------------------------------------------------
-        /// <summary>
-        /// The right connector.
-        /// </summary>
-        // ------------------------------------------------------------------
-        //Connector cRight;
-
-        // ------------------------------------------------------------------
-        /// <summary>
-        /// The top connector.
-        /// </summary>
-        // ------------------------------------------------------------------
-        //Connector cTop;
-
-        #endregion
-
-        #region Properties
-
-        // ------------------------------------------------------------------
-        /// <summary>
-        /// Gets the current version.
-        /// </summary>
-        // ------------------------------------------------------------------
-        public override double Version
-        {
-            get
-            {
-                return simpleRectangleVersion;
-            }
+namespace Netron.Diagramming.Core {
+  // ----------------------------------------------------------------------
+  /// <summary>
+  /// A simple rectangular shape.
+  /// </summary>
+  // ----------------------------------------------------------------------
+  [Shape(
+      "Rectangle",
+      "SimpleRectangle",
+      "Standard",
+      "A simple rectangular shape.")]
+  public partial class SimpleRectangle : SimpleShapeBase {
+    #region Fields
+
+    // ------------------------------------------------------------------
+    /// <summary>
+    /// Implementation of IVersion - the current version of 
+    /// SimpleRectangle.
+    /// </summary>
+    // ------------------------------------------------------------------
+    protected const double simpleRectangleVersion = 1.0;
+
+    // ------------------------------------------------------------------
+    /// <summary>
+    /// The bottom connector.
+    /// </summary>
+    // ------------------------------------------------------------------
+    //Connector cBottom;
+
+    // ------------------------------------------------------------------
+    /// <summary>
+    /// The left connector.
+    /// </summary>
+    // ------------------------------------------------------------------
+    //Connector cLeft;
+
+    // ------------------------------------------------------------------
+    /// <summary>
+    /// The right connector.
+    /// </summary>
+    // ------------------------------------------------------------------
+    //Connector cRight;
+
+    // ------------------------------------------------------------------
+    /// <summary>
+    /// The top connector.
+    /// </summary>
+    // ------------------------------------------------------------------
+    //Connector cTop;
+
+    #endregion
+
+    #region Properties
+
+    // ------------------------------------------------------------------
+    /// <summary>
+    /// Gets the current version.
+    /// </summary>
+    // ------------------------------------------------------------------
+    public override double Version {
+      get {
+        return simpleRectangleVersion;
+      }
+    }
+
+    // ------------------------------------------------------------------
+    /// <summary>
+    /// Gets the friendly name of the entity to be displayed in the UI
+    /// </summary>
+    /// <value>string</value>
+    // ------------------------------------------------------------------
+    public override string EntityName {
+      get { return "Simple Rectangle"; }
+    }
+
+    public override Rectangle Rectangle {
+      get {
+        return base.Rectangle;
+      }
+    }
+
+    #endregion
+
+    #region Constructor
+
+    // ------------------------------------------------------------------
+    /// <summary>
+    /// Default constructor.
+    /// </summary>
+    /// <param name="s"></param>
+    // ------------------------------------------------------------------
+    public SimpleRectangle(IModel s)
+      : base(s) {
+    }
+
+    // ------------------------------------------------------------------
+    /// <summary>
+    /// Initializes a new instance of the 
+    /// <see cref="T:SimpleRectangle"/> class.
+    /// </summary>
+    // ------------------------------------------------------------------
+    public SimpleRectangle()
+      : base() {
+    }
+
+    #endregion
+
+    #region Methods
+
+    // -----------------------------------------------------------------
+    /// <summary>
+    /// Initializes this instance.
+    /// </summary>
+    // -----------------------------------------------------------------
+    protected override void Initialize() {
+      base.Initialize();
+      //the initial size
+      Transform(0, 0, 200, 50);
+      this.mTextArea = Rectangle;
+
+      // I'm changing the "simple" shapes to have no connectors.
+      #region Connectors
+      //cTop = new Connector(new Point((int)(Rectangle.Left + Rectangle.Width / 2), Rectangle.Top), Model);
+      //cTop.Name = "Top connector";
+      //cTop.Parent = this;
+      //Connectors.Add(cTop);
+
+      //cRight = new Connector(new Point(Rectangle.Right, (int)(Rectangle.Top + Rectangle.Height / 2)), Model);
+      //cRight.Name = "Right connector";
+      //cRight.Parent = this;
+      //Connectors.Add(cRight);
+
+      //cBottom = new Connector(new Point((int)(Rectangle.Left + Rectangle.Width / 2), Rectangle.Bottom), Model);
+      //cBottom.Name = "Bottom connector";
+      //cBottom.Parent = this;
+      //Connectors.Add(cBottom);
+
+      //cLeft = new Connector(new Point(Rectangle.Left, (int)(Rectangle.Top + Rectangle.Height / 2)), Model);
+      //cLeft.Name = "Left connector";
+      //cLeft.Parent = this;
+      //Connectors.Add(cLeft);
+      #endregion
+    }
+
+    // ------------------------------------------------------------------
+    /// <summary>
+    /// Paints the bundle on the canvas
+    /// </summary>
+    /// <param name="g">Graphics: The GDI+ graphics surface.</param>
+    // ------------------------------------------------------------------
+    public override void Paint(Graphics g) {
+      // Draw the shadow.
+      if (ArtPalette.EnableShadows) {
+        g.FillRectangle(
+            ArtPalette.ShadowBrush,
+            mRectangle.X + 5,
+            mRectangle.Y + 5,
+            mRectangle.Width,
+            mRectangle.Height);
+      }
+
+      // Fill the shape.
+      g.FillRectangle(Brush, mRectangle);
+
+      // Draw the edge of the bundle.
+      if (Hovered) {
+        g.DrawRectangle(ArtPalette.HighlightPen, mRectangle);
+      } else {
+        g.DrawRectangle(Pen, mRectangle);
+      }
+
+      // Finally, the connectors.
+      if (this.ShowConnectors) {
+        for (int k = 0; k < Connectors.Count; k++) {
+          Connectors[k].Paint(g);
         }
-
-        // ------------------------------------------------------------------
-        /// <summary>
-        /// Gets the friendly name of the entity to be displayed in the UI
-        /// </summary>
-        /// <value>string</value>
-        // ------------------------------------------------------------------
-        public override string EntityName
-        {
-            get { return "Simple Rectangle"; }
-        }
-
-        public override Rectangle Rectangle
-        {
-            get
-            {
-                return base.Rectangle;
-            }
-        }
-
-        #endregion
-
-        #region Constructor
-
-        // ------------------------------------------------------------------
-        /// <summary>
-        /// Default constructor.
-        /// </summary>
-        /// <param name="s"></param>
-        // ------------------------------------------------------------------
-        public SimpleRectangle(IModel s)
-            : base(s)
-        {
-        }
-
-        // ------------------------------------------------------------------
-        /// <summary>
-        /// Initializes a new instance of the 
-        /// <see cref="T:SimpleRectangle"/> class.
-        /// </summary>
-        // ------------------------------------------------------------------
-        public SimpleRectangle()
-            : base()
-        {
-        }
-
-        #endregion
-
-        #region Methods
-
-        // -----------------------------------------------------------------
-        /// <summary>
-        /// Initializes this instance.
-        /// </summary>
-        // -----------------------------------------------------------------
-        protected override void Initialize()
-        {
-            base.Initialize();
-            //the initial size
-            Transform(0, 0, 200, 50);
-            this.mTextArea = Rectangle;
-
-            // I'm changing the "simple" shapes to have no connectors.
-            #region Connectors
-            //cTop = new Connector(new Point((int)(Rectangle.Left + Rectangle.Width / 2), Rectangle.Top), Model);
-            //cTop.Name = "Top connector";
-            //cTop.Parent = this;
-            //Connectors.Add(cTop);
-
-            //cRight = new Connector(new Point(Rectangle.Right, (int)(Rectangle.Top + Rectangle.Height / 2)), Model);
-            //cRight.Name = "Right connector";
-            //cRight.Parent = this;
-            //Connectors.Add(cRight);
-
-            //cBottom = new Connector(new Point((int)(Rectangle.Left + Rectangle.Width / 2), Rectangle.Bottom), Model);
-            //cBottom.Name = "Bottom connector";
-            //cBottom.Parent = this;
-            //Connectors.Add(cBottom);
-
-            //cLeft = new Connector(new Point(Rectangle.Left, (int)(Rectangle.Top + Rectangle.Height / 2)), Model);
-            //cLeft.Name = "Left connector";
-            //cLeft.Parent = this;
-            //Connectors.Add(cLeft);
-            #endregion
-        }
-
-        // ------------------------------------------------------------------
-        /// <summary>
-        /// Paints the bundle on the canvas
-        /// </summary>
-        /// <param name="g">Graphics: The GDI+ graphics surface.</param>
-        // ------------------------------------------------------------------
-        public override void Paint(Graphics g)
-        {
-            // Draw the shadow.
-            if (ArtPalette.EnableShadows)
-            {
-                g.FillRectangle(
-                    ArtPalette.ShadowBrush, 
-                    mRectangle.X + 5,
-                    mRectangle.Y + 5,
-                    mRectangle.Width,
-                    mRectangle.Height);
-            }
-
-            // Fill the shape.
-            g.FillRectangle(Brush, mRectangle);
-
-            // Draw the edge of the bundle.
-            if (Hovered)
-            {
-                g.DrawRectangle(ArtPalette.HighlightPen, mRectangle);
-            }
-            else
-            {
-                g.DrawRectangle(Pen, mRectangle);
-            }
-
-            // Finally, the connectors.
-            if (this.ShowConnectors)
-            {
-                for (int k = 0; k < Connectors.Count; k++)
-                {
-                    Connectors[k].Paint(g);
-                }
-            }
-
-            //here we keep it really simple:
-            if (!string.IsNullOrEmpty(Text))
-            {
-                //StringFormat format = new StringFormat();
-                //format.Alignment = this.VerticalAlignment;
-                //format.LineAlignment = this.HorizontalAlignment;
-                //SolidBrush textBrush = new SolidBrush(mForeColor);
-
-                //g.DrawString(
-                //    Text, 
-                //    mFont,
-                //    textBrush, 
-                //    TextArea,
-                //    format);
-                g.DrawString(
-                    mTextStyle.GetFormattedText(Text),
-                    mTextStyle.Font,
-                    mTextStyle.GetBrush(),
-                    TextArea,
-                    mTextStyle.StringFormat);
-            }
-        }
-
-        #endregion
-    }
+      }
+
+      //here we keep it really simple:
+      if (!string.IsNullOrEmpty(Text)) {
+        //StringFormat format = new StringFormat();
+        //format.Alignment = this.VerticalAlignment;
+        //format.LineAlignment = this.HorizontalAlignment;
+        //SolidBrush textBrush = new SolidBrush(mForeColor);
+
+        //g.DrawString(
+        //    Text, 
+        //    mFont,
+        //    textBrush, 
+        //    TextArea,
+        //    format);
+        g.DrawString(
+            mTextStyle.GetFormattedText(Text),
+            mTextStyle.Font,
+            mTextStyle.GetBrush(),
+            TextArea,
+            mTextStyle.StringFormat);
+      }
+    }
+
+    #endregion
+  }
 }
Index: /trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.Netron/3.0.2672.12446/Netron.Diagramming.Core-3.0.2672.12446/Diagram elements/Shapes/TextLabel.cs
===================================================================
--- /trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.Netron/3.0.2672.12446/Netron.Diagramming.Core-3.0.2672.12446/Diagram elements/Shapes/TextLabel.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.Netron/3.0.2672.12446/Netron.Diagramming.Core-3.0.2672.12446/Diagram elements/Shapes/TextLabel.cs	(revision 4068)
@@ -1,122 +1,111 @@
 using System;
 using System.Drawing;
-using System.Windows.Forms;
-namespace Netron.Diagramming.Core
-{
-	/// <summary>
-	/// A simple bundle to display textual information
-	/// </summary>
-    public class TextLabel : SimpleShapeBase
-    {
-        #region Fields
+namespace Netron.Diagramming.Core {
+  /// <summary>
+  /// A simple bundle to display textual information
+  /// </summary>
+  public class TextLabel : SimpleShapeBase {
+    #region Fields
 
-        // ------------------------------------------------------------------
-        /// <summary>
-        /// Implementation of IVersion - the current version of 
-        /// TextLabel.
-        /// </summary>
-        // ------------------------------------------------------------------
-        protected const double textLabelVersion = 1.0;
+    // ------------------------------------------------------------------
+    /// <summary>
+    /// Implementation of IVersion - the current version of 
+    /// TextLabel.
+    /// </summary>
+    // ------------------------------------------------------------------
+    protected const double textLabelVersion = 1.0;
 
-        private Connector connector;
-        #endregion
+    private Connector connector;
+    #endregion
 
-        #region Properties
+    #region Properties
 
-        // ------------------------------------------------------------------
-        /// <summary>
-        /// Gets the current version.
-        /// </summary>
-        // ------------------------------------------------------------------
-        public override double Version
-        {
-            get
-            {
-                return textLabelVersion;
-            }
-        }
+    // ------------------------------------------------------------------
+    /// <summary>
+    /// Gets the current version.
+    /// </summary>
+    // ------------------------------------------------------------------
+    public override double Version {
+      get {
+        return textLabelVersion;
+      }
+    }
 
-        /// <summary>
-        /// Gets the connector.
-        /// </summary>
-        /// <value>The connector.</value>
-        public Connector Connector
-        {
-            get { return connector; }
-        }
+    /// <summary>
+    /// Gets the connector.
+    /// </summary>
+    /// <value>The connector.</value>
+    public Connector Connector {
+      get { return connector; }
+    }
 
-        /// <summary>
-        /// Gets the friendly name of the entity to be displayed in the UI
-        /// </summary>
-        /// <value></value>
-        public override string EntityName
-        {
-            get { return "Text Label"; }
-        }
+    /// <summary>
+    /// Gets the friendly name of the entity to be displayed in the UI
+    /// </summary>
+    /// <value></value>
+    public override string EntityName {
+      get { return "Text Label"; }
+    }
 
-        #endregion
+    #endregion
 
-        #region Constructor
+    #region Constructor
 
-        /// <summary>
-        /// Default ctor
-        /// </summary>
-        /// <param name="s"></param>
-        public TextLabel(IModel s)
-            : base(s)
-        {
-        }
-        /// <summary>
-        /// Initializes a new instance of the <see cref="T:TextLabel"/> class.
-        /// </summary>
-        public TextLabel()
-            : base()
-        {
-        }
+    /// <summary>
+    /// Default ctor
+    /// </summary>
+    /// <param name="s"></param>
+    public TextLabel(IModel s)
+      : base(s) {
+    }
+    /// <summary>
+    /// Initializes a new instance of the <see cref="T:TextLabel"/> class.
+    /// </summary>
+    public TextLabel()
+      : base() {
+    }
 
-        #endregion
+    #endregion
 
-        #region Methods
+    #region Methods
 
-        // -----------------------------------------------------------------
-        /// <summary>
-        /// Initializes this instance.
-        /// </summary>
-        // -----------------------------------------------------------------
-        protected override void Initialize()
-        {
-            base.Initialize();
+    // -----------------------------------------------------------------
+    /// <summary>
+    /// Initializes this instance.
+    /// </summary>
+    // -----------------------------------------------------------------
+    protected override void Initialize() {
+      base.Initialize();
 
-            PaintStyle = ArtPalette.GetDefaultSolidPaintStyle();
-            Resizable = false;
-            connector = new Connector(new Point((int)(Rectangle.Left + Rectangle.Width / 2), Rectangle.Bottom), Model);
-            connector.Name = "Central connector";
-            connector.Parent = this;
-            Connectors.Add(connector);
-        }
+      PaintStyle = ArtPalette.GetDefaultSolidPaintStyle();
+      Resizable = false;
+      connector = new Connector(new Point((int)(Rectangle.Left + Rectangle.Width / 2), Rectangle.Bottom), Model);
+      connector.Name = "Central connector";
+      connector.Parent = this;
+      Connectors.Add(connector);
+    }
 
-        /// <summary>
-        /// Paints the bundle on the canvas
-        /// </summary>
-        /// <param name="g">a Graphics object onto which to paint</param>
-        public override void Paint(System.Drawing.Graphics g)
-        {
-            if (g == null)
-                throw new ArgumentNullException("The Graphics object is 'null'.");
+    /// <summary>
+    /// Paints the bundle on the canvas
+    /// </summary>
+    /// <param name="g">a Graphics object onto which to paint</param>
+    public override void Paint(System.Drawing.Graphics g) {
+      if (g == null)
+        throw new ArgumentNullException("The Graphics object is 'null'.");
 
-            g.SmoothingMode = System.Drawing.Drawing2D.SmoothingMode.HighQuality;
-            //the shadow
-            if (ArtPalette.EnableShadows)
-                g.FillRectangle(ArtPalette.ShadowBrush, Rectangle.X + 5, Rectangle.Y + 5, Rectangle.Width, Rectangle.Height);
-            //the container
-            g.FillRectangle(Brush, Rectangle);
-            //the edge
-            if (Hovered)
-                g.DrawRectangle(new Pen(Color.Red, 2F), Rectangle);
-            //the text		
-            if (!string.IsNullOrEmpty(Text))
-                g.DrawString(Text, ArtPalette.DefaultFont, Brushes.Black, Rectangle);
-        }
-        #endregion
+      g.SmoothingMode = System.Drawing.Drawing2D.SmoothingMode.HighQuality;
+      //the shadow
+      if (ArtPalette.EnableShadows)
+        g.FillRectangle(ArtPalette.ShadowBrush, Rectangle.X + 5, Rectangle.Y + 5, Rectangle.Width, Rectangle.Height);
+      //the container
+      g.FillRectangle(Brush, Rectangle);
+      //the edge
+      if (Hovered)
+        g.DrawRectangle(new Pen(Color.Red, 2F), Rectangle);
+      //the text		
+      if (!string.IsNullOrEmpty(Text))
+        g.DrawString(Text, ArtPalette.DefaultFont, Brushes.Black, Rectangle);
     }
+    #endregion
+  }
 }
Index: /trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.Netron/3.0.2672.12446/Netron.Diagramming.Core-3.0.2672.12446/IO/Binary/BinarySerializer.cs
===================================================================
--- /trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.Netron/3.0.2672.12446/Netron.Diagramming.Core-3.0.2672.12446/IO/Binary/BinarySerializer.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.Netron/3.0.2672.12446/Netron.Diagramming.Core-3.0.2672.12446/IO/Binary/BinarySerializer.cs	(revision 4068)
@@ -4,28 +4,23 @@
 using System.Runtime.Serialization;
 using System.Runtime.Serialization.Formatters.Binary;
-using System.Xml.Serialization;
-using System.Xml;
 using System.Windows.Forms;
-namespace Netron.Diagramming.Core
-{
-	/// <summary>
-	/// Utility class to binary (de)serialize a diagram (from) to file
-	/// </summary>
-	public static class BinarySerializer
-	{
-		#region Methods
+namespace Netron.Diagramming.Core {
+  /// <summary>
+  /// Utility class to binary (de)serialize a diagram (from) to file
+  /// </summary>
+  public static class BinarySerializer {
+    #region Methods
 
-        /// <summary>
-        /// Binary saves the diagram
-        /// </summary>
-        /// <param name="fileName">the file-path</param>
-        /// <param name="control">The control.</param>
-        /// <returns></returns>
-		public static  bool SaveAs(string fileName, DiagramControlBase control)
-		{
+    /// <summary>
+    /// Binary saves the diagram
+    /// </summary>
+    /// <param name="fileName">the file-path</param>
+    /// <param name="control">The control.</param>
+    /// <returns></returns>
+    public static bool SaveAs(string fileName, DiagramControlBase control) {
 
-			FileStream fs = new FileStream(fileName, FileMode.Create);
+      FileStream fs = new FileStream(fileName, FileMode.Create);
 
-			GenericFormatter<BinaryFormatter> f = new GenericFormatter<BinaryFormatter>();
+      GenericFormatter<BinaryFormatter> f = new GenericFormatter<BinaryFormatter>();
 
       try {
@@ -44,83 +39,69 @@
         //DumpInfo();
       }
-			finally
-			{
-				fs.Close();
-			}
-			return false;
-		}
-        /// <summary>
-        /// Opens the binary-saved diagram
-        /// </summary>
-        /// <param name="fileName">Name of the file.</param>
-        /// <param name="control">The control.</param>
-		public static  bool Open (string fileName, DiagramControlBase control)
-		{
-			FileStream fs=null;
-			
-			try
-			{
-				fs= File.OpenRead(fileName);
-			}
-			catch (System.IO.DirectoryNotFoundException exc)
-			{
-				System.Windows.Forms.MessageBox.Show(exc.Message);
-			}
-			catch(System.IO.FileLoadException exc)
-			{				
-				System.Windows.Forms.MessageBox.Show(exc.Message);
-			}
-			catch (System.IO.FileNotFoundException exc)
-			{
-				System.Windows.Forms.MessageBox.Show(exc.Message);
-			}
-			catch(Exception exc)
-			{				
-				throw new Exception("Non-CLS exception caught.", exc);
-			}
-			//donnot open anything if filestream is not there
-			if (fs==null) 
-            {
-                return false;
-            }
+      finally {
+        fs.Close();
+      }
+      return false;
+    }
+    /// <summary>
+    /// Opens the binary-saved diagram
+    /// </summary>
+    /// <param name="fileName">Name of the file.</param>
+    /// <param name="control">The control.</param>
+    public static bool Open(string fileName, DiagramControlBase control) {
+      FileStream fs = null;
 
-			try
-			{
+      try {
+        fs = File.OpenRead(fileName);
+      }
+      catch (System.IO.DirectoryNotFoundException exc) {
+        System.Windows.Forms.MessageBox.Show(exc.Message);
+      }
+      catch (System.IO.FileLoadException exc) {
+        System.Windows.Forms.MessageBox.Show(exc.Message);
+      }
+      catch (System.IO.FileNotFoundException exc) {
+        System.Windows.Forms.MessageBox.Show(exc.Message);
+      }
+      catch (Exception exc) {
+        throw new Exception("Non-CLS exception caught.", exc);
+      }
+      //donnot open anything if filestream is not there
+      if (fs == null) {
+        return false;
+      }
 
-                GenericFormatter<BinaryFormatter> f = new GenericFormatter<BinaryFormatter>();			
-                //one-line deserialization, no bits 'nd bytes necessary....C# is amazing...
-				Document document =  f.Deserialize<Document>(fs);
+      try {
 
-                if(document == null)
-                    throw new InconsistencyException("The deserialization return 'null'.");
-                //call the standard method at the control level to attach a new document
-                //In principle you could create a document programmatically and attach it this way as well.
-                control.AttachToDocument(document);
-                return true;
-			}
-			catch(SerializationException exc)			
-			{
-				MessageBox.Show(exc.Message);
-			}
-			catch(System.Reflection.TargetInvocationException exc)
-			{
-				MessageBox.Show(exc.Message, "BinarySerializer.Open");
-			}
-			catch(Exception exc)
-			{
-                MessageBox.Show(exc.Message, "BinarySerializer.Open");
-			}
-			finally
-			{
-                if (fs != null)
-                {
-                    fs.Close();
-                }
-			}
-            return false;
-		}
+        GenericFormatter<BinaryFormatter> f = new GenericFormatter<BinaryFormatter>();
+        //one-line deserialization, no bits 'nd bytes necessary....C# is amazing...
+        Document document = f.Deserialize<Document>(fs);
 
-		
-		#endregion
-	}
+        if (document == null)
+          throw new InconsistencyException("The deserialization return 'null'.");
+        //call the standard method at the control level to attach a new document
+        //In principle you could create a document programmatically and attach it this way as well.
+        control.AttachToDocument(document);
+        return true;
+      }
+      catch (SerializationException exc) {
+        MessageBox.Show(exc.Message);
+      }
+      catch (System.Reflection.TargetInvocationException exc) {
+        MessageBox.Show(exc.Message, "BinarySerializer.Open");
+      }
+      catch (Exception exc) {
+        MessageBox.Show(exc.Message, "BinarySerializer.Open");
+      }
+      finally {
+        if (fs != null) {
+          fs.Close();
+        }
+      }
+      return false;
+    }
+
+
+    #endregion
+  }
 }
Index: /trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.Netron/3.0.2672.12446/Netron.Diagramming.Core-3.0.2672.12446/IO/GenericFormatter.cs
===================================================================
--- /trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.Netron/3.0.2672.12446/Netron.Diagramming.Core-3.0.2672.12446/IO/GenericFormatter.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.Netron/3.0.2672.12446/Netron.Diagramming.Core-3.0.2672.12446/IO/GenericFormatter.cs	(revision 4068)
@@ -1,38 +1,30 @@
-using System;
-using System.Collections.Generic;
-using System.Text;
 using System.IO;
-using System.Runtime.Serialization.Formatters.Binary;
 using System.Runtime.Serialization;
 
-namespace Netron.Diagramming.Core
-{
+namespace Netron.Diagramming.Core {
+  /// <summary>
+  /// Generic implementation of the <see cref="IGenericFormatter"/> interface.
+  /// </summary>
+  /// <typeparam name="F"></typeparam>
+  public class GenericFormatter<F> : IGenericFormatter where F : IFormatter, new() {
+    IFormatter m_Formatter = new F();
+
     /// <summary>
-    /// Generic implementation of the <see cref="IGenericFormatter"/> interface.
+    /// Deserializes the specified serialization stream.
     /// </summary>
-    /// <typeparam name="F"></typeparam>
-    public class GenericFormatter<F> : IGenericFormatter where F : IFormatter, new()
-    {
-        IFormatter m_Formatter = new F();
+    /// <param name="serializationStream">The serialization stream.</param>
+    /// <returns></returns>
+    public T Deserialize<T>(Stream serializationStream) {
+      return (T)m_Formatter.Deserialize(serializationStream);
+    }
+    /// <summary>
+    /// Serializes the specified serialization stream.
+    /// </summary>
+    /// <param name="serializationStream">The serialization stream.</param>
+    /// <param name="graph">A parameter of the generics Type T</param>
+    public void Serialize<T>(Stream serializationStream, T graph) {
+      m_Formatter.Serialize(serializationStream, graph);
+    }
+  }
 
-        /// <summary>
-        /// Deserializes the specified serialization stream.
-        /// </summary>
-        /// <param name="serializationStream">The serialization stream.</param>
-        /// <returns></returns>
-        public T Deserialize<T>(Stream serializationStream)
-        {
-            return (T) m_Formatter.Deserialize(serializationStream);
-        }
-        /// <summary>
-        /// Serializes the specified serialization stream.
-        /// </summary>
-        /// <param name="serializationStream">The serialization stream.</param>
-        /// <param name="graph">A parameter of the generics Type T</param>
-        public void Serialize<T>(Stream serializationStream, T graph)
-        {
-            m_Formatter.Serialize(serializationStream, graph);
-        }
-    }
-    
 }
Index: /trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.Netron/3.0.2672.12446/Netron.Diagramming.Core-3.0.2672.12446/Layout/BalloonTreeLayout.cs
===================================================================
--- /trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.Netron/3.0.2672.12446/Netron.Diagramming.Core-3.0.2672.12446/Layout/BalloonTreeLayout.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.Netron/3.0.2672.12446/Netron.Diagramming.Core-3.0.2672.12446/Layout/BalloonTreeLayout.cs	(revision 4068)
@@ -1,241 +1,214 @@
 using System;
-using System.Diagnostics;
+using System.Collections.Generic;
+using System.ComponentModel;
 using Netron.Diagramming.Core.Analysis;
-using System.Drawing;
-using System.Collections.Generic;
-using System.Text;
-using System.Windows.Forms;
-using System.ComponentModel;
-namespace Netron.Diagramming.Core
-{
-    /// <summary>
-    /// <para>Layout that computes a circular "balloon-tree" layout of a tree.
-    /// This layout places children nodes radially around their parents, and is
-    ///equivalent to a top-down flattened view of a ConeTree.</para>
-    /// 
-    /// <para>The algorithm used is that of G. Melançon and I. Herman from their
-    /// research paper Circular Drawings of Rooted Trees, Reports of the Centre for 
-    /// Mathematics and Computer Sciences, Report Number INS9817, 1998.</para>
-    /// </summary>
-    class BalloonTreeLayout : TreeLayoutBase
-    {
-        #region Fields
-
-        private int m_minRadius = 2;
-        private Dictionary<string, Params> Pars;
-        BackgroundWorker worker;
-
-        #endregion
-
-        #region Properties
-
-
-        /// <summary>
-        /// Gets or sets the MinRadius
-        /// </summary>
-        public int MinRadius
-        {
-            get { return m_minRadius; }
-            set { m_minRadius = value; }
+namespace Netron.Diagramming.Core {
+  /// <summary>
+  /// <para>Layout that computes a circular "balloon-tree" layout of a tree.
+  /// This layout places children nodes radially around their parents, and is
+  ///equivalent to a top-down flattened view of a ConeTree.</para>
+  /// 
+  /// <para>The algorithm used is that of G. Melançon and I. Herman from their
+  /// research paper Circular Drawings of Rooted Trees, Reports of the Centre for 
+  /// Mathematics and Computer Sciences, Report Number INS9817, 1998.</para>
+  /// </summary>
+  class BalloonTreeLayout : TreeLayoutBase {
+    #region Fields
+
+    private int m_minRadius = 2;
+    private Dictionary<string, Params> Pars;
+    BackgroundWorker worker;
+
+    #endregion
+
+    #region Properties
+
+
+    /// <summary>
+    /// Gets or sets the MinRadius
+    /// </summary>
+    public int MinRadius {
+      get { return m_minRadius; }
+      set { m_minRadius = value; }
+    }
+
+    #endregion
+
+    #region Constructor
+    ///<summary>
+    ///Default constructor
+    ///</summary>
+    public BalloonTreeLayout(IController controller)
+      : base("Balloon TreeLayout", controller) {
+    }
+    #endregion
+
+    #region Methods
+    /// <summary>
+    /// Layouts this instance.
+    /// </summary>
+    public void Layout() {
+      FirstWalk(LayoutRoot as INode);
+      SecondWalk(LayoutRoot as INode, null, LayoutRoot.Rectangle.X, LayoutRoot.Rectangle.Y, 1, 0);
+    }
+    /// <summary>
+    /// Inits this instance.
+    /// </summary>
+    /// <returns></returns>
+    private bool Init() {
+
+
+      this.Graph = this.Model as IGraph;
+
+      if (Graph == null)
+        throw new InconsistencyException("The model has not been set and the Graph property is hence 'null'");
+
+      this.LayoutRoot = this.Controller.Model.LayoutRoot;//could be null if not set in the GUI
+      Graph.ClearSpanningTree();
+      Graph.MakeSpanningTree(LayoutRoot as INode);
+
+      Pars = new Dictionary<string, Params>();
+      if (Graph.Nodes.Count == 0)
+        return false;
+      if (Graph.Edges.Count == 0) //this layout is base on embedded springs in the connections
+        return false;
+
+
+      Params par;
+
+      foreach (INode node in Graph.Nodes) {
+        par = new Params();
+        Pars.Add(node.Uid.ToString(), par);
+      }
+      return true;
+    }
+
+    /// <summary>
+    /// First traversal.
+    /// </summary>
+    /// <param name="n">The n.</param>
+    private void FirstWalk(INode n) {
+      Params np = Pars[n.Uid.ToString()];
+      np.d = 0;
+      double s = 0;
+      if (n.Children != null) {
+        foreach (INode c in n.Children) {
+          //if (!c.isVisible()) continue;
+          FirstWalk(c);
+          Params cp = Pars[c.Uid.ToString()];
+          np.d = Math.Max(np.d, cp.r);
+          cp.a = Math.Atan(((double)cp.r) / (np.d + cp.r));
+          s += cp.a;
         }
-
-        #endregion
-
-        #region Constructor
-        ///<summary>
-        ///Default constructor
-        ///</summary>
-        public BalloonTreeLayout(IController controller)
-            : base("Balloon TreeLayout", controller)
-        {
+      }
+      AdjustChildren(np, s);
+      SetRadius(np);
+    }
+    /// <summary>
+    /// Second traversal.
+    /// </summary>
+    /// <param name="n">The n.</param>
+    /// <param name="r">The r.</param>
+    /// <param name="x">The x.</param>
+    /// <param name="y">The y.</param>
+    /// <param name="l">The l.</param>
+    /// <param name="t">The t.</param>
+    private void SecondWalk(INode n, INode r, double x, double y, double l, double t) {
+      setX(n, r, x);
+      setY(n, r, y);
+
+      Params np = Pars[n.Uid.ToString()];
+
+      double dd = l * np.d;
+      double p = t + Math.PI;
+      double fs = (n.ChildCount == 0 ? 0 : np.f / n.ChildCount);
+      double pr = 0;
+      if (n.Children != null) {
+        foreach (INode c in n.Children) {
+
+          //if (!c.isVisible()) continue;
+          Params cp = Pars[c.Uid.ToString()];
+          double aa = np.c * cp.a;
+          double rr = np.d * Math.Tan(aa) / (1 - Math.Tan(aa));
+          p += pr + aa + fs;
+          double xx = (l * rr + dd) * Math.Cos(p);
+          double yy = (l * rr + dd) * Math.Sin(p);
+          pr = aa;
+          SecondWalk(c, n, x + xx, y + yy, l * np.c/*l*rr/cp.r*/, p);
         }
-        #endregion
-
-        #region Methods
-        /// <summary>
-        /// Layouts this instance.
-        /// </summary>
-        public void Layout()
-        {
-            FirstWalk(LayoutRoot as INode);
-            SecondWalk(LayoutRoot as INode, null, LayoutRoot.Rectangle.X, LayoutRoot.Rectangle.Y, 1, 0);
-        }
-        /// <summary>
-        /// Inits this instance.
-        /// </summary>
-        /// <returns></returns>
-        private bool Init()
-        {
-
-
-            this.Graph = this.Model as IGraph;
-
-            if (Graph == null)
-                throw new InconsistencyException("The model has not been set and the Graph property is hence 'null'");
-
-            this.LayoutRoot = this.Controller.Model.LayoutRoot;//could be null if not set in the GUI
-            Graph.ClearSpanningTree();
-            Graph.MakeSpanningTree(LayoutRoot as INode);
-
-            Pars = new Dictionary<string, Params>();
-            if (Graph.Nodes.Count == 0)
-                return false;
-            if (Graph.Edges.Count == 0) //this layout is base on embedded springs in the connections
-                return false;
-
-
-            Params par;
-
-            foreach (INode node in Graph.Nodes)
-            {
-                par = new Params();
-                Pars.Add(node.Uid.ToString(), par);
-            }
-            return true;
-        }
-
-        /// <summary>
-        /// First traversal.
-        /// </summary>
-        /// <param name="n">The n.</param>
-        private void FirstWalk(INode n)
-        {
-            Params np = Pars[n.Uid.ToString()];
-            np.d = 0;
-            double s = 0;
-            if (n.Children != null)
-            {
-                foreach (INode c in n.Children)
-                {
-                    //if (!c.isVisible()) continue;
-                    FirstWalk(c);
-                    Params cp = Pars[c.Uid.ToString()];
-                    np.d = Math.Max(np.d, cp.r);
-                    cp.a = Math.Atan(((double)cp.r) / (np.d + cp.r));
-                    s += cp.a;
-                }
-            }
-            AdjustChildren(np, s);
-            SetRadius(np);
-        }
-        /// <summary>
-        /// Second traversal.
-        /// </summary>
-        /// <param name="n">The n.</param>
-        /// <param name="r">The r.</param>
-        /// <param name="x">The x.</param>
-        /// <param name="y">The y.</param>
-        /// <param name="l">The l.</param>
-        /// <param name="t">The t.</param>
-        private void SecondWalk(INode n, INode r, double x, double y, double l, double t)
-        {
-            setX(n, r, x);
-            setY(n, r, y);
-
-            Params np = Pars[n.Uid.ToString()];
-
-            double dd = l * np.d;
-            double p = t + Math.PI;
-            double fs = (n.ChildCount == 0 ? 0 : np.f / n.ChildCount);
-            double pr = 0;
-            if (n.Children != null)
-            {
-                foreach (INode c in n.Children)
-                {
-
-                    //if (!c.isVisible()) continue;
-                    Params cp = Pars[c.Uid.ToString()];
-                    double aa = np.c * cp.a;
-                    double rr = np.d * Math.Tan(aa) / (1 - Math.Tan(aa));
-                    p += pr + aa + fs;
-                    double xx = (l * rr + dd) * Math.Cos(p);
-                    double yy = (l * rr + dd) * Math.Sin(p);
-                    pr = aa;
-                    SecondWalk(c, n, x + xx, y + yy, l * np.c/*l*rr/cp.r*/, p);
-                }
-            }
-        }
-        /// <summary>
-        /// Sets the radius.
-        /// </summary>
-        /// <param name="np">The np.</param>
-        private void SetRadius(Params np)
-        {
-            np.r = Convert.ToInt32((Math.Max(np.d, m_minRadius) + 2 * np.d) / 2.1D);
-        }
-        /// <summary>
-        /// Adjusts the children.
-        /// </summary>
-        /// <param name="np">The np.</param>
-        /// <param name="s">The s.</param>
-        private void AdjustChildren(Params np, double s)
-        {
-            if (s > Math.PI)
-            {
-                np.c = Math.PI / s;
-                np.f = 0;
-            }
-            else
-            {
-                np.c = 1;
-                np.f = Math.PI - s;
-            }
-        }
-        /// <summary>
-        /// Runs this instance.
-        /// </summary>
-        public override void Run()
-        {
-            Run(2000);
-        }
-        /// <summary>
-        /// Runs the specified time.
-        /// </summary>
-        /// <param name="time">The time.</param>
-        public override void Run(int time)
-        {
-            worker = new BackgroundWorker();
-            worker.DoWork += new DoWorkEventHandler(worker_DoWork);
-            worker.RunWorkerAsync(time);
-        }
-        /// <summary>
-        /// Stops this instance.
-        /// </summary>
-        public override void Stop()
-        {
-            if (worker != null && worker.IsBusy)
-                worker.CancelAsync();
-        }
-        /// <summary>
-        /// Handles the DoWork event of the worker control.
-        /// </summary>
-        /// <param name="sender">The source of the event.</param>
-        /// <param name="e">The <see cref="T:System.ComponentModel.DoWorkEventArgs"/> instance containing the event data.</param>
-        private void worker_DoWork(object sender, DoWorkEventArgs e)
-        {
-            Init();
-            Layout();
-        }
-
-
-        #endregion
-
-        #region Classes
-
-        /// <summary>
-        /// Paramter blob to temporarily keep working data of one node.
-        /// </summary>
-        class Params
-        {
-            public int d;
-            public int r;
-            //public double rx;
-            //public double ry;
-            public double a;
-            public double c;
-            public double f;
-        }
-
-        #endregion
-    }
+      }
+    }
+    /// <summary>
+    /// Sets the radius.
+    /// </summary>
+    /// <param name="np">The np.</param>
+    private void SetRadius(Params np) {
+      np.r = Convert.ToInt32((Math.Max(np.d, m_minRadius) + 2 * np.d) / 2.1D);
+    }
+    /// <summary>
+    /// Adjusts the children.
+    /// </summary>
+    /// <param name="np">The np.</param>
+    /// <param name="s">The s.</param>
+    private void AdjustChildren(Params np, double s) {
+      if (s > Math.PI) {
+        np.c = Math.PI / s;
+        np.f = 0;
+      } else {
+        np.c = 1;
+        np.f = Math.PI - s;
+      }
+    }
+    /// <summary>
+    /// Runs this instance.
+    /// </summary>
+    public override void Run() {
+      Run(2000);
+    }
+    /// <summary>
+    /// Runs the specified time.
+    /// </summary>
+    /// <param name="time">The time.</param>
+    public override void Run(int time) {
+      worker = new BackgroundWorker();
+      worker.DoWork += new DoWorkEventHandler(worker_DoWork);
+      worker.RunWorkerAsync(time);
+    }
+    /// <summary>
+    /// Stops this instance.
+    /// </summary>
+    public override void Stop() {
+      if (worker != null && worker.IsBusy)
+        worker.CancelAsync();
+    }
+    /// <summary>
+    /// Handles the DoWork event of the worker control.
+    /// </summary>
+    /// <param name="sender">The source of the event.</param>
+    /// <param name="e">The <see cref="T:System.ComponentModel.DoWorkEventArgs"/> instance containing the event data.</param>
+    private void worker_DoWork(object sender, DoWorkEventArgs e) {
+      Init();
+      Layout();
+    }
+
+
+    #endregion
+
+    #region Classes
+
+    /// <summary>
+    /// Paramter blob to temporarily keep working data of one node.
+    /// </summary>
+    class Params {
+      public int d;
+      public int r;
+      //public double rx;
+      //public double ry;
+      public double a;
+      public double c;
+      public double f;
+    }
+
+    #endregion
+  }
 }
Index: /trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.Netron/3.0.2672.12446/Netron.Diagramming.Core-3.0.2672.12446/Layout/Force/DragForce.cs
===================================================================
--- /trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.Netron/3.0.2672.12446/Netron.Diagramming.Core-3.0.2672.12446/Layout/Force/DragForce.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.Netron/3.0.2672.12446/Netron.Diagramming.Core-3.0.2672.12446/Layout/Force/DragForce.cs	(revision 4068)
@@ -1,95 +1,84 @@
 using System;
-using System.Collections.Generic;
-using System.Text;
 
-namespace Netron.Diagramming.Core.Layout.Force
-{
+namespace Netron.Diagramming.Core.Layout.Force {
+  /// <summary>
+  ///  Implements a viscosity/drag force to help stabilize items.
+  /// </summary>
+  public class DragForce : AbstractForce {
+    #region Fields
     /// <summary>
-    ///  Implements a viscosity/drag force to help stabilize items.
+    /// the parameter names
     /// </summary>
-    public class DragForce : AbstractForce
-    {
-        #region Fields
-        /// <summary>
-        /// the parameter names
-        /// </summary>
-        private static String[] pnames = new String[] { "DragCoefficient" };
-        /// <summary>
-        /// dragging coefficient
-        /// </summary>
-        public static float DefaultDragCoeff = 0.01f;
-        /// <summary>
-        /// minimum dragging coefficient
-        /// </summary>
-        public static float DefaultMinDragCoeff = 0.0f;
-        /// <summary>
-        /// maximum drag coefficient
-        /// </summary>
-        public static float DefaultMaxDragCoeff = 0.1f;
-        /// <summary>
-        /// current dragging coefficient
-        /// </summary>
-        public static int DragCoeff = 0;
-        #endregion
+    private static String[] pnames = new String[] { "DragCoefficient" };
+    /// <summary>
+    /// dragging coefficient
+    /// </summary>
+    public static float DefaultDragCoeff = 0.01f;
+    /// <summary>
+    /// minimum dragging coefficient
+    /// </summary>
+    public static float DefaultMinDragCoeff = 0.0f;
+    /// <summary>
+    /// maximum drag coefficient
+    /// </summary>
+    public static float DefaultMaxDragCoeff = 0.1f;
+    /// <summary>
+    /// current dragging coefficient
+    /// </summary>
+    public static int DragCoeff = 0;
+    #endregion
 
-        #region Properties
-        /// <summary>
-        /// Returns true.
-        /// </summary>
-        /// <value></value>
-        public override bool IsItemForce
-        {
-            get
-            {
-                return true;
-            }
-        }
-        /// <summary>
-        /// Gets the parameter names.
-        /// </summary>
-        /// <value></value>
-        /// <returns></returns>
-        protected override String[] ParameterNames
-        {
-            get
-            {
-                return pnames;
-            }
-        }
-        #endregion
+    #region Properties
+    /// <summary>
+    /// Returns true.
+    /// </summary>
+    /// <value></value>
+    public override bool IsItemForce {
+      get {
+        return true;
+      }
+    }
+    /// <summary>
+    /// Gets the parameter names.
+    /// </summary>
+    /// <value></value>
+    /// <returns></returns>
+    protected override String[] ParameterNames {
+      get {
+        return pnames;
+      }
+    }
+    #endregion
 
-        #region Methods
-        /// <summary>
-        ///  Create a new DragForce.
-        /// </summary>
-        /// <param name="dragCoeff">The drag coefficient.</param>
-        public DragForce(float dragCoeff)
-        {
-            parms = new float[] { dragCoeff };
-            minValues = new float[] { DefaultMinDragCoeff };
-            maxValues = new float[] { DefaultMaxDragCoeff };
-        }
-          
-         /// <summary>
-        /// Create a new DragForce with default drag co-efficient.
-         /// </summary>
-        public DragForce()
-            : this(DefaultDragCoeff)
-        {
+    #region Methods
+    /// <summary>
+    ///  Create a new DragForce.
+    /// </summary>
+    /// <param name="dragCoeff">The drag coefficient.</param>
+    public DragForce(float dragCoeff) {
+      parms = new float[] { dragCoeff };
+      minValues = new float[] { DefaultMinDragCoeff };
+      maxValues = new float[] { DefaultMaxDragCoeff };
+    }
 
-        }
-
-        /// <summary>
-        /// Returns the force acting on the given item.
-        /// </summary>
-        /// <param name="item"></param>
-        public override void GetForce(ForceItem item)
-        {
-            item.Force[0] -= parms[DragCoeff] * item.Velocity[0];
-            item.Force[1] -= parms[DragCoeff] * item.Velocity[1];
-        }
-        #endregion
-        
+    /// <summary>
+    /// Create a new DragForce with default drag co-efficient.
+    /// </summary>
+    public DragForce()
+      : this(DefaultDragCoeff) {
 
     }
+
+    /// <summary>
+    /// Returns the force acting on the given item.
+    /// </summary>
+    /// <param name="item"></param>
+    public override void GetForce(ForceItem item) {
+      item.Force[0] -= parms[DragCoeff] * item.Velocity[0];
+      item.Force[1] -= parms[DragCoeff] * item.Velocity[1];
+    }
+    #endregion
+
+
+  }
 }
Index: /trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.Netron/3.0.2672.12446/Netron.Diagramming.Core-3.0.2672.12446/Layout/Force/ForceBase.cs
===================================================================
--- /trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.Netron/3.0.2672.12446/Netron.Diagramming.Core-3.0.2672.12446/Layout/Force/ForceBase.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.Netron/3.0.2672.12446/Netron.Diagramming.Core-3.0.2672.12446/Layout/Force/ForceBase.cs	(revision 4068)
@@ -1,234 +1,193 @@
 using System;
-using System.Collections.Generic;
-using System.Text;
 
-namespace Netron.Diagramming.Core.Layout.Force
-{
+namespace Netron.Diagramming.Core.Layout.Force {
+  /// <summary>
+  ///Abstract base class for force functions in a force simulation. This
+  ///skeletal version provides support for storing and retrieving float-valued
+  ///parameters of the force function. Subclasses should use the protected
+  ///field <code>parms</code> to store parameter values.
+  /// </summary>
+  public abstract class AbstractForce : IForce {
+    #region Fields
     /// <summary>
-    ///Abstract base class for force functions in a force simulation. This
-    ///skeletal version provides support for storing and retrieving float-valued
-    ///parameters of the force function. Subclasses should use the protected
-    ///field <code>parms</code> to store parameter values.
+    /// temporary paramters blobs
     /// </summary>
-    public abstract class AbstractForce : IForce
-    {
-        #region Fields
-        /// <summary>
-        /// temporary paramters blobs
-        /// </summary>
-        protected float[] parms;
-        /// <summary>
-        /// min values
-        /// </summary>
-        protected float[] minValues;
-        /// <summary>
-        /// max values
-        /// </summary>
-        protected float[] maxValues;
+    protected float[] parms;
+    /// <summary>
+    /// min values
+    /// </summary>
+    protected float[] minValues;
+    /// <summary>
+    /// max values
+    /// </summary>
+    protected float[] maxValues;
 
-        #endregion
+    #endregion
 
-        #region Properties
-        /// <summary>
-        ///Returns false.
-        /// </summary>
-        public virtual bool IsSpringForce
-        {
-            get
-            {
-                return false;
-            }
-        }
+    #region Properties
+    /// <summary>
+    ///Returns false.
+    /// </summary>
+    public virtual bool IsSpringForce {
+      get {
+        return false;
+      }
+    }
 
-        /// <summary>
-        /// Returns the number of parameters (e.g., gravitational constant or
-        /// spring force coefficient) affecting this force function.
-        /// </summary>
-        /// <value></value>
-        /// <returns>the number of parameters</returns>
-        public int ParameterCount
-        {
-            get
-            {
-                return (parms == null ? 0 : parms.Length);
-            }
-        }
+    /// <summary>
+    /// Returns the number of parameters (e.g., gravitational constant or
+    /// spring force coefficient) affecting this force function.
+    /// </summary>
+    /// <value></value>
+    /// <returns>the number of parameters</returns>
+    public int ParameterCount {
+      get {
+        return (parms == null ? 0 : parms.Length);
+      }
+    }
 
-        /// <summary>
-        ///Gets whether this is a force.
-        /// </summary>
-        public virtual bool IsItemForce
-        {
-            get
-            {
-                return false;
-            }
-        }
-        #endregion
+    /// <summary>
+    ///Gets whether this is a force.
+    /// </summary>
+    public virtual bool IsItemForce {
+      get {
+        return false;
+      }
+    }
+    #endregion
 
-        #region Methods
-        /// <summary>
-        /// Initialize this force function. This default implementation does nothing.
-        /// Subclasses should override this method with any needed initialization.
-        /// </summary>
-        /// <param name="fsim">the encompassing ForceSimulator</param>
-        public virtual void Init(ForceSimulator fsim)
-        {
-            // do nothing.
-        }
+    #region Methods
+    /// <summary>
+    /// Initialize this force function. This default implementation does nothing.
+    /// Subclasses should override this method with any needed initialization.
+    /// </summary>
+    /// <param name="fsim">the encompassing ForceSimulator</param>
+    public virtual void Init(ForceSimulator fsim) {
+      // do nothing.
+    }
 
-        /// <summary>
-        /// Gets the parameter names.
-        /// </summary>
-        /// <returns></returns>
-        protected abstract String[] ParameterNames { get;}
+    /// <summary>
+    /// Gets the parameter names.
+    /// </summary>
+    /// <returns></returns>
+    protected abstract String[] ParameterNames { get; }
 
 
-        /// <summary>
-        /// Returns the specified, numbered parameter.
-        /// </summary>
-        /// <param name="i">i the index of the parameter to return</param>
-        /// <returns>the parameter value</returns>
-        public float GetParameter(int i)
-        {
-            if (i < 0 || parms == null || i >= parms.Length)
-            {
-                throw new ArgumentOutOfRangeException();
-            }
-            else
-            {
-                return parms[i];
-            }
-        }
+    /// <summary>
+    /// Returns the specified, numbered parameter.
+    /// </summary>
+    /// <param name="i">i the index of the parameter to return</param>
+    /// <returns>the parameter value</returns>
+    public float GetParameter(int i) {
+      if (i < 0 || parms == null || i >= parms.Length) {
+        throw new ArgumentOutOfRangeException();
+      } else {
+        return parms[i];
+      }
+    }
 
-        /// <summary>
-        /// Gets the minimum value.
-        /// </summary>
-        /// <param name="i">The i.</param>
-        /// <returns></returns>
-        public float GetMinValue(int i)
-        {
-            if (i < 0 || parms == null || i >= parms.Length)
-            {
-                throw new ArgumentOutOfRangeException();
-            }
-            else
-            {
-                return minValues[i];
-            }
-        }
+    /// <summary>
+    /// Gets the minimum value.
+    /// </summary>
+    /// <param name="i">The i.</param>
+    /// <returns></returns>
+    public float GetMinValue(int i) {
+      if (i < 0 || parms == null || i >= parms.Length) {
+        throw new ArgumentOutOfRangeException();
+      } else {
+        return minValues[i];
+      }
+    }
 
-        /// <summary>
-        /// Gets the maximum value.
-        /// </summary>
-        /// <param name="i">The i.</param>
-        /// <returns></returns>
-        public float GetMaxValue(int i)
-        {
-            if (i < 0 || parms == null || i >= parms.Length)
-            {
-                throw new ArgumentOutOfRangeException();
-            }
-            else
-            {
-                return maxValues[i];
-            }
-        }
+    /// <summary>
+    /// Gets the maximum value.
+    /// </summary>
+    /// <param name="i">The i.</param>
+    /// <returns></returns>
+    public float GetMaxValue(int i) {
+      if (i < 0 || parms == null || i >= parms.Length) {
+        throw new ArgumentOutOfRangeException();
+      } else {
+        return maxValues[i];
+      }
+    }
 
-        /// <summary>
-        /// Gets the text name of the requested parameter.
-        /// </summary>
-        /// <param name="i">i the index of the parameter</param>
-        /// <returns>
-        /// a String containing the name of this parameter
-        /// </returns>
-        public String GetParameterName(int i)
-        {
-            String[] pnames = this.ParameterNames;
-            if (i < 0 || pnames == null || i >= pnames.Length)
-            {
-                throw new ArgumentOutOfRangeException();
-            }
-            else
-            {
-                return pnames[i];
-            }
-        }
+    /// <summary>
+    /// Gets the text name of the requested parameter.
+    /// </summary>
+    /// <param name="i">i the index of the parameter</param>
+    /// <returns>
+    /// a String containing the name of this parameter
+    /// </returns>
+    public String GetParameterName(int i) {
+      String[] pnames = this.ParameterNames;
+      if (i < 0 || pnames == null || i >= pnames.Length) {
+        throw new ArgumentOutOfRangeException();
+      } else {
+        return pnames[i];
+      }
+    }
 
-        /// <summary>
-        /// Sets the specified parameter value.
-        /// </summary>
-        /// <param name="i">the index of the parameter</param>
-        /// <param name="val">the new value of the parameter</param>
-        public void SetParameter(int i, float val)
-        {
-            if (i < 0 || parms == null || i >= parms.Length)
-            {
-                throw new ArgumentOutOfRangeException();
-            }
-            else
-            {
-                parms[i] = val;
-            }
-        }
+    /// <summary>
+    /// Sets the specified parameter value.
+    /// </summary>
+    /// <param name="i">the index of the parameter</param>
+    /// <param name="val">the new value of the parameter</param>
+    public void SetParameter(int i, float val) {
+      if (i < 0 || parms == null || i >= parms.Length) {
+        throw new ArgumentOutOfRangeException();
+      } else {
+        parms[i] = val;
+      }
+    }
 
 
-        /// <summary>
-        /// Set the suggested minimum value for a parameter. This value is not
-        /// strictly enforced, but is used by interface components that allow force
-        /// parameters to be varied.
-        /// </summary>
-        /// <param name="i">the parameter index</param>
-        /// <param name="val">the suggested minimum value to use</param>
-        public void SetMinValue(int i, float val)
-        {
-            if (i < 0 || parms == null || i >= parms.Length)
-            {
-                throw new ArgumentOutOfRangeException();
-            }
-            else
-            {
-                minValues[i] = val;
-            }
-        }
+    /// <summary>
+    /// Set the suggested minimum value for a parameter. This value is not
+    /// strictly enforced, but is used by interface components that allow force
+    /// parameters to be varied.
+    /// </summary>
+    /// <param name="i">the parameter index</param>
+    /// <param name="val">the suggested minimum value to use</param>
+    public void SetMinValue(int i, float val) {
+      if (i < 0 || parms == null || i >= parms.Length) {
+        throw new ArgumentOutOfRangeException();
+      } else {
+        minValues[i] = val;
+      }
+    }
 
-        /// <summary>
-        /// Set the suggested maximum value for a parameter. This value is not
-        /// strictly enforced, but is used by interface components that allow force
-        /// parameters to be varied.
-        /// </summary>
-        /// <param name="i">the parameter index</param>
-        /// <param name="val">the suggested maximum value to use</param>
-        public void SetMaxValue(int i, float val)
-        {
-            if (i < 0 || parms == null || i >= parms.Length)
-            {
-                throw new ArgumentOutOfRangeException();
-            }
-            else
-            {
-                maxValues[i] = val;
-            }
-        }
+    /// <summary>
+    /// Set the suggested maximum value for a parameter. This value is not
+    /// strictly enforced, but is used by interface components that allow force
+    /// parameters to be varied.
+    /// </summary>
+    /// <param name="i">the parameter index</param>
+    /// <param name="val">the suggested maximum value to use</param>
+    public void SetMaxValue(int i, float val) {
+      if (i < 0 || parms == null || i >= parms.Length) {
+        throw new ArgumentOutOfRangeException();
+      } else {
+        maxValues[i] = val;
+      }
+    }
 
-        /// <summary>
-        ///Returns the force acting on the given item.
-        /// </summary>
-        public virtual void GetForce(ForceItem item)
-        {
-            throw new NotImplementedException("This class does not support this operation");
-        }
+    /// <summary>
+    ///Returns the force acting on the given item.
+    /// </summary>
+    public virtual void GetForce(ForceItem item) {
+      throw new NotImplementedException("This class does not support this operation");
+    }
 
-        /// <summary>
-        /// Updates the force calculation on the given Spring. The ForceItems
-        /// attached to Spring will have their force values updated appropriately.
-        /// </summary>
-        /// <param name="spring">spring the Spring on which to compute updated forces</param>
-        public virtual void GetForce(Spring spring)
-        {
-            throw new NotImplementedException("This class does not support this operation");
-        }
-        #endregion
+    /// <summary>
+    /// Updates the force calculation on the given Spring. The ForceItems
+    /// attached to Spring will have their force values updated appropriately.
+    /// </summary>
+    /// <param name="spring">spring the Spring on which to compute updated forces</param>
+    public virtual void GetForce(Spring spring) {
+      throw new NotImplementedException("This class does not support this operation");
+    }
+    #endregion
 
-    }
+  }
 }
Index: /trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.Netron/3.0.2672.12446/Netron.Diagramming.Core-3.0.2672.12446/Layout/Force/ForceItem.cs
===================================================================
--- /trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.Netron/3.0.2672.12446/Netron.Diagramming.Core-3.0.2672.12446/Layout/Force/ForceItem.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.Netron/3.0.2672.12446/Netron.Diagramming.Core-3.0.2672.12446/Layout/Force/ForceItem.cs	(revision 4068)
@@ -1,175 +1,161 @@
 using System;
-using System.Collections.Generic;
-using System.Text;
 
-namespace Netron.Diagramming.Core.Layout.Force
-{
+namespace Netron.Diagramming.Core.Layout.Force {
+  /// <summary>
+  /// Represents a point particle in a force simulation, maintaining values for
+  /// mass, forces, velocity, and position.
+  /// </summary>
+  public class ForceItem : ICloneable {
+    #region Fields
     /// <summary>
-    /// Represents a point particle in a force simulation, maintaining values for
-    /// mass, forces, velocity, and position.
+    /// Temporary variables for Runge-Kutta integration 
     /// </summary>
-    public class ForceItem : ICloneable
-    {
-        #region Fields
-        /// <summary>
-        /// Temporary variables for Runge-Kutta integration 
-        /// </summary>
-        private float[,] l;
-        /// <summary>
-        /// The mass value of this ForceItem. 
-        /// </summary>
-        private float mass;
-        /// <summary> The values of the forces acting on this ForceItem. 
-        /// </summary>
-        private float[] force;
-        /// <summary>
-        /// The velocity values of this ForceItem. 
-        /// </summary>
-        private float[] velocity;
-        /// <summary> 
-        /// The location values of this ForceItem. 
-        /// </summary>
-        private float[] location;
-        /// <summary> 
-        /// The previous location values of this ForceItem.
-        /// /// </summary>
-        private float[] plocation;
-        /// <summary> 
-        /// Temporary variables for Runge-Kutta integration
-        /// /// </summary>
-        private float[,] k;
-        #endregion
+    private float[,] l;
+    /// <summary>
+    /// The mass value of this ForceItem. 
+    /// </summary>
+    private float mass;
+    /// <summary> The values of the forces acting on this ForceItem. 
+    /// </summary>
+    private float[] force;
+    /// <summary>
+    /// The velocity values of this ForceItem. 
+    /// </summary>
+    private float[] velocity;
+    /// <summary> 
+    /// The location values of this ForceItem. 
+    /// </summary>
+    private float[] location;
+    /// <summary> 
+    /// The previous location values of this ForceItem.
+    /// /// </summary>
+    private float[] plocation;
+    /// <summary> 
+    /// Temporary variables for Runge-Kutta integration
+    /// /// </summary>
+    private float[,] k;
+    #endregion
 
-        #region Properties
-        /// <summary>
-        /// Gets or sets the temporary Runge-Kutta integration value.
-        /// </summary>
-        /// <value>The runge kutta temp1.</value>
-        public float[,] RungeKuttaTemp1
-        {
-            get { return k; }
-            set { k = value; }
-        }
+    #region Properties
+    /// <summary>
+    /// Gets or sets the temporary Runge-Kutta integration value.
+    /// </summary>
+    /// <value>The runge kutta temp1.</value>
+    public float[,] RungeKuttaTemp1 {
+      get { return k; }
+      set { k = value; }
+    }
 
 
-        /// <summary>
-        /// Gets or sets the temporary Runge-Kutta integration value.
-        /// </summary>
-        /// <value>The runge kutta temp2.</value>
-        public float[,] RungeKuttaTemp2
-        {
-            get { return l; }
-            set { l = value; }
-        }
-        /// <summary>
-        /// Gets or sets the mass.
-        /// </summary>
-        /// <value>The mass.</value>
-        public float Mass
-        {
-            get { return mass; }
-            set { mass = value; }
-        }
-        /// <summary>
-        /// Gets or sets the force.
-        /// </summary>
-        /// <value>The force.</value>
-        public float[] Force
-        {
-            get { return force; }
-            set { force = value; }
-        }
-        /// <summary>
-        /// Gets or sets the velocity.
-        /// </summary>
-        /// <value>The velocity.</value>
-        public float[] Velocity
-        {
-            get { return velocity; }
-            set { velocity = value; }
-        }
-        /// <summary>
-        /// Gets or sets the location.
-        /// </summary>
-        /// <value>The location.</value>
-        public float[] Location
-        {
-            get { return location; }
-            set { location = value; }
-        }
-        /// <summary>
-        /// Gets or sets the previous location.
-        /// </summary>
-        /// <value>The previous location.</value>
-        public float[] PreviousLocation
-        {
-            get { return plocation; }
-            set { plocation = value; }
-        }
+    /// <summary>
+    /// Gets or sets the temporary Runge-Kutta integration value.
+    /// </summary>
+    /// <value>The runge kutta temp2.</value>
+    public float[,] RungeKuttaTemp2 {
+      get { return l; }
+      set { l = value; }
+    }
+    /// <summary>
+    /// Gets or sets the mass.
+    /// </summary>
+    /// <value>The mass.</value>
+    public float Mass {
+      get { return mass; }
+      set { mass = value; }
+    }
+    /// <summary>
+    /// Gets or sets the force.
+    /// </summary>
+    /// <value>The force.</value>
+    public float[] Force {
+      get { return force; }
+      set { force = value; }
+    }
+    /// <summary>
+    /// Gets or sets the velocity.
+    /// </summary>
+    /// <value>The velocity.</value>
+    public float[] Velocity {
+      get { return velocity; }
+      set { velocity = value; }
+    }
+    /// <summary>
+    /// Gets or sets the location.
+    /// </summary>
+    /// <value>The location.</value>
+    public float[] Location {
+      get { return location; }
+      set { location = value; }
+    }
+    /// <summary>
+    /// Gets or sets the previous location.
+    /// </summary>
+    /// <value>The previous location.</value>
+    public float[] PreviousLocation {
+      get { return plocation; }
+      set { plocation = value; }
+    }
 
 
-        #endregion
+    #endregion
 
-        #region Constructor
-        /// <summary>
-        /// Create a new ForceItem.
-        /// </summary>
-        public ForceItem()
-        {
-            mass = 1.0f;
-            force = new float[] { 0.0F, 0.0F };
-            velocity = new float[] { 0.0F, 0.0F };
-            location = new float[] { 0.0F, 0.0F };
-            plocation = new float[] { 0.0F, 0.0F };
-            k = new float[4, 2];
-            l = new float[4, 2];
-        }
+    #region Constructor
+    /// <summary>
+    /// Create a new ForceItem.
+    /// </summary>
+    public ForceItem() {
+      mass = 1.0f;
+      force = new float[] { 0.0F, 0.0F };
+      velocity = new float[] { 0.0F, 0.0F };
+      location = new float[] { 0.0F, 0.0F };
+      plocation = new float[] { 0.0F, 0.0F };
+      k = new float[4, 2];
+      l = new float[4, 2];
+    }
 
-        #endregion
+    #endregion
 
 
 
-        #region Methods
-        /// <summary>
-        /// Checks a ForceItem to make sure its values are all valid numbers(i.e., not NaNs).
-        /// </summary>
-        /// <param name="item">The item to check.</param>
-        /// <returns>
-        /// 	<c>true</c> if the specified item is valid; otherwise, <c>false</c>.
-        /// </returns>
-        public static bool isValid(ForceItem item)
-        {
-            return
-              !(float.IsNaN(item.location[0]) || float.IsNaN(item.location[1]) ||
-                 float.IsNaN(item.plocation[0]) || float.IsNaN(item.plocation[1]) ||
-                 float.IsNaN(item.velocity[0]) || float.IsNaN(item.velocity[1]) ||
-                 float.IsNaN(item.force[0]) || float.IsNaN(item.force[1]));
-        }
+    #region Methods
+    /// <summary>
+    /// Checks a ForceItem to make sure its values are all valid numbers(i.e., not NaNs).
+    /// </summary>
+    /// <param name="item">The item to check.</param>
+    /// <returns>
+    /// 	<c>true</c> if the specified item is valid; otherwise, <c>false</c>.
+    /// </returns>
+    public static bool isValid(ForceItem item) {
+      return
+        !(float.IsNaN(item.location[0]) || float.IsNaN(item.location[1]) ||
+           float.IsNaN(item.plocation[0]) || float.IsNaN(item.plocation[1]) ||
+           float.IsNaN(item.velocity[0]) || float.IsNaN(item.velocity[1]) ||
+           float.IsNaN(item.force[0]) || float.IsNaN(item.force[1]));
+    }
 
 
-        /// <summary>
-        /// Creates a new object that is a copy of the current instance.
-        /// </summary>
-        /// <returns>
-        /// A new object that is a copy of this instance.
-        /// </returns>
-        public object Clone()
-        {
-            //ForceItem item = new ForceItem();
-            //item.mass = this.mass;
-            //Array.Copy(force, 0, item.force, 0, 2);
-            //Array.Copy(velocity, 0, item.velocity, 0, 2);
-            //Array.Copy(location, 0, item.location, 0, 2);
-            //Array.Copy(plocation, 0, item.plocation, 0, 2);
-            //for (int i = 0; i < k.Length; ++i)
-            //{
-            //    Array.Copy(k[i,], 0, item.k[i,], 0, 2);
-            //    Array.Copy(l[i], 0, item.l[i], 0, 2);
-            //    Array
-            //}
-            //return item;
-            throw new NotImplementedException("Do you really need this feature?");
-        }
-        #endregion
+    /// <summary>
+    /// Creates a new object that is a copy of the current instance.
+    /// </summary>
+    /// <returns>
+    /// A new object that is a copy of this instance.
+    /// </returns>
+    public object Clone() {
+      //ForceItem item = new ForceItem();
+      //item.mass = this.mass;
+      //Array.Copy(force, 0, item.force, 0, 2);
+      //Array.Copy(velocity, 0, item.velocity, 0, 2);
+      //Array.Copy(location, 0, item.location, 0, 2);
+      //Array.Copy(plocation, 0, item.plocation, 0, 2);
+      //for (int i = 0; i < k.Length; ++i)
+      //{
+      //    Array.Copy(k[i,], 0, item.k[i,], 0, 2);
+      //    Array.Copy(l[i], 0, item.l[i], 0, 2);
+      //    Array
+      //}
+      //return item;
+      throw new NotImplementedException("Do you really need this feature?");
     }
+    #endregion
+  }
 }
Index: /trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.Netron/3.0.2672.12446/Netron.Diagramming.Core-3.0.2672.12446/Layout/Force/ForceSimulator.cs
===================================================================
--- /trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.Netron/3.0.2672.12446/Netron.Diagramming.Core-3.0.2672.12446/Layout/Force/ForceSimulator.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.Netron/3.0.2672.12446/Netron.Diagramming.Core-3.0.2672.12446/Layout/Force/ForceSimulator.cs	(revision 4068)
@@ -1,270 +1,239 @@
 using System;
 using System.Collections.Generic;
-using System.Text;
-
-namespace Netron.Diagramming.Core.Layout.Force
-{
-    /// <summary>
-    ///  Manages a simulation of physical forces acting on bodies. To create a
-    /// custom ForceSimulator, add the desired <see cref="IForce"/> functions and choose an
-    /// appropriate <see cref="Integrator"/>.
-    /// </summary>
-    public class ForceSimulator
-    {
-        #region Fields
-        /// <summary>
-        /// the force items
-        /// </summary>
-        private List<ForceItem> mItems;
-        /// <summary>
-        /// the spring items
-        /// </summary>
-        private List<Spring> springs;
-        /// <summary>
-        /// the forces
-        /// </summary>
-        private IForce[] iforces;
-        /// <summary>
-        /// the spring forces
-        /// </summary>
-        private IForce[] sforces;
-
-        private int iflen;
-        private int sflen;
-        private IIntegrator mIntegrator;
-        /// <summary>
-        /// the maximum speed allowed
-        /// </summary>
-        private float mSpeedLimit = 1.0f;
-        #endregion
-
-        #region Properties
-        /// <summary>
-        /// Get an iterator over all registered ForceItems.
-        /// </summary>
-        /// <value> the ForceItems.</value>
-        public List<ForceItem> Items
-        {
-            get
-            {
-                return mItems;
-            }
+
+namespace Netron.Diagramming.Core.Layout.Force {
+  /// <summary>
+  ///  Manages a simulation of physical forces acting on bodies. To create a
+  /// custom ForceSimulator, add the desired <see cref="IForce"/> functions and choose an
+  /// appropriate <see cref="Integrator"/>.
+  /// </summary>
+  public class ForceSimulator {
+    #region Fields
+    /// <summary>
+    /// the force items
+    /// </summary>
+    private List<ForceItem> mItems;
+    /// <summary>
+    /// the spring items
+    /// </summary>
+    private List<Spring> springs;
+    /// <summary>
+    /// the forces
+    /// </summary>
+    private IForce[] iforces;
+    /// <summary>
+    /// the spring forces
+    /// </summary>
+    private IForce[] sforces;
+
+    private int iflen;
+    private int sflen;
+    private IIntegrator mIntegrator;
+    /// <summary>
+    /// the maximum speed allowed
+    /// </summary>
+    private float mSpeedLimit = 1.0f;
+    #endregion
+
+    #region Properties
+    /// <summary>
+    /// Get an iterator over all registered ForceItems.
+    /// </summary>
+    /// <value> the ForceItems.</value>
+    public List<ForceItem> Items {
+      get {
+        return mItems;
+      }
+    }
+    /// <summary>
+    /// Get an array of all the IForce functions used in this simulator.
+    /// </summary>
+    /// <value> an array of IForce functions</value>
+    public IForce[] Forces {
+      get {
+
+        IForce[] rv = new IForce[iflen + sflen];
+        Array.Copy(iforces, 0, rv, 0, iflen);
+        Array.Copy(sforces, 0, rv, iflen, sflen);
+        return rv;
+      }
+    }
+    /// <summary>
+    /// Gets all registered Springs.
+    /// </summary>
+    public List<Spring> Springs {
+      get {
+        return springs;
+      }
+    }
+    /// <summary>
+    /// Get or sets the speed limit, or maximum velocity value allowed by this
+    /// simulator.
+    /// </summary>
+    /// <returns>the "speed limit" maximum velocity value</returns>
+    public float SpeedLimit {
+      get {
+        return mSpeedLimit;
+      }
+      set { mSpeedLimit = value; }
+    }
+    /// <summary>
+    /// Get or sets the Integrator used by this simulator.
+    /// </summary>
+    public IIntegrator Integrator {
+      get {
+        return mIntegrator;
+      }
+      set { mIntegrator = value; }
+    }
+    #endregion
+
+    #region Constructor
+    /// <summary>
+    /// Create a new, empty ForceSimulator. A RungeKuttaIntegrator is used
+    /// by default.
+    /// </summary>
+    public ForceSimulator()
+      : this(new RungeKuttaIntegrator()) {
+    }
+
+    /// <summary>
+    /// Create a new, empty ForceSimulator.
+    /// </summary>
+    /// <param name="integr">the Integrator to use</param>
+    public ForceSimulator(IIntegrator integr) {
+      mIntegrator = integr;
+      iforces = new IForce[5];
+      sforces = new IForce[5];
+      iflen = 0;
+      sflen = 0;
+      mItems = new List<ForceItem>();
+      springs = new List<Spring>();
+    }
+    #endregion
+
+    #region Methods
+
+    /// <summary>
+    /// Clear this simulator, removing all ForceItem and Spring instances
+    /// for the simulator.
+    /// </summary>
+    public void Clear() {
+      mItems.Clear();
+      Spring.SpringFactory f = Spring.Factory;
+      foreach (Spring spring in springs)
+        f.reclaim(spring);
+      springs.Clear();
+    }
+
+    /// <summary>
+    /// Add a new IForce function to the simulator.
+    /// </summary>
+    /// <param name="f">the IForce function to add</param>
+    public void AddForce(IForce f) {
+      if (f.IsItemForce) {
+        if (iforces.Length == iflen) {
+          // resize necessary
+          IForce[] newf = new IForce[iflen + 10];
+          Array.Copy(iforces, 0, newf, 0, iforces.Length);
+          iforces = newf;
         }
-        /// <summary>
-        /// Get an array of all the IForce functions used in this simulator.
-        /// </summary>
-        /// <value> an array of IForce functions</value>
-        public IForce[] Forces
-        {
-            get
-            {
-
-                IForce[] rv = new IForce[iflen + sflen];
-                Array.Copy(iforces, 0, rv, 0, iflen);
-                Array.Copy(sforces, 0, rv, iflen, sflen);
-                return rv;
-            }
+        iforces[iflen++] = f;
+      }
+      if (f.IsSpringForce) {
+        if (sforces.Length == sflen) {
+          // resize necessary
+          IForce[] newf = new IForce[sflen + 10];
+          Array.Copy(sforces, 0, newf, 0, sforces.Length);
+          sforces = newf;
         }
-        /// <summary>
-        /// Gets all registered Springs.
-        /// </summary>
-        public List<Spring> Springs
-        {
-            get
-            {
-                return springs;
-            }
+        sforces[sflen++] = f;
+      }
+    }
+
+    /// <summary>
+    /// Add a ForceItem to the simulation.
+    /// </summary>
+    /// <param name="item"> item the ForceItem to add.</param>
+    public void addItem(ForceItem item) {
+      mItems.Add(item);
+    }
+
+    /// <summary>
+    /// Remove a ForceItem to the simulation.
+    /// </summary>
+    /// <param name="item">Item the ForceItem to remove.</param>
+    /// <returns></returns>
+    public bool removeItem(ForceItem item) {
+      return mItems.Remove(item);
+    }
+
+    /// <summary>
+    /// Add a Spring to the simulation.
+    /// </summary>
+    /// <param name="item1">the first endpoint of the spring</param>
+    /// <param name="item2">the second endpoint of the spring</param>
+    /// <returns>the Spring added to the simulation</returns>
+    public Spring addSpring(ForceItem item1, ForceItem item2) {
+      return addSpring(item1, item2, -1.0F, -1.0F);
+    }
+
+    /// <summary>
+    /// Add a Spring to the simulation.
+    /// </summary>
+    /// <param name="item1">the first endpoint of the spring</param>
+    /// <param name="item2">the second endpoint of the spring</param>
+    /// <param name="length">the spring length</param>
+    /// <returns>the Spring added to the simulation</returns>
+    public Spring addSpring(ForceItem item1, ForceItem item2, float length) {
+      return addSpring(item1, item2, -1.0F, length);
+    }
+
+    /// <summary>
+    /// Add a Spring to the simulation.
+    /// </summary>
+    /// <param name="item1">the first endpoint of the spring</param>
+    /// <param name="item2"> the second endpoint of the spring</param>
+    /// <param name="coeff">the spring coefficient</param>
+    /// <param name="length">the spring length</param>
+    /// <returns> the Spring added to the simulation</returns>
+    public Spring addSpring(ForceItem item1, ForceItem item2, float coeff, float length) {
+      if (item1 == null || item2 == null)
+        throw new ArgumentException("ForceItems must be non-null");
+      Spring s = Spring.Factory.getSpring(item1, item2, coeff, length);
+      springs.Add(s);
+      return s;
+    }
+
+    /// <summary>
+    /// Run the simulator for one timestep.
+    /// </summary>
+    /// <param name="timestep">the span of the timestep for which to run the simulator</param>
+    public void RunSimulator(long timestep) {
+      Accumulate();
+      mIntegrator.Integrate(this, timestep);
+    }
+
+    /// <summary>
+    /// Accumulate all forces acting on the items in this simulation
+    /// </summary>
+    public void Accumulate() {
+      for (int i = 0; i < iflen; i++)
+        iforces[i].Init(this);
+      for (int i = 0; i < sflen; i++)
+        sforces[i].Init(this);
+      foreach (ForceItem item in mItems) {
+        item.Force[0] = 0.0f; item.Force[1] = 0.0f;
+        for (int i = 0; i < iflen; i++)
+          iforces[i].GetForce(item);
+      }
+      foreach (Spring s in springs) {
+        for (int i = 0; i < sflen; i++) {
+          sforces[i].GetForce(s);
         }
-        /// <summary>
-        /// Get or sets the speed limit, or maximum velocity value allowed by this
-        /// simulator.
-        /// </summary>
-        /// <returns>the "speed limit" maximum velocity value</returns>
-        public float SpeedLimit
-        {
-            get
-            {
-                return mSpeedLimit;
-            }
-            set { mSpeedLimit = value; }
-        }
-        /// <summary>
-        /// Get or sets the Integrator used by this simulator.
-        /// </summary>
-        public IIntegrator Integrator
-        {
-            get
-            {
-                return mIntegrator;
-            }
-            set { mIntegrator = value; }
-        }
-        #endregion
-
-        #region Constructor
-        /// <summary>
-        /// Create a new, empty ForceSimulator. A RungeKuttaIntegrator is used
-        /// by default.
-        /// </summary>
-        public ForceSimulator()
-            : this(new RungeKuttaIntegrator())
-        {
-        }
-
-        /// <summary>
-        /// Create a new, empty ForceSimulator.
-        /// </summary>
-        /// <param name="integr">the Integrator to use</param>
-        public ForceSimulator(IIntegrator integr)
-        {
-            mIntegrator = integr;
-            iforces = new IForce[5];
-            sforces = new IForce[5];
-            iflen = 0;
-            sflen = 0;
-            mItems = new List<ForceItem>();
-            springs = new List<Spring>();
-        }
-        #endregion
-
-        #region Methods
-
-        /// <summary>
-        /// Clear this simulator, removing all ForceItem and Spring instances
-        /// for the simulator.
-        /// </summary>
-        public void Clear()
-        {
-            mItems.Clear();
-            Spring.SpringFactory f = Spring.Factory;
-            foreach (Spring spring in springs)
-                f.reclaim(spring);
-            springs.Clear();
-        }
-
-        /// <summary>
-        /// Add a new IForce function to the simulator.
-        /// </summary>
-        /// <param name="f">the IForce function to add</param>
-        public void AddForce(IForce f)
-        {
-            if (f.IsItemForce)
-            {
-                if (iforces.Length == iflen)
-                {
-                    // resize necessary
-                    IForce[] newf = new IForce[iflen + 10];
-                    Array.Copy(iforces, 0, newf, 0, iforces.Length);
-                    iforces = newf;
-                }
-                iforces[iflen++] = f;
-            }
-            if (f.IsSpringForce)
-            {
-                if (sforces.Length == sflen)
-                {
-                    // resize necessary
-                    IForce[] newf = new IForce[sflen + 10];
-                    Array.Copy(sforces, 0, newf, 0, sforces.Length);
-                    sforces = newf;
-                }
-                sforces[sflen++] = f;
-            }
-        }
-
-        /// <summary>
-        /// Add a ForceItem to the simulation.
-        /// </summary>
-        /// <param name="item"> item the ForceItem to add.</param>
-        public void addItem(ForceItem item)
-        {
-            mItems.Add(item);
-        }
-
-        /// <summary>
-        /// Remove a ForceItem to the simulation.
-        /// </summary>
-        /// <param name="item">Item the ForceItem to remove.</param>
-        /// <returns></returns>
-        public bool removeItem(ForceItem item)
-        {
-            return mItems.Remove(item);
-        }
-
-        /// <summary>
-        /// Add a Spring to the simulation.
-        /// </summary>
-        /// <param name="item1">the first endpoint of the spring</param>
-        /// <param name="item2">the second endpoint of the spring</param>
-        /// <returns>the Spring added to the simulation</returns>
-        public Spring addSpring(ForceItem item1, ForceItem item2)
-        {
-            return addSpring(item1, item2, -1.0F, -1.0F);
-        }
-
-        /// <summary>
-        /// Add a Spring to the simulation.
-        /// </summary>
-        /// <param name="item1">the first endpoint of the spring</param>
-        /// <param name="item2">the second endpoint of the spring</param>
-        /// <param name="length">the spring length</param>
-        /// <returns>the Spring added to the simulation</returns>
-        public Spring addSpring(ForceItem item1, ForceItem item2, float length)
-        {
-            return addSpring(item1, item2, -1.0F, length);
-        }
-
-        /// <summary>
-        /// Add a Spring to the simulation.
-        /// </summary>
-        /// <param name="item1">the first endpoint of the spring</param>
-        /// <param name="item2"> the second endpoint of the spring</param>
-        /// <param name="coeff">the spring coefficient</param>
-        /// <param name="length">the spring length</param>
-        /// <returns> the Spring added to the simulation</returns>
-        public Spring addSpring(ForceItem item1, ForceItem item2, float coeff, float length)
-        {
-            if (item1 == null || item2 == null)
-                throw new ArgumentException("ForceItems must be non-null");
-            Spring s = Spring.Factory.getSpring(item1, item2, coeff, length);
-            springs.Add(s);
-            return s;
-        }
-
-        /// <summary>
-        /// Run the simulator for one timestep.
-        /// </summary>
-        /// <param name="timestep">the span of the timestep for which to run the simulator</param>
-        public void RunSimulator(long timestep)
-        {
-            Accumulate();
-            mIntegrator.Integrate(this, timestep);
-        }
-
-        /// <summary>
-        /// Accumulate all forces acting on the items in this simulation
-        /// </summary>
-        public void Accumulate()
-        {
-            for (int i = 0; i < iflen; i++)
-                iforces[i].Init(this);
-            for (int i = 0; i < sflen; i++)
-                sforces[i].Init(this);
-            foreach (ForceItem item in mItems)
-            {
-                item.Force[0] = 0.0f; item.Force[1] = 0.0f;
-                for (int i = 0; i < iflen; i++)
-                    iforces[i].GetForce(item);
-            }
-            foreach (Spring s in springs)
-            {
-                for (int i = 0; i < sflen; i++)
-                {
-                    sforces[i].GetForce(s);
-                }
-            }
-        }
-        #endregion
-
-    }
+      }
+    }
+    #endregion
+
+  }
 }
Index: /trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.Netron/3.0.2672.12446/Netron.Diagramming.Core-3.0.2672.12446/Layout/Force/IForce.cs
===================================================================
--- /trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.Netron/3.0.2672.12446/Netron.Diagramming.Core-3.0.2672.12446/Layout/Force/IForce.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.Netron/3.0.2672.12446/Netron.Diagramming.Core-3.0.2672.12446/Layout/Force/IForce.cs	(revision 4068)
@@ -1,112 +1,108 @@
 using System;
-using System.Collections.Generic;
-using System.Text;
 
-namespace Netron.Diagramming.Core.Layout.Force
-{
+namespace Netron.Diagramming.Core.Layout.Force {
+  /// <summary>
+  /// Interface for force functions in a force simulation.
+  /// </summary>
+  public interface IForce {
     /// <summary>
-    /// Interface for force functions in a force simulation.
+    /// Initialize this force function.
     /// </summary>
-    public interface IForce
-    {
-        /// <summary>
-        /// Initialize this force function.
-        /// </summary>
-        /// <param name="fsim"> the encompassing ForceSimulator</param>     
-        void Init(ForceSimulator fsim);
+    /// <param name="fsim"> the encompassing ForceSimulator</param>     
+    void Init(ForceSimulator fsim);
 
-        /// <summary>
-        /// Returns the number of parameters (e.g., gravitational constant or
-        /// spring force coefficient) affecting this force function. 
-        /// </summary>
-        int ParameterCount { get;}
+    /// <summary>
+    /// Returns the number of parameters (e.g., gravitational constant or
+    /// spring force coefficient) affecting this force function. 
+    /// </summary>
+    int ParameterCount { get; }
 
-        /// <summary>
-        /// Returns the specified, numbered parameter.
-        /// </summary>
-        /// <param name="i">i the index of the parameter to return</param>
-        /// <returns>the parameter value</returns>
-        float GetParameter(int i);
+    /// <summary>
+    /// Returns the specified, numbered parameter.
+    /// </summary>
+    /// <param name="i">i the index of the parameter to return</param>
+    /// <returns>the parameter value</returns>
+    float GetParameter(int i);
 
-        /// <summary>
-        /// Get the suggested minimum value for a parameter. This value is not
-        /// strictly enforced, but is used by interface components that allow force
-        /// parameters to be varied.
-        /// </summary>
-        /// <param name="param">the parameter index</param>
-        /// <returns>the suggested minimum value.</returns>
-        float GetMinValue(int param);
+    /// <summary>
+    /// Get the suggested minimum value for a parameter. This value is not
+    /// strictly enforced, but is used by interface components that allow force
+    /// parameters to be varied.
+    /// </summary>
+    /// <param name="param">the parameter index</param>
+    /// <returns>the suggested minimum value.</returns>
+    float GetMinValue(int param);
 
-        /// <summary>
-        /// Get the suggested maximum value for a parameter. This value is not
-        /// strictly enforced, but is used by interface components that allow force
-        /// parameters to be varied.
-        /// </summary>
-        /// <param name="param">the parameter index</param>
-        /// <returns>the suggested maximum value.</returns>
-        float GetMaxValue(int param);
+    /// <summary>
+    /// Get the suggested maximum value for a parameter. This value is not
+    /// strictly enforced, but is used by interface components that allow force
+    /// parameters to be varied.
+    /// </summary>
+    /// <param name="param">the parameter index</param>
+    /// <returns>the suggested maximum value.</returns>
+    float GetMaxValue(int param);
 
-        /// <summary>
-        /// Gets the text name of the requested parameter.
-        /// </summary>
-        /// <param name="i"> the index of the parameter</param>
-        /// <returns>a String containing the name of this parameter</returns>
-        String GetParameterName(int i);
+    /// <summary>
+    /// Gets the text name of the requested parameter.
+    /// </summary>
+    /// <param name="i"> the index of the parameter</param>
+    /// <returns>a String containing the name of this parameter</returns>
+    String GetParameterName(int i);
 
-        /// <summary>
-        /// Sets the specified parameter value.
-        /// </summary>
-        /// <param name="i">  the index of the parameter</param>
-        /// <param name="val">the new value of the parameter</param>
-        void SetParameter(int i, float val);
+    /// <summary>
+    /// Sets the specified parameter value.
+    /// </summary>
+    /// <param name="i">  the index of the parameter</param>
+    /// <param name="val">the new value of the parameter</param>
+    void SetParameter(int i, float val);
 
-        /// <summary>
-        /// Set the suggested minimum value for a parameter. This value is not
-        /// strictly enforced, but is used by interface components that allow force
-        /// parameters to be varied.
-        /// </summary>
-        /// <param name="i">the parameter index</param>
-        /// <param name="val">the suggested minimum value to use</param>
-        void SetMinValue(int i, float val);
+    /// <summary>
+    /// Set the suggested minimum value for a parameter. This value is not
+    /// strictly enforced, but is used by interface components that allow force
+    /// parameters to be varied.
+    /// </summary>
+    /// <param name="i">the parameter index</param>
+    /// <param name="val">the suggested minimum value to use</param>
+    void SetMinValue(int i, float val);
 
-        /// <summary>
-        /// Set the suggested maximum value for a parameter. This value is not
-        /// strictly enforced, but is used by interface components that allow force
-        /// parameters to be varied.
-        /// </summary>
-        /// <param name="i">the parameter index</param>
-        /// <param name="val">the suggested maximum value to use</param>
-        void SetMaxValue(int i, float val);
+    /// <summary>
+    /// Set the suggested maximum value for a parameter. This value is not
+    /// strictly enforced, but is used by interface components that allow force
+    /// parameters to be varied.
+    /// </summary>
+    /// <param name="i">the parameter index</param>
+    /// <param name="val">the suggested maximum value to use</param>
+    void SetMaxValue(int i, float val);
 
-        /// <summary>
-        /// Indicates if this force function will compute forces on Spring instances.   
-        /// </summary>
-        /// <returns>
-        /// 	<c>true</c> if this force function processes Spring instances; otherwise, <c>false</c>.
-        /// </returns>
-        bool IsSpringForce { get;}
+    /// <summary>
+    /// Indicates if this force function will compute forces on Spring instances.   
+    /// </summary>
+    /// <returns>
+    /// 	<c>true</c> if this force function processes Spring instances; otherwise, <c>false</c>.
+    /// </returns>
+    bool IsSpringForce { get; }
 
-        /// <summary>
-        /// Indicates if this force function will compute forces on ForceItem instances
-        /// </summary>
-        /// <returns>
-        /// 	<c>true</c> if this force function processes IForce instances; otherwise, <c>false</c>.
-        /// </returns>
-        bool IsItemForce { get;}
+    /// <summary>
+    /// Indicates if this force function will compute forces on ForceItem instances
+    /// </summary>
+    /// <returns>
+    /// 	<c>true</c> if this force function processes IForce instances; otherwise, <c>false</c>.
+    /// </returns>
+    bool IsItemForce { get; }
 
-        /// <summary>
-        /// Updates the force calculation on the given ForceItem
-        /// </summary>
-        /// <param name="item"> the ForceItem on which to compute updated forces</param>
-        void GetForce(ForceItem item);
+    /// <summary>
+    /// Updates the force calculation on the given ForceItem
+    /// </summary>
+    /// <param name="item"> the ForceItem on which to compute updated forces</param>
+    void GetForce(ForceItem item);
 
-        /// <summary>
-        /// Updates the force calculation on the given Spring. The ForceItems
-        /// attached to Spring will have their force values updated appropriately.
-        /// </summary>
-        /// <param name="spring">spring the Spring on which to compute updated forces</param>
-        void GetForce(Spring spring);
+    /// <summary>
+    /// Updates the force calculation on the given Spring. The ForceItems
+    /// attached to Spring will have their force values updated appropriately.
+    /// </summary>
+    /// <param name="spring">spring the Spring on which to compute updated forces</param>
+    void GetForce(Spring spring);
 
-    }
+  }
 
 }
Index: /trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.Netron/3.0.2672.12446/Netron.Diagramming.Core-3.0.2672.12446/Layout/Force/IIntegrator.cs
===================================================================
--- /trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.Netron/3.0.2672.12446/Netron.Diagramming.Core-3.0.2672.12446/Layout/Force/IIntegrator.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.Netron/3.0.2672.12446/Netron.Diagramming.Core-3.0.2672.12446/Layout/Force/IIntegrator.cs	(revision 4068)
@@ -1,16 +1,11 @@
-using System;
-using System.Collections.Generic;
-using System.Text;
 
-namespace Netron.Diagramming.Core.Layout.Force
-{
-    /// <summary>
-    /// Interface for numerical integration routines. These routines are used
-     /// to update the position and velocity of items in response to forces
-     /// over a given time step.
-    /// </summary>
-    public interface IIntegrator
-    {
-        void Integrate(ForceSimulator sim, long timestep);
-    }
+namespace Netron.Diagramming.Core.Layout.Force {
+  /// <summary>
+  /// Interface for numerical integration routines. These routines are used
+  /// to update the position and velocity of items in response to forces
+  /// over a given time step.
+  /// </summary>
+  public interface IIntegrator {
+    void Integrate(ForceSimulator sim, long timestep);
+  }
 }
Index: /trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.Netron/3.0.2672.12446/Netron.Diagramming.Core-3.0.2672.12446/Layout/Force/NBodyForce.cs
===================================================================
--- /trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.Netron/3.0.2672.12446/Netron.Diagramming.Core-3.0.2672.12446/Layout/Force/NBodyForce.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.Netron/3.0.2672.12446/Netron.Diagramming.Core-3.0.2672.12446/Layout/Force/NBodyForce.cs	(revision 4068)
@@ -2,484 +2,427 @@
 using System.Collections.Generic;
 using System.Diagnostics;
-using System.Text;
-using Netron.Diagramming.Core.Analysis;
-namespace Netron.Diagramming.Core.Layout.Force
-{
-    /// <summary>
-    /// <para>
-    /// Force function which computes an n-body force such as gravity,
-    /// anti-gravity, or the results of electric charges. This function implements
-    /// the the Barnes-Hut algorithm for efficient n-body force simulations,
-    /// using a quad-tree with aggregated mass values to compute the n-body
-    /// force in O(N log N) time, where N is the number of ForceItems.</para>
-    /// 
-    /// <para>The algorithm used is that of J. Barnes and P. Hut, in their research
-    /// paper <i>A Hierarchical  O(n log n) force calculation algorithm</i>, Nature, 
-    ///  v.324, December 1986. For more details on the algorithm, see one of
-    ///  the following links --
-    /// <list type="bullet">
-    /// 
-    ///   <item><a href="http://www.cs.berkeley.edu/~demmel/cs267/lecture26/lecture26.html">James Demmel's UC Berkeley lecture notes</a></item>
-    ///   <item><a href="http://www.physics.gmu.edu/~large/lr_forces/desc/bh/bhdesc.html">Description of the Barnes-Hut algorithm</a></item>
-    ///   <item><a href="http://www.ifa.hawaii.edu/~barnes/treecode/treeguide.html">Joshua Barnes' recent implementation</a></item>
-    /// </list></para>
-    /// </summary>
-    public class NBodyForce : AbstractForce
-    {
-
-        /* 
-          The indexing scheme for quadtree child nodes goes row by row.
-            0 | 1    0 -> top left,    1 -> top right
-           -------
-            2 | 3    2 -> bottom left, 3 -> bottom right
-         */
-
-        #region Fields
-        private static String[] pnames = new String[] { "GravitationalConstant", 
+namespace Netron.Diagramming.Core.Layout.Force {
+  /// <summary>
+  /// <para>
+  /// Force function which computes an n-body force such as gravity,
+  /// anti-gravity, or the results of electric charges. This function implements
+  /// the the Barnes-Hut algorithm for efficient n-body force simulations,
+  /// using a quad-tree with aggregated mass values to compute the n-body
+  /// force in O(N log N) time, where N is the number of ForceItems.</para>
+  /// 
+  /// <para>The algorithm used is that of J. Barnes and P. Hut, in their research
+  /// paper <i>A Hierarchical  O(n log n) force calculation algorithm</i>, Nature, 
+  ///  v.324, December 1986. For more details on the algorithm, see one of
+  ///  the following links --
+  /// <list type="bullet">
+  /// 
+  ///   <item><a href="http://www.cs.berkeley.edu/~demmel/cs267/lecture26/lecture26.html">James Demmel's UC Berkeley lecture notes</a></item>
+  ///   <item><a href="http://www.physics.gmu.edu/~large/lr_forces/desc/bh/bhdesc.html">Description of the Barnes-Hut algorithm</a></item>
+  ///   <item><a href="http://www.ifa.hawaii.edu/~barnes/treecode/treeguide.html">Joshua Barnes' recent implementation</a></item>
+  /// </list></para>
+  /// </summary>
+  public class NBodyForce : AbstractForce {
+
+    /* 
+      The indexing scheme for quadtree child nodes goes row by row.
+        0 | 1    0 -> top left,    1 -> top right
+       -------
+        2 | 3    2 -> bottom left, 3 -> bottom right
+     */
+
+    #region Fields
+    private static String[] pnames = new String[] { "GravitationalConstant", 
             "Distance", "BarnesHutTheta"  };
 
-        public static float DEFAULT_GRAV_CONSTANT = -1.0f;
-        public static float DEFAULT_MIN_GRAV_CONSTANT = -10f;
-        public static float DEFAULT_MAX_GRAV_CONSTANT = 10f;
-
-        public static float DEFAULT_DISTANCE = -1f;
-        public static float DEFAULT_MIN_DISTANCE = -1f;
-        public static float DEFAULT_MAX_DISTANCE = 500f;
-
-        public static float DEFAULT_THETA = 0.9f;
-        public static float DEFAULT_MIN_THETA = 0.0f;
-        public static float DEFAULT_MAX_THETA = 1.0f;
-
-        public static int GRAVITATIONAL_CONST = 0;
-        public static int MIN_DISTANCE = 1;
-        public static int BARNES_HUT_THETA = 2;
-
-        private float xMin, xMax, yMin, yMax;
-        private QuadTreeNodeFactory factory = new QuadTreeNodeFactory();
-        private QuadTreeNode root;
-
-        private Random rand = new Random(12345678); // deterministic randomness
-
-        #endregion
-
-        #region Properties
-
-        /**
+    public static float DEFAULT_GRAV_CONSTANT = -1.0f;
+    public static float DEFAULT_MIN_GRAV_CONSTANT = -10f;
+    public static float DEFAULT_MAX_GRAV_CONSTANT = 10f;
+
+    public static float DEFAULT_DISTANCE = -1f;
+    public static float DEFAULT_MIN_DISTANCE = -1f;
+    public static float DEFAULT_MAX_DISTANCE = 500f;
+
+    public static float DEFAULT_THETA = 0.9f;
+    public static float DEFAULT_MIN_THETA = 0.0f;
+    public static float DEFAULT_MAX_THETA = 1.0f;
+
+    public static int GRAVITATIONAL_CONST = 0;
+    public static int MIN_DISTANCE = 1;
+    public static int BARNES_HUT_THETA = 2;
+
+    private float xMin, xMax, yMin, yMax;
+    private QuadTreeNodeFactory factory = new QuadTreeNodeFactory();
+    private QuadTreeNode root;
+
+    private Random rand = new Random(12345678); // deterministic randomness
+
+    #endregion
+
+    #region Properties
+
+    /**
          * Gets whether this is a force item.
          */
-        public override bool IsItemForce
-        {
-            get
-            {
-                return true;
-            }
-        }
-
-        /// <summary>
-        /// Gets the parameter names.
-        /// </summary>
-        /// <value></value>
-        /// <returns></returns>
-        protected override String[] ParameterNames
-        {
-            get
-            {
-                return pnames;
-            }
-        }
-        #endregion
-
-        #region Constructor
-
-
-
-        /// <summary>
-        /// Create a new NBodyForce with default parameters.
-        /// </summary>
-        public NBodyForce()
-            : this(DEFAULT_GRAV_CONSTANT, DEFAULT_DISTANCE, DEFAULT_THETA)
-        {
-
-        }
-        #endregion
-
-        #region Methods
-        /// <summary>
-        /// Create a new NBodyForce.
-        /// </summary>
-        /// <param name="gravConstant">the gravitational constant to use. Nodes will attract each other if this value is positive, and will repel each other if it is negative.</param>
-        /// <param name="minDistance">the distance within which two particles will  interact. If -1, the value is treated as infinite.</param>
-        /// <param name="theta">the Barnes-Hut parameter theta, which controls when an aggregated mass is used rather than drilling down to individual  item mass values.</param>
-        public NBodyForce(float gravConstant, float minDistance, float theta)
-        {
-            parms = new float[] { gravConstant, minDistance, theta };
-            minValues = new float[] { DEFAULT_MIN_GRAV_CONSTANT,
+    public override bool IsItemForce {
+      get {
+        return true;
+      }
+    }
+
+    /// <summary>
+    /// Gets the parameter names.
+    /// </summary>
+    /// <value></value>
+    /// <returns></returns>
+    protected override String[] ParameterNames {
+      get {
+        return pnames;
+      }
+    }
+    #endregion
+
+    #region Constructor
+
+
+
+    /// <summary>
+    /// Create a new NBodyForce with default parameters.
+    /// </summary>
+    public NBodyForce()
+      : this(DEFAULT_GRAV_CONSTANT, DEFAULT_DISTANCE, DEFAULT_THETA) {
+
+    }
+    #endregion
+
+    #region Methods
+    /// <summary>
+    /// Create a new NBodyForce.
+    /// </summary>
+    /// <param name="gravConstant">the gravitational constant to use. Nodes will attract each other if this value is positive, and will repel each other if it is negative.</param>
+    /// <param name="minDistance">the distance within which two particles will  interact. If -1, the value is treated as infinite.</param>
+    /// <param name="theta">the Barnes-Hut parameter theta, which controls when an aggregated mass is used rather than drilling down to individual  item mass values.</param>
+    public NBodyForce(float gravConstant, float minDistance, float theta) {
+      parms = new float[] { gravConstant, minDistance, theta };
+      minValues = new float[] { DEFAULT_MIN_GRAV_CONSTANT,
             DEFAULT_MIN_DISTANCE, DEFAULT_MIN_THETA };
-            maxValues = new float[] { DEFAULT_MAX_GRAV_CONSTANT,
+      maxValues = new float[] { DEFAULT_MAX_GRAV_CONSTANT,
             DEFAULT_MAX_DISTANCE, DEFAULT_MAX_THETA };
-            root = factory.GetQuadTreeNode();
-        }
-
-
-
-
-        /// <summary>
-        /// Set the bounds of the region for which to compute the n-body simulation
-        /// </summary>
-        /// <param name="xMin">the minimum x-coordinate</param>
-        /// <param name="yMin">the minimum y-coordinate/param>
-        /// <param name="xMax"> the maximum x-coordinate</param>
-        /// <param name="yMax">the maximum y-coordinate</param>
-        private void setBounds(float xMin, float yMin, float xMax, float yMax)
-        {
-            this.xMin = xMin;
-            this.yMin = yMin;
-            this.xMax = xMax;
-            this.yMax = yMax;
-        }
-
-
-        /// <summary>
-        ///Clears the quadtree of all entries.
-        /// </summary>
-        public void clear()
-        {
-            ClearHelper(root);
-            root = factory.GetQuadTreeNode();
-        }
-
-        /// <summary>
-        /// Clearing aid
-        /// </summary>
-        /// <param name="n">The n.</param>
-        private void ClearHelper(QuadTreeNode n)
-        {
-            for (int i = 0; i < n.children.Length; i++)
-            {
-                if (n.children[i] != null)
-                    ClearHelper(n.children[i]);
-            }
-            factory.Reclaim(n);
-        }
-
-        /// <summary>
-        /// Initialize the simulation with the provided enclosing simulation. After
-        /// this call has been made, the simulation can be queried for the
-        /// n-body force acting on a given item.
-        /// </summary>
-        /// <param name="fsim">the encompassing ForceSimulator</param>        
-        public override void Init(ForceSimulator fsim)
-        {
-            clear(); // clear internal state
-
-            // compute and squarify bounds of quadtree
-            float x1 = float.MaxValue, y1 = float.MaxValue;
-            float x2 = float.MinValue, y2 = float.MinValue;
-            foreach (ForceItem item in fsim.Items)
-            {
-                float x = item.Location[0];
-                float y = item.Location[1];
-                if (x < x1) x1 = x;
-                if (y < y1) y1 = y;
-                if (x > x2) x2 = x;
-                if (y > y2) y2 = y;
-            }
-            float dx = x2 - x1, dy = y2 - y1;
-            if (dx > dy) { y2 = y1 + dx; } else { x2 = x1 + dy; }
-            setBounds(x1, y1, x2, y2);
-
-            // Insert items into quadtree
-            foreach (ForceItem item in fsim.Items)
-            {
-                Insert(item);
-            }
-
-            // calculate magnitudes and centers of mass
-            CalculateMass(root);
-        }
-
-        /// <summary>
-        /// Inserts an item into the quadtree.
-        /// </summary>
-        /// <param name="item"> the ForceItem to add.</param>
-        public void Insert(ForceItem item)
-        {
-            // Insert item into the quadtrees
-            try
-            {
-                Insert(item, root, xMin, yMin, xMax, yMax);
-            }
-            catch (StackOverflowException e)
-            {
-                // TODO: safe to remove?
-                Trace.WriteLine(e.Message);
-            }
-        }
-
-        /// <summary>
-        /// Inserts the specified force.
-        /// </summary>
-        /// <param name="p">The p.</param>
-        /// <param name="n">The n.</param>
-        /// <param name="x1">The x1.</param>
-        /// <param name="y1">The y1.</param>
-        /// <param name="x2">The x2.</param>
-        /// <param name="y2">The y2.</param>
-        private void Insert(ForceItem p, QuadTreeNode n, float x1, float y1, float x2, float y2)
-        {
-            // try to Insert particle p at node n in the quadtree
-            // by construction, each leaf will contain either 1 or 0 particles
-            if (n.hasChildren)
-            {
-                // n contains more than 1 particle
-                InsertHelper(p, n, x1, y1, x2, y2);
-            }
-            else if (n.value != null)
-            {
-                // n contains 1 particle
-                if (IsSameLocation(n.value, p))
-                {
-                    InsertHelper(p, n, x1, y1, x2, y2);
-                }
-                else
-                {
-                    ForceItem v = n.value; n.value = null;
-                    InsertHelper(v, n, x1, y1, x2, y2);
-                    InsertHelper(p, n, x1, y1, x2, y2);
-                }
-            }
-            else
-            {
-                // n is empty, so is a leaf
-                n.value = p;
-            }
-        }
-
-        /// <summary>
-        /// Determines whether the two force are at the same location.
-        /// </summary>
-        /// <param name="f1">The f1.</param>
-        /// <param name="f2">The f2.</param>
-        /// <returns>
-        /// 	<c>true</c> if [is same location] [the specified f1]; otherwise, <c>false</c>.
-        /// </returns>
-        private static bool IsSameLocation(ForceItem f1, ForceItem f2)
-        {
-            float dx = Math.Abs(f1.Location[0] - f2.Location[0]);
-            float dy = Math.Abs(f1.Location[1] - f2.Location[1]);
-            return (dx < 0.01 && dy < 0.01);
-        }
-
-        /// <summary>
-        /// Inserts helper method.
-        /// </summary>
-        /// <param name="p">The p.</param>
-        /// <param name="n">The n.</param>
-        /// <param name="x1">The x1.</param>
-        /// <param name="y1">The y1.</param>
-        /// <param name="x2">The x2.</param>
-        /// <param name="y2">The y2.</param>
-        private void InsertHelper(ForceItem p, QuadTreeNode n, float x1, float y1, float x2, float y2)
-        {
-            float x = p.Location[0], y = p.Location[1];
-            float splitx = (x1 + x2) / 2;
-            float splity = (y1 + y2) / 2;
-            int i = (x >= splitx ? 1 : 0) + (y >= splity ? 2 : 0);
-            // create new child node, if necessary
-            if (n.children[i] == null)
-            {
-                n.children[i] = factory.GetQuadTreeNode();
-                n.hasChildren = true;
-            }
-            // update bounds
-            if (i == 1 || i == 3) x1 = splitx; else x2 = splitx;
-            if (i > 1) y1 = splity; else y2 = splity;
-            // recurse 
-            Insert(p, n.children[i], x1, y1, x2, y2);
-        }
-
-        /// <summary>
-        /// Calculates the mass.
-        /// </summary>
-        /// <param name="n">The n.</param>
-        private void CalculateMass(QuadTreeNode n)
-        {
-            float xcom = 0, ycom = 0;
-            n.mass = 0;
-            if (n.hasChildren)
-            {
-                for (int i = 0; i < n.children.Length; i++)
-                {
-                    if (n.children[i] != null)
-                    {
-                        CalculateMass(n.children[i]);
-                        n.mass += n.children[i].mass;
-                        xcom += n.children[i].mass * n.children[i].com[0];
-                        ycom += n.children[i].mass * n.children[i].com[1];
-                    }
-                }
-            }
-            if (n.value != null)
-            {
-                n.mass += n.value.Mass;
-                xcom += n.value.Mass * n.value.Location[0];
-                ycom += n.value.Mass * n.value.Location[1];
-            }
-            n.com[0] = xcom / n.mass;
-            n.com[1] = ycom / n.mass;
-        }
-
-        /**
-         * Calculates the force vector acting on the given item.
-         * @param item the ForceItem for which to compute the force
-         */
-        public override void GetForce(ForceItem item)
-        {
-            try
-            {
-                ForceHelper(item, root, xMin, yMin, xMax, yMax);
-            }
-            catch (StackOverflowException e)
-            {
-                // TODO: safe to remove?
-                Trace.WriteLine(e.Message);
-            }
-        }
-
-        /// <summary>
-        /// Utility method.
-        /// </summary>
-        /// <param name="item">The item.</param>
-        /// <param name="n">The n.</param>
-        /// <param name="x1">The x1.</param>
-        /// <param name="y1">The y1.</param>
-        /// <param name="x2">The x2.</param>
-        /// <param name="y2">The y2.</param>
-        private void ForceHelper(ForceItem item, QuadTreeNode n, float x1, float y1, float x2, float y2)
-        {
-            float dx = n.com[0] - item.Location[0];
-            float dy = n.com[1] - item.Location[1];
-            float r = (float)Math.Sqrt(dx * dx + dy * dy);
-            bool same = false;
-            if (r == 0.0f)
-            {
-                // if items are in the exact same place, add some noise
-                dx = Convert.ToSingle((rand.NextDouble() - 0.5D) / 50.0D);
-                dy = Convert.ToSingle((rand.NextDouble() - 0.5D) / 50.0D);
-                r = (float)Math.Sqrt(dx * dx + dy * dy);
-                same = true;
-            }
-            bool minDist = parms[MIN_DISTANCE] > 0f && r > parms[MIN_DISTANCE];
-
-            // the Barnes-Hut approximation criteria is if the ratio of the
-            // size of the quadtree box to the distance between the point and
-            // the box's center of mass is beneath some threshold theta.
-            if ((!n.hasChildren && n.value != item) ||
-                 (!same && (x2 - x1) / r < parms[BARNES_HUT_THETA]))
-            {
-                if (minDist) return;
-                // either only 1 particle or we meet criteria
-                // for Barnes-Hut approximation, so calc force
-                float v = parms[GRAVITATIONAL_CONST] * item.Mass * n.mass
-                            / (r * r * r);
-                item.Force[0] += v * dx;
-                item.Force[1] += v * dy;
-            }
-            else if (n.hasChildren)
-            {
-                // recurse for more accurate calculation
-                float splitx = (x1 + x2) / 2;
-                float splity = (y1 + y2) / 2;
-                for (int i = 0; i < n.children.Length; i++)
-                {
-                    if (n.children != null && n.children[i] != null)
-                    {
-                        ForceHelper(item, n.children[i],
-                            (i == 1 || i == 3 ? splitx : x1), (i > 1 ? splity : y1),
-                            (i == 1 || i == 3 ? x2 : splitx), (i > 1 ? y2 : splity));
-                    }
-                }
-                if (minDist) return;
-                if (n.value != null && n.value != item)
-                {
-                    float v = parms[GRAVITATIONAL_CONST] * item.Mass * n.value.Mass
-                                / (r * r * r);
-                    item.Force[0] += v * dx;
-                    item.Force[1] += v * dy;
-                }
-            }
-        }
-        #endregion
-
-        #region Classes
-        /// <summary>
-        /// Represents a node in the quadtree.
-        /// </summary>
-        public sealed class QuadTreeNode
-        {
-            public QuadTreeNode()
-            {
-                com = new float[] { 0.0f, 0.0f };
-                children = new QuadTreeNode[4];
-            } //
-            public bool hasChildren = false;
-            public float mass; // total mass held by this node
-            public float[] com; // center of mass of this node 
-            public ForceItem value; // ForceItem in this node, null if node has children
-            public QuadTreeNode[] children; // children nodes
-        }
-
-
-
-
-        ///<summary>
-        ///Helper class to minimize number of object creations across multiple uses of the quadtree.
-        ///</summary>
-        public sealed class QuadTreeNodeFactory
-        {
-            #region Fields
-            private int maxNodes = 50000;
-            private List<QuadTreeNode> nodes = new List<QuadTreeNode>();
-            #endregion
-
-            /// <summary>
-            /// Gets the quadtree node.
-            /// </summary>
-            /// <returns></returns>
-            public QuadTreeNode GetQuadTreeNode()
-            {
-                if (nodes.Count > 0)
-                {
-                    QuadTreeNode node = this.nodes[nodes.Count - 1];
-                    nodes.Remove(node);
-                    return node;
-                }
-                else
-                {
-                    return new QuadTreeNode();
-                }
-            }
-            /// <summary>
-            /// Reclaims the specified node.
-            /// </summary>
-            /// <param name="n">The n.</param>
-            public void Reclaim(QuadTreeNode n)
-            {
-                n.mass = 0;
-                n.com[0] = 0.0f; n.com[1] = 0.0f;
-                n.value = null;
-                n.hasChildren = false;
-                for (int i = 0; i < n.children.Length; i++)
-                {
-                    n.children[i] = null;
-                }
-                //n.children = null;
-                if (nodes.Count < maxNodes)
-                    nodes.Add(n);
-            }
-        }
-        #endregion
-
-    }
+      root = factory.GetQuadTreeNode();
+    }
+
+
+
+
+    /// <summary>
+    /// Set the bounds of the region for which to compute the n-body simulation
+    /// </summary>
+    /// <param name="xMin">the minimum x-coordinate</param>
+    /// <param name="yMin">the minimum y-coordinate/param>
+    /// <param name="xMax"> the maximum x-coordinate</param>
+    /// <param name="yMax">the maximum y-coordinate</param>
+    private void setBounds(float xMin, float yMin, float xMax, float yMax) {
+      this.xMin = xMin;
+      this.yMin = yMin;
+      this.xMax = xMax;
+      this.yMax = yMax;
+    }
+
+
+    /// <summary>
+    ///Clears the quadtree of all entries.
+    /// </summary>
+    public void clear() {
+      ClearHelper(root);
+      root = factory.GetQuadTreeNode();
+    }
+
+    /// <summary>
+    /// Clearing aid
+    /// </summary>
+    /// <param name="n">The n.</param>
+    private void ClearHelper(QuadTreeNode n) {
+      for (int i = 0; i < n.children.Length; i++) {
+        if (n.children[i] != null)
+          ClearHelper(n.children[i]);
+      }
+      factory.Reclaim(n);
+    }
+
+    /// <summary>
+    /// Initialize the simulation with the provided enclosing simulation. After
+    /// this call has been made, the simulation can be queried for the
+    /// n-body force acting on a given item.
+    /// </summary>
+    /// <param name="fsim">the encompassing ForceSimulator</param>        
+    public override void Init(ForceSimulator fsim) {
+      clear(); // clear internal state
+
+      // compute and squarify bounds of quadtree
+      float x1 = float.MaxValue, y1 = float.MaxValue;
+      float x2 = float.MinValue, y2 = float.MinValue;
+      foreach (ForceItem item in fsim.Items) {
+        float x = item.Location[0];
+        float y = item.Location[1];
+        if (x < x1) x1 = x;
+        if (y < y1) y1 = y;
+        if (x > x2) x2 = x;
+        if (y > y2) y2 = y;
+      }
+      float dx = x2 - x1, dy = y2 - y1;
+      if (dx > dy) { y2 = y1 + dx; } else { x2 = x1 + dy; }
+      setBounds(x1, y1, x2, y2);
+
+      // Insert items into quadtree
+      foreach (ForceItem item in fsim.Items) {
+        Insert(item);
+      }
+
+      // calculate magnitudes and centers of mass
+      CalculateMass(root);
+    }
+
+    /// <summary>
+    /// Inserts an item into the quadtree.
+    /// </summary>
+    /// <param name="item"> the ForceItem to add.</param>
+    public void Insert(ForceItem item) {
+      // Insert item into the quadtrees
+      try {
+        Insert(item, root, xMin, yMin, xMax, yMax);
+      }
+      catch (StackOverflowException e) {
+        // TODO: safe to remove?
+        Trace.WriteLine(e.Message);
+      }
+    }
+
+    /// <summary>
+    /// Inserts the specified force.
+    /// </summary>
+    /// <param name="p">The p.</param>
+    /// <param name="n">The n.</param>
+    /// <param name="x1">The x1.</param>
+    /// <param name="y1">The y1.</param>
+    /// <param name="x2">The x2.</param>
+    /// <param name="y2">The y2.</param>
+    private void Insert(ForceItem p, QuadTreeNode n, float x1, float y1, float x2, float y2) {
+      // try to Insert particle p at node n in the quadtree
+      // by construction, each leaf will contain either 1 or 0 particles
+      if (n.hasChildren) {
+        // n contains more than 1 particle
+        InsertHelper(p, n, x1, y1, x2, y2);
+      } else if (n.value != null) {
+        // n contains 1 particle
+        if (IsSameLocation(n.value, p)) {
+          InsertHelper(p, n, x1, y1, x2, y2);
+        } else {
+          ForceItem v = n.value; n.value = null;
+          InsertHelper(v, n, x1, y1, x2, y2);
+          InsertHelper(p, n, x1, y1, x2, y2);
+        }
+      } else {
+        // n is empty, so is a leaf
+        n.value = p;
+      }
+    }
+
+    /// <summary>
+    /// Determines whether the two force are at the same location.
+    /// </summary>
+    /// <param name="f1">The f1.</param>
+    /// <param name="f2">The f2.</param>
+    /// <returns>
+    /// 	<c>true</c> if [is same location] [the specified f1]; otherwise, <c>false</c>.
+    /// </returns>
+    private static bool IsSameLocation(ForceItem f1, ForceItem f2) {
+      float dx = Math.Abs(f1.Location[0] - f2.Location[0]);
+      float dy = Math.Abs(f1.Location[1] - f2.Location[1]);
+      return (dx < 0.01 && dy < 0.01);
+    }
+
+    /// <summary>
+    /// Inserts helper method.
+    /// </summary>
+    /// <param name="p">The p.</param>
+    /// <param name="n">The n.</param>
+    /// <param name="x1">The x1.</param>
+    /// <param name="y1">The y1.</param>
+    /// <param name="x2">The x2.</param>
+    /// <param name="y2">The y2.</param>
+    private void InsertHelper(ForceItem p, QuadTreeNode n, float x1, float y1, float x2, float y2) {
+      float x = p.Location[0], y = p.Location[1];
+      float splitx = (x1 + x2) / 2;
+      float splity = (y1 + y2) / 2;
+      int i = (x >= splitx ? 1 : 0) + (y >= splity ? 2 : 0);
+      // create new child node, if necessary
+      if (n.children[i] == null) {
+        n.children[i] = factory.GetQuadTreeNode();
+        n.hasChildren = true;
+      }
+      // update bounds
+      if (i == 1 || i == 3) x1 = splitx; else x2 = splitx;
+      if (i > 1) y1 = splity; else y2 = splity;
+      // recurse 
+      Insert(p, n.children[i], x1, y1, x2, y2);
+    }
+
+    /// <summary>
+    /// Calculates the mass.
+    /// </summary>
+    /// <param name="n">The n.</param>
+    private void CalculateMass(QuadTreeNode n) {
+      float xcom = 0, ycom = 0;
+      n.mass = 0;
+      if (n.hasChildren) {
+        for (int i = 0; i < n.children.Length; i++) {
+          if (n.children[i] != null) {
+            CalculateMass(n.children[i]);
+            n.mass += n.children[i].mass;
+            xcom += n.children[i].mass * n.children[i].com[0];
+            ycom += n.children[i].mass * n.children[i].com[1];
+          }
+        }
+      }
+      if (n.value != null) {
+        n.mass += n.value.Mass;
+        xcom += n.value.Mass * n.value.Location[0];
+        ycom += n.value.Mass * n.value.Location[1];
+      }
+      n.com[0] = xcom / n.mass;
+      n.com[1] = ycom / n.mass;
+    }
+
+    /**
+     * Calculates the force vector acting on the given item.
+     * @param item the ForceItem for which to compute the force
+     */
+    public override void GetForce(ForceItem item) {
+      try {
+        ForceHelper(item, root, xMin, yMin, xMax, yMax);
+      }
+      catch (StackOverflowException e) {
+        // TODO: safe to remove?
+        Trace.WriteLine(e.Message);
+      }
+    }
+
+    /// <summary>
+    /// Utility method.
+    /// </summary>
+    /// <param name="item">The item.</param>
+    /// <param name="n">The n.</param>
+    /// <param name="x1">The x1.</param>
+    /// <param name="y1">The y1.</param>
+    /// <param name="x2">The x2.</param>
+    /// <param name="y2">The y2.</param>
+    private void ForceHelper(ForceItem item, QuadTreeNode n, float x1, float y1, float x2, float y2) {
+      float dx = n.com[0] - item.Location[0];
+      float dy = n.com[1] - item.Location[1];
+      float r = (float)Math.Sqrt(dx * dx + dy * dy);
+      bool same = false;
+      if (r == 0.0f) {
+        // if items are in the exact same place, add some noise
+        dx = Convert.ToSingle((rand.NextDouble() - 0.5D) / 50.0D);
+        dy = Convert.ToSingle((rand.NextDouble() - 0.5D) / 50.0D);
+        r = (float)Math.Sqrt(dx * dx + dy * dy);
+        same = true;
+      }
+      bool minDist = parms[MIN_DISTANCE] > 0f && r > parms[MIN_DISTANCE];
+
+      // the Barnes-Hut approximation criteria is if the ratio of the
+      // size of the quadtree box to the distance between the point and
+      // the box's center of mass is beneath some threshold theta.
+      if ((!n.hasChildren && n.value != item) ||
+           (!same && (x2 - x1) / r < parms[BARNES_HUT_THETA])) {
+        if (minDist) return;
+        // either only 1 particle or we meet criteria
+        // for Barnes-Hut approximation, so calc force
+        float v = parms[GRAVITATIONAL_CONST] * item.Mass * n.mass
+                    / (r * r * r);
+        item.Force[0] += v * dx;
+        item.Force[1] += v * dy;
+      } else if (n.hasChildren) {
+        // recurse for more accurate calculation
+        float splitx = (x1 + x2) / 2;
+        float splity = (y1 + y2) / 2;
+        for (int i = 0; i < n.children.Length; i++) {
+          if (n.children != null && n.children[i] != null) {
+            ForceHelper(item, n.children[i],
+                (i == 1 || i == 3 ? splitx : x1), (i > 1 ? splity : y1),
+                (i == 1 || i == 3 ? x2 : splitx), (i > 1 ? y2 : splity));
+          }
+        }
+        if (minDist) return;
+        if (n.value != null && n.value != item) {
+          float v = parms[GRAVITATIONAL_CONST] * item.Mass * n.value.Mass
+                      / (r * r * r);
+          item.Force[0] += v * dx;
+          item.Force[1] += v * dy;
+        }
+      }
+    }
+    #endregion
+
+    #region Classes
+    /// <summary>
+    /// Represents a node in the quadtree.
+    /// </summary>
+    public sealed class QuadTreeNode {
+      public QuadTreeNode() {
+        com = new float[] { 0.0f, 0.0f };
+        children = new QuadTreeNode[4];
+      } //
+      public bool hasChildren = false;
+      public float mass; // total mass held by this node
+      public float[] com; // center of mass of this node 
+      public ForceItem value; // ForceItem in this node, null if node has children
+      public QuadTreeNode[] children; // children nodes
+    }
+
+
+
+
+    ///<summary>
+    ///Helper class to minimize number of object creations across multiple uses of the quadtree.
+    ///</summary>
+    public sealed class QuadTreeNodeFactory {
+      #region Fields
+      private int maxNodes = 50000;
+      private List<QuadTreeNode> nodes = new List<QuadTreeNode>();
+      #endregion
+
+      /// <summary>
+      /// Gets the quadtree node.
+      /// </summary>
+      /// <returns></returns>
+      public QuadTreeNode GetQuadTreeNode() {
+        if (nodes.Count > 0) {
+          QuadTreeNode node = this.nodes[nodes.Count - 1];
+          nodes.Remove(node);
+          return node;
+        } else {
+          return new QuadTreeNode();
+        }
+      }
+      /// <summary>
+      /// Reclaims the specified node.
+      /// </summary>
+      /// <param name="n">The n.</param>
+      public void Reclaim(QuadTreeNode n) {
+        n.mass = 0;
+        n.com[0] = 0.0f; n.com[1] = 0.0f;
+        n.value = null;
+        n.hasChildren = false;
+        for (int i = 0; i < n.children.Length; i++) {
+          n.children[i] = null;
+        }
+        //n.children = null;
+        if (nodes.Count < maxNodes)
+          nodes.Add(n);
+      }
+    }
+    #endregion
+
+  }
 
 }
Index: /trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.Netron/3.0.2672.12446/Netron.Diagramming.Core-3.0.2672.12446/Layout/Force/RungeKuttaIntegrator.cs
===================================================================
--- /trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.Netron/3.0.2672.12446/Netron.Diagramming.Core-3.0.2672.12446/Layout/Force/RungeKuttaIntegrator.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.Netron/3.0.2672.12446/Netron.Diagramming.Core-3.0.2672.12446/Layout/Force/RungeKuttaIntegrator.cs	(revision 4068)
@@ -1,135 +1,122 @@
 using System;
-using System.Collections.Generic;
-using System.Text;
 
-namespace Netron.Diagramming.Core.Layout.Force
-{
+namespace Netron.Diagramming.Core.Layout.Force {
 
-    ///<summary>
-    /// Updates velocity and position data using the 4th-Order Runge-Kutta method.
-    /// It is slower but more accurate than other techniques such as Euler's Method.
-    /// The technique requires re-evaluating forces 4 times for a given timestep.
-    /// </summary>
-    public class RungeKuttaIntegrator : IIntegrator
-    {
+  ///<summary>
+  /// Updates velocity and position data using the 4th-Order Runge-Kutta method.
+  /// It is slower but more accurate than other techniques such as Euler's Method.
+  /// The technique requires re-evaluating forces 4 times for a given timestep.
+  /// </summary>
+  public class RungeKuttaIntegrator : IIntegrator {
 
 
-        /// <summary>
-        /// Integrates the specified simulation.
-        /// </summary>
-        /// <param name="sim">The sim.</param>
-        /// <param name="timestep">The timestep.</param>
-        public void Integrate(ForceSimulator sim, long timestep)
-        {
-            float speedLimit = sim.SpeedLimit;
-            float vx, vy, v, coeff;
-            float[,] k, l;
+    /// <summary>
+    /// Integrates the specified simulation.
+    /// </summary>
+    /// <param name="sim">The sim.</param>
+    /// <param name="timestep">The timestep.</param>
+    public void Integrate(ForceSimulator sim, long timestep) {
+      float speedLimit = sim.SpeedLimit;
+      float vx, vy, v, coeff;
+      float[,] k, l;
 
-            foreach (ForceItem item in sim.Items)
-            {
-                coeff = timestep / item.Mass;
-                k = item.RungeKuttaTemp1;
-                l = item.RungeKuttaTemp2;
-                item.PreviousLocation[0] = item.Location[0];
-                item.PreviousLocation[1] = item.Location[1];
-                k[0, 0] = timestep * item.Velocity[0];
-                k[0, 1] = timestep * item.Velocity[1];
-                l[0, 0] = coeff * item.Force[0];
-                l[0, 1] = coeff * item.Force[1];
+      foreach (ForceItem item in sim.Items) {
+        coeff = timestep / item.Mass;
+        k = item.RungeKuttaTemp1;
+        l = item.RungeKuttaTemp2;
+        item.PreviousLocation[0] = item.Location[0];
+        item.PreviousLocation[1] = item.Location[1];
+        k[0, 0] = timestep * item.Velocity[0];
+        k[0, 1] = timestep * item.Velocity[1];
+        l[0, 0] = coeff * item.Force[0];
+        l[0, 1] = coeff * item.Force[1];
 
-                // Set the position to the new predicted position
-                item.Location[0] += 0.5f * k[0, 0];
-                item.Location[1] += 0.5f * k[0, 1];
-            }
+        // Set the position to the new predicted position
+        item.Location[0] += 0.5f * k[0, 0];
+        item.Location[1] += 0.5f * k[0, 1];
+      }
 
-            // recalculate forces
-            sim.Accumulate();
+      // recalculate forces
+      sim.Accumulate();
 
-            foreach (ForceItem item in sim.Items)
-            {
-                coeff = timestep / item.Mass;
-                k = item.RungeKuttaTemp1;
-                l = item.RungeKuttaTemp2;
-                vx = item.Velocity[0] + .5f * l[0, 0];
-                vy = item.Velocity[1] + .5f * l[0, 1];
-                v = (float)Math.Sqrt(vx * vx + vy * vy);
-                if (v > speedLimit)
-                {
-                    vx = speedLimit * vx / v;
-                    vy = speedLimit * vy / v;
-                }
-                k[1, 0] = timestep * vx;
-                k[1, 1] = timestep * vy;
-                l[1, 0] = coeff * item.Force[0];
-                l[1, 1] = coeff * item.Force[1];
+      foreach (ForceItem item in sim.Items) {
+        coeff = timestep / item.Mass;
+        k = item.RungeKuttaTemp1;
+        l = item.RungeKuttaTemp2;
+        vx = item.Velocity[0] + .5f * l[0, 0];
+        vy = item.Velocity[1] + .5f * l[0, 1];
+        v = (float)Math.Sqrt(vx * vx + vy * vy);
+        if (v > speedLimit) {
+          vx = speedLimit * vx / v;
+          vy = speedLimit * vy / v;
+        }
+        k[1, 0] = timestep * vx;
+        k[1, 1] = timestep * vy;
+        l[1, 0] = coeff * item.Force[0];
+        l[1, 1] = coeff * item.Force[1];
 
-                // Set the position to the new predicted position
-                item.Location[0] = item.PreviousLocation[0] + 0.5f * k[1, 0];
-                item.Location[1] = item.PreviousLocation[1] + 0.5f * k[1, 1];
-            }
+        // Set the position to the new predicted position
+        item.Location[0] = item.PreviousLocation[0] + 0.5f * k[1, 0];
+        item.Location[1] = item.PreviousLocation[1] + 0.5f * k[1, 1];
+      }
 
-            // recalculate forces
-            sim.Accumulate();
+      // recalculate forces
+      sim.Accumulate();
 
-            foreach (ForceItem item in sim.Items)
-            {
-                coeff = timestep / item.Mass;
-                k = item.RungeKuttaTemp1;
-                l = item.RungeKuttaTemp2;
-                vx = item.Velocity[0] + .5f * l[1, 0];
-                vy = item.Velocity[1] + .5f * l[1, 1];
-                v = (float)Math.Sqrt(vx * vx + vy * vy);
-                if (v > speedLimit)
-                {
-                    vx = speedLimit * vx / v;
-                    vy = speedLimit * vy / v;
-                }
-                k[2, 0] = timestep * vx;
-                k[2, 1] = timestep * vy;
-                l[2, 0] = coeff * item.Force[0];
-                l[2, 1] = coeff * item.Force[1];
+      foreach (ForceItem item in sim.Items) {
+        coeff = timestep / item.Mass;
+        k = item.RungeKuttaTemp1;
+        l = item.RungeKuttaTemp2;
+        vx = item.Velocity[0] + .5f * l[1, 0];
+        vy = item.Velocity[1] + .5f * l[1, 1];
+        v = (float)Math.Sqrt(vx * vx + vy * vy);
+        if (v > speedLimit) {
+          vx = speedLimit * vx / v;
+          vy = speedLimit * vy / v;
+        }
+        k[2, 0] = timestep * vx;
+        k[2, 1] = timestep * vy;
+        l[2, 0] = coeff * item.Force[0];
+        l[2, 1] = coeff * item.Force[1];
 
-                // Set the position to the new predicted position
-                item.Location[0] = item.PreviousLocation[0] + 0.5f * k[2, 0];
-                item.Location[1] = item.PreviousLocation[1] + 0.5f * k[2, 1];
-            }
+        // Set the position to the new predicted position
+        item.Location[0] = item.PreviousLocation[0] + 0.5f * k[2, 0];
+        item.Location[1] = item.PreviousLocation[1] + 0.5f * k[2, 1];
+      }
 
-            // recalculate forces
-            sim.Accumulate();
+      // recalculate forces
+      sim.Accumulate();
 
-            foreach (ForceItem item in sim.Items)
-            {
-                coeff = timestep / item.Mass;
-                k = item.RungeKuttaTemp1;
-                l = item.RungeKuttaTemp2;
-                float[] p = item.PreviousLocation;
-                vx = item.Velocity[0] + l[2, 0];
-                vy = item.Velocity[1] + l[2, 1];
-                v = (float)Math.Sqrt(vx * vx + vy * vy);
-                if (v > speedLimit)
-                {
-                    vx = speedLimit * vx / v;
-                    vy = speedLimit * vy / v;
-                }
-                k[3, 0] = timestep * vx;
-                k[3, 1] = timestep * vy;
-                l[3, 0] = coeff * item.Force[0];
-                l[3, 1] = coeff * item.Force[1];
-                item.Location[0] = p[0] + (k[0, 0] + k[3, 0]) / 6.0f + (k[1, 0] + k[2, 0]) / 3.0f;
-                item.Location[1] = p[1] + (k[0, 1] + k[3, 1]) / 6.0f + (k[1, 1] + k[2, 1]) / 3.0f;
+      foreach (ForceItem item in sim.Items) {
+        coeff = timestep / item.Mass;
+        k = item.RungeKuttaTemp1;
+        l = item.RungeKuttaTemp2;
+        float[] p = item.PreviousLocation;
+        vx = item.Velocity[0] + l[2, 0];
+        vy = item.Velocity[1] + l[2, 1];
+        v = (float)Math.Sqrt(vx * vx + vy * vy);
+        if (v > speedLimit) {
+          vx = speedLimit * vx / v;
+          vy = speedLimit * vy / v;
+        }
+        k[3, 0] = timestep * vx;
+        k[3, 1] = timestep * vy;
+        l[3, 0] = coeff * item.Force[0];
+        l[3, 1] = coeff * item.Force[1];
+        item.Location[0] = p[0] + (k[0, 0] + k[3, 0]) / 6.0f + (k[1, 0] + k[2, 0]) / 3.0f;
+        item.Location[1] = p[1] + (k[0, 1] + k[3, 1]) / 6.0f + (k[1, 1] + k[2, 1]) / 3.0f;
 
-                vx = (l[0, 0] + l[3, 0]) / 6.0f + (l[1, 0] + l[2, 0]) / 3.0f;
-                vy = (l[0, 1] + l[3, 1]) / 6.0f + (l[1, 1] + l[2, 1]) / 3.0f;
-                v = (float)Math.Sqrt(vx * vx + vy * vy);
-                if (v > speedLimit)
-                {
-                    vx = speedLimit * vx / v;
-                    vy = speedLimit * vy / v;
-                }
-                item.Velocity[0] += vx;
-                item.Velocity[1] += vy;
-            }
+        vx = (l[0, 0] + l[3, 0]) / 6.0f + (l[1, 0] + l[2, 0]) / 3.0f;
+        vy = (l[0, 1] + l[3, 1]) / 6.0f + (l[1, 1] + l[2, 1]) / 3.0f;
+        v = (float)Math.Sqrt(vx * vx + vy * vy);
+        if (v > speedLimit) {
+          vx = speedLimit * vx / v;
+          vy = speedLimit * vy / v;
         }
+        item.Velocity[0] += vx;
+        item.Velocity[1] += vy;
+      }
+    }
 
-    }
+  }
 }
Index: /trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.Netron/3.0.2672.12446/Netron.Diagramming.Core-3.0.2672.12446/Layout/Force/Spring.cs
===================================================================
--- /trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.Netron/3.0.2672.12446/Netron.Diagramming.Core-3.0.2672.12446/Layout/Force/Spring.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.Netron/3.0.2672.12446/Netron.Diagramming.Core-3.0.2672.12446/Layout/Force/Spring.cs	(revision 4068)
@@ -1,131 +1,114 @@
-using System;
 using System.Collections.Generic;
-using System.Text;
 
-namespace Netron.Diagramming.Core.Layout.Force
-{
+namespace Netron.Diagramming.Core.Layout.Force {
+  /// <summary>
+  /// Represents a spring in a force simulation.
+  /// </summary>
+  public class Spring {
+    #region Fields
+    private static SpringFactory mFactory = new SpringFactory();
+    private ForceItem item1;
+    private ForceItem item2;
+    private float length;
+    private float coeff;
+
+    #endregion
+
+    #region Properties
     /// <summary>
-    /// Represents a spring in a force simulation.
+    /// Retrieve the SpringFactory instance, which serves as an object pool
+    /// for Spring instances.
     /// </summary>
-    public class Spring
-    {
-        #region Fields
-        private static SpringFactory mFactory = new SpringFactory();
-        private ForceItem item1;
-        private ForceItem item2;
-        private float length;
-        private float coeff;
+    /// <value>The spring factory.</value>
+    public static SpringFactory Factory {
+      get {
+        return mFactory;
+      }
+    }
+    /// <summary> 
+    /// The first ForceItem endpoint 
+    /// </summary>
 
-        #endregion
+    public ForceItem Item1 {
+      get { return item1; }
+      set { item1 = value; }
+    }
+    /// <summary>
+    /// The second ForceItem endpoint 
+    /// </summary> 
+    public ForceItem Item2 {
+      get { return item2; }
+      set { item2 = value; }
+    }
+    /// <summary> 
+    /// The spring's resting length 
+    /// </summary>
+    public float Length {
+      get { return length; }
+      set { length = value; }
+    }
+    /// <summary> 
+    /// The spring tension co-efficient
+    /// </summary>
+    public float Coeff {
+      get { return coeff; }
+      set { coeff = value; }
+    }
+    #endregion
 
-        #region Properties
-        /// <summary>
-        /// Retrieve the SpringFactory instance, which serves as an object pool
-        /// for Spring instances.
-        /// </summary>
-        /// <value>The spring factory.</value>
-        public static SpringFactory Factory
-        {
-            get
-            {
-                return mFactory;
-            }
+    #region Constructor
+    /// <summary>
+    /// Create a new Spring instance
+    ///<param name="fi1">  the first ForceItem endpoint</param>
+    /// <param name="fi2"> the second ForceItem endpoint          </param>
+    ///  <param name="k">the spring tension co-efficient                             </param>
+    ///  <param name="len">the spring's resting length                                               </param>
+    /// </summary>
+    public Spring(ForceItem fi1, ForceItem fi2, float k, float len) {
+      item1 = fi1;
+      item2 = fi2;
+      coeff = k;
+      length = len;
+    }
+
+    #endregion
+
+    #region Classes
+    /// <summary>
+    /// The SpringFactory is responsible for generating Spring instances
+    /// and maintaining an object pool of Springs to reduce garbage collection
+    /// overheads while force simulations are running.
+    /// </summary>
+    public sealed class SpringFactory {
+      public const int Capacity = 5000;
+      private List<Spring> springs = new List<Spring>(Capacity);
+
+      /// <summary>
+      /// Get a Spring instance and set it to the given parameters.
+      /// </summary>
+      public Spring getSpring(ForceItem f1, ForceItem f2, float k, float length) {
+        if (springs.Count > 0) {
+          Spring s = springs[springs.Count - 1];
+          springs.Remove(s);
+          s.Item1 = f1;
+          s.Item2 = f2;
+          s.Coeff = k;
+          s.Length = length;
+          return s;
+        } else {
+          return new Spring(f1, f2, k, length);
         }
-        /// <summary> 
-        /// The first ForceItem endpoint 
-        /// </summary>
-
-        public ForceItem Item1
-        {
-            get { return item1; }
-            set { item1 = value; }
-        }
-        /// <summary>
-        /// The second ForceItem endpoint 
-        /// </summary> 
-        public ForceItem Item2
-        {
-            get { return item2; }
-            set { item2 = value; }
-        }
-        /// <summary> 
-        /// The spring's resting length 
-        /// </summary>
-        public float Length
-        {
-            get { return length; }
-            set { length = value; }
-        }
-        /// <summary> 
-        /// The spring tension co-efficient
-        /// </summary>
-        public float Coeff
-        {
-            get { return coeff; }
-            set { coeff = value; }
-        }
-        #endregion
-
-        #region Constructor
-        /// <summary>
-        /// Create a new Spring instance
-        ///<param name="fi1">  the first ForceItem endpoint</param>
-        /// <param name="fi2"> the second ForceItem endpoint          </param>
-        ///  <param name="k">the spring tension co-efficient                             </param>
-        ///  <param name="len">the spring's resting length                                               </param>
-        /// </summary>
-        public Spring(ForceItem fi1, ForceItem fi2, float k, float len)
-        {
-            item1 = fi1;
-            item2 = fi2;
-            coeff = k;
-            length = len;
-        }
-
-        #endregion
-
-        #region Classes
-        /// <summary>
-        /// The SpringFactory is responsible for generating Spring instances
-        /// and maintaining an object pool of Springs to reduce garbage collection
-        /// overheads while force simulations are running.
-        /// </summary>
-        public sealed class SpringFactory
-        {
-            public const int Capacity = 5000;
-            private List<Spring> springs = new List<Spring>(Capacity);
-
-            /// <summary>
-            /// Get a Spring instance and set it to the given parameters.
-            /// </summary>
-            public Spring getSpring(ForceItem f1, ForceItem f2, float k, float length)
-            {
-                if (springs.Count > 0)
-                {
-                    Spring s = springs[springs.Count - 1];
-                    springs.Remove(s);
-                    s.Item1 = f1;
-                    s.Item2 = f2;
-                    s.Coeff = k;
-                    s.Length = length;
-                    return s;
-                }
-                else
-                {
-                    return new Spring(f1, f2, k, length);
-                }
-            }
-            /// <summary>
-            /// Reclaim a Spring into the object pool.
-            /// </summary>
-            public void reclaim(Spring s)
-            {
-                s.Item1 = null;
-                s.Item2 = null;
-                if (springs.Count < Capacity)
-                    springs.Add(s);
-            }
-        }
-        #endregion
+      }
+      /// <summary>
+      /// Reclaim a Spring into the object pool.
+      /// </summary>
+      public void reclaim(Spring s) {
+        s.Item1 = null;
+        s.Item2 = null;
+        if (springs.Count < Capacity)
+          springs.Add(s);
+      }
     }
+    #endregion
+  }
 }
Index: /trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.Netron/3.0.2672.12446/Netron.Diagramming.Core-3.0.2672.12446/Layout/Force/SpringForce.cs
===================================================================
--- /trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.Netron/3.0.2672.12446/Netron.Diagramming.Core-3.0.2672.12446/Layout/Force/SpringForce.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.Netron/3.0.2672.12446/Netron.Diagramming.Core-3.0.2672.12446/Layout/Force/SpringForce.cs	(revision 4068)
@@ -1,107 +1,95 @@
 using System;
-using System.Collections.Generic;
-using System.Text;
 
-namespace Netron.Diagramming.Core.Layout.Force
-{
+namespace Netron.Diagramming.Core.Layout.Force {
+
+  /// <summary>
+  ///  Force function that computes the force acting on ForceItems due to a  given Spring.
+  /// </summary>
+  public class SpringForce : AbstractForce {
+
+    #region Fields
+    Random rnd = new Random();
+    private static String[] pnames = new String[] { "SpringCoefficient", "DefaultSpringLength" };
+    public static float DefaultSpriongCoeff = 1E-4f;
+    public static float DefaultMaxSpringCoeff = 1E-3f;
+    public static float DefaultMinSpringCoeff = 1E-5f;
+    public static float DefaultSpringLength = 50;
+    public static float DefaultMinSpringLength = 0;
+    public static float DefaultMaxSpringLength = 200;
+    public static int SpringCoeff = 0;
+    public static int SpringLength = 1;
+
+    #endregion
+
+    #region Properties
+    /// <summary>
+    /// Gets a value indicating whether [spring force].
+    /// </summary>
+    /// <value><c>true</c> if [spring force]; otherwise, <c>false</c>.</value>
+    public override bool IsSpringForce {
+      get {
+        return true;
+      }
+    }
+    /// <summary>
+    /// Gets the parameter names.
+    /// </summary>
+    /// <value></value>
+    /// <returns></returns>
+    protected override String[] ParameterNames {
+      get {
+        return pnames;
+      }
+    }
+    #endregion
+
+    #region Constructor
+    /// <summary>
+    ///  Create a new SpringForce.
+    /// </summary>
+    /// <param name="springCoeff"> the default spring co-efficient to use. This will be used if the spring's own co-efficient is less than zero..</param>
+    /// <param name="defaultLength">the default spring length to use. This will be used if the spring's own length is less than zero.</param>
+    public SpringForce(float springCoeff, float defaultLength) {
+      parms = new float[] { springCoeff, defaultLength };
+      minValues = new float[] { DefaultMinSpringCoeff, DefaultMinSpringLength };
+      maxValues = new float[] { DefaultMaxSpringCoeff, DefaultMaxSpringLength };
+    }
 
     /// <summary>
-    ///  Force function that computes the force acting on ForceItems due to a  given Spring.
+    /// Constructs a new SpringForce instance with default parameters.
     /// </summary>
-    public class SpringForce : AbstractForce
-    {
+    public SpringForce()
+      : this(DefaultSpriongCoeff, DefaultSpringLength) {
+    }
+    #endregion
 
-        #region Fields
-        Random rnd = new Random();
-        private static String[] pnames = new String[] { "SpringCoefficient", "DefaultSpringLength" };
-        public static float DefaultSpriongCoeff = 1E-4f;
-        public static float DefaultMaxSpringCoeff = 1E-3f;
-        public static float DefaultMinSpringCoeff = 1E-5f;
-        public static float DefaultSpringLength = 50;
-        public static float DefaultMinSpringLength = 0;
-        public static float DefaultMaxSpringLength = 200;
-        public static int SpringCoeff = 0;
-        public static int SpringLength = 1;
+    #region Methdos
+    /// <summary>
+    /// Gets the force.
+    /// </summary>
+    /// <param name="s">The s.</param>
+    public override void GetForce(Spring s) {
+      ForceItem item1 = s.Item1;
+      ForceItem item2 = s.Item2;
+      float length = (s.Length < 0 ? parms[SpringLength] : s.Length);
+      float x1 = item1.Location[0], y1 = item1.Location[1];
+      float x2 = item2.Location[0], y2 = item2.Location[1];
+      float dx = x2 - x1, dy = y2 - y1;
+      float r = (float)Math.Sqrt(dx * dx + dy * dy);
+      if (r == 0.0) {
+        dx = ((float)rnd.NextDouble() - 0.5f) / 50.0f;
+        dy = ((float)rnd.NextDouble() - 0.5f) / 50.0f;
+        r = (float)Math.Sqrt(dx * dx + dy * dy);
+      }
+      float d = r - length;
+      float coeff = (s.Coeff < 0 ? parms[SpringCoeff] : s.Coeff) * d / r;
+      item1.Force[0] += coeff * dx;
+      item1.Force[1] += coeff * dy;
+      item2.Force[0] += -coeff * dx;
+      item2.Force[1] += -coeff * dy;
+    }
 
-        #endregion
+    #endregion
 
-        #region Properties
-        /// <summary>
-        /// Gets a value indicating whether [spring force].
-        /// </summary>
-        /// <value><c>true</c> if [spring force]; otherwise, <c>false</c>.</value>
-        public override bool IsSpringForce
-        {
-            get
-            {
-                return true;
-            }
-        }
-        /// <summary>
-        /// Gets the parameter names.
-        /// </summary>
-        /// <value></value>
-        /// <returns></returns>
-        protected override String[] ParameterNames
-        {
-            get
-            {
-                return pnames;
-            }
-        }
-        #endregion
-
-        #region Constructor
-        /// <summary>
-        ///  Create a new SpringForce.
-        /// </summary>
-        /// <param name="springCoeff"> the default spring co-efficient to use. This will be used if the spring's own co-efficient is less than zero..</param>
-        /// <param name="defaultLength">the default spring length to use. This will be used if the spring's own length is less than zero.</param>
-        public SpringForce(float springCoeff, float defaultLength)
-        {
-            parms = new float[] { springCoeff, defaultLength };
-            minValues = new float[] { DefaultMinSpringCoeff, DefaultMinSpringLength };
-            maxValues = new float[] { DefaultMaxSpringCoeff, DefaultMaxSpringLength };
-        }
-
-        /// <summary>
-        /// Constructs a new SpringForce instance with default parameters.
-        /// </summary>
-        public SpringForce()
-            : this(DefaultSpriongCoeff, DefaultSpringLength)
-        {
-        } 
-        #endregion
-
-        #region Methdos
-        /// <summary>
-        /// Gets the force.
-        /// </summary>
-        /// <param name="s">The s.</param>
-        public override void GetForce(Spring s)
-        {
-            ForceItem item1 = s.Item1;
-            ForceItem item2 = s.Item2;
-            float length = (s.Length < 0 ? parms[SpringLength] : s.Length);
-            float x1 = item1.Location[0], y1 = item1.Location[1];
-            float x2 = item2.Location[0], y2 = item2.Location[1];
-            float dx = x2 - x1, dy = y2 - y1;
-            float r = (float)Math.Sqrt(dx * dx + dy * dy);
-            if (r == 0.0)
-            {
-                dx = ((float)rnd.NextDouble() - 0.5f) / 50.0f;
-                dy = ((float)rnd.NextDouble() - 0.5f) / 50.0f;
-                r = (float)Math.Sqrt(dx * dx + dy * dy);
-            }
-            float d = r - length;
-            float coeff = (s.Coeff < 0 ? parms[SpringCoeff] : s.Coeff) * d / r;
-            item1.Force[0] += coeff * dx;
-            item1.Force[1] += coeff * dy;
-            item2.Force[0] += -coeff * dx;
-            item2.Force[1] += -coeff * dy;
-        }
-
-        #endregion
-
-    }
+  }
 }
Index: /trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.Netron/3.0.2672.12446/Netron.Diagramming.Core-3.0.2672.12446/Layout/ForceDirectedLayout.cs
===================================================================
--- /trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.Netron/3.0.2672.12446/Netron.Diagramming.Core-3.0.2672.12446/Layout/ForceDirectedLayout.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.Netron/3.0.2672.12446/Netron.Diagramming.Core-3.0.2672.12446/Layout/ForceDirectedLayout.cs	(revision 4068)
@@ -1,366 +1,327 @@
 using System;
-using System.Diagnostics;
+using System.Collections.Generic;
+using System.ComponentModel;
+using System.Drawing;
 using Netron.Diagramming.Core.Analysis;
 using Netron.Diagramming.Core.Layout.Force;
-using System.Drawing;
-using System.Collections.Generic;
-using System.Text;
-using System.Windows.Forms;
-using System.ComponentModel;
-
-namespace Netron.Diagramming.Core
-{
-    /// <summary>
-    /// <para>Layout that positions graph elements based on a physics simulation of
-    ///  interacting forces; by default, nodes repel each other, edges act as
-    ///  springs, and drag forces (similar to air resistance) are applied. This
-    ///  algorithm can be run for multiple iterations for a run-once layout
-    ///  computation or repeatedly run in an animated fashion for a dynamic and
-    ///  interactive layout.</para>
-    ///  
-    ///  <para>The running time of this layout algorithm is the greater of O(N log N)
-    ///  and O(E), where N is the number of nodes and E the number of edges.
-    ///  The addition of custom force calculation modules may, however, increase
-    ///  this value.</para>
-    ///  
-    ///  <para>The <see cref="ForceSimulator"/> used to drive this layout
-    ///  can be set explicitly, allowing any number of custom force directed layouts
-    ///  to be created through the user's selection of included
-    ///  <see cref="Force"/> components. Each node in the layout is
-    ///  mapped to a <see cref="ForceItem"/> instance and each edge
-    ///  to a <see cref="Spring"/> instance for storing the state
-    ///  of the simulation. See the <see cref="Force"/> namespace for more.</para>
-    /// </summary>
-    class ForceDirectedLayout : LayoutBase
-    {
-        #region Fields
-        private ForceSimulator m_fsim;
-        private long m_lasttime = -1L;
-        private long m_maxstep = 50L;
-        private bool m_runonce;
-        private int m_iterations = 100;
-        private bool mEnforceBounds;
-        BackgroundWorker worker;
-        protected INode referrer;
-
-        protected String m_nodeGroup;
-        protected String m_edgeGroup;
-        private Dictionary<string, ForceItem> Pars;
-        #endregion
-
-        #region Properties
-        public long MaxTimeStep
-        {
-            get { return m_maxstep; }
-            set { m_maxstep = value; }
-        }
-
-        public ForceSimulator getForceSimulator
-        {
-            get { return m_fsim; }
-            set { m_fsim = value; }
-        }
-
-        public int Iterations
-        {
-            get { return m_iterations; }
-            set
-            {
-                if (value < 1)
-                    throw new ArgumentException("The amount of iterations has to be bigger or equal to one.");
-                m_iterations = value;
-            }
-        }
-
-
-
-        #endregion
-
-        #region Constructor
-        ///<summary>
-        ///Default constructor
-        ///</summary>
-        public ForceDirectedLayout(IController controller)
-            : base("ForceDirected Layout", controller)
-        {
-
-        }
-        #endregion
-
-        #region Methods
-        /// <summary>
-        /// Handles the DoWork event of the worker control.
-        /// </summary>
-        /// <param name="sender">The source of the event.</param>
-        /// <param name="e">The <see cref="T:System.ComponentModel.DoWorkEventArgs"/> instance containing the event data.</param>
-        private void worker_DoWork(object sender, DoWorkEventArgs e)
-        {
-            this.Controller.View.Suspend();
-            Init();
-            Layout();
-            this.Controller.View.Resume();
-        }
-        /// <summary>
-        /// Runs this instance.
-        /// </summary>
-        public override void Run()
-        {
-            Run(2000);
-        }
-
-        /// <summary>
-        /// Runs the specified time.
-        /// </summary>
-        /// <param name="time">The time.</param>
-        public override void Run(int time)
-        {
-            worker = new BackgroundWorker();
-            worker.DoWork += new DoWorkEventHandler(worker_DoWork);
-            worker.RunWorkerAsync(time);
-        }
-
-        /// <summary>
-        /// Stops this instance.
-        /// </summary>
-        public override void Stop()
-        {
-            if (worker != null && worker.IsBusy)
-                worker.CancelAsync();
-        }
-        ///<summary>
-        /// Get the mass value associated with the given node. Subclasses should
-        /// override this method to perform custom mass assignment.
-        /// @param n the node for which to compute the mass value
-        /// @return the mass value for the node. By default, all items are given
-        /// a mass value of 1.0.
-        ///</summary>
-        protected float getMassValue(INode n)
-        {
-            return 1.0f;
-        }
-
-        ///<summary>
-        /// Get the spring length for the given edge. Subclasses should
-        /// override this method to perform custom spring length assignment.
-        /// @param e the edge for which to compute the spring length
-        /// @return the spring length for the edge. A return value of
-        /// -1 means to ignore this method and use the global default.
-        ///</summary>
-        protected float getSpringLength(IEdge e)
-        {
-            return -1.0F;
-        }
-
-        ///<summary>
-        /// Get the spring coefficient for the given edge, which controls the
-        /// tension or strength of the spring. Subclasses should
-        /// override this method to perform custom spring tension assignment.
-        /// @param e the edge for which to compute the spring coefficient.
-        /// @return the spring coefficient for the edge. A return value of
-        /// -1 means to ignore this method and use the global default.
-        ///</summary>
-        protected float getSpringCoefficient(IEdge e)
-        {
-            return -1.0F;
-        }
-
-        private bool Init()
-        {
-
-            mEnforceBounds = false;
-            m_runonce = true;
-            m_fsim = new ForceSimulator();
-
-            m_fsim.AddForce(new NBodyForce());
-            m_fsim.AddForce(new SpringForce());
-            m_fsim.AddForce(new DragForce());
-
-            this.Graph = this.Model as IGraph;
-
-            if (Graph == null)
-                throw new InconsistencyException("The model has not been set and the Graph property is hence 'null'");
-
-            //Graph.ClearSpanningTree();
-            //Graph.MakeSpanningTree(LayoutRoot as INode);
-
-
-            if (Graph.Nodes.Count == 0)
-                return false;
-            if (Graph.Edges.Count == 0) //this layout is base on embedded springs in the connections
-                return false;
-
-            Pars = new Dictionary<string, ForceItem>();
-
-            foreach (INode node in Nodes)
-            {
-                Pars.Add(node.Uid.ToString(), new ForceItem());
-            }
-            return true;
-        }
-
-        /// <summary>
-        /// Updates the node positions.
-        /// </summary>
-        private void UpdateNodePositions()
-        {
-            double x1 = 0, x2 = 0, y1 = 0, y2 = 0;
-
-            if (Bounds != null)
-            {
-                x1 = Bounds.X; y1 = Bounds.Top;
-                x2 = Bounds.Right; y2 = Bounds.Bottom;
-            }
-
-            // update positions
-            foreach (INode item in Nodes)
-            {
-
-                ForceItem fitem = Pars[item.Uid.ToString()];
-                if (item.IsFixed)
-                {
-                    // clear any force computations
-                    fitem.Force[0] = 0.0f;
-                    fitem.Force[1] = 0.0f;
-                    fitem.Velocity[0] = 0.0f;
-                    fitem.Velocity[1] = 0.0f;
-
-                    if (Double.IsNaN(item.X))
-                    {
-                        setX(item, referrer, 0.0D);
-                        setY(item, referrer, 0.0D);
-                    }
-                    continue;
-                }
-
-                double x = fitem.Location[0];
-                double y = fitem.Location[1];
-                //do we need to check the bounding constraints
-                if (mEnforceBounds && Bounds != null)
-                {
-
-                    double hw = item.Rectangle.Width / 2;
-                    double hh = item.Rectangle.Height / 2;
-                    if (x + hw > x2) x = x2 - hw;
-                    if (x - hw < x1) x = x1 + hw;
-                    if (y + hh > y2) y = y2 - hh;
-                    if (y - hh < y1) y = y1 + hh;
-                }
-
-                // set the actual position
-                setX(item, referrer, x);
-                setY(item, referrer, y);
-            }
-        }
-
-        ///<summary>
-        /// Reset the force simulation state for all nodes processed by this layout.
-        ///</summary>
-        public void Reset()
-        {
-            foreach (INode item in Nodes)
-            {
-                ForceItem fitem = Pars[item.Uid.ToString()];
-                if (fitem != null)
-                {
-                    fitem.Location[0] = (float)item.X;
-                    fitem.Location[1] = (float)item.Y;
-                    fitem.Force[0] = fitem.Force[1] = 0;
-                    fitem.Velocity[0] = fitem.Velocity[1] = 0;
-                }
-            }
-            m_lasttime = -1L;
-        }
-
-        /// <summary>
-        /// Loads the simulator with all relevant force items and springs.
-        /// </summary>
-        /// <param name="fsim"> the force simulator driving this layout.</param>
-        protected void InitializeSimulator(ForceSimulator fsim)
-        {
-            //TODO: some checks here...?
-
-            float startX = (referrer == null ? 0f : (float)referrer.X);
-            float startY = (referrer == null ? 0f : (float)referrer.Y);
-            startX = float.IsNaN(startX) ? 0f : startX;
-            startY = float.IsNaN(startY) ? 0f : startY;
-            if (Nodes != null && Nodes.Count > 0)
-            {
-                foreach (INode item in Nodes)
-                {
-                    ForceItem fitem = Pars[item.Uid.ToString()];
-                    fitem.Mass = getMassValue(item);
-                    double x = item.X;
-                    double y = item.Y;
-                    fitem.Location[0] = (Double.IsNaN(x) ? startX : (float)x);
-                    fitem.Location[1] = (Double.IsNaN(y) ? startY : (float)y);
-                    fsim.addItem(fitem);
-                }
-            }
-            if (Edges != null && Edges.Count > 0)
-            {
-                foreach (IEdge e in Edges)
-                {
-                    INode n1 = e.SourceNode;
-                    if (n1 == null) continue;
-                    ForceItem f1 = Pars[n1.Uid.ToString()];
-                    INode n2 = e.TargetNode;
-                    if (n2 == null) continue;
-                    ForceItem f2 = Pars[n2.Uid.ToString()];
-                    float coeff = getSpringCoefficient(e);
-                    float slen = getSpringLength(e);
-                    fsim.addSpring(f1, f2, (coeff >= 0 ? coeff : -1.0F), (slen >= 0 ? slen : -1.0F));
-                }
-            }
-        }
-        private void Layout()
-        {
-            // perform different actions if this is a run-once or
-            // run-continuously layout
-            if (m_runonce)
-            {
-                PointF anchor = new PointF(Bounds.Width / 2F, Bounds.Height / 2F);
-                foreach (INode node in Nodes)
-                {
-                    setX(node, null, anchor.X);
-                    setY(node, null, anchor.Y);
-                }
-                m_fsim.Clear();
-                long timestep = 1000L;
-
-                InitializeSimulator(m_fsim);
-
-                for (int i = 0; i < m_iterations; i++)
-                {
-                    // use an annealing schedule to set time step
-                    timestep *= Convert.ToInt64(1.0 - i / (double)m_iterations);
-                    long step = timestep + 50;
-                    // run simulator
-                    m_fsim.RunSimulator(step);
-                    // debugging output
-                    //if (i % 10 == 0 ) {Trace.WriteLine("iter: "+i);}
-                }
-                UpdateNodePositions();
-            }
-            else
-            {
-                // get timestep
-                if (m_lasttime == -1)
-                    m_lasttime = DateTime.Now.Ticks * 10 - 20;
-                long time = DateTime.Now.Ticks * 10;//how many milliseconds since the human race started to count things
-                long timestep = Math.Min(m_maxstep, time - m_lasttime);
-                m_lasttime = time;
-
-                // run force simulator
-                m_fsim.Clear();
-                InitializeSimulator(m_fsim);
-                m_fsim.RunSimulator(timestep);
-                UpdateNodePositions();
-            }
-            //if ( frac == 1.0 ) {
-            //    reset();
-            //}
-        }
-        #endregion
-
-    }
+
+namespace Netron.Diagramming.Core {
+  /// <summary>
+  /// <para>Layout that positions graph elements based on a physics simulation of
+  ///  interacting forces; by default, nodes repel each other, edges act as
+  ///  springs, and drag forces (similar to air resistance) are applied. This
+  ///  algorithm can be run for multiple iterations for a run-once layout
+  ///  computation or repeatedly run in an animated fashion for a dynamic and
+  ///  interactive layout.</para>
+  ///  
+  ///  <para>The running time of this layout algorithm is the greater of O(N log N)
+  ///  and O(E), where N is the number of nodes and E the number of edges.
+  ///  The addition of custom force calculation modules may, however, increase
+  ///  this value.</para>
+  ///  
+  ///  <para>The <see cref="ForceSimulator"/> used to drive this layout
+  ///  can be set explicitly, allowing any number of custom force directed layouts
+  ///  to be created through the user's selection of included
+  ///  <see cref="Force"/> components. Each node in the layout is
+  ///  mapped to a <see cref="ForceItem"/> instance and each edge
+  ///  to a <see cref="Spring"/> instance for storing the state
+  ///  of the simulation. See the <see cref="Force"/> namespace for more.</para>
+  /// </summary>
+  class ForceDirectedLayout : LayoutBase {
+    #region Fields
+    private ForceSimulator m_fsim;
+    private long m_lasttime = -1L;
+    private long m_maxstep = 50L;
+    private bool m_runonce;
+    private int m_iterations = 100;
+    private bool mEnforceBounds;
+    BackgroundWorker worker;
+    protected INode referrer;
+
+    protected String m_nodeGroup;
+    protected String m_edgeGroup;
+    private Dictionary<string, ForceItem> Pars;
+    #endregion
+
+    #region Properties
+    public long MaxTimeStep {
+      get { return m_maxstep; }
+      set { m_maxstep = value; }
+    }
+
+    public ForceSimulator getForceSimulator {
+      get { return m_fsim; }
+      set { m_fsim = value; }
+    }
+
+    public int Iterations {
+      get { return m_iterations; }
+      set {
+        if (value < 1)
+          throw new ArgumentException("The amount of iterations has to be bigger or equal to one.");
+        m_iterations = value;
+      }
+    }
+
+
+
+    #endregion
+
+    #region Constructor
+    ///<summary>
+    ///Default constructor
+    ///</summary>
+    public ForceDirectedLayout(IController controller)
+      : base("ForceDirected Layout", controller) {
+
+    }
+    #endregion
+
+    #region Methods
+    /// <summary>
+    /// Handles the DoWork event of the worker control.
+    /// </summary>
+    /// <param name="sender">The source of the event.</param>
+    /// <param name="e">The <see cref="T:System.ComponentModel.DoWorkEventArgs"/> instance containing the event data.</param>
+    private void worker_DoWork(object sender, DoWorkEventArgs e) {
+      this.Controller.View.Suspend();
+      Init();
+      Layout();
+      this.Controller.View.Resume();
+    }
+    /// <summary>
+    /// Runs this instance.
+    /// </summary>
+    public override void Run() {
+      Run(2000);
+    }
+
+    /// <summary>
+    /// Runs the specified time.
+    /// </summary>
+    /// <param name="time">The time.</param>
+    public override void Run(int time) {
+      worker = new BackgroundWorker();
+      worker.DoWork += new DoWorkEventHandler(worker_DoWork);
+      worker.RunWorkerAsync(time);
+    }
+
+    /// <summary>
+    /// Stops this instance.
+    /// </summary>
+    public override void Stop() {
+      if (worker != null && worker.IsBusy)
+        worker.CancelAsync();
+    }
+    ///<summary>
+    /// Get the mass value associated with the given node. Subclasses should
+    /// override this method to perform custom mass assignment.
+    /// @param n the node for which to compute the mass value
+    /// @return the mass value for the node. By default, all items are given
+    /// a mass value of 1.0.
+    ///</summary>
+    protected float getMassValue(INode n) {
+      return 1.0f;
+    }
+
+    ///<summary>
+    /// Get the spring length for the given edge. Subclasses should
+    /// override this method to perform custom spring length assignment.
+    /// @param e the edge for which to compute the spring length
+    /// @return the spring length for the edge. A return value of
+    /// -1 means to ignore this method and use the global default.
+    ///</summary>
+    protected float getSpringLength(IEdge e) {
+      return -1.0F;
+    }
+
+    ///<summary>
+    /// Get the spring coefficient for the given edge, which controls the
+    /// tension or strength of the spring. Subclasses should
+    /// override this method to perform custom spring tension assignment.
+    /// @param e the edge for which to compute the spring coefficient.
+    /// @return the spring coefficient for the edge. A return value of
+    /// -1 means to ignore this method and use the global default.
+    ///</summary>
+    protected float getSpringCoefficient(IEdge e) {
+      return -1.0F;
+    }
+
+    private bool Init() {
+
+      mEnforceBounds = false;
+      m_runonce = true;
+      m_fsim = new ForceSimulator();
+
+      m_fsim.AddForce(new NBodyForce());
+      m_fsim.AddForce(new SpringForce());
+      m_fsim.AddForce(new DragForce());
+
+      this.Graph = this.Model as IGraph;
+
+      if (Graph == null)
+        throw new InconsistencyException("The model has not been set and the Graph property is hence 'null'");
+
+      //Graph.ClearSpanningTree();
+      //Graph.MakeSpanningTree(LayoutRoot as INode);
+
+
+      if (Graph.Nodes.Count == 0)
+        return false;
+      if (Graph.Edges.Count == 0) //this layout is base on embedded springs in the connections
+        return false;
+
+      Pars = new Dictionary<string, ForceItem>();
+
+      foreach (INode node in Nodes) {
+        Pars.Add(node.Uid.ToString(), new ForceItem());
+      }
+      return true;
+    }
+
+    /// <summary>
+    /// Updates the node positions.
+    /// </summary>
+    private void UpdateNodePositions() {
+      double x1 = 0, x2 = 0, y1 = 0, y2 = 0;
+
+      if (Bounds != null) {
+        x1 = Bounds.X; y1 = Bounds.Top;
+        x2 = Bounds.Right; y2 = Bounds.Bottom;
+      }
+
+      // update positions
+      foreach (INode item in Nodes) {
+
+        ForceItem fitem = Pars[item.Uid.ToString()];
+        if (item.IsFixed) {
+          // clear any force computations
+          fitem.Force[0] = 0.0f;
+          fitem.Force[1] = 0.0f;
+          fitem.Velocity[0] = 0.0f;
+          fitem.Velocity[1] = 0.0f;
+
+          if (Double.IsNaN(item.X)) {
+            setX(item, referrer, 0.0D);
+            setY(item, referrer, 0.0D);
+          }
+          continue;
+        }
+
+        double x = fitem.Location[0];
+        double y = fitem.Location[1];
+        //do we need to check the bounding constraints
+        if (mEnforceBounds && Bounds != null) {
+
+          double hw = item.Rectangle.Width / 2;
+          double hh = item.Rectangle.Height / 2;
+          if (x + hw > x2) x = x2 - hw;
+          if (x - hw < x1) x = x1 + hw;
+          if (y + hh > y2) y = y2 - hh;
+          if (y - hh < y1) y = y1 + hh;
+        }
+
+        // set the actual position
+        setX(item, referrer, x);
+        setY(item, referrer, y);
+      }
+    }
+
+    ///<summary>
+    /// Reset the force simulation state for all nodes processed by this layout.
+    ///</summary>
+    public void Reset() {
+      foreach (INode item in Nodes) {
+        ForceItem fitem = Pars[item.Uid.ToString()];
+        if (fitem != null) {
+          fitem.Location[0] = (float)item.X;
+          fitem.Location[1] = (float)item.Y;
+          fitem.Force[0] = fitem.Force[1] = 0;
+          fitem.Velocity[0] = fitem.Velocity[1] = 0;
+        }
+      }
+      m_lasttime = -1L;
+    }
+
+    /// <summary>
+    /// Loads the simulator with all relevant force items and springs.
+    /// </summary>
+    /// <param name="fsim"> the force simulator driving this layout.</param>
+    protected void InitializeSimulator(ForceSimulator fsim) {
+      //TODO: some checks here...?
+
+      float startX = (referrer == null ? 0f : (float)referrer.X);
+      float startY = (referrer == null ? 0f : (float)referrer.Y);
+      startX = float.IsNaN(startX) ? 0f : startX;
+      startY = float.IsNaN(startY) ? 0f : startY;
+      if (Nodes != null && Nodes.Count > 0) {
+        foreach (INode item in Nodes) {
+          ForceItem fitem = Pars[item.Uid.ToString()];
+          fitem.Mass = getMassValue(item);
+          double x = item.X;
+          double y = item.Y;
+          fitem.Location[0] = (Double.IsNaN(x) ? startX : (float)x);
+          fitem.Location[1] = (Double.IsNaN(y) ? startY : (float)y);
+          fsim.addItem(fitem);
+        }
+      }
+      if (Edges != null && Edges.Count > 0) {
+        foreach (IEdge e in Edges) {
+          INode n1 = e.SourceNode;
+          if (n1 == null) continue;
+          ForceItem f1 = Pars[n1.Uid.ToString()];
+          INode n2 = e.TargetNode;
+          if (n2 == null) continue;
+          ForceItem f2 = Pars[n2.Uid.ToString()];
+          float coeff = getSpringCoefficient(e);
+          float slen = getSpringLength(e);
+          fsim.addSpring(f1, f2, (coeff >= 0 ? coeff : -1.0F), (slen >= 0 ? slen : -1.0F));
+        }
+      }
+    }
+    private void Layout() {
+      // perform different actions if this is a run-once or
+      // run-continuously layout
+      if (m_runonce) {
+        PointF anchor = new PointF(Bounds.Width / 2F, Bounds.Height / 2F);
+        foreach (INode node in Nodes) {
+          setX(node, null, anchor.X);
+          setY(node, null, anchor.Y);
+        }
+        m_fsim.Clear();
+        long timestep = 1000L;
+
+        InitializeSimulator(m_fsim);
+
+        for (int i = 0; i < m_iterations; i++) {
+          // use an annealing schedule to set time step
+          timestep *= Convert.ToInt64(1.0 - i / (double)m_iterations);
+          long step = timestep + 50;
+          // run simulator
+          m_fsim.RunSimulator(step);
+          // debugging output
+          //if (i % 10 == 0 ) {Trace.WriteLine("iter: "+i);}
+        }
+        UpdateNodePositions();
+      } else {
+        // get timestep
+        if (m_lasttime == -1)
+          m_lasttime = DateTime.Now.Ticks * 10 - 20;
+        long time = DateTime.Now.Ticks * 10;//how many milliseconds since the human race started to count things
+        long timestep = Math.Min(m_maxstep, time - m_lasttime);
+        m_lasttime = time;
+
+        // run force simulator
+        m_fsim.Clear();
+        InitializeSimulator(m_fsim);
+        m_fsim.RunSimulator(timestep);
+        UpdateNodePositions();
+      }
+      //if ( frac == 1.0 ) {
+      //    reset();
+      //}
+    }
+    #endregion
+
+  }
 }
Index: /trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.Netron/3.0.2672.12446/Netron.Diagramming.Core-3.0.2672.12446/Layout/FruchtermanReingoldLayout.cs
===================================================================
--- /trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.Netron/3.0.2672.12446/Netron.Diagramming.Core-3.0.2672.12446/Layout/FruchtermanReingoldLayout.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.Netron/3.0.2672.12446/Netron.Diagramming.Core-3.0.2672.12446/Layout/FruchtermanReingoldLayout.cs	(revision 4068)
@@ -1,357 +1,316 @@
 using System;
 using System.Collections.Generic;
-using System.Text;
+using System.ComponentModel;
 using System.Drawing;
-using System.Threading;
-using System.ComponentModel;
 using Netron.Diagramming.Core.Analysis;
-namespace Netron.Diagramming.Core
-{
-    /// <summary>
-    /// <para>Layout instance implementing the Fruchterman-Reingold algorithm for
-    ///  force-directed placement of graph nodes. The computational complexity of
-    ///  this algorithm is quadratic [O(n^2)] in the number of nodes, so should
-    ///  only be applied for relatively small graphs, particularly in interactive
-    ///  situations.</para>
-    ///  
-    ///  <para>This implementation was ported from the implementation in the
-    ///  <a href="http://jung.sourceforge.net/">JUNG</a> framework.</para>
-    /// </summary>
-    class FruchtermanReingoldLayout : LayoutBase
-    {
-        #region Fields
-        private double forceConstant;
-        private double temp;
-        private int maxIter = 300;
-
-        protected int m_fidx;
-        private Random rnd;
-        private static double EPSILON = 0.000001D;
-        private static double ALPHA = 0.1D;
-
-        Dictionary<string, Params> Pars;
-        double width;
-        double height;
-        BackgroundWorker worker;
-        #endregion
-
-        #region Constructor
-        ///<summary>
-        ///Default constructor
-        ///</summary>
-        public FruchtermanReingoldLayout(IController controller)
-            : base("FruchtermanReingold Layout", controller)
-        {
-        }
-        #endregion
-
-        #region Methods
-
-        /// <summary>
-        /// Inits the calculational state
-        /// </summary>
-        private bool Init()
-        {
-            this.Graph = this.Model as IGraph;
-
-            if (Graph == null)
-                throw new InconsistencyException("The model has not been set and the Graph property is hence 'null'");
-
-            //this.LayoutRoot = this.Controller.Model.LayoutRoot;//could be null if not set in the GUI
-            //Graph.ClearSpanningTree();
-            //Graph.MakeSpanningTree(LayoutRoot as INode);
-
-            Pars = new Dictionary<string, Params>();
-            if (Nodes.Count == 0)
-                return false;
-            if (Edges.Count == 0) //this layout is base on embedded springs in the connections
-                return false;
-
-            width = (double)Bounds.Width;
-            height = (double)Bounds.Height;
-            rnd = new Random();
-
-
-            temp = width / 10;
-            forceConstant = 0.75 * Math.Sqrt(height * width / Nodes.Count);
-
-            // initialize node positions
-
-
-            double scaleW = ALPHA * width / 2;
-            double scaleH = ALPHA * height / 2;
-            Params par;
-            double[] loc;
-            foreach (INode node in Nodes)
-            {
-                loc = new double[2];
-                loc[0] = Center.X + rnd.NextDouble() * scaleW;
-                loc[1] = Center.Y + rnd.NextDouble() * scaleH;
-                par = new Params(loc, new double[2]);
-                Pars.Add(node.Uid.ToString(), par);
-            }
-            return true;
-        }
-
-        /// <summary>
-        /// Runs this instance.
-        /// </summary>
-        public override void Run()
-        {
-            width = this.Bounds.Width;
-            height = this.Bounds.Height;
-            Run(1000);
-
-
-        }
-        /// <summary>
-        /// Stops this instance.
-        /// </summary>
-        public override void Stop()
-        {
-            if (worker != null && worker.IsBusy)
-                worker.CancelAsync();
-        }
-        /// <summary>
-        /// Runs the layout for a specified time.
-        /// </summary>
-        /// <param name="time">The time.</param>
-        public override void Run(int time)
-        {
-            if (Init())
-            {
-
-                worker = new BackgroundWorker();
-                worker.DoWork += new DoWorkEventHandler(worker_DoWork);
-                worker.RunWorkerAsync(time);
-
-            }
-
-        }
-
-        /// <summary>
-        /// Handles the DoWork event of the worker control.
-        /// </summary>
-        /// <param name="sender">The source of the event.</param>
-        /// <param name="e">The <see cref="T:System.ComponentModel.DoWorkEventArgs"/> instance containing the event data.</param>
-        void worker_DoWork(object sender, DoWorkEventArgs e)
-        {
-            //this.Controller.View.Suspend();
-            DateTime start = DateTime.Now;
-            while (DateTime.Now < start.AddMilliseconds((int)e.Argument))
-            {
-                RunStep();
-
-            }
-            //this.Controller.View.Resume();
-            UpdateShapes();
-
-            RunAnimation();
-        }
-
-        private void RunAnimation()
-        {
-
-        }
-
-        /// <summary>
-        /// Runs a single step.
-        /// </summary>
-        private void RunStep()
-        {
-
-            for (int curIter = 0; curIter < maxIter; curIter++)
-            {
-
-                // Calculate repulsion
-                foreach (INode node in Nodes)
-                {
-                    if (node.IsFixed) continue;
-                    CalculateRepulsion(node);
-                }
-
-                // Calculate attraction
-                foreach (IEdge edge in Edges)
-                {
-                    CalculateAttraction(edge);
-                }
-
-                foreach (INode node in Nodes)
-                {
-                    if (node.IsFixed) continue;
-                    CalculatePositions(node);
-                }
-
-                CoolDown(curIter);
-
-
-            }
-
-
-        }
-
-        private void UpdateShapes()
-        {
-            int x, y;
-            lock (Nodes)
-                lock (Pars)
-                {
-                    foreach (INode node in Nodes)
-                    {
-                        x = Convert.ToInt32(Pars[node.Uid.ToString()].loc[0]) - node.Rectangle.X;
-                        y = Convert.ToInt32(Pars[node.Uid.ToString()].loc[1]) - node.Rectangle.Y;
-                        //if (node.Rectangle.X + x < width - node.Rectangle.Width - 10 && node.Rectangle.X + x > 10 && node.Rectangle.Y + y < height - node.Rectangle.Height - 10 && node.Rectangle.Y + y > 10)
-                        node.MoveBy(new Point(x, y));
-                    }
-                }
-        }
-
-        #region Calculations
-        public void CalculatePositions(INode n)
-        {
-            Params np = Pars[n.Uid.ToString()];
-
-
-            double deltaLength = Math.Max(EPSILON, Math.Sqrt(np.disp[0] * np.disp[0] + np.disp[1] * np.disp[1]));
-
-            double xDisp = np.disp[0] / deltaLength * Math.Min(deltaLength, temp);
-
-            if (Double.IsNaN(xDisp))
-            {
-                System.Diagnostics.Trace.WriteLine("Oops, the layout resulted in a NaN problem.");
-                return;
-            }
-
-            double yDisp = np.disp[1] / deltaLength * Math.Min(deltaLength, temp);
-
-            np.loc[0] += xDisp;
-            np.loc[1] += yDisp;
-
-
-            // don't let nodes leave the display
-            double borderWidth = width / 50.0;
-            double x = np.loc[0];
-            if (x < borderWidth)
-            {
-                x = borderWidth + rnd.NextDouble() * borderWidth * 2.0;
-            }
-            else if (x > (width - borderWidth))
-            {
-                x = width - borderWidth - rnd.NextDouble() * borderWidth * 2.0;
-            }
-
-            double y = np.loc[1];
-            if (y < borderWidth)
-            {
-                y = borderWidth + rnd.NextDouble() * borderWidth * 2.0;
-            }
-            else if (y > (height - borderWidth))
-            {
-                y = height - borderWidth - rnd.NextDouble() * borderWidth * 2.0;
-            }
-
-            np.loc[0] = x;
-            np.loc[1] = y;
-        }
-
-        /// <summary>
-        /// Calculates the attraction or tension on the given edge.
-        /// </summary>
-        /// <param name="edge">The edge.</param>
-        public void CalculateAttraction(IEdge edge)
-        {
-            INode n1, n2;
-            Params n1p = new Params();
-            Params n2p = new Params();
-            if (edge.SourceNode != null)
-            {
-                n2 = edge.SourceNode;
-                n2p = Pars[n2.Uid.ToString()];
-            };
-            if (edge.TargetNode != null)
-            {
-                n1 = edge.TargetNode;
-                n1p = Pars[n1.Uid.ToString()];
-            };
-
-
-
-            double xDelta = n1p.loc[0] - n2p.loc[0];
-            double yDelta = n1p.loc[1] - n2p.loc[1];
-
-            double deltaLength = Math.Max(EPSILON, Math.Sqrt(xDelta * xDelta + yDelta * yDelta));
-            double force = (deltaLength * deltaLength) / forceConstant;
-
-            if (Double.IsNaN(force))
-            {
-                System.Diagnostics.Trace.WriteLine("Oops, the layout resulted in a NaN problem.");
-                return;
-            }
-
-            double xDisp = (xDelta / deltaLength) * force;
-            double yDisp = (yDelta / deltaLength) * force;
-
-            n1p.disp[0] -= xDisp; n1p.disp[1] -= yDisp;
-            n2p.disp[0] += xDisp; n2p.disp[1] += yDisp;
-        }
-
-        public void CalculateRepulsion(INode node)
-        {
-            Params np = Pars[node.Uid.ToString()];
-            np.disp[0] = 0.0; np.disp[1] = 0.0;
-
-            foreach (INode n2 in Nodes)
-            {
-
-                Params n2p = Pars[n2.Uid.ToString()];
-                if (n2.IsFixed) continue;
-                if (node != n2)
-                {
-                    double xDelta = np.loc[0] - n2p.loc[0];
-                    double yDelta = np.loc[1] - n2p.loc[1];
-
-                    double deltaLength = Math.Max(EPSILON, Math.Sqrt(xDelta * xDelta + yDelta * yDelta));
-
-                    double force = (forceConstant * forceConstant) / deltaLength;
-
-                    if (Double.IsNaN(force))
-                    {
-                        System.Diagnostics.Trace.WriteLine("Oops, the layout resulted in a NaN problem.");
-                        return;
-                    }
-
-                    np.disp[0] += (xDelta / deltaLength) * force;
-                    np.disp[1] += (yDelta / deltaLength) * force;
-                }
-            }
-        }
-
-        private void CoolDown(int curIter)
-        {
-            temp *= (1.0 - curIter / (double)maxIter);
-        }
-        #endregion
-
-
-        /// <summary>
-        /// Paramter blob to temporarily keep working data of one node.
-        /// </summary>
-        struct Params
-        {
-            public double[] loc;
-            public double[] disp;
-
-            public Params(double[] loc, double[] disp)
-            {
-                this.loc = loc;
-                this.disp = disp;
-            }
-
-
-        }
-
-
-        #endregion
-
-    }
+namespace Netron.Diagramming.Core {
+  /// <summary>
+  /// <para>Layout instance implementing the Fruchterman-Reingold algorithm for
+  ///  force-directed placement of graph nodes. The computational complexity of
+  ///  this algorithm is quadratic [O(n^2)] in the number of nodes, so should
+  ///  only be applied for relatively small graphs, particularly in interactive
+  ///  situations.</para>
+  ///  
+  ///  <para>This implementation was ported from the implementation in the
+  ///  <a href="http://jung.sourceforge.net/">JUNG</a> framework.</para>
+  /// </summary>
+  class FruchtermanReingoldLayout : LayoutBase {
+    #region Fields
+    private double forceConstant;
+    private double temp;
+    private int maxIter = 300;
+
+    protected int m_fidx;
+    private Random rnd;
+    private static double EPSILON = 0.000001D;
+    private static double ALPHA = 0.1D;
+
+    Dictionary<string, Params> Pars;
+    double width;
+    double height;
+    BackgroundWorker worker;
+    #endregion
+
+    #region Constructor
+    ///<summary>
+    ///Default constructor
+    ///</summary>
+    public FruchtermanReingoldLayout(IController controller)
+      : base("FruchtermanReingold Layout", controller) {
+    }
+    #endregion
+
+    #region Methods
+
+    /// <summary>
+    /// Inits the calculational state
+    /// </summary>
+    private bool Init() {
+      this.Graph = this.Model as IGraph;
+
+      if (Graph == null)
+        throw new InconsistencyException("The model has not been set and the Graph property is hence 'null'");
+
+      //this.LayoutRoot = this.Controller.Model.LayoutRoot;//could be null if not set in the GUI
+      //Graph.ClearSpanningTree();
+      //Graph.MakeSpanningTree(LayoutRoot as INode);
+
+      Pars = new Dictionary<string, Params>();
+      if (Nodes.Count == 0)
+        return false;
+      if (Edges.Count == 0) //this layout is base on embedded springs in the connections
+        return false;
+
+      width = (double)Bounds.Width;
+      height = (double)Bounds.Height;
+      rnd = new Random();
+
+
+      temp = width / 10;
+      forceConstant = 0.75 * Math.Sqrt(height * width / Nodes.Count);
+
+      // initialize node positions
+
+
+      double scaleW = ALPHA * width / 2;
+      double scaleH = ALPHA * height / 2;
+      Params par;
+      double[] loc;
+      foreach (INode node in Nodes) {
+        loc = new double[2];
+        loc[0] = Center.X + rnd.NextDouble() * scaleW;
+        loc[1] = Center.Y + rnd.NextDouble() * scaleH;
+        par = new Params(loc, new double[2]);
+        Pars.Add(node.Uid.ToString(), par);
+      }
+      return true;
+    }
+
+    /// <summary>
+    /// Runs this instance.
+    /// </summary>
+    public override void Run() {
+      width = this.Bounds.Width;
+      height = this.Bounds.Height;
+      Run(1000);
+
+
+    }
+    /// <summary>
+    /// Stops this instance.
+    /// </summary>
+    public override void Stop() {
+      if (worker != null && worker.IsBusy)
+        worker.CancelAsync();
+    }
+    /// <summary>
+    /// Runs the layout for a specified time.
+    /// </summary>
+    /// <param name="time">The time.</param>
+    public override void Run(int time) {
+      if (Init()) {
+
+        worker = new BackgroundWorker();
+        worker.DoWork += new DoWorkEventHandler(worker_DoWork);
+        worker.RunWorkerAsync(time);
+
+      }
+
+    }
+
+    /// <summary>
+    /// Handles the DoWork event of the worker control.
+    /// </summary>
+    /// <param name="sender">The source of the event.</param>
+    /// <param name="e">The <see cref="T:System.ComponentModel.DoWorkEventArgs"/> instance containing the event data.</param>
+    void worker_DoWork(object sender, DoWorkEventArgs e) {
+      //this.Controller.View.Suspend();
+      DateTime start = DateTime.Now;
+      while (DateTime.Now < start.AddMilliseconds((int)e.Argument)) {
+        RunStep();
+
+      }
+      //this.Controller.View.Resume();
+      UpdateShapes();
+
+      RunAnimation();
+    }
+
+    private void RunAnimation() {
+
+    }
+
+    /// <summary>
+    /// Runs a single step.
+    /// </summary>
+    private void RunStep() {
+
+      for (int curIter = 0; curIter < maxIter; curIter++) {
+
+        // Calculate repulsion
+        foreach (INode node in Nodes) {
+          if (node.IsFixed) continue;
+          CalculateRepulsion(node);
+        }
+
+        // Calculate attraction
+        foreach (IEdge edge in Edges) {
+          CalculateAttraction(edge);
+        }
+
+        foreach (INode node in Nodes) {
+          if (node.IsFixed) continue;
+          CalculatePositions(node);
+        }
+
+        CoolDown(curIter);
+
+
+      }
+
+
+    }
+
+    private void UpdateShapes() {
+      int x, y;
+      lock (Nodes)
+        lock (Pars) {
+          foreach (INode node in Nodes) {
+            x = Convert.ToInt32(Pars[node.Uid.ToString()].loc[0]) - node.Rectangle.X;
+            y = Convert.ToInt32(Pars[node.Uid.ToString()].loc[1]) - node.Rectangle.Y;
+            //if (node.Rectangle.X + x < width - node.Rectangle.Width - 10 && node.Rectangle.X + x > 10 && node.Rectangle.Y + y < height - node.Rectangle.Height - 10 && node.Rectangle.Y + y > 10)
+            node.MoveBy(new Point(x, y));
+          }
+        }
+    }
+
+    #region Calculations
+    public void CalculatePositions(INode n) {
+      Params np = Pars[n.Uid.ToString()];
+
+
+      double deltaLength = Math.Max(EPSILON, Math.Sqrt(np.disp[0] * np.disp[0] + np.disp[1] * np.disp[1]));
+
+      double xDisp = np.disp[0] / deltaLength * Math.Min(deltaLength, temp);
+
+      if (Double.IsNaN(xDisp)) {
+        System.Diagnostics.Trace.WriteLine("Oops, the layout resulted in a NaN problem.");
+        return;
+      }
+
+      double yDisp = np.disp[1] / deltaLength * Math.Min(deltaLength, temp);
+
+      np.loc[0] += xDisp;
+      np.loc[1] += yDisp;
+
+
+      // don't let nodes leave the display
+      double borderWidth = width / 50.0;
+      double x = np.loc[0];
+      if (x < borderWidth) {
+        x = borderWidth + rnd.NextDouble() * borderWidth * 2.0;
+      } else if (x > (width - borderWidth)) {
+        x = width - borderWidth - rnd.NextDouble() * borderWidth * 2.0;
+      }
+
+      double y = np.loc[1];
+      if (y < borderWidth) {
+        y = borderWidth + rnd.NextDouble() * borderWidth * 2.0;
+      } else if (y > (height - borderWidth)) {
+        y = height - borderWidth - rnd.NextDouble() * borderWidth * 2.0;
+      }
+
+      np.loc[0] = x;
+      np.loc[1] = y;
+    }
+
+    /// <summary>
+    /// Calculates the attraction or tension on the given edge.
+    /// </summary>
+    /// <param name="edge">The edge.</param>
+    public void CalculateAttraction(IEdge edge) {
+      INode n1, n2;
+      Params n1p = new Params();
+      Params n2p = new Params();
+      if (edge.SourceNode != null) {
+        n2 = edge.SourceNode;
+        n2p = Pars[n2.Uid.ToString()];
+      };
+      if (edge.TargetNode != null) {
+        n1 = edge.TargetNode;
+        n1p = Pars[n1.Uid.ToString()];
+      };
+
+
+
+      double xDelta = n1p.loc[0] - n2p.loc[0];
+      double yDelta = n1p.loc[1] - n2p.loc[1];
+
+      double deltaLength = Math.Max(EPSILON, Math.Sqrt(xDelta * xDelta + yDelta * yDelta));
+      double force = (deltaLength * deltaLength) / forceConstant;
+
+      if (Double.IsNaN(force)) {
+        System.Diagnostics.Trace.WriteLine("Oops, the layout resulted in a NaN problem.");
+        return;
+      }
+
+      double xDisp = (xDelta / deltaLength) * force;
+      double yDisp = (yDelta / deltaLength) * force;
+
+      n1p.disp[0] -= xDisp; n1p.disp[1] -= yDisp;
+      n2p.disp[0] += xDisp; n2p.disp[1] += yDisp;
+    }
+
+    public void CalculateRepulsion(INode node) {
+      Params np = Pars[node.Uid.ToString()];
+      np.disp[0] = 0.0; np.disp[1] = 0.0;
+
+      foreach (INode n2 in Nodes) {
+
+        Params n2p = Pars[n2.Uid.ToString()];
+        if (n2.IsFixed) continue;
+        if (node != n2) {
+          double xDelta = np.loc[0] - n2p.loc[0];
+          double yDelta = np.loc[1] - n2p.loc[1];
+
+          double deltaLength = Math.Max(EPSILON, Math.Sqrt(xDelta * xDelta + yDelta * yDelta));
+
+          double force = (forceConstant * forceConstant) / deltaLength;
+
+          if (Double.IsNaN(force)) {
+            System.Diagnostics.Trace.WriteLine("Oops, the layout resulted in a NaN problem.");
+            return;
+          }
+
+          np.disp[0] += (xDelta / deltaLength) * force;
+          np.disp[1] += (yDelta / deltaLength) * force;
+        }
+      }
+    }
+
+    private void CoolDown(int curIter) {
+      temp *= (1.0 - curIter / (double)maxIter);
+    }
+    #endregion
+
+
+    /// <summary>
+    /// Paramter blob to temporarily keep working data of one node.
+    /// </summary>
+    struct Params {
+      public double[] loc;
+      public double[] disp;
+
+      public Params(double[] loc, double[] disp) {
+        this.loc = loc;
+        this.disp = disp;
+      }
+
+
+    }
+
+
+    #endregion
+
+  }
 }
Index: /trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.Netron/3.0.2672.12446/Netron.Diagramming.Core-3.0.2672.12446/Layout/LayoutBase.cs
===================================================================
--- /trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.Netron/3.0.2672.12446/Netron.Diagramming.Core-3.0.2672.12446/Layout/LayoutBase.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.Netron/3.0.2672.12446/Netron.Diagramming.Core-3.0.2672.12446/Layout/LayoutBase.cs	(revision 4068)
@@ -1,126 +1,112 @@
 using System;
 using System.Drawing;
-using System.ComponentModel;
-using System.Windows.Forms;
 using Netron.Diagramming.Core.Analysis;
-namespace Netron.Diagramming.Core
-{
-	/// <summary>
-	/// Base class for graph layout
-	/// </summary>
-	abstract class LayoutBase : ActionBase, ILayout
-    {
-        #region Fields
-        private IGraph graph;
-        
-        private string mName;
-        private Rectangle mBounds;
-        private PointF mCenter;
-        private const int defaultSpan = 400;
-        private IController mController = null;
-        #endregion
+namespace Netron.Diagramming.Core {
+  /// <summary>
+  /// Base class for graph layout
+  /// </summary>
+  abstract class LayoutBase : ActionBase, ILayout {
+    #region Fields
+    private IGraph graph;
 
-        #region Properties
+    private string mName;
+    private Rectangle mBounds;
+    private PointF mCenter;
+    private const int defaultSpan = 400;
+    private IController mController = null;
+    #endregion
 
-        /// <summary>
-        /// Gets the nodes of the graph. This is another casting of the shapes collection of the model.
-        /// </summary>
-        /// <value>The nodes.</value>
-        public CollectionBase<INode> Nodes
-        {
-            get { return graph.Nodes; }
-        }
+    #region Properties
 
-        /// <summary>
-        /// Gets the edges of the graph. This is just another casting of the connection collection of the model.
-        /// </summary>
-        /// <value>The edges.</value>
-        public CollectionBase<IEdge> Edges
-        {
-            get { return graph.Edges; }
-        }
+    /// <summary>
+    /// Gets the nodes of the graph. This is another casting of the shapes collection of the model.
+    /// </summary>
+    /// <value>The nodes.</value>
+    public CollectionBase<INode> Nodes {
+      get { return graph.Nodes; }
+    }
 
-        public IController Controller
-        {
-            get { return mController; }
-        }
+    /// <summary>
+    /// Gets the edges of the graph. This is just another casting of the connection collection of the model.
+    /// </summary>
+    /// <value>The edges.</value>
+    public CollectionBase<IEdge> Edges {
+      get { return graph.Edges; }
+    }
 
-        protected int DefaultRunSpan
-        {
-            get { return defaultSpan; }
-        }
-        
-        /// <summary>
-        /// Gets or sets the center of the layout. This can be the arithmetic middle
-        /// of the bounding area or can be set independently.
-        /// </summary>
-        public PointF Center
-        {
-            get { return mCenter; }
-            set { mCenter = value; }
-        }
+    public IController Controller {
+      get { return mController; }
+    }
 
-        public IGraph Graph
-        {
-            get { return graph; }
-            set { graph = value; }
-        }
-        /// <summary>
-        /// Gets or sets the bounds of the layout surface.
-        /// </summary>
-        /// <value>The bounds.</value>
-        public Rectangle Bounds
-        {
-            get { return mBounds; }
-            set { mBounds = value; }
-        
-        }
-        public string LayoutName
-        {
-            get { return mName; }
-        }
-        #endregion
+    protected int DefaultRunSpan {
+      get { return defaultSpan; }
+    }
 
-		#region Constructor
-        /// <summary>
-        /// Initializes a new instance of the <see cref="T:LayoutBase"/> class.
-        /// </summary>
-        /// <param name="name">The name.</param>
-        /// <param name="controller">The controller.</param>
-        protected LayoutBase(string name, IController controller ) : base(name)
-		{
-            mName = name;
-            mController = controller;
-		}
+    /// <summary>
+    /// Gets or sets the center of the layout. This can be the arithmetic middle
+    /// of the bounding area or can be set independently.
+    /// </summary>
+    public PointF Center {
+      get { return mCenter; }
+      set { mCenter = value; }
+    }
 
-		#endregion
+    public IGraph Graph {
+      get { return graph; }
+      set { graph = value; }
+    }
+    /// <summary>
+    /// Gets or sets the bounds of the layout surface.
+    /// </summary>
+    /// <value>The bounds.</value>
+    public Rectangle Bounds {
+      get { return mBounds; }
+      set { mBounds = value; }
 
-        #region Methods
-        protected void setX(INode item, INode referrer, double x)
-        {
+    }
+    public string LayoutName {
+      get { return mName; }
+    }
+    #endregion
 
-            //float sx = item.Rectangle.X;
-            //if(float.IsNaN(sx))
-            //    sx = (referrer != null ? referrer.Rectangle.X : x);
+    #region Constructor
+    /// <summary>
+    /// Initializes a new instance of the <see cref="T:LayoutBase"/> class.
+    /// </summary>
+    /// <param name="name">The name.</param>
+    /// <param name="controller">The controller.</param>
+    protected LayoutBase(string name, IController controller)
+      : base(name) {
+      mName = name;
+      mController = controller;
+    }
 
-            item.MoveBy(new Point(Convert.ToInt32(x - item.Rectangle.X), 0));
-            //Trace.WriteLine("setX(" + x + ",0)");
+    #endregion
 
-        }
-        protected void setY(INode item, INode referrer, double y)
-        {
+    #region Methods
+    protected void setX(INode item, INode referrer, double x) {
 
-            //float sx = item.Rectangle.X;
-            //if(float.IsNaN(sx))
-            //    sx = (referrer != null ? referrer.Rectangle.X : x);
+      //float sx = item.Rectangle.X;
+      //if(float.IsNaN(sx))
+      //    sx = (referrer != null ? referrer.Rectangle.X : x);
 
-            item.MoveBy(new Point(0, Convert.ToInt32(y - item.Rectangle.Y)));
-            //Trace.WriteLine("setY(0," + y +")");
-        }
-        #endregion
+      item.MoveBy(new Point(Convert.ToInt32(x - item.Rectangle.X), 0));
+      //Trace.WriteLine("setX(" + x + ",0)");
+
+    }
+    protected void setY(INode item, INode referrer, double y) {
+
+      //float sx = item.Rectangle.X;
+      //if(float.IsNaN(sx))
+      //    sx = (referrer != null ? referrer.Rectangle.X : x);
+
+      item.MoveBy(new Point(0, Convert.ToInt32(y - item.Rectangle.Y)));
+      //Trace.WriteLine("setY(0," + y +")");
+    }
+    #endregion
 
 
-      
-    }
+
+  }
 
 }
Index: /trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.Netron/3.0.2672.12446/Netron.Diagramming.Core-3.0.2672.12446/Layout/LayoutEnums.cs
===================================================================
--- /trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.Netron/3.0.2672.12446/Netron.Diagramming.Core-3.0.2672.12446/Layout/LayoutEnums.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.Netron/3.0.2672.12446/Netron.Diagramming.Core-3.0.2672.12446/Layout/LayoutEnums.cs	(revision 4068)
@@ -1,33 +1,28 @@
-using System;
-using System.Collections.Generic;
-using System.Text;
 
-namespace Netron.Diagramming.Core
-{
+namespace Netron.Diagramming.Core {
+  /// <summary>
+  /// The layout algorithms you can use to lay out a diagram
+  /// </summary>
+  public enum LayoutType {
     /// <summary>
-    /// The layout algorithms you can use to lay out a diagram
+    /// A layout based on embedding physical forces like springs and gravitation in the diagram.
     /// </summary>
-    public enum LayoutType
-    { 
-        /// <summary>
-        /// A layout based on embedding physical forces like springs and gravitation in the diagram.
-        /// </summary>
-        ForceDirected,
-        /// <summary>
-        /// The Fruchterman-Rheingold layout algorithm.
-        /// </summary>
-        FruchtermanRheingold,
-        /// <summary>
-        /// Children are layed out in shells around the root node.
-        /// </summary>
-        RadialTree,
-        /// <summary>
-        /// Children are layed out in shells around the parent node.
-        /// </summary>
-        Balloon,
-        /// <summary>
-        /// The classic hierarchical layout of tree-like data.
-        /// </summary>
-        ClassicTree
-    }
+    ForceDirected,
+    /// <summary>
+    /// The Fruchterman-Rheingold layout algorithm.
+    /// </summary>
+    FruchtermanRheingold,
+    /// <summary>
+    /// Children are layed out in shells around the root node.
+    /// </summary>
+    RadialTree,
+    /// <summary>
+    /// Children are layed out in shells around the parent node.
+    /// </summary>
+    Balloon,
+    /// <summary>
+    /// The classic hierarchical layout of tree-like data.
+    /// </summary>
+    ClassicTree
+  }
 }
Index: /trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.Netron/3.0.2672.12446/Netron.Diagramming.Core-3.0.2672.12446/Layout/LayoutSettings.cs
===================================================================
--- /trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.Netron/3.0.2672.12446/Netron.Diagramming.Core-3.0.2672.12446/Layout/LayoutSettings.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.Netron/3.0.2672.12446/Netron.Diagramming.Core-3.0.2672.12446/Layout/LayoutSettings.cs	(revision 4068)
@@ -1,44 +1,34 @@
-using System;
-using System.Collections.Generic;
-using System.Text;
 
-namespace Netron.Diagramming.Core.Layout
-{
-    public static class LayoutSettings
-    {
-        public static class TreeLayout
-        {
-            /// <summary>
-            /// Gets or sets the TreeOrientation of the standard/classic tree layout
-            /// </summary>
-            public static TreeOrientation TreeOrientation
-            {
-                get { return StandardTreeLayout.Orientation; }
-                set { StandardTreeLayout.Orientation = value; }
-            }
+namespace Netron.Diagramming.Core.Layout {
+  public static class LayoutSettings {
+    public static class TreeLayout {
+      /// <summary>
+      /// Gets or sets the TreeOrientation of the standard/classic tree layout
+      /// </summary>
+      public static TreeOrientation TreeOrientation {
+        get { return StandardTreeLayout.Orientation; }
+        set { StandardTreeLayout.Orientation = value; }
+      }
 
-            /// <summary>
-            /// Gets or sets the spacing between siblings.
-            /// </summary>
-            public static float BreadthSpacing
-            {
-                get { return StandardTreeLayout.BreadthSpacing;}
-                set { StandardTreeLayout.BreadthSpacing = value; }
-            }
-            /// <summary>
-            /// Gets or sets the spacing between parent-child.
-            /// </summary>
-            public static float DepthSpacing
-            {
-                get { return StandardTreeLayout.DepthSpacing;}
-                set { StandardTreeLayout.DepthSpacing = value; }
-            }
+      /// <summary>
+      /// Gets or sets the spacing between siblings.
+      /// </summary>
+      public static float BreadthSpacing {
+        get { return StandardTreeLayout.BreadthSpacing; }
+        set { StandardTreeLayout.BreadthSpacing = value; }
+      }
+      /// <summary>
+      /// Gets or sets the spacing between parent-child.
+      /// </summary>
+      public static float DepthSpacing {
+        get { return StandardTreeLayout.DepthSpacing; }
+        set { StandardTreeLayout.DepthSpacing = value; }
+      }
 
-            public static float SubTreeSpacing
-            {
-                get { return StandardTreeLayout.SubTreeSpacing; }
-                set { StandardTreeLayout.SubTreeSpacing = value; }
-            }
-        }
+      public static float SubTreeSpacing {
+        get { return StandardTreeLayout.SubTreeSpacing; }
+        set { StandardTreeLayout.SubTreeSpacing = value; }
+      }
     }
+  }
 }
Index: /trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.Netron/3.0.2672.12446/Netron.Diagramming.Core-3.0.2672.12446/Layout/RadialTreeLayout.cs
===================================================================
--- /trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.Netron/3.0.2672.12446/Netron.Diagramming.Core-3.0.2672.12446/Layout/RadialTreeLayout.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.Netron/3.0.2672.12446/Netron.Diagramming.Core-3.0.2672.12446/Layout/RadialTreeLayout.cs	(revision 4068)
@@ -1,352 +1,311 @@
 using System;
-using System.Diagnostics;
+using System.Collections.Generic;
+using System.ComponentModel;
+using System.Drawing;
 using Netron.Diagramming.Core.Analysis;
-using System.Drawing;
-using System.Collections.Generic;
-using System.Text;
-using System.Windows.Forms;
-using System.ComponentModel;
-
-namespace Netron.Diagramming.Core
-{
+
+namespace Netron.Diagramming.Core {
+  /// <summary>
+  /// <para>TreeLayout instance that computes a radial layout, laying out subsequent
+  ///  depth levels of a tree on circles of progressively increasing radius.
+  ///  </para>
+  ///  
+  ///  <para>The algorithm used is that of Ka-Ping Yee, Danyel Fisher, Rachna Dhamija,
+  ///  and Marti Hearst in their research paper
+  ///  <a href="http://citeseer.ist.psu.edu/448292.html">Animated Exploration of
+  ///  Dynamic Graphs with Radial Layout</a>, InfoVis 2001. This algorithm computes
+  ///  a radial layout which factors in possible variation in sizes, and maintains
+  ///  both orientation and ordering constraints to facilitate smooth and
+  ///  understandable transitions between layout configurations.
+  ///  </para>
+  /// </summary>
+  class RadialTreeLayout : TreeLayoutBase {
+    #region Fields
+    public static int DEFAULT_RADIUS = 550;
+    private static int MARGIN = 30;
+
+    protected int m_maxDepth = 0;
+    protected double m_radiusInc;
+    protected double m_theta1, m_theta2;
+    protected bool m_setTheta = false;
+    protected bool m_autoScale = true;
+
+    protected PointF m_origin;
+    protected INode m_prevRoot;
+    private Dictionary<string, Params> Pars;
+    BackgroundWorker worker;
+    #endregion
+
+    #region Properties
+
+
     /// <summary>
-    /// <para>TreeLayout instance that computes a radial layout, laying out subsequent
-    ///  depth levels of a tree on circles of progressively increasing radius.
-    ///  </para>
-    ///  
-    ///  <para>The algorithm used is that of Ka-Ping Yee, Danyel Fisher, Rachna Dhamija,
-    ///  and Marti Hearst in their research paper
-    ///  <a href="http://citeseer.ist.psu.edu/448292.html">Animated Exploration of
-    ///  Dynamic Graphs with Radial Layout</a>, InfoVis 2001. This algorithm computes
-    ///  a radial layout which factors in possible variation in sizes, and maintains
-    ///  both orientation and ordering constraints to facilitate smooth and
-    ///  understandable transitions between layout configurations.
-    ///  </para>
+    /// Gets or sets the RadiusIncrement
     /// </summary>
-    class RadialTreeLayout : TreeLayoutBase
-    {
-        #region Fields
-        public static int DEFAULT_RADIUS = 550;
-        private static int MARGIN = 30;
-
-        protected int m_maxDepth = 0;
-        protected double m_radiusInc;
-        protected double m_theta1, m_theta2;
-        protected bool m_setTheta = false;
-        protected bool m_autoScale = true;
-
-        protected PointF m_origin;
-        protected INode m_prevRoot;
-        private Dictionary<string, Params> Pars;
-        BackgroundWorker worker;
-        #endregion
-
-        #region Properties
-
-
-        /// <summary>
-        /// Gets or sets the RadiusIncrement
-        /// </summary>
-        public double RadiusIncrement
-        {
-            get { return m_radiusInc; }
-            set { m_radiusInc = value; }
+    public double RadiusIncrement {
+      get { return m_radiusInc; }
+      set { m_radiusInc = value; }
+    }
+
+    public bool AutoScale {
+      get { return m_autoScale; }
+      set { m_autoScale = value; }
+    }
+
+    #endregion
+
+    #region Constructor
+    ///<summary>
+    ///Default constructor
+    ///</summary>
+    public RadialTreeLayout(IController controller)
+      : base("Radial TreeLayout", controller) {
+    }
+    private bool Init() {
+      m_radiusInc = DEFAULT_RADIUS;
+      m_prevRoot = null;
+      m_theta1 = 0;
+      m_theta2 = m_theta1 + Math.PI * 2;
+
+      this.Graph = this.Model as IGraph;
+
+      if (Graph == null)
+        throw new InconsistencyException("The model has not been set and the Graph property is hence 'null'");
+
+      this.LayoutRoot = this.Controller.Model.LayoutRoot;//could be null if not set in the GUI
+      Graph.ClearSpanningTree();
+      Graph.MakeSpanningTree(LayoutRoot as INode);
+
+      Pars = new Dictionary<string, Params>();
+      if (Graph.Nodes.Count == 0)
+        return false;
+      if (Graph.Edges.Count == 0) //this layout is base on embedded springs in the connections
+        return false;
+
+
+      Params par;
+
+      foreach (INode node in Graph.Nodes) {
+        par = new Params();
+        Pars.Add(node.Uid.ToString(), par);
+      }
+      return true;
+    }
+    #endregion
+
+    #region Methods
+    public void setAngularBounds(double theta, double width) {
+      m_theta1 = theta;
+      m_theta2 = theta + width;
+      m_setTheta = true;
+    }
+
+    private void Layout() {
+
+
+      INode n = LayoutRoot as INode;
+      Params np = Pars[n.Uid.ToString()];
+      // calc relative widths and maximum tree depth
+      // performs one pass over the tree
+      m_maxDepth = 0;
+      calcAngularWidth(n, 0);
+
+      if (m_autoScale) setScale(Bounds);
+      if (!m_setTheta) calcAngularBounds(n);
+
+      // perform the layout
+      if (m_maxDepth > 0)
+        layout(n, m_radiusInc, m_theta1, m_theta2);
+
+      // update properties of the root node
+      setX(n, null, m_origin.X);
+      setY(n, null, m_origin.Y);
+      np.angle = m_theta2 - m_theta1;
+    }
+
+    protected void setScale(RectangleF bounds) {
+      double r = Math.Min(Bounds.Width, Bounds.Height) / 2.0D;
+      if (m_maxDepth > 0)
+        m_radiusInc = 3 * (r - MARGIN) / m_maxDepth;
+    }
+    private void calcAngularBounds(INode r) {
+      if (m_prevRoot == null || r == m_prevRoot)             //|| !m_prevRoot.isValid() 
+            {
+        m_prevRoot = r;
+        return;
+      }
+
+      // try to find previous parent of root
+      INode p = m_prevRoot;
+      while (true) {
+        INode pp = (INode)p.ParentNode;
+        if (pp == r) {
+          break;
+        } else if (pp == null) {
+          m_prevRoot = r;
+          return;
         }
-
-        public bool AutoScale
-        {
-            get { return m_autoScale; }
-            set { m_autoScale = value; }
+        p = pp;
+      }
+
+      // compute offset due to children's angular width
+      double dt = 0;
+      CollectionBase<INode> iter = sortedChildren(r);
+      foreach (INode n in iter) {
+        if (n == p) break;
+        dt += Pars[n.Uid.ToString()].width;
+      }
+      double rw = Pars[r.Uid.ToString()].width;
+      double pw = Pars[p.Uid.ToString()].width;
+      dt = -Math.PI * 2 * (dt + pw / 2) / rw;
+
+      // set angular bounds
+      m_theta1 = dt + Math.Atan2(p.Y - r.Y, p.X - r.X);
+      m_theta2 = m_theta1 + Math.PI * 2;
+      m_prevRoot = r;
+    }
+    private double calcAngularWidth(INode n, int d) {
+      if (d > m_maxDepth) m_maxDepth = d;
+      double aw = 0;
+
+      RectangleF bounds = n.Rectangle;
+      double w = Bounds.Width, h = Bounds.Height;
+      double diameter = d == 0 ? 0 : Math.Sqrt(w * w + h * h) / d;
+
+      if (n.IsExpanded && n.ChildCount > 0) {
+
+        foreach (INode c in n.Children) {
+          aw += calcAngularWidth(c, d + 1);
         }
-
-        #endregion
-
-        #region Constructor
-        ///<summary>
-        ///Default constructor
-        ///</summary>
-        public RadialTreeLayout(IController controller)
-            : base("Radial TreeLayout", controller)
-        {
+        aw = Math.Max(diameter, aw);
+      } else {
+        aw = diameter;
+      }
+      Pars[n.Uid.ToString()].width = aw;
+      return aw;
+    }
+
+    private static double normalize(double angle) {
+      while (angle > Math.PI * 2) {
+        angle -= Math.PI * 2;
+      }
+      while (angle < 0) {
+        angle += Math.PI * 2;
+      }
+      return angle;
+    }
+
+    private CollectionBase<INode> sortedChildren(INode n) {
+      double basevalue = 0;
+      // update basevalue angle for node ordering
+      INode p = n.ParentNode;
+      if (p != null) {
+        basevalue = normalize(Math.Atan2(p.Y - n.Y, p.X - n.X));
+      }
+      int cc = n.ChildCount;
+      if (cc == 0) return null;
+
+      INode c = (INode)n.FirstChild;
+
+      // TODO: this is hacky and will break when filtering
+      // how to know that a branch is newly expanded?
+      // is there an alternative property we should check?
+      //if ( !c.isStartVisible() ) 
+      //{
+      //    // use natural ordering for previously invisible nodes
+      //    return n.Children;
+      //}
+
+
+
+      double[] angle = new double[cc];
+      int[] idx = new int[cc];
+      for (int i = 0; i < cc; ++i, c = c.NextSibling) {
+        idx[i] = i;
+        angle[i] = normalize(-basevalue + Math.Atan2(c.Y - n.Y, c.X - n.X));
+      }
+
+      Array.Sort(angle, idx);//or is it the other way around
+      CollectionBase<INode> col = new CollectionBase<INode>();
+      CollectionBase<INode> children = n.Children;
+      for (int i = 0; i < cc; ++i) {
+        col.Add(children[idx[i]]);
+      }
+      return col;
+
+      // return iterator over sorted children
+      //return new Iterator() {
+      //    int cur = 0;
+      //    public Object next() {
+      //        return n.getChild(idx[cur++]);
+      //    }
+      //    public bool hasNext() {
+      //        return cur < idx.Length;
+      //    }
+      //    public void remove() {
+      //        throw new UnsupportedOperationException();
+      //    }
+      //};
+    }
+    protected void layout(INode n, double r, double theta1, double theta2) {
+      double dtheta = (theta2 - theta1);
+      double dtheta2 = dtheta / 2.0;
+      double width = Pars[n.Uid.ToString()].width;
+      double cfrac, nfrac = 0.0;
+      foreach (INode c in sortedChildren(n)) {
+        Params cp = Pars[c.Uid.ToString()];
+        cfrac = cp.width / width;
+        if (c.IsExpanded && c.ChildCount > 0) {
+          layout(c, r + m_radiusInc, theta1 + nfrac * dtheta, theta1 + (nfrac + cfrac) * dtheta);
         }
-        private bool Init()
-        {
-            m_radiusInc = DEFAULT_RADIUS;
-            m_prevRoot = null;
-            m_theta1 = 0;
-            m_theta2 = m_theta1 + Math.PI * 2;
-
-            this.Graph = this.Model as IGraph;
-
-            if (Graph == null)
-                throw new InconsistencyException("The model has not been set and the Graph property is hence 'null'");
-
-            this.LayoutRoot = this.Controller.Model.LayoutRoot;//could be null if not set in the GUI
-            Graph.ClearSpanningTree();
-            Graph.MakeSpanningTree(LayoutRoot as INode);
-
-            Pars = new Dictionary<string, Params>();
-            if (Graph.Nodes.Count == 0)
-                return false;
-            if (Graph.Edges.Count == 0) //this layout is base on embedded springs in the connections
-                return false;
-
-
-            Params par;
-
-            foreach (INode node in Graph.Nodes)
-            {
-                par = new Params();
-                Pars.Add(node.Uid.ToString(), par);
-            }
-            return true;
-        }
-        #endregion
-
-        #region Methods
-        public void setAngularBounds(double theta, double width)
-        {
-            m_theta1 = theta;
-            m_theta2 = theta + width;
-            m_setTheta = true;
-        }
-
-        private void Layout()
-        {
-
-
-            INode n = LayoutRoot as INode;
-            Params np = Pars[n.Uid.ToString()];
-            // calc relative widths and maximum tree depth
-            // performs one pass over the tree
-            m_maxDepth = 0;
-            calcAngularWidth(n, 0);
-
-            if (m_autoScale) setScale(Bounds);
-            if (!m_setTheta) calcAngularBounds(n);
-
-            // perform the layout
-            if (m_maxDepth > 0)
-                layout(n, m_radiusInc, m_theta1, m_theta2);
-
-            // update properties of the root node
-            setX(n, null, m_origin.X);
-            setY(n, null, m_origin.Y);
-            np.angle = m_theta2 - m_theta1;
-        }
-
-        protected void setScale(RectangleF bounds)
-        {
-            double r = Math.Min(Bounds.Width, Bounds.Height) / 2.0D;
-            if (m_maxDepth > 0)
-                m_radiusInc = 3 * (r - MARGIN) / m_maxDepth;
-        }
-        private void calcAngularBounds(INode r)
-        {
-            if (m_prevRoot == null || r == m_prevRoot)             //|| !m_prevRoot.isValid() 
-            {
-                m_prevRoot = r;
-                return;
-            }
-
-            // try to find previous parent of root
-            INode p = m_prevRoot;
-            while (true)
-            {
-                INode pp = (INode)p.ParentNode;
-                if (pp == r)
-                {
-                    break;
-                }
-                else if (pp == null)
-                {
-                    m_prevRoot = r;
-                    return;
-                }
-                p = pp;
-            }
-
-            // compute offset due to children's angular width
-            double dt = 0;
-            CollectionBase<INode> iter = sortedChildren(r);
-            foreach (INode n in iter)
-            {
-                if (n == p) break;
-                dt += Pars[n.Uid.ToString()].width;
-            }
-            double rw = Pars[r.Uid.ToString()].width;
-            double pw = Pars[p.Uid.ToString()].width;
-            dt = -Math.PI * 2 * (dt + pw / 2) / rw;
-
-            // set angular bounds
-            m_theta1 = dt + Math.Atan2(p.Y - r.Y, p.X - r.X);
-            m_theta2 = m_theta1 + Math.PI * 2;
-            m_prevRoot = r;
-        }
-        private double calcAngularWidth(INode n, int d)
-        {
-            if (d > m_maxDepth) m_maxDepth = d;
-            double aw = 0;
-
-            RectangleF bounds = n.Rectangle;
-            double w = Bounds.Width, h = Bounds.Height;
-            double diameter = d == 0 ? 0 : Math.Sqrt(w * w + h * h) / d;
-
-            if (n.IsExpanded && n.ChildCount > 0)
-            {
-
-                foreach (INode c in n.Children)
-                {
-                    aw += calcAngularWidth(c, d + 1);
-                }
-                aw = Math.Max(diameter, aw);
-            }
-            else
-            {
-                aw = diameter;
-            }
-            Pars[n.Uid.ToString()].width = aw;
-            return aw;
-        }
-
-        private static double normalize(double angle)
-        {
-            while (angle > Math.PI * 2)
-            {
-                angle -= Math.PI * 2;
-            }
-            while (angle < 0)
-            {
-                angle += Math.PI * 2;
-            }
-            return angle;
-        }
-
-        private CollectionBase<INode> sortedChildren(INode n)
-        {
-            double basevalue = 0;
-            // update basevalue angle for node ordering
-            INode p = n.ParentNode;
-            if (p != null)
-            {
-                basevalue = normalize(Math.Atan2(p.Y - n.Y, p.X - n.X));
-            }
-            int cc = n.ChildCount;
-            if (cc == 0) return null;
-
-            INode c = (INode)n.FirstChild;
-
-            // TODO: this is hacky and will break when filtering
-            // how to know that a branch is newly expanded?
-            // is there an alternative property we should check?
-            //if ( !c.isStartVisible() ) 
-            //{
-            //    // use natural ordering for previously invisible nodes
-            //    return n.Children;
-            //}
-
-
-
-            double[] angle = new double[cc];
-            int[] idx = new int[cc];
-            for (int i = 0; i < cc; ++i, c = c.NextSibling)
-            {
-                idx[i] = i;
-                angle[i] = normalize(-basevalue + Math.Atan2(c.Y - n.Y, c.X - n.X));
-            }
-
-            Array.Sort(angle, idx);//or is it the other way around
-            CollectionBase<INode> col = new CollectionBase<INode>();
-            CollectionBase<INode> children = n.Children;
-            for (int i = 0; i < cc; ++i)
-            {
-                col.Add(children[idx[i]]);
-            }
-            return col;
-
-            // return iterator over sorted children
-            //return new Iterator() {
-            //    int cur = 0;
-            //    public Object next() {
-            //        return n.getChild(idx[cur++]);
-            //    }
-            //    public bool hasNext() {
-            //        return cur < idx.Length;
-            //    }
-            //    public void remove() {
-            //        throw new UnsupportedOperationException();
-            //    }
-            //};
-        }
-        protected void layout(INode n, double r, double theta1, double theta2)
-        {
-            double dtheta = (theta2 - theta1);
-            double dtheta2 = dtheta / 2.0;
-            double width = Pars[n.Uid.ToString()].width;
-            double cfrac, nfrac = 0.0;
-            foreach (INode c in sortedChildren(n))
-            {
-                Params cp = Pars[c.Uid.ToString()];
-                cfrac = cp.width / width;
-                if (c.IsExpanded && c.ChildCount > 0)
-                {
-                    layout(c, r + m_radiusInc, theta1 + nfrac * dtheta, theta1 + (nfrac + cfrac) * dtheta);
-                }
-                setPolarLocation(c, n, r, theta1 + nfrac * dtheta + cfrac * dtheta2);
-                cp.angle = cfrac * dtheta;
-                nfrac += cfrac;
-            }
-
-        }
-        protected void setPolarLocation(INode n, INode p, double r, double t)
-        {
-            setX(n, p, m_origin.X + r * Math.Cos(t));
-            setY(n, p, m_origin.Y + r * Math.Sin(t));
-        }
-        public override void Run()
-        {
-            Run(2000);
-        }
-        public override void Run(int time)
-        {
-            worker = new BackgroundWorker();
-            worker.DoWork += new DoWorkEventHandler(worker_DoWork);
-            worker.RunWorkerAsync(time);
-        }
-
-        public override void Stop()
-        {
-            if (worker != null && worker.IsBusy)
-                worker.CancelAsync();
-        }
-
-        private void worker_DoWork(object sender, DoWorkEventArgs e)
-        {
-            this.Controller.View.Suspend();
-            Init();
-            Layout();
-            this.Controller.View.Resume();
-        }
-
-
-        #endregion
-
-        /// <summary>
-        /// Paramter blob to temporarily keep working data of one node.
-        /// </summary>
-        class Params
-        {
-            public double width = 0;
-            public double angle = 0;
-            public Object clone()
-            {
-                Params p = new Params();
-                p.width = this.width;
-                p.angle = this.angle;
-                return p;
-            }
-        }
-
-    }
+        setPolarLocation(c, n, r, theta1 + nfrac * dtheta + cfrac * dtheta2);
+        cp.angle = cfrac * dtheta;
+        nfrac += cfrac;
+      }
+
+    }
+    protected void setPolarLocation(INode n, INode p, double r, double t) {
+      setX(n, p, m_origin.X + r * Math.Cos(t));
+      setY(n, p, m_origin.Y + r * Math.Sin(t));
+    }
+    public override void Run() {
+      Run(2000);
+    }
+    public override void Run(int time) {
+      worker = new BackgroundWorker();
+      worker.DoWork += new DoWorkEventHandler(worker_DoWork);
+      worker.RunWorkerAsync(time);
+    }
+
+    public override void Stop() {
+      if (worker != null && worker.IsBusy)
+        worker.CancelAsync();
+    }
+
+    private void worker_DoWork(object sender, DoWorkEventArgs e) {
+      this.Controller.View.Suspend();
+      Init();
+      Layout();
+      this.Controller.View.Resume();
+    }
+
+
+    #endregion
+
+    /// <summary>
+    /// Paramter blob to temporarily keep working data of one node.
+    /// </summary>
+    class Params {
+      public double width = 0;
+      public double angle = 0;
+      public Object clone() {
+        Params p = new Params();
+        p.width = this.width;
+        p.angle = this.angle;
+        return p;
+      }
+    }
+
+  }
 
 }
Index: /trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.Netron/3.0.2672.12446/Netron.Diagramming.Core-3.0.2672.12446/Layout/RandomLayout.cs
===================================================================
--- /trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.Netron/3.0.2672.12446/Netron.Diagramming.Core-3.0.2672.12446/Layout/RandomLayout.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.Netron/3.0.2672.12446/Netron.Diagramming.Core-3.0.2672.12446/Layout/RandomLayout.cs	(revision 4068)
@@ -1,131 +1,115 @@
 using System;
 using System.Collections.Generic;
-using System.Text;
+using System.ComponentModel;
 using System.Drawing;
-using System.Threading;
-using System.ComponentModel;
-namespace Netron.Diagramming.Core
-{
-    /// <summary>
-    /// This layout places nodes inside the visible area at a random location. The animation generated by this layout
-    /// allows you to see how nodes move from one location to another. Although it seems this layout does not
-    /// generate a clean organization is does help to perceive information in different perspectives and can be at times
-    /// really useful.
-    /// </summary>
-    class RandomLayout : LayoutBase
-    {
-        #region Fields
-        
-        private const double speed = 0.1D;
+namespace Netron.Diagramming.Core {
+  /// <summary>
+  /// This layout places nodes inside the visible area at a random location. The animation generated by this layout
+  /// allows you to see how nodes move from one location to another. Although it seems this layout does not
+  /// generate a clean organization is does help to perceive information in different perspectives and can be at times
+  /// really useful.
+  /// </summary>
+  class RandomLayout : LayoutBase {
+    #region Fields
 
-        private Random rnd;
-        double vectorx;
-        double vectory;
+    private const double speed = 0.1D;
 
-        CollectionBase<IDiagramEntity> entities;
-        Dictionary<IDiagramEntity, SpeedVector> speeds;
-        int width;
-        int height;
-        int x, y;
-        int time;
-        BackgroundWorker worker;
-        #endregion
+    private Random rnd;
+    double vectorx;
+    double vectory;
 
-        #region Constructor
-        ///<summary>
-        ///Default constructor
-        ///</summary>
-        public RandomLayout(IController controller)
-            : base("Random layout", controller)
-        {
-        }
-        #endregion
+    CollectionBase<IDiagramEntity> entities;
+    Dictionary<IDiagramEntity, SpeedVector> speeds;
+    int width;
+    int height;
+    int x, y;
+    int time;
+    BackgroundWorker worker;
+    #endregion
 
-        #region Methods
+    #region Constructor
+    ///<summary>
+    ///Default constructor
+    ///</summary>
+    public RandomLayout(IController controller)
+      : base("Random layout", controller) {
+    }
+    #endregion
 
-      
-
-        /// <summary>
-        /// Runs this instance.
-        /// </summary>
-        public override void Run()
-        {
-            width = this.Bounds.Width;
-            height = this.Bounds.Height;
-            Run(DefaultRunSpan);
+    #region Methods
 
 
+
+    /// <summary>
+    /// Runs this instance.
+    /// </summary>
+    public override void Run() {
+      width = this.Bounds.Width;
+      height = this.Bounds.Height;
+      Run(DefaultRunSpan);
+
+
+    }
+    /// <summary>
+    /// Stops this instance.
+    /// </summary>
+    public override void Stop() {
+      if (worker != null && worker.IsBusy)
+        worker.CancelAsync();
+    }
+    /// <summary>
+    /// Runs the layout for a specified time.
+    /// </summary>
+    /// <param name="time">The time.</param>
+    public override void Run(int time) {
+      rnd = new Random();
+      entities = this.Model.CurrentPage.DefaultLayer.Entities;
+      speeds = new Dictionary<IDiagramEntity, SpeedVector>();
+      foreach (IDiagramEntity entity in entities) {
+
+        if (entity is IShape) {
+          vectorx = -20 + 40 * rnd.NextDouble();
+          vectory = -20 + 40 * rnd.NextDouble();
+          speeds.Add(entity, new SpeedVector(vectorx, vectory));
         }
-        /// <summary>
-        /// Stops this instance.
-        /// </summary>
-        public override void Stop()
-        {
-            if (worker != null && worker.IsBusy)
-                worker.CancelAsync();
+      }
+
+      this.time = time;
+      worker = new BackgroundWorker();
+      worker.DoWork += new DoWorkEventHandler(worker_DoWork);
+      worker.RunWorkerAsync(time);
+
+    }
+
+    void worker_DoWork(object sender, DoWorkEventArgs e) {
+      DateTime start = DateTime.Now;
+      while (DateTime.Now < start.AddMilliseconds((int)e.Argument)) {
+        RunStep();
+      }
+
+    }
+
+    /// <summary>
+    /// Runs a single step.
+    /// </summary>
+    private void RunStep() {
+      lock (entities)
+        lock (speeds) {
+          foreach (IDiagramEntity entity in entities) {
+
+            if (entity is IShape) {
+
+              x = Convert.ToInt32(speed * speeds[entity].X);
+              y = Convert.ToInt32(speed * speeds[entity].Y);
+              if (entity.Rectangle.X + x < width - entity.Rectangle.Width - 10 && entity.Rectangle.X + x > 10 && entity.Rectangle.Y + y < height - entity.Rectangle.Height - 10 && entity.Rectangle.Y + y > 10)
+                entity.MoveBy(new Point(x, y));
+            }
+          }
         }
-        /// <summary>
-        /// Runs the layout for a specified time.
-        /// </summary>
-        /// <param name="time">The time.</param>
-        public override void Run(int time)
-        {
-            rnd = new Random();
-            entities = this.Model.CurrentPage.DefaultLayer.Entities;
-            speeds = new Dictionary<IDiagramEntity, SpeedVector>();
-            foreach (IDiagramEntity entity in entities)
-            {
+    }
 
-                if (entity is IShape)
-                {
-                    vectorx = -20 + 40 * rnd.NextDouble();
-                    vectory = -20 + 40 * rnd.NextDouble();
-                    speeds.Add(entity, new SpeedVector(vectorx, vectory));
-                }
-            }
 
-            this.time = time;
-            worker = new BackgroundWorker();
-            worker.DoWork += new DoWorkEventHandler(worker_DoWork);
-            worker.RunWorkerAsync(time);
 
-        }
-
-        void worker_DoWork(object sender, DoWorkEventArgs e)
-        {
-            DateTime start = DateTime.Now;
-            while (DateTime.Now < start.AddMilliseconds((int)e.Argument))
-            {
-                RunStep();
-            }
-
-        }
-
-        /// <summary>
-        /// Runs a single step.
-        /// </summary>
-        private void RunStep()
-        {
-            lock (entities)
-                lock (speeds)
-                {
-                    foreach (IDiagramEntity entity in entities)
-                    {
-
-                        if (entity is IShape)
-                        {
-
-                            x = Convert.ToInt32(speed * speeds[entity].X);
-                            y = Convert.ToInt32(speed * speeds[entity].Y);
-                            if (entity.Rectangle.X + x < width - entity.Rectangle.Width - 10 && entity.Rectangle.X + x > 10 && entity.Rectangle.Y + y < height - entity.Rectangle.Height - 10 && entity.Rectangle.Y + y > 10)
-                                entity.MoveBy(new Point(x, y));
-                        }
-                    }
-                }
-        }
-
-       
-
-        #endregion
-    }
+    #endregion
+  }
 }
Index: /trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.Netron/3.0.2672.12446/Netron.Diagramming.Core-3.0.2672.12446/Layout/SpeedVector.cs
===================================================================
--- /trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.Netron/3.0.2672.12446/Netron.Diagramming.Core-3.0.2672.12446/Layout/SpeedVector.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.Netron/3.0.2672.12446/Netron.Diagramming.Core-3.0.2672.12446/Layout/SpeedVector.cs	(revision 4068)
@@ -1,22 +1,16 @@
-using System;
-using System.Collections.Generic;
-using System.Text;
 using System.Drawing;
 
-namespace Netron.Diagramming.Core
-{
-    /// <summary>
-    /// SpeedVector vector. 
-    /// Is just like a <see cref="Point"/> but the data type has double precision.
-    /// </summary>
-    struct SpeedVector
-    {
-        public double X;
-        public double Y;
-        public SpeedVector(double speedx, double speedy)
-        {
-            this.X = speedx;
-            this.Y = speedy;
-        }
+namespace Netron.Diagramming.Core {
+  /// <summary>
+  /// SpeedVector vector. 
+  /// Is just like a <see cref="Point"/> but the data type has double precision.
+  /// </summary>
+  struct SpeedVector {
+    public double X;
+    public double Y;
+    public SpeedVector(double speedx, double speedy) {
+      this.X = speedx;
+      this.Y = speedy;
     }
+  }
 }
Index: /trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.Netron/3.0.2672.12446/Netron.Diagramming.Core-3.0.2672.12446/Layout/StandardTreeLayout.cs
===================================================================
--- /trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.Netron/3.0.2672.12446/Netron.Diagramming.Core-3.0.2672.12446/Layout/StandardTreeLayout.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.Netron/3.0.2672.12446/Netron.Diagramming.Core-3.0.2672.12446/Layout/StandardTreeLayout.cs	(revision 4068)
@@ -1,541 +1,476 @@
 using System;
-using System.Diagnostics;
+using System.Collections.Generic;
+using System.ComponentModel;
+using System.Drawing;
 using Netron.Diagramming.Core.Analysis;
-using System.Drawing;
-using System.Collections.Generic;
-using System.Text;
-using System.Windows.Forms;
-using System.ComponentModel;
-namespace Netron.Diagramming.Core
-{
-    /// <summary>
-    /// <para>TreeLayout that computes a tidy layout of a node-link tree
-    ///  diagram. This algorithm lays out a rooted tree such that each
-    ///  depth level of the tree is on a shared line. The orientation of the
-    ///  tree can be set such that the tree goes left-to-right (default),
-    ///  right-to-left, top-to-bottom, or bottom-to-top.</para>
-    ///  
-    ///  <para>The algorithm used is that of Christoph Buchheim, Michael Jünger,
-    ///  and Sebastian Leipert from their research paper
-    ///  <a href="http://citeseer.ist.psu.edu/buchheim02improving.html">
-    ///  Improving Walker's Algorithm to Run in Linear Time</a>, Graph Drawing 2002.
-    ///  This algorithm corrects performance issues in Walker's algorithm, which
-    ///  generalizes Reingold and Tilford's method for tidy drawings of trees to
-    ///  support trees with an arbitrary number of children at any given node.</para>
-    /// </summary>
-    class StandardTreeLayout : TreeLayoutBase
-    {
-
-        
-
-        #region Fields
-        BackgroundWorker worker;
-        private static TreeOrientation mOrientation = TreeOrientation.TopBottom;  // the orientation of the tree
-        private static float mBreadth = 50F;   // the spacing between sibling nodes
-        private static float mSubTreeSpacing = 50F;  // the spacing between subtrees
-        private static float mDepth = 50F;  // the spacing between depth levels
-        private float m_offset = 50;  // pixel offset for root node position
-        private PointF m_anchor;
-        private PointF m_tmpa;
-        private float[] m_depths = new float[10];
-        private int mMaxDepth = 0;
-        private Dictionary<string, Params> Pars;
-        private float m_ax, m_ay; // for holding anchor co-ordinates
-        #endregion
-
-        #region Properties
-        /// <summary>
-        /// Gets or sets the orientation of the tree.
-        /// </summary>
-        /// <value>The orientation.</value>
-        public static TreeOrientation Orientation
-        {
-            get
+namespace Netron.Diagramming.Core {
+  /// <summary>
+  /// <para>TreeLayout that computes a tidy layout of a node-link tree
+  ///  diagram. This algorithm lays out a rooted tree such that each
+  ///  depth level of the tree is on a shared line. The orientation of the
+  ///  tree can be set such that the tree goes left-to-right (default),
+  ///  right-to-left, top-to-bottom, or bottom-to-top.</para>
+  ///  
+  ///  <para>The algorithm used is that of Christoph Buchheim, Michael Jünger,
+  ///  and Sebastian Leipert from their research paper
+  ///  <a href="http://citeseer.ist.psu.edu/buchheim02improving.html">
+  ///  Improving Walker's Algorithm to Run in Linear Time</a>, Graph Drawing 2002.
+  ///  This algorithm corrects performance issues in Walker's algorithm, which
+  ///  generalizes Reingold and Tilford's method for tidy drawings of trees to
+  ///  support trees with an arbitrary number of children at any given node.</para>
+  /// </summary>
+  class StandardTreeLayout : TreeLayoutBase {
+
+
+
+    #region Fields
+    BackgroundWorker worker;
+    private static TreeOrientation mOrientation = TreeOrientation.TopBottom;  // the orientation of the tree
+    private static float mBreadth = 50F;   // the spacing between sibling nodes
+    private static float mSubTreeSpacing = 50F;  // the spacing between subtrees
+    private static float mDepth = 50F;  // the spacing between depth levels
+    private float m_offset = 50;  // pixel offset for root node position
+    private PointF m_anchor;
+    private PointF m_tmpa;
+    private float[] m_depths = new float[10];
+    private int mMaxDepth = 0;
+    private Dictionary<string, Params> Pars;
+    private float m_ax, m_ay; // for holding anchor co-ordinates
+    #endregion
+
+    #region Properties
+    /// <summary>
+    /// Gets or sets the orientation of the tree.
+    /// </summary>
+    /// <value>The orientation.</value>
+    public static TreeOrientation Orientation {
+      get {
+        return mOrientation;
+      }
+      set {
+        mOrientation = value;
+      }
+    }
+    /// <summary>
+    /// Gets or sets the depth spacing.
+    /// </summary>
+    /// <value>The depth spacing.</value>
+    public static float DepthSpacing {
+      get { return mDepth; }
+      set { mDepth = value; }
+    }
+
+    /// <summary>
+    /// Gets or sets the breadth spacing.
+    /// </summary>
+    /// <value>The breadth spacing.</value>
+    public static float BreadthSpacing {
+      get { return mBreadth; }
+      set { mBreadth = value; }
+    }
+    /// <summary>
+    /// Gets or sets the spacing between subtrees.
+    /// </summary>
+    /// <value>The sub tree spacing.</value>
+    public static float SubTreeSpacing {
+      get { return mSubTreeSpacing; }
+      set { mSubTreeSpacing = value; }
+
+    }
+
+    public float RootOffset {
+      get { return m_offset; }
+      set { m_offset = value; }
+    }
+
+    #endregion
+
+    #region Constructor
+    public StandardTreeLayout(IController controller)
+      : base("Standard TreeLayout", controller) {
+
+      Orientation = TreeOrientation.LeftRight;
+
+    }
+    #endregion
+
+    #region Methods
+
+    public override void Run() {
+      Run(2000);
+    }
+    public override void Run(int time) {
+      if (worker != null && worker.IsBusy)
+        worker.CancelAsync();
+      worker = new BackgroundWorker();
+      worker.WorkerSupportsCancellation = true;
+      worker.DoWork += new DoWorkEventHandler(worker_DoWork);
+      worker.RunWorkerAsync(time);
+    }
+
+    public override void Stop() {
+      if (worker != null && worker.IsBusy)
+        worker.CancelAsync();
+    }
+
+    private void worker_DoWork(object sender, DoWorkEventArgs e) {
+      this.Controller.View.Suspend();
+      Init();
+      Layout();
+      this.Controller.View.Resume();
+    }
+    /// <summary>
+    /// Runs a single step.
+    /// </summary>
+    private void RunStep() {
+
+    }
+    private bool Init() {
+
+      this.Graph = this.Model as IGraph;
+
+      if (Graph == null)
+        throw new InconsistencyException("The model has not been set and the Graph property is hence 'null'");
+
+      m_depths = new float[10];
+      this.LayoutRoot = this.Controller.Model.LayoutRoot;//could be null if not set in the GUI
+      Graph.ClearSpanningTree();
+      Graph.MakeSpanningTree(LayoutRoot as INode);
+
+      //Trace.WriteLine((LayoutRoot as INode).ChildCount);
+
+      if (Graph.SpanningTree == null)
+        throw new InconsistencyException("The spanning tree is not set (se the root of the tree layout first)");
+
+
+
+
+
+      Pars = new Dictionary<string, Params>();
+      if (Graph.Nodes.Count == 0)
+        return false;
+      if (Graph.Edges.Count == 0) //this layout is base on embedded springs in the connections
+        return false;
+
+
+      Params par;
+
+      foreach (INode node in Graph.Nodes) {
+        par = new Params();
+        par.init(node);
+        Pars.Add(node.Uid.ToString(), par);
+      }
+      return true;
+    }
+    public PointF LayoutAnchor {
+      get {
+        //if (m_anchor != null)
+        //{
+        //    return m_anchor;
+        //}
+
+        m_tmpa = PointF.Empty;
+        if (Graph != null) {
+          Rectangle b = Bounds;
+
+          switch (mOrientation) {
+            case TreeOrientation.LeftRight:
+              m_tmpa = new PointF(m_offset, b.Height / 2F);
+              break;
+            case TreeOrientation.RightLeft:
+              m_tmpa = new PointF(b.Width - m_offset, b.Height / 2F);
+              break;
+            case TreeOrientation.TopBottom:
+              m_tmpa = new PointF(b.Width / 2F, m_offset);
+              break;
+            case TreeOrientation.BottomTop:
+              m_tmpa = new PointF(b.Width / 2F, b.Height - m_offset);
+              break;
+            case TreeOrientation.Center:
+              m_tmpa = new PointF(b.Width / 2F, b.Height / 2F);
+              break;
+            default:
+              break;
+          }
+          //TODO: set the center of the layout here on the view
+          //d.getInverseTransform().transform(m_tmpa, m_tmpa);
+        }
+        return m_tmpa;
+      }
+      set {
+        m_anchor = value;
+      }
+    }
+
+    /// <summary>
+    /// Returns the location of halfway the two given nodes
+    /// </summary>
+    /// <param name="l"></param>
+    /// <param name="r"></param>
+    /// <param name="siblings"></param>
+    /// <returns></returns>
+    private double spacing(INode l, INode r, bool siblings) {
+      bool w = (mOrientation == TreeOrientation.TopBottom || mOrientation == TreeOrientation.BottomTop);
+      return (siblings ? mBreadth : mSubTreeSpacing) + 0.5 * (w ? l.Rectangle.Width + r.Rectangle.Width : l.Rectangle.Height + r.Rectangle.Height);
+    }
+    private void updateDepths(int depth, INode item) {
+      bool v = (mOrientation == TreeOrientation.TopBottom || mOrientation == TreeOrientation.BottomTop);
+      double d = (v ? item.Rectangle.Height : item.Rectangle.Width);
+      if (m_depths.Length <= depth)
+        Array.Resize<float>(ref m_depths, (int)(3 * depth / 2));
+      m_depths[depth] = (float)Math.Max(m_depths[depth], d);
+      mMaxDepth = (int)Math.Max(mMaxDepth, depth);
+    }
+
+    private void determineDepths() {
+      for (int i = 1; i < mMaxDepth; ++i)
+        m_depths[i] += m_depths[i - 1] + mDepth;
+    }
+
+    public void Layout() {
+      m_depths.Initialize();
+
+      mMaxDepth = 0;
+
+      PointF a = LayoutAnchor;
+      m_ax = a.X;
+      m_ay = a.Y;
+
+      INode root = LayoutRoot as INode;
+      Params rp = Pars[root.Uid.ToString()];
+
+      // do first pass - compute breadth information, collect depth info
+      firstWalk(root, 0, 1);
+
+      // sum up the depth info
+      determineDepths();
+
+      // do second pass - assign layout positions
+      secondWalk(root, null, -rp.prelim, 0);
+    }
+
+    private void firstWalk(INode n, int num, int depth) {
+      //Trace.WriteLine("depthj: " + depth);
+      Params np = Pars[n.Uid.ToString()];
+
+      np.number = num;
+      updateDepths(depth, n);
+
+      bool expanded = n.IsExpanded;
+      if (n.ChildCount == 0 || !expanded) // is leaf
             {
-                return mOrientation;
-            }
-            set
-            {
-                mOrientation = value;
-            }
-        }
-        /// <summary>
-        /// Gets or sets the depth spacing.
-        /// </summary>
-        /// <value>The depth spacing.</value>
-        public static float DepthSpacing
-        {
-            get { return mDepth; }
-            set { mDepth = value; }
-        }
-
-        /// <summary>
-        /// Gets or sets the breadth spacing.
-        /// </summary>
-        /// <value>The breadth spacing.</value>
-        public static float BreadthSpacing
-        {
-            get { return mBreadth; }
-            set { mBreadth = value; }
-        }
-        /// <summary>
-        /// Gets or sets the spacing between subtrees.
-        /// </summary>
-        /// <value>The sub tree spacing.</value>
-        public static float SubTreeSpacing
-        {
-            get { return mSubTreeSpacing; }
-            set { mSubTreeSpacing = value; }
-
-        }
-
-        public float RootOffset
-        {
-            get { return m_offset; }
-            set { m_offset = value; }
-        }
-
-        #endregion
-
-        #region Constructor
-        public StandardTreeLayout(IController controller)
-            : base("Standard TreeLayout", controller)
-        {
-
-          Orientation = TreeOrientation.LeftRight;
-
-        }
-        #endregion
-
-        #region Methods
-
-        public override void Run()
-        {
-            Run(2000);
-        }
-        public override void Run(int time)
-        {
-            if (worker != null && worker.IsBusy)
-                worker.CancelAsync();                
-            worker = new BackgroundWorker();
-            worker.WorkerSupportsCancellation = true;
-            worker.DoWork += new DoWorkEventHandler(worker_DoWork);
-            worker.RunWorkerAsync(time);
-        }
-
-        public override void Stop()
-        {
-            if (worker != null && worker.IsBusy)
-                worker.CancelAsync();
-        }
-
-        private void worker_DoWork(object sender, DoWorkEventArgs e)
-        {
-            this.Controller.View.Suspend();
-            Init();
-            Layout();
-            this.Controller.View.Resume();
-        }
-        /// <summary>
-        /// Runs a single step.
-        /// </summary>
-        private void RunStep()
-        {
-
-        }
-        private bool Init()
-        {
-
-            this.Graph = this.Model as IGraph;
-
-            if (Graph == null)
-                throw new InconsistencyException("The model has not been set and the Graph property is hence 'null'");
-
-            m_depths = new float[10];
-            this.LayoutRoot = this.Controller.Model.LayoutRoot;//could be null if not set in the GUI
-            Graph.ClearSpanningTree();
-            Graph.MakeSpanningTree(LayoutRoot as INode);
-
-            //Trace.WriteLine((LayoutRoot as INode).ChildCount);
-
-            if (Graph.SpanningTree == null)
-                throw new InconsistencyException("The spanning tree is not set (se the root of the tree layout first)");
-
-            
-            
-
-
-            Pars = new Dictionary<string, Params>();
-            if (Graph.Nodes.Count == 0)
-                return false;
-            if (Graph.Edges.Count == 0) //this layout is base on embedded springs in the connections
-                return false;
-
-
-            Params par;
-
-            foreach (INode node in Graph.Nodes)
-            {
-                par = new Params();
-                par.init(node);
-                Pars.Add(node.Uid.ToString(), par);
-            }
-            return true;
-        }
-        public PointF LayoutAnchor
-        {
-            get
-            {
-                //if (m_anchor != null)
-                //{
-                //    return m_anchor;
-                //}
-
-                m_tmpa = PointF.Empty;
-                if (Graph != null)
-                {
-                    Rectangle b = Bounds;
-
-                    switch (mOrientation)
-                    {
-                        case TreeOrientation.LeftRight:
-                            m_tmpa = new PointF(m_offset, b.Height / 2F);
-                            break;
-                        case TreeOrientation.RightLeft:
-                            m_tmpa = new PointF(b.Width - m_offset, b.Height / 2F);
-                            break;
-                        case TreeOrientation.TopBottom:
-                            m_tmpa = new PointF(b.Width / 2F, m_offset);
-                            break;
-                        case TreeOrientation.BottomTop:
-                            m_tmpa = new PointF(b.Width / 2F, b.Height - m_offset);
-                            break;
-                        case TreeOrientation.Center:
-                            m_tmpa = new PointF(b.Width / 2F, b.Height / 2F);
-                            break;
-                        default:
-                            break;
-                    }
-                    //TODO: set the center of the layout here on the view
-                    //d.getInverseTransform().transform(m_tmpa, m_tmpa);
-                }
-                return m_tmpa;
-            }
-            set
-            {
-                m_anchor = value;
-            }
-        }
-
-        /// <summary>
-        /// Returns the location of halfway the two given nodes
-        /// </summary>
-        /// <param name="l"></param>
-        /// <param name="r"></param>
-        /// <param name="siblings"></param>
-        /// <returns></returns>
-        private double spacing(INode l, INode r, bool siblings)
-        {
-            bool w = (mOrientation == TreeOrientation.TopBottom || mOrientation == TreeOrientation.BottomTop);
-            return (siblings ? mBreadth : mSubTreeSpacing) + 0.5 * (w ? l.Rectangle.Width + r.Rectangle.Width : l.Rectangle.Height + r.Rectangle.Height);
-        }
-        private void updateDepths(int depth, INode item)
-        {
-            bool v = (mOrientation == TreeOrientation.TopBottom || mOrientation == TreeOrientation.BottomTop);
-            double d = (v ? item.Rectangle.Height : item.Rectangle.Width);
-            if (m_depths.Length <= depth)
-                Array.Resize<float>(ref m_depths, (int)(3 * depth / 2));
-            m_depths[depth] = (float)Math.Max(m_depths[depth], d);
-            mMaxDepth = (int)Math.Max(mMaxDepth, depth);
-        }
-
-        private void determineDepths()
-        {
-            for (int i = 1; i < mMaxDepth; ++i)
-                m_depths[i] += m_depths[i - 1] + mDepth;
-        }
-
-        public void Layout()
-        {
-            m_depths.Initialize();
-
-            mMaxDepth = 0;
-
-            PointF a = LayoutAnchor;
-            m_ax = a.X;
-            m_ay = a.Y;
-
-            INode root = LayoutRoot as INode;
-            Params rp = Pars[root.Uid.ToString()];
-
-            // do first pass - compute breadth information, collect depth info
-            firstWalk(root, 0, 1);
-
-            // sum up the depth info
-            determineDepths();
-
-            // do second pass - assign layout positions
-            secondWalk(root, null, -rp.prelim, 0);
-        }
-
-        private void firstWalk(INode n, int num, int depth)
-        {
-            //Trace.WriteLine("depthj: " + depth);
-            Params np = Pars[n.Uid.ToString()];
-
-            np.number = num;
-            updateDepths(depth, n);
-
-            bool expanded = n.IsExpanded;
-            if (n.ChildCount == 0 || !expanded) // is leaf
-            {
-                INode l = (INode)n.PreviousSibling;
-                if (l == null)
-                {
-                    np.prelim = 0;
-                }
-                else
-                {
-                    np.prelim = Pars[l.Uid.ToString()].prelim + spacing(l, n, true);
-                }
-            }
-            else if (expanded)
-            {
-                INode leftMost = n.FirstChild;
-                INode rightMost = n.LastChild;
-                INode defaultAncestor = leftMost;
-                INode c = leftMost;
-                for (int i = 0; c != null; ++i, c = c.NextSibling)
-                {
-                    firstWalk(c, i, depth + 1);
-                    defaultAncestor = apportion(c, defaultAncestor);
-                }
-
-                executeShifts(n);
-
-                double midpoint = 0.5 *
-                    (Pars[leftMost.Uid.ToString()].prelim + Pars[rightMost.Uid.ToString()].prelim);
-
-                INode left = (INode)n.PreviousSibling;
-                if (left != null)
-                {
-                    np.prelim = Pars[left.Uid.ToString()].prelim + spacing(left, n, true);
-                    np.mod = np.prelim - midpoint;
-                }
-                else
-                {
-                    np.prelim = midpoint;
-                }
-            }
-        }
-        private INode apportion(INode v, INode a)
-        {
-            INode w = (INode)v.PreviousSibling;
-            if (w != null)
-            {
-                INode vip, vim, vop, vom;
-                double sip, sim, sop, som;
-
-                vip = vop = v;
-                vim = w;
-                vom = (INode)vip.ParentNode.FirstChild;
-
-                sip = Pars[vip.Uid.ToString()].mod;
-                sop = Pars[vop.Uid.ToString()].mod;
-                sim = Pars[vim.Uid.ToString()].mod;
-                som = Pars[vom.Uid.ToString()].mod;
-                Params parms;
-                INode nr = nextRight(vim);
-                INode nl = nextLeft(vip);
-                while (nr != null && nl != null)
-                {
-                    vim = nr;
-                    vip = nl;
-                    vom = nextLeft(vom);
-                    vop = nextRight(vop);
-                    parms = Pars[vop.Uid.ToString()];
-                    parms.ancestor = v;
-                    double shift = (Pars[vim.Uid.ToString()].prelim + sim) -
-                        (Pars[vip.Uid.ToString()].prelim + sip) + spacing(vim, vip, false);
-                    if (shift > 0)
-                    {
-                        moveSubtree(ancestor(vim, v, a), v, shift);
-                        sip += shift;
-                        sop += shift;
-                    }
-                    sim += Pars[vim.Uid.ToString()].mod;
-                    sip += Pars[vip.Uid.ToString()].mod;
-                    som += Pars[vom.Uid.ToString()].mod;
-                    sop += Pars[vop.Uid.ToString()].mod;
-
-                    nr = nextRight(vim);
-                    nl = nextLeft(vip);
-                }
-                if (nr != null && nextRight(vop) == null)
-                {
-                    Params vopp = Pars[vop.Uid.ToString()];
-                    vopp.thread = nr;
-                    vopp.mod += sim - sop;
-                }
-                if (nl != null && nextLeft(vom) == null)
-                {
-                    Params vomp = Pars[vom.Uid.ToString()];
-                    vomp.thread = nl;
-                    vomp.mod += sip - som;
-                    a = v;
-                }
-            }
-            return a;
-        }
-        private INode nextLeft(INode n)
-        {
-            INode c = null;
-            if (n.IsExpanded) c = n.FirstChild;
-            return (c != null ? c : Pars[n.Uid.ToString()].thread);
-        }
-
-        private INode nextRight(INode n)
-        {
-            INode c = null;
-            if (n.IsExpanded) c = n.LastChild;
-            return (c != null ? c : Pars[n.Uid.ToString()].thread);
-        }
-
-        private void moveSubtree(INode wm, INode wp, double shift)
-        {
-            Params wmp = Pars[wm.Uid.ToString()];
-            Params wpp = Pars[wp.Uid.ToString()];
-            double subtrees = wpp.number - wmp.number;
-            wpp.change -= shift / subtrees;
-            wpp.shift += shift;
-            wmp.change += shift / subtrees;
-            wpp.prelim += shift;
-            wpp.mod += shift;
-        }
-
-        private void executeShifts(INode n)
-        {
-            double shift = 0, change = 0;
-            for (INode c = n.LastChild; c != null; c = c.PreviousSibling)
-            {
-                Params cp = Pars[c.Uid.ToString()];
-                cp.prelim += shift;
-                cp.mod += shift;
-                change += cp.change;
-                shift += cp.shift + change;
-            }
-        }
-
-        private INode ancestor(INode vim, INode v, INode a)
-        {
-            INode p = (INode)v.ParentNode;
-            Params vimp = Pars[vim.Uid.ToString()];
-            if (vimp.ancestor != null && vimp.ancestor.ParentNode == p)
-            {
-                return vimp.ancestor;
-            }
-            else
-            {
-                return a;
-            }
-        }
-
-        private void secondWalk(INode n, INode p, double m, int depth)
-        {
-            Params np = Pars[n.Uid.ToString()];
-            setBreadth(n, p, np.prelim + m);
-            setDepth(n, p, m_depths[depth]);
-
-            if (n.IsExpanded)
-            {
-                depth += 1;
-                for (INode c = n.FirstChild; c != null; c = c.NextSibling)
-                {
-                    if (worker.CancellationPending)
-                        break;
-                    secondWalk(c, n, m + np.mod, depth);
-                }
-            }
-
-            np.clear();
-        }
-
-        private void setBreadth(INode n, INode p, double b)
-        {
-            switch (mOrientation)
-            {
-                case TreeOrientation.LeftRight:
-                case TreeOrientation.RightLeft:
-                    setY(n, p, m_ay + b);
-                    break;
-                case TreeOrientation.TopBottom:
-                case TreeOrientation.BottomTop:
-                    setX(n, p, m_ax + b);
-                    break;
-                default:
-                    throw new InconsistencyException();
-            }
-        }
-
-        private void setDepth(INode n, INode p, double d)
-        {
-            switch (mOrientation)
-            {
-                case TreeOrientation.LeftRight:
-                    setX(n, p, m_ax + d);
-                    break;
-                case TreeOrientation.RightLeft:
-                    setX(n, p, m_ax - d);
-                    break;
-                case TreeOrientation.TopBottom:
-                    setY(n, p, m_ay + d);
-                    break;
-                case TreeOrientation.BottomTop:
-                    setY(n, p, m_ay - d);
-                    break;
-                default:
-                    throw new InconsistencyException();
-            }
-        }
-
-
-        #endregion
-
-        /// <summary>
-        /// Paramter blob to temporarily keep working data of one node.
-        /// </summary>
-        class Params
-        {
-            public double prelim;
-            public double mod;
-            public double shift;
-            public double change;
-            public int number;
-            public INode ancestor;
-            public INode thread;
-
-            public void init(INode item)
-            {
-                ancestor = item;
-                number = -1;
-                ancestor = thread = null;
-            }
-
-            public void clear()
-            {
-                number = -2;
-                prelim = mod = shift = change = 0;
-                ancestor = thread = null;
-            }
-        }
-    }
-
-    public enum TreeOrientation
-    {
-        LeftRight,
-        RightLeft,
-        TopBottom,
-        BottomTop,
-        Center
-    }
+        INode l = (INode)n.PreviousSibling;
+        if (l == null) {
+          np.prelim = 0;
+        } else {
+          np.prelim = Pars[l.Uid.ToString()].prelim + spacing(l, n, true);
+        }
+      } else if (expanded) {
+        INode leftMost = n.FirstChild;
+        INode rightMost = n.LastChild;
+        INode defaultAncestor = leftMost;
+        INode c = leftMost;
+        for (int i = 0; c != null; ++i, c = c.NextSibling) {
+          firstWalk(c, i, depth + 1);
+          defaultAncestor = apportion(c, defaultAncestor);
+        }
+
+        executeShifts(n);
+
+        double midpoint = 0.5 *
+            (Pars[leftMost.Uid.ToString()].prelim + Pars[rightMost.Uid.ToString()].prelim);
+
+        INode left = (INode)n.PreviousSibling;
+        if (left != null) {
+          np.prelim = Pars[left.Uid.ToString()].prelim + spacing(left, n, true);
+          np.mod = np.prelim - midpoint;
+        } else {
+          np.prelim = midpoint;
+        }
+      }
+    }
+    private INode apportion(INode v, INode a) {
+      INode w = (INode)v.PreviousSibling;
+      if (w != null) {
+        INode vip, vim, vop, vom;
+        double sip, sim, sop, som;
+
+        vip = vop = v;
+        vim = w;
+        vom = (INode)vip.ParentNode.FirstChild;
+
+        sip = Pars[vip.Uid.ToString()].mod;
+        sop = Pars[vop.Uid.ToString()].mod;
+        sim = Pars[vim.Uid.ToString()].mod;
+        som = Pars[vom.Uid.ToString()].mod;
+        Params parms;
+        INode nr = nextRight(vim);
+        INode nl = nextLeft(vip);
+        while (nr != null && nl != null) {
+          vim = nr;
+          vip = nl;
+          vom = nextLeft(vom);
+          vop = nextRight(vop);
+          parms = Pars[vop.Uid.ToString()];
+          parms.ancestor = v;
+          double shift = (Pars[vim.Uid.ToString()].prelim + sim) -
+              (Pars[vip.Uid.ToString()].prelim + sip) + spacing(vim, vip, false);
+          if (shift > 0) {
+            moveSubtree(ancestor(vim, v, a), v, shift);
+            sip += shift;
+            sop += shift;
+          }
+          sim += Pars[vim.Uid.ToString()].mod;
+          sip += Pars[vip.Uid.ToString()].mod;
+          som += Pars[vom.Uid.ToString()].mod;
+          sop += Pars[vop.Uid.ToString()].mod;
+
+          nr = nextRight(vim);
+          nl = nextLeft(vip);
+        }
+        if (nr != null && nextRight(vop) == null) {
+          Params vopp = Pars[vop.Uid.ToString()];
+          vopp.thread = nr;
+          vopp.mod += sim - sop;
+        }
+        if (nl != null && nextLeft(vom) == null) {
+          Params vomp = Pars[vom.Uid.ToString()];
+          vomp.thread = nl;
+          vomp.mod += sip - som;
+          a = v;
+        }
+      }
+      return a;
+    }
+    private INode nextLeft(INode n) {
+      INode c = null;
+      if (n.IsExpanded) c = n.FirstChild;
+      return (c != null ? c : Pars[n.Uid.ToString()].thread);
+    }
+
+    private INode nextRight(INode n) {
+      INode c = null;
+      if (n.IsExpanded) c = n.LastChild;
+      return (c != null ? c : Pars[n.Uid.ToString()].thread);
+    }
+
+    private void moveSubtree(INode wm, INode wp, double shift) {
+      Params wmp = Pars[wm.Uid.ToString()];
+      Params wpp = Pars[wp.Uid.ToString()];
+      double subtrees = wpp.number - wmp.number;
+      wpp.change -= shift / subtrees;
+      wpp.shift += shift;
+      wmp.change += shift / subtrees;
+      wpp.prelim += shift;
+      wpp.mod += shift;
+    }
+
+    private void executeShifts(INode n) {
+      double shift = 0, change = 0;
+      for (INode c = n.LastChild; c != null; c = c.PreviousSibling) {
+        Params cp = Pars[c.Uid.ToString()];
+        cp.prelim += shift;
+        cp.mod += shift;
+        change += cp.change;
+        shift += cp.shift + change;
+      }
+    }
+
+    private INode ancestor(INode vim, INode v, INode a) {
+      INode p = (INode)v.ParentNode;
+      Params vimp = Pars[vim.Uid.ToString()];
+      if (vimp.ancestor != null && vimp.ancestor.ParentNode == p) {
+        return vimp.ancestor;
+      } else {
+        return a;
+      }
+    }
+
+    private void secondWalk(INode n, INode p, double m, int depth) {
+      Params np = Pars[n.Uid.ToString()];
+      setBreadth(n, p, np.prelim + m);
+      setDepth(n, p, m_depths[depth]);
+
+      if (n.IsExpanded) {
+        depth += 1;
+        for (INode c = n.FirstChild; c != null; c = c.NextSibling) {
+          if (worker.CancellationPending)
+            break;
+          secondWalk(c, n, m + np.mod, depth);
+        }
+      }
+
+      np.clear();
+    }
+
+    private void setBreadth(INode n, INode p, double b) {
+      switch (mOrientation) {
+        case TreeOrientation.LeftRight:
+        case TreeOrientation.RightLeft:
+          setY(n, p, m_ay + b);
+          break;
+        case TreeOrientation.TopBottom:
+        case TreeOrientation.BottomTop:
+          setX(n, p, m_ax + b);
+          break;
+        default:
+          throw new InconsistencyException();
+      }
+    }
+
+    private void setDepth(INode n, INode p, double d) {
+      switch (mOrientation) {
+        case TreeOrientation.LeftRight:
+          setX(n, p, m_ax + d);
+          break;
+        case TreeOrientation.RightLeft:
+          setX(n, p, m_ax - d);
+          break;
+        case TreeOrientation.TopBottom:
+          setY(n, p, m_ay + d);
+          break;
+        case TreeOrientation.BottomTop:
+          setY(n, p, m_ay - d);
+          break;
+        default:
+          throw new InconsistencyException();
+      }
+    }
+
+
+    #endregion
+
+    /// <summary>
+    /// Paramter blob to temporarily keep working data of one node.
+    /// </summary>
+    class Params {
+      public double prelim;
+      public double mod;
+      public double shift;
+      public double change;
+      public int number;
+      public INode ancestor;
+      public INode thread;
+
+      public void init(INode item) {
+        ancestor = item;
+        number = -1;
+        ancestor = thread = null;
+      }
+
+      public void clear() {
+        number = -2;
+        prelim = mod = shift = change = 0;
+        ancestor = thread = null;
+      }
+    }
+  }
+
+  public enum TreeOrientation {
+    LeftRight,
+    RightLeft,
+    TopBottom,
+    BottomTop,
+    Center
+  }
 }
Index: /trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.Netron/3.0.2672.12446/Netron.Diagramming.Core-3.0.2672.12446/Layout/Tree.cs
===================================================================
--- /trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.Netron/3.0.2672.12446/Netron.Diagramming.Core-3.0.2672.12446/Layout/Tree.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.Netron/3.0.2672.12446/Netron.Diagramming.Core-3.0.2672.12446/Layout/Tree.cs	(revision 4068)
@@ -1,100 +1,93 @@
 using System;
 using System.Collections.Generic;
-using System.Text;
 using System.Drawing;
-namespace Netron.Diagramming.Core.Layout
-{
-    public static class Tree
-    {
+namespace Netron.Diagramming.Core.Layout {
+  public static class Tree {
 
-        public static Bundle CreateRandomTree<S>(Size bounds, int amount) where S : SimpleShapeBase, new()
-        {
-            if (new S().Connectors.Count == 0)
-                throw new InconsistencyException("The shape type specified '" + typeof(S).Name + "' has no connectors and cannot be used to create a tree. Please choose another type based on the SimpleShapeBase class.");
+    public static Bundle CreateRandomTree<S>(Size bounds, int amount) where S : SimpleShapeBase, new() {
+      if (new S().Connectors.Count == 0)
+        throw new InconsistencyException("The shape type specified '" + typeof(S).Name + "' has no connectors and cannot be used to create a tree. Please choose another type based on the SimpleShapeBase class.");
 
-            #region Preamble
-            int counter = 0;
-            Dictionary<int, S> labels = new Dictionary<int, S>();
-            Random rnd = new Random();
-            Bundle bundle = new Bundle();
-            Connection cn;
-            S shape;
-            #endregion
+      #region Preamble
+      int counter = 0;
+      Dictionary<int, S> labels = new Dictionary<int, S>();
+      Random rnd = new Random();
+      Bundle bundle = new Bundle();
+      Connection cn;
+      S shape;
+      #endregion
 
-            #region Create the root
-            shape = new S();
-            shape.Text = "Root";
-            shape.Location = new Point(rnd.Next(10, bounds.Width - 30), rnd.Next(10, bounds.Height - 30));
-            labels.Add(0, shape);
-            bundle.Entities.Add(shape);
-            //this.diagramControl1.SetLayoutRoot(shape);
-            #endregion
+      #region Create the root
+      shape = new S();
+      shape.Text = "Root";
+      shape.Location = new Point(rnd.Next(10, bounds.Width - 30), rnd.Next(10, bounds.Height - 30));
+      labels.Add(0, shape);
+      bundle.Entities.Add(shape);
+      //this.diagramControl1.SetLayoutRoot(shape);
+      #endregion
 
-            #region Add random nodes to the existing tree
-            for (int i = 0; i < amount; i++)
-            {
-                counter++;
-                shape = new S();
-                shape.Text = "Shape " + counter;
-                int s1;
-                shape.Location = new Point(rnd.Next(10, bounds.Width - 30), rnd.Next(10, bounds.Height - 30));
+      #region Add random nodes to the existing tree
+      for (int i = 0; i < amount; i++) {
+        counter++;
+        shape = new S();
+        shape.Text = "Shape " + counter;
+        int s1;
+        shape.Location = new Point(rnd.Next(10, bounds.Width - 30), rnd.Next(10, bounds.Height - 30));
 
-                labels.Add(counter, shape);
-                bundle.Entities.Add(shape);
-                //let's try to find a parent for this new node
-                s1 = rnd.Next(0, counter - 1);
-                while (labels[s1].Connectors[0].AttachedConnectors.Count >= rnd.Next(1, 9) && s1 <= counter - 5)
-                {
-                    s1 = rnd.Next(0, counter - 1);
-                }
-                cn = new Connection(Point.Empty, Point.Empty);
+        labels.Add(counter, shape);
+        bundle.Entities.Add(shape);
+        //let's try to find a parent for this new node
+        s1 = rnd.Next(0, counter - 1);
+        while (labels[s1].Connectors[0].AttachedConnectors.Count >= rnd.Next(1, 9) && s1 <= counter - 5) {
+          s1 = rnd.Next(0, counter - 1);
+        }
+        cn = new Connection(Point.Empty, Point.Empty);
 
-                labels[s1].Connectors[0].AttachConnector(cn.From);
-                shape.Connectors[0].AttachConnector(cn.To);
-                bundle.Entities.Add(cn);
+        labels[s1].Connectors[0].AttachConnector(cn.From);
+        shape.Connectors[0].AttachConnector(cn.To);
+        bundle.Entities.Add(cn);
 
-            }
+      }
 
-            #endregion
+      #endregion
 
-            return bundle;
-        }
-     
-        /// <summary>
-        /// Only a utility function which returns a specific type of (handcrafted) tree.
-        /// </summary>
-        /// <returns></returns>
-        public static Bundle CreateSpecificTree()
-        {
-            Bundle bundle = new Bundle();
+      return bundle;
+    }
 
-            SimpleRectangle rec1 = new SimpleRectangle();
-            rec1.Location = new Point(100, 30);
+    /// <summary>
+    /// Only a utility function which returns a specific type of (handcrafted) tree.
+    /// </summary>
+    /// <returns></returns>
+    public static Bundle CreateSpecificTree() {
+      Bundle bundle = new Bundle();
 
-            SimpleRectangle rec2 = new SimpleRectangle();
-            rec2.Location = new Point(50, 80);
+      SimpleRectangle rec1 = new SimpleRectangle();
+      rec1.Location = new Point(100, 30);
 
-            SimpleRectangle rec3 = new SimpleRectangle();
-            rec3.Location = new Point(150, 80);
+      SimpleRectangle rec2 = new SimpleRectangle();
+      rec2.Location = new Point(50, 80);
+
+      SimpleRectangle rec3 = new SimpleRectangle();
+      rec3.Location = new Point(150, 80);
 
 
-            Connection cn1 = new Connection();
-            rec1.Connectors[2].AttachConnector(cn1.From);
-            rec2.Connectors[0].AttachConnector(cn1.To);
+      Connection cn1 = new Connection();
+      rec1.Connectors[2].AttachConnector(cn1.From);
+      rec2.Connectors[0].AttachConnector(cn1.To);
 
-            Connection cn2 = new Connection();
-            rec1.Connectors[2].AttachConnector(cn2.From);
-            rec3.Connectors[0].AttachConnector(cn2.To);
+      Connection cn2 = new Connection();
+      rec1.Connectors[2].AttachConnector(cn2.From);
+      rec3.Connectors[0].AttachConnector(cn2.To);
 
-            bundle.Entities.Add(rec1);
-            bundle.Entities.Add(rec2);
-            bundle.Entities.Add(rec3);
-            bundle.Entities.Add(cn1);
-            bundle.Entities.Add(cn2);
+      bundle.Entities.Add(rec1);
+      bundle.Entities.Add(rec2);
+      bundle.Entities.Add(rec3);
+      bundle.Entities.Add(cn1);
+      bundle.Entities.Add(cn2);
 
-            return bundle;
+      return bundle;
 
 
-        }
     }
+  }
 }
Index: /trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.Netron/3.0.2672.12446/Netron.Diagramming.Core-3.0.2672.12446/Layout/TreeLayoutBase.cs
===================================================================
--- /trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.Netron/3.0.2672.12446/Netron.Diagramming.Core-3.0.2672.12446/Layout/TreeLayoutBase.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.Netron/3.0.2672.12446/Netron.Diagramming.Core-3.0.2672.12446/Layout/TreeLayoutBase.cs	(revision 4068)
@@ -1,56 +1,46 @@
-using System;
-using System.Collections.Generic;
-using System.Text;
-using Netron.Diagramming.Core.Analysis;
-namespace Netron.Diagramming.Core
-{
+namespace Netron.Diagramming.Core {
+  /// <summary>
+  /// Abstract base class providing convenience methods for tree layout algorithms.
+  /// </summary>
+  abstract class TreeLayoutBase : LayoutBase {
+
+    #region Fields
     /// <summary>
-    /// Abstract base class providing convenience methods for tree layout algorithms.
+    /// the root of the tree
     /// </summary>
-    abstract class TreeLayoutBase : LayoutBase
-    {
+    private IShape mLayoutRoot;
 
-        #region Fields
-        /// <summary>
-        /// the root of the tree
-        /// </summary>
-        private IShape mLayoutRoot;
-    
-        #endregion
+    #endregion
 
-        #region Consstructor
-        /// <summary>
-        /// Initializes a new instance of the <see cref="T:TreeLayoutBase"/> class.
-        /// </summary>
-        /// <param name="name">The name.</param>
-        /// <param name="controller">The controller.</param>
-        protected TreeLayoutBase(string name, IController controller)
-            : base(name, controller)
-        {
+    #region Consstructor
+    /// <summary>
+    /// Initializes a new instance of the <see cref="T:TreeLayoutBase"/> class.
+    /// </summary>
+    /// <param name="name">The name.</param>
+    /// <param name="controller">The controller.</param>
+    protected TreeLayoutBase(string name, IController controller)
+      : base(name, controller) {
 
-        }
+    }
 
-        #endregion
+    #endregion
 
-        #region Properties
-        /// <summary>
-        /// Gets or sets the layout root.
-        /// </summary>
-        /// <value>The layout root.</value>
-        public IShape LayoutRoot
-        {
-            get
-            {
-                return mLayoutRoot;
-            }
-            set
-            {
-                mLayoutRoot = value;
-                
-            }
-        }
-     
-        #endregion
-        
+    #region Properties
+    /// <summary>
+    /// Gets or sets the layout root.
+    /// </summary>
+    /// <value>The layout root.</value>
+    public IShape LayoutRoot {
+      get {
+        return mLayoutRoot;
+      }
+      set {
+        mLayoutRoot = value;
+
+      }
     }
+
+    #endregion
+
+  }
 }
Index: /trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.Netron/3.0.2672.12446/Netron.Diagramming.Core-3.0.2672.12446/Printing/DiagramPrinter.cs
===================================================================
--- /trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.Netron/3.0.2672.12446/Netron.Diagramming.Core-3.0.2672.12446/Printing/DiagramPrinter.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.Netron/3.0.2672.12446/Netron.Diagramming.Core-3.0.2672.12446/Printing/DiagramPrinter.cs	(revision 4068)
@@ -1,123 +1,107 @@
-using System;
-using System.Collections.Generic;
-using System.Text;
+using System.Drawing;
+using System.Drawing.Drawing2D;
 using System.Drawing.Printing;
 using System.Windows.Forms;
-using System.Drawing;
-using System.Drawing.Drawing2D;
 
-namespace Netron.Diagramming.Core
-{
-    // ----------------------------------------------------------------------
+namespace Netron.Diagramming.Core {
+  // ----------------------------------------------------------------------
+  /// <summary>
+  /// Handles the printing of a diagram.  All pages in the diagram are
+  /// printed.  A print preview or actual print can be performed.
+  /// </summary>
+  // ----------------------------------------------------------------------
+  public class DiagramPrinter {
+    PrintDocument myDocument;
+    IDiagramControl myDiagram;
+    //PrinterSettings mySettings;
+    PageSettings myPageSettings;
+    int currentPageIndex = 0;
+    int numberOfPages = 1;
+
+    // ------------------------------------------------------------------
     /// <summary>
-    /// Handles the printing of a diagram.  All pages in the diagram are
-    /// printed.  A print preview or actual print can be performed.
+    /// Constructor.
     /// </summary>
-    // ----------------------------------------------------------------------
-    public class DiagramPrinter
-    {
-        PrintDocument myDocument;
-        IDiagramControl myDiagram;
-        //PrinterSettings mySettings;
-        PageSettings myPageSettings;
-        int currentPageIndex = 0;
-        int numberOfPages = 1;
+    /// <param name="pageSettings">PageSettings: The page setup for the
+    /// diagram.</param>
+    /// <param name="diagram">IDiagramControl: The diagram to print.
+    /// </param>
+    /// <param name="printPreviewOnly">bool: Specifies if only a print
+    /// preview is to be performed.  If true, then a PrintPreviewDialog
+    /// is shown.  If false, then a PrintDialog is shown and the diagram
+    /// is printed if the user elects to.</param>
+    // ------------------------------------------------------------------
+    public DiagramPrinter(
+        PageSettings pageSettings,
+        IDiagramControl diagram,
+        bool printPreviewOnly) {
+      this.myDiagram = diagram;
+      this.numberOfPages = diagram.Controller.Model.Pages.Count;
+      this.myPageSettings = pageSettings;
+      this.myDocument = new PrintDocument();
+      this.myDocument.DefaultPageSettings = this.myPageSettings;
+      this.myDocument.PrintPage +=
+          new PrintPageEventHandler(PrintPage);
 
-        // ------------------------------------------------------------------
-        /// <summary>
-        /// Constructor.
-        /// </summary>
-        /// <param name="pageSettings">PageSettings: The page setup for the
-        /// diagram.</param>
-        /// <param name="diagram">IDiagramControl: The diagram to print.
-        /// </param>
-        /// <param name="printPreviewOnly">bool: Specifies if only a print
-        /// preview is to be performed.  If true, then a PrintPreviewDialog
-        /// is shown.  If false, then a PrintDialog is shown and the diagram
-        /// is printed if the user elects to.</param>
-        // ------------------------------------------------------------------
-        public DiagramPrinter(
-            PageSettings pageSettings, 
-            IDiagramControl diagram,
-            bool printPreviewOnly)
-        {
-            this.myDiagram = diagram;
-            this.numberOfPages = diagram.Controller.Model.Pages.Count;
-            this.myPageSettings = pageSettings;
-            this.myDocument = new PrintDocument();            
-            this.myDocument.DefaultPageSettings = this.myPageSettings;
-            this.myDocument.PrintPage += 
-                new PrintPageEventHandler(PrintPage);
+      if (printPreviewOnly) {
+        this.PrintPreview();
+      } else {
+        this.Print();
+      }
+    }
 
-            if (printPreviewOnly)
-            {
-                this.PrintPreview();
-            }
-            else
-            {
-                this.Print();
-            }            
-        }
+    // ------------------------------------------------------------------
+    /// <summary>
+    /// Print previews the diagram by displaying a PrintPreviewDialog.
+    /// The diagram, however, can be printed from the PrintPreviewDialog.
+    /// </summary>
+    // ------------------------------------------------------------------
+    void PrintPreview() {
+      PrintPreviewDialog dialog = new PrintPreviewDialog();
+      dialog.Document = this.myDocument;
+      dialog.ShowDialog();
+    }
 
-        // ------------------------------------------------------------------
-        /// <summary>
-        /// Print previews the diagram by displaying a PrintPreviewDialog.
-        /// The diagram, however, can be printed from the PrintPreviewDialog.
-        /// </summary>
-        // ------------------------------------------------------------------
-        void PrintPreview()
-        {
-            PrintPreviewDialog dialog = new PrintPreviewDialog();
-            dialog.Document = this.myDocument;
-            dialog.ShowDialog();
-        }
+    // ------------------------------------------------------------------
+    /// <summary>
+    /// Displays a PrintDialog and prints the diagram if the user elects
+    /// to continue.
+    /// </summary>
+    // ------------------------------------------------------------------
+    void Print() {
+      PrintDialog dialog = new PrintDialog();
+      dialog.Document = this.myDocument;
 
-        // ------------------------------------------------------------------
-        /// <summary>
-        /// Displays a PrintDialog and prints the diagram if the user elects
-        /// to continue.
-        /// </summary>
-        // ------------------------------------------------------------------
-        void Print()
-        {
-            PrintDialog dialog = new PrintDialog();
-            dialog.Document = this.myDocument;
-            
-            if (dialog.ShowDialog() == DialogResult.OK)
-            {
-                this.myDocument.Print();
-            }
-        }
+      if (dialog.ShowDialog() == DialogResult.OK) {
+        this.myDocument.Print();
+      }
+    }
 
-        // ------------------------------------------------------------------
-        /// <summary>
-        /// Handles the actual rendering of the diagram to the print document.
-        /// </summary>
-        /// <param name="sender">object</param>
-        /// <param name="e">PrintPageEventArgs</param>
-        // ------------------------------------------------------------------
-        void PrintPage(object sender, PrintPageEventArgs e)
-        {
-            Graphics g = e.Graphics;
-            IPage page = 
-                this.myDiagram.Controller.Model.Pages[currentPageIndex];
-            Bundle bundle = new Bundle(page.Entities);
-            Matrix m = new Matrix();
-            m.Translate(
-                -page.Bounds.Location.X,
-                -page.Bounds.Location.Y);
-            g.Transform = m;
-            bundle.Paint(g);
-            if ((currentPageIndex + 1) < this.numberOfPages)
-            {
-                currentPageIndex++;
-                e.HasMorePages = true;
-            }
-            else
-            {
-                currentPageIndex = 0;
-                e.HasMorePages = false;
-            }
-        }
+    // ------------------------------------------------------------------
+    /// <summary>
+    /// Handles the actual rendering of the diagram to the print document.
+    /// </summary>
+    /// <param name="sender">object</param>
+    /// <param name="e">PrintPageEventArgs</param>
+    // ------------------------------------------------------------------
+    void PrintPage(object sender, PrintPageEventArgs e) {
+      Graphics g = e.Graphics;
+      IPage page =
+          this.myDiagram.Controller.Model.Pages[currentPageIndex];
+      Bundle bundle = new Bundle(page.Entities);
+      Matrix m = new Matrix();
+      m.Translate(
+          -page.Bounds.Location.X,
+          -page.Bounds.Location.Y);
+      g.Transform = m;
+      bundle.Paint(g);
+      if ((currentPageIndex + 1) < this.numberOfPages) {
+        currentPageIndex++;
+        e.HasMorePages = true;
+      } else {
+        currentPageIndex = 0;
+        e.HasMorePages = false;
+      }
     }
+  }
 }
Index: /trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.Netron/3.0.2672.12446/Netron.Diagramming.Core-3.0.2672.12446/Properties/AssemblyInfo.cs
===================================================================
--- /trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.Netron/3.0.2672.12446/Netron.Diagramming.Core-3.0.2672.12446/Properties/AssemblyInfo.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.Netron/3.0.2672.12446/Netron.Diagramming.Core-3.0.2672.12446/Properties/AssemblyInfo.cs	(revision 4068)
@@ -1,6 +1,6 @@
+using System;
 using System.Reflection;
+using System.Resources;
 using System.Runtime.CompilerServices;
-using System.Resources;
-using System;
 using System.Runtime.InteropServices;
 [assembly: AssemblyTitle("Netron.Diagramming.Core")]
Index: /trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.Netron/3.0.2672.12446/Netron.Diagramming.Core-3.0.2672.12446/PropertySystem/Converters/PointConverter.cs
===================================================================
--- /trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.Netron/3.0.2672.12446/Netron.Diagramming.Core-3.0.2672.12446/PropertySystem/Converters/PointConverter.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.Netron/3.0.2672.12446/Netron.Diagramming.Core-3.0.2672.12446/PropertySystem/Converters/PointConverter.cs	(revision 4068)
@@ -1,112 +1,98 @@
 using System;
-using System.Collections.Generic;
-using System.Text;
 using System.ComponentModel;
 using System.Drawing;
 using System.Globalization;
-namespace Netron.Diagramming.Core
-{
+namespace Netron.Diagramming.Core {
+  /// <summary>
+  /// Type converter for a <see cref="Point"/> structure.
+  /// </summary>
+  public class PointConverter : TypeConverter {
     /// <summary>
-    /// Type converter for a <see cref="Point"/> structure.
+    /// Determines whether this instance can convert from the specified context.
     /// </summary>
-    public class PointConverter : TypeConverter
-    {
-        /// <summary>
-        /// Determines whether this instance can convert from the specified context.
-        /// </summary>
-        /// <param name="context">The context.</param>
-        /// <param name="t">The t.</param>
-        /// <returns>
-        /// 	<c>true</c> if this instance [can convert from] the specified context; otherwise, <c>false</c>.
-        /// </returns>
-        public override bool CanConvertFrom(ITypeDescriptorContext context, Type t)
-        {
-            if(t == typeof(string))
-            {
-                return true;
-            }
-            return base.CanConvertFrom(context, t);
+    /// <param name="context">The context.</param>
+    /// <param name="t">The t.</param>
+    /// <returns>
+    /// 	<c>true</c> if this instance [can convert from] the specified context; otherwise, <c>false</c>.
+    /// </returns>
+    public override bool CanConvertFrom(ITypeDescriptorContext context, Type t) {
+      if (t == typeof(string)) {
+        return true;
+      }
+      return base.CanConvertFrom(context, t);
+    }
+    /// <summary>
+    /// Converts the point to a string representation.
+    /// </summary>
+    /// <param name="context">The context.</param>
+    /// <param name="culture">The culture.</param>
+    /// <param name="value">The value.</param>
+    /// <param name="destinationType">Type of the destination.</param>
+    /// <returns></returns>
+    public override object ConvertTo(ITypeDescriptorContext context, CultureInfo culture, object value, Type destinationType) {
+      if (value is Point) {
+        Point point = (Point)value;
+        return "(" + point.X + "," + point.Y + ")";
+      }
+      return base.ConvertTo(context, culture, value, destinationType);
+
+
+    }
+
+    /// <summary>
+    /// Converts the given object to the type of this converter, using the specified context and culture information.
+    /// </summary>
+    /// <param name="context">An <see cref="T:System.ComponentModel.ITypeDescriptorContext"></see> that provides a format context.</param>
+    /// <param name="culture">The <see cref="T:System.Globalization.CultureInfo"></see> to use as the current culture.</param>
+    /// <param name="value">The <see cref="T:System.Object"></see> to convert.</param>
+    /// <returns>
+    /// An <see cref="T:System.Object"></see> that represents the converted value.
+    /// </returns>
+    /// <exception cref="T:System.NotSupportedException">The conversion cannot be performed. </exception>
+    public override object ConvertFrom(ITypeDescriptorContext context, CultureInfo culture, object value) {
+      if (value is string) {
+
+        try {
+          string thething = (string)value;
+          //remove brackets if any
+          thething = thething.Replace("(", "").Replace(")", "");
+          //now we should have only a comma
+          string[] parts = thething.Split(new char[] { ',' });
+          return new Point(int.Parse(parts[0]), int.Parse(parts[1]));
         }
-        /// <summary>
-        /// Converts the point to a string representation.
-        /// </summary>
-        /// <param name="context">The context.</param>
-        /// <param name="culture">The culture.</param>
-        /// <param name="value">The value.</param>
-        /// <param name="destinationType">Type of the destination.</param>
-        /// <returns></returns>
-        public override object ConvertTo(ITypeDescriptorContext context, CultureInfo culture, object value, Type destinationType)
-        {
-            if(value is Point)
-            {
-                Point point = (Point) value;
-                return "(" + point.X + "," + point.Y + ")";
-            }
-            return base.ConvertTo(context, culture, value, destinationType);
-            
-            
+        catch (Exception) {
+
+          return Point.Empty;
         }
+      }
+      return base.ConvertFrom(context, culture, value);
 
-        /// <summary>
-        /// Converts the given object to the type of this converter, using the specified context and culture information.
-        /// </summary>
-        /// <param name="context">An <see cref="T:System.ComponentModel.ITypeDescriptorContext"></see> that provides a format context.</param>
-        /// <param name="culture">The <see cref="T:System.Globalization.CultureInfo"></see> to use as the current culture.</param>
-        /// <param name="value">The <see cref="T:System.Object"></see> to convert.</param>
-        /// <returns>
-        /// An <see cref="T:System.Object"></see> that represents the converted value.
-        /// </returns>
-        /// <exception cref="T:System.NotSupportedException">The conversion cannot be performed. </exception>
-        public override object ConvertFrom(ITypeDescriptorContext context, CultureInfo culture, object value)
-        {
-            if(value is string) 
-             {
 
-                try
-                {
-                    string thething = (string) value;
-                    //remove brackets if any
-                    thething = thething.Replace("(", "").Replace(")", "");
-                    //now we should have only a comma
-                    string[] parts = thething.Split(new char[] { ',' });
-                    return new Point(int.Parse(parts[0]), int.Parse(parts[1]));
-                }
-                catch(Exception)
-                {
 
-                    return Point.Empty;
-                }
-            }
-            return base.ConvertFrom(context, culture, value);
-            
-            
-            
-        }
+    }
 
-        /// <summary>
-        /// Returns whether this object supports properties, using the specified context.
-        /// </summary>
-        /// <param name="context">An <see cref="T:System.ComponentModel.ITypeDescriptorContext"></see> that provides a format context.</param>
-        /// <returns>
-        /// true if <see cref="M:System.ComponentModel.TypeConverter.GetProperties(System.Object)"></see> should be called to find the properties of this object; otherwise, false.
-        /// </returns>
-        public override bool GetPropertiesSupported(ITypeDescriptorContext context)
-        {
-            return true;
-        }
+    /// <summary>
+    /// Returns whether this object supports properties, using the specified context.
+    /// </summary>
+    /// <param name="context">An <see cref="T:System.ComponentModel.ITypeDescriptorContext"></see> that provides a format context.</param>
+    /// <returns>
+    /// true if <see cref="M:System.ComponentModel.TypeConverter.GetProperties(System.Object)"></see> should be called to find the properties of this object; otherwise, false.
+    /// </returns>
+    public override bool GetPropertiesSupported(ITypeDescriptorContext context) {
+      return true;
+    }
 
-        /// <summary>
-        /// Returns a collection of properties for the type of array specified by the value parameter, using the specified context and attributes.
-        /// </summary>
-        /// <param name="context">An <see cref="T:System.ComponentModel.ITypeDescriptorContext"></see> that provides a format context.</param>
-        /// <param name="value">An <see cref="T:System.Object"></see> that specifies the type of array for which to get properties.</param>
-        /// <param name="attributes">An array of type <see cref="T:System.Attribute"></see> that is used as a filter.</param>
-        /// <returns>
-        /// A <see cref="T:System.ComponentModel.PropertyDescriptorCollection"></see> with the properties that are exposed for this data type, or null if there are no properties.
-        /// </returns>
-        public override PropertyDescriptorCollection GetProperties(ITypeDescriptorContext context, object value, Attribute[] attributes)
-        {
-            return TypeDescriptor.GetProperties(value, attributes);
-        }
+    /// <summary>
+    /// Returns a collection of properties for the type of array specified by the value parameter, using the specified context and attributes.
+    /// </summary>
+    /// <param name="context">An <see cref="T:System.ComponentModel.ITypeDescriptorContext"></see> that provides a format context.</param>
+    /// <param name="value">An <see cref="T:System.Object"></see> that specifies the type of array for which to get properties.</param>
+    /// <param name="attributes">An array of type <see cref="T:System.Attribute"></see> that is used as a filter.</param>
+    /// <returns>
+    /// A <see cref="T:System.ComponentModel.PropertyDescriptorCollection"></see> with the properties that are exposed for this data type, or null if there are no properties.
+    /// </returns>
+    public override PropertyDescriptorCollection GetProperties(ITypeDescriptorContext context, object value, Attribute[] attributes) {
+      return TypeDescriptor.GetProperties(value, attributes);
     }
+  }
 }
Index: /trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.Netron/3.0.2672.12446/Netron.Diagramming.Core-3.0.2672.12446/PropertySystem/Descriptors/ClassShapeDescriptor.cs
===================================================================
--- /trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.Netron/3.0.2672.12446/Netron.Diagramming.Core-3.0.2672.12446/PropertySystem/Descriptors/ClassShapeDescriptor.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.Netron/3.0.2672.12446/Netron.Diagramming.Core-3.0.2672.12446/PropertySystem/Descriptors/ClassShapeDescriptor.cs	(revision 4068)
@@ -1,94 +1,82 @@
 using System;
-using System.Drawing;
-using System.Collections.Generic;
-using System.Text;
-using System.ComponentModel;
-using System.Drawing.Design;
-namespace Netron.Diagramming.Core
-{
+namespace Netron.Diagramming.Core {
+  /// <summary>
+  /// Descriptor for <see cref="SimpleShapeBase"/> derived classes (i.e. most of the simple drawing elements like the <see cref="SimpleRectangle"/> shape).
+  /// </summary>
+  class ClassShapeDescriptor : ShapeBaseDescriptor {
+
     /// <summary>
-    /// Descriptor for <see cref="SimpleShapeBase"/> derived classes (i.e. most of the simple drawing elements like the <see cref="SimpleRectangle"/> shape).
+    /// Override this method to return the appropriate value corresponding to the property
     /// </summary>
-    class ClassShapeDescriptor : ShapeBaseDescriptor
-    {
+    /// <param name="sender"></param>
+    /// <param name="e"></param>
+    protected override void GetValue(object sender, PropertyEventArgs e) {
+      switch (e.Name) {
+        case "Title":
+          e.Value = (e.Component as ClassShape).Title;
+          break;
+        case "SubTitle":
+          e.Value = (e.Component as ClassShape).SubTitle;
+          break;
+        case "FreeText":
+          e.Value = (e.Component as ClassShape).FreeText;
+          break;
+        case "BodyType":
+          e.Value = (e.Component as ClassShape).BodyType;
+          break;
+        case "Folders":
+          e.Value = (e.Component as ClassShape).Folders;
+          break;
+        default:
+          base.GetValue(sender, e);
+          break;
+      }
+    }
 
-        /// <summary>
-        /// Override this method to return the appropriate value corresponding to the property
-        /// </summary>
-        /// <param name="sender"></param>
-        /// <param name="e"></param>
-        protected override void GetValue(object sender, PropertyEventArgs e)
-        {
-            switch (e.Name)
-            {
-                case "Title":
-                    e.Value = (e.Component as ClassShape).Title;
-                    break;
-                case "SubTitle":
-                    e.Value = (e.Component as ClassShape).SubTitle;
-                    break;
-                case "FreeText":
-                    e.Value = (e.Component as ClassShape).FreeText;
-                    break;
-                case "BodyType":
-                    e.Value = (e.Component as ClassShape).BodyType;
-                    break;
-                case "Folders":
-                    e.Value = (e.Component as ClassShape).Folders;
-                    break;
-                default:
-                    base.GetValue(sender, e);
-                    break;
-            }
-        }
+    /// <summary>
+    /// Override this method to set the appropriate value corresponding to the property
+    /// </summary>
+    /// <param name="sender"></param>
+    /// <param name="e"></param>
+    protected override void SetValue(object sender, PropertyEventArgs e) {
+      switch (e.Name) {
+        case "Title":
+          (e.Component as ClassShape).Title = e.Value as string;
+          break;
+        case "SubTitle":
+          (e.Component as ClassShape).SubTitle = e.Value as string;
+          break;
+        case "FreeText":
+          (e.Component as ClassShape).FreeText = e.Value as string;
+          break;
+        case "BodyType":
+          (e.Component as ClassShape).BodyType = (BodyType)Enum.Parse(typeof(BodyType), e.Value.ToString());
+          break;
+        case "Folders":
+          (e.Component as ClassShape).Folders = e.Value as CollectionBase<FolderMaterial>;
+          break;
+        default:
+          base.SetValue(sender, e);
+          break;
+      }
+    }
 
-        /// <summary>
-        /// Override this method to set the appropriate value corresponding to the property
-        /// </summary>
-        /// <param name="sender"></param>
-        /// <param name="e"></param>
-        protected override void SetValue(object sender, PropertyEventArgs e)
-        {
-            switch (e.Name)
-            {
-                case "Title":
-                   (e.Component as ClassShape).Title = e.Value as string;
-                    break;
-                case "SubTitle":
-                    (e.Component as ClassShape).SubTitle = e.Value as string;
-                    break;
-                case "FreeText":
-                    (e.Component as ClassShape).FreeText = e.Value as string;
-                    break;
-                case "BodyType":
-                    (e.Component as ClassShape).BodyType =(BodyType) Enum.Parse(typeof(BodyType), e.Value.ToString()) ;
-                    break;
-                case "Folders":
-                    (e.Component as ClassShape).Folders = e.Value as CollectionBase<FolderMaterial>;
-                    break;
-                default:
-                    base.SetValue(sender, e);
-                    break;
-            }
-        }
+    /// <summary>
+    /// Initializes a new instance of the <see cref="T:ClassShapeDescriptor"/> class.
+    /// </summary>
+    /// <param name="provider">The provider.</param>
+    /// <param name="type">The type.</param>
+    public ClassShapeDescriptor(ShapeProvider provider, Type type)
+      : base(provider, type) {
+      this.AddProperty("Title", typeof(string), constContent, "The title appearing at the top of the shape.");
+      this.AddProperty("SubTitle", typeof(string), constContent, "The sub-title appearing underneath the title.");
+      this.AddProperty("FreeText", typeof(string), constContent, "The text of the body when the shape is set to free-text mode.");
+      this.AddProperty("BodyType", typeof(BodyType), constContent, "The body type.");
+      this.AddProperty("Folders", typeof(CollectionBase<FolderMaterial>), constContent, "The folders when the shape is set to list mode.");
 
-        /// <summary>
-        /// Initializes a new instance of the <see cref="T:ClassShapeDescriptor"/> class.
-        /// </summary>
-        /// <param name="provider">The provider.</param>
-        /// <param name="type">The type.</param>
-        public ClassShapeDescriptor(ShapeProvider provider, Type type)
-            : base(provider, type)
-        {
-            this.AddProperty("Title", typeof(string),constContent,"The title appearing at the top of the shape.");
-            this.AddProperty("SubTitle", typeof(string), constContent, "The sub-title appearing underneath the title.");
-            this.AddProperty("FreeText", typeof(string), constContent, "The text of the body when the shape is set to free-text mode.");
-            this.AddProperty("BodyType", typeof(BodyType), constContent, "The body type.");
-            this.AddProperty("Folders", typeof(CollectionBase<FolderMaterial>), constContent, "The folders when the shape is set to list mode.");            
-
-        }
+    }
 
 
-    }
+  }
 }
 
Index: /trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.Netron/3.0.2672.12446/Netron.Diagramming.Core-3.0.2672.12446/PropertySystem/Descriptors/ComplexShapeBaseDescriptor.cs
===================================================================
--- /trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.Netron/3.0.2672.12446/Netron.Diagramming.Core-3.0.2672.12446/PropertySystem/Descriptors/ComplexShapeBaseDescriptor.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.Netron/3.0.2672.12446/Netron.Diagramming.Core-3.0.2672.12446/PropertySystem/Descriptors/ComplexShapeBaseDescriptor.cs	(revision 4068)
@@ -1,46 +1,34 @@
 using System;
-using System.Drawing;
-using System.Collections.Generic;
-using System.Text;
-using System.ComponentModel;
-using System.Drawing.Design;
-namespace Netron.Diagramming.Core
-{
-    /// <summary>
-    /// Descriptor for <see cref="SimpleShapeBase"/> derived classes (i.e. most of the simple drawing elements like the <see cref="SimpleRectangle"/> shape).
-    /// </summary>
-    class ComplexShapeBaseDescriptor : ShapeBaseDescriptor
-    {
+namespace Netron.Diagramming.Core {
+  /// <summary>
+  /// Descriptor for <see cref="SimpleShapeBase"/> derived classes (i.e. most of the simple drawing elements like the <see cref="SimpleRectangle"/> shape).
+  /// </summary>
+  class ComplexShapeBaseDescriptor : ShapeBaseDescriptor {
 
-        protected override void GetValue(object sender, PropertyEventArgs e)
-        {
-            switch (e.Name)
-            {
-                case "Materials":
-                    e.Value = (e.Component as ComplexShapeBase).Children;
-                    break;
-                default:
-                    base.GetValue(sender, e);
-                    break;
-            }
-        }
+    protected override void GetValue(object sender, PropertyEventArgs e) {
+      switch (e.Name) {
+        case "Materials":
+          e.Value = (e.Component as ComplexShapeBase).Children;
+          break;
+        default:
+          base.GetValue(sender, e);
+          break;
+      }
+    }
 
-        protected override void SetValue(object sender, PropertyEventArgs e)
-        {
-            switch (e.Name)
-            {                
-                default:
-                    base.SetValue(sender, e);
-                    break;
-            }
-        }
+    protected override void SetValue(object sender, PropertyEventArgs e) {
+      switch (e.Name) {
+        default:
+          base.SetValue(sender, e);
+          break;
+      }
+    }
 
-        public ComplexShapeBaseDescriptor(ShapeProvider provider, Type type)
-            : base(provider, type)
-        {
-            this.AddProperty("Materials", typeof(CollectionBase<IShapeMaterial>),constLayout,"The collection of shape materials.");            
-        }
+    public ComplexShapeBaseDescriptor(ShapeProvider provider, Type type)
+      : base(provider, type) {
+      this.AddProperty("Materials", typeof(CollectionBase<IShapeMaterial>), constLayout, "The collection of shape materials.");
+    }
 
 
-    }
+  }
 }
Index: /trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.Netron/3.0.2672.12446/Netron.Diagramming.Core-3.0.2672.12446/PropertySystem/Descriptors/ConnectionBaseDescriptor.cs
===================================================================
--- /trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.Netron/3.0.2672.12446/Netron.Diagramming.Core-3.0.2672.12446/PropertySystem/Descriptors/ConnectionBaseDescriptor.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.Netron/3.0.2672.12446/Netron.Diagramming.Core-3.0.2672.12446/PropertySystem/Descriptors/ConnectionBaseDescriptor.cs	(revision 4068)
@@ -1,73 +1,64 @@
 using System;
 using System.Drawing;
-using System.Collections.Generic;
-using System.Text;
-using System.ComponentModel;
 using System.Drawing.Design;
-namespace Netron.Diagramming.Core
-{
-    class ConnectionBaseDescriptor : DiagramEntityBaseDescriptor
-    {
+namespace Netron.Diagramming.Core {
+  class ConnectionBaseDescriptor : DiagramEntityBaseDescriptor {
 
-        #region Constants
-        #endregion
+    #region Constants
+    #endregion
 
-        #region Fields
+    #region Fields
 
-        #endregion
+    #endregion
 
-        #region Properties
+    #region Properties
 
-        #endregion
+    #endregion
 
-        #region Constructor
-        /// <summary>
-        /// Initializes a new instance of the <see cref="T:ConnectionBaseDescriptor"/> class.
-        /// </summary>
-        /// <param name="provider">The provider.</param>
-        /// <param name="objectType">Type of the object.</param>
-        public ConnectionBaseDescriptor(ConnectionProvider provider, Type objectType)
-            : base(provider, objectType)
-        {
-            AddBaseProperties();
-        }
-        #endregion
+    #region Constructor
+    /// <summary>
+    /// Initializes a new instance of the <see cref="T:ConnectionBaseDescriptor"/> class.
+    /// </summary>
+    /// <param name="provider">The provider.</param>
+    /// <param name="objectType">Type of the object.</param>
+    public ConnectionBaseDescriptor(ConnectionProvider provider, Type objectType)
+      : base(provider, objectType) {
+      AddBaseProperties();
+    }
+    #endregion
 
-        #region Methods
-        /// <summary>
-        /// Adds the properties of the <see cref="ShapeBase"/>
-        /// </summary>
-        private void AddBaseProperties()
-        {
-            this.AddProperty("From", typeof(Point), constLayout, "The location of the initial connector.", Point.Empty, typeof(UITypeEditor), typeof(Netron.Diagramming.Core.PointConverter));
-            this.AddProperty("To", typeof(Point), constLayout, "The locationof the end connector.", Point.Empty, typeof(UITypeEditor), typeof(Netron.Diagramming.Core.PointConverter));
-        }
+    #region Methods
+    /// <summary>
+    /// Adds the properties of the <see cref="ShapeBase"/>
+    /// </summary>
+    private void AddBaseProperties() {
+      this.AddProperty("From", typeof(Point), constLayout, "The location of the initial connector.", Point.Empty, typeof(UITypeEditor), typeof(Netron.Diagramming.Core.PointConverter));
+      this.AddProperty("To", typeof(Point), constLayout, "The locationof the end connector.", Point.Empty, typeof(UITypeEditor), typeof(Netron.Diagramming.Core.PointConverter));
+    }
 
 
-        /// <summary>
-        /// Override this method to return the appropriate value corresponding to the property
-        /// </summary>
-        /// <param name="sender"></param>
-        /// <param name="e"></param>
-        protected override void GetValue(object sender, PropertyEventArgs e)
-        {
-            base.GetValue(sender, e);
-            switch (e.Name.ToLower())
-            {
-                case "to":
-                    e.Value = (e.Component as ConnectionBase).To.Point;
-                    break;
-                case "from":
-                    e.Value = (e.Component as ConnectionBase).From.Point;
-                    break;
+    /// <summary>
+    /// Override this method to return the appropriate value corresponding to the property
+    /// </summary>
+    /// <param name="sender"></param>
+    /// <param name="e"></param>
+    protected override void GetValue(object sender, PropertyEventArgs e) {
+      base.GetValue(sender, e);
+      switch (e.Name.ToLower()) {
+        case "to":
+          e.Value = (e.Component as ConnectionBase).To.Point;
+          break;
+        case "from":
+          e.Value = (e.Component as ConnectionBase).From.Point;
+          break;
 
 
 
-            }
+      }
 
 
-        }
+    }
 
-        #endregion
-    }
+    #endregion
+  }
 }
Index: /trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.Netron/3.0.2672.12446/Netron.Diagramming.Core-3.0.2672.12446/PropertySystem/Descriptors/ConnectionDescriptor.cs
===================================================================
--- /trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.Netron/3.0.2672.12446/Netron.Diagramming.Core-3.0.2672.12446/PropertySystem/Descriptors/ConnectionDescriptor.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.Netron/3.0.2672.12446/Netron.Diagramming.Core-3.0.2672.12446/PropertySystem/Descriptors/ConnectionDescriptor.cs	(revision 4068)
@@ -1,59 +1,50 @@
 using System;
-using System.Collections.Generic;
-using System.Text;
 
-namespace Netron.Diagramming.Core
-{
+namespace Netron.Diagramming.Core {
+  /// <summary>
+  /// Descriptor for <see cref="SimpleShapeBase"/> derived classes (i.e. most of the simple drawing elements like the <see cref="SimpleRectangle"/> shape).
+  /// </summary>
+  class ConnectionDescriptor : ConnectionBaseDescriptor {
+
     /// <summary>
-    /// Descriptor for <see cref="SimpleShapeBase"/> derived classes (i.e. most of the simple drawing elements like the <see cref="SimpleRectangle"/> shape).
+    /// Override this method to return the appropriate value corresponding to the property
     /// </summary>
-    class ConnectionDescriptor : ConnectionBaseDescriptor
-    {
+    /// <param name="sender"></param>
+    /// <param name="e"></param>
+    protected override void GetValue(object sender, PropertyEventArgs e) {
+      switch (e.Name) {
+        case "Demo":
+          e.Value = 123456;
+          break;
+        default:
+          base.GetValue(sender, e);
+          break;
+      }
+    }
 
-        /// <summary>
-        /// Override this method to return the appropriate value corresponding to the property
-        /// </summary>
-        /// <param name="sender"></param>
-        /// <param name="e"></param>
-        protected override void GetValue(object sender, PropertyEventArgs e)
-        {
-            switch (e.Name)
-            {
-                case "Demo":
-                    e.Value = 123456;
-                    break;
-                default:
-                    base.GetValue(sender, e);
-                    break;
-            }
-        }
+    /// <summary>
+    /// Override this method to set the appropriate value corresponding to the property
+    /// </summary>
+    /// <param name="sender"></param>
+    /// <param name="e"></param>
+    protected override void SetValue(object sender, PropertyEventArgs e) {
+      switch (e.Name) {
+        default:
+          base.SetValue(sender, e);
+          break;
+      }
+    }
 
-        /// <summary>
-        /// Override this method to set the appropriate value corresponding to the property
-        /// </summary>
-        /// <param name="sender"></param>
-        /// <param name="e"></param>
-        protected override void SetValue(object sender, PropertyEventArgs e)
-        {
-            switch (e.Name)
-            {                
-                default:
-                    base.SetValue(sender, e);
-                    break;
-            }
-        }
-
-        /// <summary>
-        /// Initializes a new instance of the <see cref="T:ConnectionDescriptor"/> class.
-        /// </summary>
-        /// <param name="provider">The provider.</param>
-        /// <param name="type">The type.</param>
-        public ConnectionDescriptor(ConnectionProvider provider, Type type)
-            : base(provider, type)
-        {
-            this.AddProperty("Demo", typeof(int));            
-        }
+    /// <summary>
+    /// Initializes a new instance of the <see cref="T:ConnectionDescriptor"/> class.
+    /// </summary>
+    /// <param name="provider">The provider.</param>
+    /// <param name="type">The type.</param>
+    public ConnectionDescriptor(ConnectionProvider provider, Type type)
+      : base(provider, type) {
+      this.AddProperty("Demo", typeof(int));
+    }
 
 
-    }
+  }
 }
Index: /trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.Netron/3.0.2672.12446/Netron.Diagramming.Core-3.0.2672.12446/PropertySystem/Descriptors/ControlDescriptor.cs
===================================================================
--- /trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.Netron/3.0.2672.12446/Netron.Diagramming.Core-3.0.2672.12446/PropertySystem/Descriptors/ControlDescriptor.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.Netron/3.0.2672.12446/Netron.Diagramming.Core-3.0.2672.12446/PropertySystem/Descriptors/ControlDescriptor.cs	(revision 4068)
@@ -1,47 +1,38 @@
 using System;
-using System.Collections.Generic;
-using System.Text;
 using System.Drawing;
-namespace Netron.Diagramming.Core
-{
-    /// <summary>
-    /// Descriptor for <see cref="SimpleShapeBase"/> derived classes (i.e. most of the simple drawing elements like the <see cref="SimpleRectangle"/> shape).
-    /// </summary>
-    class ControlDescriptor : DescriptorBase
-    {
+namespace Netron.Diagramming.Core {
+  /// <summary>
+  /// Descriptor for <see cref="SimpleShapeBase"/> derived classes (i.e. most of the simple drawing elements like the <see cref="SimpleRectangle"/> shape).
+  /// </summary>
+  class ControlDescriptor : DescriptorBase {
 
-        protected override void GetValue(object sender, PropertyEventArgs e)
-        {
-            switch (e.Name)
-            {
-                case "BackColor":
-                    e.Value = (e.Component as DiagramControlBase).BackColor;
-                    break;
-                default:
-                    base.GetValue(sender, e);
-                    break;
-            }
-        }
+    protected override void GetValue(object sender, PropertyEventArgs e) {
+      switch (e.Name) {
+        case "BackColor":
+          e.Value = (e.Component as DiagramControlBase).BackColor;
+          break;
+        default:
+          base.GetValue(sender, e);
+          break;
+      }
+    }
 
-        protected override void SetValue(object sender, PropertyEventArgs e)
-        {
-            switch (e.Name)
-            {                
-                case "BackColor":
-                    (e.Component as DiagramControlBase).BackColor = (Color) e.Value;
-                    break;
-                default:
-                    base.SetValue(sender, e);
-                    break;
-            }
-        }
+    protected override void SetValue(object sender, PropertyEventArgs e) {
+      switch (e.Name) {
+        case "BackColor":
+          (e.Component as DiagramControlBase).BackColor = (Color)e.Value;
+          break;
+        default:
+          base.SetValue(sender, e);
+          break;
+      }
+    }
 
-        public ControlDescriptor(ControlProvider provider, Type type)
-            : base(provider, type)
-        {
-            this.AddProperty("BackColor", typeof(Color));            
-        }
+    public ControlDescriptor(ControlProvider provider, Type type)
+      : base(provider, type) {
+      this.AddProperty("BackColor", typeof(Color));
+    }
 
 
-    }
+  }
 }
Index: /trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.Netron/3.0.2672.12446/Netron.Diagramming.Core-3.0.2672.12446/PropertySystem/Descriptors/DescriptorBase.cs
===================================================================
--- /trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.Netron/3.0.2672.12446/Netron.Diagramming.Core-3.0.2672.12446/PropertySystem/Descriptors/DescriptorBase.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.Netron/3.0.2672.12446/Netron.Diagramming.Core-3.0.2672.12446/PropertySystem/Descriptors/DescriptorBase.cs	(revision 4068)
@@ -1,207 +1,191 @@
 using System;
-using System.Collections.Generic;
-using System.Text;
 using System.ComponentModel;
 
-namespace Netron.Diagramming.Core
-{
+namespace Netron.Diagramming.Core {
+  /// <summary>
+  /// Abstract base class for custom descriptors based on our properties mechanism.
+  /// <remarks>
+  /// Usually you do not inherit from this class to describe properties of entities, use the appropriate 
+  /// specializations like the <see cref="ShapeBaseDescriptor"/> or <see cref="ConnectionBaseDescriptor"/> classes instead.
+  /// Also, this class does not define any properties for the property grid but contains methods and basic stuff to make the construction of
+  /// concrete descriptors easier.
+  /// </remarks>
+  /// </summary>
+  abstract class DescriptorBase : CustomTypeDescriptor {
+    #region Fields
+    //the provider to which this descriptor is attached
+    private TypeDescriptionProvider provider;
     /// <summary>
-    /// Abstract base class for custom descriptors based on our properties mechanism.
-    /// <remarks>
-    /// Usually you do not inherit from this class to describe properties of entities, use the appropriate 
-    /// specializations like the <see cref="ShapeBaseDescriptor"/> or <see cref="ConnectionBaseDescriptor"/> classes instead.
-    /// Also, this class does not define any properties for the property grid but contains methods and basic stuff to make the construction of
-    /// concrete descriptors easier.
-    /// </remarks>
+    /// the type being served
     /// </summary>
-    abstract class DescriptorBase : CustomTypeDescriptor
-    {
-        #region Fields
-        //the provider to which this descriptor is attached
-        private TypeDescriptionProvider provider;
-        /// <summary>
-        /// the type being served
-        /// </summary>
-        private Type type;
-        /// <summary>
-        /// the collection of properties displayed
-        /// </summary>
-        private PropertyDescriptorCollection mProperties;
-        #endregion
+    private Type type;
+    /// <summary>
+    /// the collection of properties displayed
+    /// </summary>
+    private PropertyDescriptorCollection mProperties;
+    #endregion
 
-        #region Properties
-        /// <summary>
-        /// Gets the collection of property descrtiptors
-        /// </summary>
-        protected PropertyDescriptorCollection Properties
-        {
-            get { return mProperties; }
-        }
-        #endregion
+    #region Properties
+    /// <summary>
+    /// Gets the collection of property descrtiptors
+    /// </summary>
+    protected PropertyDescriptorCollection Properties {
+      get { return mProperties; }
+    }
+    #endregion
 
-        #region Constructors
+    #region Constructors
 
-        /// <summary>
-        /// Initializes a new instance of the <see cref="T:DescriptorBase"/> class.
-        /// </summary>
-        /// <param name="provider">The provider.</param>
-        /// <param name="parentdescriptor">The parentdescriptor.</param>
-        /// <param name="objectType">Type of the object.</param>
-        public DescriptorBase(ShapeProvider provider, ICustomTypeDescriptor parentdescriptor, Type objectType)
-            : base(parentdescriptor)
-        {
-            this.provider = provider;
-            this.type = objectType;
-            mProperties = new PropertyDescriptorCollection(null);
-        }
+    /// <summary>
+    /// Initializes a new instance of the <see cref="T:DescriptorBase"/> class.
+    /// </summary>
+    /// <param name="provider">The provider.</param>
+    /// <param name="parentdescriptor">The parentdescriptor.</param>
+    /// <param name="objectType">Type of the object.</param>
+    public DescriptorBase(ShapeProvider provider, ICustomTypeDescriptor parentdescriptor, Type objectType)
+      : base(parentdescriptor) {
+      this.provider = provider;
+      this.type = objectType;
+      mProperties = new PropertyDescriptorCollection(null);
+    }
 
-        /// <summary>
-        /// Initializes a new instance of the <see cref="T:DescriptorBase"/> class.
-        /// </summary>
-        /// <param name="provider">The provider.</param>
-        /// <param name="objectType">Type of the object.</param>
-        public DescriptorBase(TypeDescriptionProvider provider, Type objectType)
-            : base()
-        {
-            this.provider = provider;
-            this.type = objectType;
-            mProperties = new PropertyDescriptorCollection(null);            
-        }
-        #endregion
+    /// <summary>
+    /// Initializes a new instance of the <see cref="T:DescriptorBase"/> class.
+    /// </summary>
+    /// <param name="provider">The provider.</param>
+    /// <param name="objectType">Type of the object.</param>
+    public DescriptorBase(TypeDescriptionProvider provider, Type objectType)
+      : base() {
+      this.provider = provider;
+      this.type = objectType;
+      mProperties = new PropertyDescriptorCollection(null);
+    }
+    #endregion
 
-        #region Methods
+    #region Methods
 
-        #region AddProperty overloads
-        /// <summary>
-        /// Adds a new property to the property descriptor collection.
-        /// </summary>
-        /// <param name="name">The name of the property displayed in the property grid.</param>
-        /// <param name="type">The fully qualified name of the type of the property.</param>
-        public void AddProperty(string name, Type type)
-        {
-            PropertySpec widthSpec = new PropertySpec(name, type);
-            PropertySpecDescriptor pd = widthSpec.ToPropertyDescriptor();
-            pd.OnGetValue += new EventHandler<PropertyEventArgs>(GetValue);
-            pd.OnSetValue += new EventHandler<PropertyEventArgs>(SetValue);
-            mProperties.Add(pd);
-        }
-        /// <summary>
-        /// Adds a new property to the property descriptor collection.
-        /// </summary>
-        /// <param name="name">The name of the property displayed in the property grid.</param>
-        /// <param name="type">The fully qualified name of the type of the property.</param>
-        /// <param name="category">The category under which the property is displayed in the
-        /// property grid.</param>
-        public void AddProperty(string name, Type type, string category)
-        {
-            PropertySpec widthSpec = new PropertySpec(name, type, category);
-            PropertySpecDescriptor pd = widthSpec.ToPropertyDescriptor();
-            pd.OnGetValue += new EventHandler<PropertyEventArgs>(GetValue);
-            pd.OnSetValue += new EventHandler<PropertyEventArgs>(SetValue);
-            mProperties.Add(pd);
-        }
-        /// <summary>
-        /// Adds a new property to the property descriptor collection.
-        /// </summary>
-        /// <param name="name">The name of the property displayed in the property grid.</param>
-        /// <param name="type">The fully qualified name of the type of the property.</param>
-        /// <param name="category">The category under which the property is displayed in the
-        /// property grid.</param>
-        /// <param name="description">A string that is displayed in the help area of the
-        /// property grid.</param>
-        public void AddProperty(string name, Type type, string category, string description)
-        {
-            PropertySpec widthSpec = new PropertySpec(name, type, category, description);
-            PropertySpecDescriptor pd = widthSpec.ToPropertyDescriptor();
-            pd.OnGetValue += new EventHandler<PropertyEventArgs>(GetValue);
-            pd.OnSetValue += new EventHandler<PropertyEventArgs>(SetValue);
-            mProperties.Add(pd);
-        }
-        /// <summary>
-        /// Adds a new property to the property descriptor collection.
-        /// </summary>
-        /// <param name="name">The name of the property displayed in the property grid.</param>
-        /// <param name="type">The fully qualified name of the type of the property.</param>
-        /// <param name="category">The category under which the property is displayed in the
-        /// property grid.</param>
-        /// <param name="description">A string that is displayed in the help area of the
-        /// property grid.</param>
-        /// <param name="defaultValue">The default value of the property, or null if there is
-        /// no default value.</param>
-        public void AddProperty(string name, Type type, string category, string description, object defaultValue)
-        {
-            PropertySpec widthSpec = new PropertySpec(name, type, category, description, defaultValue);
-            PropertySpecDescriptor pd = widthSpec.ToPropertyDescriptor();
-            pd.OnGetValue += new EventHandler<PropertyEventArgs>(GetValue);
-            pd.OnSetValue += new EventHandler<PropertyEventArgs>(SetValue);
-            mProperties.Add(pd);
-        }
-        /// <summary>
-        /// Adds a new property to the property descriptor collection.
-        /// </summary>
-        /// <param name="name">The name of the property displayed in the property grid.</param>
-        /// <param name="type">A Type that represents the type of the property.</param>
-        /// <param name="category">The category under which the property is displayed in the
-        /// property grid.</param>
-        /// <param name="description">A string that is displayed in the help area of the
-        /// property grid.</param>
-        /// <param name="defaultValue">The default value of the property, or null if there is
-        /// no default value.</param>
-        /// <param name="editor">The Type that represents the type of the editor for this
-        /// property.  This type must derive from UITypeEditor.</param>
-        /// <param name="typeConverter">The Type that represents the type of the type
-        /// converter for this property.  This type must derive from TypeConverter.</param>
-        public void AddProperty(string name, Type type, string category, string description, object defaultValue, Type editor, Type typeConverter)
-        {
-            PropertySpec widthSpec = new PropertySpec(name, type, category, description, defaultValue, editor, typeConverter);
-            PropertySpecDescriptor pd = widthSpec.ToPropertyDescriptor();
-            pd.OnGetValue += new EventHandler<PropertyEventArgs>(GetValue);
-            pd.OnSetValue += new EventHandler<PropertyEventArgs>(SetValue);
-            mProperties.Add(pd);
-        }
-        #endregion
+    #region AddProperty overloads
+    /// <summary>
+    /// Adds a new property to the property descriptor collection.
+    /// </summary>
+    /// <param name="name">The name of the property displayed in the property grid.</param>
+    /// <param name="type">The fully qualified name of the type of the property.</param>
+    public void AddProperty(string name, Type type) {
+      PropertySpec widthSpec = new PropertySpec(name, type);
+      PropertySpecDescriptor pd = widthSpec.ToPropertyDescriptor();
+      pd.OnGetValue += new EventHandler<PropertyEventArgs>(GetValue);
+      pd.OnSetValue += new EventHandler<PropertyEventArgs>(SetValue);
+      mProperties.Add(pd);
+    }
+    /// <summary>
+    /// Adds a new property to the property descriptor collection.
+    /// </summary>
+    /// <param name="name">The name of the property displayed in the property grid.</param>
+    /// <param name="type">The fully qualified name of the type of the property.</param>
+    /// <param name="category">The category under which the property is displayed in the
+    /// property grid.</param>
+    public void AddProperty(string name, Type type, string category) {
+      PropertySpec widthSpec = new PropertySpec(name, type, category);
+      PropertySpecDescriptor pd = widthSpec.ToPropertyDescriptor();
+      pd.OnGetValue += new EventHandler<PropertyEventArgs>(GetValue);
+      pd.OnSetValue += new EventHandler<PropertyEventArgs>(SetValue);
+      mProperties.Add(pd);
+    }
+    /// <summary>
+    /// Adds a new property to the property descriptor collection.
+    /// </summary>
+    /// <param name="name">The name of the property displayed in the property grid.</param>
+    /// <param name="type">The fully qualified name of the type of the property.</param>
+    /// <param name="category">The category under which the property is displayed in the
+    /// property grid.</param>
+    /// <param name="description">A string that is displayed in the help area of the
+    /// property grid.</param>
+    public void AddProperty(string name, Type type, string category, string description) {
+      PropertySpec widthSpec = new PropertySpec(name, type, category, description);
+      PropertySpecDescriptor pd = widthSpec.ToPropertyDescriptor();
+      pd.OnGetValue += new EventHandler<PropertyEventArgs>(GetValue);
+      pd.OnSetValue += new EventHandler<PropertyEventArgs>(SetValue);
+      mProperties.Add(pd);
+    }
+    /// <summary>
+    /// Adds a new property to the property descriptor collection.
+    /// </summary>
+    /// <param name="name">The name of the property displayed in the property grid.</param>
+    /// <param name="type">The fully qualified name of the type of the property.</param>
+    /// <param name="category">The category under which the property is displayed in the
+    /// property grid.</param>
+    /// <param name="description">A string that is displayed in the help area of the
+    /// property grid.</param>
+    /// <param name="defaultValue">The default value of the property, or null if there is
+    /// no default value.</param>
+    public void AddProperty(string name, Type type, string category, string description, object defaultValue) {
+      PropertySpec widthSpec = new PropertySpec(name, type, category, description, defaultValue);
+      PropertySpecDescriptor pd = widthSpec.ToPropertyDescriptor();
+      pd.OnGetValue += new EventHandler<PropertyEventArgs>(GetValue);
+      pd.OnSetValue += new EventHandler<PropertyEventArgs>(SetValue);
+      mProperties.Add(pd);
+    }
+    /// <summary>
+    /// Adds a new property to the property descriptor collection.
+    /// </summary>
+    /// <param name="name">The name of the property displayed in the property grid.</param>
+    /// <param name="type">A Type that represents the type of the property.</param>
+    /// <param name="category">The category under which the property is displayed in the
+    /// property grid.</param>
+    /// <param name="description">A string that is displayed in the help area of the
+    /// property grid.</param>
+    /// <param name="defaultValue">The default value of the property, or null if there is
+    /// no default value.</param>
+    /// <param name="editor">The Type that represents the type of the editor for this
+    /// property.  This type must derive from UITypeEditor.</param>
+    /// <param name="typeConverter">The Type that represents the type of the type
+    /// converter for this property.  This type must derive from TypeConverter.</param>
+    public void AddProperty(string name, Type type, string category, string description, object defaultValue, Type editor, Type typeConverter) {
+      PropertySpec widthSpec = new PropertySpec(name, type, category, description, defaultValue, editor, typeConverter);
+      PropertySpecDescriptor pd = widthSpec.ToPropertyDescriptor();
+      pd.OnGetValue += new EventHandler<PropertyEventArgs>(GetValue);
+      pd.OnSetValue += new EventHandler<PropertyEventArgs>(SetValue);
+      mProperties.Add(pd);
+    }
+    #endregion
 
 
-        
 
-        /// <summary>
-        /// Overrides the method to retun the collection of properties we defined internally
-        /// </summary>
-        /// <param name="attributes"></param>
-        /// <returns></returns>
-        public override PropertyDescriptorCollection GetProperties(Attribute[] attributes)
-        {
-            return mProperties;
-        }
 
-        /// <summary>
-        /// Returns a collection of property descriptors for the object represented by this type descriptor.
-        /// </summary>
-        /// <returns>
-        /// A <see cref="T:System.ComponentModel.PropertyDescriptorCollection"></see> containing the property descriptions for the object represented by this type descriptor. The default is <see cref="F:System.ComponentModel.PropertyDescriptorCollection.Empty"></see>.
-        /// </returns>
-        public override PropertyDescriptorCollection GetProperties()
-        {
-            return GetProperties(null);
-        }
-        /// <summary>
-        /// Override this method to return the appropriate value corresponding to the property
-        /// </summary>
-        /// <param name="sender"></param>
-        /// <param name="e"></param>
-        protected virtual void GetValue(object sender, PropertyEventArgs e)
-        {
+    /// <summary>
+    /// Overrides the method to retun the collection of properties we defined internally
+    /// </summary>
+    /// <param name="attributes"></param>
+    /// <returns></returns>
+    public override PropertyDescriptorCollection GetProperties(Attribute[] attributes) {
+      return mProperties;
+    }
 
-        }
+    /// <summary>
+    /// Returns a collection of property descriptors for the object represented by this type descriptor.
+    /// </summary>
+    /// <returns>
+    /// A <see cref="T:System.ComponentModel.PropertyDescriptorCollection"></see> containing the property descriptions for the object represented by this type descriptor. The default is <see cref="F:System.ComponentModel.PropertyDescriptorCollection.Empty"></see>.
+    /// </returns>
+    public override PropertyDescriptorCollection GetProperties() {
+      return GetProperties(null);
+    }
+    /// <summary>
+    /// Override this method to return the appropriate value corresponding to the property
+    /// </summary>
+    /// <param name="sender"></param>
+    /// <param name="e"></param>
+    protected virtual void GetValue(object sender, PropertyEventArgs e) {
 
-        /// <summary>
-        /// Override this method to set the appropriate value corresponding to the property
-        /// </summary>
-        /// <param name="sender"></param>
-        /// <param name="e"></param>
-        protected virtual void SetValue(object sender, PropertyEventArgs e)
-        {
-        } 
-        #endregion
     }
+
+    /// <summary>
+    /// Override this method to set the appropriate value corresponding to the property
+    /// </summary>
+    /// <param name="sender"></param>
+    /// <param name="e"></param>
+    protected virtual void SetValue(object sender, PropertyEventArgs e) {
+    }
+    #endregion
+  }
 }
Index: /trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.Netron/3.0.2672.12446/Netron.Diagramming.Core-3.0.2672.12446/PropertySystem/Descriptors/DiagramEntityBaseDescriptor.cs
===================================================================
--- /trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.Netron/3.0.2672.12446/Netron.Diagramming.Core-3.0.2672.12446/PropertySystem/Descriptors/DiagramEntityBaseDescriptor.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.Netron/3.0.2672.12446/Netron.Diagramming.Core-3.0.2672.12446/PropertySystem/Descriptors/DiagramEntityBaseDescriptor.cs	(revision 4068)
@@ -1,118 +1,107 @@
 using System;
+using System.ComponentModel;
 using System.Drawing;
-using System.Collections.Generic;
-using System.Text;
-using System.ComponentModel;
-using System.Drawing.Design;
-namespace Netron.Diagramming.Core
-{
+namespace Netron.Diagramming.Core {
+  /// <summary>
+  /// Abstract base class for all descriptors of diagram entities inheriting from <see cref="DiagramEntityBase"/>.
+  /// This descriptor collects all properties common to all the entities inheriting from the <see cref="IDiagramEntity"/> interface.
+  /// </summary>
+  abstract class DiagramEntityBaseDescriptor : DescriptorBase {
+
+    #region Constants
     /// <summary>
-    /// Abstract base class for all descriptors of diagram entities inheriting from <see cref="DiagramEntityBase"/>.
-    /// This descriptor collects all properties common to all the entities inheriting from the <see cref="IDiagramEntity"/> interface.
+    /// the 'Layout' section
     /// </summary>
-    abstract class DiagramEntityBaseDescriptor : DescriptorBase
-    {
+    protected const string constLayout = "Layout";
+    /// <summary>
+    /// the 'General' section
+    /// </summary>
+    protected const string constGeneral = "General";
+    /// <summary>
+    /// the 'content' section
+    /// </summary>
+    protected const string constContent = "Content";
+    #endregion
 
-        #region Constants
-        /// <summary>
-        /// the 'Layout' section
-        /// </summary>
-        protected const string constLayout = "Layout";
-        /// <summary>
-        /// the 'General' section
-        /// </summary>
-        protected const string constGeneral = "General";
-        /// <summary>
-        /// the 'content' section
-        /// </summary>
-        protected const string constContent = "Content";
-        #endregion
+    #region Fields
 
-        #region Fields
+    #endregion
 
-        #endregion
+    #region Properties
 
-        #region Properties
+    #endregion
 
-        #endregion
+    #region Constructor
+    /// <summary>
+    /// Initializes a new instance of the <see cref="DiagramEntityBaseDescriptor"/> class.
+    /// </summary>
+    /// <param name="provider">The provider.</param>
+    /// <param name="objectType">Type of the object.</param>
+    public DiagramEntityBaseDescriptor(TypeDescriptionProvider provider, Type objectType)
+      : base(provider, objectType) {
+      AddBaseProperties();
+    }
+    #endregion
 
-        #region Constructor
-        /// <summary>
-        /// Initializes a new instance of the <see cref="DiagramEntityBaseDescriptor"/> class.
-        /// </summary>
-        /// <param name="provider">The provider.</param>
-        /// <param name="objectType">Type of the object.</param>
-        public DiagramEntityBaseDescriptor(TypeDescriptionProvider provider, Type objectType)
-            : base(provider, objectType)
-        {
-            AddBaseProperties();
-        }
-        #endregion
-
-        #region Methods
-        /// <summary>
-        /// Adds the base properties of the <see cref="ShapeBase"/>
-        /// </summary>
-private void AddBaseProperties()
-{
-    this.AddProperty("Entity Name", typeof(string), constGeneral, "The name of the type");
-    this.AddProperty("Name", typeof(string), constGeneral, "The name of the entity");
-    this.AddProperty("Rectangle", typeof(Rectangle), constLayout, "The bounding rectangle of the entity");
-    this.AddProperty("Scene index", typeof(int), constLayout, "The index of the entity in the scane graph.");
-    this.AddProperty("Tag", typeof(object), constLayout, "General purpose tag.");
-}
+    #region Methods
+    /// <summary>
+    /// Adds the base properties of the <see cref="ShapeBase"/>
+    /// </summary>
+    private void AddBaseProperties() {
+      this.AddProperty("Entity Name", typeof(string), constGeneral, "The name of the type");
+      this.AddProperty("Name", typeof(string), constGeneral, "The name of the entity");
+      this.AddProperty("Rectangle", typeof(Rectangle), constLayout, "The bounding rectangle of the entity");
+      this.AddProperty("Scene index", typeof(int), constLayout, "The index of the entity in the scane graph.");
+      this.AddProperty("Tag", typeof(object), constLayout, "General purpose tag.");
+    }
 
 
-        /// <summary>
-        /// Override this method to return the appropriate value corresponding to the property
-        /// </summary>
-        /// <param name="sender"></param>
-        /// <param name="e"></param>
-        protected override void GetValue(object sender, PropertyEventArgs e)
-        {
-            switch (e.Name.ToLower())
-            {
-                case "entity name":
-                    e.Value = (e.Component as DiagramEntityBase).EntityName;
-                    break;
-                case "name":
-                    e.Value = (e.Component as DiagramEntityBase).Name;
-                    break;
-                case "rectangle":
-                    e.Value = (e.Component as DiagramEntityBase).Rectangle;
-                    break;
-                case "scene index":
-                    e.Value = (e.Component as DiagramEntityBase).SceneIndex;
-                    break;
-                case "tag":
-                    e.Value = (e.Component as DiagramEntityBase).Tag;
-                    break;
-            }
+    /// <summary>
+    /// Override this method to return the appropriate value corresponding to the property
+    /// </summary>
+    /// <param name="sender"></param>
+    /// <param name="e"></param>
+    protected override void GetValue(object sender, PropertyEventArgs e) {
+      switch (e.Name.ToLower()) {
+        case "entity name":
+          e.Value = (e.Component as DiagramEntityBase).EntityName;
+          break;
+        case "name":
+          e.Value = (e.Component as DiagramEntityBase).Name;
+          break;
+        case "rectangle":
+          e.Value = (e.Component as DiagramEntityBase).Rectangle;
+          break;
+        case "scene index":
+          e.Value = (e.Component as DiagramEntityBase).SceneIndex;
+          break;
+        case "tag":
+          e.Value = (e.Component as DiagramEntityBase).Tag;
+          break;
+      }
 
 
-        }
+    }
 
 
 
-        /// <summary>
-        /// Override this method to set the appropriate value corresponding to the property
-        /// </summary>
-        /// <param name="sender"></param>
-        /// <param name="e"></param>
-        protected override void SetValue(object sender, PropertyEventArgs e)
-        {
-            switch (e.Name.ToLower())
-            {
-                case "name":
-                    (e.Component as DiagramEntityBase).Name = (string)e.Value;
-                    break;
-                case "tag":
-                    (e.Component as DiagramEntityBase).Tag = (object) e.Value;
-                    break;
-            }
-        }
+    /// <summary>
+    /// Override this method to set the appropriate value corresponding to the property
+    /// </summary>
+    /// <param name="sender"></param>
+    /// <param name="e"></param>
+    protected override void SetValue(object sender, PropertyEventArgs e) {
+      switch (e.Name.ToLower()) {
+        case "name":
+          (e.Component as DiagramEntityBase).Name = (string)e.Value;
+          break;
+        case "tag":
+          (e.Component as DiagramEntityBase).Tag = (object)e.Value;
+          break;
+      }
+    }
 
 
-        #endregion
-    }
+    #endregion
+  }
 }
Index: /trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.Netron/3.0.2672.12446/Netron.Diagramming.Core-3.0.2672.12446/PropertySystem/Descriptors/ShapeBaseDescriptor.cs
===================================================================
--- /trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.Netron/3.0.2672.12446/Netron.Diagramming.Core-3.0.2672.12446/PropertySystem/Descriptors/ShapeBaseDescriptor.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.Netron/3.0.2672.12446/Netron.Diagramming.Core-3.0.2672.12446/PropertySystem/Descriptors/ShapeBaseDescriptor.cs	(revision 4068)
@@ -1,106 +1,95 @@
 using System;
 using System.Drawing;
-using System.Collections.Generic;
-using System.Text;
-using System.ComponentModel;
 using System.Drawing.Design;
-namespace Netron.Diagramming.Core
-{
+namespace Netron.Diagramming.Core {
+  /// <summary>
+  /// Abstract base class for more specialized instances of the <see cref="ShapeBase"/> class.
+  /// </summary>
+  abstract class ShapeBaseDescriptor : DiagramEntityBaseDescriptor {
+
+    #region Constants
+    #endregion
+
+    #region Fields
+
+    #endregion
+
+    #region Properties
+
+    #endregion
+
+    #region Constructor
     /// <summary>
-    /// Abstract base class for more specialized instances of the <see cref="ShapeBase"/> class.
+    /// Initializes a new instance of the <see cref="ShapeBaseDescriptor"/> class.
     /// </summary>
-    abstract class ShapeBaseDescriptor : DiagramEntityBaseDescriptor
-    {
+    /// <param name="provider">The provider.</param>
+    /// <param name="objectType">Type of the object.</param>
+    public ShapeBaseDescriptor(ShapeProvider provider, Type objectType)
+      : base(provider, objectType) {
+      AddBaseProperties();
+    }
+    #endregion
 
-        #region Constants
-        #endregion
-
-        #region Fields
-
-        #endregion
-
-        #region Properties
-
-        #endregion
-
-        #region Constructor
-        /// <summary>
-        /// Initializes a new instance of the <see cref="ShapeBaseDescriptor"/> class.
-        /// </summary>
-        /// <param name="provider">The provider.</param>
-        /// <param name="objectType">Type of the object.</param>
-        public ShapeBaseDescriptor(ShapeProvider provider, Type objectType)
-            : base(provider, objectType)
-        {
-            AddBaseProperties();
-        }
-        #endregion
-
-        #region Methods
-        /// <summary>
-        /// Adds the properties of the <see cref="ShapeBase"/>
-        /// </summary>
-        private void AddBaseProperties()
-        {
-            this.AddProperty("Width", typeof(int), constLayout, "The width of the shape.");
-            this.AddProperty("Height", typeof(int), constLayout, "The height of the shape.");
-            this.AddProperty("Location", typeof(Point), constLayout, "The location of the shape.", Point.Empty, typeof(UITypeEditor), typeof(Netron.Diagramming.Core.PointConverter));
-        }
+    #region Methods
+    /// <summary>
+    /// Adds the properties of the <see cref="ShapeBase"/>
+    /// </summary>
+    private void AddBaseProperties() {
+      this.AddProperty("Width", typeof(int), constLayout, "The width of the shape.");
+      this.AddProperty("Height", typeof(int), constLayout, "The height of the shape.");
+      this.AddProperty("Location", typeof(Point), constLayout, "The location of the shape.", Point.Empty, typeof(UITypeEditor), typeof(Netron.Diagramming.Core.PointConverter));
+    }
 
 
-        /// <summary>
-        /// Override this method to return the appropriate value corresponding to the property
-        /// </summary>
-        /// <param name="sender"></param>
-        /// <param name="e"></param>
-        protected override void GetValue(object sender, PropertyEventArgs e)
-        {
-            base.GetValue(sender, e);
-            switch (e.Name.ToLower())
-            {
-                case "width":
-                    e.Value = (e.Component as ShapeBase).Width;
-                    break;
-                case "height":
-                    e.Value = (e.Component as ShapeBase).Height;
-                    break;
-                case "location":
-                    e.Value = (e.Component as ShapeBase).Location;
-                    break;
+    /// <summary>
+    /// Override this method to return the appropriate value corresponding to the property
+    /// </summary>
+    /// <param name="sender"></param>
+    /// <param name="e"></param>
+    protected override void GetValue(object sender, PropertyEventArgs e) {
+      base.GetValue(sender, e);
+      switch (e.Name.ToLower()) {
+        case "width":
+          e.Value = (e.Component as ShapeBase).Width;
+          break;
+        case "height":
+          e.Value = (e.Component as ShapeBase).Height;
+          break;
+        case "location":
+          e.Value = (e.Component as ShapeBase).Location;
+          break;
 
 
-            }
+      }
 
 
-        }
+    }
 
 
 
-        /// <summary>
-        /// Override this method to set the appropriate value corresponding to the property
-        /// </summary>
-        /// <param name="sender"></param>
-        /// <param name="e"></param>
-        protected override void SetValue(object sender, PropertyEventArgs e)
-        {
-            base.SetValue(sender, e);
+    /// <summary>
+    /// Override this method to set the appropriate value corresponding to the property
+    /// </summary>
+    /// <param name="sender"></param>
+    /// <param name="e"></param>
+    protected override void SetValue(object sender, PropertyEventArgs e) {
+      base.SetValue(sender, e);
 
-            switch (e.Name.ToLower())
-            {
-                case "width":
-                    (e.Component as ShapeBase).Width = (int)e.Value;
-                    break;
-                case "height":
-                    (e.Component as ShapeBase).Height = (int)e.Value;
-                    break;
-                case "location":
-                    Point p = (Point)e.Value;
-                    (e.Component as ShapeBase).Location = new Point(p.X, p.Y);
-                    break;
-            }
-        }
+      switch (e.Name.ToLower()) {
+        case "width":
+          (e.Component as ShapeBase).Width = (int)e.Value;
+          break;
+        case "height":
+          (e.Component as ShapeBase).Height = (int)e.Value;
+          break;
+        case "location":
+          Point p = (Point)e.Value;
+          (e.Component as ShapeBase).Location = new Point(p.X, p.Y);
+          break;
+      }
+    }
 
 
-        #endregion
-    }
+    #endregion
+  }
 }
Index: /trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.Netron/3.0.2672.12446/Netron.Diagramming.Core-3.0.2672.12446/PropertySystem/Descriptors/SimpleShapeBaseDescriptor.cs
===================================================================
--- /trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.Netron/3.0.2672.12446/Netron.Diagramming.Core-3.0.2672.12446/PropertySystem/Descriptors/SimpleShapeBaseDescriptor.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.Netron/3.0.2672.12446/Netron.Diagramming.Core-3.0.2672.12446/PropertySystem/Descriptors/SimpleShapeBaseDescriptor.cs	(revision 4068)
@@ -1,44 +1,35 @@
 using System;
-using System.Collections.Generic;
-using System.Text;
 
-namespace Netron.Diagramming.Core
-{
-    /// <summary>
-    /// Descriptor for <see cref="SimpleShapeBase"/> derived classes (i.e. most of the simple drawing elements like the <see cref="SimpleRectangle"/> shape).
-    /// </summary>
-    class SimpleShapeBaseDescriptor : ShapeBaseDescriptor
-    {
+namespace Netron.Diagramming.Core {
+  /// <summary>
+  /// Descriptor for <see cref="SimpleShapeBase"/> derived classes (i.e. most of the simple drawing elements like the <see cref="SimpleRectangle"/> shape).
+  /// </summary>
+  class SimpleShapeBaseDescriptor : ShapeBaseDescriptor {
 
-        protected override void GetValue(object sender, PropertyEventArgs e)
-        {
-            switch (e.Name)
-            {
-                case "Demo":
-                    e.Value = 123456;
-                    break;
-                default:
-                    base.GetValue(sender, e);
-                    break;
-            }
-        }
+    protected override void GetValue(object sender, PropertyEventArgs e) {
+      switch (e.Name) {
+        case "Demo":
+          e.Value = 123456;
+          break;
+        default:
+          base.GetValue(sender, e);
+          break;
+      }
+    }
 
-        protected override void SetValue(object sender, PropertyEventArgs e)
-        {
-            switch (e.Name)
-            {                
-                default:
-                    base.SetValue(sender, e);
-                    break;
-            }
-        }
+    protected override void SetValue(object sender, PropertyEventArgs e) {
+      switch (e.Name) {
+        default:
+          base.SetValue(sender, e);
+          break;
+      }
+    }
 
-        public SimpleShapeBaseDescriptor(ShapeProvider provider, Type type)
-            : base(provider, type)
-        {
-            this.AddProperty("Demo", typeof(int));            
-        }
+    public SimpleShapeBaseDescriptor(ShapeProvider provider, Type type)
+      : base(provider, type) {
+      this.AddProperty("Demo", typeof(int));
+    }
 
 
-    }
+  }
 }
Index: /trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.Netron/3.0.2672.12446/Netron.Diagramming.Core-3.0.2672.12446/PropertySystem/Editors/ShapeMaterialCollectionEditor.cs
===================================================================
--- /trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.Netron/3.0.2672.12446/Netron.Diagramming.Core-3.0.2672.12446/PropertySystem/Editors/ShapeMaterialCollectionEditor.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.Netron/3.0.2672.12446/Netron.Diagramming.Core-3.0.2672.12446/PropertySystem/Editors/ShapeMaterialCollectionEditor.cs	(revision 4068)
@@ -1,44 +1,33 @@
-using System;
-using System.Windows.Forms;
 using System.Collections.Generic;
-using System.Text;
-using System.Drawing;
 using System.ComponentModel.Design;
-using System.ComponentModel;
-using System.Drawing.Design; 
 
-namespace Netron.Diagramming.Core
-{
+namespace Netron.Diagramming.Core {
+  /// <summary>
+  /// This editor is used to edit items from e.g. the <see cref="FolderMaterial"/> via the property grid. This is a generic editor so it
+  /// can be used to edit any collection of <see cref="IShapeMaterial"/> items.
+  /// </summary>
+  /// <typeparam name="T"></typeparam>
+  public class ShapeMaterialCollectionEditor<T> : CollectionEditor where T : IShapeMaterial {
     /// <summary>
-    /// This editor is used to edit items from e.g. the <see cref="FolderMaterial"/> via the property grid. This is a generic editor so it
-    /// can be used to edit any collection of <see cref="IShapeMaterial"/> items.
+    /// Initializes a new instance of the <see cref="T:ShapeMaterialCollectionEditor&lt;T&gt;"/> class.
     /// </summary>
-    /// <typeparam name="T"></typeparam>
-    public class ShapeMaterialCollectionEditor<T> : CollectionEditor where T : IShapeMaterial
-    {
-        /// <summary>
-        /// Initializes a new instance of the <see cref="T:ShapeMaterialCollectionEditor&lt;T&gt;"/> class.
-        /// </summary>
-        public ShapeMaterialCollectionEditor()
-            : base(typeof(List<T>))
-        { }
+    public ShapeMaterialCollectionEditor()
+      : base(typeof(List<T>)) { }
 
-        /// <summary>
-        /// Sets the items.
-        /// </summary>
-        /// <param name="editValue">The edit value.</param>
-        /// <param name="value">The value.</param>
-        /// <returns></returns>
-        protected override object SetItems(object editValue, object[] value)
-        {
-            CollectionBase<IShapeMaterial> entries = editValue as CollectionBase<IShapeMaterial>;
-            entries.Clear();
-            for (int k = 0; k < value.Length; k++)
-            {
-                entries.Add(value[k] as IShapeMaterial);
-            }
-            object retValue = base.SetItems(entries, value);
-            return retValue;
-        }
-    } 
+    /// <summary>
+    /// Sets the items.
+    /// </summary>
+    /// <param name="editValue">The edit value.</param>
+    /// <param name="value">The value.</param>
+    /// <returns></returns>
+    protected override object SetItems(object editValue, object[] value) {
+      CollectionBase<IShapeMaterial> entries = editValue as CollectionBase<IShapeMaterial>;
+      entries.Clear();
+      for (int k = 0; k < value.Length; k++) {
+        entries.Add(value[k] as IShapeMaterial);
+      }
+      object retValue = base.SetItems(entries, value);
+      return retValue;
+    }
+  }
 }
Index: /trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.Netron/3.0.2672.12446/Netron.Diagramming.Core-3.0.2672.12446/PropertySystem/PropertyEventArgs.cs
===================================================================
--- /trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.Netron/3.0.2672.12446/Netron.Diagramming.Core-3.0.2672.12446/PropertySystem/PropertyEventArgs.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.Netron/3.0.2672.12446/Netron.Diagramming.Core-3.0.2672.12446/PropertySystem/PropertyEventArgs.cs	(revision 4068)
@@ -1,81 +1,69 @@
 using System;
-using System.Collections;
-using System.ComponentModel;
-using System.Drawing.Design;
-namespace Netron.Diagramming.Core
-{
-	/// <summary>
-	/// Provides data for the GetValue and SetValue events of the custom descriptors.
-	/// </summary>
-	public class PropertyEventArgs : EventArgs
-	{
-		#region Fields
-        /// <summary>
-        /// the mComponent of which the properties are examined
-        /// </summary>
-        private object mComponent;
-        /// <summary>
-        /// the value of the property
-        /// </summary>
-		private object mValue;
-        /// <summary>
-        /// the name of the property
-        /// </summary>
-        private string mName;                
-		#endregion
+namespace Netron.Diagramming.Core {
+  /// <summary>
+  /// Provides data for the GetValue and SetValue events of the custom descriptors.
+  /// </summary>
+  public class PropertyEventArgs : EventArgs {
+    #region Fields
+    /// <summary>
+    /// the mComponent of which the properties are examined
+    /// </summary>
+    private object mComponent;
+    /// <summary>
+    /// the value of the property
+    /// </summary>
+    private object mValue;
+    /// <summary>
+    /// the name of the property
+    /// </summary>
+    private string mName;
+    #endregion
 
-		#region Properties
-        /// <summary>
-        /// Gets or sets the mName of the property.
-        /// </summary>
-        /// <value>The mName.</value>
-        public string Name
-        {
-            get
-            {
-                return mName;
-            }
-            set
-            {
-                mName = value;
-            }
-        }
-		/// <summary>
-		/// Gets or sets the current value of the property.
-		/// </summary>
-		public object Value
-		{
-			get { return mValue; }
-			set { mValue = value; }
-		}
-		/// <summary>
-		/// Gets the component whose properties is examined
-		/// </summary> 
-		public object Component
-		{
-			get
-			{ 
-				return mComponent;
-			}
-		}
-		#endregion
+    #region Properties
+    /// <summary>
+    /// Gets or sets the mName of the property.
+    /// </summary>
+    /// <value>The mName.</value>
+    public string Name {
+      get {
+        return mName;
+      }
+      set {
+        mName = value;
+      }
+    }
+    /// <summary>
+    /// Gets or sets the current value of the property.
+    /// </summary>
+    public object Value {
+      get { return mValue; }
+      set { mValue = value; }
+    }
+    /// <summary>
+    /// Gets the component whose properties is examined
+    /// </summary> 
+    public object Component {
+      get {
+        return mComponent;
+      }
+    }
+    #endregion
 
-		#region Constructors
-        /// <summary>
-        /// Initializes a new instance of the PropertyEventArgs class.
-        /// </summary>
-        /// <param name="mComponent">The m component.</param>
-        /// <param name="mName">The name of the property.</param>
-        /// <param name="mValue">The value.</param>
-		public PropertyEventArgs(object mComponent, string mName, object mValue)
-		{
-            this.mComponent = mComponent;
-			this.mValue = mValue;
-            this.mName = mName;
-		}
-		
-		
-		#endregion
-	}
+    #region Constructors
+    /// <summary>
+    /// Initializes a new instance of the PropertyEventArgs class.
+    /// </summary>
+    /// <param name="mComponent">The m component.</param>
+    /// <param name="mName">The name of the property.</param>
+    /// <param name="mValue">The value.</param>
+    public PropertyEventArgs(object mComponent, string mName, object mValue) {
+      this.mComponent = mComponent;
+      this.mValue = mValue;
+      this.mName = mName;
+    }
+
+
+    #endregion
+  }
 
 }
Index: /trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.Netron/3.0.2672.12446/Netron.Diagramming.Core-3.0.2672.12446/PropertySystem/PropertySpecDescriptor.cs
===================================================================
--- /trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.Netron/3.0.2672.12446/Netron.Diagramming.Core-3.0.2672.12446/PropertySystem/PropertySpecDescriptor.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.Netron/3.0.2672.12446/Netron.Diagramming.Core-3.0.2672.12446/PropertySystem/PropertySpecDescriptor.cs	(revision 4068)
@@ -1,178 +1,161 @@
 using System;
-using System.Collections.Generic;
-using System.Text;
 using System.ComponentModel;
-namespace Netron.Diagramming.Core
-{
+namespace Netron.Diagramming.Core {
+  /// <summary>
+  /// An inherited property descriptor which can be created dynamically on the basis of a <see cref="PropertySpec"/> specification.
+  /// </summary>
+  internal class PropertySpecDescriptor : PropertyDescriptor {
+    #region events
     /// <summary>
-    /// An inherited property descriptor which can be created dynamically on the basis of a <see cref="PropertySpec"/> specification.
+    /// Occurs when the property grid accesses the value of the property
     /// </summary>
-    internal class PropertySpecDescriptor : PropertyDescriptor
-    {
-        #region events
-        /// <summary>
-        /// Occurs when the property grid accesses the value of the property
-        /// </summary>
-        public event EventHandler<PropertyEventArgs> OnGetValue;
-        /// <summary>
-        /// Occurs when the property grid tries to set the value of the property
-        /// </summary>
-        public event EventHandler<PropertyEventArgs> OnSetValue;
-		 
-	    #endregion
+    public event EventHandler<PropertyEventArgs> OnGetValue;
+    /// <summary>
+    /// Occurs when the property grid tries to set the value of the property
+    /// </summary>
+    public event EventHandler<PropertyEventArgs> OnSetValue;
 
-        #region Fields
-        private PropertySpec item;
-        #endregion
+    #endregion
 
-        #region Constructor
-        /// <summary>
-        /// Initializes a new instance of the <see cref="T:PropertySpecDescriptor"/> class.
-        /// </summary>
-        /// <param name="item">The item.</param>
-        /// <param name="attributes">the attributes to be used on the descriptor. Note that the attributes of the <see cref="PropertySpec"/> have to be previously taken over and overloaded.</param>
-        public PropertySpecDescriptor(PropertySpec item, Attribute[] attributes) : base(item.Name, attributes)
-        {
-            this.item = item;
-        }
-        #endregion
+    #region Fields
+    private PropertySpec item;
+    #endregion
 
-        #region Methods
+    #region Constructor
+    /// <summary>
+    /// Initializes a new instance of the <see cref="T:PropertySpecDescriptor"/> class.
+    /// </summary>
+    /// <param name="item">The item.</param>
+    /// <param name="attributes">the attributes to be used on the descriptor. Note that the attributes of the <see cref="PropertySpec"/> have to be previously taken over and overloaded.</param>
+    public PropertySpecDescriptor(PropertySpec item, Attribute[] attributes)
+      : base(item.Name, attributes) {
+      this.item = item;
+    }
+    #endregion
 
-        /// <summary>
-        /// When overridden in a derived class, gets the type of the component this property is bound to.
-        /// </summary>
-        /// <value></value>
-        /// <returns>A <see cref="T:System.Type"></see> that represents the type of component this property is bound to. When the <see cref="M:System.ComponentModel.PropertyDescriptor.GetValue(System.Object)"></see> or <see cref="M:System.ComponentModel.PropertyDescriptor.SetValue(System.Object,System.Object)"></see> methods are invoked, the object specified might be an instance of this type.</returns>
-        public override Type ComponentType
-        {
-            get
-            {
-                return item.GetType();
-            }
-        }
+    #region Methods
 
-        /// <summary>
-        /// When overridden in a derived class, gets a value indicating whether this property is read-only.
-        /// </summary>
-        /// <value></value>
-        /// <returns>true if the property is read-only; otherwise, false.</returns>
-        public override bool IsReadOnly
-        {
-            get
-            {
-                return (Attributes.Matches(ReadOnlyAttribute.Yes));
-            }
-        }
+    /// <summary>
+    /// When overridden in a derived class, gets the type of the component this property is bound to.
+    /// </summary>
+    /// <value></value>
+    /// <returns>A <see cref="T:System.Type"></see> that represents the type of component this property is bound to. When the <see cref="M:System.ComponentModel.PropertyDescriptor.GetValue(System.Object)"></see> or <see cref="M:System.ComponentModel.PropertyDescriptor.SetValue(System.Object,System.Object)"></see> methods are invoked, the object specified might be an instance of this type.</returns>
+    public override Type ComponentType {
+      get {
+        return item.GetType();
+      }
+    }
 
-        /// <summary>
-        /// When overridden in a derived class, gets the type of the property.
-        /// </summary>
-        /// <value></value>
-        /// <returns>A <see cref="T:System.Type"></see> that represents the type of the property.</returns>
-        public override Type PropertyType
-        {
-            get
-            {
-                return Type.GetType(item.TypeName);
-            }
-        }
+    /// <summary>
+    /// When overridden in a derived class, gets a value indicating whether this property is read-only.
+    /// </summary>
+    /// <value></value>
+    /// <returns>true if the property is read-only; otherwise, false.</returns>
+    public override bool IsReadOnly {
+      get {
+        return (Attributes.Matches(ReadOnlyAttribute.Yes));
+      }
+    }
 
-        /// <summary>
-        /// When overridden in a derived class, returns whether resetting an object changes its value.
-        /// </summary>
-        /// <param name="component">The component to test for reset capability.</param>
-        /// <returns>
-        /// true if resetting the component changes its value; otherwise, false.
-        /// </returns>
-        public override bool CanResetValue(object component)
-        {
-            if(item.DefaultValue == null)
-                return false;
-            else
-                return !this.GetValue(component).Equals(item.DefaultValue);
-        }
+    /// <summary>
+    /// When overridden in a derived class, gets the type of the property.
+    /// </summary>
+    /// <value></value>
+    /// <returns>A <see cref="T:System.Type"></see> that represents the type of the property.</returns>
+    public override Type PropertyType {
+      get {
+        return Type.GetType(item.TypeName);
+      }
+    }
 
-        /// <summary>
-        /// When overridden in a derived class, gets the current value of the property on a component.
-        /// </summary>
-        /// <param name="component">The component with the property for which to retrieve the value.</param>
-        /// <returns>
-        /// The value of a property for a given component.
-        /// </returns>
-        public override object GetValue(object component)
-        {
-            // Have the property bag raise an event to get the current value
-            // of the property.
+    /// <summary>
+    /// When overridden in a derived class, returns whether resetting an object changes its value.
+    /// </summary>
+    /// <param name="component">The component to test for reset capability.</param>
+    /// <returns>
+    /// true if resetting the component changes its value; otherwise, false.
+    /// </returns>
+    public override bool CanResetValue(object component) {
+      if (item.DefaultValue == null)
+        return false;
+      else
+        return !this.GetValue(component).Equals(item.DefaultValue);
+    }
 
-            PropertyEventArgs e = new PropertyEventArgs(component, base.Name, null);
-            RaiseOnGetValue(e);
-            return e.Value;
-        }
+    /// <summary>
+    /// When overridden in a derived class, gets the current value of the property on a component.
+    /// </summary>
+    /// <param name="component">The component with the property for which to retrieve the value.</param>
+    /// <returns>
+    /// The value of a property for a given component.
+    /// </returns>
+    public override object GetValue(object component) {
+      // Have the property bag raise an event to get the current value
+      // of the property.
 
-        /// <summary>
-        /// Raises the on get value.
-        /// </summary>
-        /// <param name="e">The <see cref="T:Netron.Diagramming.Core.PropertyEventArgs"/> instance containing the event data.</param>
-        private void RaiseOnGetValue(PropertyEventArgs e)
-        {
-            EventHandler<PropertyEventArgs> handler = OnGetValue;
-            if(handler != null)
-                handler(this,e);
-        }
+      PropertyEventArgs e = new PropertyEventArgs(component, base.Name, null);
+      RaiseOnGetValue(e);
+      return e.Value;
+    }
+
+    /// <summary>
+    /// Raises the on get value.
+    /// </summary>
+    /// <param name="e">The <see cref="T:Netron.Diagramming.Core.PropertyEventArgs"/> instance containing the event data.</param>
+    private void RaiseOnGetValue(PropertyEventArgs e) {
+      EventHandler<PropertyEventArgs> handler = OnGetValue;
+      if (handler != null)
+        handler(this, e);
+    }
 
 
-        /// <summary>
-        /// Raises the on set value.
-        /// </summary>
-        /// <param name="e">The <see cref="T:Netron.Diagramming.Core.PropertyEventArgs"/> instance containing the event data.</param>
-        private void RaiseOnSetValue(PropertyEventArgs e)
-        {
-            EventHandler<PropertyEventArgs> handler = OnSetValue;
-            if(handler != null)
-                handler(this,e);
-        }
+    /// <summary>
+    /// Raises the on set value.
+    /// </summary>
+    /// <param name="e">The <see cref="T:Netron.Diagramming.Core.PropertyEventArgs"/> instance containing the event data.</param>
+    private void RaiseOnSetValue(PropertyEventArgs e) {
+      EventHandler<PropertyEventArgs> handler = OnSetValue;
+      if (handler != null)
+        handler(this, e);
+    }
 
-        /// <summary>
-        /// When overridden in a derived class, resets the value for this property of the component to the default value.
-        /// </summary>
-        /// <param name="component">The component with the property value that is to be reset to the default value.</param>
-        public override void ResetValue(object component)
-        {
-            SetValue(component, item.DefaultValue);
-        }
+    /// <summary>
+    /// When overridden in a derived class, resets the value for this property of the component to the default value.
+    /// </summary>
+    /// <param name="component">The component with the property value that is to be reset to the default value.</param>
+    public override void ResetValue(object component) {
+      SetValue(component, item.DefaultValue);
+    }
 
-        /// <summary>
-        /// When overridden in a derived class, sets the value of the component to a different value.
-        /// </summary>
-        /// <param name="component">The component with the property value that is to be set.</param>
-        /// <param name="value">The new value.</param>
-        public override void SetValue(object component, object value)
-        {
-            // Have the property bag raise an event to set the current value
-            // of the property.
+    /// <summary>
+    /// When overridden in a derived class, sets the value of the component to a different value.
+    /// </summary>
+    /// <param name="component">The component with the property value that is to be set.</param>
+    /// <param name="value">The new value.</param>
+    public override void SetValue(object component, object value) {
+      // Have the property bag raise an event to set the current value
+      // of the property.
 
-            PropertyEventArgs e = new PropertyEventArgs(component, Name, value);
-            RaiseOnSetValue(e);
-        }
+      PropertyEventArgs e = new PropertyEventArgs(component, Name, value);
+      RaiseOnSetValue(e);
+    }
 
-        /// <summary>
-        /// When overridden in a derived class, determines a value indicating whether the value of this property needs to be persisted.
-        /// </summary>
-        /// <param name="component">The component with the property to be examined for persistence.</param>
-        /// <returns>
-        /// true if the property should be persisted; otherwise, false.
-        /// </returns>
-        public override bool ShouldSerializeValue(object component)
-        {
-            object val = this.GetValue(component);
+    /// <summary>
+    /// When overridden in a derived class, determines a value indicating whether the value of this property needs to be persisted.
+    /// </summary>
+    /// <param name="component">The component with the property to be examined for persistence.</param>
+    /// <returns>
+    /// true if the property should be persisted; otherwise, false.
+    /// </returns>
+    public override bool ShouldSerializeValue(object component) {
+      object val = this.GetValue(component);
 
-            if(item.DefaultValue == null && val == null)
-                return false;
-            else
-                return !val.Equals(item.DefaultValue);
-        }
+      if (item.DefaultValue == null && val == null)
+        return false;
+      else
+        return !val.Equals(item.DefaultValue);
+    }
 
-        #endregion
-    }
+    #endregion
+  }
 }
Index: /trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.Netron/3.0.2672.12446/Netron.Diagramming.Core-3.0.2672.12446/PropertySystem/Providers/ConnectionProvider.cs
===================================================================
--- /trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.Netron/3.0.2672.12446/Netron.Diagramming.Core-3.0.2672.12446/PropertySystem/Providers/ConnectionProvider.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.Netron/3.0.2672.12446/Netron.Diagramming.Core-3.0.2672.12446/PropertySystem/Providers/ConnectionProvider.cs	(revision 4068)
@@ -1,60 +1,52 @@
 using System;
-using System.Collections.Generic;
-using System.Text;
 using System.ComponentModel;
-namespace Netron.Diagramming.Core
-{
+namespace Netron.Diagramming.Core {
+  /// <summary>
+  /// Type descriptor provider for all descendants of the <see cref="ConnectionBase"/> classes. 
+  /// </summary>
+  class ConnectionProvider : TypeDescriptionProvider {
+    #region Fields
+
     /// <summary>
-    /// Type descriptor provider for all descendants of the <see cref="ConnectionBase"/> classes. 
+    /// connection descriptor
     /// </summary>
-    class ConnectionProvider : TypeDescriptionProvider
-    {
-        #region Fields
-       
-        /// <summary>
-        /// connection descriptor
-        /// </summary>
-        private static ConnectionDescriptor connectionDescriptor;
+    private static ConnectionDescriptor connectionDescriptor;
 
-        
-        #endregion
 
-        #region Properties
-        
-        
-        #endregion
+    #endregion
 
-        #region Constructor
-        /// <summary>
-        /// Initializes a new instance of the <see cref="T:ConnectionProvider"/> class.
-        /// </summary>
-        public ConnectionProvider()
-        {
-            connectionDescriptor = new ConnectionDescriptor(this, typeof(ConnectionBase));
-        }
-        #endregion
+    #region Properties
 
-        #region Methods
-        /// <summary>
-        /// Gets a custom type descriptor for the given type and object.
-        /// </summary>
-        /// <param name="objectType">The type of object for which to retrieve the type descriptor.</param>
-        /// <param name="instance">An instance of the type. Can be null if no instance was passed to the <see cref="T:System.ComponentModel.TypeDescriptor"></see>.</param>
-        /// <returns>
-        /// An <see cref="T:System.ComponentModel.ICustomTypeDescriptor"></see> that can provide metadata for the type.
-        /// </returns>
-        public override ICustomTypeDescriptor GetTypeDescriptor(Type objectType, object instance)
-        {
-            if (typeof(ConnectionBase).IsInstanceOfType(instance))
-            {
-                return connectionDescriptor;
-            }            
-            else //if nothing found use the base descriptor
-               return base.GetTypeDescriptor(objectType, instance);
 
-       }
-        #endregion
+    #endregion
 
-   }
-  
+    #region Constructor
+    /// <summary>
+    /// Initializes a new instance of the <see cref="T:ConnectionProvider"/> class.
+    /// </summary>
+    public ConnectionProvider() {
+      connectionDescriptor = new ConnectionDescriptor(this, typeof(ConnectionBase));
+    }
+    #endregion
+
+    #region Methods
+    /// <summary>
+    /// Gets a custom type descriptor for the given type and object.
+    /// </summary>
+    /// <param name="objectType">The type of object for which to retrieve the type descriptor.</param>
+    /// <param name="instance">An instance of the type. Can be null if no instance was passed to the <see cref="T:System.ComponentModel.TypeDescriptor"></see>.</param>
+    /// <returns>
+    /// An <see cref="T:System.ComponentModel.ICustomTypeDescriptor"></see> that can provide metadata for the type.
+    /// </returns>
+    public override ICustomTypeDescriptor GetTypeDescriptor(Type objectType, object instance) {
+      if (typeof(ConnectionBase).IsInstanceOfType(instance)) {
+        return connectionDescriptor;
+      } else //if nothing found use the base descriptor
+        return base.GetTypeDescriptor(objectType, instance);
+
+    }
+    #endregion
+
+  }
+
 }
Index: /trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.Netron/3.0.2672.12446/Netron.Diagramming.Core-3.0.2672.12446/PropertySystem/Providers/ControlProvider.cs
===================================================================
--- /trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.Netron/3.0.2672.12446/Netron.Diagramming.Core-3.0.2672.12446/PropertySystem/Providers/ControlProvider.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.Netron/3.0.2672.12446/Netron.Diagramming.Core-3.0.2672.12446/PropertySystem/Providers/ControlProvider.cs	(revision 4068)
@@ -1,57 +1,49 @@
 using System;
-using System.Collections.Generic;
-using System.Text;
 using System.ComponentModel;
-namespace Netron.Diagramming.Core
-{
+namespace Netron.Diagramming.Core {
+  /// <summary>
+  /// Type descriptor provider for  the <see cref="DiagramControlBase"/> class. 
+  /// </summary>
+  class ControlProvider : TypeDescriptionProvider {
+    #region Fields
+
     /// <summary>
-    /// Type descriptor provider for  the <see cref="DiagramControlBase"/> class. 
+    /// control descriptor
     /// </summary>
-    class ControlProvider : TypeDescriptionProvider
-    {
-        #region Fields
-      
-        /// <summary>
-        /// control descriptor
-        /// </summary>
-        private static ControlDescriptor controlDescriptor;
+    private static ControlDescriptor controlDescriptor;
 
-        
-        #endregion
 
-        #region Properties
-        
-        
-        #endregion
+    #endregion
 
-        #region Constructor
-        public ControlProvider()
-        {
-            controlDescriptor = new ControlDescriptor(this, typeof(DiagramControlBase));
-        }
-        #endregion
+    #region Properties
 
-        #region Methods
-        /// <summary>
-        /// Gets a custom type descriptor for the given type and object.
-        /// </summary>
-        /// <param name="objectType">The type of object for which to retrieve the type descriptor.</param>
-        /// <param name="instance">An instance of the type. Can be null if no instance was passed to the <see cref="T:System.ComponentModel.TypeDescriptor"></see>.</param>
-        /// <returns>
-        /// An <see cref="T:System.ComponentModel.ICustomTypeDescriptor"></see> that can provide metadata for the type.
-        /// </returns>
-public override ICustomTypeDescriptor GetTypeDescriptor(Type objectType, object instance)
-{
-    if(typeof(DiagramControlBase).IsInstanceOfType(instance) )
-    {                  
+
+    #endregion
+
+    #region Constructor
+    public ControlProvider() {
+      controlDescriptor = new ControlDescriptor(this, typeof(DiagramControlBase));
+    }
+    #endregion
+
+    #region Methods
+    /// <summary>
+    /// Gets a custom type descriptor for the given type and object.
+    /// </summary>
+    /// <param name="objectType">The type of object for which to retrieve the type descriptor.</param>
+    /// <param name="instance">An instance of the type. Can be null if no instance was passed to the <see cref="T:System.ComponentModel.TypeDescriptor"></see>.</param>
+    /// <returns>
+    /// An <see cref="T:System.ComponentModel.ICustomTypeDescriptor"></see> that can provide metadata for the type.
+    /// </returns>
+    public override ICustomTypeDescriptor GetTypeDescriptor(Type objectType, object instance) {
+      if (typeof(DiagramControlBase).IsInstanceOfType(instance)) {
         return controlDescriptor;
-    }    
-    else //if nothing found use the base descriptor
+      } else //if nothing found use the base descriptor
         return base.GetTypeDescriptor(objectType, instance);
 
     }
-        #endregion
+    #endregion
 
-   }
-  
+  }
+
 }
Index: /trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.Netron/3.0.2672.12446/Netron.Diagramming.Core-3.0.2672.12446/PropertySystem/Providers/ShapeProvider.cs
===================================================================
--- /trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.Netron/3.0.2672.12446/Netron.Diagramming.Core-3.0.2672.12446/PropertySystem/Providers/ShapeProvider.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.Netron/3.0.2672.12446/Netron.Diagramming.Core-3.0.2672.12446/PropertySystem/Providers/ShapeProvider.cs	(revision 4068)
@@ -1,73 +1,61 @@
 using System;
-using System.Collections.Generic;
-using System.Text;
 using System.ComponentModel;
-namespace Netron.Diagramming.Core
-{
+namespace Netron.Diagramming.Core {
+  /// <summary>
+  /// Type descriptor provider for all descendants of the <see cref="ShapeBase"/> classes. 
+  /// </summary>
+  class ShapeProvider : TypeDescriptionProvider {
+    #region Fields
+
     /// <summary>
-    /// Type descriptor provider for all descendants of the <see cref="ShapeBase"/> classes. 
+    /// simple shape descriptor
     /// </summary>
-    class ShapeProvider : TypeDescriptionProvider
-    {
-        #region Fields
-        
-        /// <summary>
-        /// simple shape descriptor
-        /// </summary>
-        private static SimpleShapeBaseDescriptor simpleShapeBaseDescriptor;
-        /// <summary>
-        /// complex shape descriptor
-        /// </summary>
-        private static ComplexShapeBaseDescriptor complexShapeBaseDescriptor;
+    private static SimpleShapeBaseDescriptor simpleShapeBaseDescriptor;
+    /// <summary>
+    /// complex shape descriptor
+    /// </summary>
+    private static ComplexShapeBaseDescriptor complexShapeBaseDescriptor;
 
 
-        private static ClassShapeDescriptor classShapeDescriptor;
+    private static ClassShapeDescriptor classShapeDescriptor;
 
-        #endregion
+    #endregion
 
-        #region Properties
+    #region Properties
 
 
-        #endregion
+    #endregion
 
-        #region Constructor
-        public ShapeProvider()
-        {
-            simpleShapeBaseDescriptor = new SimpleShapeBaseDescriptor(this, typeof(SimpleShapeBase));
-            complexShapeBaseDescriptor = new ComplexShapeBaseDescriptor(this, typeof(ComplexShapeBase));
-            classShapeDescriptor = new ClassShapeDescriptor(this, typeof(ClassShape));
-        }
-        #endregion
+    #region Constructor
+    public ShapeProvider() {
+      simpleShapeBaseDescriptor = new SimpleShapeBaseDescriptor(this, typeof(SimpleShapeBase));
+      complexShapeBaseDescriptor = new ComplexShapeBaseDescriptor(this, typeof(ComplexShapeBase));
+      classShapeDescriptor = new ClassShapeDescriptor(this, typeof(ClassShape));
+    }
+    #endregion
 
-        #region Methods
-        /// <summary>
-        /// Gets a custom type descriptor for the given type and object.
-        /// </summary>
-        /// <param name="objectType">The type of object for which to retrieve the type descriptor.</param>
-        /// <param name="instance">An instance of the type. Can be null if no instance was passed to the <see cref="T:System.ComponentModel.TypeDescriptor"></see>.</param>
-        /// <returns>
-        /// An <see cref="T:System.ComponentModel.ICustomTypeDescriptor"></see> that can provide metadata for the type.
-        /// </returns>
-        public override ICustomTypeDescriptor GetTypeDescriptor(Type objectType, object instance)
-        {
-            if (typeof(SimpleShapeBase).IsInstanceOfType(instance))
-            {
-                return simpleShapeBaseDescriptor;
-            }
-            else if (typeof(ClassShape).IsInstanceOfType(instance))
-            {
-                return classShapeDescriptor;
-            }
-            else if (typeof(ComplexShapeBase).IsInstanceOfType(instance))
-            {
-                return complexShapeBaseDescriptor;
-            }
-            else //if nothing found use the base descriptor
-                return base.GetTypeDescriptor(objectType, instance);
-
-        }
-        #endregion
+    #region Methods
+    /// <summary>
+    /// Gets a custom type descriptor for the given type and object.
+    /// </summary>
+    /// <param name="objectType">The type of object for which to retrieve the type descriptor.</param>
+    /// <param name="instance">An instance of the type. Can be null if no instance was passed to the <see cref="T:System.ComponentModel.TypeDescriptor"></see>.</param>
+    /// <returns>
+    /// An <see cref="T:System.ComponentModel.ICustomTypeDescriptor"></see> that can provide metadata for the type.
+    /// </returns>
+    public override ICustomTypeDescriptor GetTypeDescriptor(Type objectType, object instance) {
+      if (typeof(SimpleShapeBase).IsInstanceOfType(instance)) {
+        return simpleShapeBaseDescriptor;
+      } else if (typeof(ClassShape).IsInstanceOfType(instance)) {
+        return classShapeDescriptor;
+      } else if (typeof(ComplexShapeBase).IsInstanceOfType(instance)) {
+        return complexShapeBaseDescriptor;
+      } else //if nothing found use the base descriptor
+        return base.GetTypeDescriptor(objectType, instance);
 
     }
+    #endregion
+
+  }
 }
 
Index: /trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.Netron/3.0.2672.12446/Netron.Diagramming.Core-3.0.2672.12446/Resources/Resource1.Designer.cs
===================================================================
--- /trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.Netron/3.0.2672.12446/Netron.Diagramming.Core-3.0.2672.12446/Resources/Resource1.Designer.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.Netron/3.0.2672.12446/Netron.Diagramming.Core-3.0.2672.12446/Resources/Resource1.Designer.cs	(revision 4068)
@@ -10,81 +10,80 @@
 
 namespace Netron.NetronLight {
-    using System;
-    
-    
+
+
+  /// <summary>
+  ///   A strongly-typed resource class, for looking up localized strings, etc.
+  /// </summary>
+  // This class was auto-generated by the StronglyTypedResourceBuilder
+  // class via a tool like ResGen or Visual Studio.
+  // To add or remove a member, edit your .ResX file then rerun ResGen
+  // with the /str option, or rebuild your VS project.
+  [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "4.0.0.0")]
+  [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
+  [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
+  internal class Resource1 {
+
+    private static global::System.Resources.ResourceManager resourceMan;
+
+    private static global::System.Globalization.CultureInfo resourceCulture;
+
+    [global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")]
+    internal Resource1() {
+    }
+
     /// <summary>
-    ///   A strongly-typed resource class, for looking up localized strings, etc.
+    ///   Returns the cached ResourceManager instance used by this class.
     /// </summary>
-    // This class was auto-generated by the StronglyTypedResourceBuilder
-    // class via a tool like ResGen or Visual Studio.
-    // To add or remove a member, edit your .ResX file then rerun ResGen
-    // with the /str option, or rebuild your VS project.
-    [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "4.0.0.0")]
-    [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
-    [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
-    internal class Resource1 {
-        
-        private static global::System.Resources.ResourceManager resourceMan;
-        
-        private static global::System.Globalization.CultureInfo resourceCulture;
-        
-        [global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")]
-        internal Resource1() {
+    [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
+    internal static global::System.Resources.ResourceManager ResourceManager {
+      get {
+        if (object.ReferenceEquals(resourceMan, null)) {
+          global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("Netron.Diagramming.Core.Resources.Resource1", typeof(Resource1).Assembly);
+          resourceMan = temp;
         }
-        
-        /// <summary>
-        ///   Returns the cached ResourceManager instance used by this class.
-        /// </summary>
-        [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
-        internal static global::System.Resources.ResourceManager ResourceManager {
-            get {
-                if (object.ReferenceEquals(resourceMan, null)) {
-                    global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("Netron.Diagramming.Core.Resources.Resource1", typeof(Resource1).Assembly);
-                    resourceMan = temp;
-                }
-                return resourceMan;
-            }
-        }
-        
-        /// <summary>
-        ///   Overrides the current thread's CurrentUICulture property for all
-        ///   resource lookups using this strongly typed resource class.
-        /// </summary>
-        [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
-        internal static global::System.Globalization.CultureInfo Culture {
-            get {
-                return resourceCulture;
-            }
-            set {
-                resourceCulture = value;
-            }
-        }
-        
-        /// <summary>
-        ///   Looks up a localized string similar to The argument is out of range..
-        /// </summary>
-        internal static string ArgumentOutOfRange {
-            get {
-                return ResourceManager.GetString("ArgumentOutOfRange", resourceCulture);
-            }
-        }
-        
-        /// <summary>
-        ///   Looks up a localized string similar to The given array is too small to contain the collection..
-        /// </summary>
-        internal static string ArrayTooSmall {
-            get {
-                return ResourceManager.GetString("ArrayTooSmall", resourceCulture);
-            }
-        }
-        
-        /// <summary>
-        ///   Looks up a localized string similar to The method is not implemented..
-        /// </summary>
-        internal static string NotImplemented {
-            get {
-                return ResourceManager.GetString("NotImplemented", resourceCulture);
-            }
-        }
+        return resourceMan;
+      }
     }
+
+    /// <summary>
+    ///   Overrides the current thread's CurrentUICulture property for all
+    ///   resource lookups using this strongly typed resource class.
+    /// </summary>
+    [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
+    internal static global::System.Globalization.CultureInfo Culture {
+      get {
+        return resourceCulture;
+      }
+      set {
+        resourceCulture = value;
+      }
+    }
+
+    /// <summary>
+    ///   Looks up a localized string similar to The argument is out of range..
+    /// </summary>
+    internal static string ArgumentOutOfRange {
+      get {
+        return ResourceManager.GetString("ArgumentOutOfRange", resourceCulture);
+      }
+    }
+
+    /// <summary>
+    ///   Looks up a localized string similar to The given array is too small to contain the collection..
+    /// </summary>
+    internal static string ArrayTooSmall {
+      get {
+        return ResourceManager.GetString("ArrayTooSmall", resourceCulture);
+      }
+    }
+
+    /// <summary>
+    ///   Looks up a localized string similar to The method is not implemented..
+    /// </summary>
+    internal static string NotImplemented {
+      get {
+        return ResourceManager.GetString("NotImplemented", resourceCulture);
+      }
+    }
+  }
 }
Index: /trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.Netron/3.0.2672.12446/Netron.Diagramming.Core-3.0.2672.12446/Ruler/Ruler.cs
===================================================================
--- /trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.Netron/3.0.2672.12446/Netron.Diagramming.Core-3.0.2672.12446/Ruler/Ruler.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.Netron/3.0.2672.12446/Netron.Diagramming.Core-3.0.2672.12446/Ruler/Ruler.cs	(revision 4068)
@@ -1,77 +1,69 @@
-using System;
 using System.ComponentModel;
 using System.Drawing;
 
-namespace Netron.Diagramming.Core
-{
+namespace Netron.Diagramming.Core {
+  /// <summary>
+  /// Abstract base classes for the rulers.
+  /// </summary>
+  public abstract class RulerBase : IPaintable {
+
+    #region Fields
+    private IView mView = null;
+
+
+    private bool mVisible;
+    #endregion
+
+    #region Properties
     /// <summary>
-    /// Abstract base classes for the rulers.
+    /// Gets or sets a value indicating whether this <see cref="T:Ruler"/> is visible.
     /// </summary>
-    public abstract class RulerBase : IPaintable
-    {
+    /// <value><c>true</c> if visible; otherwise, <c>false</c>.</value>
+    [BrowsableAttribute(true)]
+    public bool Visible {
+      get {
+        return mVisible;
+      }
 
-        #region Fields
-        private IView mView = null;
+      set {
+        mVisible = value;
+      }
+    }
+    /// <summary>
+    /// Gets the bounds.
+    /// </summary>
+    /// <value>The bounds.</value>
+    [BrowsableAttribute(false)]
+    public abstract Rectangle Rectangle { get; }
+    /// <summary>
+    /// Gets or sets the view associated to this ruler.
+    /// </summary>
+    /// <value>The IView.</value>
+    public IView View {
+      get { return mView; }
+      set { mView = value; }
+    }
+    #endregion
 
-       
-        private bool mVisible;
-        #endregion
+    #region Constructor
+    ///<summary>
+    ///Default constructor
+    ///</summary>
+    public RulerBase(IView mView) {
+      this.mView = mView;
+    }
+    #endregion
 
-        #region Properties
-        /// <summary>
-        /// Gets or sets a value indicating whether this <see cref="T:Ruler"/> is visible.
-        /// </summary>
-        /// <value><c>true</c> if visible; otherwise, <c>false</c>.</value>
-        [BrowsableAttribute(true)]
-        public bool Visible
-        {
-            get
-            {
-                return mVisible;
-            }
+    #region Methods
 
-            set
-            {
-                mVisible = value;
-            }
-        }
-        /// <summary>
-        /// Gets the bounds.
-        /// </summary>
-        /// <value>The bounds.</value>
-        [BrowsableAttribute(false)]
-        public abstract Rectangle Rectangle { get; }
-        /// <summary>
-        /// Gets or sets the view associated to this ruler.
-        /// </summary>
-        /// <value>The IView.</value>
-        public IView View
-        {
-            get { return mView; }
-            set { mView = value; }
-        }
-        #endregion
 
-        #region Constructor
-        ///<summary>
-        ///Default constructor
-        ///</summary>
-        public RulerBase(IView mView)
-        {
-            this.mView = mView;
-        }
-        #endregion
+    /// <summary>
+    /// Paints the entity using the given graphics object
+    /// </summary>
+    /// <param name="g"></param>
+    public abstract void Paint(Graphics g);
+    #endregion
 
-        #region Methods
-        
-
-        /// <summary>
-        /// Paints the entity using the given graphics object
-        /// </summary>
-        /// <param name="g"></param>
-        public abstract void Paint(Graphics g);
-        #endregion
-        
-    }
+  }
 
 }
Index: /trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.Netron/3.0.2672.12446/Netron.Diagramming.Core-3.0.2672.12446/Serialization/Ambience.Serialization.cs
===================================================================
--- /trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.Netron/3.0.2672.12446/Netron.Diagramming.Core-3.0.2672.12446/Serialization/Ambience.Serialization.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.Netron/3.0.2672.12446/Netron.Diagramming.Core-3.0.2672.12446/Serialization/Ambience.Serialization.cs	(revision 4068)
@@ -1,41 +1,35 @@
 using System;
-using System.Collections.Generic;
-using System.Text;
+using System.Diagnostics;
 using System.Drawing;
-using System.ComponentModel;
 using System.Runtime.Serialization;
+using System.Xml.Schema;
 using System.Xml.Serialization;
-using System.Diagnostics;
-using System.Xml.Schema;
-namespace Netron.Diagramming.Core
-{
+namespace Netron.Diagramming.Core {
+  /// <summary>
+  /// Complementary partial class related to (de)serialization.
+  /// </summary>
+  [Serializable]
+  public partial class Ambience : ISerializable, IXmlSerializable, IDeserializationCallback {
+    //about xml serialization of color
+    //http://dotnetified.com/PermaLink.aspx?guid=E86B447E-AA95-49B6-909F-CDA36ACF481F
+
+    #region Deserialization constructor
     /// <summary>
-    /// Complementary partial class related to (de)serialization.
+    /// Deserialization constructor
     /// </summary>
-    [Serializable]
-    public partial class Ambience : ISerializable, IXmlSerializable, IDeserializationCallback
-    {
-        //about xml serialization of color
-        //http://dotnetified.com/PermaLink.aspx?guid=E86B447E-AA95-49B6-909F-CDA36ACF481F
+    /// <param name="info">The info.</param>
+    /// <param name="context">The context.</param>
+    protected Ambience(SerializationInfo info, StreamingContext context) {
+      if (Tracing.BinaryDeserializationSwitch.Enabled)
+        Trace.WriteLine("Deserializing the fields of 'Ambience'.");
 
-        #region Deserialization constructor
-        /// <summary>
-        /// Deserialization constructor
-        /// </summary>
-        /// <param name="info">The info.</param>
-        /// <param name="context">The context.</param>
-        protected Ambience(SerializationInfo info, StreamingContext context)
-        {
-            if(Tracing.BinaryDeserializationSwitch.Enabled)
-                Trace.WriteLine("Deserializing the fields of 'Ambience'.");
+      double version = info.GetDouble("AmbienceVersion");
+      this.BackgroundColor = (Color)info.GetValue("BackgroundColor", typeof(Color));
+      this.PageColor = (Color)info.GetValue("PageBackgroundColor", typeof(Color));
+    }
+    #endregion
 
-            double version = info.GetDouble("AmbienceVersion");
-            this.BackgroundColor = (Color)info.GetValue("BackgroundColor", typeof(Color));
-            this.PageColor = (Color)info.GetValue("PageBackgroundColor", typeof(Color));
-        }
-        #endregion
-
-        #region Serialization events
-        /*
+    #region Serialization events
+    /*
         [OnSerializing]
         void OnSerializing(StreamingContext context)
@@ -50,9 +44,9 @@
             Trace.Unindent();
         }
-        */ 
-        #endregion
+        */
+    #endregion
 
-        #region Deserialization events
-        /*
+    #region Deserialization events
+    /*
         [OnDeserializing]
         void OnDeserializing(StreamingContext context)
@@ -68,106 +62,101 @@
          }
         */
-        #endregion
+    #endregion
 
-        #region Serialization
-        /// <summary>
-        /// Populates a <see cref="T:System.Runtime.Serialization.SerializationInfo"></see> with the data needed to serialize the target object.
-        /// </summary>
-        /// <param name="info">The <see cref="T:System.Runtime.Serialization.SerializationInfo"></see> to populate with data.</param>
-        /// <param name="context">The destination (see <see cref="T:System.Runtime.Serialization.StreamingContext"></see>) for this serialization.</param>
-        /// <exception cref="T:System.Security.SecurityException">The caller does not have the required permission. </exception>
-        public virtual void GetObjectData(SerializationInfo info, StreamingContext context)
-        {
-            if(Tracing.BinarySerializationSwitch.Enabled)
-                Trace.WriteLine("Serializing the fields of 'Ambience'.");
+    #region Serialization
+    /// <summary>
+    /// Populates a <see cref="T:System.Runtime.Serialization.SerializationInfo"></see> with the data needed to serialize the target object.
+    /// </summary>
+    /// <param name="info">The <see cref="T:System.Runtime.Serialization.SerializationInfo"></see> to populate with data.</param>
+    /// <param name="context">The destination (see <see cref="T:System.Runtime.Serialization.StreamingContext"></see>) for this serialization.</param>
+    /// <exception cref="T:System.Security.SecurityException">The caller does not have the required permission. </exception>
+    public virtual void GetObjectData(SerializationInfo info, StreamingContext context) {
+      if (Tracing.BinarySerializationSwitch.Enabled)
+        Trace.WriteLine("Serializing the fields of 'Ambience'.");
 
-            info.AddValue("AmbienceVersion", ambienceVersion);
+      info.AddValue("AmbienceVersion", ambienceVersion);
 
-            info.AddValue(
-                "BackgroundColor", 
-                this.BackgroundColor,
-                typeof(Color));
+      info.AddValue(
+          "BackgroundColor",
+          this.BackgroundColor,
+          typeof(Color));
 
-            info.AddValue(
-                "BackgroundType",
-                BackgroundType,
-                typeof(CanvasBackgroundTypes));
+      info.AddValue(
+          "BackgroundType",
+          BackgroundType,
+          typeof(CanvasBackgroundTypes));
 
-            info.AddValue(
-                "BackgroundGradientColor1",
-                this.BackgroundGradientColor1,
-                typeof(Color));
+      info.AddValue(
+          "BackgroundGradientColor1",
+          this.BackgroundGradientColor1,
+          typeof(Color));
 
-            info.AddValue(
-                "BackgroundGradientColor2",
-                this.BackgroundGradientColor2,
-                typeof(Color));
+      info.AddValue(
+          "BackgroundGradientColor2",
+          this.BackgroundGradientColor2,
+          typeof(Color));
 
-            info.AddValue(
-                "PageBackgroundColor", 
-                this.PageColor,
-                typeof(Color));
+      info.AddValue(
+          "PageBackgroundColor",
+          this.PageColor,
+          typeof(Color));
 
-            info.AddValue(
-                "PageBackgroundType",
-                PageBackgroundType,
-                typeof(CanvasBackgroundTypes));
+      info.AddValue(
+          "PageBackgroundType",
+          PageBackgroundType,
+          typeof(CanvasBackgroundTypes));
 
-            info.AddValue(
-                "PageBackgroundGradientColor1", 
-                this.PageGradientColor1,
-                typeof(Color));
+      info.AddValue(
+          "PageBackgroundGradientColor1",
+          this.PageGradientColor1,
+          typeof(Color));
 
-            info.AddValue(
-                "PageBackgroundGradientColor2",
-                this.PageGradientColor2,
-                typeof(Color));
-        }
-        #endregion
+      info.AddValue(
+          "PageBackgroundGradientColor2",
+          this.PageGradientColor2,
+          typeof(Color));
+    }
+    #endregion
 
-        #region Xml serialization
-        /// <summary>
-        /// This property is reserved, apply the <see cref="T:System.Xml.Serialization.XmlSchemaProviderAttribute"></see> to the class instead.
-        /// </summary>
-        /// <returns>
-        /// An <see cref="T:System.Xml.Schema.XmlSchema"></see> that describes the XML representation of the object that is produced by the <see cref="M:System.Xml.Serialization.IXmlSerializable.WriteXml(System.Xml.XmlWriter)"></see> method and consumed by the <see cref="M:System.Xml.Serialization.IXmlSerializable.ReadXml(System.Xml.XmlReader)"></see> method.
-        /// </returns>
-        public XmlSchema GetSchema()
-        {
-            throw new NotImplementedException("The method or operation is not implemented.");
-        }
+    #region Xml serialization
+    /// <summary>
+    /// This property is reserved, apply the <see cref="T:System.Xml.Serialization.XmlSchemaProviderAttribute"></see> to the class instead.
+    /// </summary>
+    /// <returns>
+    /// An <see cref="T:System.Xml.Schema.XmlSchema"></see> that describes the XML representation of the object that is produced by the <see cref="M:System.Xml.Serialization.IXmlSerializable.WriteXml(System.Xml.XmlWriter)"></see> method and consumed by the <see cref="M:System.Xml.Serialization.IXmlSerializable.ReadXml(System.Xml.XmlReader)"></see> method.
+    /// </returns>
+    public XmlSchema GetSchema() {
+      throw new NotImplementedException("The method or operation is not implemented.");
+    }
 
-        /// <summary>
-        /// Generates an object from its XML representation.
-        /// </summary>
-        /// <param name="reader">The <see cref="T:System.Xml.XmlReader"></see> stream from which the object is deserialized.</param>
-        public void ReadXml(System.Xml.XmlReader reader)
-        {
-            throw new NotImplementedException("The method or operation is not implemented.");
-        }
+    /// <summary>
+    /// Generates an object from its XML representation.
+    /// </summary>
+    /// <param name="reader">The <see cref="T:System.Xml.XmlReader"></see> stream from which the object is deserialized.</param>
+    public void ReadXml(System.Xml.XmlReader reader) {
+      throw new NotImplementedException("The method or operation is not implemented.");
+    }
 
-        /// <summary>
-        /// Converts an object into its XML representation.
-        /// </summary>
-        /// <param name="writer">The <see cref="T:System.Xml.XmlWriter"></see> stream to which the object is serialized.</param>
-        public void WriteXml(System.Xml.XmlWriter writer)
-        {
-            throw new NotImplementedException("The method or operation is not implemented.");
-        }
-        #endregion
+    /// <summary>
+    /// Converts an object into its XML representation.
+    /// </summary>
+    /// <param name="writer">The <see cref="T:System.Xml.XmlWriter"></see> stream to which the object is serialized.</param>
+    public void WriteXml(System.Xml.XmlWriter writer) {
+      throw new NotImplementedException("The method or operation is not implemented.");
+    }
+    #endregion
 
-        #region IDeserializationCallback Members
+    #region IDeserializationCallback Members
 
-        /// <summary>
-        /// Runs when the entire object graph has been deserialized.
-        /// </summary>
-        /// <param name="sender">The object that initiated the callback. The functionality for this parameter is not currently implemented.</param>
-        public void OnDeserialization(object sender)
-        {
-            if(Tracing.BinaryDeserializationSwitch.Enabled)
-                Trace.WriteLine("IDeserializationCallback of 'Ambience' called.");
-        }
-        
-        #endregion
+    /// <summary>
+    /// Runs when the entire object graph has been deserialized.
+    /// </summary>
+    /// <param name="sender">The object that initiated the callback. The functionality for this parameter is not currently implemented.</param>
+    public void OnDeserialization(object sender) {
+      if (Tracing.BinaryDeserializationSwitch.Enabled)
+        Trace.WriteLine("IDeserializationCallback of 'Ambience' called.");
     }
+
+    #endregion
+  }
 }
Index: /trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.Netron/3.0.2672.12446/Netron.Diagramming.Core-3.0.2672.12446/Serialization/Anchors.cs
===================================================================
--- /trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.Netron/3.0.2672.12446/Netron.Diagramming.Core-3.0.2672.12446/Serialization/Anchors.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.Netron/3.0.2672.12446/Netron.Diagramming.Core-3.0.2672.12446/Serialization/Anchors.cs	(revision 4068)
@@ -1,80 +1,68 @@
 using System;
 using System.Collections.Generic;
-using System.Text;
 
-namespace Netron.Diagramming.Core
-{
-    public struct Anchor
-    {
-        
-        /// <summary>
-        /// the Parent field
-        /// </summary>
-        private Guid mParent;
-        /// <summary>
-        /// Gets or sets the Parent
-        /// </summary>
-	      public Guid Parent
-	      {
-		      get { return mParent;}
-		      set { mParent = value;}
-	      }
+namespace Netron.Diagramming.Core {
+  public struct Anchor {
 
-        
-        /// <summary>
-        /// the Instance field
-        /// </summary>
-        private IConnector mInstance;
-        /// <summary>
-        /// Gets or sets the Instance
-        /// </summary>
-	      public IConnector Instance
-	      {
-		      get { return mInstance;}
-		      set { mInstance = value;}
-	      }
+    /// <summary>
+    /// the Parent field
+    /// </summary>
+    private Guid mParent;
+    /// <summary>
+    /// Gets or sets the Parent
+    /// </summary>
+    public Guid Parent {
+      get { return mParent; }
+      set { mParent = value; }
+    }
 
 
-          #region Constructor
-          ///<summary>
-          ///Default constructor
-          ///</summary>
-          public Anchor(Guid parent, IConnector instance)
-          {
-              this.mParent = parent;
-              this.mInstance = instance;
-          }
-          #endregion
-  
+    /// <summary>
+    /// the Instance field
+    /// </summary>
+    private IConnector mInstance;
+    /// <summary>
+    /// Gets or sets the Instance
+    /// </summary>
+    public IConnector Instance {
+      get { return mInstance; }
+      set { mInstance = value; }
+    }
 
+
+    #region Constructor
+    ///<summary>
+    ///Default constructor
+    ///</summary>
+    public Anchor(Guid parent, IConnector instance) {
+      this.mParent = parent;
+      this.mInstance = instance;
     }
-    public static class Anchors 
-    {
-        private static Dictionary<Guid, Anchor> innerList = new Dictionary<Guid, Anchor>();
+    #endregion
 
-        public static void Clear()
-        {
-            innerList.Clear();
-        }
 
-        public static void Add(Guid uid, Anchor anchor)
-        {
-            innerList.Add(uid, anchor);
-        }
+  }
+  public static class Anchors {
+    private static Dictionary<Guid, Anchor> innerList = new Dictionary<Guid, Anchor>();
 
-        public static bool ContainsKey(Guid uid)
-        {
-            return innerList.ContainsKey(uid);
-        }
+    public static void Clear() {
+      innerList.Clear();
+    }
 
-        public static Dictionary<Guid, Anchor>.Enumerator GetEnumerator()
-        {
-            return innerList.GetEnumerator();
-        }
+    public static void Add(Guid uid, Anchor anchor) {
+      innerList.Add(uid, anchor);
+    }
 
-        public static Anchor GetAnchor(Guid uid)
-        {
-                return innerList[uid];
-        }
+    public static bool ContainsKey(Guid uid) {
+      return innerList.ContainsKey(uid);
     }
+
+    public static Dictionary<Guid, Anchor>.Enumerator GetEnumerator() {
+      return innerList.GetEnumerator();
+    }
+
+    public static Anchor GetAnchor(Guid uid) {
+      return innerList[uid];
+    }
+  }
 }
Index: /trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.Netron/3.0.2672.12446/Netron.Diagramming.Core-3.0.2672.12446/Serialization/ClassShape.Serialization.cs
===================================================================
--- /trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.Netron/3.0.2672.12446/Netron.Diagramming.Core-3.0.2672.12446/Serialization/ClassShape.Serialization.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.Netron/3.0.2672.12446/Netron.Diagramming.Core-3.0.2672.12446/Serialization/ClassShape.Serialization.cs	(revision 4068)
@@ -1,49 +1,43 @@
 using System;
-using System.Collections.Generic;
-using System.Text;
+using System.Diagnostics;
 using System.Drawing;
-using System.ComponentModel;
 using System.Runtime.Serialization;
+using System.Xml.Schema;
 using System.Xml.Serialization;
-using System.Diagnostics;
-using System.Xml.Schema;
-namespace Netron.Diagramming.Core
-{
+namespace Netron.Diagramming.Core {
+  /// <summary>
+  /// Complementary partial class related to (de)serialization.
+  /// </summary>
+  [Serializable]
+  public partial class ClassShape : ISerializable, IXmlSerializable, IDeserializationCallback {
+    #region Deserialization constructor
     /// <summary>
-    /// Complementary partial class related to (de)serialization.
+    /// Deserialization constructor
     /// </summary>
-   [Serializable]
-    public partial class ClassShape : ISerializable, IXmlSerializable, IDeserializationCallback
-    {
-        #region Deserialization constructor
-        /// <summary>
-        /// Deserialization constructor
-        /// </summary>
-        /// <param name="info">The info.</param>
-        /// <param name="context">The context.</param>
-        protected ClassShape(SerializationInfo info, StreamingContext context)
-            : base(info, context)
-        {
+    /// <param name="info">The info.</param>
+    /// <param name="context">The context.</param>
+    protected ClassShape(SerializationInfo info, StreamingContext context)
+      : base(info, context) {
 
-            
-            if(Tracing.BinaryDeserializationSwitch.Enabled)
-                Trace.WriteLine("Deserializing the fields of 'ClassShape'.");
 
-            double version = info.GetDouble("ClassShapeVersion");
-            this.Resizable = false;
-            this.mTitle = info.GetString("Title");
-            this.mSubTitle = info.GetString("SubTitle");
-            sf.Trimming = StringTrimming.EllipsisCharacter;
-            this.textMaterial = info.GetValue("TextMaterial", typeof(LabelMaterial)) as LabelMaterial;
-            mFolders = new CollectionBase<FolderMaterial>();
-            this.Resizable = false;
-            this.mCollapsed = info.GetBoolean("Collapsed");
-            this.mBodyType = (BodyType) Enum.Parse(typeof(BodyType), info.GetString("BodyType"));
-            
-        }
-        #endregion
+      if (Tracing.BinaryDeserializationSwitch.Enabled)
+        Trace.WriteLine("Deserializing the fields of 'ClassShape'.");
 
-        #region Serialization events
-       /*
+      double version = info.GetDouble("ClassShapeVersion");
+      this.Resizable = false;
+      this.mTitle = info.GetString("Title");
+      this.mSubTitle = info.GetString("SubTitle");
+      sf.Trimming = StringTrimming.EllipsisCharacter;
+      this.textMaterial = info.GetValue("TextMaterial", typeof(LabelMaterial)) as LabelMaterial;
+      mFolders = new CollectionBase<FolderMaterial>();
+      this.Resizable = false;
+      this.mCollapsed = info.GetBoolean("Collapsed");
+      this.mBodyType = (BodyType)Enum.Parse(typeof(BodyType), info.GetString("BodyType"));
+
+    }
+    #endregion
+
+    #region Serialization events
+    /*
         [OnSerializing]
         void OnSerializing(StreamingContext context)
@@ -57,8 +51,8 @@
         }
         */
-        #endregion
+    #endregion
 
-        #region Deserialization events
-       /*
+    #region Deserialization events
+    /*
         [OnDeserializing]
         void OnDeserializing(StreamingContext context)
@@ -68,119 +62,106 @@
         }
         */
-        [OnDeserialized]
-        void OnDeserialized(StreamingContext context)
-         {
-             if(Tracing.BinaryDeserializationSwitch.Enabled)
-                Trace.WriteLine("...deserialization of 'ClassShape' finished");
-            
-             #region Loop over the children and make re-attach the events
-            foreach(IShapeMaterial material in Children)
-             {
-                 //set the parent
-                material.Shape = this;
+    [OnDeserialized]
+    void OnDeserialized(StreamingContext context) {
+      if (Tracing.BinaryDeserializationSwitch.Enabled)
+        Trace.WriteLine("...deserialization of 'ClassShape' finished");
 
-                 if(typeof(FolderMaterial).IsInstanceOfType(material))
-                 {
-                     (material as FolderMaterial).OnFolderChanged += new EventHandler<RectangleEventArgs>(folders_OnFolderChanged);
-                     mFolders.Add(material as FolderMaterial);
-                     bodyHeight += material.Rectangle.Height + 3;
-                 }
-                 else if(typeof(SwitchIconMaterial).IsInstanceOfType(material))
-                 {
-                     xicon = material as SwitchIconMaterial;
-                     xicon.Collapsed = mCollapsed;
-                     (material as SwitchIconMaterial).OnExpand += new EventHandler(xicon_OnExpand);
-                     (material as SwitchIconMaterial).OnCollapse += new EventHandler(xicon_OnCollapse);
-                 }
-             }
-            #endregion
+      #region Loop over the children and make re-attach the events
+      foreach (IShapeMaterial material in Children) {
+        //set the parent
+        material.Shape = this;
 
-             #region Set the initial state
-             if(mCollapsed)
-             {
-                 Collapse();
-             }
-             else
-             {
-                 Expand();
-             }
-             #endregion
+        if (typeof(FolderMaterial).IsInstanceOfType(material)) {
+          (material as FolderMaterial).OnFolderChanged += new EventHandler<RectangleEventArgs>(folders_OnFolderChanged);
+          mFolders.Add(material as FolderMaterial);
+          bodyHeight += material.Rectangle.Height + 3;
+        } else if (typeof(SwitchIconMaterial).IsInstanceOfType(material)) {
+          xicon = material as SwitchIconMaterial;
+          xicon.Collapsed = mCollapsed;
+          (material as SwitchIconMaterial).OnExpand += new EventHandler(xicon_OnExpand);
+          (material as SwitchIconMaterial).OnCollapse += new EventHandler(xicon_OnCollapse);
+        }
+      }
+      #endregion
 
-             #region Update the body, this will set the bodytype for example
-             UpdateBody();
-             #endregion
+      #region Set the initial state
+      if (mCollapsed) {
+        Collapse();
+      } else {
+        Expand();
+      }
+      #endregion
 
-             #region Finally, position everything
-             Transform(Rectangle);
-             #endregion
-         }
-       
-        #endregion
+      #region Update the body, this will set the bodytype for example
+      UpdateBody();
+      #endregion
 
-        #region Serialization
-         /// <summary>
-         /// Populates a <see cref="T:System.Runtime.Serialization.SerializationInfo"></see> with the data needed to serialize the target object.
-         /// </summary>
-         /// <param name="info">The <see cref="T:System.Runtime.Serialization.SerializationInfo"></see> to populate with data.</param>
-         /// <param name="context">The destination (see <see cref="T:System.Runtime.Serialization.StreamingContext"></see>) for this serialization.</param>
-         /// <exception cref="T:System.Security.SecurityException">The caller does not have the required permission. </exception>
-         public override void  GetObjectData(SerializationInfo info, StreamingContext context)
-        {
+      #region Finally, position everything
+      Transform(Rectangle);
+      #endregion
+    }
 
- 	        base.GetObjectData(info, context);
-            if (Tracing.BinarySerializationSwitch.Enabled)
-                Trace.WriteLine("Serializing the fields of 'ClassShape'.");
+    #endregion
 
-            info.AddValue("Title", this.Title);
-            info.AddValue("SubTitle", this.SubTitle);
-            info.AddValue("TextMaterial", this.textMaterial, typeof(LabelMaterial));
-            info.AddValue("Collapsed", mCollapsed);
-            info.AddValue("BodyType", mBodyType.ToString());
-            info.AddValue("ClassShapeVersion", classShapeVersion);
-        }
-        #endregion
+    #region Serialization
+    /// <summary>
+    /// Populates a <see cref="T:System.Runtime.Serialization.SerializationInfo"></see> with the data needed to serialize the target object.
+    /// </summary>
+    /// <param name="info">The <see cref="T:System.Runtime.Serialization.SerializationInfo"></see> to populate with data.</param>
+    /// <param name="context">The destination (see <see cref="T:System.Runtime.Serialization.StreamingContext"></see>) for this serialization.</param>
+    /// <exception cref="T:System.Security.SecurityException">The caller does not have the required permission. </exception>
+    public override void GetObjectData(SerializationInfo info, StreamingContext context) {
 
-        #region Xml serialization
-        /// <summary>
-        /// This property is reserved, apply the <see cref="T:System.Xml.Serialization.XmlSchemaProviderAttribute"></see> to the class instead.
-        /// </summary>
-        /// <returns>
-        /// An <see cref="T:System.Xml.Schema.XmlSchema"></see> that describes the XML representation of the object that is produced by the <see cref="M:System.Xml.Serialization.IXmlSerializable.WriteXml(System.Xml.XmlWriter)"></see> method and consumed by the <see cref="M:System.Xml.Serialization.IXmlSerializable.ReadXml(System.Xml.XmlReader)"></see> method.
-        /// </returns>
-        public override XmlSchema GetSchema()
-        {
-            throw new NotImplementedException("The method or operation is not implemented.");
-        }
+      base.GetObjectData(info, context);
+      if (Tracing.BinarySerializationSwitch.Enabled)
+        Trace.WriteLine("Serializing the fields of 'ClassShape'.");
 
-        /// <summary>
-        /// Generates an object from its XML representation.
-        /// </summary>
-        /// <param name="reader">The <see cref="T:System.Xml.XmlReader"></see> stream from which the object is deserialized.</param>
-        public override void ReadXml(System.Xml.XmlReader reader)
-        {
-            throw new NotImplementedException("The method or operation is not implemented.");
-        }
+      info.AddValue("Title", this.Title);
+      info.AddValue("SubTitle", this.SubTitle);
+      info.AddValue("TextMaterial", this.textMaterial, typeof(LabelMaterial));
+      info.AddValue("Collapsed", mCollapsed);
+      info.AddValue("BodyType", mBodyType.ToString());
+      info.AddValue("ClassShapeVersion", classShapeVersion);
+    }
+    #endregion
 
-        /// <summary>
-        /// Converts an object into its XML representation.
-        /// </summary>
-        /// <param name="writer">The <see cref="T:System.Xml.XmlWriter"></see> stream to which the object is serialized.</param>
-        public override void WriteXml(System.Xml.XmlWriter writer)
-        {
-            throw new NotImplementedException("The method or operation is not implemented.");
-        }
-        #endregion
+    #region Xml serialization
+    /// <summary>
+    /// This property is reserved, apply the <see cref="T:System.Xml.Serialization.XmlSchemaProviderAttribute"></see> to the class instead.
+    /// </summary>
+    /// <returns>
+    /// An <see cref="T:System.Xml.Schema.XmlSchema"></see> that describes the XML representation of the object that is produced by the <see cref="M:System.Xml.Serialization.IXmlSerializable.WriteXml(System.Xml.XmlWriter)"></see> method and consumed by the <see cref="M:System.Xml.Serialization.IXmlSerializable.ReadXml(System.Xml.XmlReader)"></see> method.
+    /// </returns>
+    public override XmlSchema GetSchema() {
+      throw new NotImplementedException("The method or operation is not implemented.");
+    }
 
-        /// <summary>
-        /// Runs when the entire object graph has been deserialized.
-        /// </summary>
-        /// <param name="sender">The object that initiated the callback. The functionality for this parameter is not currently implemented.</param>
-        public override void OnDeserialization(object sender)
-        {
-            base.OnDeserialization(sender);
-            
-            if(Tracing.BinaryDeserializationSwitch.Enabled)
-                Trace.WriteLine("IDeserializationCallback of 'ClassShape' called.");
-        }
+    /// <summary>
+    /// Generates an object from its XML representation.
+    /// </summary>
+    /// <param name="reader">The <see cref="T:System.Xml.XmlReader"></see> stream from which the object is deserialized.</param>
+    public override void ReadXml(System.Xml.XmlReader reader) {
+      throw new NotImplementedException("The method or operation is not implemented.");
     }
+
+    /// <summary>
+    /// Converts an object into its XML representation.
+    /// </summary>
+    /// <param name="writer">The <see cref="T:System.Xml.XmlWriter"></see> stream to which the object is serialized.</param>
+    public override void WriteXml(System.Xml.XmlWriter writer) {
+      throw new NotImplementedException("The method or operation is not implemented.");
+    }
+    #endregion
+
+    /// <summary>
+    /// Runs when the entire object graph has been deserialized.
+    /// </summary>
+    /// <param name="sender">The object that initiated the callback. The functionality for this parameter is not currently implemented.</param>
+    public override void OnDeserialization(object sender) {
+      base.OnDeserialization(sender);
+
+      if (Tracing.BinaryDeserializationSwitch.Enabled)
+        Trace.WriteLine("IDeserializationCallback of 'ClassShape' called.");
+    }
+  }
 }
Index: /trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.Netron/3.0.2672.12446/Netron.Diagramming.Core-3.0.2672.12446/Serialization/ClickableIconMaterial.Serialization.cs
===================================================================
--- /trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.Netron/3.0.2672.12446/Netron.Diagramming.Core-3.0.2672.12446/Serialization/ClickableIconMaterial.Serialization.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.Netron/3.0.2672.12446/Netron.Diagramming.Core-3.0.2672.12446/Serialization/ClickableIconMaterial.Serialization.cs	(revision 4068)
@@ -1,37 +1,30 @@
 using System;
-using System.Collections.Generic;
-using System.Text;
-using System.Drawing;
-using System.ComponentModel;
+using System.Diagnostics;
 using System.Runtime.Serialization;
+using System.Xml.Schema;
 using System.Xml.Serialization;
-using System.Diagnostics;
-using System.Xml.Schema;
-namespace Netron.Diagramming.Core
-{
+namespace Netron.Diagramming.Core {
+  /// <summary>
+  /// Complementary partial class related to (de)serialization.
+  /// </summary>
+  [Serializable]
+  public partial class ClickableIconMaterial : ISerializable, IXmlSerializable, IDeserializationCallback {
+    #region Deserialization constructor
     /// <summary>
-    /// Complementary partial class related to (de)serialization.
+    /// Deserialization constructor
     /// </summary>
-   [Serializable]
-    public partial class ClickableIconMaterial : ISerializable, IXmlSerializable, IDeserializationCallback
-    {
-        #region Deserialization constructor
-        /// <summary>
-        /// Deserialization constructor
-        /// </summary>
-        /// <param name="info">The info.</param>
-        /// <param name="context">The context.</param>
-        protected ClickableIconMaterial(SerializationInfo info, StreamingContext context)
-            : base(info, context)
-        {
-            if(Tracing.BinaryDeserializationSwitch.Enabled)
-                Trace.WriteLine("Deserializing the fields of 'ClickableIconMaterial'.");
+    /// <param name="info">The info.</param>
+    /// <param name="context">The context.</param>
+    protected ClickableIconMaterial(SerializationInfo info, StreamingContext context)
+      : base(info, context) {
+      if (Tracing.BinaryDeserializationSwitch.Enabled)
+        Trace.WriteLine("Deserializing the fields of 'ClickableIconMaterial'.");
 
-            double version = info.GetDouble("ClickableIconMaterialVersion");
-        }
-        #endregion
+      double version = info.GetDouble("ClickableIconMaterialVersion");
+    }
+    #endregion
 
-        #region Serialization events
-       /*
+    #region Serialization events
+    /*
         [OnSerializing]
         void OnSerializing(StreamingContext context)
@@ -47,8 +40,8 @@
         }
         */
-        #endregion
+    #endregion
 
-        #region Deserialization events
-       /*
+    #region Deserialization events
+    /*
         [OnDeserializing]      
         void OnDeserializing(StreamingContext context)
@@ -64,71 +57,66 @@
          }
        */
-        #endregion
+    #endregion
 
-        #region Serialization
-        /// <summary>
-        /// Populates a <see cref="T:System.Runtime.Serialization.SerializationInfo"></see> with the data needed to serialize the target object.
-        /// </summary>
-        /// <param name="info">The <see cref="T:System.Runtime.Serialization.SerializationInfo"></see> to populate with data.</param>
-        /// <param name="context">The destination (see <see cref="T:System.Runtime.Serialization.StreamingContext"></see>) for this serialization.</param>
-        /// <exception cref="T:System.Security.SecurityException">The caller does not have the required permission. </exception>
-        public override void GetObjectData(SerializationInfo info, StreamingContext context) 
-        {
-            if(Tracing.BinarySerializationSwitch.Enabled)
-                Trace.WriteLine("Serializing the fields of 'ClickableIconMaterial'.");
-            base.GetObjectData(info, context);
+    #region Serialization
+    /// <summary>
+    /// Populates a <see cref="T:System.Runtime.Serialization.SerializationInfo"></see> with the data needed to serialize the target object.
+    /// </summary>
+    /// <param name="info">The <see cref="T:System.Runtime.Serialization.SerializationInfo"></see> to populate with data.</param>
+    /// <param name="context">The destination (see <see cref="T:System.Runtime.Serialization.StreamingContext"></see>) for this serialization.</param>
+    /// <exception cref="T:System.Security.SecurityException">The caller does not have the required permission. </exception>
+    public override void GetObjectData(SerializationInfo info, StreamingContext context) {
+      if (Tracing.BinarySerializationSwitch.Enabled)
+        Trace.WriteLine("Serializing the fields of 'ClickableIconMaterial'.");
+      base.GetObjectData(info, context);
 
-            info.AddValue(
-                "ClickableIconMaterialVersion", 
-                clickableIconMaterialVersion);
-       
-        }
-        #endregion
+      info.AddValue(
+          "ClickableIconMaterialVersion",
+          clickableIconMaterialVersion);
 
-        #region Xml serialization
-        /// <summary>
-        /// This property is reserved, apply the <see cref="T:System.Xml.Serialization.XmlSchemaProviderAttribute"></see> to the class instead.
-        /// </summary>
-        /// <returns>
-        /// An <see cref="T:System.Xml.Schema.XmlSchema"></see> that describes the XML representation of the object that is produced by the <see cref="M:System.Xml.Serialization.IXmlSerializable.WriteXml(System.Xml.XmlWriter)"></see> method and consumed by the <see cref="M:System.Xml.Serialization.IXmlSerializable.ReadXml(System.Xml.XmlReader)"></see> method.
-        /// </returns>
-        public override XmlSchema GetSchema()
-        {
-            throw new NotImplementedException("The method or operation is not implemented.");
-        }
+    }
+    #endregion
 
-        /// <summary>
-        /// Generates an object from its XML representation.
-        /// </summary>
-        /// <param name="reader">The <see cref="T:System.Xml.XmlReader"></see> stream from which the object is deserialized.</param>
-        public override void ReadXml(System.Xml.XmlReader reader)
-        {
-            throw new NotImplementedException("The method or operation is not implemented.");
-        }
+    #region Xml serialization
+    /// <summary>
+    /// This property is reserved, apply the <see cref="T:System.Xml.Serialization.XmlSchemaProviderAttribute"></see> to the class instead.
+    /// </summary>
+    /// <returns>
+    /// An <see cref="T:System.Xml.Schema.XmlSchema"></see> that describes the XML representation of the object that is produced by the <see cref="M:System.Xml.Serialization.IXmlSerializable.WriteXml(System.Xml.XmlWriter)"></see> method and consumed by the <see cref="M:System.Xml.Serialization.IXmlSerializable.ReadXml(System.Xml.XmlReader)"></see> method.
+    /// </returns>
+    public override XmlSchema GetSchema() {
+      throw new NotImplementedException("The method or operation is not implemented.");
+    }
 
-        /// <summary>
-        /// Converts an object into its XML representation.
-        /// </summary>
-        /// <param name="writer">The <see cref="T:System.Xml.XmlWriter"></see> stream to which the object is serialized.</param>
-        public override void WriteXml(System.Xml.XmlWriter writer)
-        {
-            throw new NotImplementedException("The method or operation is not implemented.");
-        }
-        #endregion
+    /// <summary>
+    /// Generates an object from its XML representation.
+    /// </summary>
+    /// <param name="reader">The <see cref="T:System.Xml.XmlReader"></see> stream from which the object is deserialized.</param>
+    public override void ReadXml(System.Xml.XmlReader reader) {
+      throw new NotImplementedException("The method or operation is not implemented.");
+    }
+
+    /// <summary>
+    /// Converts an object into its XML representation.
+    /// </summary>
+    /// <param name="writer">The <see cref="T:System.Xml.XmlWriter"></see> stream to which the object is serialized.</param>
+    public override void WriteXml(System.Xml.XmlWriter writer) {
+      throw new NotImplementedException("The method or operation is not implemented.");
+    }
+    #endregion
 
 
 
-        /// <summary>
-        /// Runs when the entire object graph has been deserialized.
-        /// </summary>
-        /// <param name="sender">The object that initiated the callback. The functionality for this parameter is not currently implemented.</param>
-        public override void  OnDeserialization(object sender)
-        {
-            base.OnDeserialization(sender);
-            if(Tracing.BinaryDeserializationSwitch.Enabled)
-                Trace.WriteLine("IDeserializationCallback of 'ClickableIconMaterial' called.");
-            
+    /// <summary>
+    /// Runs when the entire object graph has been deserialized.
+    /// </summary>
+    /// <param name="sender">The object that initiated the callback. The functionality for this parameter is not currently implemented.</param>
+    public override void OnDeserialization(object sender) {
+      base.OnDeserialization(sender);
+      if (Tracing.BinaryDeserializationSwitch.Enabled)
+        Trace.WriteLine("IDeserializationCallback of 'ClickableIconMaterial' called.");
 
-        }
+
     }
+  }
 }
Index: /trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.Netron/3.0.2672.12446/Netron.Diagramming.Core-3.0.2672.12446/Serialization/ClickableLabelMaterial.Serialization.cs
===================================================================
--- /trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.Netron/3.0.2672.12446/Netron.Diagramming.Core-3.0.2672.12446/Serialization/ClickableLabelMaterial.Serialization.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.Netron/3.0.2672.12446/Netron.Diagramming.Core-3.0.2672.12446/Serialization/ClickableLabelMaterial.Serialization.cs	(revision 4068)
@@ -1,37 +1,30 @@
 using System;
-using System.Collections.Generic;
-using System.Text;
-using System.Drawing;
-using System.ComponentModel;
+using System.Diagnostics;
 using System.Runtime.Serialization;
+using System.Xml.Schema;
 using System.Xml.Serialization;
-using System.Diagnostics;
-using System.Xml.Schema;
-namespace Netron.Diagramming.Core
-{
+namespace Netron.Diagramming.Core {
+  /// <summary>
+  /// Complementary partial class related to (de)serialization.
+  /// </summary>
+  [Serializable]
+  public partial class ClickableLabelMaterial : ISerializable, IXmlSerializable, IDeserializationCallback {
+    #region Deserialization constructor
     /// <summary>
-    /// Complementary partial class related to (de)serialization.
+    /// Deserialization constructor
     /// </summary>
-   [Serializable]
-    public partial class ClickableLabelMaterial : ISerializable, IXmlSerializable, IDeserializationCallback
-    {
-        #region Deserialization constructor
-        /// <summary>
-        /// Deserialization constructor
-        /// </summary>
-        /// <param name="info">The info.</param>
-        /// <param name="context">The context.</param>
-        protected ClickableLabelMaterial(SerializationInfo info, StreamingContext context)
-            : base(info, context)
-        {
-            if(Tracing.BinaryDeserializationSwitch.Enabled)
-                Trace.WriteLine("Deserializing the fields of 'ClickableLabelMaterial'.");
+    /// <param name="info">The info.</param>
+    /// <param name="context">The context.</param>
+    protected ClickableLabelMaterial(SerializationInfo info, StreamingContext context)
+      : base(info, context) {
+      if (Tracing.BinaryDeserializationSwitch.Enabled)
+        Trace.WriteLine("Deserializing the fields of 'ClickableLabelMaterial'.");
 
-            double version = info.GetDouble("ClickableLabelMaterialVersion");
-        }
-        #endregion
+      double version = info.GetDouble("ClickableLabelMaterialVersion");
+    }
+    #endregion
 
-        #region Serialization events
-       /*
+    #region Serialization events
+    /*
         [OnSerializing]
         void OnSerializing(StreamingContext context)
@@ -47,8 +40,8 @@
         }
         */
-        #endregion
+    #endregion
 
-        #region Deserialization events
-       /*
+    #region Deserialization events
+    /*
         [OnDeserializing]      
         void OnDeserializing(StreamingContext context)
@@ -64,71 +57,66 @@
          }
        */
-        #endregion
+    #endregion
 
-        #region Serialization
-        /// <summary>
-        /// Populates a <see cref="T:System.Runtime.Serialization.SerializationInfo"></see> with the data needed to serialize the target object.
-        /// </summary>
-        /// <param name="info">The <see cref="T:System.Runtime.Serialization.SerializationInfo"></see> to populate with data.</param>
-        /// <param name="context">The destination (see <see cref="T:System.Runtime.Serialization.StreamingContext"></see>) for this serialization.</param>
-        /// <exception cref="T:System.Security.SecurityException">The caller does not have the required permission. </exception>
-        public override void GetObjectData(SerializationInfo info, StreamingContext context) 
-        {
-            if(Tracing.BinarySerializationSwitch.Enabled)
-                Trace.WriteLine("Serializing the fields of 'ClickableLabelMaterial'.");
-            base.GetObjectData(info, context);
+    #region Serialization
+    /// <summary>
+    /// Populates a <see cref="T:System.Runtime.Serialization.SerializationInfo"></see> with the data needed to serialize the target object.
+    /// </summary>
+    /// <param name="info">The <see cref="T:System.Runtime.Serialization.SerializationInfo"></see> to populate with data.</param>
+    /// <param name="context">The destination (see <see cref="T:System.Runtime.Serialization.StreamingContext"></see>) for this serialization.</param>
+    /// <exception cref="T:System.Security.SecurityException">The caller does not have the required permission. </exception>
+    public override void GetObjectData(SerializationInfo info, StreamingContext context) {
+      if (Tracing.BinarySerializationSwitch.Enabled)
+        Trace.WriteLine("Serializing the fields of 'ClickableLabelMaterial'.");
+      base.GetObjectData(info, context);
 
-            info.AddValue(
-                "ClickableLabelMaterialVersion",
-                clickableLabelMaterialVersion);
-       
-        }
-        #endregion
+      info.AddValue(
+          "ClickableLabelMaterialVersion",
+          clickableLabelMaterialVersion);
 
-        #region Xml serialization
-        /// <summary>
-        /// This property is reserved, apply the <see cref="T:System.Xml.Serialization.XmlSchemaProviderAttribute"></see> to the class instead.
-        /// </summary>
-        /// <returns>
-        /// An <see cref="T:System.Xml.Schema.XmlSchema"></see> that describes the XML representation of the object that is produced by the <see cref="M:System.Xml.Serialization.IXmlSerializable.WriteXml(System.Xml.XmlWriter)"></see> method and consumed by the <see cref="M:System.Xml.Serialization.IXmlSerializable.ReadXml(System.Xml.XmlReader)"></see> method.
-        /// </returns>
-        public override XmlSchema GetSchema()
-        {
-            throw new NotImplementedException("The method or operation is not implemented.");
-        }
+    }
+    #endregion
 
-        /// <summary>
-        /// Generates an object from its XML representation.
-        /// </summary>
-        /// <param name="reader">The <see cref="T:System.Xml.XmlReader"></see> stream from which the object is deserialized.</param>
-        public override void ReadXml(System.Xml.XmlReader reader)
-        {
-            throw new NotImplementedException("The method or operation is not implemented.");
-        }
+    #region Xml serialization
+    /// <summary>
+    /// This property is reserved, apply the <see cref="T:System.Xml.Serialization.XmlSchemaProviderAttribute"></see> to the class instead.
+    /// </summary>
+    /// <returns>
+    /// An <see cref="T:System.Xml.Schema.XmlSchema"></see> that describes the XML representation of the object that is produced by the <see cref="M:System.Xml.Serialization.IXmlSerializable.WriteXml(System.Xml.XmlWriter)"></see> method and consumed by the <see cref="M:System.Xml.Serialization.IXmlSerializable.ReadXml(System.Xml.XmlReader)"></see> method.
+    /// </returns>
+    public override XmlSchema GetSchema() {
+      throw new NotImplementedException("The method or operation is not implemented.");
+    }
 
-        /// <summary>
-        /// Converts an object into its XML representation.
-        /// </summary>
-        /// <param name="writer">The <see cref="T:System.Xml.XmlWriter"></see> stream to which the object is serialized.</param>
-        public override void WriteXml(System.Xml.XmlWriter writer)
-        {
-            throw new NotImplementedException("The method or operation is not implemented.");
-        }
-        #endregion
+    /// <summary>
+    /// Generates an object from its XML representation.
+    /// </summary>
+    /// <param name="reader">The <see cref="T:System.Xml.XmlReader"></see> stream from which the object is deserialized.</param>
+    public override void ReadXml(System.Xml.XmlReader reader) {
+      throw new NotImplementedException("The method or operation is not implemented.");
+    }
+
+    /// <summary>
+    /// Converts an object into its XML representation.
+    /// </summary>
+    /// <param name="writer">The <see cref="T:System.Xml.XmlWriter"></see> stream to which the object is serialized.</param>
+    public override void WriteXml(System.Xml.XmlWriter writer) {
+      throw new NotImplementedException("The method or operation is not implemented.");
+    }
+    #endregion
 
 
 
-        /// <summary>
-        /// Runs when the entire object graph has been deserialized.
-        /// </summary>
-        /// <param name="sender">The object that initiated the callback. The functionality for this parameter is not currently implemented.</param>
-        public override void  OnDeserialization(object sender)
-        {
-            base.OnDeserialization(sender);
-            if(Tracing.BinaryDeserializationSwitch.Enabled)
-                Trace.WriteLine("IDeserializationCallback of 'ClickableLabelMaterial' called.");
-            
+    /// <summary>
+    /// Runs when the entire object graph has been deserialized.
+    /// </summary>
+    /// <param name="sender">The object that initiated the callback. The functionality for this parameter is not currently implemented.</param>
+    public override void OnDeserialization(object sender) {
+      base.OnDeserialization(sender);
+      if (Tracing.BinaryDeserializationSwitch.Enabled)
+        Trace.WriteLine("IDeserializationCallback of 'ClickableLabelMaterial' called.");
 
-        }
+
     }
+  }
 }
Index: /trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.Netron/3.0.2672.12446/Netron.Diagramming.Core-3.0.2672.12446/Serialization/CollectionBase.Serialization.cs
===================================================================
--- /trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.Netron/3.0.2672.12446/Netron.Diagramming.Core-3.0.2672.12446/Serialization/CollectionBase.Serialization.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.Netron/3.0.2672.12446/Netron.Diagramming.Core-3.0.2672.12446/Serialization/CollectionBase.Serialization.cs	(revision 4068)
@@ -1,35 +1,29 @@
 using System;
 using System.Collections.Generic;
-using System.Text;
-using System.Drawing;
-using System.ComponentModel;
+using System.Diagnostics;
 using System.Runtime.Serialization;
+using System.Xml.Schema;
 using System.Xml.Serialization;
-using System.Diagnostics;
-using System.Xml.Schema;
-namespace Netron.Diagramming.Core
-{
+namespace Netron.Diagramming.Core {
+  /// <summary>
+  /// Complementary partial class related to (de)serialization.
+  /// </summary>
+  [Serializable]
+  public partial class CollectionBase<T> : ISerializable, IXmlSerializable, IDeserializationCallback {
+    #region Deserialization constructor
     /// <summary>
-    /// Complementary partial class related to (de)serialization.
+    /// Deserialization constructor
     /// </summary>
-   [Serializable]
-    public partial class CollectionBase<T> : ISerializable, IXmlSerializable, IDeserializationCallback
-    {
-        #region Deserialization constructor
-        /// <summary>
-        /// Deserialization constructor
-        /// </summary>
-        /// <param name="info">The info.</param>
-        /// <param name="context">The context.</param>
-        protected CollectionBase(SerializationInfo info, StreamingContext context)
-        {
-            if(Tracing.BinaryDeserializationSwitch.Enabled)
-                Trace.WriteLine("Deserializing the fields of 'CollectionBase'.");
-            innerList = info.GetValue("InnerList", typeof(List<T>)) as List<T>;   
-        }
-        #endregion
+    /// <param name="info">The info.</param>
+    /// <param name="context">The context.</param>
+    protected CollectionBase(SerializationInfo info, StreamingContext context) {
+      if (Tracing.BinaryDeserializationSwitch.Enabled)
+        Trace.WriteLine("Deserializing the fields of 'CollectionBase'.");
+      innerList = info.GetValue("InnerList", typeof(List<T>)) as List<T>;
+    }
+    #endregion
 
-        #region Serialization events
-       /*
+    #region Serialization events
+    /*
         [OnSerializing]
         void OnSerializing(StreamingContext context)
@@ -45,8 +39,8 @@
         }
         */
-        #endregion
+    #endregion
 
-        #region Deserialization events
-       /*
+    #region Deserialization events
+    /*
         [OnDeserializing]
         void OnDeserializing(StreamingContext context)
@@ -62,65 +56,60 @@
          }
        */
-        #endregion
+    #endregion
 
-        #region Serialization
-        /// <summary>
-        /// Populates a <see cref="T:System.Runtime.Serialization.SerializationInfo"></see> with the data needed to serialize the target object.
-        /// </summary>
-        /// <param name="info">The <see cref="T:System.Runtime.Serialization.SerializationInfo"></see> to populate with data.</param>
-        /// <param name="context">The destination (see <see cref="T:System.Runtime.Serialization.StreamingContext"></see>) for this serialization.</param>
-        /// <exception cref="T:System.Security.SecurityException">The caller does not have the required permission. </exception>
-        public void GetObjectData(SerializationInfo info, StreamingContext context)
-        {
-            if(Tracing.BinarySerializationSwitch.Enabled)
-                Trace.WriteLine("Serializing the fields of 'CollectionBase'.");
-            info.AddValue("InnerList", this.innerList, typeof(List<T>));
-        }
-        #endregion
+    #region Serialization
+    /// <summary>
+    /// Populates a <see cref="T:System.Runtime.Serialization.SerializationInfo"></see> with the data needed to serialize the target object.
+    /// </summary>
+    /// <param name="info">The <see cref="T:System.Runtime.Serialization.SerializationInfo"></see> to populate with data.</param>
+    /// <param name="context">The destination (see <see cref="T:System.Runtime.Serialization.StreamingContext"></see>) for this serialization.</param>
+    /// <exception cref="T:System.Security.SecurityException">The caller does not have the required permission. </exception>
+    public void GetObjectData(SerializationInfo info, StreamingContext context) {
+      if (Tracing.BinarySerializationSwitch.Enabled)
+        Trace.WriteLine("Serializing the fields of 'CollectionBase'.");
+      info.AddValue("InnerList", this.innerList, typeof(List<T>));
+    }
+    #endregion
 
-        #region Xml serialization
-        /// <summary>
-        /// This property is reserved, apply the <see cref="T:System.Xml.Serialization.XmlSchemaProviderAttribute"></see> to the class instead.
-        /// </summary>
-        /// <returns>
-        /// An <see cref="T:System.Xml.Schema.XmlSchema"></see> that describes the XML representation of the object that is produced by the <see cref="M:System.Xml.Serialization.IXmlSerializable.WriteXml(System.Xml.XmlWriter)"></see> method and consumed by the <see cref="M:System.Xml.Serialization.IXmlSerializable.ReadXml(System.Xml.XmlReader)"></see> method.
-        /// </returns>
-        public XmlSchema GetSchema()
-        {
-            throw new NotImplementedException("The method or operation is not implemented.");
-        }
+    #region Xml serialization
+    /// <summary>
+    /// This property is reserved, apply the <see cref="T:System.Xml.Serialization.XmlSchemaProviderAttribute"></see> to the class instead.
+    /// </summary>
+    /// <returns>
+    /// An <see cref="T:System.Xml.Schema.XmlSchema"></see> that describes the XML representation of the object that is produced by the <see cref="M:System.Xml.Serialization.IXmlSerializable.WriteXml(System.Xml.XmlWriter)"></see> method and consumed by the <see cref="M:System.Xml.Serialization.IXmlSerializable.ReadXml(System.Xml.XmlReader)"></see> method.
+    /// </returns>
+    public XmlSchema GetSchema() {
+      throw new NotImplementedException("The method or operation is not implemented.");
+    }
 
-        /// <summary>
-        /// Generates an object from its XML representation.
-        /// </summary>
-        /// <param name="reader">The <see cref="T:System.Xml.XmlReader"></see> stream from which the object is deserialized.</param>
-        public void ReadXml(System.Xml.XmlReader reader)
-        {
-            throw new NotImplementedException("The method or operation is not implemented.");
-        }
+    /// <summary>
+    /// Generates an object from its XML representation.
+    /// </summary>
+    /// <param name="reader">The <see cref="T:System.Xml.XmlReader"></see> stream from which the object is deserialized.</param>
+    public void ReadXml(System.Xml.XmlReader reader) {
+      throw new NotImplementedException("The method or operation is not implemented.");
+    }
 
-        /// <summary>
-        /// Converts an object into its XML representation.
-        /// </summary>
-        /// <param name="writer">The <see cref="T:System.Xml.XmlWriter"></see> stream to which the object is serialized.</param>
-        public void WriteXml(System.Xml.XmlWriter writer)
-        {
-            throw new NotImplementedException("The method or operation is not implemented.");
-        }
-        #endregion
+    /// <summary>
+    /// Converts an object into its XML representation.
+    /// </summary>
+    /// <param name="writer">The <see cref="T:System.Xml.XmlWriter"></see> stream to which the object is serialized.</param>
+    public void WriteXml(System.Xml.XmlWriter writer) {
+      throw new NotImplementedException("The method or operation is not implemented.");
+    }
+    #endregion
 
-        #region IDeserializationCallback Members
+    #region IDeserializationCallback Members
 
-        /// <summary>
-        /// Runs when the entire object graph has been deserialized.
-        /// </summary>
-        /// <param name="sender">The object that initiated the callback. The functionality for this parameter is not currently implemented.</param>
-        public void OnDeserialization(object sender)
-        {
-            if(Tracing.BinaryDeserializationSwitch.Enabled)
-                Trace.WriteLine("IDeserializationCallback of 'CollectionBase' called.");
-        }
+    /// <summary>
+    /// Runs when the entire object graph has been deserialized.
+    /// </summary>
+    /// <param name="sender">The object that initiated the callback. The functionality for this parameter is not currently implemented.</param>
+    public void OnDeserialization(object sender) {
+      if (Tracing.BinaryDeserializationSwitch.Enabled)
+        Trace.WriteLine("IDeserializationCallback of 'CollectionBase' called.");
+    }
 
-        #endregion
-    }
+    #endregion
+  }
 }
Index: /trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.Netron/3.0.2672.12446/Netron.Diagramming.Core-3.0.2672.12446/Serialization/ComplexRectangle.Serialization.cs
===================================================================
--- /trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.Netron/3.0.2672.12446/Netron.Diagramming.Core-3.0.2672.12446/Serialization/ComplexRectangle.Serialization.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.Netron/3.0.2672.12446/Netron.Diagramming.Core-3.0.2672.12446/Serialization/ComplexRectangle.Serialization.cs	(revision 4068)
@@ -1,37 +1,30 @@
 using System;
-using System.Collections.Generic;
-using System.Text;
-using System.Drawing;
-using System.ComponentModel;
+using System.Diagnostics;
 using System.Runtime.Serialization;
+using System.Xml.Schema;
 using System.Xml.Serialization;
-using System.Diagnostics;
-using System.Xml.Schema;
-namespace Netron.Diagramming.Core
-{
+namespace Netron.Diagramming.Core {
+  /// <summary>
+  /// Complementary partial class related to (de)serialization.
+  /// </summary>
+  [Serializable]
+  public partial class ComplexRectangle : ISerializable, IXmlSerializable, IDeserializationCallback {
+    #region Deserialization constructor
     /// <summary>
-    /// Complementary partial class related to (de)serialization.
+    /// Deserialization constructor
     /// </summary>
-   [Serializable]
-    public partial class ComplexRectangle : ISerializable, IXmlSerializable, IDeserializationCallback
-    {
-        #region Deserialization constructor
-        /// <summary>
-        /// Deserialization constructor
-        /// </summary>
-        /// <param name="info">The info.</param>
-        /// <param name="context">The context.</param>
-        protected ComplexRectangle(SerializationInfo info, StreamingContext context)
-            : base(info, context)
-        {
-            if(Tracing.BinaryDeserializationSwitch.Enabled)
-                Trace.WriteLine("Deserializing the fields of 'ComplexRectangle'.");
+    /// <param name="info">The info.</param>
+    /// <param name="context">The context.</param>
+    protected ComplexRectangle(SerializationInfo info, StreamingContext context)
+      : base(info, context) {
+      if (Tracing.BinaryDeserializationSwitch.Enabled)
+        Trace.WriteLine("Deserializing the fields of 'ComplexRectangle'.");
 
-            double version = info.GetDouble("ComplexRectangleVersion");
-        }
-        #endregion
+      double version = info.GetDouble("ComplexRectangleVersion");
+    }
+    #endregion
 
-        #region Serialization events
-       /*
+    #region Serialization events
+    /*
         [OnSerializing]
         void OnSerializing(StreamingContext context)
@@ -47,8 +40,8 @@
         }
         */
-        #endregion
+    #endregion
 
-        #region Deserialization events
-       /*
+    #region Deserialization events
+    /*
         [OnDeserializing]      
         void OnDeserializing(StreamingContext context)
@@ -58,81 +51,74 @@
         }
         */
-        [OnDeserialized]
-        void OnDeserialized(StreamingContext context)
-         {
-             Trace.WriteLine("...deserialization of 'ComplexRectangle' finished");
+    [OnDeserialized]
+    void OnDeserialized(StreamingContext context) {
+      Trace.WriteLine("...deserialization of 'ComplexRectangle' finished");
 
-             foreach(IShapeMaterial material in Children)
-             {
-                 if(typeof(FolderMaterial).IsInstanceOfType(material))
-                     (material as FolderMaterial).OnFolderChanged += new EventHandler<RectangleEventArgs>(folder_OnFolderChanged);
-             }
+      foreach (IShapeMaterial material in Children) {
+        if (typeof(FolderMaterial).IsInstanceOfType(material))
+          (material as FolderMaterial).OnFolderChanged += new EventHandler<RectangleEventArgs>(folder_OnFolderChanged);
+      }
 
-         }
-       
-        #endregion
+    }
 
-        #region Serialization
-         /// <summary>
-         /// Populates a <see cref="T:System.Runtime.Serialization.SerializationInfo"></see> with the data needed to serialize the target object.
-         /// </summary>
-         /// <param name="info">The <see cref="T:System.Runtime.Serialization.SerializationInfo"></see> to populate with data.</param>
-         /// <param name="context">The destination (see <see cref="T:System.Runtime.Serialization.StreamingContext"></see>) for this serialization.</param>
-         /// <exception cref="T:System.Security.SecurityException">The caller does not have the required permission. </exception>
-        public override void GetObjectData(SerializationInfo info, StreamingContext context) 
-        {
-            if(Tracing.BinarySerializationSwitch.Enabled)
-                Trace.WriteLine("Serializing the fields of 'ComplexRectangle'.");
-            base.GetObjectData(info, context);
+    #endregion
 
-            info.AddValue("ComplexRectangleVersion", complexRectangleVersion);
-        }
-        #endregion
+    #region Serialization
+    /// <summary>
+    /// Populates a <see cref="T:System.Runtime.Serialization.SerializationInfo"></see> with the data needed to serialize the target object.
+    /// </summary>
+    /// <param name="info">The <see cref="T:System.Runtime.Serialization.SerializationInfo"></see> to populate with data.</param>
+    /// <param name="context">The destination (see <see cref="T:System.Runtime.Serialization.StreamingContext"></see>) for this serialization.</param>
+    /// <exception cref="T:System.Security.SecurityException">The caller does not have the required permission. </exception>
+    public override void GetObjectData(SerializationInfo info, StreamingContext context) {
+      if (Tracing.BinarySerializationSwitch.Enabled)
+        Trace.WriteLine("Serializing the fields of 'ComplexRectangle'.");
+      base.GetObjectData(info, context);
 
-        #region Xml serialization
-        /// <summary>
-        /// This property is reserved, apply the <see cref="T:System.Xml.Serialization.XmlSchemaProviderAttribute"></see> to the class instead.
-        /// </summary>
-        /// <returns>
-        /// An <see cref="T:System.Xml.Schema.XmlSchema"></see> that describes the XML representation of the object that is produced by the <see cref="M:System.Xml.Serialization.IXmlSerializable.WriteXml(System.Xml.XmlWriter)"></see> method and consumed by the <see cref="M:System.Xml.Serialization.IXmlSerializable.ReadXml(System.Xml.XmlReader)"></see> method.
-        /// </returns>
-        public override XmlSchema GetSchema()
-        {
-            throw new NotImplementedException("The method or operation is not implemented.");
-        }
+      info.AddValue("ComplexRectangleVersion", complexRectangleVersion);
+    }
+    #endregion
 
-        /// <summary>
-        /// Generates an object from its XML representation.
-        /// </summary>
-        /// <param name="reader">The <see cref="T:System.Xml.XmlReader"></see> stream from which the object is deserialized.</param>
-        public override void ReadXml(System.Xml.XmlReader reader)
-        {
-            throw new NotImplementedException("The method or operation is not implemented.");
-        }
+    #region Xml serialization
+    /// <summary>
+    /// This property is reserved, apply the <see cref="T:System.Xml.Serialization.XmlSchemaProviderAttribute"></see> to the class instead.
+    /// </summary>
+    /// <returns>
+    /// An <see cref="T:System.Xml.Schema.XmlSchema"></see> that describes the XML representation of the object that is produced by the <see cref="M:System.Xml.Serialization.IXmlSerializable.WriteXml(System.Xml.XmlWriter)"></see> method and consumed by the <see cref="M:System.Xml.Serialization.IXmlSerializable.ReadXml(System.Xml.XmlReader)"></see> method.
+    /// </returns>
+    public override XmlSchema GetSchema() {
+      throw new NotImplementedException("The method or operation is not implemented.");
+    }
 
-        /// <summary>
-        /// Converts an object into its XML representation.
-        /// </summary>
-        /// <param name="writer">The <see cref="T:System.Xml.XmlWriter"></see> stream to which the object is serialized.</param>
-        public override void WriteXml(System.Xml.XmlWriter writer)
-        {
-            throw new NotImplementedException("The method or operation is not implemented.");
-        }
-        #endregion
+    /// <summary>
+    /// Generates an object from its XML representation.
+    /// </summary>
+    /// <param name="reader">The <see cref="T:System.Xml.XmlReader"></see> stream from which the object is deserialized.</param>
+    public override void ReadXml(System.Xml.XmlReader reader) {
+      throw new NotImplementedException("The method or operation is not implemented.");
+    }
+
+    /// <summary>
+    /// Converts an object into its XML representation.
+    /// </summary>
+    /// <param name="writer">The <see cref="T:System.Xml.XmlWriter"></see> stream to which the object is serialized.</param>
+    public override void WriteXml(System.Xml.XmlWriter writer) {
+      throw new NotImplementedException("The method or operation is not implemented.");
+    }
+    #endregion
 
 
 
-        /// <summary>
-        /// Runs when the entire object graph has been deserialized.
-        /// </summary>
-        /// <param name="sender">The object that initiated the callback. The functionality for this parameter is not currently implemented.</param>
-        public override void  OnDeserialization(object sender)
-        {
-            base.OnDeserialization(sender);
-            if(Tracing.BinaryDeserializationSwitch.Enabled)
-                Trace.WriteLine("IDeserializationCallback of 'ComplexRectangle' called.");
-            
+    /// <summary>
+    /// Runs when the entire object graph has been deserialized.
+    /// </summary>
+    /// <param name="sender">The object that initiated the callback. The functionality for this parameter is not currently implemented.</param>
+    public override void OnDeserialization(object sender) {
+      base.OnDeserialization(sender);
+      if (Tracing.BinaryDeserializationSwitch.Enabled)
+        Trace.WriteLine("IDeserializationCallback of 'ComplexRectangle' called.");
 
-        }
+
     }
+  }
 }
Index: /trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.Netron/3.0.2672.12446/Netron.Diagramming.Core-3.0.2672.12446/Serialization/ComplexShapeBase.Serialization.cs
===================================================================
--- /trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.Netron/3.0.2672.12446/Netron.Diagramming.Core-3.0.2672.12446/Serialization/ComplexShapeBase.Serialization.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.Netron/3.0.2672.12446/Netron.Diagramming.Core-3.0.2672.12446/Serialization/ComplexShapeBase.Serialization.cs	(revision 4068)
@@ -1,45 +1,39 @@
 using System;
 using System.Collections.Generic;
-using System.Text;
-using System.Drawing;
-using System.ComponentModel;
+using System.Diagnostics;
 using System.Runtime.Serialization;
+using System.Xml.Schema;
 using System.Xml.Serialization;
-using System.Diagnostics;
-using System.Xml.Schema;
-namespace Netron.Diagramming.Core
-{
+namespace Netron.Diagramming.Core {
+  /// <summary>
+  /// Complementary partial class related to (de)serialization.
+  /// </summary>
+  [Serializable]
+  public partial class ComplexShapeBase : ISerializable, IXmlSerializable, IDeserializationCallback {
+    #region Deserialization constructor
     /// <summary>
-    /// Complementary partial class related to (de)serialization.
+    /// Deserialization constructor
     /// </summary>
-   [Serializable]
-    public partial class ComplexShapeBase : ISerializable, IXmlSerializable, IDeserializationCallback
-    {
-        #region Deserialization constructor
-        /// <summary>
-        /// Deserialization constructor
-        /// </summary>
-        /// <param name="info">The info.</param>
-        /// <param name="context">The context.</param>
-        protected ComplexShapeBase(SerializationInfo info, StreamingContext context)
-            : base(info, context)
-        {
+    /// <param name="info">The info.</param>
+    /// <param name="context">The context.</param>
+    protected ComplexShapeBase(SerializationInfo info, StreamingContext context)
+      : base(info, context) {
 
-            double version = info.GetDouble("ComplexShapeBaseVersion");
-            mServices = new Dictionary<Type, IInteraction>();
-            mServices[typeof(IMouseListener)] = this;
-            mServices[typeof(IHoverListener)] = this;
-            this.mChildren = info.GetValue("Children", typeof(CollectionBase<IShapeMaterial>)) as CollectionBase<IShapeMaterial>;
-            
-            mChildren.OnItemAdded += new EventHandler<CollectionEventArgs<IShapeMaterial>>(mChildren_OnItemAdded);
-         
-            
-            if(Tracing.BinaryDeserializationSwitch.Enabled)
-                Trace.WriteLine("Deserializing the fields of 'ComplexShapeBase'.");
-        }
-        #endregion
+      double version = info.GetDouble("ComplexShapeBaseVersion");
+      mServices = new Dictionary<Type, IInteraction>();
+      mServices[typeof(IMouseListener)] = this;
+      mServices[typeof(IHoverListener)] = this;
+      this.mChildren = info.GetValue("Children", typeof(CollectionBase<IShapeMaterial>)) as CollectionBase<IShapeMaterial>;
 
-        #region Serialization events
-       /*
+      mChildren.OnItemAdded += new EventHandler<CollectionEventArgs<IShapeMaterial>>(mChildren_OnItemAdded);
+
+
+      if (Tracing.BinaryDeserializationSwitch.Enabled)
+        Trace.WriteLine("Deserializing the fields of 'ComplexShapeBase'.");
+    }
+    #endregion
+
+    #region Serialization events
+    /*
         [OnSerializing]
         void OnSerializing(StreamingContext context)
@@ -53,8 +47,8 @@
         }
         */
-        #endregion
+    #endregion
 
-        #region Deserialization events
-       /*
+    #region Deserialization events
+    /*
         [OnDeserializing]
         void OnDeserializing(StreamingContext context)
@@ -64,77 +58,71 @@
         }
         */
-        [OnDeserialized]
-        void OnDeserialized(StreamingContext context)
-         {
-             Transform(Rectangle);//the children have to be mapped still
-             //setting the shape since the deserialization does not raise the event ..
-             foreach(IShapeMaterial material in mChildren)
-                 material.Shape = this;
-             if (Tracing.BinaryDeserializationSwitch.Enabled) 
-                Trace.WriteLine("...deserialization of 'ComplexShapeBase' finished");
-        }
-       
-        #endregion
+    [OnDeserialized]
+    void OnDeserialized(StreamingContext context) {
+      Transform(Rectangle);//the children have to be mapped still
+      //setting the shape since the deserialization does not raise the event ..
+      foreach (IShapeMaterial material in mChildren)
+        material.Shape = this;
+      if (Tracing.BinaryDeserializationSwitch.Enabled)
+        Trace.WriteLine("...deserialization of 'ComplexShapeBase' finished");
+    }
 
-        #region Serialization
-        /// <summary>
-        /// Populates a <see cref="T:System.Runtime.Serialization.SerializationInfo"></see> with the data needed to serialize the target object.
-        /// </summary>
-        /// <param name="info">The <see cref="T:System.Runtime.Serialization.SerializationInfo"></see> to populate with data.</param>
-        /// <param name="context">The destination (see <see cref="T:System.Runtime.Serialization.StreamingContext"></see>) for this serialization.</param>
-        /// <exception cref="T:System.Security.SecurityException">The caller does not have the required permission. </exception>
-        public override void GetObjectData(SerializationInfo info, StreamingContext context)
-        {
-            if(Tracing.BinarySerializationSwitch.Enabled)
-                Trace.WriteLine("Serializing the fields of 'ComplexShapeBase'.");
-            base.GetObjectData(info, context);
+    #endregion
 
-            info.AddValue("Children", this.mChildren, typeof(CollectionBase<IShapeMaterial>));
-            info.AddValue("ComplexShapeBaseVersion", complexShapeVersion);
-        }
-        #endregion
+    #region Serialization
+    /// <summary>
+    /// Populates a <see cref="T:System.Runtime.Serialization.SerializationInfo"></see> with the data needed to serialize the target object.
+    /// </summary>
+    /// <param name="info">The <see cref="T:System.Runtime.Serialization.SerializationInfo"></see> to populate with data.</param>
+    /// <param name="context">The destination (see <see cref="T:System.Runtime.Serialization.StreamingContext"></see>) for this serialization.</param>
+    /// <exception cref="T:System.Security.SecurityException">The caller does not have the required permission. </exception>
+    public override void GetObjectData(SerializationInfo info, StreamingContext context) {
+      if (Tracing.BinarySerializationSwitch.Enabled)
+        Trace.WriteLine("Serializing the fields of 'ComplexShapeBase'.");
+      base.GetObjectData(info, context);
 
-        #region Xml serialization
-        /// <summary>
-        /// This property is reserved, apply the <see cref="T:System.Xml.Serialization.XmlSchemaProviderAttribute"></see> to the class instead.
-        /// </summary>
-        /// <returns>
-        /// An <see cref="T:System.Xml.Schema.XmlSchema"></see> that describes the XML representation of the object that is produced by the <see cref="M:System.Xml.Serialization.IXmlSerializable.WriteXml(System.Xml.XmlWriter)"></see> method and consumed by the <see cref="M:System.Xml.Serialization.IXmlSerializable.ReadXml(System.Xml.XmlReader)"></see> method.
-        /// </returns>
-        public override XmlSchema GetSchema()
-        {
-            throw new NotImplementedException("The method or operation is not implemented.");
-        }
+      info.AddValue("Children", this.mChildren, typeof(CollectionBase<IShapeMaterial>));
+      info.AddValue("ComplexShapeBaseVersion", complexShapeVersion);
+    }
+    #endregion
 
-        /// <summary>
-        /// Generates an object from its XML representation.
-        /// </summary>
-        /// <param name="reader">The <see cref="T:System.Xml.XmlReader"></see> stream from which the object is deserialized.</param>
-        public override void ReadXml(System.Xml.XmlReader reader)
-        {
-            throw new NotImplementedException("The method or operation is not implemented.");
-        }
+    #region Xml serialization
+    /// <summary>
+    /// This property is reserved, apply the <see cref="T:System.Xml.Serialization.XmlSchemaProviderAttribute"></see> to the class instead.
+    /// </summary>
+    /// <returns>
+    /// An <see cref="T:System.Xml.Schema.XmlSchema"></see> that describes the XML representation of the object that is produced by the <see cref="M:System.Xml.Serialization.IXmlSerializable.WriteXml(System.Xml.XmlWriter)"></see> method and consumed by the <see cref="M:System.Xml.Serialization.IXmlSerializable.ReadXml(System.Xml.XmlReader)"></see> method.
+    /// </returns>
+    public override XmlSchema GetSchema() {
+      throw new NotImplementedException("The method or operation is not implemented.");
+    }
 
-        /// <summary>
-        /// Converts an object into its XML representation.
-        /// </summary>
-        /// <param name="writer">The <see cref="T:System.Xml.XmlWriter"></see> stream to which the object is serialized.</param>
-        public override void WriteXml(System.Xml.XmlWriter writer)
-        {
-            throw new NotImplementedException("The method or operation is not implemented.");
-        }
-        #endregion
+    /// <summary>
+    /// Generates an object from its XML representation.
+    /// </summary>
+    /// <param name="reader">The <see cref="T:System.Xml.XmlReader"></see> stream from which the object is deserialized.</param>
+    public override void ReadXml(System.Xml.XmlReader reader) {
+      throw new NotImplementedException("The method or operation is not implemented.");
+    }
 
-        /// <summary>
-        /// Runs when the entire object graph has been deserialized.
-        /// </summary>
-        /// <param name="sender">The object that initiated the callback. The functionality for this parameter is not currently implemented.</param>
-        public override void OnDeserialization(object sender)
-        {
-            base.OnDeserialization(sender);
-            
-            if(Tracing.BinaryDeserializationSwitch.Enabled)
-                Trace.WriteLine("IDeserializationCallback of 'ComplexShapeBase' called.");
-        }
+    /// <summary>
+    /// Converts an object into its XML representation.
+    /// </summary>
+    /// <param name="writer">The <see cref="T:System.Xml.XmlWriter"></see> stream to which the object is serialized.</param>
+    public override void WriteXml(System.Xml.XmlWriter writer) {
+      throw new NotImplementedException("The method or operation is not implemented.");
     }
+    #endregion
+
+    /// <summary>
+    /// Runs when the entire object graph has been deserialized.
+    /// </summary>
+    /// <param name="sender">The object that initiated the callback. The functionality for this parameter is not currently implemented.</param>
+    public override void OnDeserialization(object sender) {
+      base.OnDeserialization(sender);
+
+      if (Tracing.BinaryDeserializationSwitch.Enabled)
+        Trace.WriteLine("IDeserializationCallback of 'ComplexShapeBase' called.");
+    }
+  }
 }
Index: /trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.Netron/3.0.2672.12446/Netron.Diagramming.Core-3.0.2672.12446/Serialization/Connection.Serialization.cs
===================================================================
--- /trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.Netron/3.0.2672.12446/Netron.Diagramming.Core-3.0.2672.12446/Serialization/Connection.Serialization.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.Netron/3.0.2672.12446/Netron.Diagramming.Core-3.0.2672.12446/Serialization/Connection.Serialization.cs	(revision 4068)
@@ -1,36 +1,30 @@
 using System;
-using System.Collections.Generic;
-using System.Text;
-using System.Drawing;
-using System.ComponentModel;
+using System.Diagnostics;
 using System.Runtime.Serialization;
+using System.Xml.Schema;
 using System.Xml.Serialization;
-using System.Diagnostics;
-using System.Xml.Schema;
-namespace Netron.Diagramming.Core
-{
+namespace Netron.Diagramming.Core {
+  /// <summary>
+  /// Complementary partial class related to (de)serialization.
+  /// </summary>
+  [Serializable]
+  public partial class Connection : ISerializable, IXmlSerializable, IDeserializationCallback {
+    #region Deserialization constructor
     /// <summary>
-    /// Complementary partial class related to (de)serialization.
+    /// Deserialization constructor
     /// </summary>
-   [Serializable]
-    public  partial class Connection : ISerializable, IXmlSerializable, IDeserializationCallback  
-    {
-        #region Deserialization constructor
-        /// <summary>
-        /// Deserialization constructor
-        /// </summary>
-        /// <param name="info">The info.</param>
-        /// <param name="context">The context.</param>
-        private Connection(SerializationInfo info, StreamingContext context) : base(info, context)
-        {
-            if(Tracing.BinaryDeserializationSwitch.Enabled)
-                Trace.WriteLine("Deserializing the fields of 'Connection'.");
+    /// <param name="info">The info.</param>
+    /// <param name="context">The context.</param>
+    private Connection(SerializationInfo info, StreamingContext context)
+      : base(info, context) {
+      if (Tracing.BinaryDeserializationSwitch.Enabled)
+        Trace.WriteLine("Deserializing the fields of 'Connection'.");
 
-            double version = info.GetDouble("ConnectionVersion");
-        }
-        #endregion
+      double version = info.GetDouble("ConnectionVersion");
+    }
+    #endregion
 
-        #region Serialization events
-       /*
+    #region Serialization events
+    /*
         [OnSerializing]
         void OnSerializing(StreamingContext context)
@@ -44,8 +38,8 @@
         }
         */
-        #endregion
+    #endregion
 
-        #region Deserialization events
-       /*
+    #region Deserialization events
+    /*
         [OnDeserializing]
         void OnDeserializing(StreamingContext context)
@@ -61,67 +55,62 @@
          }
        */
-        #endregion
+    #endregion
 
-        #region Serialization
-        /// <summary>
-        /// Populates a <see cref="T:System.Runtime.Serialization.SerializationInfo"></see> with the data needed to serialize the target object.
-        /// </summary>
-        /// <param name="info">The <see cref="T:System.Runtime.Serialization.SerializationInfo"></see> to populate with data.</param>
-        /// <param name="context">The destination (see <see cref="T:System.Runtime.Serialization.StreamingContext"></see>) for this serialization.</param>
-        /// <exception cref="T:System.Security.SecurityException">The caller does not have the required permission. </exception>
-        public override void GetObjectData(SerializationInfo info, StreamingContext context)
-        {
-            if(Tracing.BinarySerializationSwitch.Enabled)
-                Trace.WriteLine("Serializing the fields of 'Connection'.");
-            base.GetObjectData(info, context);
-            info.AddValue("ConnectionVersion", connectionVersion);
-        }
-        #endregion
+    #region Serialization
+    /// <summary>
+    /// Populates a <see cref="T:System.Runtime.Serialization.SerializationInfo"></see> with the data needed to serialize the target object.
+    /// </summary>
+    /// <param name="info">The <see cref="T:System.Runtime.Serialization.SerializationInfo"></see> to populate with data.</param>
+    /// <param name="context">The destination (see <see cref="T:System.Runtime.Serialization.StreamingContext"></see>) for this serialization.</param>
+    /// <exception cref="T:System.Security.SecurityException">The caller does not have the required permission. </exception>
+    public override void GetObjectData(SerializationInfo info, StreamingContext context) {
+      if (Tracing.BinarySerializationSwitch.Enabled)
+        Trace.WriteLine("Serializing the fields of 'Connection'.");
+      base.GetObjectData(info, context);
+      info.AddValue("ConnectionVersion", connectionVersion);
+    }
+    #endregion
 
-        #region Xml serialization
-        /// <summary>
-        /// This property is reserved, apply the <see cref="T:System.Xml.Serialization.XmlSchemaProviderAttribute"></see> to the class instead.
-        /// </summary>
-        /// <returns>
-        /// An <see cref="T:System.Xml.Schema.XmlSchema"></see> that describes the XML representation of the object that is produced by the <see cref="M:System.Xml.Serialization.IXmlSerializable.WriteXml(System.Xml.XmlWriter)"></see> method and consumed by the <see cref="M:System.Xml.Serialization.IXmlSerializable.ReadXml(System.Xml.XmlReader)"></see> method.
-        /// </returns>
-        public override XmlSchema GetSchema()
-        {
-            throw new NotImplementedException("The method or operation is not implemented.");
-        }
+    #region Xml serialization
+    /// <summary>
+    /// This property is reserved, apply the <see cref="T:System.Xml.Serialization.XmlSchemaProviderAttribute"></see> to the class instead.
+    /// </summary>
+    /// <returns>
+    /// An <see cref="T:System.Xml.Schema.XmlSchema"></see> that describes the XML representation of the object that is produced by the <see cref="M:System.Xml.Serialization.IXmlSerializable.WriteXml(System.Xml.XmlWriter)"></see> method and consumed by the <see cref="M:System.Xml.Serialization.IXmlSerializable.ReadXml(System.Xml.XmlReader)"></see> method.
+    /// </returns>
+    public override XmlSchema GetSchema() {
+      throw new NotImplementedException("The method or operation is not implemented.");
+    }
 
-        /// <summary>
-        /// Generates an object from its XML representation.
-        /// </summary>
-        /// <param name="reader">The <see cref="T:System.Xml.XmlReader"></see> stream from which the object is deserialized.</param>
-        public override void ReadXml(System.Xml.XmlReader reader)
-        {
-            throw new NotImplementedException("The method or operation is not implemented.");
-        }
+    /// <summary>
+    /// Generates an object from its XML representation.
+    /// </summary>
+    /// <param name="reader">The <see cref="T:System.Xml.XmlReader"></see> stream from which the object is deserialized.</param>
+    public override void ReadXml(System.Xml.XmlReader reader) {
+      throw new NotImplementedException("The method or operation is not implemented.");
+    }
 
-        /// <summary>
-        /// Converts an object into its XML representation.
-        /// </summary>
-        /// <param name="writer">The <see cref="T:System.Xml.XmlWriter"></see> stream to which the object is serialized.</param>
-        public override void WriteXml(System.Xml.XmlWriter writer)
-        {
-            throw new NotImplementedException("The method or operation is not implemented.");
-        }
-        #endregion
+    /// <summary>
+    /// Converts an object into its XML representation.
+    /// </summary>
+    /// <param name="writer">The <see cref="T:System.Xml.XmlWriter"></see> stream to which the object is serialized.</param>
+    public override void WriteXml(System.Xml.XmlWriter writer) {
+      throw new NotImplementedException("The method or operation is not implemented.");
+    }
+    #endregion
 
-        #region IDeserializationCallback Members
+    #region IDeserializationCallback Members
 
-        /// <summary>
-        /// Runs when the entire object graph has been deserialized.
-        /// </summary>
-        /// <param name="sender">The object that initiated the callback. The functionality for this parameter is not currently implemented.</param>
-        public override void OnDeserialization(object sender)
-        {
-            base.OnDeserialization(sender);
-            if(Tracing.BinaryDeserializationSwitch.Enabled)
-                Trace.WriteLine("IDeserializationCallback of 'Connection' called.");
-        }
+    /// <summary>
+    /// Runs when the entire object graph has been deserialized.
+    /// </summary>
+    /// <param name="sender">The object that initiated the callback. The functionality for this parameter is not currently implemented.</param>
+    public override void OnDeserialization(object sender) {
+      base.OnDeserialization(sender);
+      if (Tracing.BinaryDeserializationSwitch.Enabled)
+        Trace.WriteLine("IDeserializationCallback of 'Connection' called.");
+    }
 
-        #endregion
-    }
+    #endregion
+  }
 }
Index: /trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.Netron/3.0.2672.12446/Netron.Diagramming.Core-3.0.2672.12446/Serialization/ConnectionBase.Serialization.cs
===================================================================
--- /trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.Netron/3.0.2672.12446/Netron.Diagramming.Core-3.0.2672.12446/Serialization/ConnectionBase.Serialization.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.Netron/3.0.2672.12446/Netron.Diagramming.Core-3.0.2672.12446/Serialization/ConnectionBase.Serialization.cs	(revision 4068)
@@ -1,68 +1,58 @@
 using System;
-using System.Collections.Generic;
-using System.Text;
-using System.Drawing;
-using System.ComponentModel;
+using System.Diagnostics;
 using System.Runtime.Serialization;
+using System.Xml.Schema;
 using System.Xml.Serialization;
-using System.Diagnostics;
-using System.Xml.Schema;
-namespace Netron.Diagramming.Core
-{
-    // ----------------------------------------------------------------------
+namespace Netron.Diagramming.Core {
+  // ----------------------------------------------------------------------
+  /// <summary>
+  /// Complementary partial class related to (de)serialization.
+  /// </summary>
+  // ----------------------------------------------------------------------
+  [Serializable]
+  public abstract partial class ConnectionBase :
+     ISerializable,
+     IXmlSerializable,
+     IDeserializationCallback {
+    #region Deserialization constructor
+
+    // ------------------------------------------------------------------
     /// <summary>
-    /// Complementary partial class related to (de)serialization.
+    /// Deserialization constructor
     /// </summary>
-    // ----------------------------------------------------------------------
-    [Serializable]
-    public abstract partial class ConnectionBase :
-       ISerializable,
-       IXmlSerializable,
-       IDeserializationCallback
-    {
-        #region Deserialization constructor
+    /// <param name="info">The info.</param>
+    /// <param name="context">The context.</param>
+    // ------------------------------------------------------------------
+    protected ConnectionBase(
+        SerializationInfo info,
+        StreamingContext context)
+      : base(info, context) {
+      if (Tracing.BinaryDeserializationSwitch.Enabled) {
+        Trace.WriteLine(
+            "Deserializing the fields of 'ConnectionBase'.");
+      }
 
-        // ------------------------------------------------------------------
-        /// <summary>
-        /// Deserialization constructor
-        /// </summary>
-        /// <param name="info">The info.</param>
-        /// <param name="context">The context.</param>
-        // ------------------------------------------------------------------
-        protected ConnectionBase(
-            SerializationInfo info,
-            StreamingContext context)
-            : base(info, context)
-        {
-            if (Tracing.BinaryDeserializationSwitch.Enabled)
-            {
-                Trace.WriteLine(
-                    "Deserializing the fields of 'ConnectionBase'.");
-            }
+      double version = info.GetDouble("ConnectionBaseVersion");
+      mTo = info.GetValue("To", typeof(Connector)) as Connector;
+      mFrom = info.GetValue("From", typeof(Connector)) as Connector;
 
-            double version = info.GetDouble("ConnectionBaseVersion");
-            mTo = info.GetValue("To", typeof(Connector)) as Connector;
-            mFrom = info.GetValue("From", typeof(Connector)) as Connector;
+      if (mTo == null) {
+        throw new InconsistencyException(
+            "'To' connector deserialized to 'null'");
+      }
+      if (mFrom == null) {
+        throw new InconsistencyException(
+            "'From' connector deserialized to 'null'");
+      }
 
-            if (mTo == null)
-            {
-                throw new InconsistencyException(
-                    "'To' connector deserialized to 'null'");
-            }
-            if (mFrom == null)
-            {
-                throw new InconsistencyException(
-                    "'From' connector deserialized to 'null'");
-            }
+      mTo.Parent = this;
+      mFrom.Parent = this;
 
-            mTo.Parent = this;
-            mFrom.Parent = this;
+    }
 
-        }
+    #endregion
 
-        #endregion
-
-        #region Serialization events
-        /*
+    #region Serialization events
+    /*
         [OnSerializing]
         void OnSerializing(StreamingContext context)
@@ -76,8 +66,8 @@
         }
         */
-        #endregion
+    #endregion
 
-        #region Deserialization events
-        /*
+    #region Deserialization events
+    /*
         [OnDeserializing]
         void OnDeserializing(StreamingContext context)
@@ -93,85 +83,79 @@
          }
        */
-        #endregion
+    #endregion
 
-        #region Serialization
+    #region Serialization
 
-        // ------------------------------------------------------------------
-        /// <summary>
-        /// Populates a <see cref=
-        /// "T:System.Runtime.Serialization.SerializationInfo"></see> with 
-        /// the data needed to serialize the target object.
-        /// </summary>
-        /// <param name="info">The <see cref=
-        /// "T:System.Runtime.Serialization.SerializationInfo"></see> to 
-        /// populate with data.</param>
-        /// <param name="context">The destination (see <see cref=
-        /// "T:System.Runtime.Serialization.StreamingContext"></see>) for 
-        /// this serialization.</param>
-        /// <exception cref="T:System.Security.SecurityException">The caller 
-        /// does not have the required permission. </exception>
-        // ------------------------------------------------------------------
-        public override void GetObjectData(
-            SerializationInfo info, 
-            StreamingContext context)
-        {
-            if (Tracing.BinarySerializationSwitch.Enabled)
-            {
-                Trace.WriteLine(
-                    "Serializing the fields of 'ConnectionBase'.");
-            }
+    // ------------------------------------------------------------------
+    /// <summary>
+    /// Populates a <see cref=
+    /// "T:System.Runtime.Serialization.SerializationInfo"></see> with 
+    /// the data needed to serialize the target object.
+    /// </summary>
+    /// <param name="info">The <see cref=
+    /// "T:System.Runtime.Serialization.SerializationInfo"></see> to 
+    /// populate with data.</param>
+    /// <param name="context">The destination (see <see cref=
+    /// "T:System.Runtime.Serialization.StreamingContext"></see>) for 
+    /// this serialization.</param>
+    /// <exception cref="T:System.Security.SecurityException">The caller 
+    /// does not have the required permission. </exception>
+    // ------------------------------------------------------------------
+    public override void GetObjectData(
+        SerializationInfo info,
+        StreamingContext context) {
+      if (Tracing.BinarySerializationSwitch.Enabled) {
+        Trace.WriteLine(
+            "Serializing the fields of 'ConnectionBase'.");
+      }
 
-            base.GetObjectData(info, context);
-            info.AddValue("From", this.From, typeof(Connector));
-            info.AddValue("To", this.To, typeof(Connector));
-            info.AddValue("ConnectionBaseVersion", connectionBaseVersion);
-        }
-        #endregion
+      base.GetObjectData(info, context);
+      info.AddValue("From", this.From, typeof(Connector));
+      info.AddValue("To", this.To, typeof(Connector));
+      info.AddValue("ConnectionBaseVersion", connectionBaseVersion);
+    }
+    #endregion
 
-        #region Xml serialization
-        /// <summary>
-        /// This property is reserved, apply the <see cref="T:System.Xml.Serialization.XmlSchemaProviderAttribute"></see> to the class instead.
-        /// </summary>
-        /// <returns>
-        /// An <see cref="T:System.Xml.Schema.XmlSchema"></see> that describes the XML representation of the object that is produced by the <see cref="M:System.Xml.Serialization.IXmlSerializable.WriteXml(System.Xml.XmlWriter)"></see> method and consumed by the <see cref="M:System.Xml.Serialization.IXmlSerializable.ReadXml(System.Xml.XmlReader)"></see> method.
-        /// </returns>
-        public override XmlSchema GetSchema()
-        {
-            throw new NotImplementedException("The method or operation is not implemented.");
-        }
+    #region Xml serialization
+    /// <summary>
+    /// This property is reserved, apply the <see cref="T:System.Xml.Serialization.XmlSchemaProviderAttribute"></see> to the class instead.
+    /// </summary>
+    /// <returns>
+    /// An <see cref="T:System.Xml.Schema.XmlSchema"></see> that describes the XML representation of the object that is produced by the <see cref="M:System.Xml.Serialization.IXmlSerializable.WriteXml(System.Xml.XmlWriter)"></see> method and consumed by the <see cref="M:System.Xml.Serialization.IXmlSerializable.ReadXml(System.Xml.XmlReader)"></see> method.
+    /// </returns>
+    public override XmlSchema GetSchema() {
+      throw new NotImplementedException("The method or operation is not implemented.");
+    }
 
-        /// <summary>
-        /// Generates an object from its XML representation.
-        /// </summary>
-        /// <param name="reader">The <see cref="T:System.Xml.XmlReader"></see> stream from which the object is deserialized.</param>
-        public override void ReadXml(System.Xml.XmlReader reader)
-        {
-            throw new NotImplementedException("The method or operation is not implemented.");
-        }
+    /// <summary>
+    /// Generates an object from its XML representation.
+    /// </summary>
+    /// <param name="reader">The <see cref="T:System.Xml.XmlReader"></see> stream from which the object is deserialized.</param>
+    public override void ReadXml(System.Xml.XmlReader reader) {
+      throw new NotImplementedException("The method or operation is not implemented.");
+    }
 
-        /// <summary>
-        /// Converts an object into its XML representation.
-        /// </summary>
-        /// <param name="writer">The <see cref="T:System.Xml.XmlWriter"></see> stream to which the object is serialized.</param>
-        public override void WriteXml(System.Xml.XmlWriter writer)
-        {
-            throw new NotImplementedException("The method or operation is not implemented.");
-        }
-        #endregion
+    /// <summary>
+    /// Converts an object into its XML representation.
+    /// </summary>
+    /// <param name="writer">The <see cref="T:System.Xml.XmlWriter"></see> stream to which the object is serialized.</param>
+    public override void WriteXml(System.Xml.XmlWriter writer) {
+      throw new NotImplementedException("The method or operation is not implemented.");
+    }
+    #endregion
 
-        #region IDeserializationCallback Members
+    #region IDeserializationCallback Members
 
-        /// <summary>
-        /// Runs when the entire object graph has been deserialized.
-        /// </summary>
-        /// <param name="sender">The object that initiated the callback. The functionality for this parameter is not currently implemented.</param>
-        public override void OnDeserialization(object sender)
-        {
-            base.OnDeserialization(sender);
-            if (Tracing.BinaryDeserializationSwitch.Enabled)
-                Trace.WriteLine("IDeserializationCallback of 'ConnectionBase' called.");
-        }
+    /// <summary>
+    /// Runs when the entire object graph has been deserialized.
+    /// </summary>
+    /// <param name="sender">The object that initiated the callback. The functionality for this parameter is not currently implemented.</param>
+    public override void OnDeserialization(object sender) {
+      base.OnDeserialization(sender);
+      if (Tracing.BinaryDeserializationSwitch.Enabled)
+        Trace.WriteLine("IDeserializationCallback of 'ConnectionBase' called.");
+    }
 
-        #endregion
-    }
+    #endregion
+  }
 }
Index: /trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.Netron/3.0.2672.12446/Netron.Diagramming.Core-3.0.2672.12446/Serialization/Connector.Serialization.cs
===================================================================
--- /trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.Netron/3.0.2672.12446/Netron.Diagramming.Core-3.0.2672.12446/Serialization/Connector.Serialization.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.Netron/3.0.2672.12446/Netron.Diagramming.Core-3.0.2672.12446/Serialization/Connector.Serialization.cs	(revision 4068)
@@ -1,54 +1,46 @@
 using System;
-using System.Collections.Generic;
-using System.Text;
-using System.Drawing;
-using System.ComponentModel;
+using System.Diagnostics;
 using System.Runtime.Serialization;
+using System.Xml.Schema;
 using System.Xml.Serialization;
-using System.Diagnostics;
-using System.Xml.Schema;
 
-namespace Netron.Diagramming.Core
-{
-    // ----------------------------------------------------------------------
+namespace Netron.Diagramming.Core {
+  // ----------------------------------------------------------------------
+  /// <summary>
+  /// Complementary partial class related to (de)serialization.
+  /// </summary>
+  // ----------------------------------------------------------------------
+  [Serializable]
+  public partial class Connector :
+      ISerializable,
+      IXmlSerializable,
+      IDeserializationCallback {
+    #region Deserialization constructor
+
+    // ------------------------------------------------------------------
     /// <summary>
-    /// Complementary partial class related to (de)serialization.
+    /// Deserialization constructor
     /// </summary>
-    // ----------------------------------------------------------------------
-    [Serializable]
-    public partial class Connector : 
-        ISerializable, 
-        IXmlSerializable, 
-        IDeserializationCallback
-    {
-        #region Deserialization constructor
+    /// <param name="info">The info.</param>
+    /// <param name="context">The context.</param>
+    // ------------------------------------------------------------------
+    protected Connector(
+        SerializationInfo info,
+        StreamingContext context)
+      : base(info, context) {
+      if (Tracing.BinaryDeserializationSwitch.Enabled) {
+        Trace.WriteLine("Deserializing the fields of 'Connector'.");
+      }
 
-        // ------------------------------------------------------------------
-        /// <summary>
-        /// Deserialization constructor
-        /// </summary>
-        /// <param name="info">The info.</param>
-        /// <param name="context">The context.</param>
-        // ------------------------------------------------------------------
-        protected Connector(
-            SerializationInfo info, 
-            StreamingContext context)
-            : base(info, context)
-        {
-            if (Tracing.BinaryDeserializationSwitch.Enabled)
-            {
-                Trace.WriteLine("Deserializing the fields of 'Connector'.");
-            }
+      double version = info.GetDouble("ConnectorVersion");
 
-            double version = info.GetDouble("ConnectorVersion");
+      myStyle = (ConnectorStyle)info.GetValue(
+          "ConnectorStyle",
+          typeof(ConnectorStyle));
+    }
+    #endregion
 
-            myStyle = (ConnectorStyle)info.GetValue(
-                "ConnectorStyle", 
-                typeof(ConnectorStyle));
-        }
-        #endregion
-
-        #region Serialization events
-        /*
+    #region Serialization events
+    /*
         [OnSerializing]
         void OnSerializing(StreamingContext context)
@@ -62,8 +54,8 @@
         }
         */
-        #endregion
+    #endregion
 
-        #region Deserialization events
-        /*
+    #region Deserialization events
+    /*
         [OnDeserializing]
         void OnDeserializing(StreamingContext context)
@@ -79,84 +71,78 @@
          }
        */
-        #endregion
+    #endregion
 
-        #region Serialization
+    #region Serialization
 
-        // ------------------------------------------------------------------
-        /// <summary>
-        /// Populates a <see cref=
-        /// "T:System.Runtime.Serialization.SerializationInfo"></see> with 
-        /// the data needed to serialize the target object.
-        /// </summary>
-        /// <param name="info">The <see cref=
-        /// "T:System.Runtime.Serialization.SerializationInfo"></see> to 
-        /// populate with data.</param>
-        /// <param name="context">The destination (see <see cref=
-        /// "T:System.Runtime.Serialization.StreamingContext"></see>) for 
-        /// this serialization.</param>
-        /// <exception cref="T:System.Security.SecurityException">The caller 
-        /// does not have the required permission. </exception>
-        // ------------------------------------------------------------------
-        public override void GetObjectData(
-            SerializationInfo info,
-            StreamingContext context)
-        {
-            if (Tracing.BinarySerializationSwitch.Enabled)
-            {
-                Trace.WriteLine("Serializing the fields of 'Connector'.");
-            }
+    // ------------------------------------------------------------------
+    /// <summary>
+    /// Populates a <see cref=
+    /// "T:System.Runtime.Serialization.SerializationInfo"></see> with 
+    /// the data needed to serialize the target object.
+    /// </summary>
+    /// <param name="info">The <see cref=
+    /// "T:System.Runtime.Serialization.SerializationInfo"></see> to 
+    /// populate with data.</param>
+    /// <param name="context">The destination (see <see cref=
+    /// "T:System.Runtime.Serialization.StreamingContext"></see>) for 
+    /// this serialization.</param>
+    /// <exception cref="T:System.Security.SecurityException">The caller 
+    /// does not have the required permission. </exception>
+    // ------------------------------------------------------------------
+    public override void GetObjectData(
+        SerializationInfo info,
+        StreamingContext context) {
+      if (Tracing.BinarySerializationSwitch.Enabled) {
+        Trace.WriteLine("Serializing the fields of 'Connector'.");
+      }
 
-            base.GetObjectData(info, context);
+      base.GetObjectData(info, context);
 
-            info.AddValue("ConnectorVersion", connectorVersion);
-            info.AddValue("ConnectorStyle", myStyle, typeof(ConnectorStyle));
-        }
-        #endregion
+      info.AddValue("ConnectorVersion", connectorVersion);
+      info.AddValue("ConnectorStyle", myStyle, typeof(ConnectorStyle));
+    }
+    #endregion
 
-        #region Xml serialization
-        /// <summary>
-        /// This property is reserved, apply the <see cref="T:System.Xml.Serialization.XmlSchemaProviderAttribute"></see> to the class instead.
-        /// </summary>
-        /// <returns>
-        /// An <see cref="T:System.Xml.Schema.XmlSchema"></see> that describes the XML representation of the object that is produced by the <see cref="M:System.Xml.Serialization.IXmlSerializable.WriteXml(System.Xml.XmlWriter)"></see> method and consumed by the <see cref="M:System.Xml.Serialization.IXmlSerializable.ReadXml(System.Xml.XmlReader)"></see> method.
-        /// </returns>
-        public override XmlSchema GetSchema()
-        {
-            throw new NotImplementedException("The method or operation is not implemented.");
-        }
+    #region Xml serialization
+    /// <summary>
+    /// This property is reserved, apply the <see cref="T:System.Xml.Serialization.XmlSchemaProviderAttribute"></see> to the class instead.
+    /// </summary>
+    /// <returns>
+    /// An <see cref="T:System.Xml.Schema.XmlSchema"></see> that describes the XML representation of the object that is produced by the <see cref="M:System.Xml.Serialization.IXmlSerializable.WriteXml(System.Xml.XmlWriter)"></see> method and consumed by the <see cref="M:System.Xml.Serialization.IXmlSerializable.ReadXml(System.Xml.XmlReader)"></see> method.
+    /// </returns>
+    public override XmlSchema GetSchema() {
+      throw new NotImplementedException("The method or operation is not implemented.");
+    }
 
-        /// <summary>
-        /// Generates an object from its XML representation.
-        /// </summary>
-        /// <param name="reader">The <see cref="T:System.Xml.XmlReader"></see> stream from which the object is deserialized.</param>
-        public override void ReadXml(System.Xml.XmlReader reader)
-        {
-            throw new NotImplementedException("The method or operation is not implemented.");
-        }
+    /// <summary>
+    /// Generates an object from its XML representation.
+    /// </summary>
+    /// <param name="reader">The <see cref="T:System.Xml.XmlReader"></see> stream from which the object is deserialized.</param>
+    public override void ReadXml(System.Xml.XmlReader reader) {
+      throw new NotImplementedException("The method or operation is not implemented.");
+    }
 
-        /// <summary>
-        /// Converts an object into its XML representation.
-        /// </summary>
-        /// <param name="writer">The <see cref="T:System.Xml.XmlWriter"></see> stream to which the object is serialized.</param>
-        public override void WriteXml(System.Xml.XmlWriter writer)
-        {
-            throw new NotImplementedException("The method or operation is not implemented.");
-        }
-        #endregion
+    /// <summary>
+    /// Converts an object into its XML representation.
+    /// </summary>
+    /// <param name="writer">The <see cref="T:System.Xml.XmlWriter"></see> stream to which the object is serialized.</param>
+    public override void WriteXml(System.Xml.XmlWriter writer) {
+      throw new NotImplementedException("The method or operation is not implemented.");
+    }
+    #endregion
 
-        #region IDeserializationCallback Members
+    #region IDeserializationCallback Members
 
-        /// <summary>
-        /// Runs when the entire object graph has been deserialized.
-        /// </summary>
-        /// <param name="sender">The object that initiated the callback. The functionality for this parameter is not currently implemented.</param>
-        public override void OnDeserialization(object sender)
-        {
-            base.OnDeserialization(sender);
-            if (Tracing.BinaryDeserializationSwitch.Enabled)
-                Trace.WriteLine("IDeserializationCallback of 'Connector' called.");
-        }
+    /// <summary>
+    /// Runs when the entire object graph has been deserialized.
+    /// </summary>
+    /// <param name="sender">The object that initiated the callback. The functionality for this parameter is not currently implemented.</param>
+    public override void OnDeserialization(object sender) {
+      base.OnDeserialization(sender);
+      if (Tracing.BinaryDeserializationSwitch.Enabled)
+        Trace.WriteLine("IDeserializationCallback of 'Connector' called.");
+    }
 
-        #endregion
-    }
+    #endregion
+  }
 }
Index: /trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.Netron/3.0.2672.12446/Netron.Diagramming.Core-3.0.2672.12446/Serialization/ConnectorBase.Serialization.cs
===================================================================
--- /trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.Netron/3.0.2672.12446/Netron.Diagramming.Core-3.0.2672.12446/Serialization/ConnectorBase.Serialization.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.Netron/3.0.2672.12446/Netron.Diagramming.Core-3.0.2672.12446/Serialization/ConnectorBase.Serialization.cs	(revision 4068)
@@ -1,49 +1,44 @@
 using System;
-using System.Collections.Generic;
-using System.Text;
+using System.Diagnostics;
 using System.Drawing;
-using System.ComponentModel;
 using System.Runtime.Serialization;
+using System.Xml.Schema;
 using System.Xml.Serialization;
-using System.Diagnostics;
-using System.Xml.Schema;
-namespace Netron.Diagramming.Core
-{
+namespace Netron.Diagramming.Core {
+  /// <summary>
+  /// Complementary partial class related to (de)serialization.
+  /// </summary>
+  [Serializable]
+  public abstract partial class ConnectorBase : ISerializable, IXmlSerializable, IDeserializationCallback {
+    #region Deserialization constructor
     /// <summary>
-    /// Complementary partial class related to (de)serialization.
+    /// Deserialization constructor
     /// </summary>
-   [Serializable]
-    public abstract partial class ConnectorBase : ISerializable, IXmlSerializable, IDeserializationCallback  
-    {
-        #region Deserialization constructor
-        /// <summary>
-        /// Deserialization constructor
-        /// </summary>
-        /// <param name="info">The info.</param>
-        /// <param name="context">The context.</param>
-        protected ConnectorBase(SerializationInfo info, StreamingContext context) : base(info, context)
-        {
-            if(Tracing.BinaryDeserializationSwitch.Enabled)
-                Trace.WriteLine("Deserializing the fields of 'ConnectorBase'.");
+    /// <param name="info">The info.</param>
+    /// <param name="context">The context.</param>
+    protected ConnectorBase(SerializationInfo info, StreamingContext context)
+      : base(info, context) {
+      if (Tracing.BinaryDeserializationSwitch.Enabled)
+        Trace.WriteLine("Deserializing the fields of 'ConnectorBase'.");
 
-            double version = info.GetDouble("ConnectorBaseVersion");
+      double version = info.GetDouble("ConnectorBaseVersion");
 
-            this.mShowName = info.GetBoolean("ShowName");
-            this.mNameLocation = (ConnectorNameLocation) info.GetValue(
-                "NameLocation",
-                typeof(ConnectorNameLocation));
+      this.mShowName = info.GetBoolean("ShowName");
+      this.mNameLocation = (ConnectorNameLocation)info.GetValue(
+          "NameLocation",
+          typeof(ConnectorNameLocation));
 
-            this.mPoint = (Point) info.GetValue("Point", typeof(Point));
-            mAttachedConnectors = new CollectionBase<IConnector>();
+      this.mPoint = (Point)info.GetValue("Point", typeof(Point));
+      mAttachedConnectors = new CollectionBase<IConnector>();
 
-            #region Preparation of the anchoring process
-            Guid tuid = new Guid(info.GetString("AttachedTo"));            
-            Anchors.Add(this.Uid, new Anchor(tuid, this));
-            #endregion
-        }
-        #endregion
+      #region Preparation of the anchoring process
+      Guid tuid = new Guid(info.GetString("AttachedTo"));
+      Anchors.Add(this.Uid, new Anchor(tuid, this));
+      #endregion
+    }
+    #endregion
 
-        #region Serialization events
-       /*
+    #region Serialization events
+    /*
         [OnSerializing]
         void OnSerializing(StreamingContext context)
@@ -57,8 +52,8 @@
         }
         */
-        #endregion
+    #endregion
 
-        #region Deserialization events
-       /*
+    #region Deserialization events
+    /*
         [OnDeserializing]
         void OnDeserializing(StreamingContext context)
@@ -68,92 +63,86 @@
         }
         */
-        [OnDeserialized]
-        void OnDeserialized(StreamingContext context)
-         {
-            if(Tracing.BinaryDeserializationSwitch.Enabled)
-                Trace.WriteLine("...deserialization of 'ConnectorBase' finished");
+    [OnDeserialized]
+    void OnDeserialized(StreamingContext context) {
+      if (Tracing.BinaryDeserializationSwitch.Enabled)
+        Trace.WriteLine("...deserialization of 'ConnectorBase' finished");
 
 
-       
-         }
-       
-        #endregion
 
-        #region Serialization
-         /// <summary>
-         /// Populates a <see cref="T:System.Runtime.Serialization.SerializationInfo"></see> with the data needed to serialize the target object.
-         /// </summary>
-         /// <param name="info">The <see cref="T:System.Runtime.Serialization.SerializationInfo"></see> to populate with data.</param>
-         /// <param name="context">The destination (see <see cref="T:System.Runtime.Serialization.StreamingContext"></see>) for this serialization.</param>
-         /// <exception cref="T:System.Security.SecurityException">The caller does not have the required permission. </exception>
-        public override void GetObjectData(SerializationInfo info, StreamingContext context)
-        {
-            if(Tracing.BinarySerializationSwitch.Enabled)
-                Trace.WriteLine("Serializing the fields of 'ConnectorBase'.");
-            base.GetObjectData(info, context);
+    }
 
-            info.AddValue("ConnectorBaseVersion", connectorBaseVersion);
+    #endregion
 
-            info.AddValue(
-                "NameLocation",
-                mNameLocation, 
-                typeof(ConnectorNameLocation));
+    #region Serialization
+    /// <summary>
+    /// Populates a <see cref="T:System.Runtime.Serialization.SerializationInfo"></see> with the data needed to serialize the target object.
+    /// </summary>
+    /// <param name="info">The <see cref="T:System.Runtime.Serialization.SerializationInfo"></see> to populate with data.</param>
+    /// <param name="context">The destination (see <see cref="T:System.Runtime.Serialization.StreamingContext"></see>) for this serialization.</param>
+    /// <exception cref="T:System.Security.SecurityException">The caller does not have the required permission. </exception>
+    public override void GetObjectData(SerializationInfo info, StreamingContext context) {
+      if (Tracing.BinarySerializationSwitch.Enabled)
+        Trace.WriteLine("Serializing the fields of 'ConnectorBase'.");
+      base.GetObjectData(info, context);
 
-            info.AddValue("ShowName", mShowName);
-            info.AddValue("Point", this.Point, typeof(Point));
-            if(this.AttachedTo!=null)
-                info.AddValue("AttachedTo", this.AttachedTo.Uid.ToString());
-            else
-                info.AddValue("AttachedTo", Guid.Empty);
-            
-        }
-        #endregion
+      info.AddValue("ConnectorBaseVersion", connectorBaseVersion);
 
-        #region Xml serialization
-        /// <summary>
-        /// This property is reserved, apply the <see cref="T:System.Xml.Serialization.XmlSchemaProviderAttribute"></see> to the class instead.
-        /// </summary>
-        /// <returns>
-        /// An <see cref="T:System.Xml.Schema.XmlSchema"></see> that describes the XML representation of the object that is produced by the <see cref="M:System.Xml.Serialization.IXmlSerializable.WriteXml(System.Xml.XmlWriter)"></see> method and consumed by the <see cref="M:System.Xml.Serialization.IXmlSerializable.ReadXml(System.Xml.XmlReader)"></see> method.
-        /// </returns>
-        public override XmlSchema GetSchema()
-        {
-            throw new NotImplementedException("The method or operation is not implemented.");
-        }
+      info.AddValue(
+          "NameLocation",
+          mNameLocation,
+          typeof(ConnectorNameLocation));
 
-        /// <summary>
-        /// Generates an object from its XML representation.
-        /// </summary>
-        /// <param name="reader">The <see cref="T:System.Xml.XmlReader"></see> stream from which the object is deserialized.</param>
-        public override void ReadXml(System.Xml.XmlReader reader)
-        {
-            throw new NotImplementedException("The method or operation is not implemented.");
-        }
+      info.AddValue("ShowName", mShowName);
+      info.AddValue("Point", this.Point, typeof(Point));
+      if (this.AttachedTo != null)
+        info.AddValue("AttachedTo", this.AttachedTo.Uid.ToString());
+      else
+        info.AddValue("AttachedTo", Guid.Empty);
 
-        /// <summary>
-        /// Converts an object into its XML representation.
-        /// </summary>
-        /// <param name="writer">The <see cref="T:System.Xml.XmlWriter"></see> stream to which the object is serialized.</param>
-        public override void WriteXml(System.Xml.XmlWriter writer)
-        {
-            throw new NotImplementedException("The method or operation is not implemented.");
-        }
-        #endregion
+    }
+    #endregion
 
-        #region IDeserializationCallback Members
+    #region Xml serialization
+    /// <summary>
+    /// This property is reserved, apply the <see cref="T:System.Xml.Serialization.XmlSchemaProviderAttribute"></see> to the class instead.
+    /// </summary>
+    /// <returns>
+    /// An <see cref="T:System.Xml.Schema.XmlSchema"></see> that describes the XML representation of the object that is produced by the <see cref="M:System.Xml.Serialization.IXmlSerializable.WriteXml(System.Xml.XmlWriter)"></see> method and consumed by the <see cref="M:System.Xml.Serialization.IXmlSerializable.ReadXml(System.Xml.XmlReader)"></see> method.
+    /// </returns>
+    public override XmlSchema GetSchema() {
+      throw new NotImplementedException("The method or operation is not implemented.");
+    }
 
-        /// <summary>
-        /// Runs when the entire object graph has been deserialized.
-        /// </summary>
-        /// <param name="sender">The object that initiated the callback. The functionality for this parameter is not currently implemented.</param>
-        public override void OnDeserialization(object sender)
-        {
-            base.OnDeserialization(sender);
-        
-            if(Tracing.BinaryDeserializationSwitch.Enabled)
-                Trace.WriteLine("IDeserializationCallback of 'ConnectorBase' called.");
-        }
+    /// <summary>
+    /// Generates an object from its XML representation.
+    /// </summary>
+    /// <param name="reader">The <see cref="T:System.Xml.XmlReader"></see> stream from which the object is deserialized.</param>
+    public override void ReadXml(System.Xml.XmlReader reader) {
+      throw new NotImplementedException("The method or operation is not implemented.");
+    }
 
-        #endregion
+    /// <summary>
+    /// Converts an object into its XML representation.
+    /// </summary>
+    /// <param name="writer">The <see cref="T:System.Xml.XmlWriter"></see> stream to which the object is serialized.</param>
+    public override void WriteXml(System.Xml.XmlWriter writer) {
+      throw new NotImplementedException("The method or operation is not implemented.");
     }
+    #endregion
+
+    #region IDeserializationCallback Members
+
+    /// <summary>
+    /// Runs when the entire object graph has been deserialized.
+    /// </summary>
+    /// <param name="sender">The object that initiated the callback. The functionality for this parameter is not currently implemented.</param>
+    public override void OnDeserialization(object sender) {
+      base.OnDeserialization(sender);
+
+      if (Tracing.BinaryDeserializationSwitch.Enabled)
+        Trace.WriteLine("IDeserializationCallback of 'ConnectorBase' called.");
+    }
+
+    #endregion
+  }
 }
Index: /trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.Netron/3.0.2672.12446/Netron.Diagramming.Core-3.0.2672.12446/Serialization/DiagramEntityBase.Serialization.cs
===================================================================
--- /trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.Netron/3.0.2672.12446/Netron.Diagramming.Core-3.0.2672.12446/Serialization/DiagramEntityBase.Serialization.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.Netron/3.0.2672.12446/Netron.Diagramming.Core-3.0.2672.12446/Serialization/DiagramEntityBase.Serialization.cs	(revision 4068)
@@ -1,68 +1,61 @@
 using System;
-using System.Collections.Generic;
-using System.Text;
+using System.Diagnostics;
 using System.Drawing;
-using System.ComponentModel;
 using System.Runtime.Serialization;
+using System.Xml.Schema;
 using System.Xml.Serialization;
-using System.Diagnostics;
-using System.Xml.Schema;
-namespace Netron.Diagramming.Core
-{
-    // ----------------------------------------------------------------------
+namespace Netron.Diagramming.Core {
+  // ----------------------------------------------------------------------
+  /// <summary>
+  /// Complementary partial class related to (de)serialization.
+  /// </summary>
+  // ----------------------------------------------------------------------
+  [Serializable]
+  public partial class DiagramEntityBase :
+      ISerializable,
+      IXmlSerializable,
+      IDeserializationCallback {
+    #region Deserialization constructor
+
+    // ------------------------------------------------------------------
     /// <summary>
-    /// Complementary partial class related to (de)serialization.
+    /// Deserialization constructor
     /// </summary>
-    // ----------------------------------------------------------------------
-    [Serializable]
-    public partial class DiagramEntityBase :
-        ISerializable,
-        IXmlSerializable,
-        IDeserializationCallback
-    {
-        #region Deserialization constructor
+    /// <param name="info">The info.</param>
+    /// <param name="context">The context.</param>
+    // ------------------------------------------------------------------
+    protected DiagramEntityBase(
+        SerializationInfo info,
+        StreamingContext context) {
+      if (Tracing.BinaryDeserializationSwitch.Enabled) {
+        Trace.WriteLine(
+            "Deserializing the fields of 'DiagramEntityBase'.");
+      }
+      Initialize();
 
-        // ------------------------------------------------------------------
-        /// <summary>
-        /// Deserialization constructor
-        /// </summary>
-        /// <param name="info">The info.</param>
-        /// <param name="context">The context.</param>
-        // ------------------------------------------------------------------
-        protected DiagramEntityBase(
-            SerializationInfo info,
-            StreamingContext context)
-        {
-            if (Tracing.BinaryDeserializationSwitch.Enabled)
-            {
-                Trace.WriteLine(
-                    "Deserializing the fields of 'DiagramEntityBase'.");
-            }
-            Initialize();
+      string version = info.GetString("DiagramEntityBaseVersion");
+      this.mName = info.GetString("Name");
+      this.mSceneIndex = info.GetInt32("SceneIndex");
+      this.mUid = new Guid(info.GetString("Uid"));
+      this.mResizable = info.GetBoolean("Resizable");
 
-            string version = info.GetString("DiagramEntityBaseVersion");
-            this.mName = info.GetString("Name");
-            this.mSceneIndex = info.GetInt32("SceneIndex");
-            this.mUid = new Guid(info.GetString("Uid"));
-            this.mResizable = info.GetBoolean("Resizable");
+      this.mPaintStyle = info.GetValue(
+          "PaintStyle",
+          typeof(IPaintStyle)) as IPaintStyle;
 
-            this.mPaintStyle = info.GetValue(
-                "PaintStyle",
-                typeof(IPaintStyle)) as IPaintStyle;
+      this.mPenStyle = info.GetValue(
+          "PenStyle",
+          typeof(IPenStyle)) as IPenStyle;
 
-            this.mPenStyle = info.GetValue(
-                "PenStyle",
-                typeof(IPenStyle)) as IPenStyle;
+      mAllowDelete = (bool)info.GetValue("AllowDelete", typeof(bool));
+      myMinSize = (Size)info.GetValue("MinSize", typeof(Size));
+      myMaxSize = (Size)info.GetValue("MaxSize", typeof(Size));
+      mVisible = (bool)info.GetValue("Visible", typeof(bool));
+      mEnabled = (bool)info.GetValue("Enabled", typeof(bool));
+    }
+    #endregion
 
-            mAllowDelete = (bool)info.GetValue("AllowDelete", typeof(bool));
-            myMinSize = (Size)info.GetValue("MinSize", typeof(Size));
-            myMaxSize = (Size)info.GetValue("MaxSize", typeof(Size));
-            mVisible = (bool)info.GetValue("Visible", typeof(bool));
-            mEnabled = (bool)info.GetValue("Enabled", typeof(bool));
-        }
-        #endregion
-
-        #region Serialization events
-        /*
+    #region Serialization events
+    /*
         [OnSerializing]
         void OnSerializing(StreamingContext context)
@@ -76,8 +69,8 @@
         }
         */
-        #endregion
+    #endregion
 
-        #region Deserialization events
-        /*
+    #region Deserialization events
+    /*
         [OnDeserializing]
         void OnDeserializing(StreamingContext context)
@@ -87,100 +80,93 @@
         }
         */
-        [OnDeserialized]
-        void OnDeserialized(StreamingContext context)
-        {
-            if (Tracing.BinaryDeserializationSwitch.Enabled)
-                Trace.WriteLine("...deserialization of 'DiagramEntityBase' finished");
-        }
+    [OnDeserialized]
+    void OnDeserialized(StreamingContext context) {
+      if (Tracing.BinaryDeserializationSwitch.Enabled)
+        Trace.WriteLine("...deserialization of 'DiagramEntityBase' finished");
+    }
 
-        #endregion
+    #endregion
 
-        #region Serialization
+    #region Serialization
 
-        // ------------------------------------------------------------------
-        /// <summary>
-        /// Populates a <see cref=
-        /// "T:System.Runtime.Serialization.SerializationInfo"></see> with 
-        /// the data needed to serialize the target object.
-        /// </summary>
-        /// <param name="info">The 
-        /// <see cref="T:System.Runtime.Serialization.SerializationInfo"></see> 
-        /// to populate with data.</param>
-        /// <param name="context">The destination (see 
-        /// <see cref="T:System.Runtime.Serialization.StreamingContext"></see>) 
-        /// for this serialization.</param>
-        /// <exception cref="T:System.Security.SecurityException">The caller 
-        /// does not have the required permission. </exception>
-        // ------------------------------------------------------------------
-        public virtual void GetObjectData(
-            SerializationInfo info,
-            StreamingContext context)
-        {
-            if (Tracing.BinarySerializationSwitch.Enabled)
-            {
-                Trace.WriteLine("Serializing the fields of " +
-                    "'DiagramEntityBase'.");
-            }
+    // ------------------------------------------------------------------
+    /// <summary>
+    /// Populates a <see cref=
+    /// "T:System.Runtime.Serialization.SerializationInfo"></see> with 
+    /// the data needed to serialize the target object.
+    /// </summary>
+    /// <param name="info">The 
+    /// <see cref="T:System.Runtime.Serialization.SerializationInfo"></see> 
+    /// to populate with data.</param>
+    /// <param name="context">The destination (see 
+    /// <see cref="T:System.Runtime.Serialization.StreamingContext"></see>) 
+    /// for this serialization.</param>
+    /// <exception cref="T:System.Security.SecurityException">The caller 
+    /// does not have the required permission. </exception>
+    // ------------------------------------------------------------------
+    public virtual void GetObjectData(
+        SerializationInfo info,
+        StreamingContext context) {
+      if (Tracing.BinarySerializationSwitch.Enabled) {
+        Trace.WriteLine("Serializing the fields of " +
+            "'DiagramEntityBase'.");
+      }
 
-            info.AddValue("DiagramEntityBaseVersion", diagramEntityBaseVersion);
-            info.AddValue("Name", this.Name);
-            info.AddValue("SceneIndex", this.SceneIndex);
-            info.AddValue("Uid", this.Uid.ToString());
-            info.AddValue("Resizable", this.mResizable);
-            info.AddValue("PaintStyle", this.mPaintStyle, typeof(IPaintStyle));
-            info.AddValue("PenStyle", this.mPenStyle, typeof(IPenStyle));
-            info.AddValue("AllowDelete", mAllowDelete, typeof(bool));
-            info.AddValue("MinSize", myMinSize, typeof(Size));
-            info.AddValue("MaxSize", myMaxSize, typeof(Size));
-            info.AddValue("Visible", mVisible, typeof(bool));
-            info.AddValue("Enabled", mEnabled, typeof(bool));
-        }
-        #endregion
+      info.AddValue("DiagramEntityBaseVersion", diagramEntityBaseVersion);
+      info.AddValue("Name", this.Name);
+      info.AddValue("SceneIndex", this.SceneIndex);
+      info.AddValue("Uid", this.Uid.ToString());
+      info.AddValue("Resizable", this.mResizable);
+      info.AddValue("PaintStyle", this.mPaintStyle, typeof(IPaintStyle));
+      info.AddValue("PenStyle", this.mPenStyle, typeof(IPenStyle));
+      info.AddValue("AllowDelete", mAllowDelete, typeof(bool));
+      info.AddValue("MinSize", myMinSize, typeof(Size));
+      info.AddValue("MaxSize", myMaxSize, typeof(Size));
+      info.AddValue("Visible", mVisible, typeof(bool));
+      info.AddValue("Enabled", mEnabled, typeof(bool));
+    }
+    #endregion
 
-        #region Xml serialization
-        /// <summary>
-        /// This property is reserved, apply the <see cref="T:System.Xml.Serialization.XmlSchemaProviderAttribute"></see> to the class instead.
-        /// </summary>
-        /// <returns>
-        /// An <see cref="T:System.Xml.Schema.XmlSchema"></see> that describes the XML representation of the object that is produced by the <see cref="M:System.Xml.Serialization.IXmlSerializable.WriteXml(System.Xml.XmlWriter)"></see> method and consumed by the <see cref="M:System.Xml.Serialization.IXmlSerializable.ReadXml(System.Xml.XmlReader)"></see> method.
-        /// </returns>
-        public virtual XmlSchema GetSchema()
-        {
-            throw new NotImplementedException("The method or operation is not implemented.");
-        }
+    #region Xml serialization
+    /// <summary>
+    /// This property is reserved, apply the <see cref="T:System.Xml.Serialization.XmlSchemaProviderAttribute"></see> to the class instead.
+    /// </summary>
+    /// <returns>
+    /// An <see cref="T:System.Xml.Schema.XmlSchema"></see> that describes the XML representation of the object that is produced by the <see cref="M:System.Xml.Serialization.IXmlSerializable.WriteXml(System.Xml.XmlWriter)"></see> method and consumed by the <see cref="M:System.Xml.Serialization.IXmlSerializable.ReadXml(System.Xml.XmlReader)"></see> method.
+    /// </returns>
+    public virtual XmlSchema GetSchema() {
+      throw new NotImplementedException("The method or operation is not implemented.");
+    }
 
-        /// <summary>
-        /// Generates an object from its XML representation.
-        /// </summary>
-        /// <param name="reader">The <see cref="T:System.Xml.XmlReader"></see> stream from which the object is deserialized.</param>
-        public virtual void ReadXml(System.Xml.XmlReader reader)
-        {
-            throw new NotImplementedException("The method or operation is not implemented.");
-        }
+    /// <summary>
+    /// Generates an object from its XML representation.
+    /// </summary>
+    /// <param name="reader">The <see cref="T:System.Xml.XmlReader"></see> stream from which the object is deserialized.</param>
+    public virtual void ReadXml(System.Xml.XmlReader reader) {
+      throw new NotImplementedException("The method or operation is not implemented.");
+    }
 
-        /// <summary>
-        /// Converts an object into its XML representation.
-        /// </summary>
-        /// <param name="writer">The <see cref="T:System.Xml.XmlWriter"></see> stream to which the object is serialized.</param>
-        public virtual void WriteXml(System.Xml.XmlWriter writer)
-        {
-            throw new NotImplementedException("The method or operation is not implemented.");
-        }
-        #endregion
+    /// <summary>
+    /// Converts an object into its XML representation.
+    /// </summary>
+    /// <param name="writer">The <see cref="T:System.Xml.XmlWriter"></see> stream to which the object is serialized.</param>
+    public virtual void WriteXml(System.Xml.XmlWriter writer) {
+      throw new NotImplementedException("The method or operation is not implemented.");
+    }
+    #endregion
 
-        #region IDeserializationCallback Members
+    #region IDeserializationCallback Members
 
-        /// <summary>
-        /// Runs when the entire object graph has been deserialized.
-        /// </summary>
-        /// <param name="sender">The object that initiated the callback. The functionality for this parameter is not currently implemented.</param>
-        public virtual void OnDeserialization(object sender)
-        {
-            if (Tracing.BinaryDeserializationSwitch.Enabled)
-                Trace.WriteLine("IDeserializationCallback of 'DiagramEntityBase' called.");
-            UpdatePaintingMaterial();
-        }
+    /// <summary>
+    /// Runs when the entire object graph has been deserialized.
+    /// </summary>
+    /// <param name="sender">The object that initiated the callback. The functionality for this parameter is not currently implemented.</param>
+    public virtual void OnDeserialization(object sender) {
+      if (Tracing.BinaryDeserializationSwitch.Enabled)
+        Trace.WriteLine("IDeserializationCallback of 'DiagramEntityBase' called.");
+      UpdatePaintingMaterial();
+    }
 
-        #endregion
-    }
+    #endregion
+  }
 }
Index: /trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.Netron/3.0.2672.12446/Netron.Diagramming.Core-3.0.2672.12446/Serialization/Document.Serialization.cs
===================================================================
--- /trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.Netron/3.0.2672.12446/Netron.Diagramming.Core-3.0.2672.12446/Serialization/Document.Serialization.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.Netron/3.0.2672.12446/Netron.Diagramming.Core-3.0.2672.12446/Serialization/Document.Serialization.cs	(revision 4068)
@@ -1,39 +1,32 @@
 using System;
-using System.Collections.Generic;
-using System.Text;
-using System.Drawing;
-using System.ComponentModel;
+using System.Diagnostics;
 using System.Runtime.Serialization;
+using System.Xml.Schema;
 using System.Xml.Serialization;
-using System.Diagnostics;
-using System.Xml.Schema;
-namespace Netron.Diagramming.Core
-{
+namespace Netron.Diagramming.Core {
+  /// <summary>
+  /// Complementary partial class related to (de)serialization.
+  /// </summary>
+  [Serializable]
+  public partial class Document : ISerializable, IXmlSerializable, IDeserializationCallback {
+    #region Deserialization constructor
     /// <summary>
-    /// Complementary partial class related to (de)serialization.
+    /// Deserialization constructor
     /// </summary>
-   [Serializable]
-    public partial class Document : ISerializable, IXmlSerializable, IDeserializationCallback
-    {
-        #region Deserialization constructor
-        /// <summary>
-        /// Deserialization constructor
-        /// </summary>
-        /// <param name="info">The info.</param>
-        /// <param name="context">The context.</param>
-        protected Document(SerializationInfo info, StreamingContext context)
-        {
-            if(Tracing.BinaryDeserializationSwitch.Enabled)
-                Trace.WriteLine("Deserializing the fields of 'Document'.");
+    /// <param name="info">The info.</param>
+    /// <param name="context">The context.</param>
+    protected Document(SerializationInfo info, StreamingContext context) {
+      if (Tracing.BinaryDeserializationSwitch.Enabled)
+        Trace.WriteLine("Deserializing the fields of 'Document'.");
 
-            double version = info.GetDouble("DocumentVersion");
+      double version = info.GetDouble("DocumentVersion");
 
-            this.mInformation = info.GetValue("Information", typeof(DocumentInformation)) as DocumentInformation;
-            this.mModel = info.GetValue("Model", typeof(Model)) as Model;
-        }
-        #endregion
+      this.mInformation = info.GetValue("Information", typeof(DocumentInformation)) as DocumentInformation;
+      this.mModel = info.GetValue("Model", typeof(Model)) as Model;
+    }
+    #endregion
 
-        #region Serialization events
-       /*
+    #region Serialization events
+    /*
         [OnSerializing]
         void OnSerializing(StreamingContext context)
@@ -51,8 +44,8 @@
         }
         */
-        #endregion
+    #endregion
 
-        #region Deserialization events
-       /* 
+    #region Deserialization events
+    /* 
        [OnDeserializing]
 
@@ -70,67 +63,62 @@
          }
        */
-        #endregion
+    #endregion
 
-        #region Serialization
-        /// <summary>
-        /// Populates a <see cref="T:System.Runtime.Serialization.SerializationInfo"></see> with the data needed to serialize the target object.
-        /// </summary>
-        /// <param name="info">The <see cref="T:System.Runtime.Serialization.SerializationInfo"></see> to populate with data.</param>
-        /// <param name="context">The destination (see <see cref="T:System.Runtime.Serialization.StreamingContext"></see>) for this serialization.</param>
-        /// <exception cref="T:System.Security.SecurityException">The caller does not have the required permission. </exception>
-        public virtual void GetObjectData(
-            SerializationInfo info, 
-            StreamingContext context)
-        {
-            if(Tracing.BinarySerializationSwitch.Enabled)
-                Trace.WriteLine("Serializing the fields of 'Document'.");
-            //the metadata
-            info.AddValue("DocumentVersion", documentVersion);
-            info.AddValue("Information", mInformation, typeof(DocumentInformation));
+    #region Serialization
+    /// <summary>
+    /// Populates a <see cref="T:System.Runtime.Serialization.SerializationInfo"></see> with the data needed to serialize the target object.
+    /// </summary>
+    /// <param name="info">The <see cref="T:System.Runtime.Serialization.SerializationInfo"></see> to populate with data.</param>
+    /// <param name="context">The destination (see <see cref="T:System.Runtime.Serialization.StreamingContext"></see>) for this serialization.</param>
+    /// <exception cref="T:System.Security.SecurityException">The caller does not have the required permission. </exception>
+    public virtual void GetObjectData(
+        SerializationInfo info,
+        StreamingContext context) {
+      if (Tracing.BinarySerializationSwitch.Enabled)
+        Trace.WriteLine("Serializing the fields of 'Document'.");
+      //the metadata
+      info.AddValue("DocumentVersion", documentVersion);
+      info.AddValue("Information", mInformation, typeof(DocumentInformation));
 
-            info.AddValue("Model", mModel, typeof(Model));
-        }
-        #endregion
+      info.AddValue("Model", mModel, typeof(Model));
+    }
+    #endregion
 
-        #region Xml serialization
-        /// <summary>
-        /// This property is reserved, apply the <see cref="T:System.Xml.Serialization.XmlSchemaProviderAttribute"></see> to the class instead.
-        /// </summary>
-        /// <returns>
-        /// An <see cref="T:System.Xml.Schema.XmlSchema"></see> that describes the XML representation of the object that is produced by the <see cref="M:System.Xml.Serialization.IXmlSerializable.WriteXml(System.Xml.XmlWriter)"></see> method and consumed by the <see cref="M:System.Xml.Serialization.IXmlSerializable.ReadXml(System.Xml.XmlReader)"></see> method.
-        /// </returns>
-        public XmlSchema GetSchema()
-        {
-            throw new NotImplementedException("The method or operation is not implemented.");
-        }
+    #region Xml serialization
+    /// <summary>
+    /// This property is reserved, apply the <see cref="T:System.Xml.Serialization.XmlSchemaProviderAttribute"></see> to the class instead.
+    /// </summary>
+    /// <returns>
+    /// An <see cref="T:System.Xml.Schema.XmlSchema"></see> that describes the XML representation of the object that is produced by the <see cref="M:System.Xml.Serialization.IXmlSerializable.WriteXml(System.Xml.XmlWriter)"></see> method and consumed by the <see cref="M:System.Xml.Serialization.IXmlSerializable.ReadXml(System.Xml.XmlReader)"></see> method.
+    /// </returns>
+    public XmlSchema GetSchema() {
+      throw new NotImplementedException("The method or operation is not implemented.");
+    }
 
-        /// <summary>
-        /// Generates an object from its XML representation.
-        /// </summary>
-        /// <param name="reader">The <see cref="T:System.Xml.XmlReader"></see> stream from which the object is deserialized.</param>
-        public void ReadXml(System.Xml.XmlReader reader)
-        {
-            throw new NotImplementedException("The method or operation is not implemented.");
-        }
+    /// <summary>
+    /// Generates an object from its XML representation.
+    /// </summary>
+    /// <param name="reader">The <see cref="T:System.Xml.XmlReader"></see> stream from which the object is deserialized.</param>
+    public void ReadXml(System.Xml.XmlReader reader) {
+      throw new NotImplementedException("The method or operation is not implemented.");
+    }
 
-        /// <summary>
-        /// Converts an object into its XML representation.
-        /// </summary>
-        /// <param name="writer">The <see cref="T:System.Xml.XmlWriter"></see> stream to which the object is serialized.</param>
-        public void WriteXml(System.Xml.XmlWriter writer)
-        {
-            throw new NotImplementedException("The method or operation is not implemented.");
-        }
-        #endregion
+    /// <summary>
+    /// Converts an object into its XML representation.
+    /// </summary>
+    /// <param name="writer">The <see cref="T:System.Xml.XmlWriter"></see> stream to which the object is serialized.</param>
+    public void WriteXml(System.Xml.XmlWriter writer) {
+      throw new NotImplementedException("The method or operation is not implemented.");
+    }
+    #endregion
 
-        /// <summary>
-        /// Runs when the entire object graph has been deserialized.
-        /// </summary>
-        /// <param name="sender">The object that initiated the callback. The functionality for this parameter is not currently implemented.</param>
-        public void OnDeserialization(object sender)
-        {
-            if(Tracing.BinaryDeserializationSwitch.Enabled)
-                Trace.WriteLine("IDeserializationCallback of 'Document' called.");
-        }
+    /// <summary>
+    /// Runs when the entire object graph has been deserialized.
+    /// </summary>
+    /// <param name="sender">The object that initiated the callback. The functionality for this parameter is not currently implemented.</param>
+    public void OnDeserialization(object sender) {
+      if (Tracing.BinaryDeserializationSwitch.Enabled)
+        Trace.WriteLine("IDeserializationCallback of 'Document' called.");
     }
+  }
 }
Index: /trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.Netron/3.0.2672.12446/Netron.Diagramming.Core-3.0.2672.12446/Serialization/DocumentInformation.Serialization.cs
===================================================================
--- /trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.Netron/3.0.2672.12446/Netron.Diagramming.Core-3.0.2672.12446/Serialization/DocumentInformation.Serialization.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.Netron/3.0.2672.12446/Netron.Diagramming.Core-3.0.2672.12446/Serialization/DocumentInformation.Serialization.cs	(revision 4068)
@@ -1,41 +1,34 @@
 using System;
-using System.Collections.Generic;
-using System.Text;
-using System.Drawing;
-using System.ComponentModel;
+using System.Diagnostics;
 using System.Runtime.Serialization;
+using System.Xml.Schema;
 using System.Xml.Serialization;
-using System.Diagnostics;
-using System.Xml.Schema;
-namespace Netron.Diagramming.Core
-{
+namespace Netron.Diagramming.Core {
+  /// <summary>
+  /// Complementary partial class related to (de)serialization.
+  /// </summary>
+  [Serializable]
+  public partial class DocumentInformation : ISerializable, IXmlSerializable, IDeserializationCallback {
+    #region Deserialization constructor
     /// <summary>
-    /// Complementary partial class related to (de)serialization.
+    /// Deserialization constructor
     /// </summary>
-    [Serializable]
-    public partial class DocumentInformation : ISerializable, IXmlSerializable, IDeserializationCallback
-    {
-        #region Deserialization constructor
-        /// <summary>
-        /// Deserialization constructor
-        /// </summary>
-        /// <param name="info">The info.</param>
-        /// <param name="context">The context.</param>
-        protected DocumentInformation(SerializationInfo info, StreamingContext context)
-        {
-            if(Tracing.BinaryDeserializationSwitch.Enabled)
-                Trace.WriteLine("Deserializing the fields of 'DocumentInformation'.");
+    /// <param name="info">The info.</param>
+    /// <param name="context">The context.</param>
+    protected DocumentInformation(SerializationInfo info, StreamingContext context) {
+      if (Tracing.BinaryDeserializationSwitch.Enabled)
+        Trace.WriteLine("Deserializing the fields of 'DocumentInformation'.");
 
-            double version = info.GetDouble("DocumentInfoVersion");
+      double version = info.GetDouble("DocumentInfoVersion");
 
-            mAuthor = info.GetString("Author");
-            mCreationDate = info.GetDateTime("CreationDate").ToString();
-            mDescription = info.GetString("Description");
-            mTitle = info.GetString("Title");
-        }
-        #endregion
+      mAuthor = info.GetString("Author");
+      mCreationDate = info.GetDateTime("CreationDate").ToString();
+      mDescription = info.GetString("Description");
+      mTitle = info.GetString("Title");
+    }
+    #endregion
 
-        #region Serialization events
-        /*
+    #region Serialization events
+    /*
         [OnSerializing]
         void OnSerializing(StreamingContext context)
@@ -50,9 +43,9 @@
             Trace.Unindent();
         }
-        */ 
-        #endregion
+        */
+    #endregion
 
-        #region Deserialization events
-        /*
+    #region Deserialization events
+    /*
         [OnDeserializing]
         void OnDeserializing(StreamingContext context)
@@ -68,67 +61,62 @@
          }
         */
-        #endregion
+    #endregion
 
-        #region Serialization
+    #region Serialization
 
-        /// <summary>
-        /// Populates a <see cref="T:System.Runtime.Serialization.SerializationInfo"></see> with the data needed to serialize the target object.
-        /// </summary>
-        /// <param name="info">The <see cref="T:System.Runtime.Serialization.SerializationInfo"></see> to populate with data.</param>
-        /// <param name="context">The destination (see <see cref="T:System.Runtime.Serialization.StreamingContext"></see>) for this serialization.</param>
-        /// <exception cref="T:System.Security.SecurityException">The caller does not have the required permission. </exception>
-        public void GetObjectData(SerializationInfo info, StreamingContext context)
-        {
-            if(Tracing.BinarySerializationSwitch.Enabled)
-                Trace.WriteLine("Serializing the fields of 'DocumentInformation'.");
+    /// <summary>
+    /// Populates a <see cref="T:System.Runtime.Serialization.SerializationInfo"></see> with the data needed to serialize the target object.
+    /// </summary>
+    /// <param name="info">The <see cref="T:System.Runtime.Serialization.SerializationInfo"></see> to populate with data.</param>
+    /// <param name="context">The destination (see <see cref="T:System.Runtime.Serialization.StreamingContext"></see>) for this serialization.</param>
+    /// <exception cref="T:System.Security.SecurityException">The caller does not have the required permission. </exception>
+    public void GetObjectData(SerializationInfo info, StreamingContext context) {
+      if (Tracing.BinarySerializationSwitch.Enabled)
+        Trace.WriteLine("Serializing the fields of 'DocumentInformation'.");
 
-            info.AddValue("DocumentInfoVersion", documentInformationVersion);
-            info.AddValue("Author", this.Author);
-            info.AddValue("CreationDate", DateTime.Parse(this.CreationDate));
-            info.AddValue("Description", this.Description);
-            info.AddValue("Title", this.Title);            
-        }
-        #endregion
+      info.AddValue("DocumentInfoVersion", documentInformationVersion);
+      info.AddValue("Author", this.Author);
+      info.AddValue("CreationDate", DateTime.Parse(this.CreationDate));
+      info.AddValue("Description", this.Description);
+      info.AddValue("Title", this.Title);
+    }
+    #endregion
 
-        #region Xml serialization
-        /// <summary>
-        /// This property is reserved, apply the <see cref="T:System.Xml.Serialization.XmlSchemaProviderAttribute"></see> to the class instead.
-        /// </summary>
-        /// <returns>
-        /// An <see cref="T:System.Xml.Schema.XmlSchema"></see> that describes the XML representation of the object that is produced by the <see cref="M:System.Xml.Serialization.IXmlSerializable.WriteXml(System.Xml.XmlWriter)"></see> method and consumed by the <see cref="M:System.Xml.Serialization.IXmlSerializable.ReadXml(System.Xml.XmlReader)"></see> method.
-        /// </returns>
-        public XmlSchema GetSchema()
-        {
-            throw new NotImplementedException("The method or operation is not implemented.");
-        }
+    #region Xml serialization
+    /// <summary>
+    /// This property is reserved, apply the <see cref="T:System.Xml.Serialization.XmlSchemaProviderAttribute"></see> to the class instead.
+    /// </summary>
+    /// <returns>
+    /// An <see cref="T:System.Xml.Schema.XmlSchema"></see> that describes the XML representation of the object that is produced by the <see cref="M:System.Xml.Serialization.IXmlSerializable.WriteXml(System.Xml.XmlWriter)"></see> method and consumed by the <see cref="M:System.Xml.Serialization.IXmlSerializable.ReadXml(System.Xml.XmlReader)"></see> method.
+    /// </returns>
+    public XmlSchema GetSchema() {
+      throw new NotImplementedException("The method or operation is not implemented.");
+    }
 
-        /// <summary>
-        /// Generates an object from its XML representation.
-        /// </summary>
-        /// <param name="reader">The <see cref="T:System.Xml.XmlReader"></see> stream from which the object is deserialized.</param>
-        public void ReadXml(System.Xml.XmlReader reader)
-        {
-            throw new NotImplementedException("The method or operation is not implemented.");
-        }
+    /// <summary>
+    /// Generates an object from its XML representation.
+    /// </summary>
+    /// <param name="reader">The <see cref="T:System.Xml.XmlReader"></see> stream from which the object is deserialized.</param>
+    public void ReadXml(System.Xml.XmlReader reader) {
+      throw new NotImplementedException("The method or operation is not implemented.");
+    }
 
-        /// <summary>
-        /// Converts an object into its XML representation.
-        /// </summary>
-        /// <param name="writer">The <see cref="T:System.Xml.XmlWriter"></see> stream to which the object is serialized.</param>
-        public void WriteXml(System.Xml.XmlWriter writer)
-        {
-            throw new NotImplementedException("The method or operation is not implemented.");
-        }
-        #endregion
+    /// <summary>
+    /// Converts an object into its XML representation.
+    /// </summary>
+    /// <param name="writer">The <see cref="T:System.Xml.XmlWriter"></see> stream to which the object is serialized.</param>
+    public void WriteXml(System.Xml.XmlWriter writer) {
+      throw new NotImplementedException("The method or operation is not implemented.");
+    }
+    #endregion
 
-        /// <summary>
-        /// Runs when the entire object graph has been deserialized.
-        /// </summary>
-        /// <param name="sender">The object that initiated the callback. The functionality for this parameter is not currently implemented.</param>
-        public void OnDeserialization(object sender)
-        {
-            if(Tracing.BinaryDeserializationSwitch.Enabled)
-                Trace.WriteLine("IDeserializationCallback of 'DocumentInformation' called.");
-        }
+    /// <summary>
+    /// Runs when the entire object graph has been deserialized.
+    /// </summary>
+    /// <param name="sender">The object that initiated the callback. The functionality for this parameter is not currently implemented.</param>
+    public void OnDeserialization(object sender) {
+      if (Tracing.BinaryDeserializationSwitch.Enabled)
+        Trace.WriteLine("IDeserializationCallback of 'DocumentInformation' called.");
     }
+  }
 }
Index: /trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.Netron/3.0.2672.12446/Netron.Diagramming.Core-3.0.2672.12446/Serialization/FolderMaterial.Serialization.cs
===================================================================
--- /trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.Netron/3.0.2672.12446/Netron.Diagramming.Core-3.0.2672.12446/Serialization/FolderMaterial.Serialization.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.Netron/3.0.2672.12446/Netron.Diagramming.Core-3.0.2672.12446/Serialization/FolderMaterial.Serialization.cs	(revision 4068)
@@ -1,47 +1,41 @@
 using System;
-using System.Collections.Generic;
-using System.Text;
+using System.Diagnostics;
 using System.Drawing;
-using System.ComponentModel;
 using System.Runtime.Serialization;
+using System.Xml.Schema;
 using System.Xml.Serialization;
-using System.Diagnostics;
-using System.Xml.Schema;
-namespace Netron.Diagramming.Core
-{
+namespace Netron.Diagramming.Core {
+  /// <summary>
+  /// Complementary partial class related to (de)serialization.
+  /// </summary>
+  [Serializable]
+  public partial class FolderMaterial : ISerializable, IXmlSerializable, IDeserializationCallback {
+    #region Deserialization constructor
     /// <summary>
-    /// Complementary partial class related to (de)serialization.
+    /// Deserialization constructor
     /// </summary>
-   [Serializable]
-    public partial class FolderMaterial : ISerializable, IXmlSerializable, IDeserializationCallback
-    {
-        #region Deserialization constructor
-        /// <summary>
-        /// Deserialization constructor
-        /// </summary>
-        /// <param name="info">The info.</param>
-        /// <param name="context">The context.</param>
-        protected FolderMaterial(SerializationInfo info, StreamingContext context)            
-        {
-            if(Tracing.BinaryDeserializationSwitch.Enabled)
-                Trace.WriteLine("Deserializing the fields of 'FolderMaterial'.");
+    /// <param name="info">The info.</param>
+    /// <param name="context">The context.</param>
+    protected FolderMaterial(SerializationInfo info, StreamingContext context) {
+      if (Tracing.BinaryDeserializationSwitch.Enabled)
+        Trace.WriteLine("Deserializing the fields of 'FolderMaterial'.");
 
-            double version = info.GetDouble("FolderMaterialVersion");
-            
-            this.Gliding = info.GetBoolean("Gliding");
-            this.Resizable = info.GetBoolean("Resizable");            
-            this.Visible = info.GetBoolean("Visible");
-            header = info.GetValue("Header", typeof(ClickableLabelMaterial)) as ClickableLabelMaterial;
-            plusminus = info.GetValue("PlusMinus", typeof(SwitchIconMaterial)) as SwitchIconMaterial;
-            mEntries = info.GetValue("Entries", typeof(CollectionBase<IShapeMaterial>)) as CollectionBase<IShapeMaterial>;
-            mEntries.OnItemAdded += new EventHandler<CollectionEventArgs<IShapeMaterial>>(mEntries_OnItemAdded);
-            Rectangle = (Rectangle) info.GetValue("Rectangle", typeof(Rectangle));
-            
-            mCollapsed = info.GetBoolean("Collapsed");
-        }
-        #endregion
+      double version = info.GetDouble("FolderMaterialVersion");
 
-        #region Serialization events
-       /*
+      this.Gliding = info.GetBoolean("Gliding");
+      this.Resizable = info.GetBoolean("Resizable");
+      this.Visible = info.GetBoolean("Visible");
+      header = info.GetValue("Header", typeof(ClickableLabelMaterial)) as ClickableLabelMaterial;
+      plusminus = info.GetValue("PlusMinus", typeof(SwitchIconMaterial)) as SwitchIconMaterial;
+      mEntries = info.GetValue("Entries", typeof(CollectionBase<IShapeMaterial>)) as CollectionBase<IShapeMaterial>;
+      mEntries.OnItemAdded += new EventHandler<CollectionEventArgs<IShapeMaterial>>(mEntries_OnItemAdded);
+      Rectangle = (Rectangle)info.GetValue("Rectangle", typeof(Rectangle));
+
+      mCollapsed = info.GetBoolean("Collapsed");
+    }
+    #endregion
+
+    #region Serialization events
+    /*
         [OnSerializing]
         void OnSerializing(StreamingContext context)
@@ -57,8 +51,8 @@
         }
         */
-        #endregion
+    #endregion
 
-        #region Deserialization events
-       /*
+    #region Deserialization events
+    /*
         [OnDeserializing]      
         void OnDeserializing(StreamingContext context)
@@ -68,89 +62,82 @@
         }
         * */
-        [OnDeserialized]
-        void OnDeserialized(StreamingContext context)
-         {
-             if(Tracing.BinaryDeserializationSwitch.Enabled)
-                Trace.WriteLine("...deserialization of 'FolderMaterial' finished");
-             foreach(IShapeMaterial material in mEntries)
-             {
-                 material.Shape = this.Shape;                 
-             }
-             plusminus.OnExpand += new EventHandler(plusminus_OnExpand);
-             plusminus.OnCollapse += new EventHandler(plusminus_OnCollapse);
-             plusminus.Collapsed = mCollapsed;//this will call the Expand/Collapse of the folder via the event in the lines above            
-            
-            Transform(Rectangle);     
-            
-         }
-       
-        #endregion
+    [OnDeserialized]
+    void OnDeserialized(StreamingContext context) {
+      if (Tracing.BinaryDeserializationSwitch.Enabled)
+        Trace.WriteLine("...deserialization of 'FolderMaterial' finished");
+      foreach (IShapeMaterial material in mEntries) {
+        material.Shape = this.Shape;
+      }
+      plusminus.OnExpand += new EventHandler(plusminus_OnExpand);
+      plusminus.OnCollapse += new EventHandler(plusminus_OnCollapse);
+      plusminus.Collapsed = mCollapsed;//this will call the Expand/Collapse of the folder via the event in the lines above            
 
-        #region Serialization
-         /// <summary>
-         /// Populates a <see cref="T:System.Runtime.Serialization.SerializationInfo"></see> with the data needed to serialize the target object.
-         /// </summary>
-         /// <param name="info">The <see cref="T:System.Runtime.Serialization.SerializationInfo"></see> to populate with data.</param>
-         /// <param name="context">The destination (see <see cref="T:System.Runtime.Serialization.StreamingContext"></see>) for this serialization.</param>
-         /// <exception cref="T:System.Security.SecurityException">The caller does not have the required permission. </exception>
-        public override void GetObjectData(SerializationInfo info, StreamingContext context) 
-        {
-            if(Tracing.BinarySerializationSwitch.Enabled)
-                Trace.WriteLine("Serializing the fields of 'FolderMaterial'.");
-            base.GetObjectData(info, context);
+      Transform(Rectangle);
 
-            info.AddValue("FolderMaterialVersion", folderMaterialVersion);
-            info.AddValue("Header", this.header, typeof(ClickableLabelMaterial));
-            info.AddValue("PlusMinus", this.plusminus, typeof(SwitchIconMaterial));
-            info.AddValue("Entries", this.mEntries, typeof(CollectionBase<IShapeMaterial>));
-            info.AddValue("Collapsed", mCollapsed);
-        }
-        #endregion
+    }
 
-        #region Xml serialization
-        /// <summary>
-        /// This property is reserved, apply the <see cref="T:System.Xml.Serialization.XmlSchemaProviderAttribute"></see> to the class instead.
-        /// </summary>
-        /// <returns>
-        /// An <see cref="T:System.Xml.Schema.XmlSchema"></see> that describes the XML representation of the object that is produced by the <see cref="M:System.Xml.Serialization.IXmlSerializable.WriteXml(System.Xml.XmlWriter)"></see> method and consumed by the <see cref="M:System.Xml.Serialization.IXmlSerializable.ReadXml(System.Xml.XmlReader)"></see> method.
-        /// </returns>
-        public override XmlSchema GetSchema()
-        {
-            throw new NotImplementedException("The method or operation is not implemented.");
-        }
+    #endregion
 
-        /// <summary>
-        /// Generates an object from its XML representation.
-        /// </summary>
-        /// <param name="reader">The <see cref="T:System.Xml.XmlReader"></see> stream from which the object is deserialized.</param>
-        public override void ReadXml(System.Xml.XmlReader reader)
-        {
-            throw new NotImplementedException("The method or operation is not implemented.");
-        }
+    #region Serialization
+    /// <summary>
+    /// Populates a <see cref="T:System.Runtime.Serialization.SerializationInfo"></see> with the data needed to serialize the target object.
+    /// </summary>
+    /// <param name="info">The <see cref="T:System.Runtime.Serialization.SerializationInfo"></see> to populate with data.</param>
+    /// <param name="context">The destination (see <see cref="T:System.Runtime.Serialization.StreamingContext"></see>) for this serialization.</param>
+    /// <exception cref="T:System.Security.SecurityException">The caller does not have the required permission. </exception>
+    public override void GetObjectData(SerializationInfo info, StreamingContext context) {
+      if (Tracing.BinarySerializationSwitch.Enabled)
+        Trace.WriteLine("Serializing the fields of 'FolderMaterial'.");
+      base.GetObjectData(info, context);
 
-        /// <summary>
-        /// Converts an object into its XML representation.
-        /// </summary>
-        /// <param name="writer">The <see cref="T:System.Xml.XmlWriter"></see> stream to which the object is serialized.</param>
-        public override void WriteXml(System.Xml.XmlWriter writer)
-        {
-            throw new NotImplementedException("The method or operation is not implemented.");
-        }
-        #endregion
+      info.AddValue("FolderMaterialVersion", folderMaterialVersion);
+      info.AddValue("Header", this.header, typeof(ClickableLabelMaterial));
+      info.AddValue("PlusMinus", this.plusminus, typeof(SwitchIconMaterial));
+      info.AddValue("Entries", this.mEntries, typeof(CollectionBase<IShapeMaterial>));
+      info.AddValue("Collapsed", mCollapsed);
+    }
+    #endregion
+
+    #region Xml serialization
+    /// <summary>
+    /// This property is reserved, apply the <see cref="T:System.Xml.Serialization.XmlSchemaProviderAttribute"></see> to the class instead.
+    /// </summary>
+    /// <returns>
+    /// An <see cref="T:System.Xml.Schema.XmlSchema"></see> that describes the XML representation of the object that is produced by the <see cref="M:System.Xml.Serialization.IXmlSerializable.WriteXml(System.Xml.XmlWriter)"></see> method and consumed by the <see cref="M:System.Xml.Serialization.IXmlSerializable.ReadXml(System.Xml.XmlReader)"></see> method.
+    /// </returns>
+    public override XmlSchema GetSchema() {
+      throw new NotImplementedException("The method or operation is not implemented.");
+    }
+
+    /// <summary>
+    /// Generates an object from its XML representation.
+    /// </summary>
+    /// <param name="reader">The <see cref="T:System.Xml.XmlReader"></see> stream from which the object is deserialized.</param>
+    public override void ReadXml(System.Xml.XmlReader reader) {
+      throw new NotImplementedException("The method or operation is not implemented.");
+    }
+
+    /// <summary>
+    /// Converts an object into its XML representation.
+    /// </summary>
+    /// <param name="writer">The <see cref="T:System.Xml.XmlWriter"></see> stream to which the object is serialized.</param>
+    public override void WriteXml(System.Xml.XmlWriter writer) {
+      throw new NotImplementedException("The method or operation is not implemented.");
+    }
+    #endregion
 
 
 
-        /// <summary>
-        /// Runs when the entire object graph has been deserialized.
-        /// </summary>
-        /// <param name="sender">The object that initiated the callback. The functionality for this parameter is not currently implemented.</param>
-        public override void  OnDeserialization(object sender)
-        {
-            base.OnDeserialization(sender);
-            if(Tracing.BinaryDeserializationSwitch.Enabled)
-                Trace.WriteLine("IDeserializationCallback of 'FolderMaterial' called.");
-            
+    /// <summary>
+    /// Runs when the entire object graph has been deserialized.
+    /// </summary>
+    /// <param name="sender">The object that initiated the callback. The functionality for this parameter is not currently implemented.</param>
+    public override void OnDeserialization(object sender) {
+      base.OnDeserialization(sender);
+      if (Tracing.BinaryDeserializationSwitch.Enabled)
+        Trace.WriteLine("IDeserializationCallback of 'FolderMaterial' called.");
 
-        }
+
     }
+  }
 }
Index: /trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.Netron/3.0.2672.12446/Netron.Diagramming.Core-3.0.2672.12446/Serialization/GradientPaintStyle.Serialization.cs
===================================================================
--- /trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.Netron/3.0.2672.12446/Netron.Diagramming.Core-3.0.2672.12446/Serialization/GradientPaintStyle.Serialization.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.Netron/3.0.2672.12446/Netron.Diagramming.Core-3.0.2672.12446/Serialization/GradientPaintStyle.Serialization.cs	(revision 4068)
@@ -1,44 +1,36 @@
 using System;
-using System.Collections.Generic;
-using System.Text;
+using System.Diagnostics;
 using System.Drawing;
-using System.ComponentModel;
 using System.Runtime.Serialization;
+using System.Xml.Schema;
 using System.Xml.Serialization;
-using System.Diagnostics;
-using System.Xml.Schema;
-using System.Drawing.Drawing2D;
-namespace Netron.Diagramming.Core
-{
+namespace Netron.Diagramming.Core {
+  /// <summary>
+  /// Complementary partial class related to (de)serialization.
+  /// </summary>
+  [Serializable]
+  public partial class GradientPaintStyle : ISerializable, IXmlSerializable, IDeserializationCallback {
+    #region Deserialization constructor
     /// <summary>
-    /// Complementary partial class related to (de)serialization.
+    /// Deserialization constructor
     /// </summary>
-   [Serializable]
-    public partial class GradientPaintStyle : ISerializable, IXmlSerializable, IDeserializationCallback
-    {
-        #region Deserialization constructor
-        /// <summary>
-        /// Deserialization constructor
-        /// </summary>
-        /// <param name="info">The info.</param>
-        /// <param name="context">The context.</param>
-        protected GradientPaintStyle(SerializationInfo info, StreamingContext context)
-           
-        {
+    /// <param name="info">The info.</param>
+    /// <param name="context">The context.</param>
+    protected GradientPaintStyle(SerializationInfo info, StreamingContext context) {
 
-            if(Tracing.BinaryDeserializationSwitch.Enabled)
-                Trace.WriteLine("Deserializing the fields of 'GradientPaintStyle'.");
+      if (Tracing.BinaryDeserializationSwitch.Enabled)
+        Trace.WriteLine("Deserializing the fields of 'GradientPaintStyle'.");
 
-            double version = info.GetDouble("GradientPaintStyleVersion");
+      double version = info.GetDouble("GradientPaintStyleVersion");
 
-            mAngle = info.GetSingle("Angle");
-            mEndColor = (Color) info.GetValue("EndColor", typeof(Color));
-            mStartColor = (Color)info.GetValue("StartColor", typeof(Color));
+      mAngle = info.GetSingle("Angle");
+      mEndColor = (Color)info.GetValue("EndColor", typeof(Color));
+      mStartColor = (Color)info.GetValue("StartColor", typeof(Color));
 
-        }
-        #endregion
+    }
+    #endregion
 
-        #region Serialization events
-       /*
+    #region Serialization events
+    /*
         [OnSerializing]
         void OnSerializing(StreamingContext context)
@@ -52,8 +44,8 @@
         }
         */
-        #endregion
+    #endregion
 
-        #region Deserialization events
-       /*
+    #region Deserialization events
+    /*
         [OnDeserializing]
         void OnDeserializing(StreamingContext context)
@@ -69,68 +61,63 @@
         }
        */
-        #endregion
+    #endregion
 
-        #region Serialization
-        /// <summary>
-        /// Populates a <see cref="T:System.Runtime.Serialization.SerializationInfo"></see> with the data needed to serialize the target object.
-        /// </summary>
-        /// <param name="info">The <see cref="T:System.Runtime.Serialization.SerializationInfo"></see> to populate with data.</param>
-        /// <param name="context">The destination (see <see cref="T:System.Runtime.Serialization.StreamingContext"></see>) for this serialization.</param>
-        /// <exception cref="T:System.Security.SecurityException">The caller does not have the required permission. </exception>
-        public  void GetObjectData(SerializationInfo info, StreamingContext context)
-        {
-            if(Tracing.BinarySerializationSwitch.Enabled)
-                Trace.WriteLine("Serializing the fields of 'GradientPaintStyle'.");
+    #region Serialization
+    /// <summary>
+    /// Populates a <see cref="T:System.Runtime.Serialization.SerializationInfo"></see> with the data needed to serialize the target object.
+    /// </summary>
+    /// <param name="info">The <see cref="T:System.Runtime.Serialization.SerializationInfo"></see> to populate with data.</param>
+    /// <param name="context">The destination (see <see cref="T:System.Runtime.Serialization.StreamingContext"></see>) for this serialization.</param>
+    /// <exception cref="T:System.Security.SecurityException">The caller does not have the required permission. </exception>
+    public void GetObjectData(SerializationInfo info, StreamingContext context) {
+      if (Tracing.BinarySerializationSwitch.Enabled)
+        Trace.WriteLine("Serializing the fields of 'GradientPaintStyle'.");
 
-            info.AddValue(
-                "GradientPaintStyleVersion", 
-                gradientPaintStyleVersion);
+      info.AddValue(
+          "GradientPaintStyleVersion",
+          gradientPaintStyleVersion);
 
-            info.AddValue("StartColor", this.mStartColor, typeof(Color));
-            info.AddValue("EndColor", this.mEndColor, typeof(Color));
-            info.AddValue("Angle", this.mAngle);
-        }
-        #endregion
+      info.AddValue("StartColor", this.mStartColor, typeof(Color));
+      info.AddValue("EndColor", this.mEndColor, typeof(Color));
+      info.AddValue("Angle", this.mAngle);
+    }
+    #endregion
 
-        #region Xml serialization
-        /// <summary>
-        /// This property is reserved, apply the <see cref="T:System.Xml.Serialization.XmlSchemaProviderAttribute"></see> to the class instead.
-        /// </summary>
-        /// <returns>
-        /// An <see cref="T:System.Xml.Schema.XmlSchema"></see> that describes the XML representation of the object that is produced by the <see cref="M:System.Xml.Serialization.IXmlSerializable.WriteXml(System.Xml.XmlWriter)"></see> method and consumed by the <see cref="M:System.Xml.Serialization.IXmlSerializable.ReadXml(System.Xml.XmlReader)"></see> method.
-        /// </returns>
-        public  XmlSchema GetSchema()
-        {
-            throw new NotImplementedException("The method or operation is not implemented.");
-        }
+    #region Xml serialization
+    /// <summary>
+    /// This property is reserved, apply the <see cref="T:System.Xml.Serialization.XmlSchemaProviderAttribute"></see> to the class instead.
+    /// </summary>
+    /// <returns>
+    /// An <see cref="T:System.Xml.Schema.XmlSchema"></see> that describes the XML representation of the object that is produced by the <see cref="M:System.Xml.Serialization.IXmlSerializable.WriteXml(System.Xml.XmlWriter)"></see> method and consumed by the <see cref="M:System.Xml.Serialization.IXmlSerializable.ReadXml(System.Xml.XmlReader)"></see> method.
+    /// </returns>
+    public XmlSchema GetSchema() {
+      throw new NotImplementedException("The method or operation is not implemented.");
+    }
 
-        /// <summary>
-        /// Generates an object from its XML representation.
-        /// </summary>
-        /// <param name="reader">The <see cref="T:System.Xml.XmlReader"></see> stream from which the object is deserialized.</param>
-        public  void ReadXml(System.Xml.XmlReader reader)
-        {
-            throw new NotImplementedException("The method or operation is not implemented.");
-        }
+    /// <summary>
+    /// Generates an object from its XML representation.
+    /// </summary>
+    /// <param name="reader">The <see cref="T:System.Xml.XmlReader"></see> stream from which the object is deserialized.</param>
+    public void ReadXml(System.Xml.XmlReader reader) {
+      throw new NotImplementedException("The method or operation is not implemented.");
+    }
 
-        /// <summary>
-        /// Converts an object into its XML representation.
-        /// </summary>
-        /// <param name="writer">The <see cref="T:System.Xml.XmlWriter"></see> stream to which the object is serialized.</param>
-        public  void WriteXml(System.Xml.XmlWriter writer)
-        {
-            throw new NotImplementedException("The method or operation is not implemented.");
-        }
-        #endregion
+    /// <summary>
+    /// Converts an object into its XML representation.
+    /// </summary>
+    /// <param name="writer">The <see cref="T:System.Xml.XmlWriter"></see> stream to which the object is serialized.</param>
+    public void WriteXml(System.Xml.XmlWriter writer) {
+      throw new NotImplementedException("The method or operation is not implemented.");
+    }
+    #endregion
 
-        /// <summary>
-        /// Runs when the entire object graph has been deserialized.
-        /// </summary>
-        /// <param name="sender">The object that initiated the callback. The functionality for this parameter is not currently implemented.</param>
-        public  void OnDeserialization(object sender)
-        {
-            if(Tracing.BinaryDeserializationSwitch.Enabled)
-                Trace.WriteLine("IDeserializationCallback of 'GradientPaintStyle' called.");
-        }
+    /// <summary>
+    /// Runs when the entire object graph has been deserialized.
+    /// </summary>
+    /// <param name="sender">The object that initiated the callback. The functionality for this parameter is not currently implemented.</param>
+    public void OnDeserialization(object sender) {
+      if (Tracing.BinaryDeserializationSwitch.Enabled)
+        Trace.WriteLine("IDeserializationCallback of 'GradientPaintStyle' called.");
     }
+  }
 }
Index: /trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.Netron/3.0.2672.12446/Netron.Diagramming.Core-3.0.2672.12446/Serialization/GroupShape.Serialization.cs
===================================================================
--- /trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.Netron/3.0.2672.12446/Netron.Diagramming.Core-3.0.2672.12446/Serialization/GroupShape.Serialization.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.Netron/3.0.2672.12446/Netron.Diagramming.Core-3.0.2672.12446/Serialization/GroupShape.Serialization.cs	(revision 4068)
@@ -1,40 +1,34 @@
 using System;
-using System.Collections.Generic;
-using System.Text;
-using System.Drawing;
-using System.ComponentModel;
+using System.Diagnostics;
 using System.Runtime.Serialization;
+using System.Xml.Schema;
 using System.Xml.Serialization;
-using System.Diagnostics;
-using System.Xml.Schema;
-namespace Netron.Diagramming.Core
-{
+namespace Netron.Diagramming.Core {
+  /// <summary>
+  /// Complementary partial class related to (de)serialization.
+  /// </summary>
+  [Serializable]
+  public partial class GroupShape : ISerializable, IXmlSerializable, IDeserializationCallback {
+    #region Deserialization constructor
     /// <summary>
-    /// Complementary partial class related to (de)serialization.
+    /// Deserialization constructor
     /// </summary>
-   [Serializable]
-    public partial class GroupShape : ISerializable, IXmlSerializable, IDeserializationCallback  
-    {
-        #region Deserialization constructor
-        /// <summary>
-        /// Deserialization constructor
-        /// </summary>
-        /// <param name="info">The info.</param>
-        /// <param name="context">The context.</param>
-        protected GroupShape(SerializationInfo info, StreamingContext context) : base(info, context)
-        {
-            if(Tracing.BinaryDeserializationSwitch.Enabled)
-                Trace.WriteLine("Deserializing the fields of 'GroupShape'.");
+    /// <param name="info">The info.</param>
+    /// <param name="context">The context.</param>
+    protected GroupShape(SerializationInfo info, StreamingContext context)
+      : base(info, context) {
+      if (Tracing.BinaryDeserializationSwitch.Enabled)
+        Trace.WriteLine("Deserializing the fields of 'GroupShape'.");
 
-            double version = info.GetDouble("GroupShapeVersion");
-            mAllowUnGroup = info.GetBoolean("CanUngroup");
-            mEntities = info.GetValue("Entities", 
-                typeof(CollectionBase<IDiagramEntity>)) as 
-                CollectionBase<IDiagramEntity>;
-        }
-        #endregion
+      double version = info.GetDouble("GroupShapeVersion");
+      mAllowUnGroup = info.GetBoolean("CanUngroup");
+      mEntities = info.GetValue("Entities",
+          typeof(CollectionBase<IDiagramEntity>)) as
+          CollectionBase<IDiagramEntity>;
+    }
+    #endregion
 
-        #region Serialization events
-       /*
+    #region Serialization events
+    /*
         [OnSerializing]
         void OnSerializing(StreamingContext context)
@@ -47,9 +41,9 @@
             Trace.WriteLine("...serialization of 'GroupShape' finished");
         }
-        */ 
-        #endregion
+        */
+    #endregion
 
-        #region Deserialization events
-       /*
+    #region Deserialization events
+    /*
         [OnDeserializing]
         void OnDeserializing(StreamingContext context)
@@ -59,89 +53,83 @@
         }
         */
-        [OnDeserialized]
-        void OnDeserialized(StreamingContext context)
-         {
-             if (Tracing.BinaryDeserializationSwitch.Enabled)
-                Trace.WriteLine("...deserialization of 'GroupShape' finished");
+    [OnDeserialized]
+    void OnDeserialized(StreamingContext context) {
+      if (Tracing.BinaryDeserializationSwitch.Enabled)
+        Trace.WriteLine("...deserialization of 'GroupShape' finished");
 
-            foreach (IDiagramEntity entity in mEntities)
-                entity.Group = this;
+      foreach (IDiagramEntity entity in mEntities)
+        entity.Group = this;
 
-             //this.mEntities.OnItemAdded += new EventHandler<CollectionEventArgs<IDiagramEntity>>(mEntities_OnItemAdded);
-             //this.mEntities.OnClear += new EventHandler(mEntities_OnClear);
-             //this.mEntities.OnItemRemoved += new EventHandler<CollectionEventArgs<IDiagramEntity>>(mEntities_OnItemRemoved);
-            AttachEventsToEnityCollection(mEntities);
-            CalculateRectangle();
-         }
-       
-        #endregion
+      //this.mEntities.OnItemAdded += new EventHandler<CollectionEventArgs<IDiagramEntity>>(mEntities_OnItemAdded);
+      //this.mEntities.OnClear += new EventHandler(mEntities_OnClear);
+      //this.mEntities.OnItemRemoved += new EventHandler<CollectionEventArgs<IDiagramEntity>>(mEntities_OnItemRemoved);
+      AttachEventsToEnityCollection(mEntities);
+      CalculateRectangle();
+    }
 
-        #region Serialization
-         /// <summary>
-         /// Populates a <see cref="T:System.Runtime.Serialization.SerializationInfo"></see> with the data needed to serialize the target object.
-         /// </summary>
-         /// <param name="info">The <see cref="T:System.Runtime.Serialization.SerializationInfo"></see> to populate with data.</param>
-         /// <param name="context">The destination (see <see cref="T:System.Runtime.Serialization.StreamingContext"></see>) for this serialization.</param>
-         /// <exception cref="T:System.Security.SecurityException">The caller does not have the required permission. </exception>
-        public override void GetObjectData(SerializationInfo info, StreamingContext context)
-        {
-            if(Tracing.BinarySerializationSwitch.Enabled)
-                Trace.WriteLine("Serializing the fields of 'GroupShape'.");
-            base.GetObjectData(info, context);
+    #endregion
 
-            info.AddValue("GroupShapeVersion", groupShapeVersion);
-            info.AddValue("CanUngroup", mAllowUnGroup);
-            info.AddValue("Entities", this.mEntities, typeof(CollectionBase<IShapeMaterial>));
-           
-        }
-        #endregion
+    #region Serialization
+    /// <summary>
+    /// Populates a <see cref="T:System.Runtime.Serialization.SerializationInfo"></see> with the data needed to serialize the target object.
+    /// </summary>
+    /// <param name="info">The <see cref="T:System.Runtime.Serialization.SerializationInfo"></see> to populate with data.</param>
+    /// <param name="context">The destination (see <see cref="T:System.Runtime.Serialization.StreamingContext"></see>) for this serialization.</param>
+    /// <exception cref="T:System.Security.SecurityException">The caller does not have the required permission. </exception>
+    public override void GetObjectData(SerializationInfo info, StreamingContext context) {
+      if (Tracing.BinarySerializationSwitch.Enabled)
+        Trace.WriteLine("Serializing the fields of 'GroupShape'.");
+      base.GetObjectData(info, context);
 
-        #region Xml serialization
-        /// <summary>
-        /// This property is reserved, apply the <see cref="T:System.Xml.Serialization.XmlSchemaProviderAttribute"></see> to the class instead.
-        /// </summary>
-        /// <returns>
-        /// An <see cref="T:System.Xml.Schema.XmlSchema"></see> that describes the XML representation of the object that is produced by the <see cref="M:System.Xml.Serialization.IXmlSerializable.WriteXml(System.Xml.XmlWriter)"></see> method and consumed by the <see cref="M:System.Xml.Serialization.IXmlSerializable.ReadXml(System.Xml.XmlReader)"></see> method.
-        /// </returns>
-        public override XmlSchema GetSchema()
-        {
-            throw new NotImplementedException("The method or operation is not implemented.");
-        }
+      info.AddValue("GroupShapeVersion", groupShapeVersion);
+      info.AddValue("CanUngroup", mAllowUnGroup);
+      info.AddValue("Entities", this.mEntities, typeof(CollectionBase<IShapeMaterial>));
 
-        /// <summary>
-        /// Generates an object from its XML representation.
-        /// </summary>
-        /// <param name="reader">The <see cref="T:System.Xml.XmlReader"></see> stream from which the object is deserialized.</param>
-        public override void ReadXml(System.Xml.XmlReader reader)
-        {
-            throw new NotImplementedException("The method or operation is not implemented.");
-        }
+    }
+    #endregion
 
-        /// <summary>
-        /// Converts an object into its XML representation.
-        /// </summary>
-        /// <param name="writer">The <see cref="T:System.Xml.XmlWriter"></see> stream to which the object is serialized.</param>
-        public override void WriteXml(System.Xml.XmlWriter writer)
-        {
-            throw new NotImplementedException("The method or operation is not implemented.");
-        }
-        #endregion
+    #region Xml serialization
+    /// <summary>
+    /// This property is reserved, apply the <see cref="T:System.Xml.Serialization.XmlSchemaProviderAttribute"></see> to the class instead.
+    /// </summary>
+    /// <returns>
+    /// An <see cref="T:System.Xml.Schema.XmlSchema"></see> that describes the XML representation of the object that is produced by the <see cref="M:System.Xml.Serialization.IXmlSerializable.WriteXml(System.Xml.XmlWriter)"></see> method and consumed by the <see cref="M:System.Xml.Serialization.IXmlSerializable.ReadXml(System.Xml.XmlReader)"></see> method.
+    /// </returns>
+    public override XmlSchema GetSchema() {
+      throw new NotImplementedException("The method or operation is not implemented.");
+    }
 
-        #region IDeserializationCallback Members
+    /// <summary>
+    /// Generates an object from its XML representation.
+    /// </summary>
+    /// <param name="reader">The <see cref="T:System.Xml.XmlReader"></see> stream from which the object is deserialized.</param>
+    public override void ReadXml(System.Xml.XmlReader reader) {
+      throw new NotImplementedException("The method or operation is not implemented.");
+    }
 
-        /// <summary>
-        /// Runs when the entire object graph has been deserialized.
-        /// </summary>
-        /// <param name="sender">The object that initiated the callback. The functionality for this parameter is not currently implemented.</param>
-        public override void OnDeserialization(object sender)
-        {
-            base.OnDeserialization(sender);
-     
+    /// <summary>
+    /// Converts an object into its XML representation.
+    /// </summary>
+    /// <param name="writer">The <see cref="T:System.Xml.XmlWriter"></see> stream to which the object is serialized.</param>
+    public override void WriteXml(System.Xml.XmlWriter writer) {
+      throw new NotImplementedException("The method or operation is not implemented.");
+    }
+    #endregion
 
-            if(Tracing.BinaryDeserializationSwitch.Enabled)
-                Trace.WriteLine("IDeserializationCallback of 'GroupShape' called.");
-        }
+    #region IDeserializationCallback Members
 
-        #endregion
+    /// <summary>
+    /// Runs when the entire object graph has been deserialized.
+    /// </summary>
+    /// <param name="sender">The object that initiated the callback. The functionality for this parameter is not currently implemented.</param>
+    public override void OnDeserialization(object sender) {
+      base.OnDeserialization(sender);
+
+
+      if (Tracing.BinaryDeserializationSwitch.Enabled)
+        Trace.WriteLine("IDeserializationCallback of 'GroupShape' called.");
     }
+
+    #endregion
+  }
 }
Index: /trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.Netron/3.0.2672.12446/Netron.Diagramming.Core-3.0.2672.12446/Serialization/IconLabelMaterial.Serialization.cs
===================================================================
--- /trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.Netron/3.0.2672.12446/Netron.Diagramming.Core-3.0.2672.12446/Serialization/IconLabelMaterial.Serialization.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.Netron/3.0.2672.12446/Netron.Diagramming.Core-3.0.2672.12446/Serialization/IconLabelMaterial.Serialization.cs	(revision 4068)
@@ -1,46 +1,38 @@
 using System;
-using System.Collections.Generic;
-using System.Text;
+using System.Diagnostics;
 using System.Drawing;
-using System.ComponentModel;
 using System.Runtime.Serialization;
+using System.Xml.Schema;
 using System.Xml.Serialization;
-using System.Diagnostics;
-using System.Xml.Schema;
-namespace Netron.Diagramming.Core
-{
+namespace Netron.Diagramming.Core {
+  /// <summary>
+  /// Complementary partial class related to (de)serialization.
+  /// </summary>
+  [Serializable]
+  public partial class IconLabelMaterial : ISerializable, IXmlSerializable, IDeserializationCallback {
+    #region Deserialization constructor
     /// <summary>
-    /// Complementary partial class related to (de)serialization.
+    /// Deserialization constructor
     /// </summary>
-   [Serializable]
-    public partial class IconLabelMaterial : ISerializable, IXmlSerializable, IDeserializationCallback
-    {
-        #region Deserialization constructor
-        /// <summary>
-        /// Deserialization constructor
-        /// </summary>
-        /// <param name="info">The info.</param>
-        /// <param name="context">The context.</param>
-        protected IconLabelMaterial(SerializationInfo info, StreamingContext context)
-            : base(info, context)
-        {
-            if(Tracing.BinaryDeserializationSwitch.Enabled)
-                Trace.WriteLine("Deserializing the fields of 'IconLabelMaterial'.");
+    /// <param name="info">The info.</param>
+    /// <param name="context">The context.</param>
+    protected IconLabelMaterial(SerializationInfo info, StreamingContext context)
+      : base(info, context) {
+      if (Tracing.BinaryDeserializationSwitch.Enabled)
+        Trace.WriteLine("Deserializing the fields of 'IconLabelMaterial'.");
 
-            double version = info.GetDouble("IconLabelMaterialVersion");
+      double version = info.GetDouble("IconLabelMaterialVersion");
 
-            mText = info.GetString("Text");
-            try
-            {
-                mIcon = info.GetValue("Icon", typeof(Bitmap)) as Bitmap;
-            }
-            catch 
-            {
-            }
-        }
-        #endregion
+      mText = info.GetString("Text");
+      try {
+        mIcon = info.GetValue("Icon", typeof(Bitmap)) as Bitmap;
+      }
+      catch {
+      }
+    }
+    #endregion
 
-        #region Serialization events
-       /*
+    #region Serialization events
+    /*
         [OnSerializing]
         void OnSerializing(StreamingContext context)
@@ -56,8 +48,8 @@
         }
         */
-        #endregion
+    #endregion
 
-        #region Deserialization events
-       /*
+    #region Deserialization events
+    /*
         [OnDeserializing]      
         void OnDeserializing(StreamingContext context)
@@ -73,74 +65,69 @@
          }
        */
-        #endregion
+    #endregion
 
-        #region Serialization
-        /// <summary>
-        /// Populates a <see cref="T:System.Runtime.Serialization.SerializationInfo"></see> with the data needed to serialize the target object.
-        /// </summary>
-        /// <param name="info">The <see cref="T:System.Runtime.Serialization.SerializationInfo"></see> to populate with data.</param>
-        /// <param name="context">The destination (see <see cref="T:System.Runtime.Serialization.StreamingContext"></see>) for this serialization.</param>
-        /// <exception cref="T:System.Security.SecurityException">The caller does not have the required permission. </exception>
-        public override void GetObjectData(SerializationInfo info, StreamingContext context) 
-        {
-            if(Tracing.BinarySerializationSwitch.Enabled)
-                Trace.WriteLine("Serializing the fields of 'IconLabelMaterial'.");
-            base.GetObjectData(info, context);
+    #region Serialization
+    /// <summary>
+    /// Populates a <see cref="T:System.Runtime.Serialization.SerializationInfo"></see> with the data needed to serialize the target object.
+    /// </summary>
+    /// <param name="info">The <see cref="T:System.Runtime.Serialization.SerializationInfo"></see> to populate with data.</param>
+    /// <param name="context">The destination (see <see cref="T:System.Runtime.Serialization.StreamingContext"></see>) for this serialization.</param>
+    /// <exception cref="T:System.Security.SecurityException">The caller does not have the required permission. </exception>
+    public override void GetObjectData(SerializationInfo info, StreamingContext context) {
+      if (Tracing.BinarySerializationSwitch.Enabled)
+        Trace.WriteLine("Serializing the fields of 'IconLabelMaterial'.");
+      base.GetObjectData(info, context);
 
-            info.AddValue(
-                "IconLabelMaterialVersion", 
-                iconLabelMaterialVersion);
+      info.AddValue(
+          "IconLabelMaterialVersion",
+          iconLabelMaterialVersion);
 
-            if (mIcon != null)
-                info.AddValue("Icon", mIcon, typeof(Bitmap));
-            info.AddValue("Text", this.mText);
-        }
-        #endregion
+      if (mIcon != null)
+        info.AddValue("Icon", mIcon, typeof(Bitmap));
+      info.AddValue("Text", this.mText);
+    }
+    #endregion
 
-        #region Xml serialization
-        /// <summary>
-        /// This property is reserved, apply the <see cref="T:System.Xml.Serialization.XmlSchemaProviderAttribute"></see> to the class instead.
-        /// </summary>
-        /// <returns>
-        /// An <see cref="T:System.Xml.Schema.XmlSchema"></see> that describes the XML representation of the object that is produced by the <see cref="M:System.Xml.Serialization.IXmlSerializable.WriteXml(System.Xml.XmlWriter)"></see> method and consumed by the <see cref="M:System.Xml.Serialization.IXmlSerializable.ReadXml(System.Xml.XmlReader)"></see> method.
-        /// </returns>
-        public override XmlSchema GetSchema()
-        {
-            throw new NotImplementedException("The method or operation is not implemented.");
-        }
+    #region Xml serialization
+    /// <summary>
+    /// This property is reserved, apply the <see cref="T:System.Xml.Serialization.XmlSchemaProviderAttribute"></see> to the class instead.
+    /// </summary>
+    /// <returns>
+    /// An <see cref="T:System.Xml.Schema.XmlSchema"></see> that describes the XML representation of the object that is produced by the <see cref="M:System.Xml.Serialization.IXmlSerializable.WriteXml(System.Xml.XmlWriter)"></see> method and consumed by the <see cref="M:System.Xml.Serialization.IXmlSerializable.ReadXml(System.Xml.XmlReader)"></see> method.
+    /// </returns>
+    public override XmlSchema GetSchema() {
+      throw new NotImplementedException("The method or operation is not implemented.");
+    }
 
-        /// <summary>
-        /// Generates an object from its XML representation.
-        /// </summary>
-        /// <param name="reader">The <see cref="T:System.Xml.XmlReader"></see> stream from which the object is deserialized.</param>
-        public override void ReadXml(System.Xml.XmlReader reader)
-        {
-            throw new NotImplementedException("The method or operation is not implemented.");
-        }
+    /// <summary>
+    /// Generates an object from its XML representation.
+    /// </summary>
+    /// <param name="reader">The <see cref="T:System.Xml.XmlReader"></see> stream from which the object is deserialized.</param>
+    public override void ReadXml(System.Xml.XmlReader reader) {
+      throw new NotImplementedException("The method or operation is not implemented.");
+    }
 
-        /// <summary>
-        /// Converts an object into its XML representation.
-        /// </summary>
-        /// <param name="writer">The <see cref="T:System.Xml.XmlWriter"></see> stream to which the object is serialized.</param>
-        public override void WriteXml(System.Xml.XmlWriter writer)
-        {
-            throw new NotImplementedException("The method or operation is not implemented.");
-        }
-        #endregion
+    /// <summary>
+    /// Converts an object into its XML representation.
+    /// </summary>
+    /// <param name="writer">The <see cref="T:System.Xml.XmlWriter"></see> stream to which the object is serialized.</param>
+    public override void WriteXml(System.Xml.XmlWriter writer) {
+      throw new NotImplementedException("The method or operation is not implemented.");
+    }
+    #endregion
 
 
 
-        /// <summary>
-        /// Runs when the entire object graph has been deserialized.
-        /// </summary>
-        /// <param name="sender">The object that initiated the callback. The functionality for this parameter is not currently implemented.</param>
-        public override void  OnDeserialization(object sender)
-        {
-            base.OnDeserialization(sender);
-            if(Tracing.BinaryDeserializationSwitch.Enabled)
-                Trace.WriteLine("IDeserializationCallback of 'IconLabelMaterial' called.");
-            
+    /// <summary>
+    /// Runs when the entire object graph has been deserialized.
+    /// </summary>
+    /// <param name="sender">The object that initiated the callback. The functionality for this parameter is not currently implemented.</param>
+    public override void OnDeserialization(object sender) {
+      base.OnDeserialization(sender);
+      if (Tracing.BinaryDeserializationSwitch.Enabled)
+        Trace.WriteLine("IDeserializationCallback of 'IconLabelMaterial' called.");
 
-        }
+
     }
+  }
 }
Index: /trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.Netron/3.0.2672.12446/Netron.Diagramming.Core-3.0.2672.12446/Serialization/IconMaterial.Serialization.cs
===================================================================
--- /trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.Netron/3.0.2672.12446/Netron.Diagramming.Core-3.0.2672.12446/Serialization/IconMaterial.Serialization.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.Netron/3.0.2672.12446/Netron.Diagramming.Core-3.0.2672.12446/Serialization/IconMaterial.Serialization.cs	(revision 4068)
@@ -1,47 +1,39 @@
 using System;
-using System.Collections.Generic;
-using System.Text;
+using System.Diagnostics;
 using System.Drawing;
-using System.ComponentModel;
 using System.Runtime.Serialization;
+using System.Xml.Schema;
 using System.Xml.Serialization;
-using System.Diagnostics;
-using System.Xml.Schema;
-namespace Netron.Diagramming.Core
-{
+namespace Netron.Diagramming.Core {
+  /// <summary>
+  /// Complementary partial class related to (de)serialization.
+  /// </summary>
+  [Serializable]
+  public partial class IconMaterial : ISerializable, IXmlSerializable, IDeserializationCallback {
+    #region Deserialization constructor
     /// <summary>
-    /// Complementary partial class related to (de)serialization.
+    /// Deserialization constructor
     /// </summary>
-    [Serializable]
-    public partial class IconMaterial : ISerializable, IXmlSerializable, IDeserializationCallback
-    {
-        #region Deserialization constructor
-        /// <summary>
-        /// Deserialization constructor
-        /// </summary>
-        /// <param name="info">The info.</param>
-        /// <param name="context">The context.</param>
-        protected IconMaterial(SerializationInfo info, StreamingContext context)
-            : base(info, context)
-        {
-            if (Tracing.BinaryDeserializationSwitch.Enabled)
-                Trace.WriteLine("Deserializing the fields of 'IconMaterial'.");
+    /// <param name="info">The info.</param>
+    /// <param name="context">The context.</param>
+    protected IconMaterial(SerializationInfo info, StreamingContext context)
+      : base(info, context) {
+      if (Tracing.BinaryDeserializationSwitch.Enabled)
+        Trace.WriteLine("Deserializing the fields of 'IconMaterial'.");
 
-            double version = info.GetDouble("IconMaterialVersion");
-            
-            try
-            {
-                mIcon = info.GetValue("Icon", typeof(Bitmap)) as Bitmap;
-            }
-            catch
-            {      
-                //never mind, there was no icon originally in the material
-            }
+      double version = info.GetDouble("IconMaterialVersion");
 
-        }
-        #endregion
+      try {
+        mIcon = info.GetValue("Icon", typeof(Bitmap)) as Bitmap;
+      }
+      catch {
+        //never mind, there was no icon originally in the material
+      }
 
-        #region Serialization events
-        /*
+    }
+    #endregion
+
+    #region Serialization events
+    /*
         [OnSerializing]
         void OnSerializing(StreamingContext context)
@@ -57,8 +49,8 @@
         }
         */
-        #endregion
+    #endregion
 
-        #region Deserialization events
-        /*
+    #region Deserialization events
+    /*
         [OnDeserializing]      
         void OnDeserializing(StreamingContext context)
@@ -74,64 +66,59 @@
          }
        */
-        #endregion
+    #endregion
 
-        #region Serialization
-        public override void GetObjectData(SerializationInfo info, StreamingContext context)
-        {
-            if (Tracing.BinarySerializationSwitch.Enabled)
-                Trace.WriteLine("Serializing the fields of 'IconMaterial'.");
-            base.GetObjectData(info, context);
+    #region Serialization
+    public override void GetObjectData(SerializationInfo info, StreamingContext context) {
+      if (Tracing.BinarySerializationSwitch.Enabled)
+        Trace.WriteLine("Serializing the fields of 'IconMaterial'.");
+      base.GetObjectData(info, context);
 
-            info.AddValue("IconMaterialVersion", iconMaterialVersion);
-            if (mIcon != null)
-                info.AddValue("Icon", mIcon, typeof(Bitmap));
-        }
-        #endregion
+      info.AddValue("IconMaterialVersion", iconMaterialVersion);
+      if (mIcon != null)
+        info.AddValue("Icon", mIcon, typeof(Bitmap));
+    }
+    #endregion
 
-        #region Xml serialization
-        /// <summary>
-        /// This property is reserved, apply the <see cref="T:System.Xml.Serialization.XmlSchemaProviderAttribute"></see> to the class instead.
-        /// </summary>
-        /// <returns>
-        /// An <see cref="T:System.Xml.Schema.XmlSchema"></see> that describes the XML representation of the object that is produced by the <see cref="M:System.Xml.Serialization.IXmlSerializable.WriteXml(System.Xml.XmlWriter)"></see> method and consumed by the <see cref="M:System.Xml.Serialization.IXmlSerializable.ReadXml(System.Xml.XmlReader)"></see> method.
-        /// </returns>
-        public override XmlSchema GetSchema()
-        {
-            throw new NotImplementedException("The method or operation is not implemented.");
-        }
+    #region Xml serialization
+    /// <summary>
+    /// This property is reserved, apply the <see cref="T:System.Xml.Serialization.XmlSchemaProviderAttribute"></see> to the class instead.
+    /// </summary>
+    /// <returns>
+    /// An <see cref="T:System.Xml.Schema.XmlSchema"></see> that describes the XML representation of the object that is produced by the <see cref="M:System.Xml.Serialization.IXmlSerializable.WriteXml(System.Xml.XmlWriter)"></see> method and consumed by the <see cref="M:System.Xml.Serialization.IXmlSerializable.ReadXml(System.Xml.XmlReader)"></see> method.
+    /// </returns>
+    public override XmlSchema GetSchema() {
+      throw new NotImplementedException("The method or operation is not implemented.");
+    }
 
-        /// <summary>
-        /// Generates an object from its XML representation.
-        /// </summary>
-        /// <param name="reader">The <see cref="T:System.Xml.XmlReader"></see> stream from which the object is deserialized.</param>
-        public override void ReadXml(System.Xml.XmlReader reader)
-        {
-            throw new NotImplementedException("The method or operation is not implemented.");
-        }
+    /// <summary>
+    /// Generates an object from its XML representation.
+    /// </summary>
+    /// <param name="reader">The <see cref="T:System.Xml.XmlReader"></see> stream from which the object is deserialized.</param>
+    public override void ReadXml(System.Xml.XmlReader reader) {
+      throw new NotImplementedException("The method or operation is not implemented.");
+    }
 
-        /// <summary>
-        /// Converts an object into its XML representation.
-        /// </summary>
-        /// <param name="writer">The <see cref="T:System.Xml.XmlWriter"></see> stream to which the object is serialized.</param>
-        public override void WriteXml(System.Xml.XmlWriter writer)
-        {
-            throw new NotImplementedException("The method or operation is not implemented.");
-        }
-        #endregion
+    /// <summary>
+    /// Converts an object into its XML representation.
+    /// </summary>
+    /// <param name="writer">The <see cref="T:System.Xml.XmlWriter"></see> stream to which the object is serialized.</param>
+    public override void WriteXml(System.Xml.XmlWriter writer) {
+      throw new NotImplementedException("The method or operation is not implemented.");
+    }
+    #endregion
 
 
 
-        /// <summary>
-        /// Runs when the entire object graph has been deserialized.
-        /// </summary>
-        /// <param name="sender">The object that initiated the callback. The functionality for this parameter is not currently implemented.</param>
-        public override void OnDeserialization(object sender)
-        {
-            base.OnDeserialization(sender);
-            if (Tracing.BinaryDeserializationSwitch.Enabled)
-                Trace.WriteLine("IDeserializationCallback of 'IconMaterial' called.");
+    /// <summary>
+    /// Runs when the entire object graph has been deserialized.
+    /// </summary>
+    /// <param name="sender">The object that initiated the callback. The functionality for this parameter is not currently implemented.</param>
+    public override void OnDeserialization(object sender) {
+      base.OnDeserialization(sender);
+      if (Tracing.BinaryDeserializationSwitch.Enabled)
+        Trace.WriteLine("IDeserializationCallback of 'IconMaterial' called.");
 
 
-        }
     }
+  }
 }
Index: /trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.Netron/3.0.2672.12446/Netron.Diagramming.Core-3.0.2672.12446/Serialization/ImageShape.Serialization.cs
===================================================================
--- /trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.Netron/3.0.2672.12446/Netron.Diagramming.Core-3.0.2672.12446/Serialization/ImageShape.Serialization.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.Netron/3.0.2672.12446/Netron.Diagramming.Core-3.0.2672.12446/Serialization/ImageShape.Serialization.cs	(revision 4068)
@@ -1,53 +1,43 @@
 using System;
-using System.IO;
-using System.Collections.Generic;
-using System.Text;
+using System.Diagnostics;
 using System.Drawing;
-using System.ComponentModel;
 using System.Runtime.Serialization;
+using System.Xml.Schema;
 using System.Xml.Serialization;
-using System.Diagnostics;
-using System.Xml.Schema;
-namespace Netron.Diagramming.Core
-{
+namespace Netron.Diagramming.Core {
+  /// <summary>
+  /// Complementary partial class related to (de)serialization.
+  /// </summary>
+  [Serializable]
+  public partial class ImageShape : ISerializable, IXmlSerializable, IDeserializationCallback {
+    #region Deserialization constructor
     /// <summary>
-    /// Complementary partial class related to (de)serialization.
+    /// Deserialization constructor
     /// </summary>
-   [Serializable]
-    public partial class ImageShape : ISerializable, IXmlSerializable, IDeserializationCallback
-    {
-        #region Deserialization constructor
-        /// <summary>
-        /// Deserialization constructor
-        /// </summary>
-        /// <param name="info">The info.</param>
-        /// <param name="context">The context.</param>
-        protected ImageShape(SerializationInfo info, StreamingContext context)
-            : base(info, context)
-        {
-            if(Tracing.BinaryDeserializationSwitch.Enabled)
-                Trace.WriteLine("Deserializing the fields of 'ImageShape'.");
+    /// <param name="info">The info.</param>
+    /// <param name="context">The context.</param>
+    protected ImageShape(SerializationInfo info, StreamingContext context)
+      : base(info, context) {
+      if (Tracing.BinaryDeserializationSwitch.Enabled)
+        Trace.WriteLine("Deserializing the fields of 'ImageShape'.");
 
-            double version = info.GetDouble("ImageShapeVersion");
-            
-            try
-            {
-                mImage = info.GetValue("Image", typeof(Image)) as Bitmap;
-                if (mImage != null)
-                {
-                    mImagePath = info.GetString("ImagePath");
-                }
+      double version = info.GetDouble("ImageShapeVersion");
 
-            }
-            catch(Exception exc)
-            {
-                Trace.WriteLine(exc.Message);
-            }
+      try {
+        mImage = info.GetValue("Image", typeof(Image)) as Bitmap;
+        if (mImage != null) {
+          mImagePath = info.GetString("ImagePath");
+        }
 
-        }
-        #endregion
+      }
+      catch (Exception exc) {
+        Trace.WriteLine(exc.Message);
+      }
 
-        #region Serialization events
-       /*
+    }
+    #endregion
+
+    #region Serialization events
+    /*
         [OnSerializing]
         void OnSerializing(StreamingContext context)
@@ -63,8 +53,8 @@
         }
         */
-        #endregion
+    #endregion
 
-        #region Deserialization events
-       /*
+    #region Deserialization events
+    /*
         [OnDeserializing]      
         void OnDeserializing(StreamingContext context)
@@ -80,71 +70,66 @@
          }
        */
-        #endregion
+    #endregion
 
-        #region Serialization
-        /// <summary>
-        /// Populates a <see cref="T:System.Runtime.Serialization.SerializationInfo"></see> with the data needed to serialize the target object.
-        /// </summary>
-        /// <param name="info">The <see cref="T:System.Runtime.Serialization.SerializationInfo"></see> to populate with data.</param>
-        /// <param name="context">The destination (see <see cref="T:System.Runtime.Serialization.StreamingContext"></see>) for this serialization.</param>
-        /// <exception cref="T:System.Security.SecurityException">The caller does not have the required permission. </exception>
-        public override void GetObjectData(SerializationInfo info, StreamingContext context) 
-        {
-            if(Tracing.BinarySerializationSwitch.Enabled)
-                Trace.WriteLine("Serializing the fields of 'ImageShape'.");
-            base.GetObjectData(info, context);
+    #region Serialization
+    /// <summary>
+    /// Populates a <see cref="T:System.Runtime.Serialization.SerializationInfo"></see> with the data needed to serialize the target object.
+    /// </summary>
+    /// <param name="info">The <see cref="T:System.Runtime.Serialization.SerializationInfo"></see> to populate with data.</param>
+    /// <param name="context">The destination (see <see cref="T:System.Runtime.Serialization.StreamingContext"></see>) for this serialization.</param>
+    /// <exception cref="T:System.Security.SecurityException">The caller does not have the required permission. </exception>
+    public override void GetObjectData(SerializationInfo info, StreamingContext context) {
+      if (Tracing.BinarySerializationSwitch.Enabled)
+        Trace.WriteLine("Serializing the fields of 'ImageShape'.");
+      base.GetObjectData(info, context);
 
-            info.AddValue("ImageShapeVersion", imageShapeVersion);
-            info.AddValue("ImagePath", this.mImagePath);
-            info.AddValue("Image", mImage, typeof(Image));
+      info.AddValue("ImageShapeVersion", imageShapeVersion);
+      info.AddValue("ImagePath", this.mImagePath);
+      info.AddValue("Image", mImage, typeof(Image));
 
-        }
-        #endregion
+    }
+    #endregion
 
-        #region Xml serialization
-        /// <summary>
-        /// This property is reserved, apply the <see cref="T:System.Xml.Serialization.XmlSchemaProviderAttribute"></see> to the class instead.
-        /// </summary>
-        /// <returns>
-        /// An <see cref="T:System.Xml.Schema.XmlSchema"></see> that describes the XML representation of the object that is produced by the <see cref="M:System.Xml.Serialization.IXmlSerializable.WriteXml(System.Xml.XmlWriter)"></see> method and consumed by the <see cref="M:System.Xml.Serialization.IXmlSerializable.ReadXml(System.Xml.XmlReader)"></see> method.
-        /// </returns>
-        public override XmlSchema GetSchema()
-        {
-            throw new NotImplementedException("The method or operation is not implemented.");
-        }
+    #region Xml serialization
+    /// <summary>
+    /// This property is reserved, apply the <see cref="T:System.Xml.Serialization.XmlSchemaProviderAttribute"></see> to the class instead.
+    /// </summary>
+    /// <returns>
+    /// An <see cref="T:System.Xml.Schema.XmlSchema"></see> that describes the XML representation of the object that is produced by the <see cref="M:System.Xml.Serialization.IXmlSerializable.WriteXml(System.Xml.XmlWriter)"></see> method and consumed by the <see cref="M:System.Xml.Serialization.IXmlSerializable.ReadXml(System.Xml.XmlReader)"></see> method.
+    /// </returns>
+    public override XmlSchema GetSchema() {
+      throw new NotImplementedException("The method or operation is not implemented.");
+    }
 
-        /// <summary>
-        /// Generates an object from its XML representation.
-        /// </summary>
-        /// <param name="reader">The <see cref="T:System.Xml.XmlReader"></see> stream from which the object is deserialized.</param>
-        public override void ReadXml(System.Xml.XmlReader reader)
-        {
-            throw new NotImplementedException("The method or operation is not implemented.");
-        }
+    /// <summary>
+    /// Generates an object from its XML representation.
+    /// </summary>
+    /// <param name="reader">The <see cref="T:System.Xml.XmlReader"></see> stream from which the object is deserialized.</param>
+    public override void ReadXml(System.Xml.XmlReader reader) {
+      throw new NotImplementedException("The method or operation is not implemented.");
+    }
 
-        /// <summary>
-        /// Converts an object into its XML representation.
-        /// </summary>
-        /// <param name="writer">The <see cref="T:System.Xml.XmlWriter"></see> stream to which the object is serialized.</param>
-        public override void WriteXml(System.Xml.XmlWriter writer)
-        {
-            throw new NotImplementedException("The method or operation is not implemented.");
-        }
-        #endregion
+    /// <summary>
+    /// Converts an object into its XML representation.
+    /// </summary>
+    /// <param name="writer">The <see cref="T:System.Xml.XmlWriter"></see> stream to which the object is serialized.</param>
+    public override void WriteXml(System.Xml.XmlWriter writer) {
+      throw new NotImplementedException("The method or operation is not implemented.");
+    }
+    #endregion
 
 
 
-        /// <summary>
-        /// Runs when the entire object graph has been deserialized.
-        /// </summary>
-        /// <param name="sender">The object that initiated the callback. The functionality for this parameter is not currently implemented.</param>
-        public override void  OnDeserialization(object sender)
-        {
-            base.OnDeserialization(sender);
-            if(Tracing.BinaryDeserializationSwitch.Enabled)
-                Trace.WriteLine("IDeserializationCallback of 'ImageShape' called.");
-            
+    /// <summary>
+    /// Runs when the entire object graph has been deserialized.
+    /// </summary>
+    /// <param name="sender">The object that initiated the callback. The functionality for this parameter is not currently implemented.</param>
+    public override void OnDeserialization(object sender) {
+      base.OnDeserialization(sender);
+      if (Tracing.BinaryDeserializationSwitch.Enabled)
+        Trace.WriteLine("IDeserializationCallback of 'ImageShape' called.");
 
-        }
+
     }
+  }
 }
Index: /trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.Netron/3.0.2672.12446/Netron.Diagramming.Core-3.0.2672.12446/Serialization/LabelMaterial.Serialization.cs
===================================================================
--- /trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.Netron/3.0.2672.12446/Netron.Diagramming.Core-3.0.2672.12446/Serialization/LabelMaterial.Serialization.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.Netron/3.0.2672.12446/Netron.Diagramming.Core-3.0.2672.12446/Serialization/LabelMaterial.Serialization.cs	(revision 4068)
@@ -1,39 +1,32 @@
 using System;
-using System.Collections.Generic;
-using System.Text;
-using System.Drawing;
-using System.ComponentModel;
+using System.Diagnostics;
 using System.Runtime.Serialization;
+using System.Xml.Schema;
 using System.Xml.Serialization;
-using System.Diagnostics;
-using System.Xml.Schema;
-namespace Netron.Diagramming.Core
-{
+namespace Netron.Diagramming.Core {
+  /// <summary>
+  /// Complementary partial class related to (de)serialization.
+  /// </summary>
+  [Serializable]
+  public partial class LabelMaterial : ISerializable, IXmlSerializable, IDeserializationCallback {
+    #region Deserialization constructor
     /// <summary>
-    /// Complementary partial class related to (de)serialization.
+    /// Deserialization constructor
     /// </summary>
-   [Serializable]
-    public partial class LabelMaterial : ISerializable, IXmlSerializable, IDeserializationCallback
-    {
-        #region Deserialization constructor
-        /// <summary>
-        /// Deserialization constructor
-        /// </summary>
-        /// <param name="info">The info.</param>
-        /// <param name="context">The context.</param>
-        protected LabelMaterial(SerializationInfo info, StreamingContext context)
-            : base(info, context)
-        {
-            if(Tracing.BinaryDeserializationSwitch.Enabled)
-                Trace.WriteLine("Deserializing the fields of 'LabelMaterial'.");
+    /// <param name="info">The info.</param>
+    /// <param name="context">The context.</param>
+    protected LabelMaterial(SerializationInfo info, StreamingContext context)
+      : base(info, context) {
+      if (Tracing.BinaryDeserializationSwitch.Enabled)
+        Trace.WriteLine("Deserializing the fields of 'LabelMaterial'.");
 
-            double version = info.GetDouble("LabelMaterialVersion");
-            
-            mText = info.GetString("Text");
-        }
-        #endregion
+      double version = info.GetDouble("LabelMaterialVersion");
 
-        #region Serialization events
-       /*
+      mText = info.GetString("Text");
+    }
+    #endregion
+
+    #region Serialization events
+    /*
         [OnSerializing]
         void OnSerializing(StreamingContext context)
@@ -49,8 +42,8 @@
         }
         */
-        #endregion
+    #endregion
 
-        #region Deserialization events
-       /*
+    #region Deserialization events
+    /*
         [OnDeserializing]      
         void OnDeserializing(StreamingContext context)
@@ -66,63 +59,58 @@
          }
        */
-        #endregion
+    #endregion
 
-        #region Serialization
-        public override void GetObjectData(SerializationInfo info, StreamingContext context) 
-        {
-            if(Tracing.BinarySerializationSwitch.Enabled)
-                Trace.WriteLine("Serializing the fields of 'LabelMaterial'.");
-            base.GetObjectData(info, context);
+    #region Serialization
+    public override void GetObjectData(SerializationInfo info, StreamingContext context) {
+      if (Tracing.BinarySerializationSwitch.Enabled)
+        Trace.WriteLine("Serializing the fields of 'LabelMaterial'.");
+      base.GetObjectData(info, context);
 
-            info.AddValue("LabelMaterialVersion", labelMaterialVersion);
-            info.AddValue("Text", mText);
-        }
-        #endregion
+      info.AddValue("LabelMaterialVersion", labelMaterialVersion);
+      info.AddValue("Text", mText);
+    }
+    #endregion
 
-        #region Xml serialization
-        /// <summary>
-        /// This property is reserved, apply the <see cref="T:System.Xml.Serialization.XmlSchemaProviderAttribute"></see> to the class instead.
-        /// </summary>
-        /// <returns>
-        /// An <see cref="T:System.Xml.Schema.XmlSchema"></see> that describes the XML representation of the object that is produced by the <see cref="M:System.Xml.Serialization.IXmlSerializable.WriteXml(System.Xml.XmlWriter)"></see> method and consumed by the <see cref="M:System.Xml.Serialization.IXmlSerializable.ReadXml(System.Xml.XmlReader)"></see> method.
-        /// </returns>
-        public override XmlSchema GetSchema()
-        {
-            throw new NotImplementedException("The method or operation is not implemented.");
-        }
+    #region Xml serialization
+    /// <summary>
+    /// This property is reserved, apply the <see cref="T:System.Xml.Serialization.XmlSchemaProviderAttribute"></see> to the class instead.
+    /// </summary>
+    /// <returns>
+    /// An <see cref="T:System.Xml.Schema.XmlSchema"></see> that describes the XML representation of the object that is produced by the <see cref="M:System.Xml.Serialization.IXmlSerializable.WriteXml(System.Xml.XmlWriter)"></see> method and consumed by the <see cref="M:System.Xml.Serialization.IXmlSerializable.ReadXml(System.Xml.XmlReader)"></see> method.
+    /// </returns>
+    public override XmlSchema GetSchema() {
+      throw new NotImplementedException("The method or operation is not implemented.");
+    }
 
-        /// <summary>
-        /// Generates an object from its XML representation.
-        /// </summary>
-        /// <param name="reader">The <see cref="T:System.Xml.XmlReader"></see> stream from which the object is deserialized.</param>
-        public override void ReadXml(System.Xml.XmlReader reader)
-        {
-            throw new NotImplementedException("The method or operation is not implemented.");
-        }
+    /// <summary>
+    /// Generates an object from its XML representation.
+    /// </summary>
+    /// <param name="reader">The <see cref="T:System.Xml.XmlReader"></see> stream from which the object is deserialized.</param>
+    public override void ReadXml(System.Xml.XmlReader reader) {
+      throw new NotImplementedException("The method or operation is not implemented.");
+    }
 
-        /// <summary>
-        /// Converts an object into its XML representation.
-        /// </summary>
-        /// <param name="writer">The <see cref="T:System.Xml.XmlWriter"></see> stream to which the object is serialized.</param>
-        public override void WriteXml(System.Xml.XmlWriter writer)
-        {
-            throw new NotImplementedException("The method or operation is not implemented.");
-        }
-        #endregion
+    /// <summary>
+    /// Converts an object into its XML representation.
+    /// </summary>
+    /// <param name="writer">The <see cref="T:System.Xml.XmlWriter"></see> stream to which the object is serialized.</param>
+    public override void WriteXml(System.Xml.XmlWriter writer) {
+      throw new NotImplementedException("The method or operation is not implemented.");
+    }
+    #endregion
 
 
 
-        /// <summary>
-        /// Runs when the entire object graph has been deserialized.
-        /// </summary>
-        /// <param name="sender">The object that initiated the callback. The functionality for this parameter is not currently implemented.</param>
-        public override void  OnDeserialization(object sender)
-        {
-            base.OnDeserialization(sender);
-            if(Tracing.BinaryDeserializationSwitch.Enabled)
-                Trace.WriteLine("IDeserializationCallback of 'LabelMaterial' called.");
-            
+    /// <summary>
+    /// Runs when the entire object graph has been deserialized.
+    /// </summary>
+    /// <param name="sender">The object that initiated the callback. The functionality for this parameter is not currently implemented.</param>
+    public override void OnDeserialization(object sender) {
+      base.OnDeserialization(sender);
+      if (Tracing.BinaryDeserializationSwitch.Enabled)
+        Trace.WriteLine("IDeserializationCallback of 'LabelMaterial' called.");
 
-        }
+
     }
+  }
 }
Index: /trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.Netron/3.0.2672.12446/Netron.Diagramming.Core-3.0.2672.12446/Serialization/Layer.Serialization.cs
===================================================================
--- /trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.Netron/3.0.2672.12446/Netron.Diagramming.Core-3.0.2672.12446/Serialization/Layer.Serialization.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.Netron/3.0.2672.12446/Netron.Diagramming.Core-3.0.2672.12446/Serialization/Layer.Serialization.cs	(revision 4068)
@@ -1,46 +1,39 @@
 using System;
-using System.Collections.Generic;
-using System.Text;
-using System.Drawing;
-using System.ComponentModel;
+using System.Diagnostics;
 using System.Runtime.Serialization;
+using System.Xml.Schema;
 using System.Xml.Serialization;
-using System.Diagnostics;
-using System.Xml.Schema;
-namespace Netron.Diagramming.Core
-{
+namespace Netron.Diagramming.Core {
+  /// <summary>
+  /// Complementary partial class related to (de)serialization.
+  /// </summary>
+  [Serializable]
+  public partial class Layer : ISerializable, IXmlSerializable, IDeserializationCallback {
+    #region Deserialization constructor
     /// <summary>
-    /// Complementary partial class related to (de)serialization.
+    /// Deserialization constructor
     /// </summary>
-   [Serializable]
-    public partial class Layer : ISerializable, IXmlSerializable, IDeserializationCallback
-    {
-        #region Deserialization constructor
-        /// <summary>
-        /// Deserialization constructor
-        /// </summary>
-        /// <param name="info">The info.</param>
-        /// <param name="context">The context.</param>
-        protected Layer(SerializationInfo info, StreamingContext context)
-        {
-            if(Tracing.BinaryDeserializationSwitch.Enabled)
-                Trace.WriteLine("Deserializing the fields of 'Layer'.");
+    /// <param name="info">The info.</param>
+    /// <param name="context">The context.</param>
+    protected Layer(SerializationInfo info, StreamingContext context) {
+      if (Tracing.BinaryDeserializationSwitch.Enabled)
+        Trace.WriteLine("Deserializing the fields of 'Layer'.");
 
-            double version = info.GetDouble("LayerVersion");
+      double version = info.GetDouble("LayerVersion");
 
-            mEntities = info.GetValue(
-                "Entities", 
-                typeof(CollectionBase<IDiagramEntity>)) as 
-                CollectionBase<IDiagramEntity>;
+      mEntities = info.GetValue(
+          "Entities",
+          typeof(CollectionBase<IDiagramEntity>)) as
+          CollectionBase<IDiagramEntity>;
 
-            mIsVisible = info.GetBoolean("IsVisible");
+      mIsVisible = info.GetBoolean("IsVisible");
 
-            mName = info.GetString("Name");
-            
-        }
-        #endregion
+      mName = info.GetString("Name");
 
-        #region Serialization events
-       /*
+    }
+    #endregion
+
+    #region Serialization events
+    /*
         [OnSerializing]
         void OnSerializing(StreamingContext context)
@@ -55,8 +48,8 @@
         }
         */
-        #endregion
+    #endregion
 
-        #region Deserialization events
-       /*
+    #region Deserialization events
+    /*
         [OnDeserializing]
         void OnDeserializing(StreamingContext context)
@@ -66,77 +59,71 @@
         }
         */
-        [OnDeserialized]
-        void OnDeserialized(StreamingContext context)
-         {
-             Init();
-             if(Tracing.BinaryDeserializationSwitch.Enabled)
-             Trace.WriteLine("...deserialization of 'Layer' finished");
-         }
-       
-        #endregion
+    [OnDeserialized]
+    void OnDeserialized(StreamingContext context) {
+      Init();
+      if (Tracing.BinaryDeserializationSwitch.Enabled)
+        Trace.WriteLine("...deserialization of 'Layer' finished");
+    }
 
-        #region Serialization
-        public void GetObjectData(SerializationInfo info, StreamingContext context)
-        {
-            if(Tracing.BinarySerializationSwitch.Enabled)
-                Trace.WriteLine("Serializing the fields of 'Layer'.");
+    #endregion
 
-            info.AddValue("LayerVersion", layerVersion);
+    #region Serialization
+    public void GetObjectData(SerializationInfo info, StreamingContext context) {
+      if (Tracing.BinarySerializationSwitch.Enabled)
+        Trace.WriteLine("Serializing the fields of 'Layer'.");
 
-            info.AddValue("Name", this.Name);
+      info.AddValue("LayerVersion", layerVersion);
 
-            info.AddValue("IsVisible", IsVisible);
+      info.AddValue("Name", this.Name);
 
-            info.AddValue(
-                "Entities", 
-                this.Entities, 
-                typeof(CollectionBase<IDiagramEntity>));
-        }
-        #endregion
+      info.AddValue("IsVisible", IsVisible);
 
-        #region Xml serialization
-        /// <summary>
-        /// This property is reserved, apply the <see cref="T:System.Xml.Serialization.XmlSchemaProviderAttribute"></see> to the class instead.
-        /// </summary>
-        /// <returns>
-        /// An <see cref="T:System.Xml.Schema.XmlSchema"></see> that describes the XML representation of the object that is produced by the <see cref="M:System.Xml.Serialization.IXmlSerializable.WriteXml(System.Xml.XmlWriter)"></see> method and consumed by the <see cref="M:System.Xml.Serialization.IXmlSerializable.ReadXml(System.Xml.XmlReader)"></see> method.
-        /// </returns>
-        public XmlSchema GetSchema()
-        {
-            throw new NotImplementedException("The method or operation is not implemented.");
-        }
+      info.AddValue(
+          "Entities",
+          this.Entities,
+          typeof(CollectionBase<IDiagramEntity>));
+    }
+    #endregion
 
-        /// <summary>
-        /// Generates an object from its XML representation.
-        /// </summary>
-        /// <param name="reader">The <see cref="T:System.Xml.XmlReader"></see> stream from which the object is deserialized.</param>
-        public void ReadXml(System.Xml.XmlReader reader)
-        {
-            throw new NotImplementedException("The method or operation is not implemented.");
-        }
+    #region Xml serialization
+    /// <summary>
+    /// This property is reserved, apply the <see cref="T:System.Xml.Serialization.XmlSchemaProviderAttribute"></see> to the class instead.
+    /// </summary>
+    /// <returns>
+    /// An <see cref="T:System.Xml.Schema.XmlSchema"></see> that describes the XML representation of the object that is produced by the <see cref="M:System.Xml.Serialization.IXmlSerializable.WriteXml(System.Xml.XmlWriter)"></see> method and consumed by the <see cref="M:System.Xml.Serialization.IXmlSerializable.ReadXml(System.Xml.XmlReader)"></see> method.
+    /// </returns>
+    public XmlSchema GetSchema() {
+      throw new NotImplementedException("The method or operation is not implemented.");
+    }
 
-        /// <summary>
-        /// Converts an object into its XML representation.
-        /// </summary>
-        /// <param name="writer">The <see cref="T:System.Xml.XmlWriter"></see> stream to which the object is serialized.</param>
-        public void WriteXml(System.Xml.XmlWriter writer)
-        {
-            throw new NotImplementedException("The method or operation is not implemented.");
-        }
-        #endregion
+    /// <summary>
+    /// Generates an object from its XML representation.
+    /// </summary>
+    /// <param name="reader">The <see cref="T:System.Xml.XmlReader"></see> stream from which the object is deserialized.</param>
+    public void ReadXml(System.Xml.XmlReader reader) {
+      throw new NotImplementedException("The method or operation is not implemented.");
+    }
 
-        #region IDeserializationCallback Members
+    /// <summary>
+    /// Converts an object into its XML representation.
+    /// </summary>
+    /// <param name="writer">The <see cref="T:System.Xml.XmlWriter"></see> stream to which the object is serialized.</param>
+    public void WriteXml(System.Xml.XmlWriter writer) {
+      throw new NotImplementedException("The method or operation is not implemented.");
+    }
+    #endregion
 
-        /// <summary>
-        /// Runs when the entire object graph has been deserialized.
-        /// </summary>
-        /// <param name="sender">The object that initiated the callback. The functionality for this parameter is not currently implemented.</param>
-        public void OnDeserialization(object sender)
-        {
-            if(Tracing.BinaryDeserializationSwitch.Enabled)
-                Trace.WriteLine("IDeserializationCallback of 'Layer' called.");
-        }
+    #region IDeserializationCallback Members
 
-        #endregion
+    /// <summary>
+    /// Runs when the entire object graph has been deserialized.
+    /// </summary>
+    /// <param name="sender">The object that initiated the callback. The functionality for this parameter is not currently implemented.</param>
+    public void OnDeserialization(object sender) {
+      if (Tracing.BinaryDeserializationSwitch.Enabled)
+        Trace.WriteLine("IDeserializationCallback of 'Layer' called.");
     }
+
+    #endregion
+  }
 }
Index: /trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.Netron/3.0.2672.12446/Netron.Diagramming.Core-3.0.2672.12446/Serialization/LinePenStyle.Serialization.cs
===================================================================
--- /trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.Netron/3.0.2672.12446/Netron.Diagramming.Core-3.0.2672.12446/Serialization/LinePenStyle.Serialization.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.Netron/3.0.2672.12446/Netron.Diagramming.Core-3.0.2672.12446/Serialization/LinePenStyle.Serialization.cs	(revision 4068)
@@ -1,59 +1,51 @@
 using System;
-using System.Collections.Generic;
-using System.Text;
-using System.Drawing;
-using System.ComponentModel;
+using System.Diagnostics;
+using System.Drawing.Drawing2D;
 using System.Runtime.Serialization;
+using System.Xml.Schema;
 using System.Xml.Serialization;
-using System.Diagnostics;
-using System.Xml.Schema;
-using System.Drawing.Drawing2D;
-namespace Netron.Diagramming.Core
-{
-    // ----------------------------------------------------------------------
+namespace Netron.Diagramming.Core {
+  // ----------------------------------------------------------------------
+  /// <summary>
+  /// Complementary partial class related to (de)serialization.
+  /// </summary>
+  // ----------------------------------------------------------------------
+  [Serializable]
+  public partial class LinePenStyle :
+     ISerializable,
+     IXmlSerializable,
+     IDeserializationCallback {
+    #region Deserialization constructor
+
+    // ------------------------------------------------------------------
     /// <summary>
-    /// Complementary partial class related to (de)serialization.
+    /// Deserialization constructor
     /// </summary>
-    // ----------------------------------------------------------------------
-   [Serializable]
-    public partial class LinePenStyle : 
-       ISerializable, 
-       IXmlSerializable, 
-       IDeserializationCallback
-    {
-        #region Deserialization constructor
+    /// <param name="info">The info.</param>
+    /// <param name="context">The context.</param>
+    // ------------------------------------------------------------------
+    protected LinePenStyle(
+        SerializationInfo info,
+        StreamingContext context)
+      : base(info, context) {
 
-        // ------------------------------------------------------------------
-        /// <summary>
-        /// Deserialization constructor
-        /// </summary>
-        /// <param name="info">The info.</param>
-        /// <param name="context">The context.</param>
-        // ------------------------------------------------------------------
-        protected LinePenStyle(
-            SerializationInfo info, 
-            StreamingContext context)
-            : base(info, context)     
-        {
+      if (Tracing.BinaryDeserializationSwitch.Enabled) {
+        Trace.WriteLine("Deserializing the fields of 'LinePenStyle'.");
+      }
 
-            if (Tracing.BinaryDeserializationSwitch.Enabled)
-            {
-                Trace.WriteLine("Deserializing the fields of 'LinePenStyle'.");
-            }
+      double version = info.GetDouble("LinePenStyleVersion");
 
-            double version = info.GetDouble("LinePenStyleVersion");
+      this.mStartCap = (LineCap)Enum.Parse(
+          typeof(LineCap),
+          info.GetString("StartCap"));
 
-            this.mStartCap = (LineCap)Enum.Parse(
-                typeof(LineCap), 
-                info.GetString("StartCap"));
+      this.mEndCap = (LineCap)Enum.Parse(
+          typeof(LineCap),
+          info.GetString("EndCap"));
+    }
+    #endregion
 
-            this.mEndCap = (LineCap)Enum.Parse(
-                typeof(LineCap), 
-                info.GetString("EndCap"));
-        }
-        #endregion
-
-        #region Serialization events
-       /*
+    #region Serialization events
+    /*
         [OnSerializing]
         void OnSerializing(StreamingContext context)
@@ -67,8 +59,8 @@
         }
         */
-        #endregion
+    #endregion
 
-        #region Deserialization events
-       /*
+    #region Deserialization events
+    /*
         [OnDeserializing]
         void OnDeserializing(StreamingContext context)
@@ -84,90 +76,83 @@
         }
        */
-        #endregion
+    #endregion
 
-        #region Serialization
+    #region Serialization
 
-        // ------------------------------------------------------------------
-        /// <summary>
-        /// Populates a <see cref=
-        /// "T:System.Runtime.Serialization.SerializationInfo"></see> with 
-        /// the data needed to serialize the target object.
-        /// </summary>
-        /// <param name="info">The <see cref=
-        /// "T:System.Runtime.Serialization.SerializationInfo"></see> to 
-        /// populate with data.</param>
-        /// <param name="context">The destination (see <see cref=
-        /// "T:System.Runtime.Serialization.StreamingContext"></see>) for 
-        /// this serialization.</param>
-        /// <exception cref="T:System.Security.SecurityException">The caller 
-        /// does not have the required permission. </exception>
-        // ------------------------------------------------------------------
-        public override void GetObjectData(
-            SerializationInfo info, 
-            StreamingContext context)
-        {
-            if (Tracing.BinarySerializationSwitch.Enabled)
-            {
-                Trace.WriteLine("Serializing the fields of 'LinePenStyle'.");
-            }
-            base.GetObjectData(info, context);
+    // ------------------------------------------------------------------
+    /// <summary>
+    /// Populates a <see cref=
+    /// "T:System.Runtime.Serialization.SerializationInfo"></see> with 
+    /// the data needed to serialize the target object.
+    /// </summary>
+    /// <param name="info">The <see cref=
+    /// "T:System.Runtime.Serialization.SerializationInfo"></see> to 
+    /// populate with data.</param>
+    /// <param name="context">The destination (see <see cref=
+    /// "T:System.Runtime.Serialization.StreamingContext"></see>) for 
+    /// this serialization.</param>
+    /// <exception cref="T:System.Security.SecurityException">The caller 
+    /// does not have the required permission. </exception>
+    // ------------------------------------------------------------------
+    public override void GetObjectData(
+        SerializationInfo info,
+        StreamingContext context) {
+      if (Tracing.BinarySerializationSwitch.Enabled) {
+        Trace.WriteLine("Serializing the fields of 'LinePenStyle'.");
+      }
+      base.GetObjectData(info, context);
 
-            info.AddValue("LinePenStyleVersion", linePenStyleVersion);
+      info.AddValue("LinePenStyleVersion", linePenStyleVersion);
 
-            // Note that the generalization cap is defined as a static member 
-            // in this class.
-            info.AddValue("StartCap", this.mStartCap.ToString());
-            info.AddValue("EndCap", this.mEndCap.ToString());
-            
-        }   
-        #endregion
+      // Note that the generalization cap is defined as a static member 
+      // in this class.
+      info.AddValue("StartCap", this.mStartCap.ToString());
+      info.AddValue("EndCap", this.mEndCap.ToString());
 
-        #region Xml serialization
-        /// <summary>
-        /// This property is reserved, apply the <see cref="T:System.Xml.Serialization.XmlSchemaProviderAttribute"></see> to the class instead.
-        /// </summary>
-        /// <returns>
-        /// An <see cref="T:System.Xml.Schema.XmlSchema"></see> that describes the XML representation of the object that is produced by the <see cref="M:System.Xml.Serialization.IXmlSerializable.WriteXml(System.Xml.XmlWriter)"></see> method and consumed by the <see cref="M:System.Xml.Serialization.IXmlSerializable.ReadXml(System.Xml.XmlReader)"></see> method.
-        /// </returns>
-        public override XmlSchema GetSchema()
-        {
-            throw new NotImplementedException("The method or operation is not implemented.");
-        }
+    }
+    #endregion
 
-        /// <summary>
-        /// Generates an object from its XML representation.
-        /// </summary>
-        /// <param name="reader">The <see cref="T:System.Xml.XmlReader"></see> stream from which the object is deserialized.</param>
-        public override void ReadXml(System.Xml.XmlReader reader)
-        {
-            throw new NotImplementedException("The method or operation is not implemented.");
-        }
+    #region Xml serialization
+    /// <summary>
+    /// This property is reserved, apply the <see cref="T:System.Xml.Serialization.XmlSchemaProviderAttribute"></see> to the class instead.
+    /// </summary>
+    /// <returns>
+    /// An <see cref="T:System.Xml.Schema.XmlSchema"></see> that describes the XML representation of the object that is produced by the <see cref="M:System.Xml.Serialization.IXmlSerializable.WriteXml(System.Xml.XmlWriter)"></see> method and consumed by the <see cref="M:System.Xml.Serialization.IXmlSerializable.ReadXml(System.Xml.XmlReader)"></see> method.
+    /// </returns>
+    public override XmlSchema GetSchema() {
+      throw new NotImplementedException("The method or operation is not implemented.");
+    }
 
-        /// <summary>
-        /// Converts an object into its XML representation.
-        /// </summary>
-        /// <param name="writer">The <see cref="T:System.Xml.XmlWriter"></see> stream to which the object is serialized.</param>
-        public override void WriteXml(System.Xml.XmlWriter writer)
-        {
-            throw new NotImplementedException("The method or operation is not implemented.");
-        }
-        #endregion
+    /// <summary>
+    /// Generates an object from its XML representation.
+    /// </summary>
+    /// <param name="reader">The <see cref="T:System.Xml.XmlReader"></see> stream from which the object is deserialized.</param>
+    public override void ReadXml(System.Xml.XmlReader reader) {
+      throw new NotImplementedException("The method or operation is not implemented.");
+    }
 
-        // ------------------------------------------------------------------
-        /// <summary>
-        /// Runs when the entire object graph has been deserialized.
-        /// </summary>
-        /// <param name="sender">The object that initiated the callback. The 
-        /// functionality for this parameter is not currently implemented.
-        /// </param>
-        // ------------------------------------------------------------------
-        public override void OnDeserialization(object sender)
-        {
-            if (Tracing.BinaryDeserializationSwitch.Enabled)
-            {
-                Trace.WriteLine(
-                    "IDeserializationCallback of 'LinePenStyle' called.");
-            }
-        }
+    /// <summary>
+    /// Converts an object into its XML representation.
+    /// </summary>
+    /// <param name="writer">The <see cref="T:System.Xml.XmlWriter"></see> stream to which the object is serialized.</param>
+    public override void WriteXml(System.Xml.XmlWriter writer) {
+      throw new NotImplementedException("The method or operation is not implemented.");
     }
+    #endregion
+
+    // ------------------------------------------------------------------
+    /// <summary>
+    /// Runs when the entire object graph has been deserialized.
+    /// </summary>
+    /// <param name="sender">The object that initiated the callback. The 
+    /// functionality for this parameter is not currently implemented.
+    /// </param>
+    // ------------------------------------------------------------------
+    public override void OnDeserialization(object sender) {
+      if (Tracing.BinaryDeserializationSwitch.Enabled) {
+        Trace.WriteLine(
+            "IDeserializationCallback of 'LinePenStyle' called.");
+      }
+    }
+  }
 }
Index: /trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.Netron/3.0.2672.12446/Netron.Diagramming.Core-3.0.2672.12446/Serialization/Model.Serialization.cs
===================================================================
--- /trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.Netron/3.0.2672.12446/Netron.Diagramming.Core-3.0.2672.12446/Serialization/Model.Serialization.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.Netron/3.0.2672.12446/Netron.Diagramming.Core-3.0.2672.12446/Serialization/Model.Serialization.cs	(revision 4068)
@@ -1,44 +1,37 @@
 using System;
 using System.Collections.Generic;
-using System.Text;
-using System.Drawing;
-using System.ComponentModel;
+using System.Diagnostics;
 using System.Runtime.Serialization;
+using System.Xml.Schema;
 using System.Xml.Serialization;
-using System.Diagnostics;
-using System.Xml.Schema;
-namespace Netron.Diagramming.Core
-{
+namespace Netron.Diagramming.Core {
+  /// <summary>
+  /// Complementary partial class related to (de)serialization.
+  /// </summary>
+  [Serializable]
+  public partial class Model : ISerializable, IXmlSerializable, IDeserializationCallback {
+    #region Deserialization constructor
     /// <summary>
-    /// Complementary partial class related to (de)serialization.
+    /// Deserialization constructor
     /// </summary>
-   [Serializable]
-    public partial class Model : ISerializable, IXmlSerializable, IDeserializationCallback
-    {
-        #region Deserialization constructor
-        /// <summary>
-        /// Deserialization constructor
-        /// </summary>
-        /// <param name="info">The info.</param>
-        /// <param name="context">The context.</param>
-        protected Model(SerializationInfo info, StreamingContext context)
-        {
-            if (Tracing.BinaryDeserializationSwitch.Enabled)
-            {
-                Trace.WriteLine("Deserializing the fields of 'Model'.");
-            }
+    /// <param name="info">The info.</param>
+    /// <param name="context">The context.</param>
+    protected Model(SerializationInfo info, StreamingContext context) {
+      if (Tracing.BinaryDeserializationSwitch.Enabled) {
+        Trace.WriteLine("Deserializing the fields of 'Model'.");
+      }
 
-            double version = info.GetDouble("ModelVersion");
+      double version = info.GetDouble("ModelVersion");
 
-            mPages = info.GetValue(
-                "Pages", 
-                typeof(CollectionBase<IPage>)) as CollectionBase<IPage>;
+      mPages = info.GetValue(
+          "Pages",
+          typeof(CollectionBase<IPage>)) as CollectionBase<IPage>;
 
-            //Init();
-        }
-        #endregion
+      //Init();
+    }
+    #endregion
 
-        #region Serialization events
-       /*
+    #region Serialization events
+    /*
         [OnSerializing]
         void OnSerializing(StreamingContext context)
@@ -55,113 +48,104 @@
         }
         */
-        #endregion
+    #endregion
 
-        #region Deserialization events
-       
-        [OnDeserializing]
-        void OnDeserializing(StreamingContext context)
-        {
-          if(Tracing.BinaryDeserializationSwitch.Enabled)
-            Trace.WriteLine("Starting deserializing the 'Model' class...");
-            //the anchors is a temporary collection of Uid's and parent entities to re-connect connectors
-            //to their parent. The serialization process does serialize parenting because you need on deserialization an
-            //instance in order to connect to it.
+    #region Deserialization events
 
-            Anchors.Clear();
+    [OnDeserializing]
+    void OnDeserializing(StreamingContext context) {
+      if (Tracing.BinaryDeserializationSwitch.Enabled)
+        Trace.WriteLine("Starting deserializing the 'Model' class...");
+      //the anchors is a temporary collection of Uid's and parent entities to re-connect connectors
+      //to their parent. The serialization process does serialize parenting because you need on deserialization an
+      //instance in order to connect to it.
+
+      Anchors.Clear();
+    }
+
+    [OnDeserialized]
+    void OnDeserialized(StreamingContext context) {
+      if (Tracing.BinaryDeserializationSwitch.Enabled)
+        Trace.WriteLine("...deserialization of 'Model' finished");
+    }
+
+    #endregion
+
+    #region Serialization
+    /// <summary>
+    /// Populates a <see cref="T:System.Runtime.Serialization.SerializationInfo"></see> with the data needed to serialize the target object.
+    /// </summary>
+    /// <param name="info">The <see cref="T:System.Runtime.Serialization.SerializationInfo"></see> to populate with data.</param>
+    /// <param name="context">The destination (see <see cref="T:System.Runtime.Serialization.StreamingContext"></see>) for this serialization.</param>
+    /// <exception cref="T:System.Security.SecurityException">The caller does not have the required permission. </exception>
+    public void GetObjectData(SerializationInfo info, StreamingContext context) {
+      if (Tracing.BinarySerializationSwitch.Enabled)
+        Trace.WriteLine("Serializing the fields of 'Model'.");
+
+      info.AddValue("ModelVersion", modelVersion);
+
+      info.AddValue("Pages", this.Pages, typeof(CollectionBase<IPage>));
+    }
+    #endregion
+
+    #region Xml serialization
+    /// <summary>
+    /// This property is reserved, apply the <see cref="T:System.Xml.Serialization.XmlSchemaProviderAttribute"></see> to the class instead.
+    /// </summary>
+    /// <returns>
+    /// An <see cref="T:System.Xml.Schema.XmlSchema"></see> that describes the XML representation of the object that is produced by the <see cref="M:System.Xml.Serialization.IXmlSerializable.WriteXml(System.Xml.XmlWriter)"></see> method and consumed by the <see cref="M:System.Xml.Serialization.IXmlSerializable.ReadXml(System.Xml.XmlReader)"></see> method.
+    /// </returns>
+    public XmlSchema GetSchema() {
+      throw new NotImplementedException("The method or operation is not implemented.");
+    }
+
+    /// <summary>
+    /// Generates an object from its XML representation.
+    /// </summary>
+    /// <param name="reader">The <see cref="T:System.Xml.XmlReader"></see> stream from which the object is deserialized.</param>
+    public void ReadXml(System.Xml.XmlReader reader) {
+      throw new NotImplementedException("The method or operation is not implemented.");
+    }
+
+    /// <summary>
+    /// Converts an object into its XML representation.
+    /// </summary>
+    /// <param name="writer">The <see cref="T:System.Xml.XmlWriter"></see> stream to which the object is serialized.</param>
+    public void WriteXml(System.Xml.XmlWriter writer) {
+      throw new NotImplementedException("The method or operation is not implemented.");
+    }
+    #endregion
+
+    #region IDeserializationCallback Members
+
+    /// <summary>
+    /// Runs when the entire object graph has been deserialized.
+    /// </summary>
+    /// <param name="sender">The object that initiated the callback. The functionality for this parameter is not currently implemented.</param>
+    public void OnDeserialization(object sender) {
+
+      if (Tracing.BinaryDeserializationSwitch.Enabled)
+        Trace.WriteLine("IDeserializationCallback of 'Model' called.");
+      Init();
+      #region Binding of connectors
+
+      Dictionary<Guid, Anchor>.Enumerator enumer = Anchors.GetEnumerator();
+      System.Collections.Generic.KeyValuePair<Guid, Anchor> pair;
+      Anchor anchor;
+      while (enumer.MoveNext()) {
+        pair = enumer.Current;
+        anchor = pair.Value;
+        if (anchor.Parent != Guid.Empty) //there's a parent connector
+                {
+          if (Anchors.ContainsKey(anchor.Parent)) {
+            Anchors.GetAnchor(anchor.Parent).Instance.AttachConnector(anchor.Instance);
+          }
         }
-      
-        [OnDeserialized]
-        void OnDeserialized(StreamingContext context)
-         {
-             if(Tracing.BinaryDeserializationSwitch.Enabled)
-                Trace.WriteLine("...deserialization of 'Model' finished");
-         }
-   
-        #endregion
+      }
+      //clean up the anchoring matrix
+      Anchors.Clear();
+      #endregion
+    }
 
-        #region Serialization
-         /// <summary>
-         /// Populates a <see cref="T:System.Runtime.Serialization.SerializationInfo"></see> with the data needed to serialize the target object.
-         /// </summary>
-         /// <param name="info">The <see cref="T:System.Runtime.Serialization.SerializationInfo"></see> to populate with data.</param>
-         /// <param name="context">The destination (see <see cref="T:System.Runtime.Serialization.StreamingContext"></see>) for this serialization.</param>
-         /// <exception cref="T:System.Security.SecurityException">The caller does not have the required permission. </exception>
-        public void GetObjectData(SerializationInfo info, StreamingContext context)
-        {
-            if(Tracing.BinarySerializationSwitch.Enabled)
-                Trace.WriteLine("Serializing the fields of 'Model'.");
-
-            info.AddValue("ModelVersion", modelVersion);
-
-            info.AddValue("Pages", this.Pages, typeof(CollectionBase<IPage>));
-        }
-        #endregion
-
-        #region Xml serialization
-        /// <summary>
-        /// This property is reserved, apply the <see cref="T:System.Xml.Serialization.XmlSchemaProviderAttribute"></see> to the class instead.
-        /// </summary>
-        /// <returns>
-        /// An <see cref="T:System.Xml.Schema.XmlSchema"></see> that describes the XML representation of the object that is produced by the <see cref="M:System.Xml.Serialization.IXmlSerializable.WriteXml(System.Xml.XmlWriter)"></see> method and consumed by the <see cref="M:System.Xml.Serialization.IXmlSerializable.ReadXml(System.Xml.XmlReader)"></see> method.
-        /// </returns>
-        public XmlSchema GetSchema()
-        {
-            throw new NotImplementedException("The method or operation is not implemented.");
-        }
-
-        /// <summary>
-        /// Generates an object from its XML representation.
-        /// </summary>
-        /// <param name="reader">The <see cref="T:System.Xml.XmlReader"></see> stream from which the object is deserialized.</param>
-        public void ReadXml(System.Xml.XmlReader reader)
-        {
-            throw new NotImplementedException("The method or operation is not implemented.");
-        }
-
-        /// <summary>
-        /// Converts an object into its XML representation.
-        /// </summary>
-        /// <param name="writer">The <see cref="T:System.Xml.XmlWriter"></see> stream to which the object is serialized.</param>
-        public void WriteXml(System.Xml.XmlWriter writer)
-        {
-            throw new NotImplementedException("The method or operation is not implemented.");
-        }
-        #endregion
-
-        #region IDeserializationCallback Members
-
-        /// <summary>
-        /// Runs when the entire object graph has been deserialized.
-        /// </summary>
-        /// <param name="sender">The object that initiated the callback. The functionality for this parameter is not currently implemented.</param>
-        public void OnDeserialization(object sender)
-        {
-           
-            if(Tracing.BinaryDeserializationSwitch.Enabled)
-                Trace.WriteLine("IDeserializationCallback of 'Model' called.");
-            Init();
-            #region Binding of connectors
-
-            Dictionary<Guid, Anchor>.Enumerator enumer = Anchors.GetEnumerator();
-            System.Collections.Generic.KeyValuePair<Guid, Anchor> pair;
-            Anchor anchor;
-            while(enumer.MoveNext())
-            {
-                pair =  enumer.Current;
-                anchor = pair.Value;
-                if(anchor.Parent!=Guid.Empty) //there's a parent connector
-                {
-                    if(Anchors.ContainsKey(anchor.Parent))
-                    {
-                        Anchors.GetAnchor(anchor.Parent).Instance.AttachConnector(anchor.Instance);
-                    }
-                }
-            }
-            //clean up the anchoring matrix
-            Anchors.Clear();
-            #endregion
-        }
-
-        #endregion
-    }
+    #endregion
+  }
 }
Index: /trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.Netron/3.0.2672.12446/Netron.Diagramming.Core-3.0.2672.12446/Serialization/Page.Serialization.cs
===================================================================
--- /trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.Netron/3.0.2672.12446/Netron.Diagramming.Core-3.0.2672.12446/Serialization/Page.Serialization.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.Netron/3.0.2672.12446/Netron.Diagramming.Core-3.0.2672.12446/Serialization/Page.Serialization.cs	(revision 4068)
@@ -1,59 +1,53 @@
 using System;
-using System.Collections.Generic;
-using System.Text;
+using System.Diagnostics;
 using System.Drawing;
-using System.ComponentModel;
 using System.Runtime.Serialization;
+using System.Xml.Schema;
 using System.Xml.Serialization;
-using System.Diagnostics;
-using System.Xml.Schema;
-namespace Netron.Diagramming.Core
-{
+namespace Netron.Diagramming.Core {
+  /// <summary>
+  /// Complementary partial class related to (de)serialization.
+  /// </summary>
+  [Serializable]
+  public partial class Page : ISerializable, IXmlSerializable, IDeserializationCallback {
+    #region Deserialization constructor
     /// <summary>
-    /// Complementary partial class related to (de)serialization.
+    /// Deserialization constructor
     /// </summary>
-   [Serializable]
-    public partial class Page : ISerializable, IXmlSerializable, IDeserializationCallback
-    {
-        #region Deserialization constructor
-        /// <summary>
-        /// Deserialization constructor
-        /// </summary>
-        /// <param name="info">The info.</param>
-        /// <param name="context">The context.</param>
-        protected Page(SerializationInfo info, StreamingContext context)
-        {
-            if(Tracing.BinaryDeserializationSwitch.Enabled)
-                Trace.WriteLine("Deserializing the fields of 'Page'.");
+    /// <param name="info">The info.</param>
+    /// <param name="context">The context.</param>
+    protected Page(SerializationInfo info, StreamingContext context) {
+      if (Tracing.BinaryDeserializationSwitch.Enabled)
+        Trace.WriteLine("Deserializing the fields of 'Page'.");
 
-            double version = info.GetDouble("PageVersion");
+      double version = info.GetDouble("PageVersion");
 
-            Ambience = info.GetValue(
-                "Ambience", 
-                typeof(Ambience)) as Ambience;
+      Ambience = info.GetValue(
+          "Ambience",
+          typeof(Ambience)) as Ambience;
 
-            //mDefaultLayer = info.GetValue("DefaultLayer", typeof(ILayer)) as ILayer;
-            mLayers = info.GetValue(
-                "Layers", 
-                typeof(CollectionBase<ILayer>)) as CollectionBase<ILayer>;
+      //mDefaultLayer = info.GetValue("DefaultLayer", typeof(ILayer)) as ILayer;
+      mLayers = info.GetValue(
+          "Layers",
+          typeof(CollectionBase<ILayer>)) as CollectionBase<ILayer>;
 
-            mName = (string)info.GetValue(
-                "Name",
-                typeof(string));
+      mName = (string)info.GetValue(
+          "Name",
+          typeof(string));
 
-            mOrigin = (Point)info.GetValue(
-                "Origin",
-                typeof(Point));
+      mOrigin = (Point)info.GetValue(
+          "Origin",
+          typeof(Point));
 
-            mMagnification = (SizeF)info.GetValue(
-                "Magnification",
-                typeof(SizeF));
-           
-           
-        }
-        #endregion
+      mMagnification = (SizeF)info.GetValue(
+          "Magnification",
+          typeof(SizeF));
 
-        #region Serialization events
-       /*
+
+    }
+    #endregion
+
+    #region Serialization events
+    /*
         [OnSerializing]
         void OnSerializing(StreamingContext context)
@@ -69,8 +63,8 @@
         }
         */
-        #endregion
+    #endregion
 
-        #region Deserialization events
-       /*
+    #region Deserialization events
+    /*
         [OnDeserializing]
         void OnDeserializing(StreamingContext context)
@@ -80,102 +74,96 @@
         }
         */
-        [OnDeserialized]
-        void OnDeserialized(StreamingContext context)
-         {
+    [OnDeserialized]
+    void OnDeserialized(StreamingContext context) {
 
-             Init();
-            if(Tracing.BinaryDeserializationSwitch.Enabled)
-                Trace.WriteLine("...deserialization of 'Page' finished");
-         }
+      Init();
+      if (Tracing.BinaryDeserializationSwitch.Enabled)
+        Trace.WriteLine("...deserialization of 'Page' finished");
+    }
 
-        #endregion
+    #endregion
 
-        #region Serialization
-         /// <summary>
-         /// Populates a <see cref="T:System.Runtime.Serialization.SerializationInfo"></see> with the data needed to serialize the target object.
-         /// </summary>
-         /// <param name="info">The <see cref="T:System.Runtime.Serialization.SerializationInfo"></see> to populate with data.</param>
-         /// <param name="context">The destination (see <see cref="T:System.Runtime.Serialization.StreamingContext"></see>) for this serialization.</param>
-         /// <exception cref="T:System.Security.SecurityException">The caller does not have the required permission. </exception>
-        public void GetObjectData(SerializationInfo info, StreamingContext context)
-        {
-            if(Tracing.BinarySerializationSwitch.Enabled)
-                Trace.WriteLine("Serializing the fields of 'Page'.");
+    #region Serialization
+    /// <summary>
+    /// Populates a <see cref="T:System.Runtime.Serialization.SerializationInfo"></see> with the data needed to serialize the target object.
+    /// </summary>
+    /// <param name="info">The <see cref="T:System.Runtime.Serialization.SerializationInfo"></see> to populate with data.</param>
+    /// <param name="context">The destination (see <see cref="T:System.Runtime.Serialization.StreamingContext"></see>) for this serialization.</param>
+    /// <exception cref="T:System.Security.SecurityException">The caller does not have the required permission. </exception>
+    public void GetObjectData(SerializationInfo info, StreamingContext context) {
+      if (Tracing.BinarySerializationSwitch.Enabled)
+        Trace.WriteLine("Serializing the fields of 'Page'.");
 
-            info.AddValue("PageVersion", pageVersion);
+      info.AddValue("PageVersion", pageVersion);
 
-            //for the full version there will be a collection of pages here
-            info.AddValue(
-                "Ambience", 
-                this.Ambience, 
-                typeof(Ambience));
+      //for the full version there will be a collection of pages here
+      info.AddValue(
+          "Ambience",
+          this.Ambience,
+          typeof(Ambience));
 
-            //info.AddValue("DefaultLayer", this.DefaultLayer, typeof(ILayer));
-            info.AddValue(
-                "Layers",
-                this.mLayers, 
-                typeof(CollectionBase<ILayer>));
+      //info.AddValue("DefaultLayer", this.DefaultLayer, typeof(ILayer));
+      info.AddValue(
+          "Layers",
+          this.mLayers,
+          typeof(CollectionBase<ILayer>));
 
-            info.AddValue(
-                "Name",
-                mName,
-                typeof(string));
+      info.AddValue(
+          "Name",
+          mName,
+          typeof(string));
 
-            info.AddValue(
-                "Magnification",
-                mMagnification,
-                typeof(SizeF));
+      info.AddValue(
+          "Magnification",
+          mMagnification,
+          typeof(SizeF));
 
-            info.AddValue(
-                "Origin",
-                mOrigin,
-                typeof(Point));
-        }
-        #endregion
+      info.AddValue(
+          "Origin",
+          mOrigin,
+          typeof(Point));
+    }
+    #endregion
 
-        #region Xml serialization
-        /// <summary>
-        /// This property is reserved, apply the <see cref="T:System.Xml.Serialization.XmlSchemaProviderAttribute"></see> to the class instead.
-        /// </summary>
-        /// <returns>
-        /// An <see cref="T:System.Xml.Schema.XmlSchema"></see> that describes the XML representation of the object that is produced by the <see cref="M:System.Xml.Serialization.IXmlSerializable.WriteXml(System.Xml.XmlWriter)"></see> method and consumed by the <see cref="M:System.Xml.Serialization.IXmlSerializable.ReadXml(System.Xml.XmlReader)"></see> method.
-        /// </returns>
-        public XmlSchema GetSchema()
-        {
-            throw new NotImplementedException("The method or operation is not implemented.");
-        }
+    #region Xml serialization
+    /// <summary>
+    /// This property is reserved, apply the <see cref="T:System.Xml.Serialization.XmlSchemaProviderAttribute"></see> to the class instead.
+    /// </summary>
+    /// <returns>
+    /// An <see cref="T:System.Xml.Schema.XmlSchema"></see> that describes the XML representation of the object that is produced by the <see cref="M:System.Xml.Serialization.IXmlSerializable.WriteXml(System.Xml.XmlWriter)"></see> method and consumed by the <see cref="M:System.Xml.Serialization.IXmlSerializable.ReadXml(System.Xml.XmlReader)"></see> method.
+    /// </returns>
+    public XmlSchema GetSchema() {
+      throw new NotImplementedException("The method or operation is not implemented.");
+    }
 
-        /// <summary>
-        /// Generates an object from its XML representation.
-        /// </summary>
-        /// <param name="reader">The <see cref="T:System.Xml.XmlReader"></see> stream from which the object is deserialized.</param>
-        public void ReadXml(System.Xml.XmlReader reader)
-        {
-            throw new NotImplementedException("The method or operation is not implemented.");
-        }
+    /// <summary>
+    /// Generates an object from its XML representation.
+    /// </summary>
+    /// <param name="reader">The <see cref="T:System.Xml.XmlReader"></see> stream from which the object is deserialized.</param>
+    public void ReadXml(System.Xml.XmlReader reader) {
+      throw new NotImplementedException("The method or operation is not implemented.");
+    }
 
-        /// <summary>
-        /// Converts an object into its XML representation.
-        /// </summary>
-        /// <param name="writer">The <see cref="T:System.Xml.XmlWriter"></see> stream to which the object is serialized.</param>
-        public void WriteXml(System.Xml.XmlWriter writer)
-        {
-            throw new NotImplementedException("The method or operation is not implemented.");
-        }
-        #endregion
+    /// <summary>
+    /// Converts an object into its XML representation.
+    /// </summary>
+    /// <param name="writer">The <see cref="T:System.Xml.XmlWriter"></see> stream to which the object is serialized.</param>
+    public void WriteXml(System.Xml.XmlWriter writer) {
+      throw new NotImplementedException("The method or operation is not implemented.");
+    }
+    #endregion
 
-        #region IDeserializationCallback Members
+    #region IDeserializationCallback Members
 
-        /// <summary>
-        /// Runs when the entire object graph has been deserialized.
-        /// </summary>
-        /// <param name="sender">The object that initiated the callback. The functionality for this parameter is not currently implemented.</param>
-        public void OnDeserialization(object sender)
-        {
-            if(Tracing.BinaryDeserializationSwitch.Enabled)
-                Trace.WriteLine("IDeserializationCallback of 'Page' called.");
-        }
+    /// <summary>
+    /// Runs when the entire object graph has been deserialized.
+    /// </summary>
+    /// <param name="sender">The object that initiated the callback. The functionality for this parameter is not currently implemented.</param>
+    public void OnDeserialization(object sender) {
+      if (Tracing.BinaryDeserializationSwitch.Enabled)
+        Trace.WriteLine("IDeserializationCallback of 'Page' called.");
+    }
 
-        #endregion
-    }
+    #endregion
+  }
 }
Index: /trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.Netron/3.0.2672.12446/Netron.Diagramming.Core-3.0.2672.12446/Serialization/PenStyle.Serialization.cs
===================================================================
--- /trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.Netron/3.0.2672.12446/Netron.Diagramming.Core-3.0.2672.12446/Serialization/PenStyle.Serialization.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.Netron/3.0.2672.12446/Netron.Diagramming.Core-3.0.2672.12446/Serialization/PenStyle.Serialization.cs	(revision 4068)
@@ -1,53 +1,45 @@
 using System;
-using System.Collections.Generic;
-using System.Text;
+using System.Diagnostics;
 using System.Drawing;
-using System.ComponentModel;
 using System.Runtime.Serialization;
+using System.Xml.Schema;
 using System.Xml.Serialization;
-using System.Diagnostics;
-using System.Xml.Schema;
-using System.Drawing.Drawing2D;
-namespace Netron.Diagramming.Core
-{
+namespace Netron.Diagramming.Core {
+  /// <summary>
+  /// Complementary partial class related to (de)serialization.
+  /// </summary>
+  [Serializable]
+  public partial class PenStyle :
+     ISerializable,
+     IXmlSerializable,
+     IDeserializationCallback {
+    #region Deserialization constructor
+
+    // -------------------------------------------------------------------
     /// <summary>
-    /// Complementary partial class related to (de)serialization.
+    /// Deserialization constructor
     /// </summary>
-    [Serializable]
-    public partial class PenStyle :
-       ISerializable,
-       IXmlSerializable,
-       IDeserializationCallback
-    {
-        #region Deserialization constructor
+    /// <param name="info">The info.</param>
+    /// <param name="context">The context.</param>
+    // -------------------------------------------------------------------
+    protected PenStyle(SerializationInfo info, StreamingContext context) {
+      if (Tracing.BinaryDeserializationSwitch.Enabled) {
+        Trace.WriteLine("Deserializing the fields of 'PenStyle'.");
+      }
 
-        // -------------------------------------------------------------------
-        /// <summary>
-        /// Deserialization constructor
-        /// </summary>
-        /// <param name="info">The info.</param>
-        /// <param name="context">The context.</param>
-        // -------------------------------------------------------------------
-        protected PenStyle(SerializationInfo info, StreamingContext context)
-        {
-            if (Tracing.BinaryDeserializationSwitch.Enabled)
-            {
-                Trace.WriteLine("Deserializing the fields of 'PenStyle'.");
-            }
+      double version = info.GetDouble("PenStyleVersion");
 
-            double version = info.GetDouble("PenStyleVersion");
+      mWidth = info.GetSingle("Width");
 
-            mWidth = info.GetSingle("Width");
+      mColor = (Color)info.GetValue("Color", typeof(Color));
 
-            mColor = (Color)info.GetValue("Color", typeof(Color));
+      mDashStyle = (System.Drawing.Drawing2D.DashStyle)Enum.Parse(
+          typeof(System.Drawing.Drawing2D.DashStyle),
+          info.GetString("DashStyle"));
+    }
+    #endregion
 
-            mDashStyle = (System.Drawing.Drawing2D.DashStyle)Enum.Parse(
-                typeof(System.Drawing.Drawing2D.DashStyle),
-                info.GetString("DashStyle"));
-        }
-        #endregion
-
-        #region Serialization events
-        /*
+    #region Serialization events
+    /*
         [OnSerializing]
         void OnSerializing(StreamingContext context)
@@ -61,8 +53,8 @@
         }
         */
-        #endregion
+    #endregion
 
-        #region Deserialization events
-        /*
+    #region Deserialization events
+    /*
         [OnDeserializing]
         void OnDeserializing(StreamingContext context)
@@ -78,77 +70,72 @@
         }
        */
-        #endregion
+    #endregion
 
-        #region Serialization
+    #region Serialization
 
-        // -------------------------------------------------------------------
-        /// <summary>
-        /// Populates a <see cref=
-        /// "T:System.Runtime.Serialization.SerializationInfo"></see> with 
-        /// the data needed to serialize the target object.
-        /// </summary>
-        /// <param name="info">The <see cref=
-        /// "T:System.Runtime.Serialization.SerializationInfo"></see> to 
-        /// populate with data.</param>
-        /// <param name="context">The destination (see <see cref=
-        /// "T:System.Runtime.Serialization.StreamingContext"></see>) for 
-        /// this serialization.</param>
-        /// <exception cref="T:System.Security.SecurityException">The caller 
-        /// does not have the required permission. </exception>
-        // -------------------------------------------------------------------
-        public virtual void GetObjectData(
-            SerializationInfo info, 
-            StreamingContext context)
-        {
-            if (Tracing.BinarySerializationSwitch.Enabled)
-                Trace.WriteLine("Serializing the fields of 'PenStyle'.");
+    // -------------------------------------------------------------------
+    /// <summary>
+    /// Populates a <see cref=
+    /// "T:System.Runtime.Serialization.SerializationInfo"></see> with 
+    /// the data needed to serialize the target object.
+    /// </summary>
+    /// <param name="info">The <see cref=
+    /// "T:System.Runtime.Serialization.SerializationInfo"></see> to 
+    /// populate with data.</param>
+    /// <param name="context">The destination (see <see cref=
+    /// "T:System.Runtime.Serialization.StreamingContext"></see>) for 
+    /// this serialization.</param>
+    /// <exception cref="T:System.Security.SecurityException">The caller 
+    /// does not have the required permission. </exception>
+    // -------------------------------------------------------------------
+    public virtual void GetObjectData(
+        SerializationInfo info,
+        StreamingContext context) {
+      if (Tracing.BinarySerializationSwitch.Enabled)
+        Trace.WriteLine("Serializing the fields of 'PenStyle'.");
 
-            info.AddValue("PenStyleVersion", penStyleVersion);
-            info.AddValue("Color", this.mColor, typeof(Color));
-            info.AddValue("Width", this.mWidth);
-            info.AddValue("DashStyle", this.mDashStyle.ToString());
-        }
-        #endregion
+      info.AddValue("PenStyleVersion", penStyleVersion);
+      info.AddValue("Color", this.mColor, typeof(Color));
+      info.AddValue("Width", this.mWidth);
+      info.AddValue("DashStyle", this.mDashStyle.ToString());
+    }
+    #endregion
 
-        #region Xml serialization
-        /// <summary>
-        /// This property is reserved, apply the <see cref="T:System.Xml.Serialization.XmlSchemaProviderAttribute"></see> to the class instead.
-        /// </summary>
-        /// <returns>
-        /// An <see cref="T:System.Xml.Schema.XmlSchema"></see> that describes the XML representation of the object that is produced by the <see cref="M:System.Xml.Serialization.IXmlSerializable.WriteXml(System.Xml.XmlWriter)"></see> method and consumed by the <see cref="M:System.Xml.Serialization.IXmlSerializable.ReadXml(System.Xml.XmlReader)"></see> method.
-        /// </returns>
-        public virtual XmlSchema GetSchema()
-        {
-            throw new NotImplementedException("The method or operation is not implemented.");
-        }
+    #region Xml serialization
+    /// <summary>
+    /// This property is reserved, apply the <see cref="T:System.Xml.Serialization.XmlSchemaProviderAttribute"></see> to the class instead.
+    /// </summary>
+    /// <returns>
+    /// An <see cref="T:System.Xml.Schema.XmlSchema"></see> that describes the XML representation of the object that is produced by the <see cref="M:System.Xml.Serialization.IXmlSerializable.WriteXml(System.Xml.XmlWriter)"></see> method and consumed by the <see cref="M:System.Xml.Serialization.IXmlSerializable.ReadXml(System.Xml.XmlReader)"></see> method.
+    /// </returns>
+    public virtual XmlSchema GetSchema() {
+      throw new NotImplementedException("The method or operation is not implemented.");
+    }
 
-        /// <summary>
-        /// Generates an object from its XML representation.
-        /// </summary>
-        /// <param name="reader">The <see cref="T:System.Xml.XmlReader"></see> stream from which the object is deserialized.</param>
-        public virtual void ReadXml(System.Xml.XmlReader reader)
-        {
-            throw new NotImplementedException("The method or operation is not implemented.");
-        }
+    /// <summary>
+    /// Generates an object from its XML representation.
+    /// </summary>
+    /// <param name="reader">The <see cref="T:System.Xml.XmlReader"></see> stream from which the object is deserialized.</param>
+    public virtual void ReadXml(System.Xml.XmlReader reader) {
+      throw new NotImplementedException("The method or operation is not implemented.");
+    }
 
-        /// <summary>
-        /// Converts an object into its XML representation.
-        /// </summary>
-        /// <param name="writer">The <see cref="T:System.Xml.XmlWriter"></see> stream to which the object is serialized.</param>
-        public virtual void WriteXml(System.Xml.XmlWriter writer)
-        {
-            throw new NotImplementedException("The method or operation is not implemented.");
-        }
-        #endregion
+    /// <summary>
+    /// Converts an object into its XML representation.
+    /// </summary>
+    /// <param name="writer">The <see cref="T:System.Xml.XmlWriter"></see> stream to which the object is serialized.</param>
+    public virtual void WriteXml(System.Xml.XmlWriter writer) {
+      throw new NotImplementedException("The method or operation is not implemented.");
+    }
+    #endregion
 
-        /// <summary>
-        /// Runs when the entire object graph has been deserialized.
-        /// </summary>
-        /// <param name="sender">The object that initiated the callback. The functionality for this parameter is not currently implemented.</param>
-        public virtual void OnDeserialization(object sender)
-        {
-            if (Tracing.BinaryDeserializationSwitch.Enabled)
-                Trace.WriteLine("IDeserializationCallback of 'PenStyle' called.");
-        }
+    /// <summary>
+    /// Runs when the entire object graph has been deserialized.
+    /// </summary>
+    /// <param name="sender">The object that initiated the callback. The functionality for this parameter is not currently implemented.</param>
+    public virtual void OnDeserialization(object sender) {
+      if (Tracing.BinaryDeserializationSwitch.Enabled)
+        Trace.WriteLine("IDeserializationCallback of 'PenStyle' called.");
     }
+  }
 }
Index: /trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.Netron/3.0.2672.12446/Netron.Diagramming.Core-3.0.2672.12446/Serialization/ShapeBase.Serialization.cs
===================================================================
--- /trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.Netron/3.0.2672.12446/Netron.Diagramming.Core-3.0.2672.12446/Serialization/ShapeBase.Serialization.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.Netron/3.0.2672.12446/Netron.Diagramming.Core-3.0.2672.12446/Serialization/ShapeBase.Serialization.cs	(revision 4068)
@@ -1,63 +1,56 @@
 using System;
-using System.Collections.Generic;
-using System.Text;
+using System.Diagnostics;
 using System.Drawing;
-using System.ComponentModel;
 using System.Runtime.Serialization;
+using System.Xml.Schema;
 using System.Xml.Serialization;
-using System.Diagnostics;
-using System.Xml.Schema;
-namespace Netron.Diagramming.Core
-{
+namespace Netron.Diagramming.Core {
+  /// <summary>
+  /// Complementary partial class related to (de)serialization.
+  /// </summary>
+  [Serializable]
+  public abstract partial class ShapeBase :
+     ISerializable,
+     IXmlSerializable,
+     IDeserializationCallback {
+    #region Deserialization constructor
+
+    // -------------------------------------------------------------------
     /// <summary>
-    /// Complementary partial class related to (de)serialization.
+    /// Deserialization constructor
     /// </summary>
-    [Serializable]
-    public abstract partial class ShapeBase :
-       ISerializable,
-       IXmlSerializable,
-       IDeserializationCallback
-    {
-        #region Deserialization constructor
+    /// <param name="info">The info.</param>
+    /// <param name="context">The context.</param>
+    // -------------------------------------------------------------------
+    protected ShapeBase(
+        SerializationInfo info,
+        StreamingContext context)
+      : base(info, context) {
+      if (Tracing.BinaryDeserializationSwitch.Enabled) {
+        Trace.WriteLine("Deserializing the fields of 'ShapeBase'.");
+      }
 
-        // -------------------------------------------------------------------
-        /// <summary>
-        /// Deserialization constructor
-        /// </summary>
-        /// <param name="info">The info.</param>
-        /// <param name="context">The context.</param>
-        // -------------------------------------------------------------------
-        protected ShapeBase(
-            SerializationInfo info,
-            StreamingContext context)
-            : base(info, context)
-        {
-            if (Tracing.BinaryDeserializationSwitch.Enabled)
-            {
-                Trace.WriteLine("Deserializing the fields of 'ShapeBase'.");
-            }
+      double version = info.GetDouble("ShapeBaseVersion");
 
-            double version = info.GetDouble("ShapeBaseVersion");
+      mConnectors = new CollectionBase<IConnector>();
 
-            mConnectors = new CollectionBase<IConnector>();
+      //transform to the new bounding rectangle
+      Transform(
+          (Rectangle)info.GetValue("Rectangle", typeof(Rectangle))
+      );
 
-            //transform to the new bounding rectangle
-            Transform(
-                (Rectangle)info.GetValue("Rectangle", typeof(Rectangle))
-            );
+      this.mConnectors = info.GetValue(
+          "Connectors",
+          typeof(CollectionBase<IConnector>)) as
+          CollectionBase<IConnector>;
 
-            this.mConnectors = info.GetValue(
-                "Connectors",
-                typeof(CollectionBase<IConnector>)) as
-                CollectionBase<IConnector>;
+      mShowConnectors = info.GetBoolean("ShowConnectors");
+      mIsFixed = info.GetBoolean("IsFixed");
+    }
 
-            mShowConnectors = info.GetBoolean("ShowConnectors");
-            mIsFixed = info.GetBoolean("IsFixed");
-        }
+    #endregion
 
-        #endregion
-
-        #region Serialization events
-        /*
+    #region Serialization events
+    /*
         [OnSerializing]
         void OnSerializing(StreamingContext context)
@@ -71,8 +64,8 @@
         }
         */
-        #endregion
+    #endregion
 
-        #region Deserialization events
-        /*
+    #region Deserialization events
+    /*
         [OnDeserializing]
         void OnDeserializing(StreamingContext context)
@@ -88,107 +81,101 @@
          }
        */
-        #endregion
+    #endregion
 
-        #region Serialization
+    #region Serialization
 
-        // -------------------------------------------------------------------
-        /// <summary>
-        /// Populates a <see cref="
-        /// T:System.Runtime.Serialization.SerializationInfo"></see> with 
-        /// the data needed to serialize the target object.
-        /// </summary>
-        /// <param name="info">The 
-        /// <see 
-        /// cref="T:System.Runtime.Serialization.SerializationInfo">
-        /// </see> to populate with data.</param>
-        /// <param name="context">The destination (see <see cref="
-        /// T:System.Runtime.Serialization.StreamingContext"></see>) 
-        /// for this serialization.</param>
-        /// <exception cref="T:System.Security.SecurityException">The 
-        /// caller does not have the required permission. </exception>
-        // -------------------------------------------------------------------
-        public override void GetObjectData(
-            SerializationInfo info,
-            StreamingContext context)
-        {
-            if (Tracing.BinarySerializationSwitch.Enabled)
-            {
-                Trace.WriteLine("Serializing the fields of 'ShapeBase'.");
-            }
+    // -------------------------------------------------------------------
+    /// <summary>
+    /// Populates a <see cref="
+    /// T:System.Runtime.Serialization.SerializationInfo"></see> with 
+    /// the data needed to serialize the target object.
+    /// </summary>
+    /// <param name="info">The 
+    /// <see 
+    /// cref="T:System.Runtime.Serialization.SerializationInfo">
+    /// </see> to populate with data.</param>
+    /// <param name="context">The destination (see <see cref="
+    /// T:System.Runtime.Serialization.StreamingContext"></see>) 
+    /// for this serialization.</param>
+    /// <exception cref="T:System.Security.SecurityException">The 
+    /// caller does not have the required permission. </exception>
+    // -------------------------------------------------------------------
+    public override void GetObjectData(
+        SerializationInfo info,
+        StreamingContext context) {
+      if (Tracing.BinarySerializationSwitch.Enabled) {
+        Trace.WriteLine("Serializing the fields of 'ShapeBase'.");
+      }
 
-            base.GetObjectData(info, context);
+      base.GetObjectData(info, context);
 
-            info.AddValue(
-                "ShapeBaseVersion", 
-                shapeBaseVersion);
+      info.AddValue(
+          "ShapeBaseVersion",
+          shapeBaseVersion);
 
-            info.AddValue(
-                "Rectangle",
-                this.Rectangle,
-                typeof(Rectangle));
+      info.AddValue(
+          "Rectangle",
+          this.Rectangle,
+          typeof(Rectangle));
 
-            info.AddValue(
-                "Connectors",
-                this.Connectors,
-                typeof(CollectionBase<IConnector>));
+      info.AddValue(
+          "Connectors",
+          this.Connectors,
+          typeof(CollectionBase<IConnector>));
 
-            info.AddValue(
-                "IsFixed",
-                mIsFixed);
+      info.AddValue(
+          "IsFixed",
+          mIsFixed);
 
-            info.AddValue(
-                "ShowConnectors",
-                mShowConnectors);
+      info.AddValue(
+          "ShowConnectors",
+          mShowConnectors);
 
-        }
-        #endregion
+    }
+    #endregion
 
-        #region Xml serialization
-        /// <summary>
-        /// This property is reserved, apply the <see cref="T:System.Xml.Serialization.XmlSchemaProviderAttribute"></see> to the class instead.
-        /// </summary>
-        /// <returns>
-        /// An <see cref="T:System.Xml.Schema.XmlSchema"></see> that describes the XML representation of the object that is produced by the <see cref="M:System.Xml.Serialization.IXmlSerializable.WriteXml(System.Xml.XmlWriter)"></see> method and consumed by the <see cref="M:System.Xml.Serialization.IXmlSerializable.ReadXml(System.Xml.XmlReader)"></see> method.
-        /// </returns>
-        public override XmlSchema GetSchema()
-        {
-            throw new NotImplementedException("The method or operation is not implemented.");
-        }
+    #region Xml serialization
+    /// <summary>
+    /// This property is reserved, apply the <see cref="T:System.Xml.Serialization.XmlSchemaProviderAttribute"></see> to the class instead.
+    /// </summary>
+    /// <returns>
+    /// An <see cref="T:System.Xml.Schema.XmlSchema"></see> that describes the XML representation of the object that is produced by the <see cref="M:System.Xml.Serialization.IXmlSerializable.WriteXml(System.Xml.XmlWriter)"></see> method and consumed by the <see cref="M:System.Xml.Serialization.IXmlSerializable.ReadXml(System.Xml.XmlReader)"></see> method.
+    /// </returns>
+    public override XmlSchema GetSchema() {
+      throw new NotImplementedException("The method or operation is not implemented.");
+    }
 
-        /// <summary>
-        /// Generates an object from its XML representation.
-        /// </summary>
-        /// <param name="reader">The <see cref="T:System.Xml.XmlReader"></see> stream from which the object is deserialized.</param>
-        public override void ReadXml(System.Xml.XmlReader reader)
-        {
-            throw new NotImplementedException("The method or operation is not implemented.");
-        }
+    /// <summary>
+    /// Generates an object from its XML representation.
+    /// </summary>
+    /// <param name="reader">The <see cref="T:System.Xml.XmlReader"></see> stream from which the object is deserialized.</param>
+    public override void ReadXml(System.Xml.XmlReader reader) {
+      throw new NotImplementedException("The method or operation is not implemented.");
+    }
 
-        /// <summary>
-        /// Converts an object into its XML representation.
-        /// </summary>
-        /// <param name="writer">The <see cref="T:System.Xml.XmlWriter"></see> stream to which the object is serialized.</param>
-        public override void WriteXml(System.Xml.XmlWriter writer)
-        {
-            throw new NotImplementedException("The method or operation is not implemented.");
-        }
-        #endregion
+    /// <summary>
+    /// Converts an object into its XML representation.
+    /// </summary>
+    /// <param name="writer">The <see cref="T:System.Xml.XmlWriter"></see> stream to which the object is serialized.</param>
+    public override void WriteXml(System.Xml.XmlWriter writer) {
+      throw new NotImplementedException("The method or operation is not implemented.");
+    }
+    #endregion
 
-        #region IDeserializationCallback Members
+    #region IDeserializationCallback Members
 
-        /// <summary>
-        /// Runs when the entire object graph has been deserialized.
-        /// </summary>
-        /// <param name="sender">The object that initiated the callback. The functionality for this parameter is not currently implemented.</param>
-        public override void OnDeserialization(object sender)
-        {
-            base.OnDeserialization(sender);
+    /// <summary>
+    /// Runs when the entire object graph has been deserialized.
+    /// </summary>
+    /// <param name="sender">The object that initiated the callback. The functionality for this parameter is not currently implemented.</param>
+    public override void OnDeserialization(object sender) {
+      base.OnDeserialization(sender);
 
 
-            if (Tracing.BinaryDeserializationSwitch.Enabled)
-                Trace.WriteLine("IDeserializationCallback of 'ShapeBase' called.");
-        }
+      if (Tracing.BinaryDeserializationSwitch.Enabled)
+        Trace.WriteLine("IDeserializationCallback of 'ShapeBase' called.");
+    }
 
-        #endregion
-    }
+    #endregion
+  }
 }
Index: /trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.Netron/3.0.2672.12446/Netron.Diagramming.Core-3.0.2672.12446/Serialization/ShapeMaterialBase.Serialization.cs
===================================================================
--- /trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.Netron/3.0.2672.12446/Netron.Diagramming.Core-3.0.2672.12446/Serialization/ShapeMaterialBase.Serialization.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.Netron/3.0.2672.12446/Netron.Diagramming.Core-3.0.2672.12446/Serialization/ShapeMaterialBase.Serialization.cs	(revision 4068)
@@ -1,44 +1,38 @@
 using System;
-using System.Collections.Generic;
-using System.Text;
+using System.Diagnostics;
 using System.Drawing;
-using System.ComponentModel;
 using System.Runtime.Serialization;
+using System.Xml.Schema;
 using System.Xml.Serialization;
-using System.Diagnostics;
-using System.Xml.Schema;
-namespace Netron.Diagramming.Core
-{
+namespace Netron.Diagramming.Core {
+  /// <summary>
+  /// Complementary partial class related to (de)serialization.
+  /// </summary>
+  [Serializable]
+  public partial class ShapeMaterialBase : ISerializable, IXmlSerializable, IDeserializationCallback {
+    #region Deserialization constructor
     /// <summary>
-    /// Complementary partial class related to (de)serialization.
+    /// Deserialization constructor
     /// </summary>
-   [Serializable]
-    public partial class ShapeMaterialBase : ISerializable, IXmlSerializable, IDeserializationCallback
-    {
-        #region Deserialization constructor
-        /// <summary>
-        /// Deserialization constructor
-        /// </summary>
-        /// <param name="info">The info.</param>
-        /// <param name="context">The context.</param>
-        protected ShapeMaterialBase(SerializationInfo info, StreamingContext context)           
-        {
+    /// <param name="info">The info.</param>
+    /// <param name="context">The context.</param>
+    protected ShapeMaterialBase(SerializationInfo info, StreamingContext context) {
 
-            if(Tracing.BinaryDeserializationSwitch.Enabled)
-                Trace.WriteLine("Deserializing the fields of 'ShapeMaterialBase'.");
+      if (Tracing.BinaryDeserializationSwitch.Enabled)
+        Trace.WriteLine("Deserializing the fields of 'ShapeMaterialBase'.");
 
-            string version = info.GetString("ShapeMaterialBaseVersion");
-            this.mGliding = info.GetBoolean("Gliding");
-            this.mResizable = info.GetBoolean("Resizable");
-            this.Transform(
-                  (Rectangle) info.GetValue("Rectangle", typeof(Rectangle))
-                );                                                      
-            this.mVisible = info.GetBoolean("Visible");
-            
-        }
-        #endregion
+      string version = info.GetString("ShapeMaterialBaseVersion");
+      this.mGliding = info.GetBoolean("Gliding");
+      this.mResizable = info.GetBoolean("Resizable");
+      this.Transform(
+            (Rectangle)info.GetValue("Rectangle", typeof(Rectangle))
+          );
+      this.mVisible = info.GetBoolean("Visible");
 
-        #region Serialization events
-       /*
+    }
+    #endregion
+
+    #region Serialization events
+    /*
         [OnSerializing]
         void OnSerializing(StreamingContext context)
@@ -52,8 +46,8 @@
         }
         */
-        #endregion
+    #endregion
 
-        #region Deserialization events
-       /*
+    #region Deserialization events
+    /*
         [OnDeserializing]
         void OnDeserializing(StreamingContext context)
@@ -69,67 +63,62 @@
         }
        */
-        #endregion
+    #endregion
 
-        #region Serialization
-        /// <summary>
-        /// Populates a <see cref="T:System.Runtime.Serialization.SerializationInfo"></see> with the data needed to serialize the target object.
-        /// </summary>
-        /// <param name="info">The <see cref="T:System.Runtime.Serialization.SerializationInfo"></see> to populate with data.</param>
-        /// <param name="context">The destination (see <see cref="T:System.Runtime.Serialization.StreamingContext"></see>) for this serialization.</param>
-        /// <exception cref="T:System.Security.SecurityException">The caller does not have the required permission. </exception>
-        public virtual void GetObjectData(SerializationInfo info, StreamingContext context)
-        {
-            if(Tracing.BinarySerializationSwitch.Enabled)
-                Trace.WriteLine("Serializing the fields of 'ShapeMaterialBase'.");
+    #region Serialization
+    /// <summary>
+    /// Populates a <see cref="T:System.Runtime.Serialization.SerializationInfo"></see> with the data needed to serialize the target object.
+    /// </summary>
+    /// <param name="info">The <see cref="T:System.Runtime.Serialization.SerializationInfo"></see> to populate with data.</param>
+    /// <param name="context">The destination (see <see cref="T:System.Runtime.Serialization.StreamingContext"></see>) for this serialization.</param>
+    /// <exception cref="T:System.Security.SecurityException">The caller does not have the required permission. </exception>
+    public virtual void GetObjectData(SerializationInfo info, StreamingContext context) {
+      if (Tracing.BinarySerializationSwitch.Enabled)
+        Trace.WriteLine("Serializing the fields of 'ShapeMaterialBase'.");
 
-            info.AddValue("ShapeMaterialBaseVersion", shapeMaterialBaseVersion);
-            info.AddValue("Gliding", this.Gliding);
-            info.AddValue("Resizable", this.Resizable);
-            info.AddValue("Rectangle", this.Rectangle, typeof(Rectangle));
-            info.AddValue("Visible", this.Visible);
-        }
-        #endregion
+      info.AddValue("ShapeMaterialBaseVersion", shapeMaterialBaseVersion);
+      info.AddValue("Gliding", this.Gliding);
+      info.AddValue("Resizable", this.Resizable);
+      info.AddValue("Rectangle", this.Rectangle, typeof(Rectangle));
+      info.AddValue("Visible", this.Visible);
+    }
+    #endregion
 
-        #region Xml serialization
-        /// <summary>
-        /// This property is reserved, apply the <see cref="T:System.Xml.Serialization.XmlSchemaProviderAttribute"></see> to the class instead.
-        /// </summary>
-        /// <returns>
-        /// An <see cref="T:System.Xml.Schema.XmlSchema"></see> that describes the XML representation of the object that is produced by the <see cref="M:System.Xml.Serialization.IXmlSerializable.WriteXml(System.Xml.XmlWriter)"></see> method and consumed by the <see cref="M:System.Xml.Serialization.IXmlSerializable.ReadXml(System.Xml.XmlReader)"></see> method.
-        /// </returns>
-        public virtual XmlSchema GetSchema()
-        {
-            throw new NotImplementedException("The method or operation is not implemented.");
-        }
+    #region Xml serialization
+    /// <summary>
+    /// This property is reserved, apply the <see cref="T:System.Xml.Serialization.XmlSchemaProviderAttribute"></see> to the class instead.
+    /// </summary>
+    /// <returns>
+    /// An <see cref="T:System.Xml.Schema.XmlSchema"></see> that describes the XML representation of the object that is produced by the <see cref="M:System.Xml.Serialization.IXmlSerializable.WriteXml(System.Xml.XmlWriter)"></see> method and consumed by the <see cref="M:System.Xml.Serialization.IXmlSerializable.ReadXml(System.Xml.XmlReader)"></see> method.
+    /// </returns>
+    public virtual XmlSchema GetSchema() {
+      throw new NotImplementedException("The method or operation is not implemented.");
+    }
 
-        /// <summary>
-        /// Generates an object from its XML representation.
-        /// </summary>
-        /// <param name="reader">The <see cref="T:System.Xml.XmlReader"></see> stream from which the object is deserialized.</param>
-        public virtual void ReadXml(System.Xml.XmlReader reader)
-        {
-            throw new NotImplementedException("The method or operation is not implemented.");
-        }
+    /// <summary>
+    /// Generates an object from its XML representation.
+    /// </summary>
+    /// <param name="reader">The <see cref="T:System.Xml.XmlReader"></see> stream from which the object is deserialized.</param>
+    public virtual void ReadXml(System.Xml.XmlReader reader) {
+      throw new NotImplementedException("The method or operation is not implemented.");
+    }
 
-        /// <summary>
-        /// Converts an object into its XML representation.
-        /// </summary>
-        /// <param name="writer">The <see cref="T:System.Xml.XmlWriter"></see> stream to which the object is serialized.</param>
-        public virtual void WriteXml(System.Xml.XmlWriter writer)
-        {
-            throw new NotImplementedException("The method or operation is not implemented.");
-        }
-        #endregion
+    /// <summary>
+    /// Converts an object into its XML representation.
+    /// </summary>
+    /// <param name="writer">The <see cref="T:System.Xml.XmlWriter"></see> stream to which the object is serialized.</param>
+    public virtual void WriteXml(System.Xml.XmlWriter writer) {
+      throw new NotImplementedException("The method or operation is not implemented.");
+    }
+    #endregion
 
-        /// <summary>
-        /// Runs when the entire object graph has been deserialized.
-        /// </summary>
-        /// <param name="sender">The object that initiated the callback. The functionality for this parameter is not currently implemented.</param>
-        public virtual void OnDeserialization(object sender)
-        {
-            
-            if(Tracing.BinaryDeserializationSwitch.Enabled)
-                Trace.WriteLine("IDeserializationCallback of 'ShapeMaterialBase' called.");
-        }
+    /// <summary>
+    /// Runs when the entire object graph has been deserialized.
+    /// </summary>
+    /// <param name="sender">The object that initiated the callback. The functionality for this parameter is not currently implemented.</param>
+    public virtual void OnDeserialization(object sender) {
+
+      if (Tracing.BinaryDeserializationSwitch.Enabled)
+        Trace.WriteLine("IDeserializationCallback of 'ShapeMaterialBase' called.");
     }
+  }
 }
Index: /trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.Netron/3.0.2672.12446/Netron.Diagramming.Core-3.0.2672.12446/Serialization/SimpleConnectorPaintStyle.Serialization.cs
===================================================================
--- /trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.Netron/3.0.2672.12446/Netron.Diagramming.Core-3.0.2672.12446/Serialization/SimpleConnectorPaintStyle.Serialization.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.Netron/3.0.2672.12446/Netron.Diagramming.Core-3.0.2672.12446/Serialization/SimpleConnectorPaintStyle.Serialization.cs	(revision 4068)
@@ -1,53 +1,44 @@
 using System;
-using System.Collections.Generic;
-using System.Text;
+using System.Diagnostics;
+using System.Drawing;
+using System.Runtime.Serialization;
+using System.Xml.Schema;
+using System.Xml.Serialization;
 
-using System.Drawing;
-using System.ComponentModel;
-using System.Runtime.Serialization;
-using System.Xml.Serialization;
-using System.Diagnostics;
-using System.Xml.Schema;
-using System.Drawing.Drawing2D;
+namespace Netron.Diagramming.Core {
+  /// <summary>
+  /// Complementary partial class related to (de)serialization of a
+  /// SolidPaintStyle.
+  /// </summary>
+  [Serializable]
+  public partial class SimpleConnectorPaintStyle :
+     ISerializable,
+     IXmlSerializable,
+     IDeserializationCallback {
+    #region Deserialization constructor
+    /// <summary>
+    /// Deserialization constructor
+    /// </summary>
+    /// <param name="info">The info.</param>
+    /// <param name="context">The context.</param>
+    protected SimpleConnectorPaintStyle(
+        SerializationInfo info,
+        StreamingContext context) {
 
-namespace Netron.Diagramming.Core
-{
-    /// <summary>
-    /// Complementary partial class related to (de)serialization of a
-    /// SolidPaintStyle.
-    /// </summary>
-    [Serializable]
-    public partial class SimpleConnectorPaintStyle :
-       ISerializable,
-       IXmlSerializable,
-       IDeserializationCallback
-    {
-        #region Deserialization constructor
-        /// <summary>
-        /// Deserialization constructor
-        /// </summary>
-        /// <param name="info">The info.</param>
-        /// <param name="context">The context.</param>
-        protected SimpleConnectorPaintStyle(
-            SerializationInfo info, 
-            StreamingContext context)
-        {
+      if (Tracing.BinaryDeserializationSwitch.Enabled) {
+        Trace.WriteLine(
+            "Deserializing the fields of " +
+            "'SimpleConnectorPaintStyle'.");
+      }
 
-            if (Tracing.BinaryDeserializationSwitch.Enabled)
-            {
-                Trace.WriteLine(
-                    "Deserializing the fields of " +
-                    "'SimpleConnectorPaintStyle'.");
-            }
+      double version =
+          info.GetDouble("SimpleConnectorPaintStyleVersion");
 
-            double version = 
-                info.GetDouble("SimpleConnectorPaintStyleVersion");
+      mSolidColor = (Color)info.GetValue("SolidColor", typeof(Color));
+    }
+    #endregion
 
-            mSolidColor = (Color)info.GetValue("SolidColor", typeof(Color));
-        }
-        #endregion
-
-        #region Serialization events
-        /*
+    #region Serialization events
+    /*
         [OnSerializing]
         void OnSerializing(StreamingContext context)
@@ -61,8 +52,8 @@
         }
         */
-        #endregion
+    #endregion
 
-        #region Deserialization events
-        /*
+    #region Deserialization events
+    /*
         [OnDeserializing]
         void OnDeserializing(StreamingContext context)
@@ -78,73 +69,67 @@
         }
        */
-        #endregion
+    #endregion
 
-        #region Serialization
-        /// <summary>
-        /// Populates a <see cref="T:System.Runtime.Serialization.SerializationInfo"></see> with the data needed to serialize the target object.
-        /// </summary>
-        /// <param name="info">The <see cref="T:System.Runtime.Serialization.SerializationInfo"></see> to populate with data.</param>
-        /// <param name="context">The destination (see <see cref="T:System.Runtime.Serialization.StreamingContext"></see>) for this serialization.</param>
-        /// <exception cref="T:System.Security.SecurityException">The caller does not have the required permission. </exception>
-        public void GetObjectData(
-            SerializationInfo info, 
-            StreamingContext context)
-        {
-            if (Tracing.BinarySerializationSwitch.Enabled)
-                Trace.WriteLine("Serializing the fields of " +
-                    "'SimpleConnectorPaintStyle'.");
+    #region Serialization
+    /// <summary>
+    /// Populates a <see cref="T:System.Runtime.Serialization.SerializationInfo"></see> with the data needed to serialize the target object.
+    /// </summary>
+    /// <param name="info">The <see cref="T:System.Runtime.Serialization.SerializationInfo"></see> to populate with data.</param>
+    /// <param name="context">The destination (see <see cref="T:System.Runtime.Serialization.StreamingContext"></see>) for this serialization.</param>
+    /// <exception cref="T:System.Security.SecurityException">The caller does not have the required permission. </exception>
+    public void GetObjectData(
+        SerializationInfo info,
+        StreamingContext context) {
+      if (Tracing.BinarySerializationSwitch.Enabled)
+        Trace.WriteLine("Serializing the fields of " +
+            "'SimpleConnectorPaintStyle'.");
 
-            info.AddValue(
-                "SimpleConnectorPaintStyleVersion",
-                simpleConnectorPaintStyleVersion);
+      info.AddValue(
+          "SimpleConnectorPaintStyleVersion",
+          simpleConnectorPaintStyleVersion);
 
-            info.AddValue("SolidColor", this.mSolidColor, typeof(Color));
-        }
-        #endregion
+      info.AddValue("SolidColor", this.mSolidColor, typeof(Color));
+    }
+    #endregion
 
-        #region Xml serialization
-        /// <summary>
-        /// This property is reserved, apply the <see cref="T:System.Xml.Serialization.XmlSchemaProviderAttribute"></see> to the class instead.
-        /// </summary>
-        /// <returns>
-        /// An <see cref="T:System.Xml.Schema.XmlSchema"></see> that describes the XML representation of the object that is produced by the <see cref="M:System.Xml.Serialization.IXmlSerializable.WriteXml(System.Xml.XmlWriter)"></see> method and consumed by the <see cref="M:System.Xml.Serialization.IXmlSerializable.ReadXml(System.Xml.XmlReader)"></see> method.
-        /// </returns>
-        public XmlSchema GetSchema()
-        {
-            throw new NotImplementedException("The method or operation is not implemented.");
-        }
+    #region Xml serialization
+    /// <summary>
+    /// This property is reserved, apply the <see cref="T:System.Xml.Serialization.XmlSchemaProviderAttribute"></see> to the class instead.
+    /// </summary>
+    /// <returns>
+    /// An <see cref="T:System.Xml.Schema.XmlSchema"></see> that describes the XML representation of the object that is produced by the <see cref="M:System.Xml.Serialization.IXmlSerializable.WriteXml(System.Xml.XmlWriter)"></see> method and consumed by the <see cref="M:System.Xml.Serialization.IXmlSerializable.ReadXml(System.Xml.XmlReader)"></see> method.
+    /// </returns>
+    public XmlSchema GetSchema() {
+      throw new NotImplementedException("The method or operation is not implemented.");
+    }
 
-        /// <summary>
-        /// Generates an object from its XML representation.
-        /// </summary>
-        /// <param name="reader">The <see cref="T:System.Xml.XmlReader"></see> stream from which the object is deserialized.</param>
-        public void ReadXml(System.Xml.XmlReader reader)
-        {
-            throw new NotImplementedException("The method or operation is not implemented.");
-        }
+    /// <summary>
+    /// Generates an object from its XML representation.
+    /// </summary>
+    /// <param name="reader">The <see cref="T:System.Xml.XmlReader"></see> stream from which the object is deserialized.</param>
+    public void ReadXml(System.Xml.XmlReader reader) {
+      throw new NotImplementedException("The method or operation is not implemented.");
+    }
 
-        /// <summary>
-        /// Converts an object into its XML representation.
-        /// </summary>
-        /// <param name="writer">The <see cref="T:System.Xml.XmlWriter"></see> stream to which the object is serialized.</param>
-        public void WriteXml(System.Xml.XmlWriter writer)
-        {
-            throw new NotImplementedException("The method or operation is not implemented.");
-        }
-        #endregion
+    /// <summary>
+    /// Converts an object into its XML representation.
+    /// </summary>
+    /// <param name="writer">The <see cref="T:System.Xml.XmlWriter"></see> stream to which the object is serialized.</param>
+    public void WriteXml(System.Xml.XmlWriter writer) {
+      throw new NotImplementedException("The method or operation is not implemented.");
+    }
+    #endregion
 
-        /// <summary>
-        /// Runs when the entire object graph has been deserialized.
-        /// </summary>
-        /// <param name="sender">The object that initiated the callback. The functionality for this parameter is not currently implemented.</param>
-        public void OnDeserialization(object sender)
-        {
-            if (Tracing.BinaryDeserializationSwitch.Enabled)
-            {
-                Trace.WriteLine(
-                    "IDeserializationCallback of " +
-                    "'SimpleConnectorPaintStyle' called.");
-            }
-        }
+    /// <summary>
+    /// Runs when the entire object graph has been deserialized.
+    /// </summary>
+    /// <param name="sender">The object that initiated the callback. The functionality for this parameter is not currently implemented.</param>
+    public void OnDeserialization(object sender) {
+      if (Tracing.BinaryDeserializationSwitch.Enabled) {
+        Trace.WriteLine(
+            "IDeserializationCallback of " +
+            "'SimpleConnectorPaintStyle' called.");
+      }
     }
+  }
 }
Index: /trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.Netron/3.0.2672.12446/Netron.Diagramming.Core-3.0.2672.12446/Serialization/SimpleEllipse.Serialization.cs
===================================================================
--- /trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.Netron/3.0.2672.12446/Netron.Diagramming.Core-3.0.2672.12446/Serialization/SimpleEllipse.Serialization.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.Netron/3.0.2672.12446/Netron.Diagramming.Core-3.0.2672.12446/Serialization/SimpleEllipse.Serialization.cs	(revision 4068)
@@ -1,37 +1,30 @@
 using System;
-using System.Collections.Generic;
-using System.Text;
-using System.Drawing;
-using System.ComponentModel;
+using System.Diagnostics;
 using System.Runtime.Serialization;
+using System.Xml.Schema;
 using System.Xml.Serialization;
-using System.Diagnostics;
-using System.Xml.Schema;
-namespace Netron.Diagramming.Core
-{
+namespace Netron.Diagramming.Core {
+  /// <summary>
+  /// Complementary partial class related to (de)serialization.
+  /// </summary>
+  [Serializable]
+  public partial class SimpleEllipse : ISerializable, IXmlSerializable, IDeserializationCallback {
+    #region Deserialization constructor
     /// <summary>
-    /// Complementary partial class related to (de)serialization.
+    /// Deserialization constructor
     /// </summary>
-   [Serializable]
-    public partial class SimpleEllipse : ISerializable, IXmlSerializable, IDeserializationCallback
-    {
-        #region Deserialization constructor
-        /// <summary>
-        /// Deserialization constructor
-        /// </summary>
-        /// <param name="info">The info.</param>
-        /// <param name="context">The context.</param>
-        protected SimpleEllipse(SerializationInfo info, StreamingContext context)
-            : base(info, context)
-        {
-            if(Tracing.BinaryDeserializationSwitch.Enabled)
-                Trace.WriteLine("Deserializing the fields of 'SimpleEllipse'.");
+    /// <param name="info">The info.</param>
+    /// <param name="context">The context.</param>
+    protected SimpleEllipse(SerializationInfo info, StreamingContext context)
+      : base(info, context) {
+      if (Tracing.BinaryDeserializationSwitch.Enabled)
+        Trace.WriteLine("Deserializing the fields of 'SimpleEllipse'.");
 
-            double version = info.GetDouble("SimpleEllipseVersion");
-        }
-        #endregion
+      double version = info.GetDouble("SimpleEllipseVersion");
+    }
+    #endregion
 
-        #region Serialization events
-       /*
+    #region Serialization events
+    /*
         [OnSerializing]
         void OnSerializing(StreamingContext context)
@@ -47,8 +40,8 @@
         }
         */
-        #endregion
+    #endregion
 
-        #region Deserialization events
-       /*
+    #region Deserialization events
+    /*
         [OnDeserializing]      
         void OnDeserializing(StreamingContext context)
@@ -64,68 +57,63 @@
          }
        */
-        #endregion
+    #endregion
 
-        #region Serialization
-        /// <summary>
-        /// Populates a <see cref="T:System.Runtime.Serialization.SerializationInfo"></see> with the data needed to serialize the target object.
-        /// </summary>
-        /// <param name="info">The <see cref="T:System.Runtime.Serialization.SerializationInfo"></see> to populate with data.</param>
-        /// <param name="context">The destination (see <see cref="T:System.Runtime.Serialization.StreamingContext"></see>) for this serialization.</param>
-        /// <exception cref="T:System.Security.SecurityException">The caller does not have the required permission. </exception>
-        public override void GetObjectData(SerializationInfo info, StreamingContext context) 
-        {
-            if(Tracing.BinarySerializationSwitch.Enabled)
-                Trace.WriteLine("Serializing the fields of 'SimpleEllipse'.");
-            base.GetObjectData(info, context);
+    #region Serialization
+    /// <summary>
+    /// Populates a <see cref="T:System.Runtime.Serialization.SerializationInfo"></see> with the data needed to serialize the target object.
+    /// </summary>
+    /// <param name="info">The <see cref="T:System.Runtime.Serialization.SerializationInfo"></see> to populate with data.</param>
+    /// <param name="context">The destination (see <see cref="T:System.Runtime.Serialization.StreamingContext"></see>) for this serialization.</param>
+    /// <exception cref="T:System.Security.SecurityException">The caller does not have the required permission. </exception>
+    public override void GetObjectData(SerializationInfo info, StreamingContext context) {
+      if (Tracing.BinarySerializationSwitch.Enabled)
+        Trace.WriteLine("Serializing the fields of 'SimpleEllipse'.");
+      base.GetObjectData(info, context);
 
-            info.AddValue("SimpleEllipseVersion", simpleEllipseVersion);
-        }
-        #endregion
+      info.AddValue("SimpleEllipseVersion", simpleEllipseVersion);
+    }
+    #endregion
 
-        #region Xml serialization
-        /// <summary>
-        /// This property is reserved, apply the <see cref="T:System.Xml.Serialization.XmlSchemaProviderAttribute"></see> to the class instead.
-        /// </summary>
-        /// <returns>
-        /// An <see cref="T:System.Xml.Schema.XmlSchema"></see> that describes the XML representation of the object that is produced by the <see cref="M:System.Xml.Serialization.IXmlSerializable.WriteXml(System.Xml.XmlWriter)"></see> method and consumed by the <see cref="M:System.Xml.Serialization.IXmlSerializable.ReadXml(System.Xml.XmlReader)"></see> method.
-        /// </returns>
-        public override XmlSchema GetSchema()
-        {
-            throw new NotImplementedException("The method or operation is not implemented.");
-        }
+    #region Xml serialization
+    /// <summary>
+    /// This property is reserved, apply the <see cref="T:System.Xml.Serialization.XmlSchemaProviderAttribute"></see> to the class instead.
+    /// </summary>
+    /// <returns>
+    /// An <see cref="T:System.Xml.Schema.XmlSchema"></see> that describes the XML representation of the object that is produced by the <see cref="M:System.Xml.Serialization.IXmlSerializable.WriteXml(System.Xml.XmlWriter)"></see> method and consumed by the <see cref="M:System.Xml.Serialization.IXmlSerializable.ReadXml(System.Xml.XmlReader)"></see> method.
+    /// </returns>
+    public override XmlSchema GetSchema() {
+      throw new NotImplementedException("The method or operation is not implemented.");
+    }
 
-        /// <summary>
-        /// Generates an object from its XML representation.
-        /// </summary>
-        /// <param name="reader">The <see cref="T:System.Xml.XmlReader"></see> stream from which the object is deserialized.</param>
-        public override void ReadXml(System.Xml.XmlReader reader)
-        {
-            throw new NotImplementedException("The method or operation is not implemented.");
-        }
+    /// <summary>
+    /// Generates an object from its XML representation.
+    /// </summary>
+    /// <param name="reader">The <see cref="T:System.Xml.XmlReader"></see> stream from which the object is deserialized.</param>
+    public override void ReadXml(System.Xml.XmlReader reader) {
+      throw new NotImplementedException("The method or operation is not implemented.");
+    }
 
-        /// <summary>
-        /// Converts an object into its XML representation.
-        /// </summary>
-        /// <param name="writer">The <see cref="T:System.Xml.XmlWriter"></see> stream to which the object is serialized.</param>
-        public override void WriteXml(System.Xml.XmlWriter writer)
-        {
-            throw new NotImplementedException("The method or operation is not implemented.");
-        }
-        #endregion
+    /// <summary>
+    /// Converts an object into its XML representation.
+    /// </summary>
+    /// <param name="writer">The <see cref="T:System.Xml.XmlWriter"></see> stream to which the object is serialized.</param>
+    public override void WriteXml(System.Xml.XmlWriter writer) {
+      throw new NotImplementedException("The method or operation is not implemented.");
+    }
+    #endregion
 
 
 
-        /// <summary>
-        /// Runs when the entire object graph has been deserialized.
-        /// </summary>
-        /// <param name="sender">The object that initiated the callback. The functionality for this parameter is not currently implemented.</param>
-        public override void  OnDeserialization(object sender)
-        {
-            base.OnDeserialization(sender);
-            if(Tracing.BinaryDeserializationSwitch.Enabled)
-                Trace.WriteLine("IDeserializationCallback of 'SimpleEllipse' called.");
-            
+    /// <summary>
+    /// Runs when the entire object graph has been deserialized.
+    /// </summary>
+    /// <param name="sender">The object that initiated the callback. The functionality for this parameter is not currently implemented.</param>
+    public override void OnDeserialization(object sender) {
+      base.OnDeserialization(sender);
+      if (Tracing.BinaryDeserializationSwitch.Enabled)
+        Trace.WriteLine("IDeserializationCallback of 'SimpleEllipse' called.");
 
-        }
+
     }
+  }
 }
Index: /trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.Netron/3.0.2672.12446/Netron.Diagramming.Core-3.0.2672.12446/Serialization/SimpleRectangle.Serialization.cs
===================================================================
--- /trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.Netron/3.0.2672.12446/Netron.Diagramming.Core-3.0.2672.12446/Serialization/SimpleRectangle.Serialization.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.Netron/3.0.2672.12446/Netron.Diagramming.Core-3.0.2672.12446/Serialization/SimpleRectangle.Serialization.cs	(revision 4068)
@@ -1,37 +1,30 @@
 using System;
-using System.Collections.Generic;
-using System.Text;
-using System.Drawing;
-using System.ComponentModel;
+using System.Diagnostics;
 using System.Runtime.Serialization;
+using System.Xml.Schema;
 using System.Xml.Serialization;
-using System.Diagnostics;
-using System.Xml.Schema;
-namespace Netron.Diagramming.Core
-{
+namespace Netron.Diagramming.Core {
+  /// <summary>
+  /// Complementary partial class related to (de)serialization.
+  /// </summary>
+  [Serializable]
+  public partial class SimpleRectangle : ISerializable, IXmlSerializable, IDeserializationCallback {
+    #region Deserialization constructor
     /// <summary>
-    /// Complementary partial class related to (de)serialization.
+    /// Deserialization constructor
     /// </summary>
-   [Serializable]
-    public partial class SimpleRectangle : ISerializable, IXmlSerializable, IDeserializationCallback
-    {
-        #region Deserialization constructor
-        /// <summary>
-        /// Deserialization constructor
-        /// </summary>
-        /// <param name="info">The info.</param>
-        /// <param name="context">The context.</param>
-        protected SimpleRectangle(SerializationInfo info, StreamingContext context)
-            : base(info, context)
-        {
-            if(Tracing.BinaryDeserializationSwitch.Enabled)
-                Trace.WriteLine("Deserializing the fields of 'SimpleRectangle'.");
+    /// <param name="info">The info.</param>
+    /// <param name="context">The context.</param>
+    protected SimpleRectangle(SerializationInfo info, StreamingContext context)
+      : base(info, context) {
+      if (Tracing.BinaryDeserializationSwitch.Enabled)
+        Trace.WriteLine("Deserializing the fields of 'SimpleRectangle'.");
 
-            double version = info.GetDouble("SimpleRectangleVersion");
-        }
-        #endregion
+      double version = info.GetDouble("SimpleRectangleVersion");
+    }
+    #endregion
 
-        #region Serialization events
-       /*
+    #region Serialization events
+    /*
         [OnSerializing]
         void OnSerializing(StreamingContext context)
@@ -47,8 +40,8 @@
         }
         */
-        #endregion
+    #endregion
 
-        #region Deserialization events
-       /*
+    #region Deserialization events
+    /*
         [OnDeserializing]      
         void OnDeserializing(StreamingContext context)
@@ -64,68 +57,63 @@
          }
        */
-        #endregion
+    #endregion
 
-        #region Serialization
-        /// <summary>
-        /// Populates a <see cref="T:System.Runtime.Serialization.SerializationInfo"></see> with the data needed to serialize the target object.
-        /// </summary>
-        /// <param name="info">The <see cref="T:System.Runtime.Serialization.SerializationInfo"></see> to populate with data.</param>
-        /// <param name="context">The destination (see <see cref="T:System.Runtime.Serialization.StreamingContext"></see>) for this serialization.</param>
-        /// <exception cref="T:System.Security.SecurityException">The caller does not have the required permission. </exception>
-        public override void GetObjectData(SerializationInfo info, StreamingContext context) 
-        {
-            if(Tracing.BinarySerializationSwitch.Enabled)
-                Trace.WriteLine("Serializing the fields of 'SimpleRectangle'.");
-            base.GetObjectData(info, context);
+    #region Serialization
+    /// <summary>
+    /// Populates a <see cref="T:System.Runtime.Serialization.SerializationInfo"></see> with the data needed to serialize the target object.
+    /// </summary>
+    /// <param name="info">The <see cref="T:System.Runtime.Serialization.SerializationInfo"></see> to populate with data.</param>
+    /// <param name="context">The destination (see <see cref="T:System.Runtime.Serialization.StreamingContext"></see>) for this serialization.</param>
+    /// <exception cref="T:System.Security.SecurityException">The caller does not have the required permission. </exception>
+    public override void GetObjectData(SerializationInfo info, StreamingContext context) {
+      if (Tracing.BinarySerializationSwitch.Enabled)
+        Trace.WriteLine("Serializing the fields of 'SimpleRectangle'.");
+      base.GetObjectData(info, context);
 
-            info.AddValue("SimpleRectangleVersion", simpleRectangleVersion);
-        }
-        #endregion
+      info.AddValue("SimpleRectangleVersion", simpleRectangleVersion);
+    }
+    #endregion
 
-        #region Xml serialization
-        /// <summary>
-        /// This property is reserved, apply the <see cref="T:System.Xml.Serialization.XmlSchemaProviderAttribute"></see> to the class instead.
-        /// </summary>
-        /// <returns>
-        /// An <see cref="T:System.Xml.Schema.XmlSchema"></see> that describes the XML representation of the object that is produced by the <see cref="M:System.Xml.Serialization.IXmlSerializable.WriteXml(System.Xml.XmlWriter)"></see> method and consumed by the <see cref="M:System.Xml.Serialization.IXmlSerializable.ReadXml(System.Xml.XmlReader)"></see> method.
-        /// </returns>
-        public override XmlSchema GetSchema()
-        {
-            throw new NotImplementedException("The method or operation is not implemented.");
-        }
+    #region Xml serialization
+    /// <summary>
+    /// This property is reserved, apply the <see cref="T:System.Xml.Serialization.XmlSchemaProviderAttribute"></see> to the class instead.
+    /// </summary>
+    /// <returns>
+    /// An <see cref="T:System.Xml.Schema.XmlSchema"></see> that describes the XML representation of the object that is produced by the <see cref="M:System.Xml.Serialization.IXmlSerializable.WriteXml(System.Xml.XmlWriter)"></see> method and consumed by the <see cref="M:System.Xml.Serialization.IXmlSerializable.ReadXml(System.Xml.XmlReader)"></see> method.
+    /// </returns>
+    public override XmlSchema GetSchema() {
+      throw new NotImplementedException("The method or operation is not implemented.");
+    }
 
-        /// <summary>
-        /// Generates an object from its XML representation.
-        /// </summary>
-        /// <param name="reader">The <see cref="T:System.Xml.XmlReader"></see> stream from which the object is deserialized.</param>
-        public override void ReadXml(System.Xml.XmlReader reader)
-        {
-            throw new NotImplementedException("The method or operation is not implemented.");
-        }
+    /// <summary>
+    /// Generates an object from its XML representation.
+    /// </summary>
+    /// <param name="reader">The <see cref="T:System.Xml.XmlReader"></see> stream from which the object is deserialized.</param>
+    public override void ReadXml(System.Xml.XmlReader reader) {
+      throw new NotImplementedException("The method or operation is not implemented.");
+    }
 
-        /// <summary>
-        /// Converts an object into its XML representation.
-        /// </summary>
-        /// <param name="writer">The <see cref="T:System.Xml.XmlWriter"></see> stream to which the object is serialized.</param>
-        public override void WriteXml(System.Xml.XmlWriter writer)
-        {
-            throw new NotImplementedException("The method or operation is not implemented.");
-        }
-        #endregion
+    /// <summary>
+    /// Converts an object into its XML representation.
+    /// </summary>
+    /// <param name="writer">The <see cref="T:System.Xml.XmlWriter"></see> stream to which the object is serialized.</param>
+    public override void WriteXml(System.Xml.XmlWriter writer) {
+      throw new NotImplementedException("The method or operation is not implemented.");
+    }
+    #endregion
 
 
 
-        /// <summary>
-        /// Runs when the entire object graph has been deserialized.
-        /// </summary>
-        /// <param name="sender">The object that initiated the callback. The functionality for this parameter is not currently implemented.</param>
-        public override void  OnDeserialization(object sender)
-        {
-            base.OnDeserialization(sender);
-            if(Tracing.BinaryDeserializationSwitch.Enabled)
-                Trace.WriteLine("IDeserializationCallback of 'SimpleRectangle' called.");
-            
+    /// <summary>
+    /// Runs when the entire object graph has been deserialized.
+    /// </summary>
+    /// <param name="sender">The object that initiated the callback. The functionality for this parameter is not currently implemented.</param>
+    public override void OnDeserialization(object sender) {
+      base.OnDeserialization(sender);
+      if (Tracing.BinaryDeserializationSwitch.Enabled)
+        Trace.WriteLine("IDeserializationCallback of 'SimpleRectangle' called.");
 
-        }
+
     }
+  }
 }
Index: /trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.Netron/3.0.2672.12446/Netron.Diagramming.Core-3.0.2672.12446/Serialization/SimpleShapeBase.Serialization.cs
===================================================================
--- /trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.Netron/3.0.2672.12446/Netron.Diagramming.Core-3.0.2672.12446/Serialization/SimpleShapeBase.Serialization.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.Netron/3.0.2672.12446/Netron.Diagramming.Core-3.0.2672.12446/Serialization/SimpleShapeBase.Serialization.cs	(revision 4068)
@@ -1,64 +1,57 @@
 using System;
-using System.Collections.Generic;
-using System.Text;
+using System.Diagnostics;
 using System.Drawing;
-using System.ComponentModel;
 using System.Runtime.Serialization;
+using System.Xml.Schema;
 using System.Xml.Serialization;
-using System.Diagnostics;
-using System.Xml.Schema;
-namespace Netron.Diagramming.Core
-{
-    // -----------------------------------------------------------------------
+namespace Netron.Diagramming.Core {
+  // -----------------------------------------------------------------------
+  /// <summary>
+  /// Complementary partial class related to (de)serialization.
+  /// </summary>
+  // -----------------------------------------------------------------------
+  [Serializable]
+  public partial class SimpleShapeBase :
+      ISerializable,
+      IXmlSerializable,
+      IDeserializationCallback {
+    #region Deserialization constructor
+
+    // -------------------------------------------------------------------
     /// <summary>
-    /// Complementary partial class related to (de)serialization.
+    /// Deserialization constructor
     /// </summary>
-    // -----------------------------------------------------------------------
-    [Serializable]
-    public partial class SimpleShapeBase :
-        ISerializable,
-        IXmlSerializable,
-        IDeserializationCallback
-    {
-        #region Deserialization constructor
+    /// <param name="info">The info.</param>
+    /// <param name="context">The context.</param>
+    // -------------------------------------------------------------------
+    protected SimpleShapeBase(
+        SerializationInfo info,
+        StreamingContext context)
+      : base(info, context) {
 
-        // -------------------------------------------------------------------
-        /// <summary>
-        /// Deserialization constructor
-        /// </summary>
-        /// <param name="info">The info.</param>
-        /// <param name="context">The context.</param>
-        // -------------------------------------------------------------------
-        protected SimpleShapeBase(
-            SerializationInfo info,
-            StreamingContext context)
-            : base(info, context)
-        {
+      if (Tracing.BinaryDeserializationSwitch.Enabled) {
+        Trace.WriteLine(
+            "Deserializing the fields of 'SimpleShapeBase'.");
+      }
 
-            if (Tracing.BinaryDeserializationSwitch.Enabled)
-            {
-                Trace.WriteLine(
-                    "Deserializing the fields of 'SimpleShapeBase'.");
-            }
+      double version = info.GetDouble("SimpleShapeBaseVersion");
 
-            double version = info.GetDouble("SimpleShapeBaseVersion");
+      mText = info.GetString("Text");
+      mAutoSize = info.GetBoolean("AutoSize");
+      mAllowTextEditing = info.GetBoolean("AllowTextEditing");
+      mEditTextClicks = info.GetInt32("EditTextClicks");
 
-            mText = info.GetString("Text");
-            mAutoSize = info.GetBoolean("AutoSize");
-            mAllowTextEditing = info.GetBoolean("AllowTextEditing");
-            mEditTextClicks = info.GetInt32("EditTextClicks");
+      mTextArea = (Rectangle)info.GetValue(
+          "TextArea",
+          typeof(Rectangle));
 
-            mTextArea = (Rectangle)info.GetValue(
-                "TextArea",
-                typeof(Rectangle));
+      mTextStyle = (ITextStyle)info.GetValue(
+          "TextStyle",
+          typeof(ITextStyle));
+    }
+    #endregion
 
-            mTextStyle = (ITextStyle)info.GetValue(
-                "TextStyle",
-                typeof(ITextStyle));
-        }
-        #endregion
-
-        #region Serialization events
-        /*
+    #region Serialization events
+    /*
         [OnSerializing]
         void OnSerializing(StreamingContext context)
@@ -72,8 +65,8 @@
         }
         */
-        #endregion
+    #endregion
 
-        #region Deserialization events
-        /*
+    #region Deserialization events
+    /*
         [OnDeserializing]
         void OnDeserializing(StreamingContext context)
@@ -89,94 +82,87 @@
         }
        */
-        #endregion
+    #endregion
 
-        #region Serialization
+    #region Serialization
 
-        // -------------------------------------------------------------------
-        /// <summary>
-        /// Populates a 
-        /// <see cref="T:System.Runtime.Serialization.SerializationInfo"></see> 
-        /// with the data needed to serialize the target object.
-        /// </summary>
-        /// <param name="info">The 
-        /// <see cref="T:System.Runtime.Serialization.SerializationInfo"></see> 
-        /// to populate with data.</param>
-        /// <param name="context">The destination (see 
-        /// <see cref="T:System.Runtime.Serialization.StreamingContext"></see>) 
-        /// for this serialization.</param>
-        /// <exception cref="T:System.Security.SecurityException">The caller 
-        /// does not have the required permission. </exception>
-        // -------------------------------------------------------------------
-        public override void GetObjectData(
-            SerializationInfo info,
-            StreamingContext context)
-        {
-            if (Tracing.BinarySerializationSwitch.Enabled)
-            {
-                Trace.WriteLine(
-                    "Serializing the fields of 'SimpleShapeBase'.");
-            }
+    // -------------------------------------------------------------------
+    /// <summary>
+    /// Populates a 
+    /// <see cref="T:System.Runtime.Serialization.SerializationInfo"></see> 
+    /// with the data needed to serialize the target object.
+    /// </summary>
+    /// <param name="info">The 
+    /// <see cref="T:System.Runtime.Serialization.SerializationInfo"></see> 
+    /// to populate with data.</param>
+    /// <param name="context">The destination (see 
+    /// <see cref="T:System.Runtime.Serialization.StreamingContext"></see>) 
+    /// for this serialization.</param>
+    /// <exception cref="T:System.Security.SecurityException">The caller 
+    /// does not have the required permission. </exception>
+    // -------------------------------------------------------------------
+    public override void GetObjectData(
+        SerializationInfo info,
+        StreamingContext context) {
+      if (Tracing.BinarySerializationSwitch.Enabled) {
+        Trace.WriteLine(
+            "Serializing the fields of 'SimpleShapeBase'.");
+      }
 
-            base.GetObjectData(info, context);
+      base.GetObjectData(info, context);
 
-            info.AddValue("SimpleShapeBaseVersion", simpleShapeBaseVersion);
-            info.AddValue("Text", mText);
-            info.AddValue("AutoSize", mAutoSize);
-            info.AddValue("AllowTextEditing", mAllowTextEditing);
-            info.AddValue("EditTextClicks", mEditTextClicks);
-            info.AddValue("TextArea", mTextArea, typeof(Rectangle));
-            info.AddValue("TextStyle", mTextStyle, typeof(ITextStyle));
-        }
-        #endregion
+      info.AddValue("SimpleShapeBaseVersion", simpleShapeBaseVersion);
+      info.AddValue("Text", mText);
+      info.AddValue("AutoSize", mAutoSize);
+      info.AddValue("AllowTextEditing", mAllowTextEditing);
+      info.AddValue("EditTextClicks", mEditTextClicks);
+      info.AddValue("TextArea", mTextArea, typeof(Rectangle));
+      info.AddValue("TextStyle", mTextStyle, typeof(ITextStyle));
+    }
+    #endregion
 
-        #region Xml serialization
-        /// <summary>
-        /// This property is reserved, apply the <see cref="T:System.Xml.Serialization.XmlSchemaProviderAttribute"></see> to the class instead.
-        /// </summary>
-        /// <returns>
-        /// An <see cref="T:System.Xml.Schema.XmlSchema"></see> that describes the XML representation of the object that is produced by the <see cref="M:System.Xml.Serialization.IXmlSerializable.WriteXml(System.Xml.XmlWriter)"></see> method and consumed by the <see cref="M:System.Xml.Serialization.IXmlSerializable.ReadXml(System.Xml.XmlReader)"></see> method.
-        /// </returns>
-        public override XmlSchema GetSchema()
-        {
-            throw new NotImplementedException("The method or operation is not implemented.");
-        }
+    #region Xml serialization
+    /// <summary>
+    /// This property is reserved, apply the <see cref="T:System.Xml.Serialization.XmlSchemaProviderAttribute"></see> to the class instead.
+    /// </summary>
+    /// <returns>
+    /// An <see cref="T:System.Xml.Schema.XmlSchema"></see> that describes the XML representation of the object that is produced by the <see cref="M:System.Xml.Serialization.IXmlSerializable.WriteXml(System.Xml.XmlWriter)"></see> method and consumed by the <see cref="M:System.Xml.Serialization.IXmlSerializable.ReadXml(System.Xml.XmlReader)"></see> method.
+    /// </returns>
+    public override XmlSchema GetSchema() {
+      throw new NotImplementedException("The method or operation is not implemented.");
+    }
 
-        /// <summary>
-        /// Generates an object from its XML representation.
-        /// </summary>
-        /// <param name="reader">The <see cref="T:System.Xml.XmlReader"></see> stream from which the object is deserialized.</param>
-        public override void ReadXml(System.Xml.XmlReader reader)
-        {
-            throw new NotImplementedException("The method or operation is not implemented.");
-        }
+    /// <summary>
+    /// Generates an object from its XML representation.
+    /// </summary>
+    /// <param name="reader">The <see cref="T:System.Xml.XmlReader"></see> stream from which the object is deserialized.</param>
+    public override void ReadXml(System.Xml.XmlReader reader) {
+      throw new NotImplementedException("The method or operation is not implemented.");
+    }
 
-        /// <summary>
-        /// Converts an object into its XML representation.
-        /// </summary>
-        /// <param name="writer">The <see cref="T:System.Xml.XmlWriter"></see> stream to which the object is serialized.</param>
-        public override void WriteXml(System.Xml.XmlWriter writer)
-        {
-            throw new NotImplementedException("The method or operation is not implemented.");
-        }
-        #endregion
+    /// <summary>
+    /// Converts an object into its XML representation.
+    /// </summary>
+    /// <param name="writer">The <see cref="T:System.Xml.XmlWriter"></see> stream to which the object is serialized.</param>
+    public override void WriteXml(System.Xml.XmlWriter writer) {
+      throw new NotImplementedException("The method or operation is not implemented.");
+    }
+    #endregion
 
-        // -------------------------------------------------------------------
-        /// <summary>
-        /// Runs when the entire object graph has been deserialized.
-        /// </summary>
-        /// <param name="sender">The object that initiated the callback. The 
-        /// functionality for this parameter is not currently 
-        /// implemented.</param>
-        // -------------------------------------------------------------------
-        public override void OnDeserialization(object sender)
-        {
-            base.OnDeserialization(sender);
+    // -------------------------------------------------------------------
+    /// <summary>
+    /// Runs when the entire object graph has been deserialized.
+    /// </summary>
+    /// <param name="sender">The object that initiated the callback. The 
+    /// functionality for this parameter is not currently 
+    /// implemented.</param>
+    // -------------------------------------------------------------------
+    public override void OnDeserialization(object sender) {
+      base.OnDeserialization(sender);
 
-            if (Tracing.BinaryDeserializationSwitch.Enabled)
-            {
-                Trace.WriteLine(
-                    "IDeserializationCallback of 'SimpleShapeBase' called.");
-            }
-        }
+      if (Tracing.BinaryDeserializationSwitch.Enabled) {
+        Trace.WriteLine(
+            "IDeserializationCallback of 'SimpleShapeBase' called.");
+      }
     }
+  }
 }
Index: /trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.Netron/3.0.2672.12446/Netron.Diagramming.Core-3.0.2672.12446/Serialization/SolidPaintStyle.Serialization.cs
===================================================================
--- /trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.Netron/3.0.2672.12446/Netron.Diagramming.Core-3.0.2672.12446/Serialization/SolidPaintStyle.Serialization.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.Netron/3.0.2672.12446/Netron.Diagramming.Core-3.0.2672.12446/Serialization/SolidPaintStyle.Serialization.cs	(revision 4068)
@@ -1,45 +1,38 @@
 using System;
-using System.Collections.Generic;
-using System.Text;
+using System.Diagnostics;
 using System.Drawing;
-using System.ComponentModel;
 using System.Runtime.Serialization;
+using System.Xml.Schema;
 using System.Xml.Serialization;
-using System.Diagnostics;
-using System.Xml.Schema;
-using System.Drawing.Drawing2D;
-namespace Netron.Diagramming.Core
-{
+namespace Netron.Diagramming.Core {
+  /// <summary>
+  /// Complementary partial class related to (de)serialization of a
+  /// SolidPaintStyle.
+  /// </summary>
+  [Serializable]
+  public partial class SolidPaintStyle :
+     ISerializable,
+     IXmlSerializable,
+     IDeserializationCallback {
+    #region Deserialization constructor
     /// <summary>
-    /// Complementary partial class related to (de)serialization of a
-    /// SolidPaintStyle.
+    /// Deserialization constructor
     /// </summary>
-   [Serializable]
-    public partial class SolidPaintStyle : 
-       ISerializable, 
-       IXmlSerializable, 
-       IDeserializationCallback
-    {
-        #region Deserialization constructor
-        /// <summary>
-        /// Deserialization constructor
-        /// </summary>
-        /// <param name="info">The info.</param>
-        /// <param name="context">The context.</param>
-        protected SolidPaintStyle(SerializationInfo info, StreamingContext context)             
-        {
+    /// <param name="info">The info.</param>
+    /// <param name="context">The context.</param>
+    protected SolidPaintStyle(SerializationInfo info, StreamingContext context) {
 
-            if(Tracing.BinaryDeserializationSwitch.Enabled)
-                Trace.WriteLine("Deserializing the fields of 'SolidPaintStyle'.");
+      if (Tracing.BinaryDeserializationSwitch.Enabled)
+        Trace.WriteLine("Deserializing the fields of 'SolidPaintStyle'.");
 
-            double version = info.GetDouble("SolidPaintStyleVersion");
-            
-            mAlpha = info.GetInt32("Alpha");
-            mSolidColor = (Color) info.GetValue("SolidColor", typeof(Color));
-        }
-        #endregion
+      double version = info.GetDouble("SolidPaintStyleVersion");
 
-        #region Serialization events
-       /*
+      mAlpha = info.GetInt32("Alpha");
+      mSolidColor = (Color)info.GetValue("SolidColor", typeof(Color));
+    }
+    #endregion
+
+    #region Serialization events
+    /*
         [OnSerializing]
         void OnSerializing(StreamingContext context)
@@ -53,8 +46,8 @@
         }
         */
-        #endregion
+    #endregion
 
-        #region Deserialization events
-       /*
+    #region Deserialization events
+    /*
         [OnDeserializing]
         void OnDeserializing(StreamingContext context)
@@ -70,64 +63,59 @@
         }
        */
-        #endregion
+    #endregion
 
-        #region Serialization
-        /// <summary>
-        /// Populates a <see cref="T:System.Runtime.Serialization.SerializationInfo"></see> with the data needed to serialize the target object.
-        /// </summary>
-        /// <param name="info">The <see cref="T:System.Runtime.Serialization.SerializationInfo"></see> to populate with data.</param>
-        /// <param name="context">The destination (see <see cref="T:System.Runtime.Serialization.StreamingContext"></see>) for this serialization.</param>
-        /// <exception cref="T:System.Security.SecurityException">The caller does not have the required permission. </exception>
-        public  void GetObjectData(SerializationInfo info, StreamingContext context)
-        {
-            if(Tracing.BinarySerializationSwitch.Enabled)
-                Trace.WriteLine("Serializing the fields of 'SolidPaintStyle'.");
+    #region Serialization
+    /// <summary>
+    /// Populates a <see cref="T:System.Runtime.Serialization.SerializationInfo"></see> with the data needed to serialize the target object.
+    /// </summary>
+    /// <param name="info">The <see cref="T:System.Runtime.Serialization.SerializationInfo"></see> to populate with data.</param>
+    /// <param name="context">The destination (see <see cref="T:System.Runtime.Serialization.StreamingContext"></see>) for this serialization.</param>
+    /// <exception cref="T:System.Security.SecurityException">The caller does not have the required permission. </exception>
+    public void GetObjectData(SerializationInfo info, StreamingContext context) {
+      if (Tracing.BinarySerializationSwitch.Enabled)
+        Trace.WriteLine("Serializing the fields of 'SolidPaintStyle'.");
 
-            info.AddValue("SolidPaintStyleVersion", solidPaintStyleVersion);
-            info.AddValue("SolidColor", this.mSolidColor, typeof(Color));
-            info.AddValue("Alpha", this.mAlpha);
-        }
-        #endregion
+      info.AddValue("SolidPaintStyleVersion", solidPaintStyleVersion);
+      info.AddValue("SolidColor", this.mSolidColor, typeof(Color));
+      info.AddValue("Alpha", this.mAlpha);
+    }
+    #endregion
 
-        #region Xml serialization
-        /// <summary>
-        /// This property is reserved, apply the <see cref="T:System.Xml.Serialization.XmlSchemaProviderAttribute"></see> to the class instead.
-        /// </summary>
-        /// <returns>
-        /// An <see cref="T:System.Xml.Schema.XmlSchema"></see> that describes the XML representation of the object that is produced by the <see cref="M:System.Xml.Serialization.IXmlSerializable.WriteXml(System.Xml.XmlWriter)"></see> method and consumed by the <see cref="M:System.Xml.Serialization.IXmlSerializable.ReadXml(System.Xml.XmlReader)"></see> method.
-        /// </returns>
-        public  XmlSchema GetSchema()
-        {
-            throw new NotImplementedException("The method or operation is not implemented.");
-        }
+    #region Xml serialization
+    /// <summary>
+    /// This property is reserved, apply the <see cref="T:System.Xml.Serialization.XmlSchemaProviderAttribute"></see> to the class instead.
+    /// </summary>
+    /// <returns>
+    /// An <see cref="T:System.Xml.Schema.XmlSchema"></see> that describes the XML representation of the object that is produced by the <see cref="M:System.Xml.Serialization.IXmlSerializable.WriteXml(System.Xml.XmlWriter)"></see> method and consumed by the <see cref="M:System.Xml.Serialization.IXmlSerializable.ReadXml(System.Xml.XmlReader)"></see> method.
+    /// </returns>
+    public XmlSchema GetSchema() {
+      throw new NotImplementedException("The method or operation is not implemented.");
+    }
 
-        /// <summary>
-        /// Generates an object from its XML representation.
-        /// </summary>
-        /// <param name="reader">The <see cref="T:System.Xml.XmlReader"></see> stream from which the object is deserialized.</param>
-        public  void ReadXml(System.Xml.XmlReader reader)
-        {
-            throw new NotImplementedException("The method or operation is not implemented.");
-        }
+    /// <summary>
+    /// Generates an object from its XML representation.
+    /// </summary>
+    /// <param name="reader">The <see cref="T:System.Xml.XmlReader"></see> stream from which the object is deserialized.</param>
+    public void ReadXml(System.Xml.XmlReader reader) {
+      throw new NotImplementedException("The method or operation is not implemented.");
+    }
 
-        /// <summary>
-        /// Converts an object into its XML representation.
-        /// </summary>
-        /// <param name="writer">The <see cref="T:System.Xml.XmlWriter"></see> stream to which the object is serialized.</param>
-        public  void WriteXml(System.Xml.XmlWriter writer)
-        {
-            throw new NotImplementedException("The method or operation is not implemented.");
-        }
-        #endregion
+    /// <summary>
+    /// Converts an object into its XML representation.
+    /// </summary>
+    /// <param name="writer">The <see cref="T:System.Xml.XmlWriter"></see> stream to which the object is serialized.</param>
+    public void WriteXml(System.Xml.XmlWriter writer) {
+      throw new NotImplementedException("The method or operation is not implemented.");
+    }
+    #endregion
 
-        /// <summary>
-        /// Runs when the entire object graph has been deserialized.
-        /// </summary>
-        /// <param name="sender">The object that initiated the callback. The functionality for this parameter is not currently implemented.</param>
-        public  void OnDeserialization(object sender)
-        {
-            if(Tracing.BinaryDeserializationSwitch.Enabled)
-                Trace.WriteLine("IDeserializationCallback of 'SolidPaintStyle' called.");
-        }
+    /// <summary>
+    /// Runs when the entire object graph has been deserialized.
+    /// </summary>
+    /// <param name="sender">The object that initiated the callback. The functionality for this parameter is not currently implemented.</param>
+    public void OnDeserialization(object sender) {
+      if (Tracing.BinaryDeserializationSwitch.Enabled)
+        Trace.WriteLine("IDeserializationCallback of 'SolidPaintStyle' called.");
     }
+  }
 }
Index: /trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.Netron/3.0.2672.12446/Netron.Diagramming.Core-3.0.2672.12446/Serialization/SwitchIconMaterial.Serialization.cs
===================================================================
--- /trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.Netron/3.0.2672.12446/Netron.Diagramming.Core-3.0.2672.12446/Serialization/SwitchIconMaterial.Serialization.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.Netron/3.0.2672.12446/Netron.Diagramming.Core-3.0.2672.12446/Serialization/SwitchIconMaterial.Serialization.cs	(revision 4068)
@@ -1,39 +1,32 @@
 using System;
-using System.Collections.Generic;
-using System.Text;
-using System.Drawing;
-using System.ComponentModel;
+using System.Diagnostics;
 using System.Runtime.Serialization;
+using System.Xml.Schema;
 using System.Xml.Serialization;
-using System.Diagnostics;
-using System.Xml.Schema;
-namespace Netron.Diagramming.Core
-{
+namespace Netron.Diagramming.Core {
+  /// <summary>
+  /// Complementary partial class related to (de)serialization.
+  /// </summary>
+  [Serializable]
+  public partial class SwitchIconMaterial : ISerializable, IXmlSerializable, IDeserializationCallback {
+    #region Deserialization constructor
     /// <summary>
-    /// Complementary partial class related to (de)serialization.
+    /// Deserialization constructor
     /// </summary>
-   [Serializable]
-    public partial class SwitchIconMaterial : ISerializable, IXmlSerializable, IDeserializationCallback
-    {
-        #region Deserialization constructor
-        /// <summary>
-        /// Deserialization constructor
-        /// </summary>
-        /// <param name="info">The info.</param>
-        /// <param name="context">The context.</param>
-        protected SwitchIconMaterial(SerializationInfo info, StreamingContext context)
-            : base(info, context)
-        {
-            if(Tracing.BinaryDeserializationSwitch.Enabled)
-                Trace.WriteLine("Deserializing the fields of 'SwitchIconMaterial'.");
+    /// <param name="info">The info.</param>
+    /// <param name="context">The context.</param>
+    protected SwitchIconMaterial(SerializationInfo info, StreamingContext context)
+      : base(info, context) {
+      if (Tracing.BinaryDeserializationSwitch.Enabled)
+        Trace.WriteLine("Deserializing the fields of 'SwitchIconMaterial'.");
 
-            double version = info.GetDouble("SwitchIconMaterialVersion");
+      double version = info.GetDouble("SwitchIconMaterialVersion");
 
-            SwitchType = (SwitchIconType) Enum.Parse(typeof(SwitchIconType), info.GetString("SwitchType"));
-        }
-        #endregion
+      SwitchType = (SwitchIconType)Enum.Parse(typeof(SwitchIconType), info.GetString("SwitchType"));
+    }
+    #endregion
 
-        #region Serialization events
-       /*
+    #region Serialization events
+    /*
         [OnSerializing]
         void OnSerializing(StreamingContext context)
@@ -49,8 +42,8 @@
         }
         */
-        #endregion
+    #endregion
 
-        #region Deserialization events
-       /*
+    #region Deserialization events
+    /*
         [OnDeserializing]      
         void OnDeserializing(StreamingContext context)
@@ -66,72 +59,67 @@
          }
        */
-        #endregion
+    #endregion
 
-        #region Serialization
-        /// <summary>
-        /// Populates a <see cref="T:System.Runtime.Serialization.SerializationInfo"></see> with the data needed to serialize the target object.
-        /// </summary>
-        /// <param name="info">The <see cref="T:System.Runtime.Serialization.SerializationInfo"></see> to populate with data.</param>
-        /// <param name="context">The destination (see <see cref="T:System.Runtime.Serialization.StreamingContext"></see>) for this serialization.</param>
-        /// <exception cref="T:System.Security.SecurityException">The caller does not have the required permission. </exception>
-        public override void GetObjectData(SerializationInfo info, StreamingContext context) 
-        {
-            if(Tracing.BinarySerializationSwitch.Enabled)
-                Trace.WriteLine("Serializing the fields of 'SwitchIconMaterial'.");
-            base.GetObjectData(info, context);
+    #region Serialization
+    /// <summary>
+    /// Populates a <see cref="T:System.Runtime.Serialization.SerializationInfo"></see> with the data needed to serialize the target object.
+    /// </summary>
+    /// <param name="info">The <see cref="T:System.Runtime.Serialization.SerializationInfo"></see> to populate with data.</param>
+    /// <param name="context">The destination (see <see cref="T:System.Runtime.Serialization.StreamingContext"></see>) for this serialization.</param>
+    /// <exception cref="T:System.Security.SecurityException">The caller does not have the required permission. </exception>
+    public override void GetObjectData(SerializationInfo info, StreamingContext context) {
+      if (Tracing.BinarySerializationSwitch.Enabled)
+        Trace.WriteLine("Serializing the fields of 'SwitchIconMaterial'.");
+      base.GetObjectData(info, context);
 
-            info.AddValue(
-                "SwitchIconMaterialVersion", 
-                switchIconMaterialVersion);
+      info.AddValue(
+          "SwitchIconMaterialVersion",
+          switchIconMaterialVersion);
 
-            info.AddValue("SwitchType", this.mSwitchType.ToString());
-        }
-        #endregion
+      info.AddValue("SwitchType", this.mSwitchType.ToString());
+    }
+    #endregion
 
-        #region Xml serialization
-        /// <summary>
-        /// This property is reserved, apply the <see cref="T:System.Xml.Serialization.XmlSchemaProviderAttribute"></see> to the class instead.
-        /// </summary>
-        /// <returns>
-        /// An <see cref="T:System.Xml.Schema.XmlSchema"></see> that describes the XML representation of the object that is produced by the <see cref="M:System.Xml.Serialization.IXmlSerializable.WriteXml(System.Xml.XmlWriter)"></see> method and consumed by the <see cref="M:System.Xml.Serialization.IXmlSerializable.ReadXml(System.Xml.XmlReader)"></see> method.
-        /// </returns>
-        public override XmlSchema GetSchema()
-        {
-            throw new NotImplementedException("The method or operation is not implemented.");
-        }
+    #region Xml serialization
+    /// <summary>
+    /// This property is reserved, apply the <see cref="T:System.Xml.Serialization.XmlSchemaProviderAttribute"></see> to the class instead.
+    /// </summary>
+    /// <returns>
+    /// An <see cref="T:System.Xml.Schema.XmlSchema"></see> that describes the XML representation of the object that is produced by the <see cref="M:System.Xml.Serialization.IXmlSerializable.WriteXml(System.Xml.XmlWriter)"></see> method and consumed by the <see cref="M:System.Xml.Serialization.IXmlSerializable.ReadXml(System.Xml.XmlReader)"></see> method.
+    /// </returns>
+    public override XmlSchema GetSchema() {
+      throw new NotImplementedException("The method or operation is not implemented.");
+    }
 
-        /// <summary>
-        /// Generates an object from its XML representation.
-        /// </summary>
-        /// <param name="reader">The <see cref="T:System.Xml.XmlReader"></see> stream from which the object is deserialized.</param>
-        public override void ReadXml(System.Xml.XmlReader reader)
-        {
-            throw new NotImplementedException("The method or operation is not implemented.");
-        }
+    /// <summary>
+    /// Generates an object from its XML representation.
+    /// </summary>
+    /// <param name="reader">The <see cref="T:System.Xml.XmlReader"></see> stream from which the object is deserialized.</param>
+    public override void ReadXml(System.Xml.XmlReader reader) {
+      throw new NotImplementedException("The method or operation is not implemented.");
+    }
 
-        /// <summary>
-        /// Converts an object into its XML representation.
-        /// </summary>
-        /// <param name="writer">The <see cref="T:System.Xml.XmlWriter"></see> stream to which the object is serialized.</param>
-        public override void WriteXml(System.Xml.XmlWriter writer)
-        {
-            throw new NotImplementedException("The method or operation is not implemented.");
-        }
-        #endregion
+    /// <summary>
+    /// Converts an object into its XML representation.
+    /// </summary>
+    /// <param name="writer">The <see cref="T:System.Xml.XmlWriter"></see> stream to which the object is serialized.</param>
+    public override void WriteXml(System.Xml.XmlWriter writer) {
+      throw new NotImplementedException("The method or operation is not implemented.");
+    }
+    #endregion
 
 
 
-        /// <summary>
-        /// Runs when the entire object graph has been deserialized.
-        /// </summary>
-        /// <param name="sender">The object that initiated the callback. The functionality for this parameter is not currently implemented.</param>
-        public override void  OnDeserialization(object sender)
-        {
-            base.OnDeserialization(sender);
-            if(Tracing.BinaryDeserializationSwitch.Enabled)
-                Trace.WriteLine("IDeserializationCallback of 'SwitchIconMaterial' called.");
-            
+    /// <summary>
+    /// Runs when the entire object graph has been deserialized.
+    /// </summary>
+    /// <param name="sender">The object that initiated the callback. The functionality for this parameter is not currently implemented.</param>
+    public override void OnDeserialization(object sender) {
+      base.OnDeserialization(sender);
+      if (Tracing.BinaryDeserializationSwitch.Enabled)
+        Trace.WriteLine("IDeserializationCallback of 'SwitchIconMaterial' called.");
 
-        }
+
     }
+  }
 }
Index: /trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.Netron/3.0.2672.12446/Netron.Diagramming.Core-3.0.2672.12446/Serialization/TextOnly.Serialization.cs
===================================================================
--- /trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.Netron/3.0.2672.12446/Netron.Diagramming.Core-3.0.2672.12446/Serialization/TextOnly.Serialization.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.Netron/3.0.2672.12446/Netron.Diagramming.Core-3.0.2672.12446/Serialization/TextOnly.Serialization.cs	(revision 4068)
@@ -1,39 +1,32 @@
 using System;
-using System.Collections.Generic;
-using System.Text;
-using System.Drawing;
-using System.ComponentModel;
+using System.Diagnostics;
 using System.Runtime.Serialization;
+using System.Xml.Schema;
 using System.Xml.Serialization;
-using System.Diagnostics;
-using System.Xml.Schema;
-namespace Netron.Diagramming.Core
-{
+namespace Netron.Diagramming.Core {
+  /// <summary>
+  /// Complementary partial class related to (de)serialization.
+  /// </summary>
+  [Serializable]
+  public partial class TextOnly : ISerializable, IXmlSerializable, IDeserializationCallback {
+    #region Deserialization constructor
     /// <summary>
-    /// Complementary partial class related to (de)serialization.
+    /// Deserialization constructor
     /// </summary>
-   [Serializable]
-    public partial class TextOnly : ISerializable, IXmlSerializable, IDeserializationCallback
-    {
-        #region Deserialization constructor
-        /// <summary>
-        /// Deserialization constructor
-        /// </summary>
-        /// <param name="info">The info.</param>
-        /// <param name="context">The context.</param>
-        protected TextOnly(SerializationInfo info, StreamingContext context)
-            : base(info, context)
-        {
+    /// <param name="info">The info.</param>
+    /// <param name="context">The context.</param>
+    protected TextOnly(SerializationInfo info, StreamingContext context)
+      : base(info, context) {
 
-            if(Tracing.BinaryDeserializationSwitch.Enabled)
-                Trace.WriteLine("Deserializing the fields of 'TextOnly'.");
+      if (Tracing.BinaryDeserializationSwitch.Enabled)
+        Trace.WriteLine("Deserializing the fields of 'TextOnly'.");
 
-            double version = info.GetDouble("TextOnlyVersion");
-            
-        }
-        #endregion
+      double version = info.GetDouble("TextOnlyVersion");
 
-        #region Serialization events
-       /*
+    }
+    #endregion
+
+    #region Serialization events
+    /*
         [OnSerializing]
         void OnSerializing(StreamingContext context)
@@ -47,8 +40,8 @@
         }
         */
-        #endregion
+    #endregion
 
-        #region Deserialization events
-       /*
+    #region Deserialization events
+    /*
         [OnDeserializing]
         void OnDeserializing(StreamingContext context)
@@ -64,64 +57,59 @@
         }
        */
-        #endregion
+    #endregion
 
-        #region Serialization
-        /// <summary>
-        /// Populates a <see cref="T:System.Runtime.Serialization.SerializationInfo"></see> with the data needed to serialize the target object.
-        /// </summary>
-        /// <param name="info">The <see cref="T:System.Runtime.Serialization.SerializationInfo"></see> to populate with data.</param>
-        /// <param name="context">The destination (see <see cref="T:System.Runtime.Serialization.StreamingContext"></see>) for this serialization.</param>
-        /// <exception cref="T:System.Security.SecurityException">The caller does not have the required permission. </exception>
-        public override void GetObjectData(SerializationInfo info, StreamingContext context)
-        {
-            if(Tracing.BinarySerializationSwitch.Enabled)
-                Trace.WriteLine("Serializing the fields of 'TextOnly'.");
-            base.GetObjectData(info, context);
+    #region Serialization
+    /// <summary>
+    /// Populates a <see cref="T:System.Runtime.Serialization.SerializationInfo"></see> with the data needed to serialize the target object.
+    /// </summary>
+    /// <param name="info">The <see cref="T:System.Runtime.Serialization.SerializationInfo"></see> to populate with data.</param>
+    /// <param name="context">The destination (see <see cref="T:System.Runtime.Serialization.StreamingContext"></see>) for this serialization.</param>
+    /// <exception cref="T:System.Security.SecurityException">The caller does not have the required permission. </exception>
+    public override void GetObjectData(SerializationInfo info, StreamingContext context) {
+      if (Tracing.BinarySerializationSwitch.Enabled)
+        Trace.WriteLine("Serializing the fields of 'TextOnly'.");
+      base.GetObjectData(info, context);
 
-            info.AddValue("TextOnlyVersion", textOnlyVersion);
-        }
-        #endregion
+      info.AddValue("TextOnlyVersion", textOnlyVersion);
+    }
+    #endregion
 
-        #region Xml serialization
-        /// <summary>
-        /// This property is reserved, apply the <see cref="T:System.Xml.Serialization.XmlSchemaProviderAttribute"></see> to the class instead.
-        /// </summary>
-        /// <returns>
-        /// An <see cref="T:System.Xml.Schema.XmlSchema"></see> that describes the XML representation of the object that is produced by the <see cref="M:System.Xml.Serialization.IXmlSerializable.WriteXml(System.Xml.XmlWriter)"></see> method and consumed by the <see cref="M:System.Xml.Serialization.IXmlSerializable.ReadXml(System.Xml.XmlReader)"></see> method.
-        /// </returns>
-        public override XmlSchema GetSchema()
-        {
-            throw new NotImplementedException("The method or operation is not implemented.");
-        }
+    #region Xml serialization
+    /// <summary>
+    /// This property is reserved, apply the <see cref="T:System.Xml.Serialization.XmlSchemaProviderAttribute"></see> to the class instead.
+    /// </summary>
+    /// <returns>
+    /// An <see cref="T:System.Xml.Schema.XmlSchema"></see> that describes the XML representation of the object that is produced by the <see cref="M:System.Xml.Serialization.IXmlSerializable.WriteXml(System.Xml.XmlWriter)"></see> method and consumed by the <see cref="M:System.Xml.Serialization.IXmlSerializable.ReadXml(System.Xml.XmlReader)"></see> method.
+    /// </returns>
+    public override XmlSchema GetSchema() {
+      throw new NotImplementedException("The method or operation is not implemented.");
+    }
 
-        /// <summary>
-        /// Generates an object from its XML representation.
-        /// </summary>
-        /// <param name="reader">The <see cref="T:System.Xml.XmlReader"></see> stream from which the object is deserialized.</param>
-        public override void ReadXml(System.Xml.XmlReader reader)
-        {
-            throw new NotImplementedException("The method or operation is not implemented.");
-        }
+    /// <summary>
+    /// Generates an object from its XML representation.
+    /// </summary>
+    /// <param name="reader">The <see cref="T:System.Xml.XmlReader"></see> stream from which the object is deserialized.</param>
+    public override void ReadXml(System.Xml.XmlReader reader) {
+      throw new NotImplementedException("The method or operation is not implemented.");
+    }
 
-        /// <summary>
-        /// Converts an object into its XML representation.
-        /// </summary>
-        /// <param name="writer">The <see cref="T:System.Xml.XmlWriter"></see> stream to which the object is serialized.</param>
-        public override void WriteXml(System.Xml.XmlWriter writer)
-        {
-            throw new NotImplementedException("The method or operation is not implemented.");
-        }
-        #endregion
+    /// <summary>
+    /// Converts an object into its XML representation.
+    /// </summary>
+    /// <param name="writer">The <see cref="T:System.Xml.XmlWriter"></see> stream to which the object is serialized.</param>
+    public override void WriteXml(System.Xml.XmlWriter writer) {
+      throw new NotImplementedException("The method or operation is not implemented.");
+    }
+    #endregion
 
-        /// <summary>
-        /// Runs when the entire object graph has been deserialized.
-        /// </summary>
-        /// <param name="sender">The object that initiated the callback. The functionality for this parameter is not currently implemented.</param>
-        public override void OnDeserialization(object sender)
-        {
-            base.OnDeserialization(sender);
-            if(Tracing.BinaryDeserializationSwitch.Enabled)
-                Trace.WriteLine("IDeserializationCallback of 'TextOnly' called.");
-        }
+    /// <summary>
+    /// Runs when the entire object graph has been deserialized.
+    /// </summary>
+    /// <param name="sender">The object that initiated the callback. The functionality for this parameter is not currently implemented.</param>
+    public override void OnDeserialization(object sender) {
+      base.OnDeserialization(sender);
+      if (Tracing.BinaryDeserializationSwitch.Enabled)
+        Trace.WriteLine("IDeserializationCallback of 'TextOnly' called.");
     }
+  }
 }
Index: /trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.Netron/3.0.2672.12446/Netron.Diagramming.Core-3.0.2672.12446/Serialization/TextStyle.Serialization.cs
===================================================================
--- /trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.Netron/3.0.2672.12446/Netron.Diagramming.Core-3.0.2672.12446/Serialization/TextStyle.Serialization.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.Netron/3.0.2672.12446/Netron.Diagramming.Core-3.0.2672.12446/Serialization/TextStyle.Serialization.cs	(revision 4068)
@@ -1,68 +1,62 @@
 using System;
-using System.Collections.Generic;
-using System.Text;
-using System.Runtime.Serialization;
-using System.Xml.Serialization;
-using System.Xml.Schema;
 using System.Diagnostics;
 using System.Drawing;
+using System.Runtime.Serialization;
+using System.Xml.Schema;
+using System.Xml.Serialization;
 using ToolBox.Formatting;
 
 
-namespace Netron.Diagramming.Core
-{
-    [Serializable]
-    public partial class TextStyle :
-       ISerializable,
-       IXmlSerializable,
-       IDeserializationCallback
-    {
-        #region Deserialization constructor
+namespace Netron.Diagramming.Core {
+  [Serializable]
+  public partial class TextStyle :
+     ISerializable,
+     IXmlSerializable,
+     IDeserializationCallback {
+    #region Deserialization constructor
 
-        // ------------------------------------------------------------------
-        /// <summary>
-        /// Deserialization constructor
-        /// </summary>
-        /// <param name="info">The info.</param>
-        /// <param name="context">The context.</param>
-        // ------------------------------------------------------------------
-        protected TextStyle(
-            SerializationInfo info,
-            StreamingContext context)
-        {
-            if (Tracing.BinaryDeserializationSwitch.Enabled)
-            {
-                Trace.WriteLine("Deserializing the fields of 'TextStyle'.");
-            }
+    // ------------------------------------------------------------------
+    /// <summary>
+    /// Deserialization constructor
+    /// </summary>
+    /// <param name="info">The info.</param>
+    /// <param name="context">The context.</param>
+    // ------------------------------------------------------------------
+    protected TextStyle(
+        SerializationInfo info,
+        StreamingContext context) {
+      if (Tracing.BinaryDeserializationSwitch.Enabled) {
+        Trace.WriteLine("Deserializing the fields of 'TextStyle'.");
+      }
 
-            double version = info.GetDouble("TextStyleVersion");
+      double version = info.GetDouble("TextStyleVersion");
 
-            mDecimalPlaces = info.GetInt32("DecimalPlaces");
+      mDecimalPlaces = info.GetInt32("DecimalPlaces");
 
-            mTextFormat = (TextFormat) info.GetValue(
-                "TextFormat", 
-                typeof(TextFormat));
+      mTextFormat = (TextFormat)info.GetValue(
+          "TextFormat",
+          typeof(TextFormat));
 
-            mFont = (Font) info.GetValue(
-                "Font", 
-                typeof(Font));
+      mFont = (Font)info.GetValue(
+          "Font",
+          typeof(Font));
 
-            mFontColor = (Color) info.GetValue(
-                "FontColor", 
-                typeof(Color));
+      mFontColor = (Color)info.GetValue(
+          "FontColor",
+          typeof(Color));
 
-            mHorizontalAlignment = (StringAlignment)info.GetValue(
-                "HorizontalAlignment",
-                typeof(StringAlignment));
+      mHorizontalAlignment = (StringAlignment)info.GetValue(
+          "HorizontalAlignment",
+          typeof(StringAlignment));
 
-            mVerticalAlignment = (StringAlignment)info.GetValue(
-                "VerticalAlignment",
-                typeof(StringAlignment));
-        }
+      mVerticalAlignment = (StringAlignment)info.GetValue(
+          "VerticalAlignment",
+          typeof(StringAlignment));
+    }
 
-        #endregion
+    #endregion
 
-        #region Serialization events
-       /*
+    #region Serialization events
+    /*
         [OnSerializing]
         void OnSerializing(StreamingContext context)
@@ -76,8 +70,8 @@
         }
         */
-        #endregion
+    #endregion
 
-        #region Deserialization events
-       /*
+    #region Deserialization events
+    /*
         [OnDeserializing]
         void OnDeserializing(StreamingContext context)
@@ -93,108 +87,102 @@
         }
        */
-        #endregion
+    #endregion
 
-        #region Serialization
-        /// <summary>
-        /// Populates a <see cref="T:System.Runtime.Serialization.SerializationInfo"></see> with the data needed to serialize the target object.
-        /// </summary>
-        /// <param name="info">The <see cref="T:System.Runtime.Serialization.SerializationInfo"></see> to populate with data.</param>
-        /// <param name="context">The destination (see <see cref="T:System.Runtime.Serialization.StreamingContext"></see>) for this serialization.</param>
-        /// <exception cref="T:System.Security.SecurityException">The caller does not have the required permission. </exception>
-        public virtual  void GetObjectData(SerializationInfo info, StreamingContext context)
-        {
-            if(Tracing.BinarySerializationSwitch.Enabled)
-                Trace.WriteLine("Serializing the fields of 'PenStyle'.");
+    #region Serialization
+    /// <summary>
+    /// Populates a <see cref="T:System.Runtime.Serialization.SerializationInfo"></see> with the data needed to serialize the target object.
+    /// </summary>
+    /// <param name="info">The <see cref="T:System.Runtime.Serialization.SerializationInfo"></see> to populate with data.</param>
+    /// <param name="context">The destination (see <see cref="T:System.Runtime.Serialization.StreamingContext"></see>) for this serialization.</param>
+    /// <exception cref="T:System.Security.SecurityException">The caller does not have the required permission. </exception>
+    public virtual void GetObjectData(SerializationInfo info, StreamingContext context) {
+      if (Tracing.BinarySerializationSwitch.Enabled)
+        Trace.WriteLine("Serializing the fields of 'PenStyle'.");
 
-            info.AddValue("TextStyleVersion", textStyleVersion);
-      
-            info.AddValue("DecimalPlaces", this.mDecimalPlaces, typeof(int));
+      info.AddValue("TextStyleVersion", textStyleVersion);
 
-            info.AddValue("TextFormat", this.mTextFormat, typeof(TextFormat));
+      info.AddValue("DecimalPlaces", this.mDecimalPlaces, typeof(int));
 
-            // Note: we do not have to serialize the font style (i.e. IsBold,
-            // IsUnderline, etc.) because that's included in the font.
-            info.AddValue("Font", this.mFont, typeof(Font));
+      info.AddValue("TextFormat", this.mTextFormat, typeof(TextFormat));
 
-            info.AddValue("FontColor", this.mFontColor, typeof(Color));
+      // Note: we do not have to serialize the font style (i.e. IsBold,
+      // IsUnderline, etc.) because that's included in the font.
+      info.AddValue("Font", this.mFont, typeof(Font));
 
-            info.AddValue(
-                "HorizontalAlignment", 
-                this.mHorizontalAlignment, 
-                typeof(StringAlignment));
+      info.AddValue("FontColor", this.mFontColor, typeof(Color));
 
-            info.AddValue(
-                "VerticalAlignment",
-                this.mVerticalAlignment,
-                typeof(StringAlignment));
-        }
-        #endregion
+      info.AddValue(
+          "HorizontalAlignment",
+          this.mHorizontalAlignment,
+          typeof(StringAlignment));
 
-        #region Xml serialization
+      info.AddValue(
+          "VerticalAlignment",
+          this.mVerticalAlignment,
+          typeof(StringAlignment));
+    }
+    #endregion
 
-        // ------------------------------------------------------------------
-        /// <summary>
-        /// This property is reserved, apply the 
-        /// <see cref="T:System.Xml.Serialization.XmlSchemaProviderAttribute">
-        /// </see> to the class instead.
-        /// </summary>
-        /// <returns>
-        /// An <see cref="T:System.Xml.Schema.XmlSchema"></see> that describes 
-        /// the XML representation of the object that is produced by the 
-        /// <see cref="M:System.Xml.Serialization.IXmlSerializable.WriteXml(
-        /// System.Xml.XmlWriter)"></see> method and consumed by the 
-        /// <see cref="M:System.Xml.Serialization.IXmlSerializable.ReadXml(
-        /// System.Xml.XmlReader)"></see> method.
-        /// </returns>
-        // ------------------------------------------------------------------
-        public  virtual XmlSchema GetSchema()
-        {
-            throw new NotImplementedException(
-                "The method or operation is not implemented.");
-        }
+    #region Xml serialization
 
-        // ------------------------------------------------------------------
-        /// <summary>
-        /// Generates an object from its XML representation.
-        /// </summary>
-        /// <param name="reader">The <see cref="T:System.Xml.XmlReader"></see> 
-        /// stream from which the object is deserialized.</param>
-        // ------------------------------------------------------------------
-        public  virtual void ReadXml(System.Xml.XmlReader reader)
-        {
-            throw new NotImplementedException(
-                "The method or operation is not implemented.");
-        }
+    // ------------------------------------------------------------------
+    /// <summary>
+    /// This property is reserved, apply the 
+    /// <see cref="T:System.Xml.Serialization.XmlSchemaProviderAttribute">
+    /// </see> to the class instead.
+    /// </summary>
+    /// <returns>
+    /// An <see cref="T:System.Xml.Schema.XmlSchema"></see> that describes 
+    /// the XML representation of the object that is produced by the 
+    /// <see cref="M:System.Xml.Serialization.IXmlSerializable.WriteXml(
+    /// System.Xml.XmlWriter)"></see> method and consumed by the 
+    /// <see cref="M:System.Xml.Serialization.IXmlSerializable.ReadXml(
+    /// System.Xml.XmlReader)"></see> method.
+    /// </returns>
+    // ------------------------------------------------------------------
+    public virtual XmlSchema GetSchema() {
+      throw new NotImplementedException(
+          "The method or operation is not implemented.");
+    }
 
-        // ------------------------------------------------------------------
-        /// <summary>
-        /// Converts an object into its XML representation.
-        /// </summary>
-        /// <param name="writer">The <see cref="T:System.Xml.XmlWriter">
-        /// </see> stream to which the object is serialized.</param>
-        // ------------------------------------------------------------------
-        public virtual void WriteXml(System.Xml.XmlWriter writer)
-        {
-            throw new NotImplementedException(
-                "The method or operation is not implemented.");
-        }
-        #endregion
+    // ------------------------------------------------------------------
+    /// <summary>
+    /// Generates an object from its XML representation.
+    /// </summary>
+    /// <param name="reader">The <see cref="T:System.Xml.XmlReader"></see> 
+    /// stream from which the object is deserialized.</param>
+    // ------------------------------------------------------------------
+    public virtual void ReadXml(System.Xml.XmlReader reader) {
+      throw new NotImplementedException(
+          "The method or operation is not implemented.");
+    }
 
-        // ------------------------------------------------------------------
-        /// <summary>
-        /// Runs when the entire object graph has been deserialized.
-        /// </summary>
-        /// <param name="sender">The object that initiated the callback. The 
-        /// functionality for this parameter is not currently implemented.
-        /// </param>
-        // ------------------------------------------------------------------
-        public virtual void OnDeserialization(object sender)
-        {
-            if (Tracing.BinaryDeserializationSwitch.Enabled)
-            {
-                Trace.WriteLine(
-                    "IDeserializationCallback of 'PenStyle' called.");
-            }
-        }
+    // ------------------------------------------------------------------
+    /// <summary>
+    /// Converts an object into its XML representation.
+    /// </summary>
+    /// <param name="writer">The <see cref="T:System.Xml.XmlWriter">
+    /// </see> stream to which the object is serialized.</param>
+    // ------------------------------------------------------------------
+    public virtual void WriteXml(System.Xml.XmlWriter writer) {
+      throw new NotImplementedException(
+          "The method or operation is not implemented.");
     }
+    #endregion
+
+    // ------------------------------------------------------------------
+    /// <summary>
+    /// Runs when the entire object graph has been deserialized.
+    /// </summary>
+    /// <param name="sender">The object that initiated the callback. The 
+    /// functionality for this parameter is not currently implemented.
+    /// </param>
+    // ------------------------------------------------------------------
+    public virtual void OnDeserialization(object sender) {
+      if (Tracing.BinaryDeserializationSwitch.Enabled) {
+        Trace.WriteLine(
+            "IDeserializationCallback of 'PenStyle' called.");
+      }
+    }
+  }
 }
Index: /trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.Netron/3.0.2672.12446/Netron.Diagramming.Core-3.0.2672.12446/ToolBox.Formatting/TextFormat.cs
===================================================================
--- /trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.Netron/3.0.2672.12446/Netron.Diagramming.Core-3.0.2672.12446/ToolBox.Formatting/TextFormat.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.Netron/3.0.2672.12446/Netron.Diagramming.Core-3.0.2672.12446/ToolBox.Formatting/TextFormat.cs	(revision 4068)
@@ -1,86 +1,82 @@
 using System;
-using System.Collections.Generic;
-using System.Text;
 
-namespace ToolBox.Formatting
-{
-    [Serializable()]
-    public enum TextFormat
-    {
-        // ------------------------------------------------------------------
-        /// <summary>
-        /// No formatting is applied.
-        /// </summary>
-        // ------------------------------------------------------------------
-        String,
+namespace ToolBox.Formatting {
+  [Serializable()]
+  public enum TextFormat {
+    // ------------------------------------------------------------------
+    /// <summary>
+    /// No formatting is applied.
+    /// </summary>
+    // ------------------------------------------------------------------
+    String,
 
-        // ------------------------------------------------------------------
-        /// <summary>
-        /// Culturally aware currency format.
-        /// </summary>
-        // ------------------------------------------------------------------
-        Currency,
+    // ------------------------------------------------------------------
+    /// <summary>
+    /// Culturally aware currency format.
+    /// </summary>
+    // ------------------------------------------------------------------
+    Currency,
 
-        // ------------------------------------------------------------------
-        /// <summary>
-        /// Only supports integral numbers. Displays a string using decimal 
-        /// digits preceded by a minus sign if negative.
-        /// </summary>
-        // ------------------------------------------------------------------
-        Decimal,
+    // ------------------------------------------------------------------
+    /// <summary>
+    /// Only supports integral numbers. Displays a string using decimal 
+    /// digits preceded by a minus sign if negative.
+    /// </summary>
+    // ------------------------------------------------------------------
+    Decimal,
 
-        // ------------------------------------------------------------------
-        /// <summary>
-        /// Displays numbers in the form ±d.ddddddE±dd where d is a decimal 
-        /// digit. 
-        /// </summary>
-        // ------------------------------------------------------------------
-        ScientificNotation,
+    // ------------------------------------------------------------------
+    /// <summary>
+    /// Displays numbers in the form ±d.ddddddE±dd where d is a decimal 
+    /// digit. 
+    /// </summary>
+    // ------------------------------------------------------------------
+    ScientificNotation,
 
-        // ------------------------------------------------------------------
-        /// <summary>
-        /// Displays a series of decimal digits with a decimal point and 
-        /// additional digits.
-        /// </summary>
-        // ------------------------------------------------------------------
-        FixedPoint,
+    // ------------------------------------------------------------------
+    /// <summary>
+    /// Displays a series of decimal digits with a decimal point and 
+    /// additional digits.
+    /// </summary>
+    // ------------------------------------------------------------------
+    FixedPoint,
 
-        // ------------------------------------------------------------------
-        /// <summary>
-        /// Displays either as a fixed-point or scientific notation based 
-        /// on the size of the number.
-        /// </summary>
-        // ------------------------------------------------------------------
-        General,
+    // ------------------------------------------------------------------
+    /// <summary>
+    /// Displays either as a fixed-point or scientific notation based 
+    /// on the size of the number.
+    /// </summary>
+    // ------------------------------------------------------------------
+    General,
 
-        // ------------------------------------------------------------------
-        /// <summary>
-        /// Similar to fixed point but uses a separator character (such as ,) 
-        /// for groups of digits.
-        /// </summary>
-        // ------------------------------------------------------------------
-        Number,
+    // ------------------------------------------------------------------
+    /// <summary>
+    /// Similar to fixed point but uses a separator character (such as ,) 
+    /// for groups of digits.
+    /// </summary>
+    // ------------------------------------------------------------------
+    Number,
 
-        // ------------------------------------------------------------------
-        /// <summary>
-        /// Multiplies the number by 100 and displays with a percent symbol.
-        /// </summary>
-        // ------------------------------------------------------------------
-        Percentage,
+    // ------------------------------------------------------------------
+    /// <summary>
+    /// Multiplies the number by 100 and displays with a percent symbol.
+    /// </summary>
+    // ------------------------------------------------------------------
+    Percentage,
 
-        // ------------------------------------------------------------------
-        /// <summary>
-        /// Formats a floating-point number so that it can be successfully 
-        /// converted back to its original value.
-        /// </summary>
-        // ------------------------------------------------------------------
-        RoundTrip,
+    // ------------------------------------------------------------------
+    /// <summary>
+    /// Formats a floating-point number so that it can be successfully 
+    /// converted back to its original value.
+    /// </summary>
+    // ------------------------------------------------------------------
+    RoundTrip,
 
-        // ------------------------------------------------------------------
-        /// <summary>
-        /// Displays an integral number using the base-16 number system.
-        /// </summary>
-        // ------------------------------------------------------------------
-        Hexadecimal
-    }
+    // ------------------------------------------------------------------
+    /// <summary>
+    /// Displays an integral number using the base-16 number system.
+    /// </summary>
+    // ------------------------------------------------------------------
+    Hexadecimal
+  }
 }
Index: /trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.Netron/3.0.2672.12446/Netron.Diagramming.Core-3.0.2672.12446/ToolBox.Formatting/TextFormatter.cs
===================================================================
--- /trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.Netron/3.0.2672.12446/Netron.Diagramming.Core-3.0.2672.12446/ToolBox.Formatting/TextFormatter.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.Netron/3.0.2672.12446/Netron.Diagramming.Core-3.0.2672.12446/ToolBox.Formatting/TextFormatter.cs	(revision 4068)
@@ -1,126 +1,114 @@
 using System;
-using System.Collections.Generic;
-using System.Text;
 
-namespace ToolBox.Formatting
-{
-    public class TextFormatter
-    {
-        // ------------------------------------------------------------------
-        /// <summary>
-        /// Returns a string that's formatted using the specified format for
-        /// the number specified.
-        /// </summary>
-        /// <param name="format">TextFormat</param>
-        /// <param name="number">double</param>
-        /// <param name="significantDigits">int</param>
-        /// <returns>string</returns>
-        // ------------------------------------------------------------------
-        public static string Format(
-            TextFormat format,
-            double number,
-            int significantDigits)
-        {
-            return Format(format, number.ToString(), significantDigits);
+namespace ToolBox.Formatting {
+  public class TextFormatter {
+    // ------------------------------------------------------------------
+    /// <summary>
+    /// Returns a string that's formatted using the specified format for
+    /// the number specified.
+    /// </summary>
+    /// <param name="format">TextFormat</param>
+    /// <param name="number">double</param>
+    /// <param name="significantDigits">int</param>
+    /// <returns>string</returns>
+    // ------------------------------------------------------------------
+    public static string Format(
+        TextFormat format,
+        double number,
+        int significantDigits) {
+      return Format(format, number.ToString(), significantDigits);
+    }
+
+    // ------------------------------------------------------------------
+    /// <summary>
+    /// Returns a string that's formatted using the specified format for
+    /// the text specified.  If a format other than 'String' is specified,
+    /// the text is first converted to a double, then the resultant string
+    /// that represents the number in the specified format is returned.  If
+    /// the conversion from the text to a double fails, no exception is
+    /// thrown.  The supplied text is simply returned.
+    /// </summary>
+    /// <param name="format">TextFormat</param>
+    /// <param name="text">string</param>
+    /// <param name="significantDigits">int</param>
+    /// <returns>string</returns>
+    // ------------------------------------------------------------------
+    public static string Format(
+        TextFormat format,
+        string text,
+        int significantDigits) {
+      double myNumber = double.MaxValue;
+      string result = "";
+
+      // Only if the format specified isn't a string,
+      // then try to convert the text to a number.  If the
+      // conversion fails, just return the text.
+      if (format != TextFormat.String) {
+        try {
+          myNumber = double.Parse(text);
         }
+        catch {
+          return text;
+        }
+      }
 
-        // ------------------------------------------------------------------
-        /// <summary>
-        /// Returns a string that's formatted using the specified format for
-        /// the text specified.  If a format other than 'String' is specified,
-        /// the text is first converted to a double, then the resultant string
-        /// that represents the number in the specified format is returned.  If
-        /// the conversion from the text to a double fails, no exception is
-        /// thrown.  The supplied text is simply returned.
-        /// </summary>
-        /// <param name="format">TextFormat</param>
-        /// <param name="text">string</param>
-        /// <param name="significantDigits">int</param>
-        /// <returns>string</returns>
-        // ------------------------------------------------------------------
-        public static string Format(
-            TextFormat format,
-            string text,
-            int significantDigits)
-        {
-            double myNumber = double.MaxValue;
-            string result = "";
+      // Used for the number of sig digs.  For one sig dig, this
+      // will be #.#.  For two sig digs, it'll be #.##.
+      string sigDigIdentifier = "#";
 
-            // Only if the format specified isn't a string,
-            // then try to convert the text to a number.  If the
-            // conversion fails, just return the text.
-            if (format != TextFormat.String)
-            {
-                try
-                {
-                    myNumber = double.Parse(text);
-                }
-                catch
-                {
-                    return text;
-                }
-            }
+      if (significantDigits > 0) {
+        sigDigIdentifier = "#.";
+        for (int i = 0; i < significantDigits; i++) {
+          sigDigIdentifier += "#";
+        }
+      }
+      switch (format) {
+        case TextFormat.String:
+          result = text;
+          break;
 
-            // Used for the number of sig digs.  For one sig dig, this
-            // will be #.#.  For two sig digs, it'll be #.##.
-            string sigDigIdentifier = "#";
+        case TextFormat.Currency:
+          result = String.Format("{0:c}", myNumber);
+          break;
 
-            if (significantDigits > 0)
-            {
-                sigDigIdentifier = "#.";
-                for (int i = 0; i < significantDigits; i++)
-                {
-                    sigDigIdentifier += "#";
-                }
-            }
-            switch (format)
-            {
-                case TextFormat.String:
-                    result = text;
-                    break;
+        case TextFormat.Decimal:
+          result = String.Format("{0:d}", (int)myNumber);
+          break;
 
-                case TextFormat.Currency:
-                    result = String.Format("{0:c}", myNumber);
-                    break;
+        case TextFormat.FixedPoint:
+          result = String.Format("{0:f}", myNumber);
+          break;
 
-                case TextFormat.Decimal:
-                    result = String.Format("{0:d}", (int)myNumber);
-                    break;
+        case TextFormat.General:
+          result = String.Format("{0:g}", myNumber);
+          break;
 
-                case TextFormat.FixedPoint:
-                    result = String.Format("{0:f}", myNumber);
-                    break;
+        case TextFormat.Hexadecimal:
+          result = String.Format("{0:x}", (int)myNumber);
+          break;
 
-                case TextFormat.General:
-                    result = String.Format("{0:g}", myNumber);
-                    break;
+        case TextFormat.Number:
+          //result = String.Format("{0:n}", myNumber);
+          result = myNumber.ToString(sigDigIdentifier);
+          break;
 
-                case TextFormat.Hexadecimal:
-                    result = String.Format("{0:x}", (int) myNumber);
-                    break;
+        case TextFormat.Percentage:
+          result = String.Format("{0:p}", myNumber);
+          break;
 
-                case TextFormat.Number:
-                    //result = String.Format("{0:n}", myNumber);
-                    result = myNumber.ToString(sigDigIdentifier);
-                    break;
+        case TextFormat.RoundTrip:
+          result = String.Format("{0:r}", myNumber);
+          break;
 
-                case TextFormat.Percentage:
-                    result = String.Format("{0:p}", myNumber);
-                    break;
+        case TextFormat.ScientificNotation:
+          //result = String.Format("{0:e}", myNumber);
+          result = myNumber.ToString(sigDigIdentifier + "E+0");
+          break;
 
-                case TextFormat.RoundTrip:
-                    result = String.Format("{0:r}", myNumber);
-                    break;
-
-                case TextFormat.ScientificNotation:
-                    //result = String.Format("{0:e}", myNumber);
-                    result = myNumber.ToString(sigDigIdentifier + "E+0");
-                    break;
-
-                default: result = text;
-                    break;
-            }
-            return result;
-        }
+        default: result = text;
+          break;
+      }
+      return result;
     }
+  }
 }
Index: /trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.Netron/3.0.2672.12446/Netron.Diagramming.Core-3.0.2672.12446/Tools/AbstractDrawingTool.cs
===================================================================
--- /trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.Netron/3.0.2672.12446/Netron.Diagramming.Core-3.0.2672.12446/Tools/AbstractDrawingTool.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.Netron/3.0.2672.12446/Netron.Diagramming.Core-3.0.2672.12446/Tools/AbstractDrawingTool.cs	(revision 4068)
@@ -1,185 +1,163 @@
 using System.Drawing;
 using System.Windows.Forms;
-using System.Diagnostics;
 
-namespace Netron.Diagramming.Core
-{
+namespace Netron.Diagramming.Core {
+  /// <summary>
+  /// The base class for a drawing tool.
+  /// </summary>
+  public abstract class AbstractDrawingTool :
+      AbstractTool,
+      IMouseListener,
+      IKeyboardListener {
+
+    #region Fields
+
+    // ------------------------------------------------------------------
     /// <summary>
-    /// The base class for a drawing tool.
+    /// The starting point of the rectangle being drawn.
     /// </summary>
-    public abstract class AbstractDrawingTool :
-        AbstractTool,
-        IMouseListener,
-        IKeyboardListener
-    {
+    // ------------------------------------------------------------------
+    protected Point startingPoint;
 
-        #region Fields
+    // ------------------------------------------------------------------
+    /// <summary>
+    /// Says whether the startingPoint was set, otherwise the ghost will 
+    /// appear even before an initial point was set!
+    /// </summary>
+    // ------------------------------------------------------------------
+    protected bool started;
 
-        // ------------------------------------------------------------------
-        /// <summary>
-        /// The starting point of the rectangle being drawn.
-        /// </summary>
-        // ------------------------------------------------------------------
-        protected Point startingPoint;
-
-        // ------------------------------------------------------------------
-        /// <summary>
-        /// Says whether the startingPoint was set, otherwise the ghost will 
-        /// appear even before an initial point was set!
-        /// </summary>
-        // ------------------------------------------------------------------
-        protected bool started;
-
-        // ------------------------------------------------------------------
-        /// <summary>
-        /// The actual rectangle which serves as a basis for the drawing of 
-        /// ellipses, rectangles, etc.
-        /// </summary>
-        // ------------------------------------------------------------------
-        private RectangleF mRectangle;
+    // ------------------------------------------------------------------
+    /// <summary>
+    /// The actual rectangle which serves as a basis for the drawing of 
+    /// ellipses, rectangles, etc.
+    /// </summary>
+    // ------------------------------------------------------------------
+    private RectangleF mRectangle;
 
 
-        #endregion
+    #endregion
 
-        #region Properties
-        protected RectangleF Rectangle
-        {
-            get { return mRectangle; }
-            set { mRectangle = value; }
-        }
+    #region Properties
+    protected RectangleF Rectangle {
+      get { return mRectangle; }
+      set { mRectangle = value; }
+    }
 
 
 
-        #endregion
+    #endregion
 
-        #region Constructor
-        /// <summary>
-        /// Default constructor
-        /// </summary>
-        /// <param name="name"></param>
-        protected AbstractDrawingTool(string name)
-            : base(name)
-        {
-        }
-        #endregion
+    #region Constructor
+    /// <summary>
+    /// Default constructor
+    /// </summary>
+    /// <param name="name"></param>
+    protected AbstractDrawingTool(string name)
+      : base(name) {
+    }
+    #endregion
 
-        #region Methods
+    #region Methods
 
-        protected override void OnActivateTool()
-        {
+    protected override void OnActivateTool() {
 
-            Controller.View.CurrentCursor = CursorPalette.Add;
+      Controller.View.CurrentCursor = CursorPalette.Add;
 
-        }
+    }
 
-        protected override void OnDeactivateTool()
-        {
+    protected override void OnDeactivateTool() {
 
-            base.OnDeactivateTool();
-        }
+      base.OnDeactivateTool();
+    }
 
-        #region Explicit implementation of IKeyboardListener
-        void IKeyboardListener.KeyDown(KeyEventArgs e)
-        {
-            OnKeyDown(e);
-        }
+    #region Explicit implementation of IKeyboardListener
+    void IKeyboardListener.KeyDown(KeyEventArgs e) {
+      OnKeyDown(e);
+    }
 
-        void IKeyboardListener.KeyUp(KeyEventArgs e)
-        {
-            OnKeyUp(e);
-        }
+    void IKeyboardListener.KeyUp(KeyEventArgs e) {
+      OnKeyUp(e);
+    }
 
-        void IKeyboardListener.KeyPress(KeyPressEventArgs e)
-        {
-            OnKeyPress(e);
-        }
+    void IKeyboardListener.KeyPress(KeyPressEventArgs e) {
+      OnKeyPress(e);
+    }
 
-        protected virtual void OnKeyDown(KeyEventArgs e)
-        {
-            //if (e.Handled) return;
+    protected virtual void OnKeyDown(KeyEventArgs e) {
+      //if (e.Handled) return;
 
-            if (e.KeyData == Keys.Escape)
-            {
-                DeactivateTool();
-                Controller.View.ResetGhost();
-                e.Handled = true;
-            }
-        }
-        protected virtual void OnKeyUp(KeyEventArgs e)
-        {
-            if (e.Handled) return;
-        }
+      if (e.KeyData == Keys.Escape) {
+        DeactivateTool();
+        Controller.View.ResetGhost();
+        e.Handled = true;
+      }
+    }
+    protected virtual void OnKeyUp(KeyEventArgs e) {
+      if (e.Handled) return;
+    }
 
-        protected virtual void OnKeyPress(KeyPressEventArgs e)
-        {
-            if (e.Handled) return;
-        }
-        #endregion
+    protected virtual void OnKeyPress(KeyPressEventArgs e) {
+      if (e.Handled) return;
+    }
+    #endregion
 
-        #region Explicit implementation of IMouseListener
-        bool IMouseListener.MouseDown(MouseEventArgs e)
-        {
-            return OnMouseDown(e);
-        }
+    #region Explicit implementation of IMouseListener
+    bool IMouseListener.MouseDown(MouseEventArgs e) {
+      return OnMouseDown(e);
+    }
 
-        void IMouseListener.MouseMove(MouseEventArgs e)
-        {
-            OnMouseMove(e);
-        }
+    void IMouseListener.MouseMove(MouseEventArgs e) {
+      OnMouseMove(e);
+    }
 
-        void IMouseListener.MouseUp(MouseEventArgs e)
-        {
-            OnMouseUp(e);
-        }
+    void IMouseListener.MouseUp(MouseEventArgs e) {
+      OnMouseUp(e);
+    }
 
 
-        protected virtual bool OnMouseDown(MouseEventArgs e)
-        {
-            if (IsActive && e.Button == MouseButtons.Left)
-            {
-                startingPoint = new Point(e.X, e.Y);
-                started = true;
-                return true;
-            }
-            return false;
-        }
+    protected virtual bool OnMouseDown(MouseEventArgs e) {
+      if (IsActive && e.Button == MouseButtons.Left) {
+        startingPoint = new Point(e.X, e.Y);
+        started = true;
+        return true;
+      }
+      return false;
+    }
 
-        protected virtual void OnMouseMove(MouseEventArgs e)
-        {
+    protected virtual void OnMouseMove(MouseEventArgs e) {
 
-        }
+    }
 
-        protected virtual void OnMouseUp(MouseEventArgs e)
-        {
-            if ((IsActive) &&
-                (started) &&
-                (Controller.View.Ghost != null))
-            {
+    protected virtual void OnMouseUp(MouseEventArgs e) {
+      if ((IsActive) &&
+          (started) &&
+          (Controller.View.Ghost != null)) {
 
-                //base.RestoreCursor();
-                Point point = new Point(e.X, e.Y);
-                //mRectangle = new Rectangle(startingPoint.X, startingPoint.Y, point.X - startingPoint.X, point.Y - startingPoint.Y);
-                //mRectangle = base.Controller.View.ViewToWorld(base.Controller.View.DeviceToView(rectangle));
-                mRectangle = Controller.View.Ghost.Rectangle;
-                GhostDrawingComplete();
-                Controller.View.ResetGhost();
-                started = false;
-            }
-        }
-        #endregion
+        //base.RestoreCursor();
+        Point point = new Point(e.X, e.Y);
+        //mRectangle = new Rectangle(startingPoint.X, startingPoint.Y, point.X - startingPoint.X, point.Y - startingPoint.Y);
+        //mRectangle = base.Controller.View.ViewToWorld(base.Controller.View.DeviceToView(rectangle));
+        mRectangle = Controller.View.Ghost.Rectangle;
+        GhostDrawingComplete();
+        Controller.View.ResetGhost();
+        started = false;
+      }
+    }
+    #endregion
 
-        /// <summary>
-        /// This method will be called when the user has finished drawing a 
-        /// ghost rectangle or bundle and initiates the actual creation of a 
-        /// bundle and the addition to the model via the appropriate command.
-        /// </summary>
-        protected abstract void GhostDrawingComplete();
+    /// <summary>
+    /// This method will be called when the user has finished drawing a 
+    /// ghost rectangle or bundle and initiates the actual creation of a 
+    /// bundle and the addition to the model via the appropriate command.
+    /// </summary>
+    protected abstract void GhostDrawingComplete();
 
-        #endregion
+    #endregion
 
 
 
 
-    }
+  }
 
 }
Index: /trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.Netron/3.0.2672.12446/Netron.Diagramming.Core-3.0.2672.12446/Tools/AlignBottomEdgesTool.cs
===================================================================
--- /trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.Netron/3.0.2672.12446/Netron.Diagramming.Core-3.0.2672.12446/Tools/AlignBottomEdgesTool.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.Netron/3.0.2672.12446/Netron.Diagramming.Core-3.0.2672.12446/Tools/AlignBottomEdgesTool.cs	(revision 4068)
@@ -1,58 +1,48 @@
-using System;
-using System.Collections.Generic;
-using System.Text;
-using System.Collections;
 using System.Drawing;
-using System.Windows.Forms;
 
-namespace Netron.Diagramming.Core
-{
-    // ----------------------------------------------------------------------
+namespace Netron.Diagramming.Core {
+  // ----------------------------------------------------------------------
+  /// <summary>
+  /// Aligns the bottom edges of the selected entities.
+  /// </summary>
+  // ----------------------------------------------------------------------
+  public class AlignBottomEdgesTool : AlignmentToolBase {
+    // ------------------------------------------------------------------
     /// <summary>
-    /// Aligns the bottom edges of the selected entities.
+    /// Constructor.
     /// </summary>
-    // ----------------------------------------------------------------------
-    public class AlignBottomEdgesTool : AlignmentToolBase
-    {
-        // ------------------------------------------------------------------
-        /// <summary>
-        /// Constructor.
-        /// </summary>
-        /// <param name="toolName">string: The name of this tool</param>
-        // ------------------------------------------------------------------
-        public AlignBottomEdgesTool(string toolName)
-            : base(toolName)
-        {
-        }
+    /// <param name="toolName">string: The name of this tool</param>
+    // ------------------------------------------------------------------
+    public AlignBottomEdgesTool(string toolName)
+      : base(toolName) {
+    }
 
-        // ------------------------------------------------------------------
-        /// <summary>
-        /// Aligns the bottom edges of all selected entities.  The vertical
-        /// location of the first entity in the selection is used for all 
-        /// other entities vertical location.
-        /// </summary>
-        // ------------------------------------------------------------------
-        public override void Align(IDiagramEntity[] entities)
-        {
-            // We want to align the bottom edges, so we need to set the
-            // vertical location of each shape to one value.  We're
-            // going use the first entity in the selection to determine
-            // this setting.
-            Point offset;
+    // ------------------------------------------------------------------
+    /// <summary>
+    /// Aligns the bottom edges of all selected entities.  The vertical
+    /// location of the first entity in the selection is used for all 
+    /// other entities vertical location.
+    /// </summary>
+    // ------------------------------------------------------------------
+    public override void Align(IDiagramEntity[] entities) {
+      // We want to align the bottom edges, so we need to set the
+      // vertical location of each shape to one value.  We're
+      // going use the first entity in the selection to determine
+      // this setting.
+      Point offset;
 
-            for (int i = 1; i < entities.Length; i++)
-            {
-                IDiagramEntity entity = entities[i];
+      for (int i = 1; i < entities.Length; i++) {
+        IDiagramEntity entity = entities[i];
 
-                // Keep the entities same y location but offset it's
-                // x location.
-                offset = new Point(
-                    0,
-                    this.bottomEdgeOfFirstEntity - entity.Rectangle.Bottom);
+        // Keep the entities same y location but offset it's
+        // x location.
+        offset = new Point(
+            0,
+            this.bottomEdgeOfFirstEntity - entity.Rectangle.Bottom);
 
-                // Move the entity by this amount.
-                entity.MoveBy(offset);
-            }
-        }
+        // Move the entity by this amount.
+        entity.MoveBy(offset);
+      }
     }
+  }
 }
Index: /trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.Netron/3.0.2672.12446/Netron.Diagramming.Core-3.0.2672.12446/Tools/AlignCentersHorizontallyTool.cs
===================================================================
--- /trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.Netron/3.0.2672.12446/Netron.Diagramming.Core-3.0.2672.12446/Tools/AlignCentersHorizontallyTool.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.Netron/3.0.2672.12446/Netron.Diagramming.Core-3.0.2672.12446/Tools/AlignCentersHorizontallyTool.cs	(revision 4068)
@@ -1,55 +1,45 @@
-using System;
-using System.Collections.Generic;
-using System.Text;
-using System.Collections;
 using System.Drawing;
-using System.Windows.Forms;
 
-namespace Netron.Diagramming.Core
-{
-    // ----------------------------------------------------------------------
+namespace Netron.Diagramming.Core {
+  // ----------------------------------------------------------------------
+  /// <summary>
+  /// Aligns the center of the selected entities horizontally.
+  /// </summary>
+  // ----------------------------------------------------------------------
+  public class AlignCentersHorizontallyTool : AlignmentToolBase {
+    // ------------------------------------------------------------------
     /// <summary>
-    /// Aligns the center of the selected entities horizontally.
+    /// Constructor.
     /// </summary>
-    // ----------------------------------------------------------------------
-    public class AlignCentersHorizontallyTool : AlignmentToolBase
-    {
-        // ------------------------------------------------------------------
-        /// <summary>
-        /// Constructor.
-        /// </summary>
-        /// <param name="toolName">string: The name of this tool</param>
-        // ------------------------------------------------------------------
-        public AlignCentersHorizontallyTool(string toolName)
-            : base(toolName)
-        {
-        }
+    /// <param name="toolName">string: The name of this tool</param>
+    // ------------------------------------------------------------------
+    public AlignCentersHorizontallyTool(string toolName)
+      : base(toolName) {
+    }
 
-        // ------------------------------------------------------------------
-        /// <summary>
-        /// Aligns the center of all selected entities horizontally.  The 
-        /// 'X' component of the center location of the first entity in the 
-        /// selection is used for all other entities.
-        /// </summary>
-        // ------------------------------------------------------------------
-        public override void Align(IDiagramEntity[] entities)
-        {
-            // The amount to offset the entities by.
-            Point offset;
+    // ------------------------------------------------------------------
+    /// <summary>
+    /// Aligns the center of all selected entities horizontally.  The 
+    /// 'X' component of the center location of the first entity in the 
+    /// selection is used for all other entities.
+    /// </summary>
+    // ------------------------------------------------------------------
+    public override void Align(IDiagramEntity[] entities) {
+      // The amount to offset the entities by.
+      Point offset;
 
-            for (int i = 1; i < entities.Length; i++)
-            {
-                IDiagramEntity entity = entities[i];
+      for (int i = 1; i < entities.Length; i++) {
+        IDiagramEntity entity = entities[i];
 
-                // Keep the entities same y location but offset it's
-                // x location.
-                offset = new Point(
-                    this.centerOfFirstEntity.X - entity.Center.X,
-                    0);
+        // Keep the entities same y location but offset it's
+        // x location.
+        offset = new Point(
+            this.centerOfFirstEntity.X - entity.Center.X,
+            0);
 
-                // Move the entity by this amount.
-                entity.MoveBy(offset);
-            }
-        }
+        // Move the entity by this amount.
+        entity.MoveBy(offset);
+      }
     }
+  }
 }
Index: /trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.Netron/3.0.2672.12446/Netron.Diagramming.Core-3.0.2672.12446/Tools/AlignCentersVerticallyTool.cs
===================================================================
--- /trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.Netron/3.0.2672.12446/Netron.Diagramming.Core-3.0.2672.12446/Tools/AlignCentersVerticallyTool.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.Netron/3.0.2672.12446/Netron.Diagramming.Core-3.0.2672.12446/Tools/AlignCentersVerticallyTool.cs	(revision 4068)
@@ -1,55 +1,45 @@
-using System;
-using System.Collections.Generic;
-using System.Text;
-using System.Collections;
 using System.Drawing;
-using System.Windows.Forms;
 
-namespace Netron.Diagramming.Core
-{
-    // ----------------------------------------------------------------------
+namespace Netron.Diagramming.Core {
+  // ----------------------------------------------------------------------
+  /// <summary>
+  /// Aligns the center of the selected entities vertically.
+  /// </summary>
+  // ----------------------------------------------------------------------
+  public class AlignCentersVerticallyTool : AlignmentToolBase {
+    // ------------------------------------------------------------------
     /// <summary>
-    /// Aligns the center of the selected entities vertically.
+    /// Constructor.
     /// </summary>
-    // ----------------------------------------------------------------------
-    public class AlignCentersVerticallyTool : AlignmentToolBase
-    {
-        // ------------------------------------------------------------------
-        /// <summary>
-        /// Constructor.
-        /// </summary>
-        /// <param name="toolName">string: The name of this tool</param>
-        // ------------------------------------------------------------------
-        public AlignCentersVerticallyTool(string toolName)
-            : base(toolName)
-        {
-        }
+    /// <param name="toolName">string: The name of this tool</param>
+    // ------------------------------------------------------------------
+    public AlignCentersVerticallyTool(string toolName)
+      : base(toolName) {
+    }
 
-        // ------------------------------------------------------------------
-        /// <summary>
-        /// Aligns the center of all selected entities vertically.  The 
-        /// 'Y' component of the center location of the first entity in the 
-        /// selection is used for all other entities.
-        /// </summary>
-        // ------------------------------------------------------------------
-        public override void Align(IDiagramEntity[] entities)
-        {
-            // The amount to offset the entities by.
-            Point offset;
+    // ------------------------------------------------------------------
+    /// <summary>
+    /// Aligns the center of all selected entities vertically.  The 
+    /// 'Y' component of the center location of the first entity in the 
+    /// selection is used for all other entities.
+    /// </summary>
+    // ------------------------------------------------------------------
+    public override void Align(IDiagramEntity[] entities) {
+      // The amount to offset the entities by.
+      Point offset;
 
-            for (int i = 1; i < entities.Length; i++)
-            {
-                IDiagramEntity entity = entities[i];
+      for (int i = 1; i < entities.Length; i++) {
+        IDiagramEntity entity = entities[i];
 
-                // Keep the entities same x location but offset it's
-                // y location.
-                offset = new Point(
-                    0,
-                    this.centerOfFirstEntity.Y - entity.Center.Y);
+        // Keep the entities same x location but offset it's
+        // y location.
+        offset = new Point(
+            0,
+            this.centerOfFirstEntity.Y - entity.Center.Y);
 
-                // Move the entity by this amount.
-                entity.MoveBy(offset);
-            }
-        }
+        // Move the entity by this amount.
+        entity.MoveBy(offset);
+      }
     }
+  }
 }
Index: /trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.Netron/3.0.2672.12446/Netron.Diagramming.Core-3.0.2672.12446/Tools/AlignLeftEdgesTool.cs
===================================================================
--- /trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.Netron/3.0.2672.12446/Netron.Diagramming.Core-3.0.2672.12446/Tools/AlignLeftEdgesTool.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.Netron/3.0.2672.12446/Netron.Diagramming.Core-3.0.2672.12446/Tools/AlignLeftEdgesTool.cs	(revision 4068)
@@ -1,58 +1,48 @@
-using System;
-using System.Collections.Generic;
-using System.Text;
-using System.Collections;
 using System.Drawing;
-using System.Windows.Forms;
 
-namespace Netron.Diagramming.Core
-{
-    // ----------------------------------------------------------------------
+namespace Netron.Diagramming.Core {
+  // ----------------------------------------------------------------------
+  /// <summary>
+  /// Aligns the left edges of the selected entities.
+  /// </summary>
+  // ----------------------------------------------------------------------
+  public class AlignLeftEdgesTool : AlignmentToolBase {
+    // ------------------------------------------------------------------
     /// <summary>
-    /// Aligns the left edges of the selected entities.
+    /// Constructor.
     /// </summary>
-    // ----------------------------------------------------------------------
-    public class AlignLeftEdgesTool : AlignmentToolBase
-    {
-        // ------------------------------------------------------------------
-        /// <summary>
-        /// Constructor.
-        /// </summary>
-        /// <param name="toolName">string: The name of this tool</param>
-        // ------------------------------------------------------------------
-        public AlignLeftEdgesTool(string toolName)
-            : base(toolName)
-        {
-        }
+    /// <param name="toolName">string: The name of this tool</param>
+    // ------------------------------------------------------------------
+    public AlignLeftEdgesTool(string toolName)
+      : base(toolName) {
+    }
 
-        // ------------------------------------------------------------------
-        /// <summary>
-        /// Aligns the left edges of all selected entities.  The horizontal
-        /// location of the first entity in the selection is used for all 
-        /// other entities horizontal location.
-        /// </summary>
-        // ------------------------------------------------------------------
-        public override void Align(IDiagramEntity[] entities)
-        {
-            // We want to align the left edges, so we need to set the
-            // horizontal location of each shape to one value.  We're
-            // going use the first entity in the selection to determine
-            // this setting.
-            Point offset;
+    // ------------------------------------------------------------------
+    /// <summary>
+    /// Aligns the left edges of all selected entities.  The horizontal
+    /// location of the first entity in the selection is used for all 
+    /// other entities horizontal location.
+    /// </summary>
+    // ------------------------------------------------------------------
+    public override void Align(IDiagramEntity[] entities) {
+      // We want to align the left edges, so we need to set the
+      // horizontal location of each shape to one value.  We're
+      // going use the first entity in the selection to determine
+      // this setting.
+      Point offset;
 
-            for (int i = 1; i < entities.Length; i++)
-            {
-                IDiagramEntity entity = entities[i];
+      for (int i = 1; i < entities.Length; i++) {
+        IDiagramEntity entity = entities[i];
 
-                // Keep the entities same y location but offset it's
-                // x location.
-                offset = new Point(
-                    this.xLocationOfFirstEntity - entity.Rectangle.Location.X,
-                    0);
+        // Keep the entities same y location but offset it's
+        // x location.
+        offset = new Point(
+            this.xLocationOfFirstEntity - entity.Rectangle.Location.X,
+            0);
 
-                // Move the entity by this amount.
-                entity.MoveBy(offset);
-            }
-        }
+        // Move the entity by this amount.
+        entity.MoveBy(offset);
+      }
     }
+  }
 }
Index: /trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.Netron/3.0.2672.12446/Netron.Diagramming.Core-3.0.2672.12446/Tools/AlignRightEdgesTool.cs
===================================================================
--- /trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.Netron/3.0.2672.12446/Netron.Diagramming.Core-3.0.2672.12446/Tools/AlignRightEdgesTool.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.Netron/3.0.2672.12446/Netron.Diagramming.Core-3.0.2672.12446/Tools/AlignRightEdgesTool.cs	(revision 4068)
@@ -1,58 +1,48 @@
-using System;
-using System.Collections.Generic;
-using System.Text;
-using System.Collections;
 using System.Drawing;
-using System.Windows.Forms;
 
-namespace Netron.Diagramming.Core
-{
-    // ----------------------------------------------------------------------
+namespace Netron.Diagramming.Core {
+  // ----------------------------------------------------------------------
+  /// <summary>
+  /// Aligns the right edges of the selected entities.
+  /// </summary>
+  // ----------------------------------------------------------------------
+  public class AlignRightEdgesTool : AlignmentToolBase {
+    // ------------------------------------------------------------------
     /// <summary>
-    /// Aligns the right edges of the selected entities.
+    /// Constructor.
     /// </summary>
-    // ----------------------------------------------------------------------
-    public class AlignRightEdgesTool : AlignmentToolBase
-    {
-        // ------------------------------------------------------------------
-        /// <summary>
-        /// Constructor.
-        /// </summary>
-        /// <param name="toolName">string: The name of this tool</param>
-        // ------------------------------------------------------------------
-        public AlignRightEdgesTool(string toolName)
-            : base(toolName)
-        {
-        }
+    /// <param name="toolName">string: The name of this tool</param>
+    // ------------------------------------------------------------------
+    public AlignRightEdgesTool(string toolName)
+      : base(toolName) {
+    }
 
-        // ------------------------------------------------------------------
-        /// <summary>
-        /// Aligns the right edges of all selected entities.  The horizontal
-        /// location of the first entity in the selection is used for all 
-        /// other entities horizontal location.
-        /// </summary>
-        // ------------------------------------------------------------------
-        public override void Align(IDiagramEntity[] entities)
-        {
-            // We want to align the left edges, so we need to set the
-            // horizontal location of each shape to one value.  We're
-            // going use the first entity in the selection to determine
-            // this setting.
-            Point offset;
+    // ------------------------------------------------------------------
+    /// <summary>
+    /// Aligns the right edges of all selected entities.  The horizontal
+    /// location of the first entity in the selection is used for all 
+    /// other entities horizontal location.
+    /// </summary>
+    // ------------------------------------------------------------------
+    public override void Align(IDiagramEntity[] entities) {
+      // We want to align the left edges, so we need to set the
+      // horizontal location of each shape to one value.  We're
+      // going use the first entity in the selection to determine
+      // this setting.
+      Point offset;
 
-            for (int i = 1; i < entities.Length; i++)
-            {
-                IDiagramEntity entity = entities[i];
+      for (int i = 1; i < entities.Length; i++) {
+        IDiagramEntity entity = entities[i];
 
-                // Keep the entities same y location but offset it's
-                // x location.
-                offset = new Point(
-                    this.rightEdgeOfFirstEntity - entity.Rectangle.Right,
-                    0);
+        // Keep the entities same y location but offset it's
+        // x location.
+        offset = new Point(
+            this.rightEdgeOfFirstEntity - entity.Rectangle.Right,
+            0);
 
-                // Move the entity by this amount.
-                entity.MoveBy(offset);
-            }
-        }
+        // Move the entity by this amount.
+        entity.MoveBy(offset);
+      }
     }
+  }
 }
Index: /trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.Netron/3.0.2672.12446/Netron.Diagramming.Core-3.0.2672.12446/Tools/AlignTool.cs
===================================================================
--- /trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.Netron/3.0.2672.12446/Netron.Diagramming.Core-3.0.2672.12446/Tools/AlignTool.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.Netron/3.0.2672.12446/Netron.Diagramming.Core-3.0.2672.12446/Tools/AlignTool.cs	(revision 4068)
@@ -1,99 +1,87 @@
-using System;
-using System.Diagnostics;
-using System.Collections;
-using System.Drawing;
 using System.Windows.Forms;
 
-namespace Netron.Diagramming.Core
-{
-    // ----------------------------------------------------------------------
+namespace Netron.Diagramming.Core {
+  // ----------------------------------------------------------------------
+  /// <summary>
+  /// Tool to align shapes in various ways
+  /// </summary>
+  // ----------------------------------------------------------------------
+  public class AlignTool : AbstractTool {
+
+    #region Fields
+
+    // ------------------------------------------------------------------
     /// <summary>
-    /// Tool to align shapes in various ways
+    /// The type of alignment to apply.
     /// </summary>
-    // ----------------------------------------------------------------------
-    public class AlignTool : AbstractTool
-    {
+    // ------------------------------------------------------------------
+    private ShapeAlignment mAlignment;
 
-        #region Fields
-
-        // ------------------------------------------------------------------
-        /// <summary>
-        /// The type of alignment to apply.
-        /// </summary>
-        // ------------------------------------------------------------------
-        private ShapeAlignment mAlignment;
-
-        // ------------------------------------------------------------------
-        /// <summary>
-        /// Gets or sets the type of alignment to apply.
-        /// </summary>
-        // ------------------------------------------------------------------
-        public ShapeAlignment Alignment
-        {
-            get { return mAlignment; }
-            set { mAlignment = value; }
-        }
-
-  
-        #endregion
-
-        #region Constructor
-
-        // ------------------------------------------------------------------
-        /// <summary>
-        /// Initializes a new instance of the <see cref="T:AlignTool"/> class.
-        /// </summary>
-        /// <param name="name">The name of the tool.</param>
-        // ------------------------------------------------------------------
-        public AlignTool(string name) : base(name)
-        { 
-        }
-        #endregion
-
-        #region Methods
-
-        /// <summary>
-        /// Called when the tool is activated.
-        /// </summary>
-        protected override void OnActivateTool()
-        {
-            bool valid = true;
-            
-            #region Validation of the selection
-            
-            //make sure we have the correct stuff on the table
-            if (this.Controller.Model.Selection.SelectedItems == null || this.Controller.Model.Selection.SelectedItems.Count == 0)
-            {
-                MessageBox.Show("Nothing is selected, you need to select an existing group.", "Nothing selected.", MessageBoxButtons.OK, MessageBoxIcon.Hand);
-                valid = false;                
-            } else if (this.Controller.Model.Selection.SelectedItems.Count != 1)
-            {
-                MessageBox.Show("Multiple items are selected, select only one group.", "Multiple items", MessageBoxButtons.OK, MessageBoxIcon.Hand);
-                valid = false;
-            } else if (!(this.Controller.Model.Selection.SelectedItems[0] is IGroup))
-            {
-                MessageBox.Show("The selected item is not a group.", "Not a group.", MessageBoxButtons.OK, MessageBoxIcon.Hand);
-                valid = false;
-            }
-            #endregion
-
-            if (valid)
-            {
-                UngroupCommand cmd = new UngroupCommand(
-                    this.Controller,
-                   this.Controller.Model.Selection.SelectedItems[0] as IGroup);
-
-                this.Controller.UndoManager.AddUndoCommand(cmd);
-                cmd.Redo();
-            }
-             DeactivateTool();
-             return;
-        }
-
-     
-        #endregion
-
-      
+    // ------------------------------------------------------------------
+    /// <summary>
+    /// Gets or sets the type of alignment to apply.
+    /// </summary>
+    // ------------------------------------------------------------------
+    public ShapeAlignment Alignment {
+      get { return mAlignment; }
+      set { mAlignment = value; }
     }
 
+
+    #endregion
+
+    #region Constructor
+
+    // ------------------------------------------------------------------
+    /// <summary>
+    /// Initializes a new instance of the <see cref="T:AlignTool"/> class.
+    /// </summary>
+    /// <param name="name">The name of the tool.</param>
+    // ------------------------------------------------------------------
+    public AlignTool(string name)
+      : base(name) {
+    }
+    #endregion
+
+    #region Methods
+
+    /// <summary>
+    /// Called when the tool is activated.
+    /// </summary>
+    protected override void OnActivateTool() {
+      bool valid = true;
+
+      #region Validation of the selection
+
+      //make sure we have the correct stuff on the table
+      if (this.Controller.Model.Selection.SelectedItems == null || this.Controller.Model.Selection.SelectedItems.Count == 0) {
+        MessageBox.Show("Nothing is selected, you need to select an existing group.", "Nothing selected.", MessageBoxButtons.OK, MessageBoxIcon.Hand);
+        valid = false;
+      } else if (this.Controller.Model.Selection.SelectedItems.Count != 1) {
+        MessageBox.Show("Multiple items are selected, select only one group.", "Multiple items", MessageBoxButtons.OK, MessageBoxIcon.Hand);
+        valid = false;
+      } else if (!(this.Controller.Model.Selection.SelectedItems[0] is IGroup)) {
+        MessageBox.Show("The selected item is not a group.", "Not a group.", MessageBoxButtons.OK, MessageBoxIcon.Hand);
+        valid = false;
+      }
+      #endregion
+
+      if (valid) {
+        UngroupCommand cmd = new UngroupCommand(
+            this.Controller,
+           this.Controller.Model.Selection.SelectedItems[0] as IGroup);
+
+        this.Controller.UndoManager.AddUndoCommand(cmd);
+        cmd.Redo();
+      }
+      DeactivateTool();
+      return;
+    }
+
+
+    #endregion
+
+
+  }
+
 }
Index: /trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.Netron/3.0.2672.12446/Netron.Diagramming.Core-3.0.2672.12446/Tools/AlignTopEdgesTool.cs
===================================================================
--- /trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.Netron/3.0.2672.12446/Netron.Diagramming.Core-3.0.2672.12446/Tools/AlignTopEdgesTool.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.Netron/3.0.2672.12446/Netron.Diagramming.Core-3.0.2672.12446/Tools/AlignTopEdgesTool.cs	(revision 4068)
@@ -1,58 +1,48 @@
-using System;
-using System.Collections.Generic;
-using System.Text;
-using System.Collections;
 using System.Drawing;
-using System.Windows.Forms;
 
-namespace Netron.Diagramming.Core
-{
-    // ----------------------------------------------------------------------
+namespace Netron.Diagramming.Core {
+  // ----------------------------------------------------------------------
+  /// <summary>
+  /// Aligns the top edges of the selected entities.
+  /// </summary>
+  // ----------------------------------------------------------------------
+  public class AlignTopEdgesTool : AlignmentToolBase {
+    // ------------------------------------------------------------------
     /// <summary>
-    /// Aligns the top edges of the selected entities.
+    /// Constructor.
     /// </summary>
-    // ----------------------------------------------------------------------
-    public class AlignTopEdgesTool : AlignmentToolBase
-    {
-        // ------------------------------------------------------------------
-        /// <summary>
-        /// Constructor.
-        /// </summary>
-        /// <param name="toolName">string: The name of this tool</param>
-        // ------------------------------------------------------------------
-        public AlignTopEdgesTool(string toolName)
-            : base(toolName)
-        {
-        }
+    /// <param name="toolName">string: The name of this tool</param>
+    // ------------------------------------------------------------------
+    public AlignTopEdgesTool(string toolName)
+      : base(toolName) {
+    }
 
-        // ------------------------------------------------------------------
-        /// <summary>
-        /// Aligns the top edges of all selected entities.  The vertical
-        /// location of the first entity in the selection is used for all 
-        /// other entities vertical location.
-        /// </summary>
-        // ------------------------------------------------------------------
-        public override void Align(IDiagramEntity[] entities)
-        {
-            // We want to align the top edges, so we need to set the
-            // vertical location of each shape to one value.  We're
-            // going use the first entity in the selection to determine
-            // this setting.
-            Point offset;
+    // ------------------------------------------------------------------
+    /// <summary>
+    /// Aligns the top edges of all selected entities.  The vertical
+    /// location of the first entity in the selection is used for all 
+    /// other entities vertical location.
+    /// </summary>
+    // ------------------------------------------------------------------
+    public override void Align(IDiagramEntity[] entities) {
+      // We want to align the top edges, so we need to set the
+      // vertical location of each shape to one value.  We're
+      // going use the first entity in the selection to determine
+      // this setting.
+      Point offset;
 
-            for (int i = 1; i < entities.Length; i++)
-            {
-                IDiagramEntity entity = entities[i];
+      for (int i = 1; i < entities.Length; i++) {
+        IDiagramEntity entity = entities[i];
 
-                // Keep the entities same y location but offset it's
-                // x location.
-                offset = new Point(
-                    0,
-                    this.topEdgeOfFirstEntity - entity.Rectangle.Top);
+        // Keep the entities same y location but offset it's
+        // x location.
+        offset = new Point(
+            0,
+            this.topEdgeOfFirstEntity - entity.Rectangle.Top);
 
-                // Move the entity by this amount.
-                entity.MoveBy(offset);
-            }
-        }
+        // Move the entity by this amount.
+        entity.MoveBy(offset);
+      }
     }
+  }
 }
Index: /trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.Netron/3.0.2672.12446/Netron.Diagramming.Core-3.0.2672.12446/Tools/AlignmentToolBase.cs
===================================================================
--- /trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.Netron/3.0.2672.12446/Netron.Diagramming.Core-3.0.2672.12446/Tools/AlignmentToolBase.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.Netron/3.0.2672.12446/Netron.Diagramming.Core-3.0.2672.12446/Tools/AlignmentToolBase.cs	(revision 4068)
@@ -1,94 +1,85 @@
-using System;
-using System.Collections.Generic;
-using System.Text;
+using System.Drawing;
 using System.Windows.Forms;
-using System.Drawing;
 
-namespace Netron.Diagramming.Core
-{
-    public abstract class AlignmentToolBase : AbstractTool
-    {
-        protected IDiagramEntity firstEntity;
-        protected int xLocationOfFirstEntity;
-        protected int yLocationOfFirstEntity;
-        protected int topEdgeOfFirstEntity;
-        protected int bottomEdgeOfFirstEntity;
-        protected Point centerOfFirstEntity;
-        protected int rightEdgeOfFirstEntity;
+namespace Netron.Diagramming.Core {
+  public abstract class AlignmentToolBase : AbstractTool {
+    protected IDiagramEntity firstEntity;
+    protected int xLocationOfFirstEntity;
+    protected int yLocationOfFirstEntity;
+    protected int topEdgeOfFirstEntity;
+    protected int bottomEdgeOfFirstEntity;
+    protected Point centerOfFirstEntity;
+    protected int rightEdgeOfFirstEntity;
 
-        // ------------------------------------------------------------------
-        /// <summary>
-        /// Constructor.
-        /// </summary>
-        /// <param name="toolName">string: The name of this tool</param>
-        // ------------------------------------------------------------------
-        public AlignmentToolBase(string toolName)
-            : base(toolName)
-        {
-        }
+    // ------------------------------------------------------------------
+    /// <summary>
+    /// Constructor.
+    /// </summary>
+    /// <param name="toolName">string: The name of this tool</param>
+    // ------------------------------------------------------------------
+    public AlignmentToolBase(string toolName)
+      : base(toolName) {
+    }
 
-        // ------------------------------------------------------------------
-        /// <summary>
-        /// Activates the tool.  First a check is performed to ensure there
-        /// are at least two IDiagramEntities selected.  If so, then the
-        /// x, y, top edge, bottom edge, and center of the first entity
-        /// is stored in local, protected variables for all other alignment
-        /// tools to use.
-        /// </summary>
-        // ------------------------------------------------------------------
-        protected override void OnActivateTool()
-        {
-            base.OnActivateTool();
+    // ------------------------------------------------------------------
+    /// <summary>
+    /// Activates the tool.  First a check is performed to ensure there
+    /// are at least two IDiagramEntities selected.  If so, then the
+    /// x, y, top edge, bottom edge, and center of the first entity
+    /// is stored in local, protected variables for all other alignment
+    /// tools to use.
+    /// </summary>
+    // ------------------------------------------------------------------
+    protected override void OnActivateTool() {
+      base.OnActivateTool();
 
-            // Make sure enough items were selected.
-            if (this.Controller.Model.Selection.SelectedItems == null)
-            {
-                MessageBox.Show(
-                    "Nothing is selected, you need to select at " +
-                    "least two items to align.",
-                    "Nothing selected.",
-                    MessageBoxButtons.OK,
-                    MessageBoxIcon.Hand);
+      // Make sure enough items were selected.
+      if (this.Controller.Model.Selection.SelectedItems == null) {
+        MessageBox.Show(
+            "Nothing is selected, you need to select at " +
+            "least two items to align.",
+            "Nothing selected.",
+            MessageBoxButtons.OK,
+            MessageBoxIcon.Hand);
 
-                return;
-            }
+        return;
+      }
 
-            if (this.Controller.Model.Selection.SelectedItems.Count <= 1)
-            {
-                MessageBox.Show(
-                    "You need to select at least two items to align.",
-                    "Nothing selected.",
-                    MessageBoxButtons.OK,
-                    MessageBoxIcon.Hand);
+      if (this.Controller.Model.Selection.SelectedItems.Count <= 1) {
+        MessageBox.Show(
+            "You need to select at least two items to align.",
+            "Nothing selected.",
+            MessageBoxButtons.OK,
+            MessageBoxIcon.Hand);
 
-                return;
-            }
+        return;
+      }
 
-            // Since there are enough items, peform the alignment.  But
-            // first get all aspects about the location of the first
-            // entity.
-            this.firstEntity = this.Controller.Model.Selection.SelectedItems[0];
-            this.xLocationOfFirstEntity = firstEntity.Rectangle.X;
-            this.yLocationOfFirstEntity = firstEntity.Rectangle.Y;
-            this.topEdgeOfFirstEntity = firstEntity.Rectangle.Top;
-            this.bottomEdgeOfFirstEntity = firstEntity.Rectangle.Bottom;
-            this.rightEdgeOfFirstEntity = firstEntity.Rectangle.Right;
-            this.centerOfFirstEntity = firstEntity.Center;
+      // Since there are enough items, peform the alignment.  But
+      // first get all aspects about the location of the first
+      // entity.
+      this.firstEntity = this.Controller.Model.Selection.SelectedItems[0];
+      this.xLocationOfFirstEntity = firstEntity.Rectangle.X;
+      this.yLocationOfFirstEntity = firstEntity.Rectangle.Y;
+      this.topEdgeOfFirstEntity = firstEntity.Rectangle.Top;
+      this.bottomEdgeOfFirstEntity = firstEntity.Rectangle.Bottom;
+      this.rightEdgeOfFirstEntity = firstEntity.Rectangle.Right;
+      this.centerOfFirstEntity = firstEntity.Center;
 
-            this.Align(this.Controller.Model.Selection.SelectedItems.ToArray());
+      this.Align(this.Controller.Model.Selection.SelectedItems.ToArray());
 
-            // Reset the Tracker.
-            this.Controller.View.ShowTracker();
-            DeactivateTool();
-        }
+      // Reset the Tracker.
+      this.Controller.View.ShowTracker();
+      DeactivateTool();
+    }
 
-        // ------------------------------------------------------------------
-        /// <summary>
-        /// Abstract method to be implemented by all alignment tools.
-        /// </summary>
-        /// <param name="entities">IDiagramEntity[]: All selected
-        /// entities.</param>
-        // ------------------------------------------------------------------
-        public abstract void Align(IDiagramEntity[] entities);
-    }
+    // ------------------------------------------------------------------
+    /// <summary>
+    /// Abstract method to be implemented by all alignment tools.
+    /// </summary>
+    /// <param name="entities">IDiagramEntity[]: All selected
+    /// entities.</param>
+    // ------------------------------------------------------------------
+    public abstract void Align(IDiagramEntity[] entities);
+  }
 }
Index: /trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.Netron/3.0.2672.12446/Netron.Diagramming.Core-3.0.2672.12446/Tools/ComplexRectangleTool.cs
===================================================================
--- /trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.Netron/3.0.2672.12446/Netron.Diagramming.Core-3.0.2672.12446/Tools/ComplexRectangleTool.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.Netron/3.0.2672.12446/Netron.Diagramming.Core-3.0.2672.12446/Tools/ComplexRectangleTool.cs	(revision 4068)
@@ -1,74 +1,66 @@
-using System;
 using System.Drawing;
 
-namespace Netron.Diagramming.Core
-{
-    /// <summary>
-    /// Tool to draw complex rectangles on the canvas
-    /// </summary>
-    public class ComplexRectangleTool : AbstractDrawingTool
-    {
-        #region Fields
+namespace Netron.Diagramming.Core {
+  /// <summary>
+  /// Tool to draw complex rectangles on the canvas
+  /// </summary>
+  public class ComplexRectangleTool : AbstractDrawingTool {
+    #region Fields
 
-        #endregion
+    #endregion
 
-        #region Properties
+    #region Properties
 
-        #endregion
+    #endregion
 
-        #region Constructor
-        public ComplexRectangleTool() : base("ComplexRectangle Tool")
-        {
-        }
-        public ComplexRectangleTool(string name): base(name)
-        {
+    #region Constructor
+    public ComplexRectangleTool()
+      : base("ComplexRectangle Tool") {
+    }
+    public ComplexRectangleTool(string name)
+      : base(name) {
 
-        }
-        #endregion
+    }
+    #endregion
 
-        #region Methods
-        protected override void OnMouseMove(System.Windows.Forms.MouseEventArgs e)
-        {
-            base.OnMouseMove(e);
-            if (IsActive && started)
-            {
-                Point point = new Point(e.X, e.Y);               
+    #region Methods
+    protected override void OnMouseMove(System.Windows.Forms.MouseEventArgs e) {
+      base.OnMouseMove(e);
+      if (IsActive && started) {
+        Point point = new Point(e.X, e.Y);
 
-                Controller.View.PaintGhostRectangle(startingPoint, point);
+        Controller.View.PaintGhostRectangle(startingPoint, point);
 
-                Controller.View.Invalidate(System.Drawing.Rectangle.Inflate(Controller.View.Ghost.Rectangle,20,20));
-            }
-        }
+        Controller.View.Invalidate(System.Drawing.Rectangle.Inflate(Controller.View.Ghost.Rectangle, 20, 20));
+      }
+    }
 
 
-        /// <summary>
-        /// This method will be called when the user has finished drawing a ghost rectangle or bundle
-        /// and initiates the actual creation of a bundle and the addition to the model via the appropriate command.
-        /// </summary>
-        protected override void GhostDrawingComplete()
-        {
+    /// <summary>
+    /// This method will be called when the user has finished drawing a ghost rectangle or bundle
+    /// and initiates the actual creation of a bundle and the addition to the model via the appropriate command.
+    /// </summary>
+    protected override void GhostDrawingComplete() {
 
-            try
-            {
-                ComplexRectangle shape = new ComplexRectangle(this.Controller.Model);
-                shape.Width = (int) Rectangle.Width;
-                shape.Height = (int) Rectangle.Height;
-                AddShapeCommand cmd = new AddShapeCommand(this.Controller, shape, new Point((int) Rectangle.X, (int)Rectangle.Y));
-                this.Controller.UndoManager.AddUndoCommand(cmd);
-                cmd.Redo();
-            }
-            catch
-            {
-                base.Controller.DeactivateTool(this);
-                Controller.View.Invalidate();
-                throw;
-            }
+      try {
+        ComplexRectangle shape = new ComplexRectangle(this.Controller.Model);
+        shape.Width = (int)Rectangle.Width;
+        shape.Height = (int)Rectangle.Height;
+        AddShapeCommand cmd = new AddShapeCommand(this.Controller, shape, new Point((int)Rectangle.X, (int)Rectangle.Y));
+        this.Controller.UndoManager.AddUndoCommand(cmd);
+        cmd.Redo();
+      }
+      catch {
+        base.Controller.DeactivateTool(this);
+        Controller.View.Invalidate();
+        throw;
+      }
 
-            //base.Controller.DeactivateTool(this);
-        }
+      //base.Controller.DeactivateTool(this);
+    }
 
 
-        #endregion
-    }
+    #endregion
+  }
 
 }
Index: /trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.Netron/3.0.2672.12446/Netron.Diagramming.Core-3.0.2672.12446/Tools/ConnectionTool.cs
===================================================================
--- /trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.Netron/3.0.2672.12446/Netron.Diagramming.Core-3.0.2672.12446/Tools/ConnectionTool.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.Netron/3.0.2672.12446/Netron.Diagramming.Core-3.0.2672.12446/Tools/ConnectionTool.cs	(revision 4068)
@@ -1,5 +1,3 @@
 using System;
-using System.Diagnostics;
-using System.Collections;
 using System.Drawing;
 using System.Windows.Forms;
Index: /trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.Netron/3.0.2672.12446/Netron.Diagramming.Core-3.0.2672.12446/Tools/ConnectorMoverTool.cs
===================================================================
--- /trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.Netron/3.0.2672.12446/Netron.Diagramming.Core-3.0.2672.12446/Tools/ConnectorMoverTool.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.Netron/3.0.2672.12446/Netron.Diagramming.Core-3.0.2672.12446/Tools/ConnectorMoverTool.cs	(revision 4068)
@@ -1,118 +1,106 @@
 using System;
-using System.Diagnostics;
-using System.Collections;
 using System.Drawing;
 using System.Windows.Forms;
 
-namespace Netron.Diagramming.Core
-{
+namespace Netron.Diagramming.Core {
+  /// <summary>
+  /// This tool implement the action of moving shape connectors on the canvas.     
+  /// </summary>
+  class ConnectorMoverTool : AbstractTool, IMouseListener {
+
+    #region Fields
     /// <summary>
-    /// This tool implement the action of moving shape connectors on the canvas.     
+    /// the location of the mouse when the motion starts
     /// </summary>
-    class ConnectorMoverTool : AbstractTool, IMouseListener
-    {
+    private Point initialPoint;
+    /// <summary>
+    /// the intermediate location of the mouse during the motion
+    /// </summary>
+    private Point lastPoint;
+    /// <summary>
+    /// the connector being moved
+    /// </summary>
+    private IConnector fetchedConnector;
+    /// <summary>
+    /// whether we are currently moving something
+    /// </summary>
+    private bool motionStarted;
 
-        #region Fields
-        /// <summary>
-        /// the location of the mouse when the motion starts
-        /// </summary>
-        private Point initialPoint;
-        /// <summary>
-        /// the intermediate location of the mouse during the motion
-        /// </summary>
-        private Point lastPoint;
-        /// <summary>
-        /// the connector being moved
-        /// </summary>
-        private IConnector fetchedConnector;
-        /// <summary>
-        /// whether we are currently moving something
-        /// </summary>
-        private bool motionStarted;
+    #endregion
 
-        #endregion
+    #region Constructor
+    /// <summary>
+    /// Initializes a new instance of the <see cref="T:ConnectorMoverTool"/> class.
+    /// </summary>
+    /// <param name="name">The name of the tool.</param>
+    public ConnectorMoverTool(string name)
+      : base(name) {
+    }
+    #endregion
 
-        #region Constructor
-        /// <summary>
-        /// Initializes a new instance of the <see cref="T:ConnectorMoverTool"/> class.
-        /// </summary>
-        /// <param name="name">The name of the tool.</param>
-        public ConnectorMoverTool(string name) : base(name)
-        {
-        }
-        #endregion
+    #region Methods
 
-        #region Methods
-
-        /// <summary>
-        /// Called when the tool is activated.
-        /// </summary>
-        protected override void OnActivateTool()
-        {
-            Controller.View.CurrentCursor = CursorPalette.Select;
-            motionStarted = false;
-            fetchedConnector = null;
-        }
-
-        /// <summary>
-        /// Handles the mouse down event
-        /// </summary>
-        /// <param name="e">The <see cref="T:System.Windows.Forms.MouseEventArgs"/> instance containing the event data.</param>
-        public bool MouseDown(MouseEventArgs e)
-        {
-            if (e == null)
-                throw new ArgumentNullException("The argument object is 'null'");
-            if (e.Button == MouseButtons.Left && Enabled && !IsSuspended)
-            {
-                fetchedConnector =this.Controller.Model.Selection.FindShapeConnector(e.Location);
-                if(fetchedConnector != null)
-                {
-                    
-                        initialPoint = e.Location;
-                        lastPoint = initialPoint;
-                        motionStarted = true;
-                        return true;                    
-                }
-            }
-            return false;
-        }
-
-        /// <summary>
-        /// Handles the mouse move event
-        /// </summary>
-        /// <param name="e">The <see cref="T:System.Windows.Forms.MouseEventArgs"/> instance containing the event data.</param>
-        public void MouseMove(MouseEventArgs e)
-        {
-            if (e == null)
-                throw new ArgumentNullException("The argument object is 'null'");
-            Point point = e.Location;
-            if(IsActive && motionStarted)
-            {
-
-                fetchedConnector.MoveBy(new Point(point.X - lastPoint.X, point.Y - lastPoint.Y));
-                
-                lastPoint = point;
-            }            
-        }
-        /// <summary>
-        /// Handles the mouse up event
-        /// </summary>
-        /// <param name="e">The <see cref="T:System.Windows.Forms.MouseEventArgs"/> instance containing the event data.</param>
-        public void MouseUp(MouseEventArgs e)
-        {
-            if (IsActive)
-            {
-                DeactivateTool();
-                if(fetchedConnector == null)
-                    return;
-                Bundle bundle = new Bundle(Controller.Model);
-                bundle.Entities.Add(fetchedConnector);
-                MoveCommand cmd = new MoveCommand(this.Controller, bundle, new Point(lastPoint.X - initialPoint.X, lastPoint.Y - initialPoint.Y));
-                Controller.UndoManager.AddUndoCommand(cmd);
-                //not necessary to perform the Redo action of the command since the mouse-move already moved the bundle!
-            }
-        }
-        #endregion
+    /// <summary>
+    /// Called when the tool is activated.
+    /// </summary>
+    protected override void OnActivateTool() {
+      Controller.View.CurrentCursor = CursorPalette.Select;
+      motionStarted = false;
+      fetchedConnector = null;
     }
 
+    /// <summary>
+    /// Handles the mouse down event
+    /// </summary>
+    /// <param name="e">The <see cref="T:System.Windows.Forms.MouseEventArgs"/> instance containing the event data.</param>
+    public bool MouseDown(MouseEventArgs e) {
+      if (e == null)
+        throw new ArgumentNullException("The argument object is 'null'");
+      if (e.Button == MouseButtons.Left && Enabled && !IsSuspended) {
+        fetchedConnector = this.Controller.Model.Selection.FindShapeConnector(e.Location);
+        if (fetchedConnector != null) {
+
+          initialPoint = e.Location;
+          lastPoint = initialPoint;
+          motionStarted = true;
+          return true;
+        }
+      }
+      return false;
+    }
+
+    /// <summary>
+    /// Handles the mouse move event
+    /// </summary>
+    /// <param name="e">The <see cref="T:System.Windows.Forms.MouseEventArgs"/> instance containing the event data.</param>
+    public void MouseMove(MouseEventArgs e) {
+      if (e == null)
+        throw new ArgumentNullException("The argument object is 'null'");
+      Point point = e.Location;
+      if (IsActive && motionStarted) {
+
+        fetchedConnector.MoveBy(new Point(point.X - lastPoint.X, point.Y - lastPoint.Y));
+
+        lastPoint = point;
+      }
+    }
+    /// <summary>
+    /// Handles the mouse up event
+    /// </summary>
+    /// <param name="e">The <see cref="T:System.Windows.Forms.MouseEventArgs"/> instance containing the event data.</param>
+    public void MouseUp(MouseEventArgs e) {
+      if (IsActive) {
+        DeactivateTool();
+        if (fetchedConnector == null)
+          return;
+        Bundle bundle = new Bundle(Controller.Model);
+        bundle.Entities.Add(fetchedConnector);
+        MoveCommand cmd = new MoveCommand(this.Controller, bundle, new Point(lastPoint.X - initialPoint.X, lastPoint.Y - initialPoint.Y));
+        Controller.UndoManager.AddUndoCommand(cmd);
+        //not necessary to perform the Redo action of the command since the mouse-move already moved the bundle!
+      }
+    }
+    #endregion
+  }
+
 }
Index: /trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.Netron/3.0.2672.12446/Netron.Diagramming.Core-3.0.2672.12446/Tools/ContextTool.cs
===================================================================
--- /trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.Netron/3.0.2672.12446/Netron.Diagramming.Core-3.0.2672.12446/Tools/ContextTool.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.Netron/3.0.2672.12446/Netron.Diagramming.Core-3.0.2672.12446/Tools/ContextTool.cs	(revision 4068)
@@ -1,100 +1,87 @@
-using System;
-using System.Diagnostics;
-using System.Collections;
-using System.Drawing;
 using System.Windows.Forms;
 
-namespace Netron.Diagramming.Core
-{
+namespace Netron.Diagramming.Core {
+  /// <summary>
+  /// This tool informs the IController to display a ContextMenu when
+  /// the right mouse button is clicked once.
+  /// </summary>
+  public class ContextTool : AbstractTool, IMouseListener {
+
+    #region Fields
+
+    #endregion
+
+    #region Constructor
+
+    // ------------------------------------------------------------------
     /// <summary>
-    /// This tool informs the IController to display a ContextMenu when
-    /// the right mouse button is clicked once.
+    /// Initializes a new instance of the <see cref="T:HoverTool"/> class.
     /// </summary>
-    public class ContextTool : AbstractTool, IMouseListener
-    {
-
-        #region Fields
-
-        #endregion
-
-        #region Constructor
-
-        // ------------------------------------------------------------------
-        /// <summary>
-        /// Initializes a new instance of the <see cref="T:HoverTool"/> class.
-        /// </summary>
-        /// <param name="name">The name of the tool.</param>
-        // ------------------------------------------------------------------
-        public ContextTool(string name)
-            : base(name)
-        {
-        }
-
-        #endregion
-
-        #region Methods
-
-        // ------------------------------------------------------------------
-        /// <summary>
-        /// Called when the tool is activated.
-        /// </summary>
-        // ------------------------------------------------------------------
-        protected override void OnActivateTool()
-        {
-        }
-
-        // ------------------------------------------------------------------
-        /// <summary>
-        /// Handles the mouse down event.
-        /// </summary>
-        /// <param name="e">The 
-        /// <see cref="T:System.Windows.Forms.MouseEventArgs"/> instance 
-        /// containing the event data.</param>
-        /// <returns>Returns 'true' if the event was handled, otherwise 
-        /// 'false'.</returns>
-        // ------------------------------------------------------------------
-        public bool MouseDown(MouseEventArgs e)
-        {
-            if(!IsSuspended && this.Enabled)
-            {
-                if (e.Button == MouseButtons.Right && e.Clicks == 1)
-                {
-                    // Just the base menu for now.
-                    ToolStripItem[] additionalItems = null;
-
-                    this.Controller.RaiseOnShowContextMenu(
-                        new EntityMenuEventArgs(null, e, ref additionalItems));
-                    return true;
-                }
-            }
-            return false;            
-        }
-
-        // ------------------------------------------------------------------
-        /// <summary>
-        /// Handles the mouse move event - nothing is performed here.
-        /// </summary>
-        /// <param name="e">The 
-        /// <see cref="T:System.Windows.Forms.MouseEventArgs"/> instance 
-        /// containing the event data.</param>
-        // ------------------------------------------------------------------
-        public void MouseMove(MouseEventArgs e)
-        {           
-        }
-
-        // ------------------------------------------------------------------
-        /// <summary>
-        /// Handles the mouse up event - nothing is performed here.
-        /// </summary>
-        /// <param name="e">The 
-        /// <see cref="T:System.Windows.Forms.MouseEventArgs"/> instance 
-        /// containing the event data.</param>
-        // ------------------------------------------------------------------
-        public void MouseUp(MouseEventArgs e)
-        {
-        }
-
-        #endregion
+    /// <param name="name">The name of the tool.</param>
+    // ------------------------------------------------------------------
+    public ContextTool(string name)
+      : base(name) {
     }
 
+    #endregion
+
+    #region Methods
+
+    // ------------------------------------------------------------------
+    /// <summary>
+    /// Called when the tool is activated.
+    /// </summary>
+    // ------------------------------------------------------------------
+    protected override void OnActivateTool() {
+    }
+
+    // ------------------------------------------------------------------
+    /// <summary>
+    /// Handles the mouse down event.
+    /// </summary>
+    /// <param name="e">The 
+    /// <see cref="T:System.Windows.Forms.MouseEventArgs"/> instance 
+    /// containing the event data.</param>
+    /// <returns>Returns 'true' if the event was handled, otherwise 
+    /// 'false'.</returns>
+    // ------------------------------------------------------------------
+    public bool MouseDown(MouseEventArgs e) {
+      if (!IsSuspended && this.Enabled) {
+        if (e.Button == MouseButtons.Right && e.Clicks == 1) {
+          // Just the base menu for now.
+          ToolStripItem[] additionalItems = null;
+
+          this.Controller.RaiseOnShowContextMenu(
+              new EntityMenuEventArgs(null, e, ref additionalItems));
+          return true;
+        }
+      }
+      return false;
+    }
+
+    // ------------------------------------------------------------------
+    /// <summary>
+    /// Handles the mouse move event - nothing is performed here.
+    /// </summary>
+    /// <param name="e">The 
+    /// <see cref="T:System.Windows.Forms.MouseEventArgs"/> instance 
+    /// containing the event data.</param>
+    // ------------------------------------------------------------------
+    public void MouseMove(MouseEventArgs e) {
+    }
+
+    // ------------------------------------------------------------------
+    /// <summary>
+    /// Handles the mouse up event - nothing is performed here.
+    /// </summary>
+    /// <param name="e">The 
+    /// <see cref="T:System.Windows.Forms.MouseEventArgs"/> instance 
+    /// containing the event data.</param>
+    // ------------------------------------------------------------------
+    public void MouseUp(MouseEventArgs e) {
+    }
+
+    #endregion
+  }
+
 }
Index: /trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.Netron/3.0.2672.12446/Netron.Diagramming.Core-3.0.2672.12446/Tools/CopyTool.cs
===================================================================
--- /trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.Netron/3.0.2672.12446/Netron.Diagramming.Core-3.0.2672.12446/Tools/CopyTool.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.Netron/3.0.2672.12446/Netron.Diagramming.Core-3.0.2672.12446/Tools/CopyTool.cs	(revision 4068)
@@ -1,96 +1,84 @@
 using System;
-using System.Diagnostics;
-using System.Collections;
 using System.Drawing;
 using System.Windows.Forms;
-using System.IO;
-using System.Runtime.Serialization;
-using System.Runtime.Serialization.Formatters.Binary;
-namespace Netron.Diagramming.Core
-{
-    // ----------------------------------------------------------------------
+namespace Netron.Diagramming.Core {
+  // ----------------------------------------------------------------------
+  /// <summary>
+  /// A tool that copies the selected entities to the clipboard.
+  /// </summary>
+  // ----------------------------------------------------------------------
+  public class CopyTool : AbstractTool {
+    #region Fields
+    #endregion
+
+    #region Constructor
+
+    // ------------------------------------------------------------------
     /// <summary>
-    /// A tool that copies the selected entities to the clipboard.
+    /// Initializes a new instance of the <see cref="T:CopyTool"/> class.
     /// </summary>
-    // ----------------------------------------------------------------------
-    public class CopyTool : AbstractTool
-    {
-        #region Fields
-        #endregion
+    /// <param name="name">string: The name of the tool.</param>
+    // ------------------------------------------------------------------
+    public CopyTool(string name)
+      : base(name) {
+    }
+    #endregion
 
-        #region Constructor
+    #region Methods
 
-        // ------------------------------------------------------------------
-        /// <summary>
-        /// Initializes a new instance of the <see cref="T:CopyTool"/> class.
-        /// </summary>
-        /// <param name="name">string: The name of the tool.</param>
-        // ------------------------------------------------------------------
-        public CopyTool(string name)
-            : base(name)
-        {
-        }
-        #endregion
+    // ------------------------------------------------------------------
+    /// <summary>
+    /// Called when the tool is activated.
+    /// </summary>
+    // ------------------------------------------------------------------
+    protected override void OnActivateTool() {
+      if (this.Controller.Model.Selection.SelectedItems.Count == 0)
+        return;
 
-        #region Methods
+      try {
+        //Clear the Anchors otherwise subsequent Copy operations will 
+        // raise an exception due to the fact that the Anchors class 
+        // is a static helper class.
+        Anchors.Clear();
 
-        // ------------------------------------------------------------------
-        /// <summary>
-        /// Called when the tool is activated.
-        /// </summary>
-        // ------------------------------------------------------------------
-        protected override void OnActivateTool()
-        {
-          if (this.Controller.Model.Selection.SelectedItems.Count == 0)
-                return;
+        // First add the image to the Windows Clipboard so it can be
+        // pasted into other applications, like PowerPoint.
+        Bitmap image = this.Controller.Model.Selection.ToBitmap();
+        Clipboard.SetDataObject(image, true);
 
-            try
-            {
-                //Clear the Anchors otherwise subsequent Copy operations will 
-                // raise an exception due to the fact that the Anchors class 
-                // is a static helper class.
-                Anchors.Clear();
+        // This will create a volatile collection of entities, but they 
+        // need to be unwrapped!  I never managed to get things 
+        // working by putting the serialized collection directly onto 
+        // the Clipboad. Thanks to Leppie's suggestion it works by
+        // putting the Stream onto the Clipboard, which is weird but 
+        // it works.
+        //MemoryStream copy = Selection.SelectedItems.ToStream();
+        //DataFormats.Format format =
+        //    DataFormats.GetFormat(typeof(CopyTool).FullName);
 
-                // First add the image to the Windows Clipboard so it can be
-                // pasted into other applications, like PowerPoint.
-                Bitmap image = this.Controller.Model.Selection.ToBitmap();
-                Clipboard.SetDataObject(image, true);
+        //IDataObject dataObject = new DataObject();
+        //dataObject.SetData(format.Name, false, copy);
+        //Clipboard.SetDataObject(dataObject, false);
 
-                // This will create a volatile collection of entities, but they 
-                // need to be unwrapped!  I never managed to get things 
-                // working by putting the serialized collection directly onto 
-                // the Clipboad. Thanks to Leppie's suggestion it works by
-                // putting the Stream onto the Clipboard, which is weird but 
-                // it works.
-                //MemoryStream copy = Selection.SelectedItems.ToStream();
-                //DataFormats.Format format =
-                //    DataFormats.GetFormat(typeof(CopyTool).FullName);
+        // Rather than placing the stream of entities on the Windows
+        // Clipboard, we're using our custom clipboard to keep the
+        // Windows clipboard for moving data across apps.
+        NetronClipboard.Clear();
+        NetronClipboard.Add(this.Controller.Model.Selection.SelectedItems.Copy());
 
-                //IDataObject dataObject = new DataObject();
-                //dataObject.SetData(format.Name, false, copy);
-                //Clipboard.SetDataObject(dataObject, false);
-
-                // Rather than placing the stream of entities on the Windows
-                // Clipboard, we're using our custom clipboard to keep the
-                // Windows clipboard for moving data across apps.
-                NetronClipboard.Clear();
-                NetronClipboard.Add(this.Controller.Model.Selection.SelectedItems.Copy());
-                
-            }
-            catch (Exception exc)
-            {
-                //throw new InconsistencyException(
-                //    "The Copy operation failed.", exc);
-                MessageBox.Show("Unable to copy the selection.\n\n" +
-                    "Error Message: " + exc.Message);
-            }
-            finally
-            {
-                DeactivateTool();
-            }
-        }
-        
-        #endregion
+      }
+      catch (Exception exc) {
+        //throw new InconsistencyException(
+        //    "The Copy operation failed.", exc);
+        MessageBox.Show("Unable to copy the selection.\n\n" +
+            "Error Message: " + exc.Message);
+      }
+      finally {
+        DeactivateTool();
+      }
     }
 
+    #endregion
+  }
+
 }
Index: /trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.Netron/3.0.2672.12446/Netron.Diagramming.Core-3.0.2672.12446/Tools/CutTool.cs
===================================================================
--- /trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.Netron/3.0.2672.12446/Netron.Diagramming.Core-3.0.2672.12446/Tools/CutTool.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.Netron/3.0.2672.12446/Netron.Diagramming.Core-3.0.2672.12446/Tools/CutTool.cs	(revision 4068)
@@ -1,42 +1,35 @@
-using System;
-using System.Collections.Generic;
-using System.Text;
 
-namespace Netron.Diagramming.Core
-{
-    // ----------------------------------------------------------------------
+namespace Netron.Diagramming.Core {
+  // ----------------------------------------------------------------------
+  /// <summary>
+  /// The tool that performs the "cut" operation.
+  /// </summary>
+  // ----------------------------------------------------------------------
+  public class CutTool : AbstractTool {
+    // ------------------------------------------------------------------
     /// <summary>
-    /// The tool that performs the "cut" operation.
+    /// Constructor.
     /// </summary>
-    // ----------------------------------------------------------------------
-    public class CutTool : AbstractTool
-    {
-        // ------------------------------------------------------------------
-        /// <summary>
-        /// Constructor.
-        /// </summary>
-        /// <param name="toolName">string: The name of this tool.</param>
-        // ------------------------------------------------------------------
-        public CutTool(string toolName)
-            : base(toolName)
-        {
-        }
+    /// <param name="toolName">string: The name of this tool.</param>
+    // ------------------------------------------------------------------
+    public CutTool(string toolName)
+      : base(toolName) {
+    }
 
-        // ------------------------------------------------------------------
-        /// <summary>
-        /// Called when the tool is activated.
-        /// </summary>
-        // ------------------------------------------------------------------
-        protected override void OnActivateTool()
-        {
-            if (this.Controller.Model.Selection.SelectedItems.Count == 0)
-                return;
+    // ------------------------------------------------------------------
+    /// <summary>
+    /// Called when the tool is activated.
+    /// </summary>
+    // ------------------------------------------------------------------
+    protected override void OnActivateTool() {
+      if (this.Controller.Model.Selection.SelectedItems.Count == 0)
+        return;
 
-            // How about for the cut, if we use two existing tools.  First,
-            // activate the copy tool, then activate the delete tool.  That's
-            // essentially a cut operation, right?
-            Controller.ActivateTool(ControllerBase.CopyToolName);
-            Controller.ActivateTool(ControllerBase.DeleteToolName);
-        }
+      // How about for the cut, if we use two existing tools.  First,
+      // activate the copy tool, then activate the delete tool.  That's
+      // essentially a cut operation, right?
+      Controller.ActivateTool(ControllerBase.CopyToolName);
+      Controller.ActivateTool(ControllerBase.DeleteToolName);
     }
+  }
 }
Index: /trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.Netron/3.0.2672.12446/Netron.Diagramming.Core-3.0.2672.12446/Tools/DeleteTool.cs
===================================================================
--- /trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.Netron/3.0.2672.12446/Netron.Diagramming.Core-3.0.2672.12446/Tools/DeleteTool.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.Netron/3.0.2672.12446/Netron.Diagramming.Core-3.0.2672.12446/Tools/DeleteTool.cs	(revision 4068)
@@ -1,60 +1,48 @@
-using System;
-using System.Collections.Generic;
-using System.Text;
 
-namespace Netron.Diagramming.Core
-{
-    public class DeleteTool : AbstractTool
-    {
-        /// <summary>
-        /// Constructor.
-        /// </summary>
-        /// <param name="toolName"></param>
-        public DeleteTool(string toolName)
-            : base(toolName)
-        {
+namespace Netron.Diagramming.Core {
+  public class DeleteTool : AbstractTool {
+    /// <summary>
+    /// Constructor.
+    /// </summary>
+    /// <param name="toolName"></param>
+    public DeleteTool(string toolName)
+      : base(toolName) {
+    }
+
+    protected override void OnActivateTool() {
+      base.OnActivateTool();
+
+      DeleteCommand cmd;
+
+      if (this.Controller.Model.Selection.SelectedItems.Count > 0) {
+        // If any one entity in the selction can't be deleted,
+        // remove it from the selection.
+        for (int i = 0; i < this.Controller.Model.Selection.SelectedItems.Count; i++) {
+          IDiagramEntity entity = this.Controller.Model.Selection.SelectedItems[i];
+          if (entity.AllowDelete == false) {
+            this.Controller.Model.Selection.SelectedItems.Remove(entity);
+            i--;
+          }
+        }
+        cmd = new DeleteCommand(
+                this.Controller,
+               this.Controller.Model.Selection.SelectedItems.Copy());
+        this.Controller.UndoManager.AddUndoCommand(cmd);
+
+        // Alert each entity that they're about to be deleted.
+        foreach (IDiagramEntity entity in this.Controller.Model.Selection.SelectedItems) {
+          entity.OnBeforeDelete(cmd);
         }
 
-        protected override void OnActivateTool()
-        {
-            base.OnActivateTool();
+        cmd.Redo();
 
-            DeleteCommand cmd;
+        // Alert each entity that they have been deleted.
+        foreach (IDiagramEntity entity in this.Controller.Model.Selection.SelectedItems) {
+          entity.OnAfterDelete(cmd);
+        }
+      }
 
-            if (this.Controller.Model.Selection.SelectedItems.Count > 0)
-            {
-                // If any one entity in the selction can't be deleted,
-                // remove it from the selection.
-                for (int i = 0; i <this.Controller.Model.Selection.SelectedItems.Count; i++ )
-                {
-                    IDiagramEntity entity =this.Controller.Model.Selection.SelectedItems[i];
-                    if (entity.AllowDelete == false)
-                    {
-                       this.Controller.Model.Selection.SelectedItems.Remove(entity);
-                        i--;
-                    }
-                }
-                cmd = new DeleteCommand(
-                        this.Controller,
-                       this.Controller.Model.Selection.SelectedItems.Copy());
-                this.Controller.UndoManager.AddUndoCommand(cmd);
-
-                // Alert each entity that they're about to be deleted.
-                foreach (IDiagramEntity entity in this.Controller.Model.Selection.SelectedItems)
-                {
-                    entity.OnBeforeDelete(cmd);
-                }
-
-                cmd.Redo();
-
-                // Alert each entity that they have been deleted.
-                foreach (IDiagramEntity entity in this.Controller.Model.Selection.SelectedItems)
-                {
-                    entity.OnAfterDelete(cmd);
-                }
-            }
-
-            DeactivateTool();
-        }
+      DeactivateTool();
     }
+  }
 }
Index: /trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.Netron/3.0.2672.12446/Netron.Diagramming.Core-3.0.2672.12446/Tools/DragDropTool.cs
===================================================================
--- /trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.Netron/3.0.2672.12446/Netron.Diagramming.Core-3.0.2672.12446/Tools/DragDropTool.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.Netron/3.0.2672.12446/Netron.Diagramming.Core-3.0.2672.12446/Tools/DragDropTool.cs	(revision 4068)
@@ -1,270 +1,240 @@
 using System;
-using System.Diagnostics;
-using System.Collections;
 using System.Drawing;
+using System.IO;
 using System.Windows.Forms;
-using System.IO;
-using System.Text;
-
-namespace Netron.Diagramming.Core
-{
-    // ----------------------------------------------------------------------
-    /// <summary>
-    /// This tool implements the action of moving shapes on the canvas. 
-    /// <para>Note that this tool is slightly different than other tools 
-    /// since it activates itself unless it has been suspended by another 
-    /// tool. </para>
-    /// </summary>
-    public class DragDropTool : 
-        AbstractTool, 
-        IMouseListener, 
-        IDragDropListener
-    {
-
-        #region Fields
-        Cursor feedbackCursor;
-        #endregion
-
-        #region Constructor
-        /// <summary>
-        /// Initializes a new instance of the <see cref="T:DragDropTool"/> class.
-        /// </summary>
-        /// <param name="name">The name of the tool.</param>
-        public DragDropTool(string name) : base(name)
-        { 
+
+namespace Netron.Diagramming.Core {
+  // ----------------------------------------------------------------------
+  /// <summary>
+  /// This tool implements the action of moving shapes on the canvas. 
+  /// <para>Note that this tool is slightly different than other tools 
+  /// since it activates itself unless it has been suspended by another 
+  /// tool. </para>
+  /// </summary>
+  public class DragDropTool :
+      AbstractTool,
+      IMouseListener,
+      IDragDropListener {
+
+    #region Fields
+    Cursor feedbackCursor;
+    #endregion
+
+    #region Constructor
+    /// <summary>
+    /// Initializes a new instance of the <see cref="T:DragDropTool"/> class.
+    /// </summary>
+    /// <param name="name">The name of the tool.</param>
+    public DragDropTool(string name)
+      : base(name) {
+    }
+    #endregion
+
+    #region Methods
+
+    /// <summary>
+    /// Called when the tool is activated.
+    /// </summary>
+    protected override void OnActivateTool() {
+      Controller.View.CurrentCursor = Cursors.SizeAll;
+    }
+
+    /// <summary>
+    /// Handles the mouse down event
+    /// </summary>
+    /// <param name="e">The <see cref="T:System.Windows.Forms.MouseEventArgs"/> instance containing the event data.</param>
+    public bool MouseDown(MouseEventArgs e) {
+      return false; //continue spreading the events
+    }
+
+    /// <summary>
+    /// Handles the mouse move event
+    /// </summary>
+    /// <param name="e">The <see cref="T:System.Windows.Forms.MouseEventArgs"/> instance containing the event data.</param>
+    public void MouseMove(MouseEventArgs e) {
+
+    }
+    /// <summary>
+    /// Handles the mouse up event
+    /// </summary>
+    /// <param name="e">The <see cref="T:System.Windows.Forms.MouseEventArgs"/> instance containing the event data.</param>
+    public void MouseUp(MouseEventArgs e) {
+
+    }
+    #endregion
+
+    /// <summary>
+    /// On dragdrop.
+    /// </summary>
+    /// <param name="e">The <see cref="T:KeyEventArgs"/> instance containing the event data.</param>
+    public bool OnDragDrop(DragEventArgs e) {
+      Control control = (Control)this.Controller.ParentControl;
+      Point p = control.PointToClient(new Point(e.X, e.Y));
+      IShape shape = null;
+      IDataObject iDataObject = e.Data;
+      string text;
+
+      if (iDataObject.GetDataPresent("IShape")) {
+        shape = (IShape)iDataObject.GetData("IShape");
+        shape.Model = Controller.Model;
+      } else if (iDataObject.GetDataPresent(typeof(string))) {
+        text = iDataObject.GetData(
+                typeof(string)).ToString();
+
+        //foreach (string shapeType in Enum.GetNames(typeof(ShapeTypes)))
+        //{
+        //    if (shapeType.ToString().ToLower() == text.ToLower())
+        //    {
+        //        shape = ShapeFactory.GetShape(shapeType);
+        //        break;
+        //    }
+        //}
+
+        // If our shape is still null, then the text being dragged
+        // onto the canvas is not the name of a shape, so add a
+        // TextOnly shape with the text.
+        //if (shape == null)
+        //{
+        //    shape = new TextOnly(Controller.Model);
+        //    (shape as TextOnly).Text = text;
+        //}
+
+        shape = new TextOnly(Controller.Model);
+        (shape as TextOnly).Text = text;
+      } else if (iDataObject.GetDataPresent(DataFormats.FileDrop)) {
+        try {
+          string[] files = (string[])iDataObject.GetData(
+              DataFormats.FileDrop);
+
+          foreach (string fileName in files) {
+            FileInfo info = new FileInfo(fileName);
+
+            if (info.Exists) {
+              FileShape fileShape = new FileShape(fileName);
+              AddShapeCommand cmd = new AddShapeCommand(
+                  this.Controller,
+                  fileShape,
+                  p);
+              this.Controller.UndoManager.AddUndoCommand(cmd);
+              cmd.Redo();
+              p.Offset(20, 20);
+            }
+          }
+
+          feedbackCursor = null;
         }
-        #endregion
-
-        #region Methods
-
-        /// <summary>
-        /// Called when the tool is activated.
-        /// </summary>
-        protected override void OnActivateTool()
-        {
-            Controller.View.CurrentCursor = Cursors.SizeAll;
+        catch {
         }
-
-        /// <summary>
-        /// Handles the mouse down event
-        /// </summary>
-        /// <param name="e">The <see cref="T:System.Windows.Forms.MouseEventArgs"/> instance containing the event data.</param>
-        public bool MouseDown(MouseEventArgs e)
-        {
-            return false; //continue spreading the events
-        }
-
-        /// <summary>
-        /// Handles the mouse move event
-        /// </summary>
-        /// <param name="e">The <see cref="T:System.Windows.Forms.MouseEventArgs"/> instance containing the event data.</param>
-        public void MouseMove(MouseEventArgs e)
-        {
-           
-        }
-        /// <summary>
-        /// Handles the mouse up event
-        /// </summary>
-        /// <param name="e">The <see cref="T:System.Windows.Forms.MouseEventArgs"/> instance containing the event data.</param>
-        public void MouseUp(MouseEventArgs e)
-        {
-            
-        }
-        #endregion
-
-        /// <summary>
-        /// On dragdrop.
-        /// </summary>
-        /// <param name="e">The <see cref="T:KeyEventArgs"/> instance containing the event data.</param>
-        public bool OnDragDrop(DragEventArgs e)
-        {
-            Control control = (Control)this.Controller.ParentControl;
-            Point p = control.PointToClient(new Point(e.X, e.Y));
-            IShape shape = null;
-            IDataObject iDataObject = e.Data;
-            string text;
-
-            if (iDataObject.GetDataPresent("IShape"))
-            {
-                shape = (IShape)iDataObject.GetData("IShape");
-                shape.Model = Controller.Model;
-            }
-            else if (iDataObject.GetDataPresent(typeof(string)))
-            {
-                text = iDataObject.GetData(
-                        typeof(string)).ToString();
-
-                //foreach (string shapeType in Enum.GetNames(typeof(ShapeTypes)))
-                //{
-                //    if (shapeType.ToString().ToLower() == text.ToLower())
-                //    {
-                //        shape = ShapeFactory.GetShape(shapeType);
-                //        break;
-                //    }
-                //}
-
-                // If our shape is still null, then the text being dragged
-                // onto the canvas is not the name of a shape, so add a
-                // TextOnly shape with the text.
-                //if (shape == null)
-                //{
-                //    shape = new TextOnly(Controller.Model);
-                //    (shape as TextOnly).Text = text;
-                //}
-
-                shape = new TextOnly(Controller.Model);
-                (shape as TextOnly).Text = text;
-            }
-            else if (iDataObject.GetDataPresent(DataFormats.FileDrop))
-            {
-                try
-                {
-                    string[] files = (string[])iDataObject.GetData(
-                        DataFormats.FileDrop);
-
-                    foreach (string fileName in files)
-                    {
-                        FileInfo info = new FileInfo(fileName);
-
-                        if (info.Exists)
-                        {
-                            FileShape fileShape = new FileShape(fileName);
-                            AddShapeCommand cmd = new AddShapeCommand(
-                                this.Controller,
-                                fileShape,
-                                p);
-                            this.Controller.UndoManager.AddUndoCommand(cmd);
-                            cmd.Redo();
-                            p.Offset(20, 20);
-                        }
-                    }
-
-                    feedbackCursor = null;
-                }
-                catch
-                {                    
-                }
-            }
-            else if (iDataObject.GetDataPresent(typeof(Bitmap)))
-            {                
-                // Doesn't support dropping images yet - having problems
-                // getting images off the clipboard.
-                shape = new ImageShape(Controller.Model);
-                (shape as ImageShape).Image = 
-                    (Image)iDataObject.GetData(typeof(Bitmap));
-                return true;
-            }
-
-            if(shape != null)
-            {
-                shape.MoveBy(new Point(p.X, p.Y));
-
-
-                //ComplexRectangle shape = new ComplexRectangle();
-                //shape.Rectangle = new Rectangle(p.X, p.Y, 150, 70);
-                //shape.Text = "Just an example, work in progress.";
-
-                //TextLabel shape = new TextLabel();
-                //shape.Rectangle = new Rectangle(p.X, p.Y, 150, 70);
-                //shape.Text = "Just an example, work in progress.";
-
-                AddShapeCommand cmd = new AddShapeCommand(
-                    this.Controller, 
-                    shape, 
-                    p);
-                this.Controller.UndoManager.AddUndoCommand(cmd);
-                cmd.Redo();
-                feedbackCursor = null;
-                return true;
-            }
-
-            // The drop event wasn't handled here.
-            return false;
-        }
-
-        /// <summary>
-        /// On drag leave.
-        /// </summary>
-        /// <param name="e">The <see cref="T:KeyEventArgs"/> instance containing the event data.</param>
-        public bool OnDragLeave(EventArgs e)
-        {
-            return false;
-        }
-
-        /// <summary>
-        /// On drag over.
-        /// </summary>
-        /// <param name="e">The <see cref="T:KeyPressEventArgs"/> instance containing the event data.</param>
-        public bool OnDragOver(DragEventArgs e)
-        {
-            return AnalyzeData(e);
-        }
-
-
-        /// <summary>
-        /// On drag enter
-        /// </summary>
-        /// <param name="e"></param>
-        public bool OnDragEnter(DragEventArgs e)
-        {
-            return AnalyzeData(e);
-        }
-
-        private bool AnalyzeData(DragEventArgs e)
-        {
-            IDataObject iDataObject = e.Data;
-
-            if (iDataObject.GetDataPresent("IShape"))
-            {
-                feedbackCursor = CursorPalette.DropShape;
-                e.Effect = DragDropEffects.Copy;
-                return true;
-            }
-            
-            if(iDataObject.GetDataPresent(typeof(string)))
-            {
-                // Need to determine if the text on the clipboard is the
-                // name of a shape or if it's just plain old text to add.
-                //foreach(string shapeType in Enum.GetNames(typeof(ShapeTypes)))
-                //{
-                //    if(shapeType.ToString().ToLower() == 
-                //        iDataObject.GetData(
-                //        typeof(string)).ToString().ToLower())
-                //    {
-                //        feedbackCursor = CursorPalette.DropShape;
-                //        e.Effect = DragDropEffects.Copy;
-                //        return true;
-                //    }
-                //}
-                feedbackCursor = CursorPalette.DropText;
-                e.Effect = DragDropEffects.Copy;
-                return true;
-            }
-
-            if (iDataObject.GetDataPresent(DataFormats.FileDrop))
-            {
-                feedbackCursor = CursorPalette.Add;
-                e.Effect = DragDropEffects.Copy;
-                return true;
-            }
-            
-            // Having problems getting images off the clipboard.
-            //if(iDataObject.GetDataPresent(typeof(Bitmap)))
-            //{
-            //    feedbackCursor = CursorPallet.DropImage;
-            //    e.Effect = DragDropEffects.Copy;
-            //    return;
-
-            //}
-            return false;
-        }
-
-
-        public void GiveFeedback(GiveFeedbackEventArgs e)
-        {
-            e.UseDefaultCursors = false;
-            Cursor.Current = feedbackCursor;
-        }
-    }
+      } else if (iDataObject.GetDataPresent(typeof(Bitmap))) {
+        // Doesn't support dropping images yet - having problems
+        // getting images off the clipboard.
+        shape = new ImageShape(Controller.Model);
+        (shape as ImageShape).Image =
+            (Image)iDataObject.GetData(typeof(Bitmap));
+        return true;
+      }
+
+      if (shape != null) {
+        shape.MoveBy(new Point(p.X, p.Y));
+
+
+        //ComplexRectangle shape = new ComplexRectangle();
+        //shape.Rectangle = new Rectangle(p.X, p.Y, 150, 70);
+        //shape.Text = "Just an example, work in progress.";
+
+        //TextLabel shape = new TextLabel();
+        //shape.Rectangle = new Rectangle(p.X, p.Y, 150, 70);
+        //shape.Text = "Just an example, work in progress.";
+
+        AddShapeCommand cmd = new AddShapeCommand(
+            this.Controller,
+            shape,
+            p);
+        this.Controller.UndoManager.AddUndoCommand(cmd);
+        cmd.Redo();
+        feedbackCursor = null;
+        return true;
+      }
+
+      // The drop event wasn't handled here.
+      return false;
+    }
+
+    /// <summary>
+    /// On drag leave.
+    /// </summary>
+    /// <param name="e">The <see cref="T:KeyEventArgs"/> instance containing the event data.</param>
+    public bool OnDragLeave(EventArgs e) {
+      return false;
+    }
+
+    /// <summary>
+    /// On drag over.
+    /// </summary>
+    /// <param name="e">The <see cref="T:KeyPressEventArgs"/> instance containing the event data.</param>
+    public bool OnDragOver(DragEventArgs e) {
+      return AnalyzeData(e);
+    }
+
+
+    /// <summary>
+    /// On drag enter
+    /// </summary>
+    /// <param name="e"></param>
+    public bool OnDragEnter(DragEventArgs e) {
+      return AnalyzeData(e);
+    }
+
+    private bool AnalyzeData(DragEventArgs e) {
+      IDataObject iDataObject = e.Data;
+
+      if (iDataObject.GetDataPresent("IShape")) {
+        feedbackCursor = CursorPalette.DropShape;
+        e.Effect = DragDropEffects.Copy;
+        return true;
+      }
+
+      if (iDataObject.GetDataPresent(typeof(string))) {
+        // Need to determine if the text on the clipboard is the
+        // name of a shape or if it's just plain old text to add.
+        //foreach(string shapeType in Enum.GetNames(typeof(ShapeTypes)))
+        //{
+        //    if(shapeType.ToString().ToLower() == 
+        //        iDataObject.GetData(
+        //        typeof(string)).ToString().ToLower())
+        //    {
+        //        feedbackCursor = CursorPalette.DropShape;
+        //        e.Effect = DragDropEffects.Copy;
+        //        return true;
+        //    }
+        //}
+        feedbackCursor = CursorPalette.DropText;
+        e.Effect = DragDropEffects.Copy;
+        return true;
+      }
+
+      if (iDataObject.GetDataPresent(DataFormats.FileDrop)) {
+        feedbackCursor = CursorPalette.Add;
+        e.Effect = DragDropEffects.Copy;
+        return true;
+      }
+
+      // Having problems getting images off the clipboard.
+      //if(iDataObject.GetDataPresent(typeof(Bitmap)))
+      //{
+      //    feedbackCursor = CursorPallet.DropImage;
+      //    e.Effect = DragDropEffects.Copy;
+      //    return;
+
+      //}
+      return false;
+    }
+
+
+    public void GiveFeedback(GiveFeedbackEventArgs e) {
+      e.UseDefaultCursors = false;
+      Cursor.Current = feedbackCursor;
+    }
+  }
 
 }
Index: /trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.Netron/3.0.2672.12446/Netron.Diagramming.Core-3.0.2672.12446/Tools/EllipseTool.cs
===================================================================
--- /trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.Netron/3.0.2672.12446/Netron.Diagramming.Core-3.0.2672.12446/Tools/EllipseTool.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.Netron/3.0.2672.12446/Netron.Diagramming.Core-3.0.2672.12446/Tools/EllipseTool.cs	(revision 4068)
@@ -1,97 +1,87 @@
-using System;
 using System.Drawing;
 
-namespace Netron.Diagramming.Core
-{
+namespace Netron.Diagramming.Core {
+  /// <summary>
+  /// Tool to draw an ellipse on the canvas
+  /// <seealso cref="RectangleTool"/>
+  /// </summary>
+  public class EllipseTool : AbstractDrawingTool {
+    #region Fields
+
+    #endregion
+
+    #region Properties
+
+    #endregion
+
+    #region Constructor
+    public EllipseTool()
+      : base("Ellipse Tool") {
+    }
+    public EllipseTool(string name)
+      : base(name) {
+
+    }
+    #endregion
+
+    #region Methods
+
+    // ------------------------------------------------------------------
     /// <summary>
-    /// Tool to draw an ellipse on the canvas
-    /// <seealso cref="RectangleTool"/>
+    /// Activates the tool - the cursor is set to the Cursors.DrawRectangle.
     /// </summary>
-    public class EllipseTool : AbstractDrawingTool
-    {
-        #region Fields
+    // ------------------------------------------------------------------
+    protected override void OnActivateTool() {
+      base.OnActivateTool();
+      Cursor = CursorPalette.DrawEllipse;
+    }
 
-        #endregion
-
-        #region Properties
-
-        #endregion
-
-        #region Constructor
-        public EllipseTool() : base("Ellipse Tool")
-        {
-        }
-        public EllipseTool(string name): base(name)
-        {
-
-        }
-        #endregion
-
-        #region Methods
-
-        // ------------------------------------------------------------------
-        /// <summary>
-        /// Activates the tool - the cursor is set to the Cursors.DrawRectangle.
-        /// </summary>
-        // ------------------------------------------------------------------
-        protected override void OnActivateTool()
-        {
-            base.OnActivateTool();
-            Cursor = CursorPalette.DrawEllipse;
-        }
-
-        /// <summary>
-        /// Handles the mouse move event.
-        /// </summary>
-        /// <param name="e">The <see cref="T:System.Windows.Forms.MouseEventArgs"/> instance containing the event data.</param>
-        protected override void OnMouseMove(System.Windows.Forms.MouseEventArgs e)
-        {
-            base.OnMouseMove(e);
-            if (IsActive && started)
-            {
-                Point point = new Point(e.X, e.Y);
-                Controller.View.PaintGhostEllipse(startingPoint, point);
-                Controller.View.Invalidate(System.Drawing.Rectangle.Inflate(Controller.View.Ghost.Rectangle, 20, 20));
-            }
-        }
+    /// <summary>
+    /// Handles the mouse move event.
+    /// </summary>
+    /// <param name="e">The <see cref="T:System.Windows.Forms.MouseEventArgs"/> instance containing the event data.</param>
+    protected override void OnMouseMove(System.Windows.Forms.MouseEventArgs e) {
+      base.OnMouseMove(e);
+      if (IsActive && started) {
+        Point point = new Point(e.X, e.Y);
+        Controller.View.PaintGhostEllipse(startingPoint, point);
+        Controller.View.Invalidate(System.Drawing.Rectangle.Inflate(Controller.View.Ghost.Rectangle, 20, 20));
+      }
+    }
 
 
-        /// <summary>
-        /// This method will be called when the user has finished drawing a ghost rectangle or bundle
-        /// and initiates the actual creation of a bundle and the addition to the model via the appropriate command.
-        /// </summary>
-        protected override void GhostDrawingComplete()
-        {
-            if ((IsActive == false) ||
-                (started == false))
-            {
-                return;
-            }
+    /// <summary>
+    /// This method will be called when the user has finished drawing a ghost rectangle or bundle
+    /// and initiates the actual creation of a bundle and the addition to the model via the appropriate command.
+    /// </summary>
+    protected override void GhostDrawingComplete() {
+      if ((IsActive == false) ||
+          (started == false)) {
+        return;
+      }
 
-            try
-            {
-                SimpleEllipse shape = new SimpleEllipse(this.Controller.Model);
-                shape.Width = (int) Rectangle.Width;
-                shape.Height = (int) Rectangle.Height;
-                AddShapeCommand cmd = new AddShapeCommand(
-                    this.Controller, 
-                    shape, 
-                    new Point((int) Rectangle.X, (int)Rectangle.Y));
-                this.Controller.UndoManager.AddUndoCommand(cmd);
-                cmd.Redo();
-            }
-            catch
-            {
-                base.Controller.DeactivateTool(this);
-                Controller.View.Invalidate();
-                throw;
-            }
+      try {
+        SimpleEllipse shape = new SimpleEllipse(this.Controller.Model);
+        shape.Width = (int)Rectangle.Width;
+        shape.Height = (int)Rectangle.Height;
+        AddShapeCommand cmd = new AddShapeCommand(
+            this.Controller,
+            shape,
+            new Point((int)Rectangle.X, (int)Rectangle.Y));
+        this.Controller.UndoManager.AddUndoCommand(cmd);
+        cmd.Redo();
+      }
+      catch {
+        base.Controller.DeactivateTool(this);
+        Controller.View.Invalidate();
+        throw;
+      }
 
-            //base.Controller.DeactivateTool(this);
-        }
+      //base.Controller.DeactivateTool(this);
+    }
 
 
-        #endregion
-    }
+    #endregion
+  }
 
 }
Index: /trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.Netron/3.0.2672.12446/Netron.Diagramming.Core-3.0.2672.12446/Tools/GroupTool.cs
===================================================================
--- /trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.Netron/3.0.2672.12446/Netron.Diagramming.Core-3.0.2672.12446/Tools/GroupTool.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.Netron/3.0.2672.12446/Netron.Diagramming.Core-3.0.2672.12446/Tools/GroupTool.cs	(revision 4068)
@@ -1,88 +1,74 @@
-using System;
-using System.Diagnostics;
-using System.Collections;
-using System.Drawing;
 using System.Windows.Forms;
 
-namespace Netron.Diagramming.Core
-{
+namespace Netron.Diagramming.Core {
+  /// <summary>
+  /// Group tool
+  /// </summary>
+  class GroupTool : AbstractTool, IMouseListener {
+
+    #region Fields
+
+    #endregion
+
+    #region Constructor
     /// <summary>
-    /// Group tool
+    /// Initializes a new instance of the <see cref="T:GroupTool"/> class.
     /// </summary>
-    class GroupTool : AbstractTool, IMouseListener
-    {
+    /// <param name="name">The name of the tool.</param>
+    public GroupTool(string name)
+      : base(name) {
+    }
+    #endregion
 
-        #region Fields
-     
-        #endregion
+    #region Methods
 
-        #region Constructor
-        /// <summary>
-        /// Initializes a new instance of the <see cref="T:GroupTool"/> class.
-        /// </summary>
-        /// <param name="name">The name of the tool.</param>
-        public GroupTool(string name)
-            : base(name)
-        {
-        }
-        #endregion
+    /// <summary>
+    /// Called when the tool is activated.
+    /// </summary>
+    protected override void OnActivateTool() {
+      bool valid = true;
+      //make sure we have the correct stuff on the table
+      if (this.Controller.Model.Selection.SelectedItems == null || this.Controller.Model.Selection.SelectedItems.Count == 0) {
+        MessageBox.Show("Nothing is selected, you need to select at least two items to create a group.", "Nothing selected.", MessageBoxButtons.OK, MessageBoxIcon.Hand);
+        valid = false;
+      } else if (this.Controller.Model.Selection.SelectedItems.Count <= 1) {
+        MessageBox.Show("You need at least two items to create a group.", "Multiple items.", MessageBoxButtons.OK, MessageBoxIcon.Hand);
+        valid = false;
+      }
+      if (valid) {
+        Bundle bundle = new Bundle(this.Controller.Model.Selection.SelectedItems);
 
-        #region Methods
+        GroupCommand cmd = new GroupCommand(this.Controller, bundle);
 
-        /// <summary>
-        /// Called when the tool is activated.
-        /// </summary>
-        protected override void OnActivateTool()
-        {
-            bool valid = true;
-            //make sure we have the correct stuff on the table
-            if (this.Controller.Model.Selection.SelectedItems == null || this.Controller.Model.Selection.SelectedItems.Count == 0)
-            {
-                MessageBox.Show("Nothing is selected, you need to select at least two items to create a group.", "Nothing selected.", MessageBoxButtons.OK, MessageBoxIcon.Hand);
-                valid = false;
-            } else if (this.Controller.Model.Selection.SelectedItems.Count <= 1)
-            {
-                MessageBox.Show("You need at least two items to create a group.", "Multiple items.", MessageBoxButtons.OK, MessageBoxIcon.Hand);
-                valid = false;
-            }
-            if (valid)
-            {
-              Bundle bundle = new Bundle(this.Controller.Model.Selection.SelectedItems);
+        this.Controller.UndoManager.AddUndoCommand(cmd);
 
-                GroupCommand cmd = new GroupCommand(this.Controller, bundle);
+        cmd.Redo();
+      }
+      DeactivateTool();
+      return;
+    }
 
-                this.Controller.UndoManager.AddUndoCommand(cmd);
+    /// <summary>
+    /// Handles the mouse down event
+    /// </summary>
+    /// <param name="e">The <see cref="T:System.Windows.Forms.MouseEventArgs"/> instance containing the event data.</param>
+    public bool MouseDown(MouseEventArgs e) {
+      return false;
+    }
 
-                cmd.Redo();
-            }
-            DeactivateTool();
-            return;
-        }
+    /// <summary>
+    /// Handles the mouse move event
+    /// </summary>
+    /// <param name="e">The <see cref="T:System.Windows.Forms.MouseEventArgs"/> instance containing the event data.</param>
+    public void MouseMove(MouseEventArgs e) {
 
-        /// <summary>
-        /// Handles the mouse down event
-        /// </summary>
-        /// <param name="e">The <see cref="T:System.Windows.Forms.MouseEventArgs"/> instance containing the event data.</param>
-        public bool MouseDown(MouseEventArgs e)
-        {
-            return false;
-        }
+    }
+    public void MouseUp(MouseEventArgs e) {
 
-        /// <summary>
-        /// Handles the mouse move event
-        /// </summary>
-        /// <param name="e">The <see cref="T:System.Windows.Forms.MouseEventArgs"/> instance containing the event data.</param>
-        public void MouseMove(MouseEventArgs e)
-        {
-
-        }
-        public void MouseUp(MouseEventArgs e)
-        {
-
-        }
-        #endregion
+    }
+    #endregion
 
 
-    }
+  }
 
 }
Index: /trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.Netron/3.0.2672.12446/Netron.Diagramming.Core-3.0.2672.12446/Tools/HitTool.cs
===================================================================
--- /trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.Netron/3.0.2672.12446/Netron.Diagramming.Core-3.0.2672.12446/Tools/HitTool.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.Netron/3.0.2672.12446/Netron.Diagramming.Core-3.0.2672.12446/Tools/HitTool.cs	(revision 4068)
@@ -1,34 +1,29 @@
 using System;
-using System.Diagnostics;
-using System.Collections;
-using System.Drawing;
 using System.Windows.Forms;
 
-namespace Netron.Diagramming.Core
-{
-    // ----------------------------------------------------------------------
+namespace Netron.Diagramming.Core {
+  // ----------------------------------------------------------------------
+  /// <summary>
+  /// This tool implement the action of hitting an entity on the canvas. 
+  /// </summary>
+  // ----------------------------------------------------------------------
+  public class HitTool : AbstractTool, IMouseListener, IKeyboardListener {
+    #region Fields
+
+    // ------------------------------------------------------------------
     /// <summary>
-    /// This tool implement the action of hitting an entity on the canvas. 
+    /// Specifies if one of the multi-select keys are pressed.  If this
+    /// is false, then the current Selection is cleared before adding
+    /// any selected entities to the Selection.
     /// </summary>
-    // ----------------------------------------------------------------------
-    public class HitTool : AbstractTool, IMouseListener, IKeyboardListener
-    {
-        #region Fields 
-        
-        // ------------------------------------------------------------------
-        /// <summary>
-        /// Specifies if one of the multi-select keys are pressed.  If this
-        /// is false, then the current Selection is cleared before adding
-        /// any selected entities to the Selection.
-        /// </summary>
-        // ------------------------------------------------------------------
-        bool isMultiSelectKeyPressed = false;
+    // ------------------------------------------------------------------
+    bool isMultiSelectKeyPressed = false;
 
-        // ------------------------------------------------------------------
-        /// <summary>
-        /// The keyboard keys that enable/disable multi-selection.
-        /// </summary>
-        // ------------------------------------------------------------------
-        Keys[] myMultiSelectKeys = new Keys[]
+    // ------------------------------------------------------------------
+    /// <summary>
+    /// The keyboard keys that enable/disable multi-selection.
+    /// </summary>
+    // ------------------------------------------------------------------
+    Keys[] myMultiSelectKeys = new Keys[]
             {
                 Keys.ShiftKey,
@@ -36,192 +31,169 @@
             };
 
-        #endregion
+    #endregion
 
-        #region Constructor
+    #region Constructor
 
-        // ------------------------------------------------------------------
-        /// <summary>
-        /// Initializes a new instance of the <see cref="T:HitTool"/> class.
-        /// </summary>
-        /// <param name="name">The name of the tool.</param>
-        // ------------------------------------------------------------------
-        public HitTool(string name)
-            : base(name)
-        {
-        }
-        #endregion
+    // ------------------------------------------------------------------
+    /// <summary>
+    /// Initializes a new instance of the <see cref="T:HitTool"/> class.
+    /// </summary>
+    /// <param name="name">The name of the tool.</param>
+    // ------------------------------------------------------------------
+    public HitTool(string name)
+      : base(name) {
+    }
+    #endregion
 
-        #region Methods
+    #region Methods
 
-        // ------------------------------------------------------------------
-        /// <summary>
-        /// Called when the tool is activated.
-        /// </summary>
-        // ------------------------------------------------------------------
-        protected override void OnActivateTool()
-        {          
+    // ------------------------------------------------------------------
+    /// <summary>
+    /// Called when the tool is activated.
+    /// </summary>
+    // ------------------------------------------------------------------
+    protected override void OnActivateTool() {
+    }
+
+    // ------------------------------------------------------------------
+    /// <summary>
+    /// Handles the mouse down event
+    /// </summary>
+    /// <param name="e">The 
+    /// <see cref="T:System.Windows.Forms.MouseEventArgs"/> instance 
+    /// containing the event data.</param>
+    // ------------------------------------------------------------------
+    public virtual bool MouseDown(MouseEventArgs e) {
+      if (e == null) {
+        throw new ArgumentNullException("The argument object is 'null'");
+      }
+
+      //if(e.Button == MouseButtons.Left  && Enabled && !IsSuspended)
+      if (Enabled && !IsSuspended) {
+        // Only if one of the multi-select keys are pressed do we NOT
+        // clear the selection before adding to it the selected entity.
+        bool clearSelectionFirst = true;
+        if (this.isMultiSelectKeyPressed == true) {
+          clearSelectionFirst = false;
         }
 
-        // ------------------------------------------------------------------
-        /// <summary>
-        /// Handles the mouse down event
-        /// </summary>
-        /// <param name="e">The 
-        /// <see cref="T:System.Windows.Forms.MouseEventArgs"/> instance 
-        /// containing the event data.</param>
-        // ------------------------------------------------------------------
-        public virtual bool MouseDown(MouseEventArgs e)
-        {
-            if (e == null)
-            {
-                throw new ArgumentNullException("The argument object is 'null'");
-            }                     
+        // Also don't clear the selection if a group is currently
+        // selected so we can drill-down into it.
+        if (this.Controller.Model.Selection.SelectedItems.Count > 0) {
+          foreach (IDiagramEntity entity in this.Controller.Model.Selection.SelectedItems) {
+            if ((entity is IGroup) &&
+                (entity.Hit(e.Location) == true)) {
+              clearSelectionFirst = false;
+            }
+          }
+        }
+        this.Controller.Model.Selection.CollectEntitiesAt(e.Location, clearSelectionFirst);
 
-            //if(e.Button == MouseButtons.Left  && Enabled && !IsSuspended)
-            if (Enabled && !IsSuspended)
-            {
-                // Only if one of the multi-select keys are pressed do we NOT
-                // clear the selection before adding to it the selected entity.
-                bool clearSelectionFirst = true;   
-                if (this.isMultiSelectKeyPressed == true)
-                {
-                    clearSelectionFirst = false;
-                }
+        if (this.Controller.Model.Selection.SelectedItems.Count > 0) {
+          IMouseListener listener =
+             this.Controller.Model.Selection.SelectedItems[0].GetService(
+              typeof(IMouseListener)) as IMouseListener;
 
-                // Also don't clear the selection if a group is currently
-                // selected so we can drill-down into it.
-                if (this.Controller.Model.Selection.SelectedItems.Count > 0)
-                {
-                  foreach (IDiagramEntity entity in this.Controller.Model.Selection.SelectedItems)
-                    {
-                        if ( (entity is IGroup) &&
-                            (entity.Hit(e.Location) == true) )
-                        {
-                            clearSelectionFirst = false;
-                        }
-                    }
-                }
-                this.Controller.Model.Selection.CollectEntitiesAt(e.Location, clearSelectionFirst);
-
-                if (this.Controller.Model.Selection.SelectedItems.Count > 0)
-                {
-                    IMouseListener listener =
-                       this.Controller.Model.Selection.SelectedItems[0].GetService(
-                        typeof(IMouseListener)) as IMouseListener;
-
-                    if (listener != null)
-                    {
-                        if (listener.MouseDown(e))
-                            return true;
-                    }
-                }
-
-                if ((this.Controller.Model.Selection.SelectedItems.Count > 0) &&
-                    (this.Controller.Model.Selection.SelectedItems[0] is ITextProvider))
-                {
-                    //ActivateTool();
-                    ITextProvider textProvider =
-                       this.Controller.Model.Selection.SelectedItems[0] as ITextProvider;
-
-                    if ((e.Clicks == textProvider.EditTextClicks) &&
-                        (textProvider.AllowTextEditing))
-                    {
-                        return Controller.ActivateTextEditor(textProvider);
-                    }
-                }
-            }
-             return false;
+          if (listener != null) {
+            if (listener.MouseDown(e))
+              return true;
+          }
         }
 
-        // ------------------------------------------------------------------
-        /// <summary>
-        /// Handles the mouse move event.
-        /// </summary>
-        /// <param name="e">The 
-        /// <see cref="T:System.Windows.Forms.MouseEventArgs"/> instance 
-        /// containing the event data.</param>
-        // ------------------------------------------------------------------
-        public virtual void MouseMove(MouseEventArgs e)
-        {
-      
+        if ((this.Controller.Model.Selection.SelectedItems.Count > 0) &&
+            (this.Controller.Model.Selection.SelectedItems[0] is ITextProvider)) {
+          //ActivateTool();
+          ITextProvider textProvider =
+             this.Controller.Model.Selection.SelectedItems[0] as ITextProvider;
+
+          if ((e.Clicks == textProvider.EditTextClicks) &&
+              (textProvider.AllowTextEditing)) {
+            return Controller.ActivateTextEditor(textProvider);
+          }
         }
-
-        // ------------------------------------------------------------------
-        /// <summary>
-        /// Handles the mouse up event.
-        /// </summary>
-        /// <param name="e">The 
-        /// <see cref="T:System.Windows.Forms.MouseEventArgs"/> instance 
-        /// containing the event data.</param>
-        // ------------------------------------------------------------------
-        public virtual void MouseUp(MouseEventArgs e)
-        {
-            if(IsActive)
-            {
-                DeactivateTool();
-            }
-        }
-        #endregion
-
-        #region IKeyboardListener Members
-
-        // ------------------------------------------------------------------
-        /// <summary>
-        /// Handles the key down event.  If the key pressed is one of our
-        /// keys defined as a multi-select key, then selected items are
-        /// appended to the Selection (i.e. the Selection is not cleared
-        /// first).
-        /// </summary>
-        /// <param name="e">The 
-        /// <see cref="T:System.Windows.Forms.MouseEventArgs"/> instance 
-        /// containing the event data.</param>
-        // ------------------------------------------------------------------
-        public void KeyDown(KeyEventArgs e)
-        {
-            foreach (Keys k in this.myMultiSelectKeys)
-            {
-                if (e.KeyCode == k)
-                {
-                    this.isMultiSelectKeyPressed = true;
-                    return;
-                }
-            }
-        }
-
-        // ------------------------------------------------------------------
-        /// <summary>
-        /// Handles the key up event.  If the key pressed is one of our
-        /// keys defined as a multi-select key, then multi-select mode is
-        /// disabled.
-        /// </summary>
-        /// <param name="e">The 
-        /// <see cref="T:System.Windows.Forms.MouseEventArgs"/> instance 
-        /// containing the event data.</param>
-        // ------------------------------------------------------------------
-        public void KeyUp(KeyEventArgs e)
-        {
-            foreach (Keys k in this.myMultiSelectKeys)
-            {
-                if (e.KeyCode == k)
-                {
-                    this.isMultiSelectKeyPressed = false;
-                    return;
-                }
-            }
-        }
-
-        // ------------------------------------------------------------------
-        /// <summary>
-        /// Handles the key press event.  Nothing is performed here.
-        /// </summary>
-        /// <param name="e">The 
-        /// <see cref="T:System.Windows.Forms.MouseEventArgs"/> instance 
-        /// containing the event data.</param>
-        // ------------------------------------------------------------------
-        public void KeyPress(KeyPressEventArgs e)
-        {}
-
-        #endregion
+      }
+      return false;
     }
 
+    // ------------------------------------------------------------------
+    /// <summary>
+    /// Handles the mouse move event.
+    /// </summary>
+    /// <param name="e">The 
+    /// <see cref="T:System.Windows.Forms.MouseEventArgs"/> instance 
+    /// containing the event data.</param>
+    // ------------------------------------------------------------------
+    public virtual void MouseMove(MouseEventArgs e) {
+
+    }
+
+    // ------------------------------------------------------------------
+    /// <summary>
+    /// Handles the mouse up event.
+    /// </summary>
+    /// <param name="e">The 
+    /// <see cref="T:System.Windows.Forms.MouseEventArgs"/> instance 
+    /// containing the event data.</param>
+    // ------------------------------------------------------------------
+    public virtual void MouseUp(MouseEventArgs e) {
+      if (IsActive) {
+        DeactivateTool();
+      }
+    }
+    #endregion
+
+    #region IKeyboardListener Members
+
+    // ------------------------------------------------------------------
+    /// <summary>
+    /// Handles the key down event.  If the key pressed is one of our
+    /// keys defined as a multi-select key, then selected items are
+    /// appended to the Selection (i.e. the Selection is not cleared
+    /// first).
+    /// </summary>
+    /// <param name="e">The 
+    /// <see cref="T:System.Windows.Forms.MouseEventArgs"/> instance 
+    /// containing the event data.</param>
+    // ------------------------------------------------------------------
+    public void KeyDown(KeyEventArgs e) {
+      foreach (Keys k in this.myMultiSelectKeys) {
+        if (e.KeyCode == k) {
+          this.isMultiSelectKeyPressed = true;
+          return;
+        }
+      }
+    }
+
+    // ------------------------------------------------------------------
+    /// <summary>
+    /// Handles the key up event.  If the key pressed is one of our
+    /// keys defined as a multi-select key, then multi-select mode is
+    /// disabled.
+    /// </summary>
+    /// <param name="e">The 
+    /// <see cref="T:System.Windows.Forms.MouseEventArgs"/> instance 
+    /// containing the event data.</param>
+    // ------------------------------------------------------------------
+    public void KeyUp(KeyEventArgs e) {
+      foreach (Keys k in this.myMultiSelectKeys) {
+        if (e.KeyCode == k) {
+          this.isMultiSelectKeyPressed = false;
+          return;
+        }
+      }
+    }
+
+    // ------------------------------------------------------------------
+    /// <summary>
+    /// Handles the key press event.  Nothing is performed here.
+    /// </summary>
+    /// <param name="e">The 
+    /// <see cref="T:System.Windows.Forms.MouseEventArgs"/> instance 
+    /// containing the event data.</param>
+    // ------------------------------------------------------------------
+    public void KeyPress(KeyPressEventArgs e) { }
+
+    #endregion
+  }
+
 }
Index: /trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.Netron/3.0.2672.12446/Netron.Diagramming.Core-3.0.2672.12446/Tools/HotKeys.cs
===================================================================
--- /trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.Netron/3.0.2672.12446/Netron.Diagramming.Core-3.0.2672.12446/Tools/HotKeys.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.Netron/3.0.2672.12446/Netron.Diagramming.Core-3.0.2672.12446/Tools/HotKeys.cs	(revision 4068)
@@ -1,413 +1,393 @@
-using System;
-using System.Collections.Generic;
-using System.Text;
-using System.Diagnostics;
-
-namespace Netron.Diagramming.Core
-{
+
+namespace Netron.Diagramming.Core {
+  /// <summary>
+  /// This class implementing the <see cref="IKeyboardListener"/> collects all the hotkeys.
+  /// </summary>
+  class HotKeys : IKeyboardListener {
+    // ------------------------------------------------------------------
     /// <summary>
-    /// This class implementing the <see cref="IKeyboardListener"/> collects all the hotkeys.
+    /// Specifies if the Control key is pressed.  This is set in the
+    /// KeyPress and KeyUp methods.
     /// </summary>
-    class HotKeys : IKeyboardListener
-    {
-        // ------------------------------------------------------------------
-        /// <summary>
-        /// Specifies if the Control key is pressed.  This is set in the
-        /// KeyPress and KeyUp methods.
-        /// </summary>
-        // ------------------------------------------------------------------
-        bool controlIsPressed = false;
-
-        private IController mController;
-
-        public IController Controller
-        {
-            get { return mController; }
-        }
-
-        public HotKeys(IController controller)
-        {
-            mController = controller;
-        }
-
-        public void KeyUp(System.Windows.Forms.KeyEventArgs e)
-        {
-            switch (e.KeyCode)
-            {
-                case System.Windows.Forms.Keys.A:
-                    if (controlIsPressed)
-                    {
-                        this.Controller.SelectAll();
-                    }
-                    break;
-                case System.Windows.Forms.Keys.Add:
-                    break;
-                case System.Windows.Forms.Keys.Alt:
-                    break;
-
-                case System.Windows.Forms.Keys.Attn:
-                    break;
-                case System.Windows.Forms.Keys.B:
-                    break;
-                case System.Windows.Forms.Keys.Back:
-                    break;
-                case System.Windows.Forms.Keys.BrowserBack:
-                    break;
-                case System.Windows.Forms.Keys.BrowserFavorites:
-                    break;
-                case System.Windows.Forms.Keys.BrowserForward:
-                    break;
-                case System.Windows.Forms.Keys.BrowserHome:
-                    break;
-                case System.Windows.Forms.Keys.BrowserRefresh:
-                    break;
-                case System.Windows.Forms.Keys.BrowserSearch:
-                    break;
-                case System.Windows.Forms.Keys.BrowserStop:
-                    break;
-                case System.Windows.Forms.Keys.C:
-                    if (controlIsPressed)
-                    {
-                        this.Controller.ActivateTool(
-                            ControllerBase.CopyToolName);
-                    }
-                    break;
-                case System.Windows.Forms.Keys.Cancel:
-                    break;
-                case System.Windows.Forms.Keys.Capital:
-                    break;
-
-                case System.Windows.Forms.Keys.Clear:
-                    break;
-                case System.Windows.Forms.Keys.Control:
-                    break;
-                case System.Windows.Forms.Keys.ControlKey:
-                    break;
-                case System.Windows.Forms.Keys.Crsel:
-                    break;
-                case System.Windows.Forms.Keys.D:
-                    break;
-                case System.Windows.Forms.Keys.D0:
-                    break;
-                case System.Windows.Forms.Keys.D1:
-                    break;
-                case System.Windows.Forms.Keys.D2:
-                    break;
-                case System.Windows.Forms.Keys.D3:
-                    break;
-                case System.Windows.Forms.Keys.D4:
-                    break;
-                case System.Windows.Forms.Keys.D5:
-                    break;
-                case System.Windows.Forms.Keys.D6:
-                    break;
-                case System.Windows.Forms.Keys.D7:
-                    break;
-                case System.Windows.Forms.Keys.D8:
-                    break;
-                case System.Windows.Forms.Keys.D9:
-                    break;
-                case System.Windows.Forms.Keys.Decimal:
-                    break;
-                case System.Windows.Forms.Keys.Delete:
-                    // The following code was moved to the DeleteTool.
-                    //cmd = new DeleteCommand(
-                    //    this.mController, 
-                    //    Selection.SelectedItems.Copy());
-                    //this.Controller.UndoManager.AddUndoCommand(cmd);
-                    //cmd.Redo();
-
-                    Controller.ActivateTool(ControllerBase.DeleteToolName);
-                    break;
-                case System.Windows.Forms.Keys.Divide:
-                    break;
-                case System.Windows.Forms.Keys.Down:
-                    break;
-                case System.Windows.Forms.Keys.E:
-                    break;
-                case System.Windows.Forms.Keys.End:
-                    break;
-                case System.Windows.Forms.Keys.Enter:
-                    break;
-                case System.Windows.Forms.Keys.EraseEof:
-                    break;
-                case System.Windows.Forms.Keys.Escape:
-                    break;
-                case System.Windows.Forms.Keys.Execute:
-                    break;
-
-                case System.Windows.Forms.Keys.F:
-                    break;
-                case System.Windows.Forms.Keys.F1:
-                    break;
-                case System.Windows.Forms.Keys.F10:
-                    break;
-                case System.Windows.Forms.Keys.F11:
-                    break;
-                case System.Windows.Forms.Keys.F12:
-                    break;
-                case System.Windows.Forms.Keys.F13:
-                    break;
-                case System.Windows.Forms.Keys.F14:
-                    break;
-                case System.Windows.Forms.Keys.F15:
-                    break;
-                case System.Windows.Forms.Keys.F16:
-                    break;
-                case System.Windows.Forms.Keys.F17:
-                    break;
-                case System.Windows.Forms.Keys.F18:
-                    break;
-                case System.Windows.Forms.Keys.F19:
-                    break;
-                case System.Windows.Forms.Keys.F2:
-                    break;
-                case System.Windows.Forms.Keys.F20:
-                    break;
-                case System.Windows.Forms.Keys.F21:
-                    break;
-                case System.Windows.Forms.Keys.F22:
-                    break;
-                case System.Windows.Forms.Keys.F23:
-                    break;
-                case System.Windows.Forms.Keys.F24:
-                    break;
-                case System.Windows.Forms.Keys.F3:
-                    break;
-                case System.Windows.Forms.Keys.F4:
-                    break;
-                case System.Windows.Forms.Keys.F5:
-                    break;
-                case System.Windows.Forms.Keys.F6:
-                    break;
-                case System.Windows.Forms.Keys.F7:
-                    break;
-                case System.Windows.Forms.Keys.F8:
-                    break;
-                case System.Windows.Forms.Keys.F9:
-                    break;
-                case System.Windows.Forms.Keys.FinalMode:
-                    break;
-                case System.Windows.Forms.Keys.G:
-                    break;
-                case System.Windows.Forms.Keys.H:
-                    break;
-
-
-
-                case System.Windows.Forms.Keys.Help:
-                    break;
-                case System.Windows.Forms.Keys.Home:
-                    break;
-                case System.Windows.Forms.Keys.I:
-                    break;
-
-                case System.Windows.Forms.Keys.Insert:
-                    break;
-                case System.Windows.Forms.Keys.J:
-                    break;
-
-                case System.Windows.Forms.Keys.K:
-                    break;
-
-                case System.Windows.Forms.Keys.KeyCode:
-                    break;
-                case System.Windows.Forms.Keys.L:
-                    break;
-                case System.Windows.Forms.Keys.LButton:
-                    break;
-                case System.Windows.Forms.Keys.LControlKey:
-                    break;
-                case System.Windows.Forms.Keys.LMenu:
-                    break;
-                case System.Windows.Forms.Keys.LShiftKey:
-                    break;
-                case System.Windows.Forms.Keys.LWin:
-                    break;
-
-                case System.Windows.Forms.Keys.Left:
-                    break;
-                case System.Windows.Forms.Keys.LineFeed:
-                    break;
-                case System.Windows.Forms.Keys.M:
-                    break;
-                case System.Windows.Forms.Keys.MButton:
-                    break;
-
-                case System.Windows.Forms.Keys.Menu:
-                    break;
-                case System.Windows.Forms.Keys.Modifiers:
-                    break;
-                case System.Windows.Forms.Keys.Multiply:
-                    break;
-                case System.Windows.Forms.Keys.N:
-                    if (controlIsPressed)
-                        this.Controller.ParentControl.NewDocument();
-                    break;
-                case System.Windows.Forms.Keys.Next:
-                    break;
-                case System.Windows.Forms.Keys.NoName:
-                    break;
-                case System.Windows.Forms.Keys.None:
-                    break;
-                case System.Windows.Forms.Keys.NumLock:
-                    break;
-                case System.Windows.Forms.Keys.NumPad0:
-                    break;
-                case System.Windows.Forms.Keys.NumPad1:
-
-                    break;
-                case System.Windows.Forms.Keys.NumPad2:
-                    break;
-                case System.Windows.Forms.Keys.NumPad3:
-                    break;
-                case System.Windows.Forms.Keys.NumPad4:
-                    break;
-                case System.Windows.Forms.Keys.NumPad5:
-                    break;
-                case System.Windows.Forms.Keys.NumPad6:
-                    break;
-                case System.Windows.Forms.Keys.NumPad7:
-                    break;
-                case System.Windows.Forms.Keys.NumPad8:
-                    break;
-                case System.Windows.Forms.Keys.NumPad9:
-                    break;
-                case System.Windows.Forms.Keys.O:
-                    this.Controller.ParentControl.Open();
-                    break;
-
-
-                case System.Windows.Forms.Keys.Oemcomma:
-                    break;
-                case System.Windows.Forms.Keys.Oemplus:
-                    break;
-
-                case System.Windows.Forms.Keys.P:
-
-                    break;
-
-                case System.Windows.Forms.Keys.Packet:
-                    break;
-
-                case System.Windows.Forms.Keys.PageUp:
-                    break;
-                case System.Windows.Forms.Keys.Pause:
-                    break;
-                case System.Windows.Forms.Keys.Play:
-                    break;
-                case System.Windows.Forms.Keys.Print:
-                    break;
-                case System.Windows.Forms.Keys.PrintScreen:
-                    break;
-
-                case System.Windows.Forms.Keys.ProcessKey:
-                    break;
-                case System.Windows.Forms.Keys.Q:
-                    break;
-                case System.Windows.Forms.Keys.R:
-                    break;
-                case System.Windows.Forms.Keys.RButton:
-                    break;
-                case System.Windows.Forms.Keys.RControlKey:
-                    break;
-                case System.Windows.Forms.Keys.RMenu:
-                    break;
-                case System.Windows.Forms.Keys.RShiftKey:
-                    break;
-                case System.Windows.Forms.Keys.RWin:
-                    break;
-
-                case System.Windows.Forms.Keys.Right:
-                    break;
-                case System.Windows.Forms.Keys.S:
-                    this.Controller.ParentControl.Save();
-                    break;
-                case System.Windows.Forms.Keys.Scroll:
-                    break;
-                case System.Windows.Forms.Keys.Select:
-                    break;
-                case System.Windows.Forms.Keys.SelectMedia:
-                    break;
-                case System.Windows.Forms.Keys.Separator:
-                    break;
-                case System.Windows.Forms.Keys.Shift:
-                    break;
-                case System.Windows.Forms.Keys.ShiftKey:
-                    break;
-                case System.Windows.Forms.Keys.Sleep:
-                    break;
-
-                case System.Windows.Forms.Keys.Space:
-                    break;
-                case System.Windows.Forms.Keys.Subtract:
-                    break;
-                case System.Windows.Forms.Keys.T:
-                    break;
-                case System.Windows.Forms.Keys.Tab:
-                    break;
-                case System.Windows.Forms.Keys.U:
-                    break;
-                case System.Windows.Forms.Keys.Up:
-                    break;
-                case System.Windows.Forms.Keys.V:
-                    if (controlIsPressed)
-                    {
-                        this.Controller.ActivateTool(
-                            ControllerBase.PasteToolName);
-                    }
-                    break;
-                case System.Windows.Forms.Keys.VolumeDown:
-                    break;
-                case System.Windows.Forms.Keys.VolumeMute:
-                    break;
-                case System.Windows.Forms.Keys.VolumeUp:
-                    break;
-                case System.Windows.Forms.Keys.W:
-                    break;
-                case System.Windows.Forms.Keys.X:
-                    if (controlIsPressed)
-                    {
-                        this.Controller.ActivateTool(
-                            ControllerBase.CutToolName);
-                    }
-                    break;
-
-                case System.Windows.Forms.Keys.Y:
-                    if (controlIsPressed)
-                    {
-                        if (this.Controller.UndoManager.CanRedo())
-                        {
-                            this.Controller.Redo();
-                        }
-                    }
-                    break;
-                case System.Windows.Forms.Keys.Z:
-                    if (controlIsPressed)
-                    {
-                        if (this.Controller.UndoManager.CanUndo())
-                        {
-                            this.Controller.Undo();
-                        }
-                    }
-                    break;
-                case System.Windows.Forms.Keys.Zoom:
-                    break;
-                default:
-                    break;
+    // ------------------------------------------------------------------
+    bool controlIsPressed = false;
+
+    private IController mController;
+
+    public IController Controller {
+      get { return mController; }
+    }
+
+    public HotKeys(IController controller) {
+      mController = controller;
+    }
+
+    public void KeyUp(System.Windows.Forms.KeyEventArgs e) {
+      switch (e.KeyCode) {
+        case System.Windows.Forms.Keys.A:
+          if (controlIsPressed) {
+            this.Controller.SelectAll();
+          }
+          break;
+        case System.Windows.Forms.Keys.Add:
+          break;
+        case System.Windows.Forms.Keys.Alt:
+          break;
+
+        case System.Windows.Forms.Keys.Attn:
+          break;
+        case System.Windows.Forms.Keys.B:
+          break;
+        case System.Windows.Forms.Keys.Back:
+          break;
+        case System.Windows.Forms.Keys.BrowserBack:
+          break;
+        case System.Windows.Forms.Keys.BrowserFavorites:
+          break;
+        case System.Windows.Forms.Keys.BrowserForward:
+          break;
+        case System.Windows.Forms.Keys.BrowserHome:
+          break;
+        case System.Windows.Forms.Keys.BrowserRefresh:
+          break;
+        case System.Windows.Forms.Keys.BrowserSearch:
+          break;
+        case System.Windows.Forms.Keys.BrowserStop:
+          break;
+        case System.Windows.Forms.Keys.C:
+          if (controlIsPressed) {
+            this.Controller.ActivateTool(
+                ControllerBase.CopyToolName);
+          }
+          break;
+        case System.Windows.Forms.Keys.Cancel:
+          break;
+        case System.Windows.Forms.Keys.Capital:
+          break;
+
+        case System.Windows.Forms.Keys.Clear:
+          break;
+        case System.Windows.Forms.Keys.Control:
+          break;
+        case System.Windows.Forms.Keys.ControlKey:
+          break;
+        case System.Windows.Forms.Keys.Crsel:
+          break;
+        case System.Windows.Forms.Keys.D:
+          break;
+        case System.Windows.Forms.Keys.D0:
+          break;
+        case System.Windows.Forms.Keys.D1:
+          break;
+        case System.Windows.Forms.Keys.D2:
+          break;
+        case System.Windows.Forms.Keys.D3:
+          break;
+        case System.Windows.Forms.Keys.D4:
+          break;
+        case System.Windows.Forms.Keys.D5:
+          break;
+        case System.Windows.Forms.Keys.D6:
+          break;
+        case System.Windows.Forms.Keys.D7:
+          break;
+        case System.Windows.Forms.Keys.D8:
+          break;
+        case System.Windows.Forms.Keys.D9:
+          break;
+        case System.Windows.Forms.Keys.Decimal:
+          break;
+        case System.Windows.Forms.Keys.Delete:
+          // The following code was moved to the DeleteTool.
+          //cmd = new DeleteCommand(
+          //    this.mController, 
+          //    Selection.SelectedItems.Copy());
+          //this.Controller.UndoManager.AddUndoCommand(cmd);
+          //cmd.Redo();
+
+          Controller.ActivateTool(ControllerBase.DeleteToolName);
+          break;
+        case System.Windows.Forms.Keys.Divide:
+          break;
+        case System.Windows.Forms.Keys.Down:
+          break;
+        case System.Windows.Forms.Keys.E:
+          break;
+        case System.Windows.Forms.Keys.End:
+          break;
+        case System.Windows.Forms.Keys.Enter:
+          break;
+        case System.Windows.Forms.Keys.EraseEof:
+          break;
+        case System.Windows.Forms.Keys.Escape:
+          break;
+        case System.Windows.Forms.Keys.Execute:
+          break;
+
+        case System.Windows.Forms.Keys.F:
+          break;
+        case System.Windows.Forms.Keys.F1:
+          break;
+        case System.Windows.Forms.Keys.F10:
+          break;
+        case System.Windows.Forms.Keys.F11:
+          break;
+        case System.Windows.Forms.Keys.F12:
+          break;
+        case System.Windows.Forms.Keys.F13:
+          break;
+        case System.Windows.Forms.Keys.F14:
+          break;
+        case System.Windows.Forms.Keys.F15:
+          break;
+        case System.Windows.Forms.Keys.F16:
+          break;
+        case System.Windows.Forms.Keys.F17:
+          break;
+        case System.Windows.Forms.Keys.F18:
+          break;
+        case System.Windows.Forms.Keys.F19:
+          break;
+        case System.Windows.Forms.Keys.F2:
+          break;
+        case System.Windows.Forms.Keys.F20:
+          break;
+        case System.Windows.Forms.Keys.F21:
+          break;
+        case System.Windows.Forms.Keys.F22:
+          break;
+        case System.Windows.Forms.Keys.F23:
+          break;
+        case System.Windows.Forms.Keys.F24:
+          break;
+        case System.Windows.Forms.Keys.F3:
+          break;
+        case System.Windows.Forms.Keys.F4:
+          break;
+        case System.Windows.Forms.Keys.F5:
+          break;
+        case System.Windows.Forms.Keys.F6:
+          break;
+        case System.Windows.Forms.Keys.F7:
+          break;
+        case System.Windows.Forms.Keys.F8:
+          break;
+        case System.Windows.Forms.Keys.F9:
+          break;
+        case System.Windows.Forms.Keys.FinalMode:
+          break;
+        case System.Windows.Forms.Keys.G:
+          break;
+        case System.Windows.Forms.Keys.H:
+          break;
+
+
+
+        case System.Windows.Forms.Keys.Help:
+          break;
+        case System.Windows.Forms.Keys.Home:
+          break;
+        case System.Windows.Forms.Keys.I:
+          break;
+
+        case System.Windows.Forms.Keys.Insert:
+          break;
+        case System.Windows.Forms.Keys.J:
+          break;
+
+        case System.Windows.Forms.Keys.K:
+          break;
+
+        case System.Windows.Forms.Keys.KeyCode:
+          break;
+        case System.Windows.Forms.Keys.L:
+          break;
+        case System.Windows.Forms.Keys.LButton:
+          break;
+        case System.Windows.Forms.Keys.LControlKey:
+          break;
+        case System.Windows.Forms.Keys.LMenu:
+          break;
+        case System.Windows.Forms.Keys.LShiftKey:
+          break;
+        case System.Windows.Forms.Keys.LWin:
+          break;
+
+        case System.Windows.Forms.Keys.Left:
+          break;
+        case System.Windows.Forms.Keys.LineFeed:
+          break;
+        case System.Windows.Forms.Keys.M:
+          break;
+        case System.Windows.Forms.Keys.MButton:
+          break;
+
+        case System.Windows.Forms.Keys.Menu:
+          break;
+        case System.Windows.Forms.Keys.Modifiers:
+          break;
+        case System.Windows.Forms.Keys.Multiply:
+          break;
+        case System.Windows.Forms.Keys.N:
+          if (controlIsPressed)
+            this.Controller.ParentControl.NewDocument();
+          break;
+        case System.Windows.Forms.Keys.Next:
+          break;
+        case System.Windows.Forms.Keys.NoName:
+          break;
+        case System.Windows.Forms.Keys.None:
+          break;
+        case System.Windows.Forms.Keys.NumLock:
+          break;
+        case System.Windows.Forms.Keys.NumPad0:
+          break;
+        case System.Windows.Forms.Keys.NumPad1:
+
+          break;
+        case System.Windows.Forms.Keys.NumPad2:
+          break;
+        case System.Windows.Forms.Keys.NumPad3:
+          break;
+        case System.Windows.Forms.Keys.NumPad4:
+          break;
+        case System.Windows.Forms.Keys.NumPad5:
+          break;
+        case System.Windows.Forms.Keys.NumPad6:
+          break;
+        case System.Windows.Forms.Keys.NumPad7:
+          break;
+        case System.Windows.Forms.Keys.NumPad8:
+          break;
+        case System.Windows.Forms.Keys.NumPad9:
+          break;
+        case System.Windows.Forms.Keys.O:
+          this.Controller.ParentControl.Open();
+          break;
+
+
+        case System.Windows.Forms.Keys.Oemcomma:
+          break;
+        case System.Windows.Forms.Keys.Oemplus:
+          break;
+
+        case System.Windows.Forms.Keys.P:
+
+          break;
+
+        case System.Windows.Forms.Keys.Packet:
+          break;
+
+        case System.Windows.Forms.Keys.PageUp:
+          break;
+        case System.Windows.Forms.Keys.Pause:
+          break;
+        case System.Windows.Forms.Keys.Play:
+          break;
+        case System.Windows.Forms.Keys.Print:
+          break;
+        case System.Windows.Forms.Keys.PrintScreen:
+          break;
+
+        case System.Windows.Forms.Keys.ProcessKey:
+          break;
+        case System.Windows.Forms.Keys.Q:
+          break;
+        case System.Windows.Forms.Keys.R:
+          break;
+        case System.Windows.Forms.Keys.RButton:
+          break;
+        case System.Windows.Forms.Keys.RControlKey:
+          break;
+        case System.Windows.Forms.Keys.RMenu:
+          break;
+        case System.Windows.Forms.Keys.RShiftKey:
+          break;
+        case System.Windows.Forms.Keys.RWin:
+          break;
+
+        case System.Windows.Forms.Keys.Right:
+          break;
+        case System.Windows.Forms.Keys.S:
+          this.Controller.ParentControl.Save();
+          break;
+        case System.Windows.Forms.Keys.Scroll:
+          break;
+        case System.Windows.Forms.Keys.Select:
+          break;
+        case System.Windows.Forms.Keys.SelectMedia:
+          break;
+        case System.Windows.Forms.Keys.Separator:
+          break;
+        case System.Windows.Forms.Keys.Shift:
+          break;
+        case System.Windows.Forms.Keys.ShiftKey:
+          break;
+        case System.Windows.Forms.Keys.Sleep:
+          break;
+
+        case System.Windows.Forms.Keys.Space:
+          break;
+        case System.Windows.Forms.Keys.Subtract:
+          break;
+        case System.Windows.Forms.Keys.T:
+          break;
+        case System.Windows.Forms.Keys.Tab:
+          break;
+        case System.Windows.Forms.Keys.U:
+          break;
+        case System.Windows.Forms.Keys.Up:
+          break;
+        case System.Windows.Forms.Keys.V:
+          if (controlIsPressed) {
+            this.Controller.ActivateTool(
+                ControllerBase.PasteToolName);
+          }
+          break;
+        case System.Windows.Forms.Keys.VolumeDown:
+          break;
+        case System.Windows.Forms.Keys.VolumeMute:
+          break;
+        case System.Windows.Forms.Keys.VolumeUp:
+          break;
+        case System.Windows.Forms.Keys.W:
+          break;
+        case System.Windows.Forms.Keys.X:
+          if (controlIsPressed) {
+            this.Controller.ActivateTool(
+                ControllerBase.CutToolName);
+          }
+          break;
+
+        case System.Windows.Forms.Keys.Y:
+          if (controlIsPressed) {
+            if (this.Controller.UndoManager.CanRedo()) {
+              this.Controller.Redo();
             }
-
-            this.controlIsPressed = e.Control;
-        }
-
-        public void KeyDown(System.Windows.Forms.KeyEventArgs e)
-        {
-            this.controlIsPressed = e.Control;
-        }
-
-        public void KeyPress(System.Windows.Forms.KeyPressEventArgs e)
-        {
-            
-        }
-    }
+          }
+          break;
+        case System.Windows.Forms.Keys.Z:
+          if (controlIsPressed) {
+            if (this.Controller.UndoManager.CanUndo()) {
+              this.Controller.Undo();
+            }
+          }
+          break;
+        case System.Windows.Forms.Keys.Zoom:
+          break;
+        default:
+          break;
+      }
+
+      this.controlIsPressed = e.Control;
+    }
+
+    public void KeyDown(System.Windows.Forms.KeyEventArgs e) {
+      this.controlIsPressed = e.Control;
+    }
+
+    public void KeyPress(System.Windows.Forms.KeyPressEventArgs e) {
+
+    }
+  }
 }
Index: /trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.Netron/3.0.2672.12446/Netron.Diagramming.Core-3.0.2672.12446/Tools/HoverTool.cs
===================================================================
--- /trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.Netron/3.0.2672.12446/Netron.Diagramming.Core-3.0.2672.12446/Tools/HoverTool.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.Netron/3.0.2672.12446/Netron.Diagramming.Core-3.0.2672.12446/Tools/HoverTool.cs	(revision 4068)
@@ -1,156 +1,140 @@
-using System;
-using System.Diagnostics;
 using System.Collections;
-using System.Drawing;
 using System.Windows.Forms;
 
-namespace Netron.Diagramming.Core
-{
-    // ----------------------------------------------------------------------
-    /// <summary>
-    /// This tool allows entities to give feedback (e.g. via a change of 
-    /// cursor) when the mouse is hovering over them.
-    /// </summary>
-    // ----------------------------------------------------------------------
-    class HoverTool : AbstractTool, IMouseListener
-    {
+namespace Netron.Diagramming.Core {
+  // ----------------------------------------------------------------------
+  /// <summary>
+  /// This tool allows entities to give feedback (e.g. via a change of 
+  /// cursor) when the mouse is hovering over them.
+  /// </summary>
+  // ----------------------------------------------------------------------
+  class HoverTool : AbstractTool, IMouseListener {
 
-        #region Fields
+    #region Fields
 
-        private IHoverListener currentListener = null;
+    private IHoverListener currentListener = null;
 
-        private IDiagramEntity previousHovered = null;
+    private IDiagramEntity previousHovered = null;
 
 
-        #endregion
+    #endregion
 
-        #region Constructor
+    #region Constructor
 
-        // ------------------------------------------------------------------
-        /// <summary>
-        /// Initializes a new instance of the <see cref="T:HoverTool"/> class.
-        /// </summary>
-        /// <param name="name">The name of the tool.</param>
-        // ------------------------------------------------------------------
-        public HoverTool(string name)
-            : base(name)
-        {
-        }
-
-        #endregion
-
-        #region Methods
-
-        // ------------------------------------------------------------------
-        /// <summary>
-        /// Called when the tool is activated.
-        /// </summary>
-        // ------------------------------------------------------------------
-        protected override void OnActivateTool()
-        {
-            
-
-        }
-
-        // ------------------------------------------------------------------
-        /// <summary>
-        /// Handles the mouse down event.
-        /// </summary>
-        /// <param name="e">The <see cref=
-        /// "T:System.Windows.Forms.MouseEventArgs"/> instance containing 
-        /// the event data.</param>
-        // ------------------------------------------------------------------
-        public bool MouseDown(MouseEventArgs e)
-        {
-            return false;
-        }
-
-        // ------------------------------------------------------------------
-        /// <summary>
-        /// Handles the mouse move event
-        /// </summary>
-        /// <param name="e">The <see cref=
-        /// "T:System.Windows.Forms.MouseEventArgs"/> instance containing 
-        /// the event data.</param>
-        // ------------------------------------------------------------------
-        public void MouseMove(MouseEventArgs e)
-        {
-
-            if (!IsSuspended && this.Enabled)
-            {
-                IHoverListener listener = null;
-
-                CollectionBase<IDiagramEntity> paintables= 
-                    this.Controller.Model.Paintables;
-                IDiagramEntity entity;
-                if(paintables.Count==0) return;
-                //going from top to the bottom of the z-order
-                for (int k=paintables.Count-1; k>=0; k--)
-                {
-                    entity = paintables[k];
-                    if(entity.Hit(e.Location)) //we caught an entity
-                    {
-                        //unhover the previous, if any
-                        if (previousHovered != null)
-                        {
-                            previousHovered.Hovered = false;
-                        }
-
-                        //tell the current one it's being hovered
-                        entity.Hovered = true; 
-
-                        //fetch the hovering service, if defined
-                        listener = entity.GetService(
-                            typeof(IHoverListener)) as IHoverListener;
-                        if(listener != null) //the caught entity does listen
-                        {
-                            if(currentListener == listener) //it's the same as the previous time
-                                listener.MouseHover(e);
-                            else //we moved from one entity to another listening entity
-                            {
-                                if(currentListener!=null) //tell the previous entity we are leaving
-                                    currentListener.MouseLeave(e);
-                                listener.MouseEnter(e); //tell the current one we enter
-                                currentListener = listener;
-                            }
-                        }
-                        else //the caught entity does not listen
-                        {
-                            if(currentListener != null)
-                            {
-                                currentListener.MouseLeave(e);
-                                currentListener = null;
-                            }
-                        }
-                        previousHovered = entity;//remember, for the next time
-                        return; //if another entity is listening underneath this entity it will not receive the notification
-                    }
-                }
-                if(currentListener != null)
-                {
-                    currentListener.MouseLeave(e);
-                    currentListener = null;
-                }
-                //unhover the previous, if any
-                if(previousHovered != null)
-                    previousHovered.Hovered = false;
-
-            }
-        }
-
-        // ------------------------------------------------------------------
-        /// <summary>
-        /// Handles the mouse up event.
-        /// </summary>
-        /// <param name="e">The <see cref=
-        /// "T:System.Windows.Forms.MouseEventArgs"/> instance containing 
-        /// the event data.</param>
-        // ------------------------------------------------------------------
-        public void MouseUp(MouseEventArgs e)
-        {
-           
-        }
-        #endregion
+    // ------------------------------------------------------------------
+    /// <summary>
+    /// Initializes a new instance of the <see cref="T:HoverTool"/> class.
+    /// </summary>
+    /// <param name="name">The name of the tool.</param>
+    // ------------------------------------------------------------------
+    public HoverTool(string name)
+      : base(name) {
     }
 
+    #endregion
+
+    #region Methods
+
+    // ------------------------------------------------------------------
+    /// <summary>
+    /// Called when the tool is activated.
+    /// </summary>
+    // ------------------------------------------------------------------
+    protected override void OnActivateTool() {
+
+
+    }
+
+    // ------------------------------------------------------------------
+    /// <summary>
+    /// Handles the mouse down event.
+    /// </summary>
+    /// <param name="e">The <see cref=
+    /// "T:System.Windows.Forms.MouseEventArgs"/> instance containing 
+    /// the event data.</param>
+    // ------------------------------------------------------------------
+    public bool MouseDown(MouseEventArgs e) {
+      return false;
+    }
+
+    // ------------------------------------------------------------------
+    /// <summary>
+    /// Handles the mouse move event
+    /// </summary>
+    /// <param name="e">The <see cref=
+    /// "T:System.Windows.Forms.MouseEventArgs"/> instance containing 
+    /// the event data.</param>
+    // ------------------------------------------------------------------
+    public void MouseMove(MouseEventArgs e) {
+
+      if (!IsSuspended && this.Enabled) {
+        IHoverListener listener = null;
+
+        CollectionBase<IDiagramEntity> paintables =
+            this.Controller.Model.Paintables;
+        IDiagramEntity entity;
+        if (paintables.Count == 0) return;
+        //going from top to the bottom of the z-order
+        for (int k = paintables.Count - 1; k >= 0; k--) {
+          entity = paintables[k];
+          if (entity.Hit(e.Location)) //we caught an entity
+                    {
+            //unhover the previous, if any
+            if (previousHovered != null) {
+              previousHovered.Hovered = false;
+            }
+
+            //tell the current one it's being hovered
+            entity.Hovered = true;
+
+            //fetch the hovering service, if defined
+            listener = entity.GetService(
+                typeof(IHoverListener)) as IHoverListener;
+            if (listener != null) //the caught entity does listen
+                        {
+              if (currentListener == listener) //it's the same as the previous time
+                listener.MouseHover(e);
+              else //we moved from one entity to another listening entity
+                            {
+                if (currentListener != null) //tell the previous entity we are leaving
+                  currentListener.MouseLeave(e);
+                listener.MouseEnter(e); //tell the current one we enter
+                currentListener = listener;
+              }
+            } else //the caught entity does not listen
+                        {
+              if (currentListener != null) {
+                currentListener.MouseLeave(e);
+                currentListener = null;
+              }
+            }
+            previousHovered = entity;//remember, for the next time
+            return; //if another entity is listening underneath this entity it will not receive the notification
+          }
+        }
+        if (currentListener != null) {
+          currentListener.MouseLeave(e);
+          currentListener = null;
+        }
+        //unhover the previous, if any
+        if (previousHovered != null)
+          previousHovered.Hovered = false;
+
+      }
+    }
+
+    // ------------------------------------------------------------------
+    /// <summary>
+    /// Handles the mouse up event.
+    /// </summary>
+    /// <param name="e">The <see cref=
+    /// "T:System.Windows.Forms.MouseEventArgs"/> instance containing 
+    /// the event data.</param>
+    // ------------------------------------------------------------------
+    public void MouseUp(MouseEventArgs e) {
+
+    }
+    #endregion
+  }
+
 }
Index: /trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.Netron/3.0.2672.12446/Netron.Diagramming.Core-3.0.2672.12446/Tools/ImageExportTool.cs
===================================================================
--- /trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.Netron/3.0.2672.12446/Netron.Diagramming.Core-3.0.2672.12446/Tools/ImageExportTool.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.Netron/3.0.2672.12446/Netron.Diagramming.Core-3.0.2672.12446/Tools/ImageExportTool.cs	(revision 4068)
@@ -1,75 +1,62 @@
 using System;
-using System.Collections.Generic;
-using System.Text;
+using System.Drawing;
 using System.Windows.Forms;
-using System.Drawing;
-using System.IO;
-using System.Drawing.Imaging;
 
-namespace Netron.Diagramming.Core
-{
-    // ----------------------------------------------------------------------
+namespace Netron.Diagramming.Core {
+  // ----------------------------------------------------------------------
+  /// <summary>
+  /// A tool that uses the ImageExporter to create an image from the
+  /// currently selected entities and adds the image to the clipboard.
+  /// The ImageExporter is used indirectly by calling 
+  /// 'Selection.ToBitmap()'.
+  /// </summary>
+  // ----------------------------------------------------------------------
+  public class ImageExportTool : AbstractTool {
+    // ------------------------------------------------------------------
     /// <summary>
-    /// A tool that uses the ImageExporter to create an image from the
-    /// currently selected entities and adds the image to the clipboard.
-    /// The ImageExporter is used indirectly by calling 
-    /// 'Selection.ToBitmap()'.
+    /// Initializes a new instance of the <see cref="T:ImageExportTool"/> 
+    /// class.
     /// </summary>
-    // ----------------------------------------------------------------------
-    public class ImageExportTool : AbstractTool
-    {
-        // ------------------------------------------------------------------
-        /// <summary>
-        /// Initializes a new instance of the <see cref="T:ImageExportTool"/> 
-        /// class.
-        /// </summary>
-        /// <param name="name">string: The name of the tool.</param>
-        // ------------------------------------------------------------------
-        public ImageExportTool(string toolName)
-            : base(toolName)
-        {
+    /// <param name="name">string: The name of the tool.</param>
+    // ------------------------------------------------------------------
+    public ImageExportTool(string toolName)
+      : base(toolName) {
+    }
+
+    #region Methods
+
+    // ------------------------------------------------------------------
+    /// <summary>
+    /// Called when the tool is activated.
+    /// </summary>
+    // ------------------------------------------------------------------
+    protected override void OnActivateTool() {
+      if (this.Controller.Model.Selection.SelectedItems.Count == 0) {
+        MessageBox.Show("No shapes are selected.  " +
+            "Please make a selection first.",
+            "Image Export Error",
+            MessageBoxButtons.OK,
+            MessageBoxIcon.Information);
+        return;
+      }
+
+      try {
+        // Create an image using the ImageExporter and copy it to
+        // the clipboard.
+        Bitmap image = this.Controller.Model.Selection.ToBitmap();
+        if (image != null) {
+          Clipboard.SetImage(image);
         }
+      }
+      catch (Exception exc) {
+        throw new InconsistencyException(
+            "The Copy operation failed.", exc);
+      }
+      finally {
+        DeactivateTool();
+      }
+    }
 
-        #region Methods
-
-        // ------------------------------------------------------------------
-        /// <summary>
-        /// Called when the tool is activated.
-        /// </summary>
-        // ------------------------------------------------------------------
-        protected override void OnActivateTool()
-        {
-          if (this.Controller.Model.Selection.SelectedItems.Count == 0)
-            {
-                MessageBox.Show("No shapes are selected.  " +
-                    "Please make a selection first.",
-                    "Image Export Error",
-                    MessageBoxButtons.OK,
-                    MessageBoxIcon.Information);
-                return;
-            }
-
-            try
-            {
-                // Create an image using the ImageExporter and copy it to
-                // the clipboard.
-              Bitmap image = this.Controller.Model.Selection.ToBitmap();
-                if (image != null)
-                {                    
-                    Clipboard.SetImage(image);
-                }
-            }
-            catch (Exception exc)
-            {
-                throw new InconsistencyException(
-                    "The Copy operation failed.", exc);
-            }
-            finally
-            {
-                DeactivateTool();
-            }
-        }
-
-        #endregion
-    }
+    #endregion
+  }
 }
Index: /trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.Netron/3.0.2672.12446/Netron.Diagramming.Core-3.0.2672.12446/Tools/MoveTool.cs
===================================================================
--- /trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.Netron/3.0.2672.12446/Netron.Diagramming.Core-3.0.2672.12446/Tools/MoveTool.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.Netron/3.0.2672.12446/Netron.Diagramming.Core-3.0.2672.12446/Tools/MoveTool.cs	(revision 4068)
@@ -1,5 +1,3 @@
 using System;
-using System.Diagnostics;
-using System.Collections;
 using System.Drawing;
 using System.Windows.Forms;
Index: /trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.Netron/3.0.2672.12446/Netron.Diagramming.Core-3.0.2672.12446/Tools/MultiLineTool.cs
===================================================================
--- /trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.Netron/3.0.2672.12446/Netron.Diagramming.Core-3.0.2672.12446/Tools/MultiLineTool.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.Netron/3.0.2672.12446/Netron.Diagramming.Core-3.0.2672.12446/Tools/MultiLineTool.cs	(revision 4068)
@@ -1,162 +1,139 @@
 using System;
-using System.Diagnostics;
-using System.Collections;
-using System.Collections.Generic;
 using System.Drawing;
 using System.Windows.Forms;
 
-namespace Netron.Diagramming.Core
-{
+namespace Netron.Diagramming.Core {
 
-    class MultiLineTool : AbstractTool, IMouseListener, IKeyboardListener
-    {
+  class MultiLineTool : AbstractTool, IMouseListener, IKeyboardListener {
 
-        #region Fields
-        /// <summary>
-        /// the location of the mouse when the motion starts
-        /// </summary>
+    #region Fields
+    /// <summary>
+    /// the location of the mouse when the motion starts
+    /// </summary>
 
-        private bool doDraw;
-        private Point[] points;
-        #endregion
+    private bool doDraw;
+    private Point[] points;
+    #endregion
 
-        #region Constructor
-        /// <summary>
-        /// Initializes a new instance of the <see cref="T:MultiLineTool"/> class.
-        /// </summary>
-        /// <param name="name">The name of the tool.</param>
-        public MultiLineTool(string name)
-            : base(name)
-        {
-        }
-        #endregion
+    #region Constructor
+    /// <summary>
+    /// Initializes a new instance of the <see cref="T:MultiLineTool"/> class.
+    /// </summary>
+    /// <param name="name">The name of the tool.</param>
+    public MultiLineTool(string name)
+      : base(name) {
+    }
+    #endregion
 
-        #region Methods
+    #region Methods
 
-        /// <summary>
-        /// Called when the tool is activated.
-        /// </summary>
-        protected override void OnActivateTool()
-        {
-            Controller.View.CurrentCursor = CursorPalette.Cross;
-            this.SuspendOtherTools();
-            doDraw = false;
-            points = new Point[1];
-        }
-
-        /// <summary>
-        /// Handles the mouse down event
-        /// </summary>
-        /// <param name="e">The <see cref="T:System.Windows.Forms.MouseEventArgs"/> instance containing the event data.</param>
-        /// <returns>Returns 'true' if the event was handled, otherwise 'false'.</returns>
-        public bool MouseDown(MouseEventArgs e)
-        {
-            if (e == null)
-                throw new ArgumentNullException("The argument object is 'null'");
-            if (e.Button == MouseButtons.Left && Enabled && !IsSuspended)
-            {
-                Point p = e.Location;
-                if (Closure(p))
-                {
-                    points[points.Length - 1] = points[0];
-                    doDraw = false;
-                    DeactivateTool();
-                    Package();
-
-                    return true;
-                }
-                Array.Resize<Point>(ref points, points.Length + 1);
-                points[points.Length - 2] = p;
-                doDraw = true;
-                return true;
-            }
-            return false;
-        }
-        private bool Closure(Point p)
-        {
-            for (int k = 0; k < points.Length - 1; k++)
-            {
-                if (new Rectangle(points[k].X - 6, points[k].Y - 6, 12, 12).Contains(p))
-                {
-                    DialogResult res = MessageBox.Show("Do you wish to close the curve?", "Closure?", MessageBoxButtons.YesNo, MessageBoxIcon.Question);
-                    if (res == DialogResult.Yes)
-                        return true;
-
-                }
-            }
-            return false;
-        }
-        /// <summary>
-        /// Handles the mouse move event
-        /// </summary>
-        /// <param name="e">The <see cref="T:System.Windows.Forms.MouseEventArgs"/> instance containing the event data.</param>
-        public void MouseMove(MouseEventArgs e)
-        {
-            if (e == null)
-                throw new ArgumentNullException("The argument object is 'null'");
-            Point point = e.Location;
-            if (IsActive && doDraw)
-            {
-                points[points.Length - 1] = e.Location;
-                Controller.View.PaintGhostLine(MultiPointType.Straight, points);
-                //Controller.View.Invalidate(System.Drawing.Rectangle.Inflate(Controller.View.Ghost.Rectangle, 20, 20));
-                //TODO: find a more performant way to invalidate the area
-                Controller.View.Invalidate();
-            }
-        }
-        /// <summary>
-        /// 
-        /// </summary>
-        /// <param name="e">The <see cref="T:System.Windows.Forms.MouseEventArgs"/> instance containing the event data.</param>
-        public void MouseUp(MouseEventArgs e)
-        {
-            if (IsActive)
-            {
-
-            }
-        }
-        private void Package()
-        {
-            if ((points == null) ||
-               (points.Length < 1) ||
-               (points[0] == Point.Empty))
-            {
-                return;
-            }
-
-            MultiPointShape shape = new MultiPointShape(
-                this.Controller.Model, 
-                points, 
-                MultiPointType.Straight);
-
-            AddMultiPointShapeCommand cmd = new AddMultiPointShapeCommand(this.Controller, shape);
-            this.Controller.UndoManager.AddUndoCommand(cmd);
-            this.Controller.View.ResetGhost();
-            cmd.Redo();
-        }
-        #endregion
-
-        #region IKeyboardListener Members
-
-        public void KeyDown(KeyEventArgs e)
-        {
-            if (e.KeyData == Keys.Escape && IsActive)
-            {
-                DeactivateTool();
-                Package();
-                e.Handled = true;
-            }
-        }
-
-        public void KeyUp(KeyEventArgs e)
-        {
-        }
-
-        public void KeyPress(KeyPressEventArgs e)
-        {
-        }
-
-        #endregion
+    /// <summary>
+    /// Called when the tool is activated.
+    /// </summary>
+    protected override void OnActivateTool() {
+      Controller.View.CurrentCursor = CursorPalette.Cross;
+      this.SuspendOtherTools();
+      doDraw = false;
+      points = new Point[1];
     }
 
+    /// <summary>
+    /// Handles the mouse down event
+    /// </summary>
+    /// <param name="e">The <see cref="T:System.Windows.Forms.MouseEventArgs"/> instance containing the event data.</param>
+    /// <returns>Returns 'true' if the event was handled, otherwise 'false'.</returns>
+    public bool MouseDown(MouseEventArgs e) {
+      if (e == null)
+        throw new ArgumentNullException("The argument object is 'null'");
+      if (e.Button == MouseButtons.Left && Enabled && !IsSuspended) {
+        Point p = e.Location;
+        if (Closure(p)) {
+          points[points.Length - 1] = points[0];
+          doDraw = false;
+          DeactivateTool();
+          Package();
+
+          return true;
+        }
+        Array.Resize<Point>(ref points, points.Length + 1);
+        points[points.Length - 2] = p;
+        doDraw = true;
+        return true;
+      }
+      return false;
+    }
+    private bool Closure(Point p) {
+      for (int k = 0; k < points.Length - 1; k++) {
+        if (new Rectangle(points[k].X - 6, points[k].Y - 6, 12, 12).Contains(p)) {
+          DialogResult res = MessageBox.Show("Do you wish to close the curve?", "Closure?", MessageBoxButtons.YesNo, MessageBoxIcon.Question);
+          if (res == DialogResult.Yes)
+            return true;
+
+        }
+      }
+      return false;
+    }
+    /// <summary>
+    /// Handles the mouse move event
+    /// </summary>
+    /// <param name="e">The <see cref="T:System.Windows.Forms.MouseEventArgs"/> instance containing the event data.</param>
+    public void MouseMove(MouseEventArgs e) {
+      if (e == null)
+        throw new ArgumentNullException("The argument object is 'null'");
+      Point point = e.Location;
+      if (IsActive && doDraw) {
+        points[points.Length - 1] = e.Location;
+        Controller.View.PaintGhostLine(MultiPointType.Straight, points);
+        //Controller.View.Invalidate(System.Drawing.Rectangle.Inflate(Controller.View.Ghost.Rectangle, 20, 20));
+        //TODO: find a more performant way to invalidate the area
+        Controller.View.Invalidate();
+      }
+    }
+    /// <summary>
+    /// 
+    /// </summary>
+    /// <param name="e">The <see cref="T:System.Windows.Forms.MouseEventArgs"/> instance containing the event data.</param>
+    public void MouseUp(MouseEventArgs e) {
+      if (IsActive) {
+
+      }
+    }
+    private void Package() {
+      if ((points == null) ||
+         (points.Length < 1) ||
+         (points[0] == Point.Empty)) {
+        return;
+      }
+
+      MultiPointShape shape = new MultiPointShape(
+          this.Controller.Model,
+          points,
+          MultiPointType.Straight);
+
+      AddMultiPointShapeCommand cmd = new AddMultiPointShapeCommand(this.Controller, shape);
+      this.Controller.UndoManager.AddUndoCommand(cmd);
+      this.Controller.View.ResetGhost();
+      cmd.Redo();
+    }
+    #endregion
+
+    #region IKeyboardListener Members
+
+    public void KeyDown(KeyEventArgs e) {
+      if (e.KeyData == Keys.Escape && IsActive) {
+        DeactivateTool();
+        Package();
+        e.Handled = true;
+      }
+    }
+
+    public void KeyUp(KeyEventArgs e) {
+    }
+
+    public void KeyPress(KeyPressEventArgs e) {
+    }
+
+    #endregion
+  }
+
 }
Index: /trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.Netron/3.0.2672.12446/Netron.Diagramming.Core-3.0.2672.12446/Tools/PanTool.cs
===================================================================
--- /trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.Netron/3.0.2672.12446/Netron.Diagramming.Core-3.0.2672.12446/Tools/PanTool.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.Netron/3.0.2672.12446/Netron.Diagramming.Core-3.0.2672.12446/Tools/PanTool.cs	(revision 4068)
@@ -1,8 +1,4 @@
-using System;
-using System.Collections.Generic;
-using System.Text;
+using System.Drawing;
 using System.Windows.Forms;
-using System.Drawing;
-using System.Diagnostics;
 
 namespace Netron.Diagramming.Core {
Index: /trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.Netron/3.0.2672.12446/Netron.Diagramming.Core-3.0.2672.12446/Tools/PasteTool.cs
===================================================================
--- /trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.Netron/3.0.2672.12446/Netron.Diagramming.Core-3.0.2672.12446/Tools/PasteTool.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.Netron/3.0.2672.12446/Netron.Diagramming.Core-3.0.2672.12446/Tools/PasteTool.cs	(revision 4068)
@@ -1,155 +1,135 @@
 using System;
-using System.Diagnostics;
 using System.Collections;
 using System.Drawing;
+using System.IO;
+using System.Runtime.Serialization.Formatters.Binary;
 using System.Windows.Forms;
-using System.IO;
-using System.Runtime.Serialization;
-using System.Runtime.Serialization.Formatters.Binary;
-namespace Netron.Diagramming.Core
-{
-    // ----------------------------------------------------------------------
+namespace Netron.Diagramming.Core {
+  // ----------------------------------------------------------------------
+  /// <summary>
+  /// This tool pastes items from the clipboard to the canvas.
+  /// </summary>
+  // ----------------------------------------------------------------------
+  public class PasteTool : AbstractTool {
+    // ------------------------------------------------------------------
     /// <summary>
-    /// This tool pastes items from the clipboard to the canvas.
+    /// Specifies where the items from the clipboard will be 
+    /// inserted at.
     /// </summary>
-    // ----------------------------------------------------------------------
-    public class PasteTool : AbstractTool
-    {
-        // ------------------------------------------------------------------
-        /// <summary>
-        /// Specifies where the items from the clipboard will be 
-        /// inserted at.
-        /// </summary>
-        // ------------------------------------------------------------------
-        public static Point InsertionPoint = new Point(50, 50);
+    // ------------------------------------------------------------------
+    public static Point InsertionPoint = new Point(50, 50);
 
-        #region Fields
-        #endregion
+    #region Fields
+    #endregion
 
-        #region Constructor
-        /// <summary>
-        /// Initializes a new instance of the <see cref="T:HoverTool"/> class.
-        /// </summary>
-        /// <param name="name">The name of the tool.</param>
-        public PasteTool(string name)
-            : base(name)
-        {
+    #region Constructor
+    /// <summary>
+    /// Initializes a new instance of the <see cref="T:HoverTool"/> class.
+    /// </summary>
+    /// <param name="name">The name of the tool.</param>
+    public PasteTool(string name)
+      : base(name) {
+    }
+    #endregion
+
+    #region Methods
+
+    /// <summary>
+    /// Called when the tool is activated.
+    /// </summary>
+    protected override void OnActivateTool() {
+      try {
+        // Used to get a collection of entities from the 
+        // NetronClipboard.
+        Type entitiesType = typeof(CollectionBase<IDiagramEntity>);
+
+        // First calculate the insertion point based on the
+        // current location of the cursor.
+        InsertionPoint = Point.Round(
+        Controller.View.ViewToWorld(
+        Controller.View.DeviceToView(
+        Controller.ParentControl.PointToClient(Cursor.Position))));
+
+        IDataObject data = Clipboard.GetDataObject();
+        string format = typeof(CopyTool).FullName;
+        if (data.GetDataPresent(format)) {
+          MemoryStream stream = data.GetData(format) as MemoryStream;
+          CollectionBase<IDiagramEntity> collection = null;
+          GenericFormatter<BinaryFormatter> f =
+              new GenericFormatter<BinaryFormatter>();
+          //Anchors collection is a helper collection to re-connect connectors to their parent
+          Anchors.Clear();
+          //but is it actually a stream coming this application?
+          collection = f.Deserialize<CollectionBase<IDiagramEntity>>(stream);
+          UnwrapBundle(collection);
+
+        } else if (NetronClipboard.ContainsData(entitiesType)) {
+          CollectionBase<IDiagramEntity> collection =
+              (CollectionBase<IDiagramEntity>)NetronClipboard.Get(
+              entitiesType);
+
+          UnwrapBundle(collection.DeepCopy());
+        } else if (data.GetDataPresent(DataFormats.Bitmap)) {
+          Bitmap bmp = data.GetData(DataFormats.Bitmap) as Bitmap;
+          if (bmp != null) {
+            #region Unwrap into an image shape
+            //TODO: Insert the image shape here
+            ImageShape shape = new ImageShape();
+            shape.Image = bmp;
+            shape.Location = InsertionPoint;
+            Controller.Model.AddShape(shape);
+            #endregion
+          }
+        } else if (data.GetDataPresent(DataFormats.Text)) {
+          string text = (string)data.GetData(typeof(string));
+          TextOnly textShape = new TextOnly(Controller.Model);
+          textShape.Text = text;
+          textShape.Location = InsertionPoint;
+          Controller.Model.AddShape(textShape);
         }
-        #endregion
+      }
+      catch (Exception exc) {
+        throw new InconsistencyException("The Paste operation failed.", exc);
+      }
+      finally {
+        DeactivateTool();
+      }
 
-        #region Methods
+    }
 
-        /// <summary>
-        /// Called when the tool is activated.
-        /// </summary>
-        protected override void OnActivateTool()
-        {
-            try
-            {
-                // Used to get a collection of entities from the 
-                // NetronClipboard.
-                Type entitiesType = typeof(CollectionBase<IDiagramEntity>);
+    #endregion
 
-                // First calculate the insertion point based on the
-                // current location of the cursor.
-                InsertionPoint = Point.Round(
-                Controller.View.ViewToWorld(
-                Controller.View.DeviceToView(
-                Controller.ParentControl.PointToClient(Cursor.Position))));
+    /// <summary>
+    /// Unwraps the given bundle to the diagram.
+    /// </summary>
+    /// <param name="collection">CollectionBase<IDiagramEntity></param>
+    void UnwrapBundle(CollectionBase<IDiagramEntity> collection) {
+      if (collection != null) {
+        #region Unwrap the bundle
+        this.Controller.Model.Unwrap(collection);
 
-                IDataObject data = Clipboard.GetDataObject();
-                string format = typeof(CopyTool).FullName;
-                if (data.GetDataPresent(format))
-                {
-                    MemoryStream stream = data.GetData(format) as MemoryStream;
-                    CollectionBase<IDiagramEntity> collection = null;
-                    GenericFormatter<BinaryFormatter> f =
-                        new GenericFormatter<BinaryFormatter>();
-                    //Anchors collection is a helper collection to re-connect connectors to their parent
-                    Anchors.Clear();
-                    //but is it actually a stream coming this application?
-                    collection = f.Deserialize<CollectionBase<IDiagramEntity>>(stream);
-                    UnwrapBundle(collection);
+        Rectangle rec = Utils.BoundingRectangle(collection);
 
-                }
-                else if (NetronClipboard.ContainsData(entitiesType))
-                {
-                    CollectionBase<IDiagramEntity> collection =
-                        (CollectionBase<IDiagramEntity>)NetronClipboard.Get(
-                        entitiesType);
+        // The InsertionPoint specifies where the pasted
+        // entities should be.  So, shift each entity in the
+        // collection to the InsertionPoint.
+        Point delta = new Point(
+            InsertionPoint.X - rec.Location.X,
+            InsertionPoint.Y - rec.Location.Y);
+        //delta.Offset(rec.Location);
 
-                    UnwrapBundle(collection.DeepCopy());
-                }  
-                else if (data.GetDataPresent(DataFormats.Bitmap))
-                {
-                    Bitmap bmp = data.GetData(DataFormats.Bitmap) as Bitmap;
-                    if (bmp != null)
-                    {
-                        #region Unwrap into an image shape
-                        //TODO: Insert the image shape here
-                        ImageShape shape = new ImageShape();
-                        shape.Image = bmp;
-                        shape.Location = InsertionPoint;
-                        Controller.Model.AddShape(shape);
-                        #endregion
-                    }
-                }
-                else if (data.GetDataPresent(DataFormats.Text))
-                {
-                    string text = (string) data.GetData(typeof(string));
-                    TextOnly textShape = new TextOnly(Controller.Model);
-                    textShape.Text = text;
-                    textShape.Location = InsertionPoint;
-                    Controller.Model.AddShape(textShape);
-                }    
-            }
-            catch (Exception exc)
-            {
-                throw new InconsistencyException("The Paste operation failed.", exc);
-            }
-            finally
-            {
-                DeactivateTool();
-            }
-
+        foreach (IDiagramEntity entity in collection) {
+          entity.MoveBy(delta);
         }
 
+        // Recalculate the bounding rectangle and invalidate
+        // that area on the canvas.
+        rec = Utils.BoundingRectangle(collection);
+        rec.Inflate(30, 30);
+        this.Controller.View.Invalidate(rec);
         #endregion
-
-        /// <summary>
-        /// Unwraps the given bundle to the diagram.
-        /// </summary>
-        /// <param name="collection">CollectionBase<IDiagramEntity></param>
-        void UnwrapBundle(CollectionBase<IDiagramEntity> collection)
-        {
-            if (collection != null)
-            {
-                #region Unwrap the bundle
-                this.Controller.Model.Unwrap(collection);
-
-                Rectangle rec = Utils.BoundingRectangle(collection);
-
-                // The InsertionPoint specifies where the pasted
-                // entities should be.  So, shift each entity in the
-                // collection to the InsertionPoint.
-                Point delta = new Point(
-                    InsertionPoint.X - rec.Location.X,
-                    InsertionPoint.Y - rec.Location.Y);
-                //delta.Offset(rec.Location);
-
-                foreach (IDiagramEntity entity in collection)
-                {
-                    entity.MoveBy(delta);
-                }
-
-                // Recalculate the bounding rectangle and invalidate
-                // that area on the canvas.
-                rec = Utils.BoundingRectangle(collection);
-                rec.Inflate(30, 30);
-                this.Controller.View.Invalidate(rec);
-                #endregion
-            }
-        }
+      }
     }
+  }
 
 }
Index: /trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.Netron/3.0.2672.12446/Netron.Diagramming.Core-3.0.2672.12446/Tools/PolygonTool.cs
===================================================================
--- /trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.Netron/3.0.2672.12446/Netron.Diagramming.Core-3.0.2672.12446/Tools/PolygonTool.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.Netron/3.0.2672.12446/Netron.Diagramming.Core-3.0.2672.12446/Tools/PolygonTool.cs	(revision 4068)
@@ -1,137 +1,119 @@
 using System;
-using System.Diagnostics;
-using System.Collections;
-using System.Collections.Generic;
 using System.Drawing;
 using System.Windows.Forms;
 
-namespace Netron.Diagramming.Core
-{
-   
-    class PolygonTool : AbstractTool, IMouseListener, IKeyboardListener
-    {
+namespace Netron.Diagramming.Core {
 
-        #region Fields
-        /// <summary>
-        /// the location of the mouse when the motion starts
-        /// </summary>
-        
-        private bool doDraw;
-        private Point[] points;
-        #endregion
+  class PolygonTool : AbstractTool, IMouseListener, IKeyboardListener {
 
-        #region Constructor
-        /// <summary>
-        /// Initializes a new instance of the <see cref="T:PolygonTool"/> class.
-        /// </summary>
-        /// <param name="name">The name of the tool.</param>
-        public PolygonTool(string name) : base(name)
-        {
-        }
-        #endregion
+    #region Fields
+    /// <summary>
+    /// the location of the mouse when the motion starts
+    /// </summary>
 
-        #region Methods
+    private bool doDraw;
+    private Point[] points;
+    #endregion
 
-        /// <summary>
-        /// Called when the tool is activated.
-        /// </summary>
-        protected override void OnActivateTool()
-        {
-            Controller.View.CurrentCursor =CursorPalette.Cross;
-            this.SuspendOtherTools(); 
-            doDraw = false;
-            points = new Point[1];
-        }
+    #region Constructor
+    /// <summary>
+    /// Initializes a new instance of the <see cref="T:PolygonTool"/> class.
+    /// </summary>
+    /// <param name="name">The name of the tool.</param>
+    public PolygonTool(string name)
+      : base(name) {
+    }
+    #endregion
 
-        /// <summary>
-        /// Handles the mouse down event
-        /// </summary>
-        /// <param name="e">The <see cref="T:System.Windows.Forms.MouseEventArgs"/> instance containing the event data.</param>
-        /// <returns>Returns 'true' if the event was handled, otherwise 'false'.</returns>
-        public bool MouseDown(MouseEventArgs e)
-        {
-            if (e == null)
-                throw new ArgumentNullException("The argument object is 'null'");
-            if (e.Button == MouseButtons.Left && Enabled && !IsSuspended)
-            {
-                    Array.Resize<Point>(ref points, points.Length + 1);
-                    points[points.Length-2]= e.Location;
-                    doDraw = true;
-                    return true;           
-            }
-            return false;
-        }
+    #region Methods
 
-        /// <summary>
-        /// Handles the mouse move event
-        /// </summary>
-        /// <param name="e">The <see cref="T:System.Windows.Forms.MouseEventArgs"/> instance containing the event data.</param>
-        public void MouseMove(MouseEventArgs e)
-        {
-            if (e == null)
-                throw new ArgumentNullException("The argument object is 'null'");
-            Point point = e.Location;
-            if(IsActive && doDraw)
-            {
-                points[points.Length - 1] = e.Location;                
-                Controller.View.PaintGhostLine( MultiPointType.Polygon, points);
-                //Controller.View.Invalidate(System.Drawing.Rectangle.Inflate(Controller.View.Ghost.Rectangle, 20, 20));
-                //TODO: find a more performant way to invalidate the area
-                Controller.View.Invalidate();
-            }            
-        }
-        /// <summary>
-        /// 
-        /// </summary>
-        /// <param name="e">The <see cref="T:System.Windows.Forms.MouseEventArgs"/> instance containing the event data.</param>
-        public void MouseUp(MouseEventArgs e)
-        {
-            if (IsActive)
-            {
-               
-            }
-        }
-        private void Package()
-        {
-            if ((points == null) ||
-               (points.Length < 1) ||
-               (points[0] == Point.Empty))
-            {
-                return;
-            }
-
-            MultiPointShape shape = new MultiPointShape(
-                this.Controller.Model, 
-                points, 
-                MultiPointType.Polygon);
-
-            AddMultiPointShapeCommand cmd = new AddMultiPointShapeCommand(this.Controller, shape);
-            this.Controller.UndoManager.AddUndoCommand(cmd);
-            cmd.Redo();
-        }
-        #endregion
-
-        #region IKeyboardListener Members
-
-        public void KeyDown(KeyEventArgs e)
-        {       
-            if(e.KeyData == Keys.Escape && IsActive)
-            {
-                DeactivateTool();
-                Package();       
-                e.Handled = true;
-            }
-        }
-
-        public void KeyUp(KeyEventArgs e)
-        {
-        }
-
-        public void KeyPress(KeyPressEventArgs e)
-        {
-        }
-
-        #endregion
+    /// <summary>
+    /// Called when the tool is activated.
+    /// </summary>
+    protected override void OnActivateTool() {
+      Controller.View.CurrentCursor = CursorPalette.Cross;
+      this.SuspendOtherTools();
+      doDraw = false;
+      points = new Point[1];
     }
 
+    /// <summary>
+    /// Handles the mouse down event
+    /// </summary>
+    /// <param name="e">The <see cref="T:System.Windows.Forms.MouseEventArgs"/> instance containing the event data.</param>
+    /// <returns>Returns 'true' if the event was handled, otherwise 'false'.</returns>
+    public bool MouseDown(MouseEventArgs e) {
+      if (e == null)
+        throw new ArgumentNullException("The argument object is 'null'");
+      if (e.Button == MouseButtons.Left && Enabled && !IsSuspended) {
+        Array.Resize<Point>(ref points, points.Length + 1);
+        points[points.Length - 2] = e.Location;
+        doDraw = true;
+        return true;
+      }
+      return false;
+    }
+
+    /// <summary>
+    /// Handles the mouse move event
+    /// </summary>
+    /// <param name="e">The <see cref="T:System.Windows.Forms.MouseEventArgs"/> instance containing the event data.</param>
+    public void MouseMove(MouseEventArgs e) {
+      if (e == null)
+        throw new ArgumentNullException("The argument object is 'null'");
+      Point point = e.Location;
+      if (IsActive && doDraw) {
+        points[points.Length - 1] = e.Location;
+        Controller.View.PaintGhostLine(MultiPointType.Polygon, points);
+        //Controller.View.Invalidate(System.Drawing.Rectangle.Inflate(Controller.View.Ghost.Rectangle, 20, 20));
+        //TODO: find a more performant way to invalidate the area
+        Controller.View.Invalidate();
+      }
+    }
+    /// <summary>
+    /// 
+    /// </summary>
+    /// <param name="e">The <see cref="T:System.Windows.Forms.MouseEventArgs"/> instance containing the event data.</param>
+    public void MouseUp(MouseEventArgs e) {
+      if (IsActive) {
+
+      }
+    }
+    private void Package() {
+      if ((points == null) ||
+         (points.Length < 1) ||
+         (points[0] == Point.Empty)) {
+        return;
+      }
+
+      MultiPointShape shape = new MultiPointShape(
+          this.Controller.Model,
+          points,
+          MultiPointType.Polygon);
+
+      AddMultiPointShapeCommand cmd = new AddMultiPointShapeCommand(this.Controller, shape);
+      this.Controller.UndoManager.AddUndoCommand(cmd);
+      cmd.Redo();
+    }
+    #endregion
+
+    #region IKeyboardListener Members
+
+    public void KeyDown(KeyEventArgs e) {
+      if (e.KeyData == Keys.Escape && IsActive) {
+        DeactivateTool();
+        Package();
+        e.Handled = true;
+      }
+    }
+
+    public void KeyUp(KeyEventArgs e) {
+    }
+
+    public void KeyPress(KeyPressEventArgs e) {
+    }
+
+    #endregion
+  }
+
 }
Index: /trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.Netron/3.0.2672.12446/Netron.Diagramming.Core-3.0.2672.12446/Tools/RectangleTool.cs
===================================================================
--- /trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.Netron/3.0.2672.12446/Netron.Diagramming.Core-3.0.2672.12446/Tools/RectangleTool.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.Netron/3.0.2672.12446/Netron.Diagramming.Core-3.0.2672.12446/Tools/RectangleTool.cs	(revision 4068)
@@ -1,108 +1,98 @@
-using System;
 using System.Drawing;
 using System.Windows.Forms;
 
-namespace Netron.Diagramming.Core
-{
-    // ----------------------------------------------------------------------
+namespace Netron.Diagramming.Core {
+  // ----------------------------------------------------------------------
+  /// <summary>
+  /// Tool to draw rectangles on the canvas.
+  /// </summary>
+  // ----------------------------------------------------------------------
+  public class RectangleTool : AbstractDrawingTool {
+    #region Fields
+
+    #endregion
+
+    #region Properties
+
+    #endregion
+
+    #region Constructor
+    public RectangleTool()
+      : base("Rectangle Tool") {
+    }
+    public RectangleTool(string name)
+      : base(name) {
+
+    }
+    #endregion
+
+    #region Methods
+
+    // ------------------------------------------------------------------
     /// <summary>
-    /// Tool to draw rectangles on the canvas.
+    /// Activates the tool - the cursor is set to the Icons.DrawRectangle.
     /// </summary>
-    // ----------------------------------------------------------------------
-    public class RectangleTool : AbstractDrawingTool
-    {
-        #region Fields
+    // ------------------------------------------------------------------
+    protected override void OnActivateTool() {
+      base.OnActivateTool();
+      Cursor = CursorPalette.DrawRectangle;
+    }
 
-        #endregion
+    // ------------------------------------------------------------------
+    /// <summary>
+    /// Draws a ghost rectangle on the canvas if 'IsActive' and 'started'
+    /// is true.
+    /// </summary>
+    /// <param name="e">MouseEventArgs</param>
+    // ------------------------------------------------------------------
+    protected override void OnMouseMove(MouseEventArgs e) {
+      base.OnMouseMove(e);
+      if (IsActive && started) {
+        Point point = new Point(e.X, e.Y);
 
-        #region Properties
+        Controller.View.PaintGhostRectangle(startingPoint, point);
 
-        #endregion
+        Controller.View.Invalidate(System.Drawing.Rectangle.Inflate(
+            Controller.View.Ghost.Rectangle, 20, 20));
+      }
+    }
 
-        #region Constructor
-        public RectangleTool() : base("Rectangle Tool")
-        {
-        }
-        public RectangleTool(string name): base(name)
-        {
+    // ------------------------------------------------------------------
+    /// <summary>
+    /// This method will be called when the user has finished drawing a 
+    /// ghost rectangle or bundle and initiates the actual creation of a 
+    /// bundle and the addition to the model via the appropriate command.
+    /// </summary>
+    // ------------------------------------------------------------------
+    protected override void GhostDrawingComplete() {
+      if ((IsActive == false) ||
+          (started == false)) {
+        return;
+      }
 
-        }
-        #endregion
+      try {
+        SimpleRectangle shape = new SimpleRectangle(this.Controller.Model);
+        shape.Width = (int)Rectangle.Width;
+        shape.Height = (int)Rectangle.Height;
+        AddShapeCommand cmd = new AddShapeCommand(
+            this.Controller,
+            shape,
+            new Point((int)Rectangle.X, (int)Rectangle.Y));
 
-        #region Methods
+        this.Controller.UndoManager.AddUndoCommand(cmd);
+        cmd.Redo();
+      }
+      catch {
+        base.Controller.DeactivateTool(this);
+        Controller.View.Invalidate();
+        throw;
+      }
 
-        // ------------------------------------------------------------------
-        /// <summary>
-        /// Activates the tool - the cursor is set to the Icons.DrawRectangle.
-        /// </summary>
-        // ------------------------------------------------------------------
-        protected override void OnActivateTool()
-        {
-            base.OnActivateTool();
-            Cursor = CursorPalette.DrawRectangle;
-        }
-
-        // ------------------------------------------------------------------
-        /// <summary>
-        /// Draws a ghost rectangle on the canvas if 'IsActive' and 'started'
-        /// is true.
-        /// </summary>
-        /// <param name="e">MouseEventArgs</param>
-        // ------------------------------------------------------------------
-        protected override void OnMouseMove(MouseEventArgs e)
-        {
-            base.OnMouseMove(e);
-            if (IsActive && started)
-            {
-                Point point = new Point(e.X, e.Y);               
-
-                Controller.View.PaintGhostRectangle(startingPoint, point);
-
-                Controller.View.Invalidate(System.Drawing.Rectangle.Inflate(
-                    Controller.View.Ghost.Rectangle, 20, 20));
-            }
-        }
-
-        // ------------------------------------------------------------------
-        /// <summary>
-        /// This method will be called when the user has finished drawing a 
-        /// ghost rectangle or bundle and initiates the actual creation of a 
-        /// bundle and the addition to the model via the appropriate command.
-        /// </summary>
-        // ------------------------------------------------------------------
-        protected override void GhostDrawingComplete()
-        {
-            if ((IsActive == false) ||
-                (started == false))
-            {
-                return;
-            }
-
-            try
-            {
-                SimpleRectangle shape = new SimpleRectangle(this.Controller.Model);
-                shape.Width = (int) Rectangle.Width;
-                shape.Height = (int) Rectangle.Height;
-                AddShapeCommand cmd = new AddShapeCommand(
-                    this.Controller, 
-                    shape, 
-                    new Point((int) Rectangle.X, (int)Rectangle.Y));
-
-                this.Controller.UndoManager.AddUndoCommand(cmd);
-                cmd.Redo();
-            }
-            catch
-            {
-                base.Controller.DeactivateTool(this);
-                Controller.View.Invalidate();
-                throw;
-            }
-
-            //base.Controller.DeactivateTool(this);
-        }
+      //base.Controller.DeactivateTool(this);
+    }
 
 
-        #endregion
-    }
+    #endregion
+  }
 
 }
Index: /trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.Netron/3.0.2672.12446/Netron.Diagramming.Core-3.0.2672.12446/Tools/ScribbleTool.cs
===================================================================
--- /trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.Netron/3.0.2672.12446/Netron.Diagramming.Core-3.0.2672.12446/Tools/ScribbleTool.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.Netron/3.0.2672.12446/Netron.Diagramming.Core-3.0.2672.12446/Tools/ScribbleTool.cs	(revision 4068)
@@ -1,164 +1,141 @@
 using System;
-using System.Diagnostics;
-using System.Collections;
-using System.Collections.Generic;
 using System.Drawing;
 using System.Windows.Forms;
 
-namespace Netron.Diagramming.Core
-{
+namespace Netron.Diagramming.Core {
 
-    class ScribbleTool : AbstractTool, IMouseListener, IKeyboardListener
-    {
+  class ScribbleTool : AbstractTool, IMouseListener, IKeyboardListener {
 
-        #region Fields
-        /// <summary>
-        /// the location of the mouse when the motion starts
-        /// </summary>
+    #region Fields
+    /// <summary>
+    /// the location of the mouse when the motion starts
+    /// </summary>
 
-        private bool doDraw;
-        private Point[] points;
-        #endregion
-        #region Constructor
-        /// <summary>
-        /// Initializes a new instance of the <see cref="T:ScribbleTool"/> class.
-        /// </summary>
-        /// <param name="name">The name of the tool.</param>
-        public ScribbleTool(string name)
-            : base(name)
-        {
+    private bool doDraw;
+    private Point[] points;
+    #endregion
+    #region Constructor
+    /// <summary>
+    /// Initializes a new instance of the <see cref="T:ScribbleTool"/> class.
+    /// </summary>
+    /// <param name="name">The name of the tool.</param>
+    public ScribbleTool(string name)
+      : base(name) {
+    }
+    #endregion
+
+    #region Methods
+
+    /// <summary>
+    /// Called when the tool is activated.
+    /// </summary>
+    protected override void OnActivateTool() {
+      Controller.View.CurrentCursor = CursorPalette.Cross;
+      this.SuspendOtherTools();
+      doDraw = false;
+      points = new Point[1];
+    }
+
+    /// <summary>
+    /// Handles the mouse down event
+    /// </summary>
+    /// <param name="e">The <see cref="T:System.Windows.Forms.MouseEventArgs"/> instance containing the event data.</param>
+    /// <returns>Returns 'true' if the event was handled, otherwise 'false'.</returns>
+    public bool MouseDown(MouseEventArgs e) {
+      if (e == null)
+        throw new ArgumentNullException("The argument object is 'null'");
+      if (e.Button == MouseButtons.Left && Enabled && !IsSuspended) {
+        Point p = e.Location;
+        if (Closure(p)) {
+          points[points.Length - 1] = points[0];
+          doDraw = false;
+          DeactivateTool();
+          Package();
+
+          return true;
         }
-        #endregion
+        Array.Resize<Point>(ref points, points.Length + 1);
+        points[points.Length - 2] = e.Location;
+        doDraw = true;
+        return true;
+      }
+      return false;
+    }
 
-        #region Methods
+    /// <summary>
+    /// Handles the mouse move event
+    /// </summary>
+    /// <param name="e">The <see cref="T:System.Windows.Forms.MouseEventArgs"/> instance containing the event data.</param>
+    public void MouseMove(MouseEventArgs e) {
+      if (e == null)
+        throw new ArgumentNullException("The argument object is 'null'");
+      Point point = e.Location;
+      if (IsActive && doDraw) {
+        points[points.Length - 1] = e.Location;
+        Controller.View.PaintGhostLine(MultiPointType.Curve, points);
+        //Controller.View.Invalidate(System.Drawing.Rectangle.Inflate(Controller.View.Ghost.Rectangle, 20, 20));
+        //TODO: find a more performant way to invalidate the area
+        Controller.View.Invalidate();
+      }
+    }
+    private bool Closure(Point p) {
+      for (int k = 0; k < points.Length - 1; k++) {
+        if (new Rectangle(points[k].X - 6, points[k].Y - 6, 12, 12).Contains(p)) {
+          DialogResult res = MessageBox.Show("Do you wish to close the curve?", "Closure?", MessageBoxButtons.YesNo, MessageBoxIcon.Question);
+          if (res == DialogResult.Yes)
+            return true;
 
-        /// <summary>
-        /// Called when the tool is activated.
-        /// </summary>
-        protected override void OnActivateTool()
-        {
-            Controller.View.CurrentCursor = CursorPalette.Cross;
-            this.SuspendOtherTools();
-            doDraw = false;
-            points = new Point[1];
         }
+      }
+      return false;
+    }
+    /// <summary>
+    /// 
+    /// </summary>
+    /// <param name="e">The <see cref="T:System.Windows.Forms.MouseEventArgs"/> instance containing the event data.</param>
+    public void MouseUp(MouseEventArgs e) {
+      if (IsActive) {
 
-        /// <summary>
-        /// Handles the mouse down event
-        /// </summary>
-        /// <param name="e">The <see cref="T:System.Windows.Forms.MouseEventArgs"/> instance containing the event data.</param>
-        /// <returns>Returns 'true' if the event was handled, otherwise 'false'.</returns>
-        public bool MouseDown(MouseEventArgs e)
-        {
-            if (e == null)
-                throw new ArgumentNullException("The argument object is 'null'");
-            if (e.Button == MouseButtons.Left && Enabled && !IsSuspended)
-            {
-                Point p = e.Location;
-                if (Closure(p))
-                {
-                    points[points.Length - 1] = points[0];
-                    doDraw = false;
-                    DeactivateTool();
-                    Package();
+      }
+    }
+    private void Package() {
+      if ((points == null) ||
+         (points.Length < 1) ||
+         (points[0] == Point.Empty)) {
+        return;
+      }
 
-                    return true;
-                }
-                Array.Resize<Point>(ref points, points.Length + 1);
-                points[points.Length - 2] = e.Location;
-                doDraw = true;
-                return true;
-            }
-            return false;
-        }
+      MultiPointShape shape = new MultiPointShape(
+          this.Controller.Model,
+          points,
+          MultiPointType.Curve);
 
-        /// <summary>
-        /// Handles the mouse move event
-        /// </summary>
-        /// <param name="e">The <see cref="T:System.Windows.Forms.MouseEventArgs"/> instance containing the event data.</param>
-        public void MouseMove(MouseEventArgs e)
-        {
-            if (e == null)
-                throw new ArgumentNullException("The argument object is 'null'");
-            Point point = e.Location;
-            if (IsActive && doDraw)
-            {
-                points[points.Length - 1] = e.Location;
-                Controller.View.PaintGhostLine(MultiPointType.Curve, points);
-                //Controller.View.Invalidate(System.Drawing.Rectangle.Inflate(Controller.View.Ghost.Rectangle, 20, 20));
-                //TODO: find a more performant way to invalidate the area
-                Controller.View.Invalidate();
-            }
-        }
-        private bool Closure(Point p)
-        {
-            for (int k = 0; k < points.Length - 1; k++)
-            {
-                if (new Rectangle(points[k].X - 6, points[k].Y - 6, 12, 12).Contains(p))
-                {
-                    DialogResult res = MessageBox.Show("Do you wish to close the curve?", "Closure?", MessageBoxButtons.YesNo, MessageBoxIcon.Question);
-                    if (res == DialogResult.Yes)
-                        return true;
+      AddMultiPointShapeCommand cmd = new AddMultiPointShapeCommand(this.Controller, shape);
+      this.Controller.UndoManager.AddUndoCommand(cmd);
+      this.Controller.View.ResetGhost();
+      cmd.Redo();
+    }
+    #endregion
 
-                }
-            }
-            return false;
-        }
-        /// <summary>
-        /// 
-        /// </summary>
-        /// <param name="e">The <see cref="T:System.Windows.Forms.MouseEventArgs"/> instance containing the event data.</param>
-        public void MouseUp(MouseEventArgs e)
-        {
-            if (IsActive)
-            {
+    #region IKeyboardListener Members
 
-            }
-        }
-        private void Package()
-        {
-            if ((points == null) ||
-               (points.Length < 1) ||
-               (points[0] == Point.Empty) )
-            {
-                return;
-            }
-
-            MultiPointShape shape = new MultiPointShape(
-                this.Controller.Model, 
-                points, 
-                MultiPointType.Curve);
-
-            AddMultiPointShapeCommand cmd = new AddMultiPointShapeCommand(this.Controller, shape);
-            this.Controller.UndoManager.AddUndoCommand(cmd);
-            this.Controller.View.ResetGhost();
-            cmd.Redo();
-        }
-        #endregion
-
-        #region IKeyboardListener Members
-
-        public void KeyDown(KeyEventArgs e)
-        {
+    public void KeyDown(KeyEventArgs e) {
 
 
-            if (e.KeyData == System.Windows.Forms.Keys.Escape && IsActive)
-            {
-                DeactivateTool();
-                Package();
-                e.Handled = true;
-            }
-        }
-
-        public void KeyUp(KeyEventArgs e)
-        {
-        }
-
-        public void KeyPress(KeyPressEventArgs e)
-        {
-        }
-
-        #endregion
+      if (e.KeyData == System.Windows.Forms.Keys.Escape && IsActive) {
+        DeactivateTool();
+        Package();
+        e.Handled = true;
+      }
     }
 
+    public void KeyUp(KeyEventArgs e) {
+    }
+
+    public void KeyPress(KeyPressEventArgs e) {
+    }
+
+    #endregion
+  }
+
 }
Index: /trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.Netron/3.0.2672.12446/Netron.Diagramming.Core-3.0.2672.12446/Tools/SelectionTool.cs
===================================================================
--- /trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.Netron/3.0.2672.12446/Netron.Diagramming.Core-3.0.2672.12446/Tools/SelectionTool.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.Netron/3.0.2672.12446/Netron.Diagramming.Core-3.0.2672.12446/Tools/SelectionTool.cs	(revision 4068)
@@ -1,140 +1,127 @@
 using System;
-using System.Diagnostics;
-using System.Collections;
 using System.Drawing;
 using System.Windows.Forms;
 
-namespace Netron.Diagramming.Core
-{
-    // ----------------------------------------------------------------------
+namespace Netron.Diagramming.Core {
+  // ----------------------------------------------------------------------
+  /// <summary>
+  /// This tool implements the standard rectangular selection mechanism. 
+  /// There are two modes (much like Visio).
+  /// <list type="bullet">
+  /// <item><term>Inclusive</term><description>elements are selected if 
+  /// they are contained in the selection rectangle</description></item>
+  /// <item><term>Touching</term><description>elements are selected if the 
+  /// selection rectangle has an overlap with the element</description>
+  /// </item>
+  /// </list>
+  /// <para>Note that this tool is slightly different than other tools 
+  /// since it activates itself unless it has been suspended by another 
+  /// tool. </para>
+  /// </summary>
+  // ----------------------------------------------------------------------
+  public class SelectionTool : AbstractTool, IMouseListener {
+    #region Fields
+
+    // ------------------------------------------------------------------
     /// <summary>
-    /// This tool implements the standard rectangular selection mechanism. 
-    /// There are two modes (much like Visio).
-    /// <list type="bullet">
-    /// <item><term>Inclusive</term><description>elements are selected if 
-    /// they are contained in the selection rectangle</description></item>
-    /// <item><term>Touching</term><description>elements are selected if the 
-    /// selection rectangle has an overlap with the element</description>
-    /// </item>
-    /// </list>
-    /// <para>Note that this tool is slightly different than other tools 
-    /// since it activates itself unless it has been suspended by another 
-    /// tool. </para>
+    /// The location of the mouse when the motion starts.
     /// </summary>
-    // ----------------------------------------------------------------------
-    public class SelectionTool : AbstractTool, IMouseListener
-    {
-        #region Fields
+    // ------------------------------------------------------------------
+    private Point initialPoint;
 
-        // ------------------------------------------------------------------
-        /// <summary>
-        /// The location of the mouse when the motion starts.
-        /// </summary>
-        // ------------------------------------------------------------------
-        private Point initialPoint;
+    #endregion
 
-        #endregion
+    #region Constructor
+    /// <summary>
+    /// Initializes a new instance of the <see cref="T:SelectionTool"/> class.
+    /// </summary>
+    /// <param name="name">The name of the tool.</param>
+    public SelectionTool(string name)
+      : base(name) {
+    }
+    #endregion
 
-        #region Constructor
-        /// <summary>
-        /// Initializes a new instance of the <see cref="T:SelectionTool"/> class.
-        /// </summary>
-        /// <param name="name">The name of the tool.</param>
-        public SelectionTool(string name) : base(name)
-        {
-        }
-        #endregion
+    #region Methods
 
-        #region Methods
-
-        // ------------------------------------------------------------------
-        /// <summary>
-        /// Called when the tool is activated.
-        /// </summary>
-        // ------------------------------------------------------------------
-        protected override void OnActivateTool()
-        {
-            Controller.View.CurrentCursor = CursorPalette.Selection;
-        }
-
-        // ------------------------------------------------------------------
-        /// <summary>
-        /// Handles the mouse down event.
-        /// </summary>
-        /// <param name="e">The 
-        /// <see cref="T:System.Windows.Forms.MouseEventArgs"/> instance 
-        /// containing the event data.</param>
-        // ------------------------------------------------------------------
-        public bool MouseDown(MouseEventArgs e)
-        {
-            if (e == null)
-                throw new ArgumentNullException(
-                    "The argument object is 'null'");
-
-            if (e.Button == MouseButtons.Left && Enabled && !IsSuspended)
-            {
-              if (this.Controller.Model.Selection.SelectedItems.Count == 0 && this.Controller.Model.Selection.Connector == null)
-                {
-                    initialPoint = e.Location;
-                    ActivateTool();
-                    return true;// This tells the tool-loop to stop looking 
-                    // for another handler, which keeps the CPU low.
-                }                
-            }
-            return false;
-        }
-
-        // ------------------------------------------------------------------
-        /// <summary>
-        /// Handles the mouse move event.
-        /// </summary>
-        /// <param name="e">The 
-        /// <see cref="T:System.Windows.Forms.MouseEventArgs"/> instance 
-        /// containing the event data.</param>
-        // ------------------------------------------------------------------
-        public void MouseMove(MouseEventArgs e)
-        {
-            if (e == null)
-                throw new ArgumentNullException(
-                    "The argument object is 'null'");
-            IView view = this.Controller.View;
-            Point point = e.Location;
-            if(IsActive && !IsSuspended)
-            {
-                Controller.View.PaintGhostRectangle(initialPoint, point);
-                Rectangle rec = System.Drawing.Rectangle.Inflate(
-                    Controller.View.Ghost.Rectangle, 20, 20);
-                
-                Controller.View.Invalidate(rec);
-            }            
-        }
-
-        // ------------------------------------------------------------------
-        /// <summary>
-        /// Handles the mouse up event.
-        /// </summary>
-        /// <param name="e">The 
-        /// <see cref="T:System.Windows.Forms.MouseEventArgs"/> instance 
-        /// containing the event data.</param>
-        // ------------------------------------------------------------------
-        public void MouseUp(MouseEventArgs e)
-        {
-            if (IsActive)
-            {
-                DeactivateTool();
-                if(Controller.View.Ghost != null)
-                {
-                   this.Controller.Model.Selection.CollectEntitiesInside(
-                        Controller.View.Ghost.Rectangle);//world space
-
-                    Controller.RaiseOnShowSelectionProperties(
-                        new SelectionEventArgs(
-                       this.Controller.Model.Selection.SelectedItems.ToArray()));
-                }
-                Controller.View.ResetGhost();                
-            }
-        }
-        #endregion
+    // ------------------------------------------------------------------
+    /// <summary>
+    /// Called when the tool is activated.
+    /// </summary>
+    // ------------------------------------------------------------------
+    protected override void OnActivateTool() {
+      Controller.View.CurrentCursor = CursorPalette.Selection;
     }
 
+    // ------------------------------------------------------------------
+    /// <summary>
+    /// Handles the mouse down event.
+    /// </summary>
+    /// <param name="e">The 
+    /// <see cref="T:System.Windows.Forms.MouseEventArgs"/> instance 
+    /// containing the event data.</param>
+    // ------------------------------------------------------------------
+    public bool MouseDown(MouseEventArgs e) {
+      if (e == null)
+        throw new ArgumentNullException(
+            "The argument object is 'null'");
+
+      if (e.Button == MouseButtons.Left && Enabled && !IsSuspended) {
+        if (this.Controller.Model.Selection.SelectedItems.Count == 0 && this.Controller.Model.Selection.Connector == null) {
+          initialPoint = e.Location;
+          ActivateTool();
+          return true;// This tells the tool-loop to stop looking 
+          // for another handler, which keeps the CPU low.
+        }
+      }
+      return false;
+    }
+
+    // ------------------------------------------------------------------
+    /// <summary>
+    /// Handles the mouse move event.
+    /// </summary>
+    /// <param name="e">The 
+    /// <see cref="T:System.Windows.Forms.MouseEventArgs"/> instance 
+    /// containing the event data.</param>
+    // ------------------------------------------------------------------
+    public void MouseMove(MouseEventArgs e) {
+      if (e == null)
+        throw new ArgumentNullException(
+            "The argument object is 'null'");
+      IView view = this.Controller.View;
+      Point point = e.Location;
+      if (IsActive && !IsSuspended) {
+        Controller.View.PaintGhostRectangle(initialPoint, point);
+        Rectangle rec = System.Drawing.Rectangle.Inflate(
+            Controller.View.Ghost.Rectangle, 20, 20);
+
+        Controller.View.Invalidate(rec);
+      }
+    }
+
+    // ------------------------------------------------------------------
+    /// <summary>
+    /// Handles the mouse up event.
+    /// </summary>
+    /// <param name="e">The 
+    /// <see cref="T:System.Windows.Forms.MouseEventArgs"/> instance 
+    /// containing the event data.</param>
+    // ------------------------------------------------------------------
+    public void MouseUp(MouseEventArgs e) {
+      if (IsActive) {
+        DeactivateTool();
+        if (Controller.View.Ghost != null) {
+          this.Controller.Model.Selection.CollectEntitiesInside(
+               Controller.View.Ghost.Rectangle);//world space
+
+          Controller.RaiseOnShowSelectionProperties(
+              new SelectionEventArgs(
+             this.Controller.Model.Selection.SelectedItems.ToArray()));
+        }
+        Controller.View.ResetGhost();
+      }
+    }
+    #endregion
+  }
+
 }
Index: /trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.Netron/3.0.2672.12446/Netron.Diagramming.Core-3.0.2672.12446/Tools/SendBackwardsTool.cs
===================================================================
--- /trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.Netron/3.0.2672.12446/Netron.Diagramming.Core-3.0.2672.12446/Tools/SendBackwardsTool.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.Netron/3.0.2672.12446/Netron.Diagramming.Core-3.0.2672.12446/Tools/SendBackwardsTool.cs	(revision 4068)
@@ -1,112 +1,98 @@
 using System;
+using System.Collections;
+using System.Collections.Generic;
 using System.Diagnostics;
-using System.Collections;
-using System.Drawing;
-using System.Windows.Forms;
-using System.Collections.Generic;
-namespace Netron.Diagramming.Core
-{
+namespace Netron.Diagramming.Core {
+  /// <summary>
+  /// Group tool
+  /// </summary>
+  class SendBackwardsTool : AbstractTool {
+
+    #region Fields
+
+    #endregion
+
+    #region Constructor
     /// <summary>
-    /// Group tool
+    /// Initializes a new instance of the <see cref="T:SendBackwards"/> class.
     /// </summary>
-    class SendBackwardsTool : AbstractTool
-    {
+    /// <param name="name">The name of the tool.</param>
+    public SendBackwardsTool(string name)
+      : base(name) {
+    }
+    #endregion
 
-        #region Fields
-     
-        #endregion
+    #region Methods
 
-        #region Constructor
-        /// <summary>
-        /// Initializes a new instance of the <see cref="T:SendBackwards"/> class.
-        /// </summary>
-        /// <param name="name">The name of the tool.</param>
-        public SendBackwardsTool(string name)
-            : base(name)
-        {
+    /// <summary>
+    /// Called when the tool is activated.
+    /// </summary>
+    protected override void OnActivateTool() {
+      if (this.Controller.Model.Selection.SelectedItems != null && this.Controller.Model.Selection.SelectedItems.Count > 0) {
+        /*
+       * They should give me a Nobel prize for so much thinking early in the morning...
+       */
+        #region Preparation of the ordering
+        Debug.Assert(this.Controller.Model.Selection.SelectedItems[0] != null, "A selection cannot contain a 'null' entity.");
+        //the items have to be moved in the order of the Paintables; the SortedList automatically orders things for us.
+        SortedList<int, IDiagramEntity> list = new SortedList<int, IDiagramEntity>();
+        //We fetch a flattened selection, which means that if there is a group the constituents will be
+        //returned rather than the group itself.
+        foreach (IDiagramEntity entity in this.Controller.Model.Selection.FlattenedSelectionItems) {
+          //the addition will automatically put the item in increasing order
+          list.Add(this.Controller.Model.Paintables.IndexOf(entity), entity);
+        }
+        //if the lowest z-value is the first one in the paintables we cannot shift anything, so we quit
+        if (list.Keys[0] == 0) return;
+
+        /*Send them forwards but make sure it's a visible effect!
+        It's not enough to move it only once since the shape(s) above might be of
+        high z-order degree, so we have to find which is the first shape overlapping with 
+        the selection and take as many steps as it takes to surpass it.
+         If there is no overlap we'll shift the z-order with just one unit.
+        */
+        int delta = 1;
+        int lowestZInSelection = list.Keys[0];
+        bool found = false;
+        //we can speed up the loop by noticing that the previous shape in the z-stack is necessarily
+        //below the first one of the selection
+        for (int m = lowestZInSelection - 1; m >= 0 && !found; m--) {
+          //the overlap has to be with an entity, not from the selection
+          if (list.ContainsValue(this.Controller.Model.Paintables[m])) continue;
+          for (int s = 0; s < list.Count; s++) {
+            //if there is an overlap we found the required index
+            if (this.Controller.Model.Paintables[m].Rectangle.IntersectsWith(list.Values[s].Rectangle)) {
+              //an additional complication here; if the found shape is part of a group we have
+              //to take the upper z-value of the group...
+              if (this.Controller.Model.Paintables[m].Group != null) {
+                int min = int.MaxValue;
+                CollectionBase<IDiagramEntity> leafs = new CollectionBase<IDiagramEntity>();
+                Utils.TraverseCollect(this.Controller.Model.Paintables[m].Group, ref leafs);
+                foreach (IDiagramEntity groupMember in leafs) {
+                  min = Math.Min(min, this.Controller.Model.Paintables.IndexOf(groupMember));
+                }
+                //take the found z-value of the group rather than the one of the group-child
+                m = min;
+              }
+              delta = lowestZInSelection - m;
+              found = true;
+              break;
+            }
+
+          }
         }
         #endregion
+        Debug.Assert(delta >= 1, "The shift cannot be less than one since we checked previous situations earlier.");
+        for (int k = 0; k < list.Count; k++) {
+          this.Controller.Model.SendBackwards(list.Values[k], delta);
+        }
+      }
+      DeactivateTool();
+    }
 
-        #region Methods
-
-        /// <summary>
-        /// Called when the tool is activated.
-        /// </summary>
-        protected override void OnActivateTool()
-        {
-          if (this.Controller.Model.Selection.SelectedItems != null && this.Controller.Model.Selection.SelectedItems.Count > 0)
-            {
-                /*
-               * They should give me a Nobel prize for so much thinking early in the morning...
-               */
-                #region Preparation of the ordering
-              Debug.Assert(this.Controller.Model.Selection.SelectedItems[0] != null, "A selection cannot contain a 'null' entity.");
-                //the items have to be moved in the order of the Paintables; the SortedList automatically orders things for us.
-                SortedList<int, IDiagramEntity> list = new SortedList<int, IDiagramEntity>();
-                //We fetch a flattened selection, which means that if there is a group the constituents will be
-                //returned rather than the group itself.
-                foreach (IDiagramEntity entity in this.Controller.Model.Selection.FlattenedSelectionItems)
-                {
-                    //the addition will automatically put the item in increasing order
-                    list.Add(this.Controller.Model.Paintables.IndexOf(entity), entity);
-                }
-                //if the lowest z-value is the first one in the paintables we cannot shift anything, so we quit
-                if (list.Keys[0] == 0) return;
-
-                /*Send them forwards but make sure it's a visible effect!
-                It's not enough to move it only once since the shape(s) above might be of
-                high z-order degree, so we have to find which is the first shape overlapping with 
-                the selection and take as many steps as it takes to surpass it.
-                 If there is no overlap we'll shift the z-order with just one unit.
-                */
-                int delta = 1;
-                int lowestZInSelection = list.Keys[0];
-                bool found = false;
-                //we can speed up the loop by noticing that the previous shape in the z-stack is necessarily
-                //below the first one of the selection
-                for (int m = lowestZInSelection-1; m>=0 && !found; m--)
-                {
-                    //the overlap has to be with an entity, not from the selection
-                    if (list.ContainsValue(this.Controller.Model.Paintables[m])) continue;
-                    for (int s = 0; s < list.Count; s++)
-                    {
-                        //if there is an overlap we found the required index
-                        if (this.Controller.Model.Paintables[m].Rectangle.IntersectsWith(list.Values[s].Rectangle))
-                        {
-                            //an additional complication here; if the found shape is part of a group we have
-                            //to take the upper z-value of the group...
-                            if (this.Controller.Model.Paintables[m].Group != null)
-                            {
-                                int min = int.MaxValue;
-                                CollectionBase<IDiagramEntity> leafs = new CollectionBase<IDiagramEntity>();
-                                Utils.TraverseCollect(this.Controller.Model.Paintables[m].Group, ref leafs);
-                                foreach (IDiagramEntity groupMember in leafs)
-                                {
-                                    min = Math.Min(min, this.Controller.Model.Paintables.IndexOf(groupMember));
-                                }
-                                //take the found z-value of the group rather than the one of the group-child
-                                m = min;
-                            }
-                            delta = lowestZInSelection - m ;
-                            found = true;
-                            break;
-                        }
-
-                    }
-                }
-                #endregion
-                Debug.Assert(delta >= 1, "The shift cannot be less than one since we checked previous situations earlier.");
-                for (int k = 0; k < list.Count; k++)
-                {
-                    this.Controller.Model.SendBackwards(list.Values[k], delta);
-                }
-            }
-            DeactivateTool();
-        }
-        
-        #endregion
+    #endregion
 
 
-    }
+  }
 
 }
Index: /trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.Netron/3.0.2672.12446/Netron.Diagramming.Core-3.0.2672.12446/Tools/SendForwardsTool.cs
===================================================================
--- /trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.Netron/3.0.2672.12446/Netron.Diagramming.Core-3.0.2672.12446/Tools/SendForwardsTool.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.Netron/3.0.2672.12446/Netron.Diagramming.Core-3.0.2672.12446/Tools/SendForwardsTool.cs	(revision 4068)
@@ -1,119 +1,105 @@
 using System;
+using System.Collections;
+using System.Collections.Generic;
 using System.Diagnostics;
-using System.Collections;
-using System.Drawing;
-using System.Windows.Forms;
-using System.Collections.Generic;
-namespace Netron.Diagramming.Core
-{
+namespace Netron.Diagramming.Core {
+  /// <summary>
+  /// Send forward tool which moves the selection up in the z-order.
+  /// </summary>
+  class SendForwardsTool : AbstractTool {
+
+    #region Fields
+
+    #endregion
+
+    #region Constructor
     /// <summary>
-    /// Send forward tool which moves the selection up in the z-order.
+    /// Initializes a new instance of the <see cref="T:SendBackwards"/> class.
     /// </summary>
-    class SendForwardsTool : AbstractTool
-    {
+    /// <param name="name">The name of the tool.</param>
+    public SendForwardsTool(string name)
+      : base(name) {
+    }
+    #endregion
 
-        #region Fields
-     
-        #endregion
+    #region Methods
 
-        #region Constructor
-        /// <summary>
-        /// Initializes a new instance of the <see cref="T:SendBackwards"/> class.
-        /// </summary>
-        /// <param name="name">The name of the tool.</param>
-        public SendForwardsTool(string name)
-            : base(name)
-        {
+    /// <summary>
+    /// Called when the tool is activated.
+    /// </summary>
+    protected override void OnActivateTool() {
+      /*
+       * A lot of stuff is calculated here for something which might seem at first sight
+       * a really simple action. In general the calculations will be short since a user does not
+       * usually shift many shapes at the same time and the overlap with the selection
+       * is small.
+       */
+      if (this.Controller.Model.Selection.SelectedItems != null && this.Controller.Model.Selection.SelectedItems.Count > 0) {
+
+        /*
+         * They should give me a Nobel prize for so much thinking early in the morning...
+         */
+        #region Preparation of the ordering
+        Debug.Assert(this.Controller.Model.Selection.SelectedItems[0] != null, "A selection cannot contain a 'null' entity.");
+        //the items have to be moved in the order of the Paintables; the SortedList automatically orders things for us.
+        SortedList<int, IDiagramEntity> list = new SortedList<int, IDiagramEntity>();
+        //We fetch a flattened selection, which means that if there is a group the constituents will be
+        //returned rather than the group itself.
+        foreach (IDiagramEntity entity in this.Controller.Model.Selection.FlattenedSelectionItems) {
+          //the addition will automatically put the item in increasing order
+          list.Add(this.Controller.Model.Paintables.IndexOf(entity), entity);
+        }
+        //if the highest z-value is the last one in the paintables we cannot shift anything, so we quit
+        if (list.Keys[list.Count - 1] == this.Controller.Model.Paintables.Count - 1) return;
+
+        /*Send them forwards but make sure it's a visible effect!
+        It's not enough to move it only once since the shape(s) above might be of
+        high z-order degree, so we have to find which is the first shape overlapping with 
+        the selection and take as many steps as it takes to surpass it.
+         If there is no overlap we'll shift the z-order with just one unit.
+        */
+        int delta = 1;
+        int lowestZInSelection = list.Keys[0];
+        bool found = false;
+        //we can speed up the loop by noticing that the next shape in the z-stack is necessarily
+        //above the first one of the selection
+        for (int m = lowestZInSelection + 1; m < this.Controller.Model.Paintables.Count && !found; m++) {
+          //the overlap has to be with an entity, not from the selection
+          if (list.ContainsValue(this.Controller.Model.Paintables[m])) continue;
+          for (int s = 0; s < list.Count; s++) {
+            //if there is an overlap we found the required index
+            if (this.Controller.Model.Paintables[m].Rectangle.IntersectsWith(list.Values[s].Rectangle)) {
+              //an additional complication here; if the found shape is part of a group we have
+              //to take the upper z-value of the group...
+              if (this.Controller.Model.Paintables[m].Group != null) {
+                int max = -1;
+                CollectionBase<IDiagramEntity> leafs = new CollectionBase<IDiagramEntity>();
+                Utils.TraverseCollect(this.Controller.Model.Paintables[m].Group, ref leafs);
+                foreach (IDiagramEntity groupMember in leafs) {
+                  max = Math.Max(max, this.Controller.Model.Paintables.IndexOf(groupMember));
+                }
+                //take the found z-value of the group rather than the one of the group-child
+                m = max;
+              }
+              delta = m - lowestZInSelection;
+              found = true;
+              break;
+            }
+
+          }
         }
         #endregion
+        Debug.Assert(delta >= 1, "The shift cannot be less than one since we checked previous situations earlier.");
+        for (int k = 0; k < list.Count; k++) {
+          this.Controller.Model.SendForwards(list.Values[k], delta);
+        }
+      }
+      DeactivateTool();
+    }
 
-        #region Methods
-
-        /// <summary>
-        /// Called when the tool is activated.
-        /// </summary>
-        protected override void OnActivateTool()
-        {
-            /*
-             * A lot of stuff is calculated here for something which might seem at first sight
-             * a really simple action. In general the calculations will be short since a user does not
-             * usually shift many shapes at the same time and the overlap with the selection
-             * is small.
-             */
-          if (this.Controller.Model.Selection.SelectedItems != null && this.Controller.Model.Selection.SelectedItems.Count > 0)
-            {
-                
-                /*
-                 * They should give me a Nobel prize for so much thinking early in the morning...
-                 */
-                #region Preparation of the ordering
-            Debug.Assert(this.Controller.Model.Selection.SelectedItems[0] != null, "A selection cannot contain a 'null' entity.");                
-                //the items have to be moved in the order of the Paintables; the SortedList automatically orders things for us.
-                SortedList<int, IDiagramEntity> list = new SortedList<int,IDiagramEntity>();
-                //We fetch a flattened selection, which means that if there is a group the constituents will be
-                //returned rather than the group itself.
-                foreach (IDiagramEntity entity in this.Controller.Model.Selection.FlattenedSelectionItems)
-                {
-                    //the addition will automatically put the item in increasing order
-                    list.Add(this.Controller.Model.Paintables.IndexOf(entity), entity);                    
-                }
-                //if the highest z-value is the last one in the paintables we cannot shift anything, so we quit
-                if (list.Keys[list.Count - 1] == this.Controller.Model.Paintables.Count - 1) return;
-                
-                /*Send them forwards but make sure it's a visible effect!
-                It's not enough to move it only once since the shape(s) above might be of
-                high z-order degree, so we have to find which is the first shape overlapping with 
-                the selection and take as many steps as it takes to surpass it.
-                 If there is no overlap we'll shift the z-order with just one unit.
-                */
-                int delta = 1;
-                int lowestZInSelection = list.Keys[0];
-                bool found = false;
-                //we can speed up the loop by noticing that the next shape in the z-stack is necessarily
-                //above the first one of the selection
-                for (int m = lowestZInSelection+1; m < this.Controller.Model.Paintables.Count && !found; m++)
-                { 
-                    //the overlap has to be with an entity, not from the selection
-                    if(list.ContainsValue(this.Controller.Model.Paintables[m])) continue;
-                    for(int s=0; s<list.Count; s++)
-                    {
-                        //if there is an overlap we found the required index
-                        if (this.Controller.Model.Paintables[m].Rectangle.IntersectsWith(list.Values[s].Rectangle))
-                        {
-                            //an additional complication here; if the found shape is part of a group we have
-                            //to take the upper z-value of the group...
-                            if (this.Controller.Model.Paintables[m].Group != null)
-                            {
-                                int max = -1;
-                                CollectionBase<IDiagramEntity> leafs = new CollectionBase<IDiagramEntity>();
-                                Utils.TraverseCollect(this.Controller.Model.Paintables[m].Group, ref leafs);
-                                foreach (IDiagramEntity groupMember in leafs)
-                                {
-                                    max = Math.Max(max, this.Controller.Model.Paintables.IndexOf(groupMember));
-                                }
-                                //take the found z-value of the group rather than the one of the group-child
-                                m = max;
-                            }
-                            delta = m - lowestZInSelection;
-                            found = true;
-                            break;
-                        }
-
-                    }
-                }
-                #endregion
-                Debug.Assert(delta >= 1, "The shift cannot be less than one since we checked previous situations earlier.");
-                for (int k = 0; k < list.Count; k++)
-                {
-                    this.Controller.Model.SendForwards(list.Values[k], delta);
-                }
-            }
-            DeactivateTool();
-        }
-        
-        #endregion
+    #endregion
 
 
-    }
+  }
 
 }
Index: /trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.Netron/3.0.2672.12446/Netron.Diagramming.Core-3.0.2672.12446/Tools/SendToBackTool.cs
===================================================================
--- /trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.Netron/3.0.2672.12446/Netron.Diagramming.Core-3.0.2672.12446/Tools/SendToBackTool.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.Netron/3.0.2672.12446/Netron.Diagramming.Core-3.0.2672.12446/Tools/SendToBackTool.cs	(revision 4068)
@@ -1,65 +1,54 @@
-using System;
-using System.Diagnostics;
 using System.Collections;
-using System.Drawing;
-using System.Windows.Forms;
 using System.Collections.Generic;
-namespace Netron.Diagramming.Core
-{
+namespace Netron.Diagramming.Core {
+  /// <summary>
+  /// Group tool
+  /// </summary>
+  class SendToBackTool : AbstractTool {
+
+    #region Fields
+
+    #endregion
+
+    #region Constructor
     /// <summary>
-    /// Group tool
+    /// Initializes a new instance of the <see cref="T:SendToBackTool"/> class.
     /// </summary>
-    class SendToBackTool : AbstractTool
-    {
+    /// <param name="name">The name of the tool.</param>
+    public SendToBackTool(string name)
+      : base(name) {
+    }
+    #endregion
 
-        #region Fields
-     
-        #endregion
+    #region Methods
 
-        #region Constructor
-        /// <summary>
-        /// Initializes a new instance of the <see cref="T:SendToBackTool"/> class.
-        /// </summary>
-        /// <param name="name">The name of the tool.</param>
-        public SendToBackTool(string name)
-            : base(name)
-        {
+    /// <summary>
+    /// Called when the tool is activated.
+    /// </summary>
+    protected override void OnActivateTool() {
+      if (this.Controller.Model.Selection.SelectedItems != null && this.Controller.Model.Selection.SelectedItems.Count > 0) {
+        #region Preparation of the ordering
+        //the items have to be moved in the inverse order of the Paintables
+        //Usually this is a good moment to make a little drawing or example
+        //to see how things function.
+
+        SortedList<int, IDiagramEntity> list = new SortedList<int, IDiagramEntity>();
+        foreach (IDiagramEntity entity in this.Controller.Model.Selection.FlattenedSelectionItems) {
+          //the addition will automatically put the item in increasing order
+          list.Add(this.Controller.Model.Paintables.IndexOf(entity), entity);
         }
         #endregion
+        //send them backwards
+        for (int k = list.Count - 1; k >= 0; k--) {
+          this.Controller.Model.SendToBack(list.Values[k]);
+        }
+      }
+      DeactivateTool();
+    }
 
-        #region Methods
-
-        /// <summary>
-        /// Called when the tool is activated.
-        /// </summary>
-        protected override void OnActivateTool()
-        {
-          if (this.Controller.Model.Selection.SelectedItems != null && this.Controller.Model.Selection.SelectedItems.Count > 0)
-            {
-                #region Preparation of the ordering
-                //the items have to be moved in the inverse order of the Paintables
-                //Usually this is a good moment to make a little drawing or example
-                //to see how things function.
-
-                SortedList<int, IDiagramEntity> list = new SortedList<int, IDiagramEntity>();
-                foreach (IDiagramEntity entity in this.Controller.Model.Selection.FlattenedSelectionItems)
-                {
-                    //the addition will automatically put the item in increasing order
-                    list.Add(this.Controller.Model.Paintables.IndexOf(entity), entity);
-                }
-                #endregion
-                //send them backwards
-                for(int k = list.Count-1; k>=0; k--)
-                {
-                    this.Controller.Model.SendToBack(list.Values[k]);
-                }
-            }
-            DeactivateTool();
-        }
-        
-        #endregion
+    #endregion
 
 
-    }
+  }
 
 }
Index: /trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.Netron/3.0.2672.12446/Netron.Diagramming.Core-3.0.2672.12446/Tools/SendToFrontTool.cs
===================================================================
--- /trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.Netron/3.0.2672.12446/Netron.Diagramming.Core-3.0.2672.12446/Tools/SendToFrontTool.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.Netron/3.0.2672.12446/Netron.Diagramming.Core-3.0.2672.12446/Tools/SendToFrontTool.cs	(revision 4068)
@@ -1,65 +1,54 @@
-using System;
-using System.Diagnostics;
 using System.Collections;
-using System.Drawing;
-using System.Windows.Forms;
 using System.Collections.Generic;
-namespace Netron.Diagramming.Core
-{
+namespace Netron.Diagramming.Core {
+  /// <summary>
+  /// Group tool
+  /// </summary>
+  class SendToFrontTool : AbstractTool {
+
+    #region Fields
+
+    #endregion
+
+    #region Constructor
     /// <summary>
-    /// Group tool
+    /// Initializes a new instance of the <see cref="T:SendToFrontTool"/> class.
     /// </summary>
-    class SendToFrontTool : AbstractTool
-    {
+    /// <param name="name">The name of the tool.</param>
+    public SendToFrontTool(string name)
+      : base(name) {
+    }
+    #endregion
 
-        #region Fields
-     
-        #endregion
+    #region Methods
 
-        #region Constructor
-        /// <summary>
-        /// Initializes a new instance of the <see cref="T:SendToFrontTool"/> class.
-        /// </summary>
-        /// <param name="name">The name of the tool.</param>
-        public SendToFrontTool(string name)
-            : base(name)
-        {
+    /// <summary>
+    /// Called when the tool is activated.
+    /// </summary>
+    protected override void OnActivateTool() {
+      if (this.Controller.Model.Selection.SelectedItems != null && this.Controller.Model.Selection.SelectedItems.Count > 0) {
+        #region Preparation of the ordering
+        //the items have to be moved in the order of the Paintables
+        //Usually this is a good moment to make a little drawing or example
+        //to see how things function.
+
+        SortedList<int, IDiagramEntity> list = new SortedList<int, IDiagramEntity>();
+        foreach (IDiagramEntity entity in this.Controller.Model.Selection.FlattenedSelectionItems) {
+          //the addition will automatically put the item in increasing order
+          list.Add(this.Controller.Model.Paintables.IndexOf(entity), entity);
         }
         #endregion
+        //send them backwards
+        for (int k = 0; k < list.Count; k++) {
+          this.Controller.Model.SendToFront(list.Values[k]);
+        }
+      }
+      DeactivateTool();
+    }
 
-        #region Methods
-
-        /// <summary>
-        /// Called when the tool is activated.
-        /// </summary>
-        protected override void OnActivateTool()
-        {
-          if (this.Controller.Model.Selection.SelectedItems != null && this.Controller.Model.Selection.SelectedItems.Count > 0)
-            {
-                #region Preparation of the ordering
-                //the items have to be moved in the order of the Paintables
-                //Usually this is a good moment to make a little drawing or example
-                //to see how things function.
-
-                SortedList<int, IDiagramEntity> list = new SortedList<int, IDiagramEntity>();
-                foreach (IDiagramEntity entity in this.Controller.Model.Selection.FlattenedSelectionItems)
-                {
-                    //the addition will automatically put the item in increasing order
-                    list.Add(this.Controller.Model.Paintables.IndexOf(entity), entity);
-                }
-                #endregion
-                //send them backwards
-                for(int k = 0; k < list.Count; k++)
-                {
-                    this.Controller.Model.SendToFront(list.Values[k]);
-                }
-            }
-            DeactivateTool();
-        }
-        
-        #endregion
+    #endregion
 
 
-    }
+  }
 
 }
Index: /trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.Netron/3.0.2672.12446/Netron.Diagramming.Core-3.0.2672.12446/Tools/TransformTool.cs
===================================================================
--- /trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.Netron/3.0.2672.12446/Netron.Diagramming.Core-3.0.2672.12446/Tools/TransformTool.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.Netron/3.0.2672.12446/Netron.Diagramming.Core-3.0.2672.12446/Tools/TransformTool.cs	(revision 4068)
@@ -1,614 +1,562 @@
 using System;
-using System.Diagnostics;
 using System.Collections;
 using System.Drawing;
 using System.Windows.Forms;
 
-namespace Netron.Diagramming.Core
-{
-    // ----------------------------------------------------------------------
-    /// <summary>
-    /// This tool implements the action of scaling and/or rotating shapes on 
-    /// the canvas. 
-    /// </summary>
-    // ----------------------------------------------------------------------
-    public class TransformTool : 
-        AbstractTool, 
-        IMouseListener
-    {
-
-        #region Fields
-
-        // ------------------------------------------------------------------
-        /// <summary>
-        /// The location of the mouse when the motion starts.
-        /// </summary>
-        // ------------------------------------------------------------------
-        private Point initialPoint;
-
-        // ------------------------------------------------------------------
-        /// <summary>
-        /// The intermediate location of the mouse during the motion.
-        /// </summary>
-        // ------------------------------------------------------------------
-        private Point lastPoint;
-
-        // ------------------------------------------------------------------
-        /// <summary>
-        /// Wwhether or not there is a transformation going on.
-        /// </summary>
-        // ------------------------------------------------------------------
-        private bool changing;
-
-        // ------------------------------------------------------------------
-        /// <summary>
-        /// The entities being transformed.
-        /// </summary>
-        // ------------------------------------------------------------------
-        private Hashtable transformers;
-
-        // ------------------------------------------------------------------
-        /// <summary>
-        /// The origin vector where the scaling has its start.
-        /// </summary>
-        // ------------------------------------------------------------------
-        double ox, oy;
-
-        // ------------------------------------------------------------------
-        /// <summary>
-        /// The scale with which the entities will be scaled.
-        /// </summary>
-        // ------------------------------------------------------------------
-        double scale , scalex, scaley;
-
-        // ------------------------------------------------------------------
-        /// <summary>
-        /// The eight possible types of transformations.
-        /// </summary>
-        // ------------------------------------------------------------------
-        private TransformTypes transform;
-
-        // ------------------------------------------------------------------
-        /// <summary>
-        /// Dummy which is calculated in function of the current resizing 
-        /// location.
-        /// </summary>
-        // ------------------------------------------------------------------
-        Point origin = Point.Empty;
-
-        // ------------------------------------------------------------------
-        /// <summary>
-        /// Specifies if the cursor has been changed during a mouse down or
-        /// mouse move event.
-        /// </summary>
-        // ------------------------------------------------------------------
-        bool cursorChanged = false;
-
-        // ------------------------------------------------------------------
-        /// <summary>
-        /// The cursor prior to us changing it.
-        /// </summary>
-        // ------------------------------------------------------------------
-        Cursor previousCursor = null;
-
+namespace Netron.Diagramming.Core {
+  // ----------------------------------------------------------------------
+  /// <summary>
+  /// This tool implements the action of scaling and/or rotating shapes on 
+  /// the canvas. 
+  /// </summary>
+  // ----------------------------------------------------------------------
+  public class TransformTool :
+      AbstractTool,
+      IMouseListener {
+
+    #region Fields
+
+    // ------------------------------------------------------------------
+    /// <summary>
+    /// The location of the mouse when the motion starts.
+    /// </summary>
+    // ------------------------------------------------------------------
+    private Point initialPoint;
+
+    // ------------------------------------------------------------------
+    /// <summary>
+    /// The intermediate location of the mouse during the motion.
+    /// </summary>
+    // ------------------------------------------------------------------
+    private Point lastPoint;
+
+    // ------------------------------------------------------------------
+    /// <summary>
+    /// Wwhether or not there is a transformation going on.
+    /// </summary>
+    // ------------------------------------------------------------------
+    private bool changing;
+
+    // ------------------------------------------------------------------
+    /// <summary>
+    /// The entities being transformed.
+    /// </summary>
+    // ------------------------------------------------------------------
+    private Hashtable transformers;
+
+    // ------------------------------------------------------------------
+    /// <summary>
+    /// The origin vector where the scaling has its start.
+    /// </summary>
+    // ------------------------------------------------------------------
+    double ox, oy;
+
+    // ------------------------------------------------------------------
+    /// <summary>
+    /// The scale with which the entities will be scaled.
+    /// </summary>
+    // ------------------------------------------------------------------
+    double scale, scalex, scaley;
+
+    // ------------------------------------------------------------------
+    /// <summary>
+    /// The eight possible types of transformations.
+    /// </summary>
+    // ------------------------------------------------------------------
+    private TransformTypes transform;
+
+    // ------------------------------------------------------------------
+    /// <summary>
+    /// Dummy which is calculated in function of the current resizing 
+    /// location.
+    /// </summary>
+    // ------------------------------------------------------------------
+    Point origin = Point.Empty;
+
+    // ------------------------------------------------------------------
+    /// <summary>
+    /// Specifies if the cursor has been changed during a mouse down or
+    /// mouse move event.
+    /// </summary>
+    // ------------------------------------------------------------------
+    bool cursorChanged = false;
+
+    // ------------------------------------------------------------------
+    /// <summary>
+    /// The cursor prior to us changing it.
+    /// </summary>
+    // ------------------------------------------------------------------
+    Cursor previousCursor = null;
+
+    #endregion
+
+    #region Constructor
+    /// <summary>
+    /// Initializes a new instance of the <see cref="T:TransformTool"/> class.
+    /// </summary>
+    /// <param name="name">The name of the tool.</param>
+    public TransformTool(string name)
+      : base(name) {
+    }
+    #endregion
+
+    #region Methods
+
+    // ------------------------------------------------------------------
+    /// <summary>
+    /// Called when the tool is activated.
+    /// </summary>
+    // ------------------------------------------------------------------
+    protected override void OnActivateTool() {
+      //nothing to do
+    }
+
+    // ------------------------------------------------------------------
+    /// <summary>
+    /// Sets the cursor depending on whether it's over a Tracker grip or
+    /// not.
+    /// </summary>
+    /// <param name="e">MouseEventArgs</param>
+    // ------------------------------------------------------------------
+    bool UpdateCursor(MouseEventArgs e) {
+      // Don't do anything if there isn't a Tracker!
+      if (Controller.View.Tracker == null) {
+        if (IsActive && Enabled) {
+          //RestoreCursor();
+        } else {
+          // If we changed the cursor from the mouse being moved,
+          // and we aren't active, then the base class won't have
+          // any history of the previous cursor, so we use our own.
+          // We change the cursor on a mouse move even if this tool
+          // isn't active because we want to give visual feedback
+          // on what clicking on a grip will do.
+          if (previousCursor != null) {
+            Cursor = previousCursor;
+          }
+        }
+        cursorChanged = false;
+        previousCursor = null;
+        return false;
+      }
+
+      // If we're not active AND another tool is active, then don't do
+      // anything.  We don't want to change the cursor during a drag-drop
+      // event even if the mouse moves over a grip!
+      //if ((!IsActive) && (Controller.ActiveTool != null))
+      //{
+      //    if (previousCursor != null)
+      //    {
+      //        Cursor = previousCursor;
+      //        cursorChanged = false;
+      //    }
+      //    return false;
+      //}
+
+      bool gripHit = false;
+      //let the tracker tell us if anything was hit
+      Point gripPoint = this.Controller.View.Tracker.Hit(e.Location);
+      Cursor c = null;
+
+
+      #region determine and set the corresponding cursor
+      switch (gripPoint.X) {
+        case -1:
+          switch (gripPoint.Y) {
+            case -1:
+              c = Cursors.SizeNWSE;
+              transform = TransformTypes.NW;
+              //the origin is the right-bottom of the rectangle
+              ox = this.Controller.View.Tracker.Rectangle.Right - ViewBase.TrackerOffset;
+              oy = this.Controller.View.Tracker.Rectangle.Bottom - ViewBase.TrackerOffset;
+              gripHit = true;
+              break;
+            case 0:
+              c = Cursors.SizeWE;
+              transform = TransformTypes.W;
+              //the origin is the right-top of the rectangle
+              ox = this.Controller.View.Tracker.Rectangle.Right - ViewBase.TrackerOffset;// +this.Controller.View.Tracker.Rectangle.Width / 2;
+              oy = this.Controller.View.Tracker.Rectangle.Top + ViewBase.TrackerOffset;
+              gripHit = true;
+              break;
+            case 1:
+              c = Cursors.SizeNESW;
+              transform = TransformTypes.SW;
+              //the origin is the right-top of the rectangle
+              ox = this.Controller.View.Tracker.Rectangle.Right - ViewBase.TrackerOffset;
+              oy = this.Controller.View.Tracker.Rectangle.Top + ViewBase.TrackerOffset;
+              gripHit = true;
+              break;
+          }
+          break;
+        case 0:
+          switch (gripPoint.Y) {
+            case -1:
+              c = Cursors.SizeNS;
+              transform = TransformTypes.N;
+              //the origin is the center-bottom of the rectangle
+              ox = this.Controller.View.Tracker.Rectangle.Left + ViewBase.TrackerOffset;// +this.Controller.View.Tracker.Rectangle.Width / 2;
+              oy = this.Controller.View.Tracker.Rectangle.Bottom - ViewBase.TrackerOffset;
+              gripHit = true;
+              break;
+            case 1:
+              c = Cursors.SizeNS;
+              transform = TransformTypes.S;
+              //the origin is the left-top of the rectangle
+              ox = this.Controller.View.Tracker.Rectangle.Left + ViewBase.TrackerOffset;// +this.Controller.View.Tracker.Rectangle.Width / 2;
+              oy = this.Controller.View.Tracker.Rectangle.Top + ViewBase.TrackerOffset;
+              gripHit = true;
+              break;
+          }
+          break;
+        case 1:
+          switch (gripPoint.Y) {
+            case -1:
+              c = Cursors.SizeNESW;
+              transform = TransformTypes.NE;
+              //the origin is the left-bottom of the rectangle
+              ox = this.Controller.View.Tracker.Rectangle.Left + ViewBase.TrackerOffset;
+              oy = this.Controller.View.Tracker.Rectangle.Bottom - ViewBase.TrackerOffset;
+              gripHit = true;
+              break;
+            case 0:
+              c = Cursors.SizeWE;
+              transform = TransformTypes.E;
+              //the origin is the left-top of the rectangle
+              ox = this.Controller.View.Tracker.Rectangle.Left + ViewBase.TrackerOffset;// +this.Controller.View.Tracker.Rectangle.Width / 2;
+              oy = this.Controller.View.Tracker.Rectangle.Top + ViewBase.TrackerOffset;
+              gripHit = true;
+              break;
+            case 1:
+              c = Cursors.SizeNWSE;
+              transform = TransformTypes.SE;
+              //the origin is the left-top of the tracker rectangle plus the little tracker offset
+              ox = this.Controller.View.Tracker.Rectangle.X + ViewBase.TrackerOffset;
+              oy = this.Controller.View.Tracker.Rectangle.Y + ViewBase.TrackerOffset;
+
+              gripHit = true;
+              break;
+          }
+          break;
+      }
+
+      #endregion
+
+      if (gripHit) {
+        if (Cursor != c) {
+          previousCursor = Cursor;
+          Cursor = c;
+          cursorChanged = true;
+        }
+      } else if (cursorChanged) {
+        Cursor = Cursors.Default;
+        previousCursor = null;
+        cursorChanged = false;
+      }
+      return gripHit;
+    }
+
+    void UpdateState(MouseEventArgs e) {
+      changing = false;
+      changing = UpdateCursor(e);
+    }
+
+    // ------------------------------------------------------------------
+    /// <summary>
+    /// Handles the mouse down event.
+    /// </summary>
+    /// <param name="e">The 
+    /// <see cref="T:System.Windows.Forms.MouseEventArgs"/> instance 
+    /// containing the event data.</param>
+    public bool MouseDown(MouseEventArgs e) {
+      if (e == null) {
+        throw new ArgumentNullException(
+            "The argument object is 'null'");
+      }
+
+      if (e.Button == MouseButtons.Left && Enabled && !IsSuspended &&
+          (Controller.View.Tracker != null)) {
+
+        if (this.Controller.Model.Selection.SelectedItems.Count > 0) {
+          UpdateState(e);
+
+          if (changing) {
+            #region Changing/transforming
+            //the point where the scaling or dragging of the tracker started
+            initialPoint = e.Location;
+            //recursive location of the dragging location
+            lastPoint = initialPoint;
+
+            // The base class captures the current cursor when the
+            // tool is initialized and sets the View's cursor to
+            // that cursor when this tool is deactivated.  So, first
+            // restore the cursor to the "selection cursor", then
+            // change it back again.
+            Cursor c = Cursor;
+            Controller.View.CurrentCursor = Cursors.Default;
+            this.ActivateTool();
+            Cursor = c;
+            //set the cursor corresponding to the grip
+            //Controller.View.CurrentCursor = c;
+            //create a new collection for the transforming entities
+            transformers = new Hashtable();
+            //the points of the connectors
+            Point[] points = null;
+            //the entity bone
+            EntityBone bone;
+            //take the flat selection and keep the current state as a reference for the transformation
+            //until the mouseup pins down the final scaling
+            foreach (IDiagramEntity entity in this.Controller.Model.Selection.FlattenedSelectionItems) {
+              if (!entity.Resizable) continue;//only take what's resizable
+
+              bone = new EntityBone();
+
+              if (entity is IShape) {
+                IShape shape = entity as IShape;
+                if (shape.Connectors.Count > 0) {
+                  points = new Point[shape.Connectors.Count];
+                  for (int m = 0; m < shape.Connectors.Count; m++) {
+                    points[m] = shape.Connectors[m].Point;
+                  }
+                } else
+                  points = null;
+                bone.Rectangle = entity.Rectangle;
+                bone.ConnectorPoints = points;
+              } else if (entity is IConnection) {
+                IConnection con = entity as IConnection;
+                points = new Point[2] { Point.Empty, Point.Empty };
+                //Only non-attached connection connectors have to be scaled
+                //Attached connectors will move with their parent.
+                if (con.From.AttachedTo == null)
+                  points[0] = con.From.Point;
+                if (con.To.AttachedTo == null)
+                  points[1] = con.To.Point;
+                //We define a connection as a bone with empty rectangle
+                //One could use some additional members to label it but it's only overhead at this point.
+                bone.Rectangle = Rectangle.Empty;
+                bone.ConnectorPoints = points;
+              }
+              transformers.Add(entity, bone);
+            }
+            #endregion
+
+            return true;
+          }
+        }
+
+      }
+      return false;
+    }
+
+    // ------------------------------------------------------------------
+    /// <summary>
+    /// Resizes the selected entities. 
+    /// <remarks>The whole logic and geometry behind the resizing is 
+    /// quite involved, there is a detailed Visio diagram showing the 
+    /// elements of the calculations and how the various switch cases 
+    /// are linked together.
+    /// </remarks>
+    /// </summary>
+    /// <param name="e">The 
+    /// <see cref="T:System.Windows.Forms.MouseEventArgs"/> instance 
+    /// containing the event data.</param>
+    // ------------------------------------------------------------------
+    public void MouseMove(MouseEventArgs e) {
+      #region Checking the incoming data
+      if (e == null)
+        throw new ArgumentNullException("The argument object is 'null'");
+      #endregion
+
+      if ((!IsActive) && (Controller.ActiveTool == null)) {
+        UpdateCursor(e);
+      }
+
+      #region Definition to make the code more readable
+
+      //some annoying but necessary type conversions here to double precision
+      double lastLength = 0; //the diagonal length of the current rectangle we are resizing
+      double eX = e.X, eY = e.Y; //the vector corresponding to the mouse location
+      double lx = lastPoint.X, ly = lastPoint.Y; // the lastpoint vector
+      double iX = initialPoint.X, iY = initialPoint.Y; // the vactor when the motion started
+
+      double mx, my; //the motion vector
+      double rx = 0, ry = 0; //the resulting vector
+
+      double sign = 1;
+      #endregion
+
+      if (IsActive) {
+
+        #region The current motion vector is computed
+        mx = eX - lx;
+        my = eY - ly;
         #endregion
 
-        #region Constructor
-        /// <summary>
-        /// Initializes a new instance of the <see cref="T:TransformTool"/> class.
-        /// </summary>
-        /// <param name="name">The name of the tool.</param>
-        public TransformTool(string name)
-            : base(name)
-        {
+        #region Switching between the different compass directions of the grips
+        //the transform is the compass direction of the grip used to resize the entities
+        switch (transform) {
+          #region NW
+          case TransformTypes.NW:
+
+
+
+            //the region above the X-Y=0 diagonal uses the horizontal to project the motion vector onto the diagonal
+            if (mx - my < 0) {
+              scale = (ox - (double)e.X) / (ox - (double)initialPoint.X);
+            } else {
+              scale = (oy - (double)e.Y) / (oy - (double)initialPoint.Y);
+            }
+            //now we can pass the info the the scaling method of the selected entities
+            scalex = scale;
+            scaley = scale;
+            break;
+          #endregion
+
+          #region N
+          case TransformTypes.N:
+            //remember that the coordinate system has its Y-axis pointing downwards                        
+            scale = (oy - (double)e.Y) / (oy - (double)initialPoint.Y);
+
+            //now we can pass the info the the scaling method of the selected entities
+            scalex = 1F;
+            scaley = scale;
+            break;
+          #endregion
+
+          #region NE
+          case TransformTypes.NE:
+            //the region above the X-Y=0 diagonal uses the horizontal to project the motion vector onto the diagonal
+            if (mx + my > 0) {
+              scale = ((double)e.X - ox) / ((double)initialPoint.X - ox);
+
+            } else {
+              scale = ((double)e.Y - oy) / ((double)initialPoint.Y - oy);
+
+            }
+            //now we can pass the info the the scaling method of the selected entities
+            scalex = scale;
+            scaley = scale;
+            break;
+          #endregion
+
+          #region E
+          case TransformTypes.E:
+            //remember that the coordinate system has its Y-axis pointing downwards                        
+            scale = ((double)e.X - ox) / ((double)initialPoint.X - ox);
+
+            //now we can pass the info the the scaling method of the selected entities
+            scalex = scale;
+            scaley = 1F;
+            break;
+          #endregion
+
+          #region SE
+          case TransformTypes.SE:
+            //I'd call this the Visio effect...
+            if (mx - my > 0) {
+              scale = ((double)e.X - ox) / ((double)initialPoint.X - ox);
+            } else
+              scale = ((double)e.Y - oy) / ((double)initialPoint.Y - oy);
+
+            scalex = scale;
+            scaley = scale;
+            break;
+          #endregion
+
+          #region S
+          case TransformTypes.S:
+            //remember that the coordinate system has its Y-axis pointing downwards                        
+            scale = ((double)e.Y - oy) / ((double)initialPoint.Y - oy);
+
+            //now we can pass the info the the scaling method of the selected entities
+            scalex = 1F;
+            scaley = scale;
+            break;
+          #endregion
+
+          #region SW
+          case TransformTypes.SW:
+
+            //the region above the X-Y=0 diagonal uses the horizontal to project the motion vector onto the diagonal
+            if (mx + my < 0) {
+              scale = ((double)e.X - ox) / ((double)initialPoint.X - ox);
+            } else {
+              scale = ((double)e.Y - oy) / ((double)initialPoint.Y - oy);
+
+            }
+            //now we can pass the info the the scaling method of the selected entities
+            scalex = scale;
+            scaley = scale;
+            break;
+          #endregion
+
+          #region W
+          case TransformTypes.W:
+            //remember that the coordinate system has its Y-axis pointing downwards                        
+            scale = (ox - (double)e.X) / (ox - (double)initialPoint.X);
+
+            //now we can pass the info the the scaling method of the selected entities
+            scalex = scale;
+            scaley = 1F;
+            break;
+          #endregion
+
         }
         #endregion
 
-        #region Methods
-
-        // ------------------------------------------------------------------
-        /// <summary>
-        /// Called when the tool is activated.
-        /// </summary>
-        // ------------------------------------------------------------------
-        protected override void OnActivateTool()
-        {
-            //nothing to do
-        }       
-
-        // ------------------------------------------------------------------
-        /// <summary>
-        /// Sets the cursor depending on whether it's over a Tracker grip or
-        /// not.
-        /// </summary>
-        /// <param name="e">MouseEventArgs</param>
-        // ------------------------------------------------------------------
-        bool UpdateCursor(MouseEventArgs e)
-        {
-            // Don't do anything if there isn't a Tracker!
-            if (Controller.View.Tracker == null)
-            {
-                if (IsActive && Enabled)
-                {
-                    //RestoreCursor();
-                }
-                else
-                {
-                    // If we changed the cursor from the mouse being moved,
-                    // and we aren't active, then the base class won't have
-                    // any history of the previous cursor, so we use our own.
-                    // We change the cursor on a mouse move even if this tool
-                    // isn't active because we want to give visual feedback
-                    // on what clicking on a grip will do.
-                    if (previousCursor != null)
-                    {
-                        Cursor = previousCursor;
-                    }
-                }
-                cursorChanged = false;
-                previousCursor = null;
-                return false;
-            }
-
-            // If we're not active AND another tool is active, then don't do
-            // anything.  We don't want to change the cursor during a drag-drop
-            // event even if the mouse moves over a grip!
-            //if ((!IsActive) && (Controller.ActiveTool != null))
-            //{
-            //    if (previousCursor != null)
-            //    {
-            //        Cursor = previousCursor;
-            //        cursorChanged = false;
-            //    }
-            //    return false;
-            //}
-
-            bool gripHit = false;
-            //let the tracker tell us if anything was hit
-            Point gripPoint = this.Controller.View.Tracker.Hit(e.Location);
-            Cursor c = null;
-
-
-            #region determine and set the corresponding cursor
-            switch (gripPoint.X)
-            {
-                case -1:
-                    switch (gripPoint.Y)
-                    {
-                        case -1:
-                            c = Cursors.SizeNWSE;
-                            transform = TransformTypes.NW;
-                            //the origin is the right-bottom of the rectangle
-                            ox = this.Controller.View.Tracker.Rectangle.Right - ViewBase.TrackerOffset;
-                            oy = this.Controller.View.Tracker.Rectangle.Bottom - ViewBase.TrackerOffset;
-                            gripHit = true;
-                            break;
-                        case 0:
-                            c = Cursors.SizeWE;
-                            transform = TransformTypes.W;
-                            //the origin is the right-top of the rectangle
-                            ox = this.Controller.View.Tracker.Rectangle.Right - ViewBase.TrackerOffset;// +this.Controller.View.Tracker.Rectangle.Width / 2;
-                            oy = this.Controller.View.Tracker.Rectangle.Top + ViewBase.TrackerOffset;
-                            gripHit = true;
-                            break;
-                        case 1:
-                            c = Cursors.SizeNESW;
-                            transform = TransformTypes.SW;
-                            //the origin is the right-top of the rectangle
-                            ox = this.Controller.View.Tracker.Rectangle.Right - ViewBase.TrackerOffset;
-                            oy = this.Controller.View.Tracker.Rectangle.Top + ViewBase.TrackerOffset;
-                            gripHit = true;
-                            break;
-                    }
-                    break;
-                case 0:
-                    switch (gripPoint.Y)
-                    {
-                        case -1:
-                            c = Cursors.SizeNS;
-                            transform = TransformTypes.N;
-                            //the origin is the center-bottom of the rectangle
-                            ox = this.Controller.View.Tracker.Rectangle.Left + ViewBase.TrackerOffset;// +this.Controller.View.Tracker.Rectangle.Width / 2;
-                            oy = this.Controller.View.Tracker.Rectangle.Bottom - ViewBase.TrackerOffset;
-                            gripHit = true;
-                            break;
-                        case 1:
-                            c = Cursors.SizeNS;
-                            transform = TransformTypes.S;
-                            //the origin is the left-top of the rectangle
-                            ox = this.Controller.View.Tracker.Rectangle.Left + ViewBase.TrackerOffset;// +this.Controller.View.Tracker.Rectangle.Width / 2;
-                            oy = this.Controller.View.Tracker.Rectangle.Top + ViewBase.TrackerOffset;
-                            gripHit = true;
-                            break;
-                    }
-                    break;
-                case 1:
-                    switch (gripPoint.Y)
-                    {
-                        case -1:
-                            c = Cursors.SizeNESW;
-                            transform = TransformTypes.NE;
-                            //the origin is the left-bottom of the rectangle
-                            ox = this.Controller.View.Tracker.Rectangle.Left + ViewBase.TrackerOffset;
-                            oy = this.Controller.View.Tracker.Rectangle.Bottom - ViewBase.TrackerOffset;
-                            gripHit = true;
-                            break;
-                        case 0:
-                            c = Cursors.SizeWE;
-                            transform = TransformTypes.E;
-                            //the origin is the left-top of the rectangle
-                            ox = this.Controller.View.Tracker.Rectangle.Left + ViewBase.TrackerOffset;// +this.Controller.View.Tracker.Rectangle.Width / 2;
-                            oy = this.Controller.View.Tracker.Rectangle.Top + ViewBase.TrackerOffset;
-                            gripHit = true;
-                            break;
-                        case 1:
-                            c = Cursors.SizeNWSE;
-                            transform = TransformTypes.SE;
-                            //the origin is the left-top of the tracker rectangle plus the little tracker offset
-                            ox = this.Controller.View.Tracker.Rectangle.X + ViewBase.TrackerOffset;
-                            oy = this.Controller.View.Tracker.Rectangle.Y + ViewBase.TrackerOffset;
-
-                            gripHit = true;
-                            break;
-                    }
-                    break;
-            }
-
-            #endregion
-
-            if (gripHit)
-            {
-                if (Cursor != c)
-                {
-                    previousCursor = Cursor;
-                    Cursor = c;
-                    cursorChanged = true;
-                }
-            }
-            else if (cursorChanged)
-            {
-                Cursor = Cursors.Default;
-                previousCursor = null;
-                cursorChanged = false;
-            }
-            return gripHit;
+        #region Scale the selected entities
+
+        //block scaling below some minimum
+        if (lastLength <= 70 && sign == -1) {
+          return;
         }
 
-        void UpdateState(MouseEventArgs e)
-        {            
-            changing = false;
-            changing = UpdateCursor(e);            
+        // No need to use the rounding Convert method since the ox and 
+        // oy doubles are really integers, but the calculations above 
+        // requires double data types.
+        origin = new Point(Convert.ToInt32(ox), Convert.ToInt32(oy));
+
+        //update the location of the last point
+        lastPoint.Offset(Convert.ToInt32(rx), Convert.ToInt32(ry));
+
+        TransformCommand.Transform(origin, scalex, scaley, transformers);
+
+        #endregion
+
+        // Since we use the flattened selection the group shapes 
+        // are unaware of the resize, so we have to recalculate 
+        // the group rectangles.
+        foreach (IDiagramEntity entity in this.Controller.Model.Selection.SelectedItems) {
+          //the calculation will cascade to subgroups if necessary
+          if (entity is IGroup) {
+            (entity as IGroup).CalculateRectangle();
+          }
         }
-
-        // ------------------------------------------------------------------
-        /// <summary>
-        /// Handles the mouse down event.
-        /// </summary>
-        /// <param name="e">The 
-        /// <see cref="T:System.Windows.Forms.MouseEventArgs"/> instance 
-        /// containing the event data.</param>
-        public bool MouseDown(MouseEventArgs e)
-        {
-            if (e == null)
-            {
-                throw new ArgumentNullException(
-                    "The argument object is 'null'");
-            }
-
-            if (e.Button == MouseButtons.Left && Enabled && !IsSuspended &&
-                (Controller.View.Tracker != null) )
-            {
-
-              if (this.Controller.Model.Selection.SelectedItems.Count > 0)
-                {                    
-                    UpdateState(e);
-
-                    if (changing)
-                    {
-                        #region Changing/transforming
-                        //the point where the scaling or dragging of the tracker started
-                        initialPoint = e.Location;
-                        //recursive location of the dragging location
-                        lastPoint = initialPoint;
-
-                        // The base class captures the current cursor when the
-                        // tool is initialized and sets the View's cursor to
-                        // that cursor when this tool is deactivated.  So, first
-                        // restore the cursor to the "selection cursor", then
-                        // change it back again.
-                        Cursor c = Cursor;
-                        Controller.View.CurrentCursor = Cursors.Default;
-                        this.ActivateTool();
-                        Cursor = c;
-                        //set the cursor corresponding to the grip
-                        //Controller.View.CurrentCursor = c;
-                        //create a new collection for the transforming entities
-                        transformers = new Hashtable();
-                        //the points of the connectors
-                        Point[] points = null;
-                        //the entity bone
-                        EntityBone bone;
-                        //take the flat selection and keep the current state as a reference for the transformation
-                        //until the mouseup pins down the final scaling
-                        foreach (IDiagramEntity entity in this.Controller.Model.Selection.FlattenedSelectionItems)
-                        {
-                            if (!entity.Resizable) continue;//only take what's resizable
-
-                            bone = new EntityBone();
-
-                            if (entity is IShape)
-                            { 
-                                IShape shape = entity as IShape;
-                                if (shape.Connectors.Count > 0)
-                                {
-                                    points = new Point[shape.Connectors.Count];
-                                    for (int m = 0; m < shape.Connectors.Count; m++)
-                                    {
-                                        points[m] = shape.Connectors[m].Point;
-                                    }
-                                }
-                                else
-                                    points = null;
-                                bone.Rectangle = entity.Rectangle;
-                                bone.ConnectorPoints = points;
-                            }
-                            else if (entity is IConnection)
-                            {
-                                IConnection con = entity as IConnection;
-                                points = new Point[2] { Point.Empty, Point.Empty };
-                                //Only non-attached connection connectors have to be scaled
-                                //Attached connectors will move with their parent.
-                                if (con.From.AttachedTo == null)
-                                    points[0] = con.From.Point;
-                                if (con.To.AttachedTo == null)
-                                    points[1] = con.To.Point;
-                                //We define a connection as a bone with empty rectangle
-                                //One could use some additional members to label it but it's only overhead at this point.
-                                bone.Rectangle = Rectangle.Empty;
-                                bone.ConnectorPoints = points;
-                            }
-                            transformers.Add(entity, bone);
-                        }
-                        #endregion
-
-                        return true;
-                    }
-                }
-
-            }
-            return false;
-        }
-
-        // ------------------------------------------------------------------
-        /// <summary>
-        /// Resizes the selected entities. 
-        /// <remarks>The whole logic and geometry behind the resizing is 
-        /// quite involved, there is a detailed Visio diagram showing the 
-        /// elements of the calculations and how the various switch cases 
-        /// are linked together.
-        /// </remarks>
-        /// </summary>
-        /// <param name="e">The 
-        /// <see cref="T:System.Windows.Forms.MouseEventArgs"/> instance 
-        /// containing the event data.</param>
-        // ------------------------------------------------------------------
-        public void MouseMove(MouseEventArgs e)
-        {
-            #region Checking the incoming data
-            if (e == null)
-                throw new ArgumentNullException("The argument object is 'null'");
-            #endregion
-
-            if ( (!IsActive) && (Controller.ActiveTool == null) )
-            {
-                UpdateCursor(e);
-            }
-
-            #region Definition to make the code more readable
-
-            //some annoying but necessary type conversions here to double precision
-            double lastLength = 0; //the diagonal length of the current rectangle we are resizing
-            double eX = e.X, eY = e.Y; //the vector corresponding to the mouse location
-            double lx = lastPoint.X, ly = lastPoint.Y; // the lastpoint vector
-            double iX = initialPoint.X, iY = initialPoint.Y; // the vactor when the motion started
-
-            double mx, my; //the motion vector
-            double rx = 0, ry = 0; //the resulting vector
-            
-            double sign = 1;
-            #endregion
-
-            if (IsActive)
-            {
-
-                #region The current motion vector is computed
-                mx = eX - lx;
-                my = eY - ly;
-                #endregion
-
-                #region Switching between the different compass directions of the grips
-                //the transform is the compass direction of the grip used to resize the entities
-                switch (transform)
-                {
-                    #region NW
-                    case TransformTypes.NW:
-
-
-
-                        //the region above the X-Y=0 diagonal uses the horizontal to project the motion vector onto the diagonal
-                        if (mx - my < 0)
-                        {
-                            scale = (ox - (double)e.X) / (ox - (double)initialPoint.X);
-                        }
-                        else
-                        {
-                            scale = (oy - (double)e.Y) / (oy - (double)initialPoint.Y);
-                        }
-                        //now we can pass the info the the scaling method of the selected entities
-                        scalex = scale;
-                        scaley = scale;
-                        break;
-                    #endregion
-
-                    #region N
-                    case TransformTypes.N:
-                        //remember that the coordinate system has its Y-axis pointing downwards                        
-                        scale = (oy - (double)e.Y) / (oy - (double)initialPoint.Y);
-
-                        //now we can pass the info the the scaling method of the selected entities
-                        scalex = 1F;
-                        scaley = scale;
-                        break;
-                    #endregion
-
-                    #region NE
-                    case TransformTypes.NE:
-                        //the region above the X-Y=0 diagonal uses the horizontal to project the motion vector onto the diagonal
-                        if (mx + my > 0)
-                        {
-                            scale = ((double)e.X - ox) / ((double)initialPoint.X - ox);
-
-                        }
-                        else
-                        {
-                            scale = ((double)e.Y - oy) / ((double)initialPoint.Y - oy);
-
-                        }
-                        //now we can pass the info the the scaling method of the selected entities
-                        scalex = scale;
-                        scaley = scale;
-                        break;
-                    #endregion
-
-                    #region E
-                    case TransformTypes.E:
-                        //remember that the coordinate system has its Y-axis pointing downwards                        
-                        scale = ((double)e.X - ox) / ((double)initialPoint.X - ox);
-
-                        //now we can pass the info the the scaling method of the selected entities
-                        scalex = scale;
-                        scaley = 1F;
-                        break;
-                    #endregion
-
-                    #region SE
-                    case TransformTypes.SE:
-                        //I'd call this the Visio effect...
-                        if (mx - my > 0)
-                        {
-                            scale = ((double)e.X - ox) / ((double)initialPoint.X - ox);
-                        }
-                        else
-                            scale = ((double)e.Y - oy) / ((double)initialPoint.Y - oy);
-
-                        scalex = scale;
-                        scaley = scale;
-                        break;
-                    #endregion
-
-                    #region S
-                    case TransformTypes.S:
-                        //remember that the coordinate system has its Y-axis pointing downwards                        
-                        scale = ((double)e.Y - oy) / ((double)initialPoint.Y - oy);
-
-                        //now we can pass the info the the scaling method of the selected entities
-                        scalex = 1F;
-                        scaley = scale;
-                        break;
-                    #endregion
-
-                    #region SW
-                    case TransformTypes.SW:
-
-                        //the region above the X-Y=0 diagonal uses the horizontal to project the motion vector onto the diagonal
-                        if (mx + my < 0)
-                        {
-                            scale = ((double)e.X - ox) / ((double)initialPoint.X - ox);
-                        }
-                        else
-                        {
-                            scale = ((double)e.Y - oy) / ((double)initialPoint.Y - oy);
-
-                        }
-                        //now we can pass the info the the scaling method of the selected entities
-                        scalex = scale;
-                        scaley = scale;
-                        break;
-                    #endregion
-
-                    #region W
-                    case TransformTypes.W:
-                        //remember that the coordinate system has its Y-axis pointing downwards                        
-                        scale = (ox - (double)e.X) / (ox - (double)initialPoint.X);
-
-                        //now we can pass the info the the scaling method of the selected entities
-                        scalex = scale;
-                        scaley = 1F;
-                        break;
-                    #endregion
-
-                }
-                #endregion
-
-                #region Scale the selected entities
-
-                //block scaling below some minimum
-                if (lastLength <= 70 && sign == -1)
-                {
-                    return;
-                }
-
-                // No need to use the rounding Convert method since the ox and 
-                // oy doubles are really integers, but the calculations above 
-                // requires double data types.
-                origin = new Point(Convert.ToInt32(ox), Convert.ToInt32(oy));
-
-                //update the location of the last point
-                lastPoint.Offset(Convert.ToInt32(rx), Convert.ToInt32(ry));
-
-                TransformCommand.Transform(origin, scalex, scaley, transformers);
-
-                #endregion
-
-                // Since we use the flattened selection the group shapes 
-                // are unaware of the resize, so we have to recalculate 
-                // the group rectangles.
-                foreach (IDiagramEntity entity in this.Controller.Model.Selection.SelectedItems)
-                {
-                    //the calculation will cascade to subgroups if necessary
-                    if (entity is IGroup)
-                    {
-                        (entity as IGroup).CalculateRectangle();
-                    }
-                }
-                //update the state of the tracker, i.e show it again and it'll be recalculated
-                this.Controller.View.ShowTracker();
-            }
-        }
-
-
-        public void MouseUp(MouseEventArgs e)
-        {
-            if (IsActive)
-            {
-                DeactivateTool();
-                //Controller.View.CurrentCursor = Cursors.Default;
-                cursorChanged = false;
-                previousCursor = null;
-                TransformCommand cmd = new TransformCommand(
-                    this.Controller, 
-                    origin, 
-                    scalex,
-                    scaley, 
-                    transformers);
-                this.Controller.UndoManager.AddUndoCommand(cmd);
-            }
-        }
-        #endregion
-
-        #region Structure
-
-        #endregion
-    }
+        //update the state of the tracker, i.e show it again and it'll be recalculated
+        this.Controller.View.ShowTracker();
+      }
+    }
+
+
+    public void MouseUp(MouseEventArgs e) {
+      if (IsActive) {
+        DeactivateTool();
+        //Controller.View.CurrentCursor = Cursors.Default;
+        cursorChanged = false;
+        previousCursor = null;
+        TransformCommand cmd = new TransformCommand(
+            this.Controller,
+            origin,
+            scalex,
+            scaley,
+            transformers);
+        this.Controller.UndoManager.AddUndoCommand(cmd);
+      }
+    }
+    #endregion
+
+    #region Structure
+
+    #endregion
+  }
 
 
Index: /trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.Netron/3.0.2672.12446/Netron.Diagramming.Core-3.0.2672.12446/Tools/UngroupTool.cs
===================================================================
--- /trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.Netron/3.0.2672.12446/Netron.Diagramming.Core-3.0.2672.12446/Tools/UngroupTool.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.Netron/3.0.2672.12446/Netron.Diagramming.Core-3.0.2672.12446/Tools/UngroupTool.cs	(revision 4068)
@@ -1,92 +1,78 @@
-using System;
-using System.Diagnostics;
-using System.Collections;
-using System.Drawing;
 using System.Windows.Forms;
 
-namespace Netron.Diagramming.Core
-{
+namespace Netron.Diagramming.Core {
+  /// <summary>
+  /// Group tool
+  /// </summary>
+  class UngroupTool : AbstractTool, IMouseListener {
+
+    #region Fields
+
+    #endregion
+
+    #region Constructor
     /// <summary>
-    /// Group tool
+    /// Initializes a new instance of the <see cref="T:UngroupTool"/> class.
     /// </summary>
-    class UngroupTool : AbstractTool, IMouseListener
-    {
+    /// <param name="name">The name of the tool.</param>
+    public UngroupTool(string name)
+      : base(name) {
+    }
+    #endregion
 
-        #region Fields
-       
-        #endregion
+    #region Methods
 
-        #region Constructor
-        /// <summary>
-        /// Initializes a new instance of the <see cref="T:UngroupTool"/> class.
-        /// </summary>
-        /// <param name="name">The name of the tool.</param>
-        public UngroupTool(string name) : base(name)
-        { 
-        }
-        #endregion
+    /// <summary>
+    /// Called when the tool is activated.
+    /// </summary>
+    protected override void OnActivateTool() {
+      bool valid = true;
 
-        #region Methods
+      #region Validation of the selection
 
-        /// <summary>
-        /// Called when the tool is activated.
-        /// </summary>
-        protected override void OnActivateTool()
-        {
-            bool valid = true;
-            
-            #region Validation of the selection
-            
-            //make sure we have the correct stuff on the table
-            if (this.Controller.Model.Selection.SelectedItems == null || this.Controller.Model.Selection.SelectedItems.Count == 0)
-            {
-                MessageBox.Show("Nothing is selected, you need to select an existing group.", "Nothing selected.", MessageBoxButtons.OK, MessageBoxIcon.Hand);
-                valid = false;                
-            } else if (this.Controller.Model.Selection.SelectedItems.Count != 1)
-            {
-                MessageBox.Show("Multiple items are selected, select only one group.", "Multiple items", MessageBoxButtons.OK, MessageBoxIcon.Hand);
-                valid = false;
-            } else if (!(this.Controller.Model.Selection.SelectedItems[0] is IGroup))
-            {
-                MessageBox.Show("The selected item is not a group.", "Not a group.", MessageBoxButtons.OK, MessageBoxIcon.Hand);
-                valid = false;
-            }
-            #endregion
+      //make sure we have the correct stuff on the table
+      if (this.Controller.Model.Selection.SelectedItems == null || this.Controller.Model.Selection.SelectedItems.Count == 0) {
+        MessageBox.Show("Nothing is selected, you need to select an existing group.", "Nothing selected.", MessageBoxButtons.OK, MessageBoxIcon.Hand);
+        valid = false;
+      } else if (this.Controller.Model.Selection.SelectedItems.Count != 1) {
+        MessageBox.Show("Multiple items are selected, select only one group.", "Multiple items", MessageBoxButtons.OK, MessageBoxIcon.Hand);
+        valid = false;
+      } else if (!(this.Controller.Model.Selection.SelectedItems[0] is IGroup)) {
+        MessageBox.Show("The selected item is not a group.", "Not a group.", MessageBoxButtons.OK, MessageBoxIcon.Hand);
+        valid = false;
+      }
+      #endregion
 
-            if (valid)
-            {
-              UngroupCommand cmd = new UngroupCommand(this.Controller, this.Controller.Model.Selection.SelectedItems[0] as IGroup);
-                this.Controller.UndoManager.AddUndoCommand(cmd);
-                cmd.Redo();
-            }
-             DeactivateTool();
-             return;
-        }
-
-        /// <summary>
-        /// Handles the mouse down event
-        /// </summary>
-        /// <param name="e">The <see cref="T:System.Windows.Forms.MouseEventArgs"/> instance containing the event data.</param>
-        public bool MouseDown(MouseEventArgs e)
-        {
-            return false;
-        }
-
-        /// <summary>
-        /// Handles the mouse move event
-        /// </summary>
-        /// <param name="e">The <see cref="T:System.Windows.Forms.MouseEventArgs"/> instance containing the event data.</param>
-        public void MouseMove(MouseEventArgs e)
-        {
-           
-        }
-        public void MouseUp(MouseEventArgs e)
-        {
-            
-        }
-        #endregion
-
-      
+      if (valid) {
+        UngroupCommand cmd = new UngroupCommand(this.Controller, this.Controller.Model.Selection.SelectedItems[0] as IGroup);
+        this.Controller.UndoManager.AddUndoCommand(cmd);
+        cmd.Redo();
+      }
+      DeactivateTool();
+      return;
     }
 
+    /// <summary>
+    /// Handles the mouse down event
+    /// </summary>
+    /// <param name="e">The <see cref="T:System.Windows.Forms.MouseEventArgs"/> instance containing the event data.</param>
+    public bool MouseDown(MouseEventArgs e) {
+      return false;
+    }
+
+    /// <summary>
+    /// Handles the mouse move event
+    /// </summary>
+    /// <param name="e">The <see cref="T:System.Windows.Forms.MouseEventArgs"/> instance containing the event data.</param>
+    public void MouseMove(MouseEventArgs e) {
+
+    }
+    public void MouseUp(MouseEventArgs e) {
+
+    }
+    #endregion
+
+
+  }
+
 }
Index: /trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.Netron/3.0.2672.12446/Netron.Diagramming.Core-3.0.2672.12446/Tools/ZoomAreaTool.cs
===================================================================
--- /trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.Netron/3.0.2672.12446/Netron.Diagramming.Core-3.0.2672.12446/Tools/ZoomAreaTool.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.Netron/3.0.2672.12446/Netron.Diagramming.Core-3.0.2672.12446/Tools/ZoomAreaTool.cs	(revision 4068)
@@ -1,139 +1,124 @@
 using System;
-using System.Collections.Generic;
-using System.Text;
+using System.Drawing;
 using System.Windows.Forms;
-using System.Drawing;
 
-namespace Netron.Diagramming.Core
-{
-    // ----------------------------------------------------------------------
+namespace Netron.Diagramming.Core {
+  // ----------------------------------------------------------------------
+  /// <summary>
+  /// Allows the user to zoom in to a user-drawn rectangle area.
+  /// </summary>
+  // ----------------------------------------------------------------------
+  public class ZoomAreaTool : AbstractTool, IMouseListener {
+    #region Fields
+
+    // ------------------------------------------------------------------
     /// <summary>
-    /// Allows the user to zoom in to a user-drawn rectangle area.
+    /// The location of the mouse when the motion starts.
     /// </summary>
-    // ----------------------------------------------------------------------
-    public class ZoomAreaTool : AbstractTool, IMouseListener
-    {
-        #region Fields
+    // ------------------------------------------------------------------
+    protected Point initialPoint;
 
-        // ------------------------------------------------------------------
-        /// <summary>
-        /// The location of the mouse when the motion starts.
-        /// </summary>
-        // ------------------------------------------------------------------
-        protected Point initialPoint;
+    // ------------------------------------------------------------------
+    /// <summary>
+    /// Says whether the startingPoint was set, otherwise the ghost will 
+    /// appear even before an initial point was set!
+    /// </summary>
+    // ------------------------------------------------------------------
+    protected bool started;
 
-        // ------------------------------------------------------------------
-        /// <summary>
-        /// Says whether the startingPoint was set, otherwise the ghost will 
-        /// appear even before an initial point was set!
-        /// </summary>
-        // ------------------------------------------------------------------
-        protected bool started;
+    #endregion
 
-        #endregion
+    // ------------------------------------------------------------------
+    /// <summary>
+    /// Constructor.
+    /// </summary>
+    /// <param name="toolName">string: The  name of the tool.</param>
+    // ------------------------------------------------------------------
+    public ZoomAreaTool(string toolName)
+      : base(toolName) {
+    }
 
-        // ------------------------------------------------------------------
-        /// <summary>
-        /// Constructor.
-        /// </summary>
-        /// <param name="toolName">string: The  name of the tool.</param>
-        // ------------------------------------------------------------------
-        public ZoomAreaTool(string toolName)
-            : base(toolName)
-        {
+    #region Methods
+
+    // ------------------------------------------------------------------
+    /// <summary>
+    /// Called when the tool is activated.
+    /// </summary>
+    // ------------------------------------------------------------------
+    protected override void OnActivateTool() {
+      base.OnActivateTool();
+      Controller.View.CurrentCursor = CursorPalette.Cross;
+    }
+
+    // ------------------------------------------------------------------
+    /// <summary>
+    /// Handles the mouse down event
+    /// </summary>
+    /// <param name="e">The 
+    /// <see cref="T:System.Windows.Forms.MouseEventArgs"/> instance 
+    /// containing the event data.</param>
+    // ------------------------------------------------------------------
+    public bool MouseDown(MouseEventArgs e) {
+      if (e == null) {
+        throw new ArgumentNullException(
+            "The argument object is 'null'");
+      }
+
+      if (e.Button == MouseButtons.Left && IsActive && !IsSuspended) {
+        initialPoint = e.Location;
+        started = true;
+        return true; // This tells the tool-loop to stop looking 
+        // for another handler, which keeps the CPU low.
+
+      }
+      return false;
+    }
+
+    // ------------------------------------------------------------------
+    /// <summary>
+    /// Handles the mouse move event
+    /// </summary>
+    /// <param name="e">The 
+    /// <see cref="T:System.Windows.Forms.MouseEventArgs"/> instance 
+    /// containing the event data.</param>
+    // ------------------------------------------------------------------
+    public void MouseMove(MouseEventArgs e) {
+      if (e == null) {
+        throw new ArgumentNullException(
+            "The argument object is 'null'");
+      }
+      if (IsActive && !IsSuspended && started) {
+        IView view = this.Controller.View;
+        Point point = e.Location;
+
+        Controller.View.PaintGhostRectangle(initialPoint, point);
+        Rectangle area = System.Drawing.Rectangle.Inflate(
+            Controller.View.Ghost.Rectangle, 20, 20);
+
+        Controller.View.Invalidate(area);
+      }
+    }
+
+    // ------------------------------------------------------------------
+    /// <summary>
+    /// Handles the mouse up event.
+    /// </summary>
+    /// <param name="e">The 
+    /// <see cref="T:System.Windows.Forms.MouseEventArgs"/> instance 
+    /// containing the event data.</param>
+    // ------------------------------------------------------------------
+    public void MouseUp(MouseEventArgs e) {
+      if (IsActive) {
+        IView view = Controller.View;
+        if (view.Ghost != null) {
+          Rectangle zoomArea = view.Ghost.Rectangle;
+          view.ZoomArea(zoomArea);
+          started = false;
         }
+        Controller.View.ResetGhost();
+      }
+    }
 
-        #region Methods
-
-        // ------------------------------------------------------------------
-        /// <summary>
-        /// Called when the tool is activated.
-        /// </summary>
-        // ------------------------------------------------------------------
-        protected override void OnActivateTool()
-        {
-            base.OnActivateTool();
-            Controller.View.CurrentCursor = CursorPalette.Cross;
-        }
-
-        // ------------------------------------------------------------------
-        /// <summary>
-        /// Handles the mouse down event
-        /// </summary>
-        /// <param name="e">The 
-        /// <see cref="T:System.Windows.Forms.MouseEventArgs"/> instance 
-        /// containing the event data.</param>
-        // ------------------------------------------------------------------
-        public bool MouseDown(MouseEventArgs e)
-        {
-            if (e == null)
-            {
-                throw new ArgumentNullException(
-                    "The argument object is 'null'");
-            }
-
-            if (e.Button == MouseButtons.Left && IsActive && !IsSuspended)
-            {
-                initialPoint = e.Location;
-                started = true;
-                return true; // This tells the tool-loop to stop looking 
-                             // for another handler, which keeps the CPU low.
-
-            }
-            return false;
-        }
-
-        // ------------------------------------------------------------------
-        /// <summary>
-        /// Handles the mouse move event
-        /// </summary>
-        /// <param name="e">The 
-        /// <see cref="T:System.Windows.Forms.MouseEventArgs"/> instance 
-        /// containing the event data.</param>
-        // ------------------------------------------------------------------
-        public void MouseMove(MouseEventArgs e)
-        {
-            if (e == null)
-            {
-                throw new ArgumentNullException(
-                    "The argument object is 'null'");
-            }
-            if (IsActive && !IsSuspended && started)
-            {
-                IView view = this.Controller.View;
-                Point point = e.Location;
-
-                Controller.View.PaintGhostRectangle(initialPoint, point);
-                Rectangle area = System.Drawing.Rectangle.Inflate(
-                    Controller.View.Ghost.Rectangle, 20, 20);
-
-                Controller.View.Invalidate(area);
-            }
-        }
-
-        // ------------------------------------------------------------------
-        /// <summary>
-        /// Handles the mouse up event.
-        /// </summary>
-        /// <param name="e">The 
-        /// <see cref="T:System.Windows.Forms.MouseEventArgs"/> instance 
-        /// containing the event data.</param>
-        // ------------------------------------------------------------------
-        public void MouseUp(MouseEventArgs e)
-        {
-            if (IsActive)
-            {
-                IView view = Controller.View;
-                if (view.Ghost != null)
-                {
-                    Rectangle zoomArea = view.Ghost.Rectangle;
-                    view.ZoomArea(zoomArea);
-                    started = false;
-                }
-                Controller.View.ResetGhost();
-            }
-        }
-
-        #endregion
-    }
+    #endregion
+  }
 }
Index: /trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.Netron/3.0.2672.12446/Netron.Diagramming.Core-3.0.2672.12446/Tools/ZoomInTool.cs
===================================================================
--- /trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.Netron/3.0.2672.12446/Netron.Diagramming.Core-3.0.2672.12446/Tools/ZoomInTool.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.Netron/3.0.2672.12446/Netron.Diagramming.Core-3.0.2672.12446/Tools/ZoomInTool.cs	(revision 4068)
@@ -1,28 +1,21 @@
-using System;
-using System.Collections.Generic;
-using System.Text;
-using System.Drawing;
 
-namespace Netron.Diagramming.Core
-{
-    // ----------------------------------------------------------------------
+namespace Netron.Diagramming.Core {
+  // ----------------------------------------------------------------------
+  /// <summary>
+  /// Allows the user to incrementally adjust (increase) the magnification.
+  /// </summary>
+  // ----------------------------------------------------------------------
+  public class ZoomInTool : ZoomToolBase {
+    // ------------------------------------------------------------------
     /// <summary>
-    /// Allows the user to incrementally adjust (increase) the magnification.
+    /// Constructor.
     /// </summary>
-    // ----------------------------------------------------------------------
-    public class ZoomInTool : ZoomToolBase
-    {
-        // ------------------------------------------------------------------
-        /// <summary>
-        /// Constructor.
-        /// </summary>
-        /// <param name="toolName">string: The  name of the tool.</param>
-        // ------------------------------------------------------------------
-        public ZoomInTool(string toolName)
-            : base(toolName)
-        {
-            // Increase the magnification by a little to zoom in.
-            base.myZoomFactor = 1.1F;
-        }
+    /// <param name="toolName">string: The  name of the tool.</param>
+    // ------------------------------------------------------------------
+    public ZoomInTool(string toolName)
+      : base(toolName) {
+      // Increase the magnification by a little to zoom in.
+      base.myZoomFactor = 1.1F;
     }
+  }
 }
Index: /trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.Netron/3.0.2672.12446/Netron.Diagramming.Core-3.0.2672.12446/Tools/ZoomOutTool.cs
===================================================================
--- /trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.Netron/3.0.2672.12446/Netron.Diagramming.Core-3.0.2672.12446/Tools/ZoomOutTool.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.Netron/3.0.2672.12446/Netron.Diagramming.Core-3.0.2672.12446/Tools/ZoomOutTool.cs	(revision 4068)
@@ -1,28 +1,21 @@
-using System;
-using System.Collections.Generic;
-using System.Text;
-using System.Drawing;
 
-namespace Netron.Diagramming.Core
-{
-    // ----------------------------------------------------------------------
+namespace Netron.Diagramming.Core {
+  // ----------------------------------------------------------------------
+  /// <summary>
+  /// Allows the user to incrementally adjust (increase) the magnification.
+  /// </summary>
+  // ----------------------------------------------------------------------
+  public class ZoomOutTool : ZoomToolBase {
+    // ------------------------------------------------------------------
     /// <summary>
-    /// Allows the user to incrementally adjust (increase) the magnification.
+    /// Constructor.
     /// </summary>
-    // ----------------------------------------------------------------------
-    public class ZoomOutTool : ZoomToolBase
-    {
-        // ------------------------------------------------------------------
-        /// <summary>
-        /// Constructor.
-        /// </summary>
-        /// <param name="toolName">string: The  name of the tool.</param>
-        // ------------------------------------------------------------------
-        public ZoomOutTool(string toolName)
-            : base(toolName)
-        {
-            // Decrease the magnification by a little to zoom out.
-            base.myZoomFactor = 0.9F;
-        }
+    /// <param name="toolName">string: The  name of the tool.</param>
+    // ------------------------------------------------------------------
+    public ZoomOutTool(string toolName)
+      : base(toolName) {
+      // Decrease the magnification by a little to zoom out.
+      base.myZoomFactor = 0.9F;
     }
+  }
 }
Index: /trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.Netron/3.0.2672.12446/Netron.Diagramming.Core-3.0.2672.12446/Tools/ZoomToolBase.cs
===================================================================
--- /trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.Netron/3.0.2672.12446/Netron.Diagramming.Core-3.0.2672.12446/Tools/ZoomToolBase.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.Netron/3.0.2672.12446/Netron.Diagramming.Core-3.0.2672.12446/Tools/ZoomToolBase.cs	(revision 4068)
@@ -1,103 +1,92 @@
-using System;
-using System.Collections.Generic;
-using System.Text;
 using System.Drawing;
 
-namespace Netron.Diagramming.Core
-{
-    // ----------------------------------------------------------------------
+namespace Netron.Diagramming.Core {
+  // ----------------------------------------------------------------------
+  /// <summary>
+  /// The base class for zooming tools.  Zoom tools allow the user to 
+  /// incrementally adjust (increase or decrease) the View's magnification.
+  /// </summary>
+  // ----------------------------------------------------------------------
+  public class ZoomToolBase : AbstractTool {
+    // ------------------------------------------------------------------
     /// <summary>
-    /// The base class for zooming tools.  Zoom tools allow the user to 
-    /// incrementally adjust (increase or decrease) the View's magnification.
+    /// Used to multiply the current magnification by.
     /// </summary>
-    // ----------------------------------------------------------------------
-    public class ZoomToolBase : AbstractTool
-    {
-        // ------------------------------------------------------------------
-        /// <summary>
-        /// Used to multiply the current magnification by.
-        /// </summary>
-        // ------------------------------------------------------------------
-        protected float myZoomFactor = 0.9F;
+    // ------------------------------------------------------------------
+    protected float myZoomFactor = 0.9F;
 
-        // ------------------------------------------------------------------
-        /// <summary>
-        /// Gets or sets the multiplier used to adjust the View's
-        /// Magnification by.  The default is 0.9.
-        /// </summary>
-        // ------------------------------------------------------------------
-        public float ZoomFactor
-        {
-            get
-            {
-                return myZoomFactor;
-            }
-            set
-            {
-                myZoomFactor = value;
-            }
-        }
+    // ------------------------------------------------------------------
+    /// <summary>
+    /// Gets or sets the multiplier used to adjust the View's
+    /// Magnification by.  The default is 0.9.
+    /// </summary>
+    // ------------------------------------------------------------------
+    public float ZoomFactor {
+      get {
+        return myZoomFactor;
+      }
+      set {
+        myZoomFactor = value;
+      }
+    }
 
-        // ------------------------------------------------------------------
-        /// <summary>
-        /// Constructor.
-        /// </summary>
-        /// <param name="toolName">string: The  name of the tool.</param>
-        // ------------------------------------------------------------------
-        public ZoomToolBase(string toolName)
-            : base(toolName)
-        {
-        }
+    // ------------------------------------------------------------------
+    /// <summary>
+    /// Constructor.
+    /// </summary>
+    /// <param name="toolName">string: The  name of the tool.</param>
+    // ------------------------------------------------------------------
+    public ZoomToolBase(string toolName)
+      : base(toolName) {
+    }
 
-        // ------------------------------------------------------------------
-        /// <summary>
-        /// Activates this tool - the View's current magnification is
-        /// mulitiplied by 'ZoomFactor'.
-        /// </summary>
-        // ------------------------------------------------------------------
-        protected override void OnActivateTool()
-        {
-            base.OnActivateTool();
+    // ------------------------------------------------------------------
+    /// <summary>
+    /// Activates this tool - the View's current magnification is
+    /// mulitiplied by 'ZoomFactor'.
+    /// </summary>
+    // ------------------------------------------------------------------
+    protected override void OnActivateTool() {
+      base.OnActivateTool();
 
-            SizeF size = Controller.View.Magnification;
-            SizeF autoScrollMinSize =
-                Controller.ParentControl.AutoScrollMinSize;
-            Point origin = Controller.View.Origin;
-            Point parentAutoScrollPosition = 
-                Controller.ParentControl.AutoScrollPosition;
+      SizeF size = Controller.View.Magnification;
+      SizeF autoScrollMinSize =
+          Controller.ParentControl.AutoScrollMinSize;
+      Point origin = Controller.View.Origin;
+      Point parentAutoScrollPosition =
+          Controller.ParentControl.AutoScrollPosition;
 
-            Controller.View.Magnification = new SizeF(
-                size.Width * myZoomFactor,
-                size.Height * myZoomFactor);
+      Controller.View.Magnification = new SizeF(
+          size.Width * myZoomFactor,
+          size.Height * myZoomFactor);
 
-            // Remember to also adjust the diagram's scroll bars.
-            size = new SizeF(
-                autoScrollMinSize.Width * myZoomFactor,
-                autoScrollMinSize.Height * myZoomFactor);
-            Controller.ParentControl.AutoScrollMinSize = Size.Round(size);
+      // Remember to also adjust the diagram's scroll bars.
+      size = new SizeF(
+          autoScrollMinSize.Width * myZoomFactor,
+          autoScrollMinSize.Height * myZoomFactor);
+      Controller.ParentControl.AutoScrollMinSize = Size.Round(size);
 
-            // Should we set the Origin to the location of the selected items
-            // if there are any?  This will allow the user to zoom in on
-            // a selection.
-            if (this.Controller.Model.Selection.SelectedItems.Count > 0)
-            {
-              Bundle bundle = new Bundle(this.Controller.Model.Selection.SelectedItems);
-                Point bundleLocation = bundle.Rectangle.Location;
+      // Should we set the Origin to the location of the selected items
+      // if there are any?  This will allow the user to zoom in on
+      // a selection.
+      if (this.Controller.Model.Selection.SelectedItems.Count > 0) {
+        Bundle bundle = new Bundle(this.Controller.Model.Selection.SelectedItems);
+        Point bundleLocation = bundle.Rectangle.Location;
 
-                // Don't move the origin *exactly* to the bundle's location.
-                // Offset it a little so the bundle is butted-up with the
-                // upper-right hand corner of the screen.
-                bundleLocation.Offset(-20, -20);
-                origin.Offset(Point.Round(Controller.View.WorldToView(
-                    bundleLocation)));
+        // Don't move the origin *exactly* to the bundle's location.
+        // Offset it a little so the bundle is butted-up with the
+        // upper-right hand corner of the screen.
+        bundleLocation.Offset(-20, -20);
+        origin.Offset(Point.Round(Controller.View.WorldToView(
+            bundleLocation)));
 
-                Controller.View.Origin = origin;
-            }
+        Controller.View.Origin = origin;
+      }
 
-            Controller.ParentControl.AutoScrollPosition =
-                Controller.View.Origin;
+      Controller.ParentControl.AutoScrollPosition =
+          Controller.View.Origin;
 
-            DeactivateTool();
-        }
+      DeactivateTool();
     }
+  }
 }
Index: /trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.Netron/3.0.2672.12446/Netron.Diagramming.Core-3.0.2672.12446/UI/DiagramControlBase.cs
===================================================================
--- /trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.Netron/3.0.2672.12446/Netron.Diagramming.Core-3.0.2672.12446/UI/DiagramControlBase.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.Netron/3.0.2672.12446/Netron.Diagramming.Core-3.0.2672.12446/UI/DiagramControlBase.cs	(revision 4068)
@@ -1,11 +1,9 @@
 using System;
-using System.IO;
-using System.Collections.Generic;
-using System.Text;
+using System.Collections;
 using System.ComponentModel;
-using System.Windows.Forms;
 using System.Drawing;
 using System.Drawing.Printing;
-using System.Collections;
+using System.IO;
+using System.Windows.Forms;
 namespace Netron.Diagramming.Core {
   /// <summary>
Index: /trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.Netron/3.0.2672.12446/Netron.Diagramming.Core-3.0.2672.12446/UndoRedo/Command.cs
===================================================================
--- /trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.Netron/3.0.2672.12446/Netron.Diagramming.Core-3.0.2672.12446/UndoRedo/Command.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.Netron/3.0.2672.12446/Netron.Diagramming.Core-3.0.2672.12446/UndoRedo/Command.cs	(revision 4068)
@@ -1,96 +1,86 @@
-using System;
 
-namespace Netron.Diagramming.Core
-{
+namespace Netron.Diagramming.Core {
+  /// <summary>
+  /// Command is an abstract class that represents an undoable
+  /// or redoable operation or command. It provides virtual Undo()
+  /// and Redo() methods which your derived command classes can
+  /// override in order to implement actual undo/redo functionality.
+  /// In a derived command class, you also have the option of
+  /// not overriding the Undo() and Redo() methods. Instead, you
+  /// can treat the derived command class like a data class and
+  /// simply provide extra fields, properties, or methods that an
+  /// external class (one that implements IUndoHandler) can use to
+  /// perform the actual undo/redo functionality.
+  /// </summary>
+  public abstract class Command : ICommand {
+
+    #region Fields
     /// <summary>
-    /// Command is an abstract class that represents an undoable
-    /// or redoable operation or command. It provides virtual Undo()
-    /// and Redo() methods which your derived command classes can
-    /// override in order to implement actual undo/redo functionality.
-    /// In a derived command class, you also have the option of
-    /// not overriding the Undo() and Redo() methods. Instead, you
-    /// can treat the derived command class like a data class and
-    /// simply provide extra fields, properties, or methods that an
-    /// external class (one that implements IUndoHandler) can use to
-    /// perform the actual undo/redo functionality.
+    /// the Controller field
     /// </summary>
-    public abstract class Command : ICommand
-    {
+    private IController mController;
 
-        #region Fields
-        /// <summary>
-        /// the Controller field
-        /// </summary>
-        private IController mController;
+    /// <summary>
+    /// the description of the action
+    /// </summary>
+    private string mText = string.Empty;
+    #endregion
 
-        /// <summary>
-        /// the description of the action
-        /// </summary>
-        private string mText = string.Empty;
-        #endregion
+    #region Properties
+    /// <summary>
+    /// Gets or sets the Controller
+    /// </summary>
+    protected IController Controller {
+      get { return mController; }
+      set { mController = value; }
+    }
+    /// <summary>
+    /// Text should return a short description of the
+    /// user operation associated with this command. For example,
+    /// a graphics line drawing operation might have the
+    /// text, "Draw Line". This method can be used to update
+    /// the Text property of an undo menu item. For example,
+    /// instead of just displaying "Undo", the Text property
+    /// of an undo menu item can be augmented to "Undo Draw Line".
+    /// </summary>
+    /// <returns>Short description of the command.</returns>
+    public virtual string Text {
+      get {
+        return mText;
+      }
+      set {
+        mText = value;
+      }
+    }
+    #endregion
 
-        #region Properties
-        /// <summary>
-        /// Gets or sets the Controller
-        /// </summary>
-        protected IController Controller
-        {
-            get { return mController; }
-            set { mController = value; }
-        }
-        /// <summary>
-        /// Text should return a short description of the
-        /// user operation associated with this command. For example,
-        /// a graphics line drawing operation might have the
-        /// text, "Draw Line". This method can be used to update
-        /// the Text property of an undo menu item. For example,
-        /// instead of just displaying "Undo", the Text property
-        /// of an undo menu item can be augmented to "Undo Draw Line".
-        /// </summary>
-        /// <returns>Short description of the command.</returns>
-        public virtual string Text
-        {
-            get
-            {
-                return mText;
-            }
-            set
-            {
-                mText = value;
-            }
-        }
-        #endregion
+    #region Constructor
+    /// <summary>
+    /// Default constructor
+    /// </summary>
+    /// <param name="controller">The controller.</param>
+    protected Command(IController controller) {
+      if (controller == null)
+        throw new InconsistencyException("The controller is 'null'");
+      this.mController = controller;
+    }
+    #endregion
 
-        #region Constructor
-        /// <summary>
-        /// Default constructor
-        /// </summary>
-        /// <param name="controller">The controller.</param>
-        protected Command(IController controller)
-        {
-            if (controller == null)
-                throw new InconsistencyException("The controller is 'null'");
-            this.mController = controller;
-        }
-        #endregion
-
-        #region Methods
-        /// <summary>
-        /// Perform undo of this command.
-        /// </summary>
-        public virtual void Undo()
-        {
-            // Empty implementation.
-        }
-
-        /// <summary>
-        /// Perform redo of this command.
-        /// </summary>
-        public virtual void Redo()
-        {
-            // Empty implementation.
-        }
-        #endregion
+    #region Methods
+    /// <summary>
+    /// Perform undo of this command.
+    /// </summary>
+    public virtual void Undo() {
+      // Empty implementation.
     }
 
+    /// <summary>
+    /// Perform redo of this command.
+    /// </summary>
+    public virtual void Redo() {
+      // Empty implementation.
+    }
+    #endregion
+  }
+
 }
Index: /trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.Netron/3.0.2672.12446/Netron.Diagramming.Core-3.0.2672.12446/UndoRedo/Commands/AddConnectionCommand.cs
===================================================================
--- /trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.Netron/3.0.2672.12446/Netron.Diagramming.Core-3.0.2672.12446/UndoRedo/Commands/AddConnectionCommand.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.Netron/3.0.2672.12446/Netron.Diagramming.Core-3.0.2672.12446/UndoRedo/Commands/AddConnectionCommand.cs	(revision 4068)
@@ -1,51 +1,44 @@
 using System;
-using System.Collections.Generic;
-using System.Text;
 using System.Drawing;
-namespace Netron.Diagramming.Core
-{
-    /// <summary>
-    /// ICommand implementation of the AddConnection action
-    /// </summary>
-    class AddConnectionCommand : Command
-    {
-        IConnection connection;        
+namespace Netron.Diagramming.Core {
+  /// <summary>
+  /// ICommand implementation of the AddConnection action
+  /// </summary>
+  class AddConnectionCommand : Command {
+    IConnection connection;
 
-        public IConnection Connection
-        {
-            get { return connection; }
-        }
+    public IConnection Connection {
+      get { return connection; }
+    }
 
-        
 
-        public  AddConnectionCommand(IController controller, IConnection connection) :base(controller)
-        {
-            if (connection == null)
-                throw new ArgumentNullException("The connection is 'null' and cannot be inserted.");            
-            this.Text = "Add " + connection.EntityName;          
-            this.connection = connection;
-        }
 
-        public override void Redo()
-        {
-            Controller.Model.AddConnection(connection);
-            
-            //connection.Location = location;
-            Rectangle rec = connection.Rectangle;
-            rec.Inflate(20, 20);
-            Controller.View.Invalidate(rec);            
-        }
+    public AddConnectionCommand(IController controller, IConnection connection)
+      : base(controller) {
+      if (connection == null)
+        throw new ArgumentNullException("The connection is 'null' and cannot be inserted.");
+      this.Text = "Add " + connection.EntityName;
+      this.connection = connection;
+    }
 
-        public override void Undo()
-        {
-            Rectangle rec = connection.Rectangle;
-            rec.Inflate(20, 20);
-            Controller.Model.Remove(connection);
-            Controller.View.Invalidate(rec);
-            
-        }
+    public override void Redo() {
+      Controller.Model.AddConnection(connection);
 
+      //connection.Location = location;
+      Rectangle rec = connection.Rectangle;
+      rec.Inflate(20, 20);
+      Controller.View.Invalidate(rec);
+    }
+
+    public override void Undo() {
+      Rectangle rec = connection.Rectangle;
+      rec.Inflate(20, 20);
+      Controller.Model.Remove(connection);
+      Controller.View.Invalidate(rec);
 
     }
 
+
+  }
+
 }
Index: /trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.Netron/3.0.2672.12446/Netron.Diagramming.Core-3.0.2672.12446/UndoRedo/Commands/AddMultiPointShapeCommand.cs
===================================================================
--- /trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.Netron/3.0.2672.12446/Netron.Diagramming.Core-3.0.2672.12446/UndoRedo/Commands/AddMultiPointShapeCommand.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.Netron/3.0.2672.12446/Netron.Diagramming.Core-3.0.2672.12446/UndoRedo/Commands/AddMultiPointShapeCommand.cs	(revision 4068)
@@ -1,52 +1,45 @@
 using System;
-using System.Collections.Generic;
-using System.Text;
 using System.Drawing;
-namespace Netron.Diagramming.Core
-{
-    /// <summary>
-    /// ICommand implementation of the AddShape action
-    /// </summary>
-    class AddMultiPointShapeCommand : Command
-    {
-        IShape shape;        
+namespace Netron.Diagramming.Core {
+  /// <summary>
+  /// ICommand implementation of the AddShape action
+  /// </summary>
+  class AddMultiPointShapeCommand : Command {
+    IShape shape;
 
-        public IShape Shape
-        {
-            get { return shape; }
-        }
+    public IShape Shape {
+      get { return shape; }
+    }
 
-        
 
-        public  AddMultiPointShapeCommand(IController controller, IShape shape) :base(controller)
-        {
-            if (shape == null)
-                throw new ArgumentNullException("The shape is 'null' and cannot be inserted.");            
-            this.Text = "Add " + shape.EntityName;          
 
-            
-            this.shape = shape;
-        }
+    public AddMultiPointShapeCommand(IController controller, IShape shape)
+      : base(controller) {
+      if (shape == null)
+        throw new ArgumentNullException("The shape is 'null' and cannot be inserted.");
+      this.Text = "Add " + shape.EntityName;
 
-        public override void Redo()
-        {
-            Controller.Model.AddShape(shape);
-            Rectangle rec = shape.Rectangle;
-            rec.Inflate(20, 20);
-            Controller.View.Invalidate(rec);            
-        }
 
-        public override void Undo()
-        {
-            Rectangle rec = shape.Rectangle;
-            rec.Inflate(20, 20);
-            Controller.Model.RemoveShape(shape);
+      this.shape = shape;
+    }
 
-            Controller.View.Invalidate(rec);
-            
-        }
+    public override void Redo() {
+      Controller.Model.AddShape(shape);
+      Rectangle rec = shape.Rectangle;
+      rec.Inflate(20, 20);
+      Controller.View.Invalidate(rec);
+    }
 
+    public override void Undo() {
+      Rectangle rec = shape.Rectangle;
+      rec.Inflate(20, 20);
+      Controller.Model.RemoveShape(shape);
+
+      Controller.View.Invalidate(rec);
 
     }
 
+
+  }
+
 }
Index: /trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.Netron/3.0.2672.12446/Netron.Diagramming.Core-3.0.2672.12446/UndoRedo/Commands/AddShapeCommand.cs
===================================================================
--- /trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.Netron/3.0.2672.12446/Netron.Diagramming.Core-3.0.2672.12446/UndoRedo/Commands/AddShapeCommand.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.Netron/3.0.2672.12446/Netron.Diagramming.Core-3.0.2672.12446/UndoRedo/Commands/AddShapeCommand.cs	(revision 4068)
@@ -1,76 +1,69 @@
 using System;
-using System.Collections.Generic;
-using System.Text;
 using System.Drawing;
-namespace Netron.Diagramming.Core
-{
-    /// <summary>
-    /// ICommand implementation of the AddShape action
-    /// </summary>
-    public class AddShapeCommand : Command
-    {
-        #region Fields
-        IShape shape;        
-        Point location;
-        #endregion
+namespace Netron.Diagramming.Core {
+  /// <summary>
+  /// ICommand implementation of the AddShape action
+  /// </summary>
+  public class AddShapeCommand : Command {
+    #region Fields
+    IShape shape;
+    Point location;
+    #endregion
 
-        #region Properties
-        public IShape Shape
-        {
-            get { return shape; }
-        }
-        #endregion
+    #region Properties
+    public IShape Shape {
+      get { return shape; }
+    }
+    #endregion
 
 
 
-        #region Methods
-        /// <summary>
-        /// Initializes a new instance of the <see cref="T:AddShapeCommand"/> class.
-        /// </summary>
-        /// <param name="controller">The controller.</param>
-        /// <param name="shape">The shape.</param>
-        /// <param name="location">The location.</param>
-        public  AddShapeCommand(
-            IController controller, 
-            IShape shape, 
-            Point location) :base(controller)
-        {
-            if (shape == null)
-                throw new ArgumentNullException("The shape is 'null' and cannot be inserted.");            
-            this.Text = "Add " + shape.EntityName;          
+    #region Methods
+    /// <summary>
+    /// Initializes a new instance of the <see cref="T:AddShapeCommand"/> class.
+    /// </summary>
+    /// <param name="controller">The controller.</param>
+    /// <param name="shape">The shape.</param>
+    /// <param name="location">The location.</param>
+    public AddShapeCommand(
+        IController controller,
+        IShape shape,
+        Point location)
+      : base(controller) {
+      if (shape == null)
+        throw new ArgumentNullException("The shape is 'null' and cannot be inserted.");
+      this.Text = "Add " + shape.EntityName;
 
-            this.location = location;
-            this.shape = shape;
-        }
+      this.location = location;
+      this.shape = shape;
+    }
 
-        /// <summary>
-        /// Perform redo of this command.
-        /// </summary>
-        public override void Redo()
-        {
-            Controller.Model.AddShape(shape);
-            
-            shape.Transform(location.X, location.Y, shape.Width, shape.Height);
-            Rectangle rec = shape.Rectangle;
-            rec.Inflate(20, 20);
-            Controller.View.Invalidate(rec);            
-        }
+    /// <summary>
+    /// Perform redo of this command.
+    /// </summary>
+    public override void Redo() {
+      Controller.Model.AddShape(shape);
 
-        /// <summary>
-        /// Perform undo of this command.
-        /// </summary>
-        public override void Undo()
-        {
-            Rectangle rec = shape.Rectangle;
-            rec.Inflate(20, 20);
-            Controller.Model.RemoveShape(shape);
+      shape.Transform(location.X, location.Y, shape.Width, shape.Height);
+      Rectangle rec = shape.Rectangle;
+      rec.Inflate(20, 20);
+      Controller.View.Invalidate(rec);
+    }
 
-            Controller.View.Invalidate(rec);
+    /// <summary>
+    /// Perform undo of this command.
+    /// </summary>
+    public override void Undo() {
+      Rectangle rec = shape.Rectangle;
+      rec.Inflate(20, 20);
+      Controller.Model.RemoveShape(shape);
 
-        }
-
-        #endregion
+      Controller.View.Invalidate(rec);
 
     }
 
+    #endregion
+
+  }
+
 }
Index: /trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.Netron/3.0.2672.12446/Netron.Diagramming.Core-3.0.2672.12446/UndoRedo/Commands/BindConnectorsCommand.cs
===================================================================
--- /trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.Netron/3.0.2672.12446/Netron.Diagramming.Core-3.0.2672.12446/UndoRedo/Commands/BindConnectorsCommand.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.Netron/3.0.2672.12446/Netron.Diagramming.Core-3.0.2672.12446/UndoRedo/Commands/BindConnectorsCommand.cs	(revision 4068)
@@ -1,33 +1,26 @@
-using System;
-using System.Collections.Generic;
-using System.Text;
 
-namespace Netron.Diagramming.Core
-{
-    class BindConnectorsCommand : Command
-    {
-        IConnector parent;
-        IConnector child;
+namespace Netron.Diagramming.Core {
+  class BindConnectorsCommand : Command {
+    IConnector parent;
+    IConnector child;
 
-        public override void Redo()
-        {
-            parent.AttachConnector(child);
-        }
-        public override void Undo()
-        {
-            parent.DetachConnector(child);
-        }
+    public override void Redo() {
+      parent.AttachConnector(child);
+    }
+    public override void Undo() {
+      parent.DetachConnector(child);
+    }
 
-        #region Constructor
-        ///<summary>
-        ///Default constructor
-        ///</summary>
-        public BindConnectorsCommand(IController controller, IConnector parent, IConnector child) : base(controller)
-        {
-            this.parent = parent;
-            this.child = child;
-        }
-        #endregion
-  
+    #region Constructor
+    ///<summary>
+    ///Default constructor
+    ///</summary>
+    public BindConnectorsCommand(IController controller, IConnector parent, IConnector child)
+      : base(controller) {
+      this.parent = parent;
+      this.child = child;
     }
+    #endregion
+
+  }
 }
Index: /trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.Netron/3.0.2672.12446/Netron.Diagramming.Core-3.0.2672.12446/UndoRedo/Commands/CompoundCommand.cs
===================================================================
--- /trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.Netron/3.0.2672.12446/Netron.Diagramming.Core-3.0.2672.12446/UndoRedo/Commands/CompoundCommand.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.Netron/3.0.2672.12446/Netron.Diagramming.Core-3.0.2672.12446/UndoRedo/Commands/CompoundCommand.cs	(revision 4068)
@@ -1,70 +1,58 @@
-using System;
-using System.Collections.Generic;
-using System.Text;
 
-namespace Netron.Diagramming.Core
-{
+namespace Netron.Diagramming.Core {
+  /// <summary>
+  /// Implementation of ICommand for multiple actions
+  /// </summary>
+  class CompoundCommand : Command, ICompoundCommand {
+    #region Fields
+    private CollectionBase<ICommand> commands;
+    #endregion
+
+    #region Properties
     /// <summary>
-    /// Implementation of ICommand for multiple actions
+    /// Gets or sets the commands in this compound action.
     /// </summary>
-    class CompoundCommand : Command, ICompoundCommand
-    {
-        #region Fields
-        private CollectionBase<ICommand> commands;
-        #endregion
+    /// <value>The commands.</value>
+    public CollectionBase<ICommand> Commands {
+      get {
+        return commands;
+      }
+      set {
+        commands = value;
+      }
+    }
 
-        #region Properties
-        /// <summary>
-        /// Gets or sets the commands in this compound action.
-        /// </summary>
-        /// <value>The commands.</value>
-        public CollectionBase<ICommand> Commands
-        {
-            get
-            {
-                return commands;
-            }
-            set
-            {
-                commands = value;
-            }
-        }
+    #endregion
 
-        #endregion
-        
-        #region Constructor
-        ///<summary>
-        ///Default constructor
-        ///</summary>
-        public CompoundCommand(IController controller) : base(controller)
-        {
-            commands = new CollectionBase<ICommand>();
-        }
-        #endregion
+    #region Constructor
+    ///<summary>
+    ///Default constructor
+    ///</summary>
+    public CompoundCommand(IController controller)
+      : base(controller) {
+      commands = new CollectionBase<ICommand>();
+    }
+    #endregion
 
-        #region Methods
-        /// <summary>
-        /// Perform redo of this command.
-        /// </summary>
-        public override void Redo()
-        {
-            foreach(ICommand cmd in commands)
-            {
-                cmd.Redo();
-            }
-        }
+    #region Methods
+    /// <summary>
+    /// Perform redo of this command.
+    /// </summary>
+    public override void Redo() {
+      foreach (ICommand cmd in commands) {
+        cmd.Redo();
+      }
+    }
 
-        /// <summary>
-        /// Perform undo of this command.
-        /// </summary>
-        public override void Undo()
-        {
-            foreach(ICommand cmd in commands)
-            {
-                cmd.Undo();
-            }
-        }
-        #endregion
+    /// <summary>
+    /// Perform undo of this command.
+    /// </summary>
+    public override void Undo() {
+      foreach (ICommand cmd in commands) {
+        cmd.Undo();
+      }
+    }
+    #endregion
 
-    }
+  }
 }
Index: /trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.Netron/3.0.2672.12446/Netron.Diagramming.Core-3.0.2672.12446/UndoRedo/Commands/DeleteCommand.cs
===================================================================
--- /trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.Netron/3.0.2672.12446/Netron.Diagramming.Core-3.0.2672.12446/UndoRedo/Commands/DeleteCommand.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.Netron/3.0.2672.12446/Netron.Diagramming.Core-3.0.2672.12446/UndoRedo/Commands/DeleteCommand.cs	(revision 4068)
@@ -1,97 +1,86 @@
-using System;
-using System.Collections.Generic;
-using System.Text;
 using System.Drawing;
-namespace Netron.Diagramming.Core
-{
-    /// <summary>
-    /// Delete command.
-    /// </summary>
-    public class DeleteCommand : Command
-    {
-        #region Fields
-        CollectionBase<IDiagramEntity> bundle;
-        IController controller;
-      
-        #endregion
+namespace Netron.Diagramming.Core {
+  /// <summary>
+  /// Delete command.
+  /// </summary>
+  public class DeleteCommand : Command {
+    #region Fields
+    CollectionBase<IDiagramEntity> bundle;
+    IController controller;
 
-        #region Properties
-       
+    #endregion
 
-        /// <summary>
-        /// Gets the entities.
-        /// </summary>
-        /// <value>The shape.</value>
-        public CollectionBase<IDiagramEntity> Entities
-        {
-            get { return bundle; }
-        }
-
-        #endregion
-
-        #region Constructor
-        /// <summary>
-        /// Initializes a new instance of the <see cref="T:DeleteCommand"/> class.
-        /// </summary>
-        /// <param name="controller">The controller.</param>
-        /// <param name="bundle">The bundle.</param>
-        public DeleteCommand(
-            IController controller, 
-            CollectionBase<IDiagramEntity> bundle)
-            : base(controller)
-        {
-            this.Text = "Delete";
-            this.controller = controller;
-            this.bundle = bundle;
-            
-        }
-        #endregion
-
-        #region Methods
-
-        /// <summary>
-        /// Perform redo of this command.
-        /// </summary>
-        public override void Redo()
-        {
-            if (bundle.Count == 0) return;
-
-            foreach (IDiagramEntity entity in bundle)
-            {
-                //this.Controller.Model.DefaultPage.DefaultLayer.Entities.Remove(entity);
-                Controller.Model.Remove(entity);
-            }
-            this.Controller.View.HideTracker();
-            Rectangle rec = Utils.BoundingRectangle(bundle);
-            rec.Inflate(30, 30);
-            this.Controller.View.Invalidate(rec);
-        }
-
-        /// <summary>
-        /// Perform undo of this command.
-        /// </summary>
-        public override void Undo()
-        {
-
-            if (bundle.Count == 0) return;
-
-            foreach (IDiagramEntity entity in bundle)
-            {
-                //this.Controller.Model.DefaultPage.DefaultLayer.Entities.Add(entity);
-                Controller.Model.AddEntity(entity);
-            }
-            this.Controller.View.HideTracker();
-
-            Rectangle rec = Utils.BoundingRectangle(bundle);
-            rec.Inflate(30, 30);
-            this.Controller.View.Invalidate(rec);
-                       
-
-         
-        }
+    #region Properties
 
 
-        #endregion
+    /// <summary>
+    /// Gets the entities.
+    /// </summary>
+    /// <value>The shape.</value>
+    public CollectionBase<IDiagramEntity> Entities {
+      get { return bundle; }
     }
 
+    #endregion
+
+    #region Constructor
+    /// <summary>
+    /// Initializes a new instance of the <see cref="T:DeleteCommand"/> class.
+    /// </summary>
+    /// <param name="controller">The controller.</param>
+    /// <param name="bundle">The bundle.</param>
+    public DeleteCommand(
+        IController controller,
+        CollectionBase<IDiagramEntity> bundle)
+      : base(controller) {
+      this.Text = "Delete";
+      this.controller = controller;
+      this.bundle = bundle;
+
+    }
+    #endregion
+
+    #region Methods
+
+    /// <summary>
+    /// Perform redo of this command.
+    /// </summary>
+    public override void Redo() {
+      if (bundle.Count == 0) return;
+
+      foreach (IDiagramEntity entity in bundle) {
+        //this.Controller.Model.DefaultPage.DefaultLayer.Entities.Remove(entity);
+        Controller.Model.Remove(entity);
+      }
+      this.Controller.View.HideTracker();
+      Rectangle rec = Utils.BoundingRectangle(bundle);
+      rec.Inflate(30, 30);
+      this.Controller.View.Invalidate(rec);
+    }
+
+    /// <summary>
+    /// Perform undo of this command.
+    /// </summary>
+    public override void Undo() {
+
+      if (bundle.Count == 0) return;
+
+      foreach (IDiagramEntity entity in bundle) {
+        //this.Controller.Model.DefaultPage.DefaultLayer.Entities.Add(entity);
+        Controller.Model.AddEntity(entity);
+      }
+      this.Controller.View.HideTracker();
+
+      Rectangle rec = Utils.BoundingRectangle(bundle);
+      rec.Inflate(30, 30);
+      this.Controller.View.Invalidate(rec);
+
+
+
+    }
+
+
+    #endregion
+  }
+
 }
Index: /trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.Netron/3.0.2672.12446/Netron.Diagramming.Core-3.0.2672.12446/UndoRedo/Commands/DetachConnectorsCommand.cs
===================================================================
--- /trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.Netron/3.0.2672.12446/Netron.Diagramming.Core-3.0.2672.12446/UndoRedo/Commands/DetachConnectorsCommand.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.Netron/3.0.2672.12446/Netron.Diagramming.Core-3.0.2672.12446/UndoRedo/Commands/DetachConnectorsCommand.cs	(revision 4068)
@@ -1,33 +1,26 @@
-using System;
-using System.Collections.Generic;
-using System.Text;
 
-namespace Netron.Diagramming.Core
-{
-    class DetachConnectorCommand : Command
-    {
-        IConnector parent;
-        IConnector child;
+namespace Netron.Diagramming.Core {
+  class DetachConnectorCommand : Command {
+    IConnector parent;
+    IConnector child;
 
-        public override void Redo()
-        {
-            parent.DetachConnector(child);            
-        }
-        public override void Undo()
-        {
-            parent.AttachConnector(child);            
-        }
+    public override void Redo() {
+      parent.DetachConnector(child);
+    }
+    public override void Undo() {
+      parent.AttachConnector(child);
+    }
 
-        #region Constructor
-        ///<summary>
-        ///Default constructor
-        ///</summary>
-        public DetachConnectorCommand(IController controller, IConnector parent, IConnector child) : base(controller)
-        {
-            this.parent = parent;
-            this.child = child;
-        }
-        #endregion
-  
+    #region Constructor
+    ///<summary>
+    ///Default constructor
+    ///</summary>
+    public DetachConnectorCommand(IController controller, IConnector parent, IConnector child)
+      : base(controller) {
+      this.parent = parent;
+      this.child = child;
     }
+    #endregion
+
+  }
 }
Index: /trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.Netron/3.0.2672.12446/Netron.Diagramming.Core-3.0.2672.12446/UndoRedo/Commands/FillStyleCommand.cs
===================================================================
--- /trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.Netron/3.0.2672.12446/Netron.Diagramming.Core-3.0.2672.12446/UndoRedo/Commands/FillStyleCommand.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.Netron/3.0.2672.12446/Netron.Diagramming.Core-3.0.2672.12446/UndoRedo/Commands/FillStyleCommand.cs	(revision 4068)
@@ -1,95 +1,83 @@
-using System;
 using System.Collections.Generic;
-using System.Text;
-using System.Drawing;
-namespace Netron.Diagramming.Core
-{
-    /// <summary>
-    /// Fill style command
-    /// </summary>
-    class FillStyleCommand : Command
-    {
-        #region Fields
-        CollectionBase<IDiagramEntity> bundle;
-        IController controller;
+namespace Netron.Diagramming.Core {
+  /// <summary>
+  /// Fill style command
+  /// </summary>
+  class FillStyleCommand : Command {
+    #region Fields
+    CollectionBase<IDiagramEntity> bundle;
+    IController controller;
 
-        IPaintStyle newStyle;
-        Dictionary<string, IPaintStyle> previousStyles = new Dictionary<string, IPaintStyle>();           
-        #endregion
+    IPaintStyle newStyle;
+    Dictionary<string, IPaintStyle> previousStyles = new Dictionary<string, IPaintStyle>();
+    #endregion
 
-        #region Properties
-       
-        
+    #region Properties
 
 
-        /// <summary>
-        /// Gets the entities.
-        /// </summary>
-        /// <value>The shape.</value>
-        public CollectionBase<IDiagramEntity> Entities
-        {
-            get { return bundle; }
-        }
-
-        #endregion
-
-        #region Constructor
-        /// <summary>
-        /// Initializes a new instance of the <see cref="T:FillStyleCommand"/> class.
-        /// </summary>
-        /// <param name="controller">The controller.</param>
-        /// <param name="bundle">The bundle.</param>
-        /// <param name="paintStyle">The paint style.</param>
-        public FillStyleCommand(IController controller, CollectionBase<IDiagramEntity> bundle, IPaintStyle paintStyle)
-            : base(controller)
-        {
-            this.Text = "Fill style";
-            this.controller = controller;
-            this.bundle = bundle;//the bundle should contain only IShape and IConnection entities!
-            this.newStyle = paintStyle;
-        }
-        #endregion
-
-        #region Methods
-
-        /// <summary>
-        /// Perform redo of this command.
-        /// </summary>
-        public override void Redo()
-        {
-            if (bundle == null || bundle.Count == 0)
-                return;
-            previousStyles.Clear();
-            foreach (IDiagramEntity entity in bundle)
-            {
-                if (entity is IShape)
-                {
-                    previousStyles.Add(entity.Uid.ToString(), entity.PaintStyle);
-                    (entity as IShape).PaintStyle = newStyle;
-                }                
-            }
-        }
-
-        /// <summary>
-        /// Perform undo of this command.
-        /// </summary>
-        public override void Undo()
-        {
-            if (bundle == null || bundle.Count == 0)
-                return;
-            foreach (IDiagramEntity entity in bundle)
-            {
-                if (entity is IShape)
-                    (entity as IShape).PaintStyle = previousStyles[entity.Uid.ToString()];
-            }
-
-           
 
 
+    /// <summary>
+    /// Gets the entities.
+    /// </summary>
+    /// <value>The shape.</value>
+    public CollectionBase<IDiagramEntity> Entities {
+      get { return bundle; }
+    }
+
+    #endregion
+
+    #region Constructor
+    /// <summary>
+    /// Initializes a new instance of the <see cref="T:FillStyleCommand"/> class.
+    /// </summary>
+    /// <param name="controller">The controller.</param>
+    /// <param name="bundle">The bundle.</param>
+    /// <param name="paintStyle">The paint style.</param>
+    public FillStyleCommand(IController controller, CollectionBase<IDiagramEntity> bundle, IPaintStyle paintStyle)
+      : base(controller) {
+      this.Text = "Fill style";
+      this.controller = controller;
+      this.bundle = bundle;//the bundle should contain only IShape and IConnection entities!
+      this.newStyle = paintStyle;
+    }
+    #endregion
+
+    #region Methods
+
+    /// <summary>
+    /// Perform redo of this command.
+    /// </summary>
+    public override void Redo() {
+      if (bundle == null || bundle.Count == 0)
+        return;
+      previousStyles.Clear();
+      foreach (IDiagramEntity entity in bundle) {
+        if (entity is IShape) {
+          previousStyles.Add(entity.Uid.ToString(), entity.PaintStyle);
+          (entity as IShape).PaintStyle = newStyle;
         }
+      }
+    }
+
+    /// <summary>
+    /// Perform undo of this command.
+    /// </summary>
+    public override void Undo() {
+      if (bundle == null || bundle.Count == 0)
+        return;
+      foreach (IDiagramEntity entity in bundle) {
+        if (entity is IShape)
+          (entity as IShape).PaintStyle = previousStyles[entity.Uid.ToString()];
+      }
 
 
-        #endregion
+
+
     }
 
+
+    #endregion
+  }
+
 }
Index: /trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.Netron/3.0.2672.12446/Netron.Diagramming.Core-3.0.2672.12446/UndoRedo/Commands/GroupCommand.cs
===================================================================
--- /trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.Netron/3.0.2672.12446/Netron.Diagramming.Core-3.0.2672.12446/UndoRedo/Commands/GroupCommand.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.Netron/3.0.2672.12446/Netron.Diagramming.Core-3.0.2672.12446/UndoRedo/Commands/GroupCommand.cs	(revision 4068)
@@ -1,133 +1,119 @@
-using System;
-using System.Collections.Generic;
-using System.Text;
-using System.Drawing;
-namespace Netron.Diagramming.Core
-{
+namespace Netron.Diagramming.Core {
+  /// <summary>
+  /// Group command
+  /// </summary>
+  class GroupCommand : Command {
+    #region Fields
+    IBundle bundle;
+    IController controller;
+    IGroup mGroup;
+    #endregion
+
+    #region Properties
     /// <summary>
-    /// Group command
+    /// Gets the newly created group after <see cref="Redo"/> was called
     /// </summary>
-    class GroupCommand : Command
-    {
-        #region Fields
-        IBundle bundle;
-        IController controller;
-        IGroup mGroup;
-        #endregion
+    public IGroup Group {
+      get { return mGroup; }
+    }
 
-        #region Properties
-        /// <summary>
-        /// Gets the newly created group after <see cref="Redo"/> was called
-        /// </summary>
-        public IGroup Group
-        {
-            get { return mGroup; }
-        }
+    /// <summary>
+    /// Gets the entities.
+    /// </summary>
+    /// <value>The shape.</value>
+    public CollectionBase<IDiagramEntity> Entities {
+      get { return bundle.Entities; }
+    }
 
-        /// <summary>
-        /// Gets the entities.
-        /// </summary>
-        /// <value>The shape.</value>
-        public CollectionBase<IDiagramEntity> Entities
-        {
-            get { return bundle.Entities; }
-        }
+    #endregion
 
-        #endregion
+    #region Constructor
+    /// <summary>
+    /// Initializes a new instance of the <see cref="T:GroupCommand"/> class.
+    /// </summary>
+    /// <param name="controller">The controller.</param>
+    /// <param name="bundle">The bundle.</param>
+    public GroupCommand(IController controller, IBundle bundle)
+      : base(controller) {
+      this.Text = "Group";
+      this.controller = controller;
+      this.bundle = bundle;//the bundle should contain only IShape and IConnection entities!
+    }
+    #endregion
 
-        #region Constructor
-        /// <summary>
-        /// Initializes a new instance of the <see cref="T:GroupCommand"/> class.
-        /// </summary>
-        /// <param name="controller">The controller.</param>
-        /// <param name="bundle">The bundle.</param>
-        public GroupCommand(IController controller, IBundle bundle)
-            : base(controller)
-        {
-            this.Text = "Group";
-            this.controller = controller;
-            this.bundle = bundle;//the bundle should contain only IShape and IConnection entities!
-        }
-        #endregion
+    #region Methods
 
-        #region Methods
+    /// <summary>
+    /// Perform redo of this command.
+    /// </summary>
+    public override void Redo() {
+      //create a new group; use the standard GroupShape or the CollapsibleGroupShape for a painted group with collapse/expand features.
+      //GroupShape group = new GroupShape(this.Controller.Model);
+      //CollapsibleGroupShape group = new CollapsibleGroupShape(this.controller.Model);
+      GroupShape group = new GroupShape(this.controller.Model);
+      //asign the entities to the group
+      group.Entities.Clear();
 
-        /// <summary>
-        /// Perform redo of this command.
-        /// </summary>
-        public override void Redo()
-        {
-            //create a new group; use the standard GroupShape or the CollapsibleGroupShape for a painted group with collapse/expand features.
-            //GroupShape group = new GroupShape(this.Controller.Model);
-            //CollapsibleGroupShape group = new CollapsibleGroupShape(this.controller.Model);
-            GroupShape group = new GroupShape(this.controller.Model);
-            //asign the entities to the group
-            group.Entities.Clear();
-            
-            foreach (IDiagramEntity entity in bundle.Entities)
-            {
-                //this will be recursive if an entity is itself an IGroup
-                entity.Group = group;
-                group.Entities.Add(entity);
-            }
-            //add the new group to the layer
-            this.Controller.Model.AddEntity(group);
+      foreach (IDiagramEntity entity in bundle.Entities) {
+        //this will be recursive if an entity is itself an IGroup
+        entity.Group = group;
+        group.Entities.Add(entity);
+      }
+      //add the new group to the layer
+      this.Controller.Model.AddEntity(group);
 
-            mGroup = group;
+      mGroup = group;
 
-            //select the newly created group
-            CollectionBase<IDiagramEntity> col = new CollectionBase<IDiagramEntity>();
-            col.Add(mGroup);
-            this.Controller.Model.Selection.SelectedItems = col;
-            mGroup.Invalidate();
-        }
+      //select the newly created group
+      CollectionBase<IDiagramEntity> col = new CollectionBase<IDiagramEntity>();
+      col.Add(mGroup);
+      this.Controller.Model.Selection.SelectedItems = col;
+      mGroup.Invalidate();
+    }
 
-        /// <summary>
-        /// Perform undo of this command.
-        /// </summary>
-        public override void Undo()
-        {
-            if (mGroup.CanUnGroup == false)
-            {
-                return;
-            }
+    /// <summary>
+    /// Perform undo of this command.
+    /// </summary>
+    public override void Undo() {
+      if (mGroup.CanUnGroup == false) {
+        return;
+      }
 
-            //remove the group from the layer
-            this.Controller.Model.DefaultPage.DefaultLayer.Entities.Remove(mGroup);
+      //remove the group from the layer
+      this.Controller.Model.DefaultPage.DefaultLayer.Entities.Remove(mGroup);
 
-            // keep track of the entities removed.
-            CollectionBase<IDiagramEntity> removedItems = 
-                new CollectionBase<IDiagramEntity>();
+      // keep track of the entities removed.
+      CollectionBase<IDiagramEntity> removedItems =
+          new CollectionBase<IDiagramEntity>();
 
-            int numberOfItems = mGroup.Entities.Count;
-          //detach the entities from the group
-            for (int i = 0; i < numberOfItems; numberOfItems--)
-            {
-                IDiagramEntity entity = mGroup.Entities[0];
-                //this will be recursive if an entity is itself an IGroup
-                entity.Group = null;
-                mGroup.Entities.Remove(entity);
-                Controller.Model.AddEntity(entity);
-                entity.Invalidate();
-                removedItems.Add(entity);
-            }
-            //change the visuals such that the entities in the group are selected
-            this.Controller.Model.Selection.SelectedItems = removedItems;
-            //mGroup.Entities.Clear();
+      int numberOfItems = mGroup.Entities.Count;
+      //detach the entities from the group
+      for (int i = 0; i < numberOfItems; numberOfItems--) {
+        IDiagramEntity entity = mGroup.Entities[0];
+        //this will be recursive if an entity is itself an IGroup
+        entity.Group = null;
+        mGroup.Entities.Remove(entity);
+        Controller.Model.AddEntity(entity);
+        entity.Invalidate();
+        removedItems.Add(entity);
+      }
+      //change the visuals such that the entities in the group are selected
+      this.Controller.Model.Selection.SelectedItems = removedItems;
+      //mGroup.Entities.Clear();
 
-            //mGroup.Invalidate();
+      //mGroup.Invalidate();
 
-            mGroup = null;
+      mGroup = null;
 
-            //note that the entities have never been disconnected from the layer
-            //so they don't have to be re-attached to the anything.
-            //The insertion of the Group simply got pushed in the scene-graph.
+      //note that the entities have never been disconnected from the layer
+      //so they don't have to be re-attached to the anything.
+      //The insertion of the Group simply got pushed in the scene-graph.
 
 
-        }
+    }
 
 
-        #endregion
-    }
+    #endregion
+  }
 
 }
Index: /trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.Netron/3.0.2672.12446/Netron.Diagramming.Core-3.0.2672.12446/UndoRedo/Commands/MoveCommand.cs
===================================================================
--- /trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.Netron/3.0.2672.12446/Netron.Diagramming.Core-3.0.2672.12446/UndoRedo/Commands/MoveCommand.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.Netron/3.0.2672.12446/Netron.Diagramming.Core-3.0.2672.12446/UndoRedo/Commands/MoveCommand.cs	(revision 4068)
@@ -1,85 +1,76 @@
-using System;
-using System.Collections.Generic;
-using System.Text;
 using System.Drawing;
-namespace Netron.Diagramming.Core
-{
+namespace Netron.Diagramming.Core {
+  /// <summary>
+  /// ICommand implementation of the move action
+  /// </summary>
+  class MoveCommand : Command {
+    #region Fields
+    IBundle bundle;
+    IController controller;
+    Point delta;
+    #endregion
+
+    #region Properties
+
     /// <summary>
-    /// ICommand implementation of the move action
+    /// Gets the shape.
     /// </summary>
-    class MoveCommand : Command
-    {
-        #region Fields
-        IBundle bundle;
-        IController controller;
-        Point delta;
-        #endregion
+    /// <value>The shape.</value>
+    public CollectionBase<IDiagramEntity> Entities {
+      get { return bundle.Entities; }
+    }
 
-        #region Properties
+    #endregion
 
-        /// <summary>
-        /// Gets the shape.
-        /// </summary>
-        /// <value>The shape.</value>
-        public CollectionBase<IDiagramEntity> Entities
-        {
-            get { return bundle.Entities; }
-        }
+    #region Constructor
+    /// <summary>
+    /// Initializes a new instance of the <see cref="T:MoveCommand"/> class.
+    /// </summary>
+    /// <param name="controller">The controller.</param>
+    /// <param name="bundle">The bundle.</param>
+    /// <param name="delta">The delta.</param>
+    public MoveCommand(IController controller, IBundle bundle, Point delta)
+      : base(controller) {
+      this.Text = "Move " + bundle.EntityName;
+      this.controller = controller;
+      this.delta = delta;
+      this.bundle = bundle;
+    }
+    #endregion
 
-        #endregion
+    #region Methods
 
-        #region Constructor
-        /// <summary>
-        /// Initializes a new instance of the <see cref="T:MoveCommand"/> class.
-        /// </summary>
-        /// <param name="controller">The controller.</param>
-        /// <param name="bundle">The bundle.</param>
-        /// <param name="delta">The delta.</param>
-        public MoveCommand(IController controller, IBundle bundle, Point delta)
-            : base(controller)
-        {
-            this.Text = "Move " + bundle.EntityName;
-            this.controller = controller;
-            this.delta = delta;
-            this.bundle = bundle;
-        }
-        #endregion
+    /// <summary>
+    /// Perform redo of this command.
+    /// </summary>
+    public override void Redo() {
+      bundle.MoveBy(delta);
+      //invalidate the space before the move
+      Rectangle rec = bundle.Rectangle;
+      rec.Offset(-delta.X, -delta.Y);
+      rec.Inflate(20, 20);
+      bundle.Invalidate(rec);//same as an invalidate on the controller level
+      //invalidate the current neighborhood of the bundle
+      bundle.Invalidate();
 
-        #region Methods
+    }
 
-        /// <summary>
-        /// Perform redo of this command.
-        /// </summary>
-        public override void Redo()
-        {
-            bundle.MoveBy(delta);
-            //invalidate the space before the move
-            Rectangle rec = bundle.Rectangle;
-            rec.Offset(-delta.X, -delta.Y);
-            rec.Inflate(20, 20);
-            bundle.Invalidate(rec);//same as an invalidate on the controller level
-            //invalidate the current neighborhood of the bundle
-            bundle.Invalidate();
-
-        }
-
-        /// <summary>
-        /// Perform undo of this command.
-        /// </summary>
-        public override void Undo()
-        {
-            bundle.MoveBy(new Point(-delta.X, -delta.Y)); //invert the vector
-            //invalidate the space before the move
-            Rectangle rec = bundle.Rectangle;
-            rec.Offset(delta.X, delta.Y);
-            rec.Inflate(20, 20);
-            bundle.Invalidate(rec);//same as an invalidate on the controller level
-            //invalidate the current neighborhood of the bundle
-            bundle.Invalidate();
-        }
+    /// <summary>
+    /// Perform undo of this command.
+    /// </summary>
+    public override void Undo() {
+      bundle.MoveBy(new Point(-delta.X, -delta.Y)); //invert the vector
+      //invalidate the space before the move
+      Rectangle rec = bundle.Rectangle;
+      rec.Offset(delta.X, delta.Y);
+      rec.Inflate(20, 20);
+      bundle.Invalidate(rec);//same as an invalidate on the controller level
+      //invalidate the current neighborhood of the bundle
+      bundle.Invalidate();
+    }
 
 
-        #endregion
-    }
+    #endregion
+  }
 
 }
Index: /trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.Netron/3.0.2672.12446/Netron.Diagramming.Core-3.0.2672.12446/UndoRedo/Commands/PenStyleCommand.cs
===================================================================
--- /trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.Netron/3.0.2672.12446/Netron.Diagramming.Core-3.0.2672.12446/UndoRedo/Commands/PenStyleCommand.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.Netron/3.0.2672.12446/Netron.Diagramming.Core-3.0.2672.12446/UndoRedo/Commands/PenStyleCommand.cs	(revision 4068)
@@ -1,95 +1,83 @@
-using System;
 using System.Collections.Generic;
-using System.Text;
-using System.Drawing;
-namespace Netron.Diagramming.Core
-{
-    /// <summary>
-    /// Pen style command
-    /// </summary>
-    class PenStyleCommand : Command
-    {
-        #region Fields
-        CollectionBase<IDiagramEntity> bundle;
-        IController controller;
+namespace Netron.Diagramming.Core {
+  /// <summary>
+  /// Pen style command
+  /// </summary>
+  class PenStyleCommand : Command {
+    #region Fields
+    CollectionBase<IDiagramEntity> bundle;
+    IController controller;
 
-        IPenStyle newStyle;
-        Dictionary<string, IPenStyle> previousStyles = new Dictionary<string, IPenStyle>();           
-        #endregion
+    IPenStyle newStyle;
+    Dictionary<string, IPenStyle> previousStyles = new Dictionary<string, IPenStyle>();
+    #endregion
 
-        #region Properties
-       
-        
+    #region Properties
 
 
-        /// <summary>
-        /// Gets the entities.
-        /// </summary>
-        /// <value>The shape.</value>
-        public CollectionBase<IDiagramEntity> Entities
-        {
-            get { return bundle; }
-        }
-
-        #endregion
-
-        #region Constructor
-        /// <summary>
-        /// Initializes a new instance of the <see cref="T:PenStyleCommand"/> class.
-        /// </summary>
-        /// <param name="controller">The controller.</param>
-        /// <param name="bundle">The bundle.</param>
-        /// <param name="penStyle">The pen style.</param>
-        public PenStyleCommand(IController controller, CollectionBase<IDiagramEntity> bundle, IPenStyle penStyle)
-            : base(controller)
-        {
-            this.Text = "Fill style";
-            this.controller = controller;
-            this.bundle = bundle;//the bundle should contain only IShape and IConnection entities!
-            this.newStyle = penStyle;
-        }
-        #endregion
-
-        #region Methods
-
-        /// <summary>
-        /// Perform redo of this command.
-        /// </summary>
-        public override void Redo()
-        {
-            if (bundle == null || bundle.Count == 0)
-                return;
-            previousStyles.Clear();
-            foreach (IDiagramEntity entity in bundle)
-            {
-                if (entity is IConnection)
-                {
-                    previousStyles.Add(entity.Uid.ToString(), entity.PenStyle);
-                    (entity as IConnection).PenStyle  = newStyle;
-                }
-            }
-        }
-
-        /// <summary>
-        /// Perform undo of this command.
-        /// </summary>
-        public override void Undo()
-        {
-            if (bundle == null || bundle.Count == 0)
-                return;
-            foreach (IDiagramEntity entity in bundle)
-            {
-                if (entity is IConnection)
-                    (entity as IConnection).PenStyle = previousStyles[entity.Uid.ToString()];
-            }
-
-           
 
 
+    /// <summary>
+    /// Gets the entities.
+    /// </summary>
+    /// <value>The shape.</value>
+    public CollectionBase<IDiagramEntity> Entities {
+      get { return bundle; }
+    }
+
+    #endregion
+
+    #region Constructor
+    /// <summary>
+    /// Initializes a new instance of the <see cref="T:PenStyleCommand"/> class.
+    /// </summary>
+    /// <param name="controller">The controller.</param>
+    /// <param name="bundle">The bundle.</param>
+    /// <param name="penStyle">The pen style.</param>
+    public PenStyleCommand(IController controller, CollectionBase<IDiagramEntity> bundle, IPenStyle penStyle)
+      : base(controller) {
+      this.Text = "Fill style";
+      this.controller = controller;
+      this.bundle = bundle;//the bundle should contain only IShape and IConnection entities!
+      this.newStyle = penStyle;
+    }
+    #endregion
+
+    #region Methods
+
+    /// <summary>
+    /// Perform redo of this command.
+    /// </summary>
+    public override void Redo() {
+      if (bundle == null || bundle.Count == 0)
+        return;
+      previousStyles.Clear();
+      foreach (IDiagramEntity entity in bundle) {
+        if (entity is IConnection) {
+          previousStyles.Add(entity.Uid.ToString(), entity.PenStyle);
+          (entity as IConnection).PenStyle = newStyle;
         }
+      }
+    }
+
+    /// <summary>
+    /// Perform undo of this command.
+    /// </summary>
+    public override void Undo() {
+      if (bundle == null || bundle.Count == 0)
+        return;
+      foreach (IDiagramEntity entity in bundle) {
+        if (entity is IConnection)
+          (entity as IConnection).PenStyle = previousStyles[entity.Uid.ToString()];
+      }
 
 
-        #endregion
+
+
     }
 
+
+    #endregion
+  }
+
 }
Index: /trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.Netron/3.0.2672.12446/Netron.Diagramming.Core-3.0.2672.12446/UndoRedo/Commands/TransformCommand.cs
===================================================================
--- /trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.Netron/3.0.2672.12446/Netron.Diagramming.Core-3.0.2672.12446/UndoRedo/Commands/TransformCommand.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.Netron/3.0.2672.12446/Netron.Diagramming.Core-3.0.2672.12446/UndoRedo/Commands/TransformCommand.cs	(revision 4068)
@@ -1,205 +1,188 @@
 using System;
-using System.Collections.Generic;
-using System.Text;
 using System.Collections;
 using System.Drawing;
-namespace Netron.Diagramming.Core
-{
-    /// <summary>
-    /// ICommand implementation of the transform action
-    /// </summary>
-    class TransformCommand : Command
-    {
-        #region Fields
-        Hashtable transformers;
-       
-        double scalex, scaley;
-        Point origin;
-        #endregion
+namespace Netron.Diagramming.Core {
+  /// <summary>
+  /// ICommand implementation of the transform action
+  /// </summary>
+  class TransformCommand : Command {
+    #region Fields
+    Hashtable transformers;
 
-        #region Properties
+    double scalex, scaley;
+    Point origin;
+    #endregion
+
+    #region Properties
 
 
 
-        #endregion
+    #endregion
 
-        #region Constructor
-        /// <summary>
-        /// Initializes a new instance of the <see cref="T:TransformCommand"/> class.
-        /// </summary>
-        /// <param name="controller">The controller.</param>
-        /// <param name="origin">The origin.</param>
-        /// <param name="scalex">The scalex.</param>
-        /// <param name="scaley">The scaley.</param>
-        /// <param name="transformers">The transformers.</param>
-        public TransformCommand(IController controller, Point origin, double scalex, double scaley, Hashtable transformers)
-            : base(controller)
-        {
-            this.Text = "Transform selection";
-            this.transformers = transformers;
-            this.origin = origin;
-            this.scalex = scalex;
-            this.scaley = scaley;
-        }
-        #endregion
+    #region Constructor
+    /// <summary>
+    /// Initializes a new instance of the <see cref="T:TransformCommand"/> class.
+    /// </summary>
+    /// <param name="controller">The controller.</param>
+    /// <param name="origin">The origin.</param>
+    /// <param name="scalex">The scalex.</param>
+    /// <param name="scaley">The scaley.</param>
+    /// <param name="transformers">The transformers.</param>
+    public TransformCommand(IController controller, Point origin, double scalex, double scaley, Hashtable transformers)
+      : base(controller) {
+      this.Text = "Transform selection";
+      this.transformers = transformers;
+      this.origin = origin;
+      this.scalex = scalex;
+      this.scaley = scaley;
+    }
+    #endregion
 
-        #region Methods
+    #region Methods
 
-        /// <summary>
-        /// Perform redo of this command.
-        /// </summary>
-        public override void Redo()
-        {
-            //necessary to invalidate
-            Rectangle recBefore = CalculateRectangle(this.transformers);
-            recBefore.Inflate(20, 20);
-            Transform(this.origin, scalex, scaley, transformers);
-            Rectangle recAfter = CalculateRectangle(this.transformers);
-            recAfter.Inflate(20, 20);
-            this.Controller.View.Invalidate(recBefore);
-            this.Controller.View.Invalidate(recAfter);
+    /// <summary>
+    /// Perform redo of this command.
+    /// </summary>
+    public override void Redo() {
+      //necessary to invalidate
+      Rectangle recBefore = CalculateRectangle(this.transformers);
+      recBefore.Inflate(20, 20);
+      Transform(this.origin, scalex, scaley, transformers);
+      Rectangle recAfter = CalculateRectangle(this.transformers);
+      recAfter.Inflate(20, 20);
+      this.Controller.View.Invalidate(recBefore);
+      this.Controller.View.Invalidate(recAfter);
 
-        }
-        /// <summary>
-        /// Calculates the bounding rectangle of the transformed items.
-        /// </summary>
-        /// <param name="transformers">The transformers.</param>
-        /// <returns></returns>
-        public static Rectangle CalculateRectangle(Hashtable transformers)
-        {
-            Rectangle rec = Rectangle.Empty;
-            if(transformers == null || transformers.Count == 0)
-                return Rectangle.Empty;
-            bool first = true;
-            foreach(object val in transformers.Values)
-            {
-                EntityBone bone = (EntityBone) val;
-                if(bone.Rectangle.Equals(Rectangle.Empty))
-                    continue;
-                if(first)
+    }
+    /// <summary>
+    /// Calculates the bounding rectangle of the transformed items.
+    /// </summary>
+    /// <param name="transformers">The transformers.</param>
+    /// <returns></returns>
+    public static Rectangle CalculateRectangle(Hashtable transformers) {
+      Rectangle rec = Rectangle.Empty;
+      if (transformers == null || transformers.Count == 0)
+        return Rectangle.Empty;
+      bool first = true;
+      foreach (object val in transformers.Values) {
+        EntityBone bone = (EntityBone)val;
+        if (bone.Rectangle.Equals(Rectangle.Empty))
+          continue;
+        if (first) {
+          rec = bone.Rectangle;
+          first = false;
+        } else
+          rec = Rectangle.Union(rec, bone.Rectangle);
+
+      }
+      return rec;
+    }
+
+    /// <summary>
+    /// Perform undo of this command.
+    /// </summary>
+    public override void Undo() {
+      //necessary to invalidate
+      Rectangle recBefore = CalculateRectangle(this.transformers);
+      recBefore.Inflate(20, 20);
+      Transform(this.origin, 1, 1, transformers);
+      Rectangle recAfter = CalculateRectangle(this.transformers);
+      recAfter.Inflate(20, 20);
+      this.Controller.View.Invalidate(recBefore);
+      this.Controller.View.Invalidate(recAfter);
+    }
+
+    public static void Transform(
+        Point origin,
+        double scalex,
+        double scaley,
+        Hashtable transformers) {
+      Rectangle r;
+      int x, y, w, h;
+
+      //the new location of the connector
+
+      EntityBone bone;
+      IConnection conn;
+      IShape shape;
+
+      //Scale the entities; this could be done via matrix transform but it seems some rounding is necessary since I got terrible 
+      //decimal accumulation mistakes without rounding off the double data type.
+      //However, if one rotation of shapes will be added the matrix tranfromation will be unavoidable.
+      foreach (object key in transformers.Keys) {
+        bone = (EntityBone)transformers[key];
+        r = bone.Rectangle;
+        //Scale the rectangle if not empty. If the rectangle is empty it is a connection.
+        if (r.Equals(Rectangle.Empty)) //the bone represents a connection
                 {
-                    rec = bone.Rectangle;
-                    first = false;
-                }
-                else
-                    rec = Rectangle.Union(rec, bone.Rectangle);
+          conn = key as IConnection;
+          //scaling of the From connector
+          if (!bone.ConnectorPoints[0].Equals(Point.Empty)) {
 
-            }
-            return rec;
-        }
+            x = Convert.ToInt32(Math.Round(((double)bone.ConnectorPoints[0].X - (double)origin.X) * scalex + origin.X - conn.From.Point.X, 1));
+            y = Convert.ToInt32(Math.Round(((double)bone.ConnectorPoints[0].Y - (double)origin.Y) * scaley + origin.Y - conn.From.Point.Y, 1));
+            //it's important to use the Move method because shifting the Point could entail additional moves on the attached connectors
+            conn.From.MoveBy(new Point(x, y));
+          }
+          //scaling of the To connector
+          if (!bone.ConnectorPoints[1].Equals(Point.Empty)) {
+            x = Convert.ToInt32(Math.Round(((double)bone.ConnectorPoints[1].X - (double)origin.X) * scalex + origin.X - conn.To.Point.X, 1));
+            y = Convert.ToInt32(Math.Round(((double)bone.ConnectorPoints[1].Y - (double)origin.Y) * scaley + origin.Y - conn.To.Point.Y, 1));
+            conn.To.MoveBy(new Point(x, y));
+          }
+        } else    //it's a shape
+                {
+          shape = key as IShape;
 
-        /// <summary>
-        /// Perform undo of this command.
-        /// </summary>
-        public override void Undo()
-        {
-            //necessary to invalidate
-            Rectangle recBefore = CalculateRectangle(this.transformers);
-            recBefore.Inflate(20, 20);
-            Transform(this.origin, 1, 1, transformers);
-            Rectangle recAfter = CalculateRectangle(this.transformers);
-            recAfter.Inflate(20, 20);
-            this.Controller.View.Invalidate(recBefore);
-            this.Controller.View.Invalidate(recAfter);
-        }
+          //TransformShape(ref origin, scalex, scaley, ref r, ref bone, key, out x, out y, out w, out h, out a, out b, out p, out shape);
+          x = Convert.ToInt32(Math.Round(
+              (r.X - origin.X) * scalex + origin.X, 1));
 
-        public static void Transform(
-            Point origin, 
-            double scalex, 
-            double scaley, 
-            Hashtable transformers)
-        {
-            Rectangle r;
-            int x, y, w, h;
-           
-            //the new location of the connector
-        
-            EntityBone bone;            
-            IConnection conn;
-            IShape shape;
+          y = Convert.ToInt32(Math.Round(
+              (r.Y - origin.Y) * scaley + origin.Y, 1));
 
-            //Scale the entities; this could be done via matrix transform but it seems some rounding is necessary since I got terrible 
-            //decimal accumulation mistakes without rounding off the double data type.
-            //However, if one rotation of shapes will be added the matrix tranfromation will be unavoidable.
-            foreach(object key in transformers.Keys)
-            {
-                bone = (EntityBone) transformers[key];
-                r = bone.Rectangle;
-                //Scale the rectangle if not empty. If the rectangle is empty it is a connection.
-                if(r.Equals(Rectangle.Empty)) //the bone represents a connection
-                {
-                    conn = key as IConnection;
-                    //scaling of the From connector
-                    if(!bone.ConnectorPoints[0].Equals(Point.Empty))
-                    {
+          w = Convert.ToInt32(r.Width * scalex);
 
-                        x = Convert.ToInt32(Math.Round(((double) bone.ConnectorPoints[0].X - (double) origin.X) * scalex + origin.X - conn.From.Point.X, 1));
-                        y = Convert.ToInt32(Math.Round(((double) bone.ConnectorPoints[0].Y - (double) origin.Y) * scaley + origin.Y - conn.From.Point.Y, 1));
-                        //it's important to use the Move method because shifting the Point could entail additional moves on the attached connectors
-                        conn.From.MoveBy(new Point(x, y));
-                    }
-                    //scaling of the To connector
-                    if(!bone.ConnectorPoints[1].Equals(Point.Empty))
-                    {
-                        x = Convert.ToInt32(Math.Round(((double) bone.ConnectorPoints[1].X - (double) origin.X) * scalex + origin.X - conn.To.Point.X, 1));
-                        y = Convert.ToInt32(Math.Round(((double) bone.ConnectorPoints[1].Y - (double) origin.Y) * scaley + origin.Y - conn.To.Point.Y, 1));
-                        conn.To.MoveBy(new Point(x, y));
-                    }
-                }
-                else    //it's a shape
-                {
-                    shape = key as IShape;
+          h = Convert.ToInt32(r.Height * scaley);
 
-                    //TransformShape(ref origin, scalex, scaley, ref r, ref bone, key, out x, out y, out w, out h, out a, out b, out p, out shape);
-                    x = Convert.ToInt32(Math.Round(
-                        (r.X - origin.X) * scalex + origin.X, 1));
-
-                    y = Convert.ToInt32(Math.Round(
-                        (r.Y - origin.Y) * scaley + origin.Y, 1));
-
-                    w = Convert.ToInt32(r.Width * scalex);
-
-                    h = Convert.ToInt32(r.Height * scaley);
-
-                    // Only perform the tranform if the rectangle's height 
-                    // and width are less than or equal to the shape's  
-                    // min/max size.
-                    if ((w <= shape.MaxSize.Width) &&
-                        (h <= shape.MaxSize.Height) &&
-                        (w >= shape.MinSize.Width) &&
-                        (h >= shape.MinSize.Height))
-                    {
-                        shape.Transform(x, y, w, h);
-                    }
-
-                }
-
-            }
+          // Only perform the tranform if the rectangle's height 
+          // and width are less than or equal to the shape's  
+          // min/max size.
+          if ((w <= shape.MaxSize.Width) &&
+              (h <= shape.MaxSize.Height) &&
+              (w >= shape.MinSize.Width) &&
+              (h >= shape.MinSize.Height)) {
+            shape.Transform(x, y, w, h);
+          }
 
         }
 
-        //private static void TransformShape(ref Point origin, double scalex, double scaley, ref Rectangle r, ref EntityBone bone, object key, out int x, out int y, out int w, out int h, out double a, out double b, out Point p, out IShape shape)
-        //{
+      }
+
+    }
+
+    //private static void TransformShape(ref Point origin, double scalex, double scaley, ref Rectangle r, ref EntityBone bone, object key, out int x, out int y, out int w, out int h, out double a, out double b, out Point p, out IShape shape)
+    //{
 
 
-        //    //(key as IDiagramEntity).Rectangle = new Rectangle(x, y, w, h);
+    //    //(key as IDiagramEntity).Rectangle = new Rectangle(x, y, w, h);
 
-        //    if(bone.ConnectorPoints != null)
-        //    {
-        //        shape = key as IShape;
-        //        for(int m = 0; m < bone.ConnectorPoints.Length; m++)
-        //        {
-        //            a = Math.Round(((double) bone.ConnectorPoints[m].X - (double) r.X) / (double) r.Width, 1) * w + x - shape.Connectors[m].Point.X;
-        //            b = Math.Round(((double) bone.ConnectorPoints[m].Y - (double) r.Y) / (double) r.Height, 1) * h + y - shape.Connectors[m].Point.Y;
-        //            p = new Point(Convert.ToInt32(a), Convert.ToInt32(b));
-        //            shape.Connectors[m].Move(p);
-        //        }
-        //    }
-        //}
+    //    if(bone.ConnectorPoints != null)
+    //    {
+    //        shape = key as IShape;
+    //        for(int m = 0; m < bone.ConnectorPoints.Length; m++)
+    //        {
+    //            a = Math.Round(((double) bone.ConnectorPoints[m].X - (double) r.X) / (double) r.Width, 1) * w + x - shape.Connectors[m].Point.X;
+    //            b = Math.Round(((double) bone.ConnectorPoints[m].Y - (double) r.Y) / (double) r.Height, 1) * h + y - shape.Connectors[m].Point.Y;
+    //            p = new Point(Convert.ToInt32(a), Convert.ToInt32(b));
+    //            shape.Connectors[m].Move(p);
+    //        }
+    //    }
+    //}
 
 
 
-        #endregion
-    }
+    #endregion
+  }
 
 }
Index: /trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.Netron/3.0.2672.12446/Netron.Diagramming.Core-3.0.2672.12446/UndoRedo/Commands/UngroupCommand.cs
===================================================================
--- /trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.Netron/3.0.2672.12446/Netron.Diagramming.Core-3.0.2672.12446/UndoRedo/Commands/UngroupCommand.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.Netron/3.0.2672.12446/Netron.Diagramming.Core-3.0.2672.12446/UndoRedo/Commands/UngroupCommand.cs	(revision 4068)
@@ -1,123 +1,110 @@
-using System;
-using System.Collections.Generic;
-using System.Text;
-using System.Drawing;
-namespace Netron.Diagramming.Core
-{
+namespace Netron.Diagramming.Core {
+  /// <summary>
+  /// Ungroup command
+  /// </summary>
+  class UngroupCommand : Command {
+    #region Fields
+    IBundle bundle;
+    IController controller;
+    IGroup mGroup;
+    #endregion
+
+    #region Properties
     /// <summary>
-    /// Ungroup command
+    /// Gets the newly created group after <see cref="Redo"/> was called
     /// </summary>
-    class UngroupCommand : Command
-    {
-        #region Fields
-        IBundle bundle;
-        IController controller;
-        IGroup mGroup;
-        #endregion
+    public IGroup Group {
+      get { return mGroup; }
+    }
 
-        #region Properties
-        /// <summary>
-        /// Gets the newly created group after <see cref="Redo"/> was called
-        /// </summary>
-        public IGroup Group
-        {
-            get { return mGroup; }
-        }
+    /// <summary>
+    /// Gets the entities.
+    /// </summary>
+    /// <value>The shape.</value>
+    public CollectionBase<IDiagramEntity> Entities {
+      get { return bundle.Entities; }
+    }
 
-        /// <summary>
-        /// Gets the entities.
-        /// </summary>
-        /// <value>The shape.</value>
-        public CollectionBase<IDiagramEntity> Entities
-        {
-            get { return bundle.Entities; }
-        }
+    #endregion
 
-        #endregion
+    #region Constructor
+    /// <summary>
+    /// Initializes a new instance of the <see cref="T:UngroupCommand"/> class.
+    /// </summary>
+    /// <param name="controller">The controller.</param>
+    /// <param name="group">The group.</param>
+    public UngroupCommand(IController controller, IGroup group)
+      : base(controller) {
+      this.Text = "Ungroup";
+      this.controller = controller;
+      this.mGroup = group;
+      bundle = new Bundle();
+    }
+    #endregion
 
-        #region Constructor
-        /// <summary>
-        /// Initializes a new instance of the <see cref="T:UngroupCommand"/> class.
-        /// </summary>
-        /// <param name="controller">The controller.</param>
-        /// <param name="group">The group.</param>
-        public UngroupCommand(IController controller, IGroup group)
-            : base(controller)
-        {
-            this.Text = "Ungroup";
-            this.controller = controller;
-            this.mGroup = group;
-            bundle = new Bundle();
-        }
-        #endregion
+    #region Methods
 
-        #region Methods
+    /// <summary>
+    /// Perform redo of this command.
+    /// </summary>
+    public override void Redo() {
+      //remove the group from the layer
+      this.Controller.Model.DefaultPage.DefaultLayer.Entities.Remove(mGroup);
+      //detach the entities from the group
+      foreach (IDiagramEntity entity in mGroup.Entities) {
+        //this will be recursive if an entity is itself an IGroup
+        entity.Group = null;
+        bundle.Entities.Add(entity);
+        //mGroup.Entities.Remove(entity);
+        Controller.Model.AddEntity(entity);
+      }
+      //change the visuals such that the entities in the group are selected
 
-        /// <summary>
-        /// Perform redo of this command.
-        /// </summary>
-        public override void Redo()
-        {
-            //remove the group from the layer
-            this.Controller.Model.DefaultPage.DefaultLayer.Entities.Remove(mGroup);
-            //detach the entities from the group
-            foreach (IDiagramEntity entity in mGroup.Entities)
-            {
-                //this will be recursive if an entity is itself an IGroup
-                entity.Group = null;
-                bundle.Entities.Add(entity);
-                //mGroup.Entities.Remove(entity);
-                Controller.Model.AddEntity(entity);
-            }
-            //change the visuals such that the entities in the group are selected
+      CollectionBase<IDiagramEntity> col = new CollectionBase<IDiagramEntity>();
+      col.AddRange(mGroup.Entities);
 
-            CollectionBase<IDiagramEntity> col = new CollectionBase<IDiagramEntity>();
-            col.AddRange(mGroup.Entities);
+      this.Controller.Model.Selection.SelectedItems = col;
 
-            this.Controller.Model.Selection.SelectedItems = col;
+      mGroup.Invalidate();
+      mGroup = null;
 
-            mGroup.Invalidate();
-            mGroup = null;
-
-            //note that the entities have never been disconnected from the layer
-            //so they don't have to be re-attached to the anything.
-            //The insertion of the Group simply got pushed in the scene-graph.
+      //note that the entities have never been disconnected from the layer
+      //so they don't have to be re-attached to the anything.
+      //The insertion of the Group simply got pushed in the scene-graph.
 
 
-        }
+    }
 
-        /// <summary>
-        /// Perform undo of this command.
-        /// </summary>
-        public override void Undo()
-        {
+    /// <summary>
+    /// Perform undo of this command.
+    /// </summary>
+    public override void Undo() {
 
-            //create a new group
-            GroupShape group = new GroupShape(this.Controller.Model);
-            //asign the entities to the group
-            group.Entities = bundle.Entities;
+      //create a new group
+      GroupShape group = new GroupShape(this.Controller.Model);
+      //asign the entities to the group
+      group.Entities = bundle.Entities;
 
-            foreach (IDiagramEntity entity in group.Entities)
-            {
-                //this will be recursive if an entity is itself an IGroup
-                entity.Group = group;
-            }
-            //add the new group to the layer
-            this.Controller.Model.DefaultPage.DefaultLayer.Entities.Add(group);
+      foreach (IDiagramEntity entity in group.Entities) {
+        //this will be recursive if an entity is itself an IGroup
+        entity.Group = group;
+      }
+      //add the new group to the layer
+      this.Controller.Model.DefaultPage.DefaultLayer.Entities.Add(group);
 
-            mGroup = group;
+      mGroup = group;
 
-            //select the newly created group
-            CollectionBase<IDiagramEntity> col = new CollectionBase<IDiagramEntity>();
-            col.Add(mGroup);
-            this.Controller.Model.Selection.SelectedItems = col;
-            mGroup.Invalidate();
-
-         
-        }
+      //select the newly created group
+      CollectionBase<IDiagramEntity> col = new CollectionBase<IDiagramEntity>();
+      col.Add(mGroup);
+      this.Controller.Model.Selection.SelectedItems = col;
+      mGroup.Invalidate();
 
 
-        #endregion
     }
 
+
+    #endregion
+  }
+
 }
Index: /trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.Netron/3.0.2672.12446/Netron.Diagramming.Core-3.0.2672.12446/UndoRedo/UndoInfo.cs
===================================================================
--- /trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.Netron/3.0.2672.12446/Netron.Diagramming.Core-3.0.2672.12446/UndoRedo/UndoInfo.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.Netron/3.0.2672.12446/Netron.Diagramming.Core-3.0.2672.12446/UndoRedo/UndoInfo.cs	(revision 4068)
@@ -1,41 +1,35 @@
-using System;
 
-namespace Netron.Diagramming.Core
-{
-	/// <summary>
-	/// CommandInfo is a class that is used as the
-	/// data type in the undo list and redo stack. It just stores
-	/// a reference to a command and an undo handler.
-	/// </summary>
-	public  class CommandInfo
-	{
-		private ICommand  mCommand;
-		private IUndoSupport mHandler;
+namespace Netron.Diagramming.Core {
+  /// <summary>
+  /// CommandInfo is a class that is used as the
+  /// data type in the undo list and redo stack. It just stores
+  /// a reference to a command and an undo handler.
+  /// </summary>
+  public class CommandInfo {
+    private ICommand mCommand;
+    private IUndoSupport mHandler;
 
-        /// <summary>
-        /// Gets or sets the command.
-        /// </summary>
-        /// <value>The command.</value>
-		public ICommand Command
-		{
-			get{return mCommand;}
-			set{mCommand = value;}
-		}
+    /// <summary>
+    /// Gets or sets the command.
+    /// </summary>
+    /// <value>The command.</value>
+    public ICommand Command {
+      get { return mCommand; }
+      set { mCommand = value; }
+    }
 
-        /// <summary>
-        /// The handler or parent of the undo command
-        /// </summary>
-		public IUndoSupport Handler
-		{
-			get{return mHandler;}
-			set{mHandler = value;}
-		}
+    /// <summary>
+    /// The handler or parent of the undo command
+    /// </summary>
+    public IUndoSupport Handler {
+      get { return mHandler; }
+      set { mHandler = value; }
+    }
 
-        /// <summary>
-        /// Initializes a new instance of the <see cref="T:CommandInfo"/> class.
-        /// </summary>
-		public CommandInfo()
-		{  			
-		}
-	}
+    /// <summary>
+    /// Initializes a new instance of the <see cref="T:CommandInfo"/> class.
+    /// </summary>
+    public CommandInfo() {
+    }
+  }
 }
Index: /trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.Netron/3.0.2672.12446/Netron.Diagramming.Core-3.0.2672.12446/UndoRedo/UndoManager.cs
===================================================================
--- /trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.Netron/3.0.2672.12446/Netron.Diagramming.Core-3.0.2672.12446/UndoRedo/UndoManager.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.Netron/3.0.2672.12446/Netron.Diagramming.Core-3.0.2672.12446/UndoRedo/UndoManager.cs	(revision 4068)
@@ -1,410 +1,372 @@
 
 using System;
-using System.Collections;
 using System.Diagnostics;
-using System.Collections.Generic;
-namespace Netron.Diagramming.Core
-{
-    /// <summary>
-    /// UndoManager is a concrete class that maintains the undo list
-    /// and redo stack data structures. It also provides methods that
-    /// tell you whether there is something to undo or redo. The class
-    /// is designed to be used directly in undo/redo menu item handlers,
-    /// and undo/redo menu item state update functions.
-    /// </summary>
-    public class UndoManager : IUndoSupport
-    {
-        /// <summary>
-        /// Occurs when the undo/redo history has changed. 
-        /// </summary>
-        public event EventHandler OnHistoryChange;
-
-		#region Fields
-
-        /// <summary>
-        /// the max level to keep history
-        /// </summary>
-        private int       undoLevel;
-        /// <summary>
-        /// the undo list
-        /// </summary>
-        private UndoCollection undoList;
-
-        
-        /// <summary>
-        /// the internal stack of redoable operations
-        /// </summary>
-        private StackBase<CommandInfo>  redoStack;
-
-		#endregion
-
-		#region Constructor
-        /// <summary>
-        /// Constructor which initializes the manager with up to 8 levels
-        /// of undo/redo.
-        /// </summary>
-        /// <param name="level">the undo level</param>
-        public UndoManager(int level)
-        {
-            undoLevel = level;
-            undoList = new UndoCollection();
-            redoStack = new StackBase<CommandInfo>();
-            // The following events are linked in the sense that when an item 
-            // is popped from the stack it'll be put in the undo collection 
-            // again. So, strictly speaking, you need only two of the four 
-            // events to make the surface aware of the history changes, but
-            // we'll keep it as is. It depends on your own perception of the 
-            // undo/reo process.
-            redoStack.OnItemPopped += 
-                new EventHandler<CollectionEventArgs<CommandInfo>>(
-                HistoryChanged);
-
-            redoStack.OnItemPushed += 
-                new EventHandler<CollectionEventArgs<CommandInfo>>(
-                HistoryChanged);
-
-            undoList.OnItemAdded += 
-                new EventHandler<CollectionEventArgs<CommandInfo>>(
-                HistoryChanged);
-
-            undoList.OnItemRemoved += 
-                new EventHandler<CollectionEventArgs<CommandInfo>>(
-                HistoryChanged);
-
+namespace Netron.Diagramming.Core {
+  /// <summary>
+  /// UndoManager is a concrete class that maintains the undo list
+  /// and redo stack data structures. It also provides methods that
+  /// tell you whether there is something to undo or redo. The class
+  /// is designed to be used directly in undo/redo menu item handlers,
+  /// and undo/redo menu item state update functions.
+  /// </summary>
+  public class UndoManager : IUndoSupport {
+    /// <summary>
+    /// Occurs when the undo/redo history has changed. 
+    /// </summary>
+    public event EventHandler OnHistoryChange;
+
+    #region Fields
+
+    /// <summary>
+    /// the max level to keep history
+    /// </summary>
+    private int undoLevel;
+    /// <summary>
+    /// the undo list
+    /// </summary>
+    private UndoCollection undoList;
+
+
+    /// <summary>
+    /// the internal stack of redoable operations
+    /// </summary>
+    private StackBase<CommandInfo> redoStack;
+
+    #endregion
+
+    #region Constructor
+    /// <summary>
+    /// Constructor which initializes the manager with up to 8 levels
+    /// of undo/redo.
+    /// </summary>
+    /// <param name="level">the undo level</param>
+    public UndoManager(int level) {
+      undoLevel = level;
+      undoList = new UndoCollection();
+      redoStack = new StackBase<CommandInfo>();
+      // The following events are linked in the sense that when an item 
+      // is popped from the stack it'll be put in the undo collection 
+      // again. So, strictly speaking, you need only two of the four 
+      // events to make the surface aware of the history changes, but
+      // we'll keep it as is. It depends on your own perception of the 
+      // undo/reo process.
+      redoStack.OnItemPopped +=
+          new EventHandler<CollectionEventArgs<CommandInfo>>(
+          HistoryChanged);
+
+      redoStack.OnItemPushed +=
+          new EventHandler<CollectionEventArgs<CommandInfo>>(
+          HistoryChanged);
+
+      undoList.OnItemAdded +=
+          new EventHandler<CollectionEventArgs<CommandInfo>>(
+          HistoryChanged);
+
+      undoList.OnItemRemoved +=
+          new EventHandler<CollectionEventArgs<CommandInfo>>(
+          HistoryChanged);
+
+    }
+
+
+
+    private void HistoryChanged(object sender, CollectionEventArgs<CommandInfo> e) {
+      RaiseHistoryChange();
+    }
+
+    #endregion
+
+    #region Properties
+    /// <summary>
+    /// Property for the maximum undo level.
+    /// </summary>
+    public int MaxUndoLevel {
+      get {
+        return undoLevel;
+      }
+      set {
+        Debug.Assert(value >= 0);
+
+        // To keep things simple, if you change the undo level,
+        // we clear all outstanding undo/redo commands.
+        if (value != undoLevel) {
+          ClearUndoRedo();
+          undoLevel = value;
         }
-
-     
-
-        private void HistoryChanged(object sender, CollectionEventArgs<CommandInfo> e)
-        {
-            RaiseHistoryChange();
-        }
-
-		#endregion
-
-		#region Properties
-        /// <summary>
-        /// Property for the maximum undo level.
-        /// </summary>
-        public int MaxUndoLevel
-        {
-            get
-            {
-                return undoLevel;
-            }
-            set
-            {
-                Debug.Assert( value >= 0 );
-				
-                // To keep things simple, if you change the undo level,
-                // we clear all outstanding undo/redo commands.
-                if ( value != undoLevel )
-                {
-                    ClearUndoRedo();
-                    undoLevel = value;
-                }
-            }
-        }
-
-        /// <summary>
-        /// Gets the undo list.
-        /// </summary>
-        /// <value>The undo list.</value>
-        internal UndoCollection UndoList
-        {
-            get { return undoList; }
-        }
-		#endregion
-
-		#region Methods
-        /// <summary>
-        /// Raises the OnHistoryChange event
-        /// </summary>
-        private void RaiseHistoryChange()
-        {
-            if (OnHistoryChange != null)
-                OnHistoryChange(this, EventArgs.Empty);
-        }
-        /// <summary>
-        /// Register a new undo command. Use this method after your
-        /// application has performed an operation/command that is
-        /// undoable.
-        /// </summary>
-        /// <param name="cmd">New command to add to the manager.</param>
-        public void AddUndoCommand(ICommand cmd)
-        {
-            Debug.Assert( cmd != null );
-            Debug.Assert( undoList.Count <= undoLevel );
-
-            if ( undoLevel == 0 )
-                return;
-
-            CommandInfo info = null;
-            if ( undoList.Count == undoLevel )
-            {
-                // Remove the oldest entry from the undo list to make room.
-                info = (CommandInfo) undoList[0];
-                undoList.RemoveAt(0);
-            }
-
-            // Insert the new undoable command into the undo list.
-            if ( info == null )
-                info = new CommandInfo();
-            info.Command = cmd;
-            info.Handler = null;
-            undoList.Add(info);
-
-            // Clear the redo stack.
-            ClearRedo();
-        }
-
-        /// <summary>
-        /// Register a new undo command along with an undo handler. The
-        /// undo handler is used to perform the actual undo or redo
-        /// operation later when requested.
-        /// </summary>
-        /// <param name="cmd">New command to add to the manager.</param>
-        /// <param name="undoHandler">Undo handler to perform the actual undo/redo operation.</param>
-        public void AddUndoCommand(ICommand cmd, IUndoSupport undoHandler)
-        {
-            AddUndoCommand(cmd);
-
-            if ( undoList.Count > 0 )
-            {
-                CommandInfo info = (CommandInfo) undoList[undoList.Count-1];
-                Debug.Assert( info != null );
-                info.Handler = undoHandler;
-            }
-        }
-
-        /// <summary>
-        /// Clear the internal undo/redo data structures. Use this method
-        /// when your application performs an operation that cannot be undone.
-        /// For example, when the user "saves" or "commits" all the changes in
-        /// the application.
-        /// </summary>
-        public void ClearUndoRedo()
-        {
-            ClearUndo();
-            ClearRedo();
-        }
-
-        /// <summary>
-        /// Check if there is something to undo. Use this method to decide
-        /// whether your application's "Undo" menu item should be enabled
-        /// or disabled.
-        /// </summary>
-        /// <returns>Returns true if there is something to undo, false otherwise.</returns>
-        public bool CanUndo()
-        {
-            return undoList.Count > 0;
-        }
-
-        /// <summary>
-        /// Check if there is something to redo. Use this method to decide
-        /// whether your application's "Redo" menu item should be enabled
-        /// or disabled.
-        /// </summary>
-        /// <returns>Returns true if there is something to redo, false otherwise.</returns>
-        public bool CanRedo()
-        {
-            return redoStack.Count > 0;
-        }
-
-        /// <summary>
-        /// Perform the undo operation. If an undo handler is specified, it
-        /// will be used to perform the actual operation. Otherwise, the command
-        /// instance is asked to perform the undo.
-        /// </summary>
-        public void Undo()
-        {
-            if ( !CanUndo() )
-                return;
-    
-            // Remove newest entry from the undo list.
-            CommandInfo info = (CommandInfo) undoList[undoList.Count-1];
-            undoList.RemoveAt(undoList.Count-1);
-            
-            // Perform the undo.
-            Debug.Assert( info.Command != null );
-           
-                info.Command.Undo();
-
-            // Now the command is available for redo. Push it onto
-            // the redo stack.
-            redoStack.Push(info);
-        }
-
-        /// <summary>
-        /// Perform the redo operation. If an undo handler is specified, it
-        /// will be used to perform the actual operation. Otherwise, the command
-        /// instance is asked to perform the redo.
-        /// </summary>
-        public void Redo()
-        {
-            if ( !CanRedo() )
-                return;
-    
-            // Remove newest entry from the redo stack.
-            CommandInfo info = (CommandInfo) redoStack.Pop();
-            
-            // Perform the redo.
-            Debug.Assert( info.Command != null );
-           
-                info.Command.Redo();
-
-            // Now the command is available for undo again. Put it back
-            // into the undo list.
-            undoList.Add(info);
-        }
-
-        /// <summary>
-        /// Get the text value of the next undo command. Use this method
-        /// to update the Text property of your "Undo" menu item if
-        /// desired. For example, the text value for a command might be
-        /// "Draw Circle". This allows you to change your menu item Text
-        /// property to "Undo Draw Circle".
-        /// </summary>
-        /// <returns>Text value of the next undo command.</returns>
-        public string UndoText
-        {
-            get
-            {
-                ICommand cmd = NextUndoCommand;
-                if (cmd == null)
-                    return "";
-                return cmd.Text;
-            }
-        }
-
-        /// <summary>
-        /// <para>
-        /// Get the text value of the next redo command. Use this method
-        /// to update the Text property of your "Redo" menu item if desired.
-        /// For example, the text value for a command might be "Draw Line".
-        /// This allows you to change your menu item text to "Redo Draw Line".
-        /// </para>
-        /// </summary>
-        /// <value>The redo text.</value>
-        /// <returns>Text value of the next redo command.</returns>
-        public string RedoText
-        {
-            get
-            {
-                ICommand cmd = NextRedoCommand;
-                if (cmd == null)
-                    return "";
-                return cmd.Text;
-            }
-        }
-
-        /// <summary>
-        /// Get the next (or newest) undo command. This is like a "Peek"
-        /// method. It does not remove the command from the undo list.
-        /// </summary>
-        /// <returns>The next undo command.</returns>
-        public ICommand NextUndoCommand
-        {
-            get
-            {
-                if(undoList.Count == 0)
-                    return null;
-                CommandInfo info = (CommandInfo) undoList[undoList.Count - 1];
-                return info.Command;
-            }
-        }
-
-        /// <summary>
-        /// Get the next redo command. This is like a "Peek"
-        /// method. It does not remove the command from the redo stack.
-        /// </summary>
-        /// <returns>The next redo command.</returns>
-        public ICommand NextRedoCommand
-        {
-            get
-            {
-                if(redoStack.Count == 0)
-                    return null;
-                CommandInfo info = (CommandInfo) redoStack.Peek();
-                return info.Command;
-            }
-
-        }
-
-        /// <summary>
-        /// Retrieve all of the undo commands. Useful for debugging,
-        /// to analyze the contents of the undo list.
-        /// </summary>
-        /// <returns>Array of commands for undo.</returns>
-        public ICommand[] GetUndoCommands()
-        {
-            if ( undoList.Count == 0 )
-                return null;
-
-            ICommand[] cmdList = new ICommand[undoList.Count];
-            object[] objList = undoList.ToArray();
-            for (int i = 0; i < objList.Length; i++)
-            {
-                CommandInfo info = (CommandInfo) objList[i];
-                cmdList[i] = info.Command;
-            }
-
-            return cmdList;
-        }
-
-        /// <summary>
-        /// Retrieve all of the redo commands. Useful for debugging,
-        /// to analyze the contents of the redo stack.
-        /// </summary>
-        /// <returns>Array of commands for redo.</returns>
-        public ICommand[] GetRedoCommands()
-        {
-            if ( redoStack.Count == 0 )
-                return null;
-
-            ICommand[] cmdList = new ICommand[redoStack.Count];
-            object[] objList = redoStack.ToArray();
-            for (int i = 0; i < objList.Length; i++)
-            {
-                CommandInfo info = (CommandInfo) objList[i];
-                cmdList[i] = info.Command;
-            }
-
-            return cmdList;
-        }
-
-        /// <summary>
-        /// Clear the contents of the undo list.
-        /// </summary>
-        private void ClearUndo()
-        {
-            while( undoList.Count > 0 )
-            {
-                CommandInfo info = (CommandInfo) undoList[undoList.Count-1];
-                undoList.RemoveAt(undoList.Count-1);
-                info.Command = null;
-                info.Handler = null;
-            }
-        }
-
-        /// <summary>
-        /// Clear the contents of the redo stack.
-        /// </summary>
-        private void ClearRedo()
-        {
-            while( redoStack.Count > 0 )
-            {
-                CommandInfo info = (CommandInfo) redoStack.Pop();
-                info.Command = null;
-                info.Handler = null;
-            }
-        }
-		#endregion
-    }
-
-    class UndoCollection : CollectionBase<CommandInfo>
-    {
-        
-    }
+      }
+    }
+
+    /// <summary>
+    /// Gets the undo list.
+    /// </summary>
+    /// <value>The undo list.</value>
+    internal UndoCollection UndoList {
+      get { return undoList; }
+    }
+    #endregion
+
+    #region Methods
+    /// <summary>
+    /// Raises the OnHistoryChange event
+    /// </summary>
+    private void RaiseHistoryChange() {
+      if (OnHistoryChange != null)
+        OnHistoryChange(this, EventArgs.Empty);
+    }
+    /// <summary>
+    /// Register a new undo command. Use this method after your
+    /// application has performed an operation/command that is
+    /// undoable.
+    /// </summary>
+    /// <param name="cmd">New command to add to the manager.</param>
+    public void AddUndoCommand(ICommand cmd) {
+      Debug.Assert(cmd != null);
+      Debug.Assert(undoList.Count <= undoLevel);
+
+      if (undoLevel == 0)
+        return;
+
+      CommandInfo info = null;
+      if (undoList.Count == undoLevel) {
+        // Remove the oldest entry from the undo list to make room.
+        info = (CommandInfo)undoList[0];
+        undoList.RemoveAt(0);
+      }
+
+      // Insert the new undoable command into the undo list.
+      if (info == null)
+        info = new CommandInfo();
+      info.Command = cmd;
+      info.Handler = null;
+      undoList.Add(info);
+
+      // Clear the redo stack.
+      ClearRedo();
+    }
+
+    /// <summary>
+    /// Register a new undo command along with an undo handler. The
+    /// undo handler is used to perform the actual undo or redo
+    /// operation later when requested.
+    /// </summary>
+    /// <param name="cmd">New command to add to the manager.</param>
+    /// <param name="undoHandler">Undo handler to perform the actual undo/redo operation.</param>
+    public void AddUndoCommand(ICommand cmd, IUndoSupport undoHandler) {
+      AddUndoCommand(cmd);
+
+      if (undoList.Count > 0) {
+        CommandInfo info = (CommandInfo)undoList[undoList.Count - 1];
+        Debug.Assert(info != null);
+        info.Handler = undoHandler;
+      }
+    }
+
+    /// <summary>
+    /// Clear the internal undo/redo data structures. Use this method
+    /// when your application performs an operation that cannot be undone.
+    /// For example, when the user "saves" or "commits" all the changes in
+    /// the application.
+    /// </summary>
+    public void ClearUndoRedo() {
+      ClearUndo();
+      ClearRedo();
+    }
+
+    /// <summary>
+    /// Check if there is something to undo. Use this method to decide
+    /// whether your application's "Undo" menu item should be enabled
+    /// or disabled.
+    /// </summary>
+    /// <returns>Returns true if there is something to undo, false otherwise.</returns>
+    public bool CanUndo() {
+      return undoList.Count > 0;
+    }
+
+    /// <summary>
+    /// Check if there is something to redo. Use this method to decide
+    /// whether your application's "Redo" menu item should be enabled
+    /// or disabled.
+    /// </summary>
+    /// <returns>Returns true if there is something to redo, false otherwise.</returns>
+    public bool CanRedo() {
+      return redoStack.Count > 0;
+    }
+
+    /// <summary>
+    /// Perform the undo operation. If an undo handler is specified, it
+    /// will be used to perform the actual operation. Otherwise, the command
+    /// instance is asked to perform the undo.
+    /// </summary>
+    public void Undo() {
+      if (!CanUndo())
+        return;
+
+      // Remove newest entry from the undo list.
+      CommandInfo info = (CommandInfo)undoList[undoList.Count - 1];
+      undoList.RemoveAt(undoList.Count - 1);
+
+      // Perform the undo.
+      Debug.Assert(info.Command != null);
+
+      info.Command.Undo();
+
+      // Now the command is available for redo. Push it onto
+      // the redo stack.
+      redoStack.Push(info);
+    }
+
+    /// <summary>
+    /// Perform the redo operation. If an undo handler is specified, it
+    /// will be used to perform the actual operation. Otherwise, the command
+    /// instance is asked to perform the redo.
+    /// </summary>
+    public void Redo() {
+      if (!CanRedo())
+        return;
+
+      // Remove newest entry from the redo stack.
+      CommandInfo info = (CommandInfo)redoStack.Pop();
+
+      // Perform the redo.
+      Debug.Assert(info.Command != null);
+
+      info.Command.Redo();
+
+      // Now the command is available for undo again. Put it back
+      // into the undo list.
+      undoList.Add(info);
+    }
+
+    /// <summary>
+    /// Get the text value of the next undo command. Use this method
+    /// to update the Text property of your "Undo" menu item if
+    /// desired. For example, the text value for a command might be
+    /// "Draw Circle". This allows you to change your menu item Text
+    /// property to "Undo Draw Circle".
+    /// </summary>
+    /// <returns>Text value of the next undo command.</returns>
+    public string UndoText {
+      get {
+        ICommand cmd = NextUndoCommand;
+        if (cmd == null)
+          return "";
+        return cmd.Text;
+      }
+    }
+
+    /// <summary>
+    /// <para>
+    /// Get the text value of the next redo command. Use this method
+    /// to update the Text property of your "Redo" menu item if desired.
+    /// For example, the text value for a command might be "Draw Line".
+    /// This allows you to change your menu item text to "Redo Draw Line".
+    /// </para>
+    /// </summary>
+    /// <value>The redo text.</value>
+    /// <returns>Text value of the next redo command.</returns>
+    public string RedoText {
+      get {
+        ICommand cmd = NextRedoCommand;
+        if (cmd == null)
+          return "";
+        return cmd.Text;
+      }
+    }
+
+    /// <summary>
+    /// Get the next (or newest) undo command. This is like a "Peek"
+    /// method. It does not remove the command from the undo list.
+    /// </summary>
+    /// <returns>The next undo command.</returns>
+    public ICommand NextUndoCommand {
+      get {
+        if (undoList.Count == 0)
+          return null;
+        CommandInfo info = (CommandInfo)undoList[undoList.Count - 1];
+        return info.Command;
+      }
+    }
+
+    /// <summary>
+    /// Get the next redo command. This is like a "Peek"
+    /// method. It does not remove the command from the redo stack.
+    /// </summary>
+    /// <returns>The next redo command.</returns>
+    public ICommand NextRedoCommand {
+      get {
+        if (redoStack.Count == 0)
+          return null;
+        CommandInfo info = (CommandInfo)redoStack.Peek();
+        return info.Command;
+      }
+
+    }
+
+    /// <summary>
+    /// Retrieve all of the undo commands. Useful for debugging,
+    /// to analyze the contents of the undo list.
+    /// </summary>
+    /// <returns>Array of commands for undo.</returns>
+    public ICommand[] GetUndoCommands() {
+      if (undoList.Count == 0)
+        return null;
+
+      ICommand[] cmdList = new ICommand[undoList.Count];
+      object[] objList = undoList.ToArray();
+      for (int i = 0; i < objList.Length; i++) {
+        CommandInfo info = (CommandInfo)objList[i];
+        cmdList[i] = info.Command;
+      }
+
+      return cmdList;
+    }
+
+    /// <summary>
+    /// Retrieve all of the redo commands. Useful for debugging,
+    /// to analyze the contents of the redo stack.
+    /// </summary>
+    /// <returns>Array of commands for redo.</returns>
+    public ICommand[] GetRedoCommands() {
+      if (redoStack.Count == 0)
+        return null;
+
+      ICommand[] cmdList = new ICommand[redoStack.Count];
+      object[] objList = redoStack.ToArray();
+      for (int i = 0; i < objList.Length; i++) {
+        CommandInfo info = (CommandInfo)objList[i];
+        cmdList[i] = info.Command;
+      }
+
+      return cmdList;
+    }
+
+    /// <summary>
+    /// Clear the contents of the undo list.
+    /// </summary>
+    private void ClearUndo() {
+      while (undoList.Count > 0) {
+        CommandInfo info = (CommandInfo)undoList[undoList.Count - 1];
+        undoList.RemoveAt(undoList.Count - 1);
+        info.Command = null;
+        info.Handler = null;
+      }
+    }
+
+    /// <summary>
+    /// Clear the contents of the redo stack.
+    /// </summary>
+    private void ClearRedo() {
+      while (redoStack.Count > 0) {
+        CommandInfo info = (CommandInfo)redoStack.Pop();
+        info.Command = null;
+        info.Handler = null;
+      }
+    }
+    #endregion
+  }
+
+  class UndoCollection : CollectionBase<CommandInfo> {
+
+  }
 }
 
Index: /trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.Netron/3.0.2672.12446/Netron.Diagramming.Core-3.0.2672.12446/Utils/Bundle.cs
===================================================================
--- /trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.Netron/3.0.2672.12446/Netron.Diagramming.Core-3.0.2672.12446/Utils/Bundle.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.Netron/3.0.2672.12446/Netron.Diagramming.Core-3.0.2672.12446/Utils/Bundle.cs	(revision 4068)
@@ -1,255 +1,223 @@
 using System;
 using System.Drawing;
-using System.Collections.Generic;
-using System.Text;
 using System.Runtime.Serialization;
 using System.Windows.Forms;
-using System.Drawing.Drawing2D;
-namespace Netron.Diagramming.Core
-{
-    /// <summary>
-    /// A bundle is a collection of diagram entities which does not 
-    /// necessarily have a place in the scene graph but merely serves
-    /// to bundle items together. Various actions and functions are made 
-    /// possible by bundles; cut/copy/paste, templates, user selections 
-    /// and so on.  While a group can have sub-groups, bundles cannot be 
-    /// contained in another and are not necessarily connected (in the sense 
-    /// of a connected branch in the scene graph).
-    /// </summary>
-    [Serializable()]
-    public class Bundle : DiagramEntityBase, IBundle, ISerializable
-    {
-
-        #region Fields
-        /// <summary>
-        /// the Shapes field
-        /// </summary>
-        private CollectionBase<IDiagramEntity> mEntities = 
-            new CollectionBase<IDiagramEntity>();
-
-        #endregion
-
-        #region Properties
-        /// <summary>
-        /// Gets or sets the entities.
-        /// </summary>
-        /// <value>The m entities.</value>
-        public CollectionBase<IDiagramEntity> Entities
-        {
-            get
-            {
-                return mEntities;
+namespace Netron.Diagramming.Core {
+  /// <summary>
+  /// A bundle is a collection of diagram entities which does not 
+  /// necessarily have a place in the scene graph but merely serves
+  /// to bundle items together. Various actions and functions are made 
+  /// possible by bundles; cut/copy/paste, templates, user selections 
+  /// and so on.  While a group can have sub-groups, bundles cannot be 
+  /// contained in another and are not necessarily connected (in the sense 
+  /// of a connected branch in the scene graph).
+  /// </summary>
+  [Serializable()]
+  public class Bundle : DiagramEntityBase, IBundle, ISerializable {
+
+    #region Fields
+    /// <summary>
+    /// the Shapes field
+    /// </summary>
+    private CollectionBase<IDiagramEntity> mEntities =
+        new CollectionBase<IDiagramEntity>();
+
+    #endregion
+
+    #region Properties
+    /// <summary>
+    /// Gets or sets the entities.
+    /// </summary>
+    /// <value>The m entities.</value>
+    public CollectionBase<IDiagramEntity> Entities {
+      get {
+        return mEntities;
+      }
+    }
+    /// <summary>
+    /// Gets the name of the entity.
+    /// </summary>
+    /// <value>The name of the entity.</value>
+    public override string EntityName {
+      get { return "bundle"; }
+    }
+
+    /// <summary>
+    /// Gets the area that all entities in the bundle encompass.
+    /// </summary>
+    /// <value>The rectangle.</value>
+    public override Rectangle Rectangle {
+      get {
+        if (mEntities.Count == 1) {
+          return mEntities[0].Rectangle;
+        } else if (mEntities.Count > 1) {
+          Rectangle union = mEntities[0].Rectangle;
+          for (int i = 1; i < mEntities.Count; i++) {
+            IDiagramEntity entity = mEntities[i];
+            if (entity.Rectangle != Rectangle.Empty) {
+              union = Rectangle.Union(union, entity.Rectangle);
             }
+          }
+          //maybe this should be inflated a little here?
+          return union;
+        } else {
+          return Rectangle.Empty;
         }
-        /// <summary>
-        /// Gets the name of the entity.
-        /// </summary>
-        /// <value>The name of the entity.</value>
-        public override string EntityName
-        {
-            get { return "bundle"; }
-        }
-
-        /// <summary>
-        /// Gets the area that all entities in the bundle encompass.
-        /// </summary>
-        /// <value>The rectangle.</value>
-        public override Rectangle Rectangle
-        {
-            get
-            {
-                if (mEntities.Count == 1)
-                {
-                    return mEntities[0].Rectangle;
-                }
-                else if (mEntities.Count > 1)
-                {
-                    Rectangle union = mEntities[0].Rectangle;
-                    for (int i = 1; i < mEntities.Count; i++)
-                    {
-                        IDiagramEntity entity = mEntities[i];
-                        if (entity.Rectangle != Rectangle.Empty)
-                        {
-                            union = Rectangle.Union(union, entity.Rectangle);
-                        }
-                    }
-                    //maybe this should be inflated a little here?
-                    return union;
-                }
-                else
-                {
-                    return Rectangle.Empty;
-                }
-            }
-             //set { throw new InconsistencyException("The rectangle of a bundle is the union of its constituents and cannot be set."); }
-        }
-
-        #endregion
-
-        #region Constructor
-
-        /// <summary>
-        /// Initializes a new instance of the <see cref="T:Bundle"/> class.
-        /// </summary>
-        public Bundle(IModel model) : base(model)
-        {
-            mEntities = new CollectionBase<IDiagramEntity>();
-        }
-
-        /// <summary>
-        /// Initializes a new instance of the <see cref="T:Bundle"/> class.
-        /// </summary>
-        /// <param name="info">The info.</param>
-        /// <param name="context">The context.</param>
-        protected Bundle(
-            SerializationInfo info, 
-            StreamingContext context) : base(info, context)
-        {
-            throw new NotImplementedException();
-        }
-        /// <summary>
-        /// Initializes a new instance of the <see cref="T:Bundle"/> class.
-        /// </summary>
-        public Bundle() : base()
-        {
-            mEntities = new CollectionBase<IDiagramEntity>();
-        }
-
-        /// <summary>
-        /// Creates a new bundle using a given collection of diagram entities.
-        /// </summary>
-        /// <param name="collection"></param>
-        public Bundle(CollectionBase<IDiagramEntity> collection) : base()
-        {
-            
-            mEntities = new CollectionBase<IDiagramEntity>();
-            //we could assign it directly but let's make sure the collection does not
-            //contain unwanted elements
-                foreach (IDiagramEntity entity in collection)
-                {
-                    if ((entity is IShape) || (entity is IConnection) || (entity is IGroup))
-                        mEntities.Add(entity);
-                }
-             
-            //the following line would give problem. The event handler attached to the Selection would be triggered when
-            //the mEntities collection is changed!
-            //mEntities = collection;
-
-        }
-
-        #endregion
-
-        #region Methods
-        /// <summary>
-        /// The custom menu to be added to the base menu of this entity
-        /// </summary>
-        /// <returns>ToolStripItem[]</returns>
-        public override ToolStripItem[] Menu()
-        {
-            return null;
-        }
-
-        // ------------------------------------------------------------------
-        /// <summary>
-        /// Sets the 'IsSelected' property to false for all entities in the 
-        /// bundle.
-        /// </summary>
-        // ------------------------------------------------------------------
-        public void DeSelectAll()
-        {
-            foreach (IDiagramEntity entity in mEntities)
-            {
-                entity.IsSelected = false;
-            }
-        }
-
-        // ------------------------------------------------------------------
-        /// <summary>
-        /// Sets the 'Hovered' property for all entities in the bundle to
-        /// the value specified.
-        /// </summary>
-        // ------------------------------------------------------------------
-        public void SetHovered(bool isHovered)
-        {
-            foreach (IDiagramEntity entity in mEntities)
-            {
-                entity.Hovered = isHovered;
-            }
-        }
-
-        // ------------------------------------------------------------------
-        /// <summary>
-        /// Populates a 
-        /// <see cref="T:System.Runtime.Serialization.SerializationInfo"></see> 
-        /// with the data needed to serialize the target object.
-        /// </summary>
-        /// <param name="info">The 
-        /// <see cref="T:System.Runtime.Serialization.SerializationInfo"></see> 
-        /// to populate with data.</param>
-        /// <param name="context">The destination (see 
-        /// <see cref="T:System.Runtime.Serialization.StreamingContext"></see>) 
-        /// for this serialization.</param>
-        /// <exception cref="T:System.Security.SecurityException">The caller 
-        /// does not have the required permission. </exception>
-        // ------------------------------------------------------------------
-        public override void GetObjectData(
-            SerializationInfo info, 
-            StreamingContext context)
-        {
-            throw new NotImplementedException();
-        }
-
-        // ------------------------------------------------------------------
-        /// <summary>
-        /// Paints the bundle.
-        /// </summary>
-        /// <param name="g">Graphics</param>
-        // ------------------------------------------------------------------
-        public override void Paint(Graphics g)
-        {
-            foreach (IDiagramEntity entity in mEntities)
-            {
-                entity.Paint(g);
-            }
-        }
-
-        /// <summary>
-        /// Tests whether the bundle is hit by the mouse
-        /// </summary>
-        /// <param name="p"></param>
-        /// <returns></returns>
-        public override bool Hit(Point p)
-        {
-            foreach (IDiagramEntity entity in mEntities)
-            {
-                if (entity.Hit(p)) return true;
-            }
-            return false;
-        }
-
-        /// <summary>
-        /// Invalidates the entity
-        /// </summary>
-        public override void Invalidate()
-        {
-            foreach (IDiagramEntity entity in mEntities)
-            {
-                entity.Invalidate();
-            }
-        }
-
-        /// <summary>
-        /// Moves the entity on the canvas
-        /// </summary>
-        /// <param name="p">a shift vector</param>
-        public override void MoveBy(Point p)
-        {
-            foreach (IDiagramEntity entity in mEntities)
-            {
-                entity.MoveBy(p);
-            }
-        }
-       
-        #endregion
-    }
+      }
+      //set { throw new InconsistencyException("The rectangle of a bundle is the union of its constituents and cannot be set."); }
+    }
+
+    #endregion
+
+    #region Constructor
+
+    /// <summary>
+    /// Initializes a new instance of the <see cref="T:Bundle"/> class.
+    /// </summary>
+    public Bundle(IModel model)
+      : base(model) {
+      mEntities = new CollectionBase<IDiagramEntity>();
+    }
+
+    /// <summary>
+    /// Initializes a new instance of the <see cref="T:Bundle"/> class.
+    /// </summary>
+    /// <param name="info">The info.</param>
+    /// <param name="context">The context.</param>
+    protected Bundle(
+        SerializationInfo info,
+        StreamingContext context)
+      : base(info, context) {
+      throw new NotImplementedException();
+    }
+    /// <summary>
+    /// Initializes a new instance of the <see cref="T:Bundle"/> class.
+    /// </summary>
+    public Bundle()
+      : base() {
+      mEntities = new CollectionBase<IDiagramEntity>();
+    }
+
+    /// <summary>
+    /// Creates a new bundle using a given collection of diagram entities.
+    /// </summary>
+    /// <param name="collection"></param>
+    public Bundle(CollectionBase<IDiagramEntity> collection)
+      : base() {
+
+      mEntities = new CollectionBase<IDiagramEntity>();
+      //we could assign it directly but let's make sure the collection does not
+      //contain unwanted elements
+      foreach (IDiagramEntity entity in collection) {
+        if ((entity is IShape) || (entity is IConnection) || (entity is IGroup))
+          mEntities.Add(entity);
+      }
+
+      //the following line would give problem. The event handler attached to the Selection would be triggered when
+      //the mEntities collection is changed!
+      //mEntities = collection;
+
+    }
+
+    #endregion
+
+    #region Methods
+    /// <summary>
+    /// The custom menu to be added to the base menu of this entity
+    /// </summary>
+    /// <returns>ToolStripItem[]</returns>
+    public override ToolStripItem[] Menu() {
+      return null;
+    }
+
+    // ------------------------------------------------------------------
+    /// <summary>
+    /// Sets the 'IsSelected' property to false for all entities in the 
+    /// bundle.
+    /// </summary>
+    // ------------------------------------------------------------------
+    public void DeSelectAll() {
+      foreach (IDiagramEntity entity in mEntities) {
+        entity.IsSelected = false;
+      }
+    }
+
+    // ------------------------------------------------------------------
+    /// <summary>
+    /// Sets the 'Hovered' property for all entities in the bundle to
+    /// the value specified.
+    /// </summary>
+    // ------------------------------------------------------------------
+    public void SetHovered(bool isHovered) {
+      foreach (IDiagramEntity entity in mEntities) {
+        entity.Hovered = isHovered;
+      }
+    }
+
+    // ------------------------------------------------------------------
+    /// <summary>
+    /// Populates a 
+    /// <see cref="T:System.Runtime.Serialization.SerializationInfo"></see> 
+    /// with the data needed to serialize the target object.
+    /// </summary>
+    /// <param name="info">The 
+    /// <see cref="T:System.Runtime.Serialization.SerializationInfo"></see> 
+    /// to populate with data.</param>
+    /// <param name="context">The destination (see 
+    /// <see cref="T:System.Runtime.Serialization.StreamingContext"></see>) 
+    /// for this serialization.</param>
+    /// <exception cref="T:System.Security.SecurityException">The caller 
+    /// does not have the required permission. </exception>
+    // ------------------------------------------------------------------
+    public override void GetObjectData(
+        SerializationInfo info,
+        StreamingContext context) {
+      throw new NotImplementedException();
+    }
+
+    // ------------------------------------------------------------------
+    /// <summary>
+    /// Paints the bundle.
+    /// </summary>
+    /// <param name="g">Graphics</param>
+    // ------------------------------------------------------------------
+    public override void Paint(Graphics g) {
+      foreach (IDiagramEntity entity in mEntities) {
+        entity.Paint(g);
+      }
+    }
+
+    /// <summary>
+    /// Tests whether the bundle is hit by the mouse
+    /// </summary>
+    /// <param name="p"></param>
+    /// <returns></returns>
+    public override bool Hit(Point p) {
+      foreach (IDiagramEntity entity in mEntities) {
+        if (entity.Hit(p)) return true;
+      }
+      return false;
+    }
+
+    /// <summary>
+    /// Invalidates the entity
+    /// </summary>
+    public override void Invalidate() {
+      foreach (IDiagramEntity entity in mEntities) {
+        entity.Invalidate();
+      }
+    }
+
+    /// <summary>
+    /// Moves the entity on the canvas
+    /// </summary>
+    /// <param name="p">a shift vector</param>
+    public override void MoveBy(Point p) {
+      foreach (IDiagramEntity entity in mEntities) {
+        entity.MoveBy(p);
+      }
+    }
+
+    #endregion
+  }
 }
Index: /trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.Netron/3.0.2672.12446/Netron.Diagramming.Core-3.0.2672.12446/Utils/Display.cs
===================================================================
--- /trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.Netron/3.0.2672.12446/Netron.Diagramming.Core-3.0.2672.12446/Utils/Display.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.Netron/3.0.2672.12446/Netron.Diagramming.Core-3.0.2672.12446/Utils/Display.cs	(revision 4068)
@@ -1,12 +1,7 @@
-﻿using System;
-using System.Collections.Generic;
-using System.Text;
-
-namespace Netron.Diagramming.Core
-{
-    public static class Display
-    {
-        public static float DpiX = 96F;
-        public static float DpiY = 96F;
-    }
+﻿
+namespace Netron.Diagramming.Core {
+  public static class Display {
+    public static float DpiX = 96F;
+    public static float DpiY = 96F;
+  }
 }
Index: /trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.Netron/3.0.2672.12446/Netron.Diagramming.Core-3.0.2672.12446/Utils/EntityBone.cs
===================================================================
--- /trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.Netron/3.0.2672.12446/Netron.Diagramming.Core-3.0.2672.12446/Utils/EntityBone.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.Netron/3.0.2672.12446/Netron.Diagramming.Core-3.0.2672.12446/Utils/EntityBone.cs	(revision 4068)
@@ -1,44 +1,36 @@
-using System;
-using System.Diagnostics;
-using System.Collections;
 using System.Drawing;
-using System.Windows.Forms;
 
-namespace Netron.Diagramming.Core
-{
+namespace Netron.Diagramming.Core {
+  /// <summary>
+  /// Bare bone structure of an entity related to a scaling transformation
+  /// </summary>
+  public struct EntityBone {
     /// <summary>
-    /// Bare bone structure of an entity related to a scaling transformation
+    /// the rectangle of the entity
     /// </summary>
-    public struct EntityBone
-    {
-        /// <summary>
-        /// the rectangle of the entity
-        /// </summary>
-        private Rectangle mRectangle;
-        /// <summary>
-        /// the connector points
-        /// </summary>
-        private Point[] mConnectorPoints;
+    private Rectangle mRectangle;
+    /// <summary>
+    /// the connector points
+    /// </summary>
+    private Point[] mConnectorPoints;
 
-        /// <summary>
-        /// Gets or sets the rectangle.
-        /// </summary>
-        /// <value>The rectangle.</value>
-        public Rectangle Rectangle
-        {
-            get { return mRectangle; }
-            set { mRectangle = value; }
-        }
+    /// <summary>
+    /// Gets or sets the rectangle.
+    /// </summary>
+    /// <value>The rectangle.</value>
+    public Rectangle Rectangle {
+      get { return mRectangle; }
+      set { mRectangle = value; }
+    }
 
 
-        /// <summary>
-        /// Gets or sets the connector points.
-        /// </summary>
-        /// <value>The connector points.</value>
-        public Point[] ConnectorPoints
-        {
-            get { return mConnectorPoints; }
-            set { mConnectorPoints = value; }
-        }
+    /// <summary>
+    /// Gets or sets the connector points.
+    /// </summary>
+    /// <value>The connector points.</value>
+    public Point[] ConnectorPoints {
+      get { return mConnectorPoints; }
+      set { mConnectorPoints = value; }
     }
+  }
 }
Index: /trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.Netron/3.0.2672.12446/Netron.Diagramming.Core-3.0.2672.12446/Utils/Formatting.cs
===================================================================
--- /trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.Netron/3.0.2672.12446/Netron.Diagramming.Core-3.0.2672.12446/Utils/Formatting.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.Netron/3.0.2672.12446/Netron.Diagramming.Core-3.0.2672.12446/Utils/Formatting.cs	(revision 4068)
@@ -1,17 +1,11 @@
 
 using System;
-using System.Reflection;
-using System.Reflection.Emit;
-using System.Diagnostics;
+using System.Collections.Generic;
 using System.Text;
-using System.Collections;
-using System.Collections.Generic;
-namespace Netron.Diagramming.Core
-{
+namespace Netron.Diagramming.Core {
   /// <summary>
   /// <i>(Describe usage of "L:300" format string.)</i>
   /// </summary>
-  public interface IShowable : IFormattable
-  {
+  public interface IShowable : IFormattable {
     //TODO: wonder if we should use TextWriters instead of StringBuilders?
     /// <summary>
@@ -33,6 +27,5 @@
   /// 
   /// </summary>
-  public static class Showing
-  {
+  public static class Showing {
     /// <summary>
     /// Show  <code>Object obj</code> by appending it to <code>stringbuilder</code>
@@ -43,6 +36,5 @@
     /// <param name="formatProvider"></param>
     /// <returns>True if <code>obj</code> was shown completely.</returns>
-    public static bool Show(Object obj, StringBuilder stringbuilder, ref int rest, IFormatProvider formatProvider)
-    {
+    public static bool Show(Object obj, StringBuilder stringbuilder, ref int rest, IFormatProvider formatProvider) {
       if (rest <= 0)
         return false;
@@ -62,6 +54,5 @@
     /// <param name="formatProvider"></param>
     /// <returns></returns>
-    public static String ShowString(IShowable showable, String format, IFormatProvider formatProvider)
-    {
+    public static String ShowString(IShowable showable, String format, IFormatProvider formatProvider) {
       int rest = maxLength(format);
       StringBuilder sb = new StringBuilder();
@@ -75,14 +66,11 @@
     /// <param name="format"></param>
     /// <returns></returns>
-    static int maxLength(String format)
-    {
+    static int maxLength(String format) {
       //TODO: validate format string
       if (format == null)
         return 80;
-      if (format.Length > 1 && format.StartsWith("L"))
-      {
+      if (format.Length > 1 && format.StartsWith("L")) {
         return int.Parse(format.Substring(1));
-      }
-      else
+      } else
         return int.MaxValue;
     }
@@ -97,23 +85,19 @@
     /// <param name="formatProvider"></param>
     /// <returns>True if collection was shown completely</returns>
-    public static bool ShowCollectionValue<T>(ICollectionBase<T> items, StringBuilder stringbuilder, ref int rest, IFormatProvider formatProvider)
-    {
+    public static bool ShowCollectionValue<T>(ICollectionBase<T> items, StringBuilder stringbuilder, ref int rest, IFormatProvider formatProvider) {
       string startdelim = "{ ", enddelim = " }";
       bool showIndexes = false;
-      
+
       //TODO: do not test here at run time, but select code at compile time
       //      perhaps by delivering the print type to this metod
-      if (items is IList<T>)
-      {
+      if (items is IList<T>) {
         startdelim = "[ ";
         enddelim = " ]";
-       
-      }
-      else if (items is ICollection<T>)
-      {
-       
-          startdelim = "{{ ";
-          enddelim = " }}";
-       
+
+      } else if (items is ICollection<T>) {
+
+        startdelim = "{{ ";
+        enddelim = " }}";
+
       }
 
@@ -124,8 +108,7 @@
       int index = 0;
 
-     
+
       {
-        foreach (T x in items)
-        {
+        foreach (T x in items) {
           complete = false;
           if (rest <= 0)
@@ -133,11 +116,9 @@
           if (first)
             first = false;
-          else
-          {
+          else {
             stringbuilder.Append(", ");
             rest -= 2;
           }
-          if (showIndexes)
-          {
+          if (showIndexes) {
             string indexString = string.Format("{0}:", index++);
             stringbuilder.Append(indexString);
@@ -147,6 +128,5 @@
         }
       }
-      if (!complete)
-      {
+      if (!complete) {
         stringbuilder.Append("...");
         rest -= 3;
@@ -167,6 +147,5 @@
     /// <param name="rest"></param>
     /// <returns></returns>
-    public static bool ShowDictionary<K, V>(IDictionary<K, V> dictionary, StringBuilder stringbuilder, ref int rest, IFormatProvider formatProvider)
-    {
+    public static bool ShowDictionary<K, V>(IDictionary<K, V> dictionary, StringBuilder stringbuilder, ref int rest, IFormatProvider formatProvider) {
       stringbuilder.Append("{ ");
       rest -= 4;				   // Account for "( " and " )"
@@ -174,6 +153,5 @@
       bool complete = true;
 
-      foreach (KeyValuePair<K, V> p in dictionary)
-      {
+      foreach (KeyValuePair<K, V> p in dictionary) {
         complete = false;
         if (rest <= 0)
@@ -181,6 +159,5 @@
         if (first)
           first = false;
-        else
-        {
+        else {
           stringbuilder.Append(", ");
           rest -= 2;
@@ -188,10 +165,9 @@
         complete = Showing.Show(p, stringbuilder, ref rest, formatProvider);
       }
-      if (!complete)
-      {
+      if (!complete) {
         stringbuilder.Append("...");
         rest -= 3;
       }
-      stringbuilder.Append( " }");
+      stringbuilder.Append(" }");
       return complete;
     }
Index: /trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.Netron/3.0.2672.12446/Netron.Diagramming.Core-3.0.2672.12446/Utils/ImageExporter.cs
===================================================================
--- /trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.Netron/3.0.2672.12446/Netron.Diagramming.Core-3.0.2672.12446/Utils/ImageExporter.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.Netron/3.0.2672.12446/Netron.Diagramming.Core-3.0.2672.12446/Utils/ImageExporter.cs	(revision 4068)
@@ -1,114 +1,109 @@
 using System;
-using System.Collections.Generic;
-using System.Text;
-using System.Runtime.InteropServices;
 using System.Drawing;
 using System.Drawing.Drawing2D;
+using System.Runtime.InteropServices;
 
-namespace Netron.Diagramming.Core
-{
-    public class ImageExporter
-    {
-        public static Bitmap FromBundle(IBundle bundle, Graphics g)
-        {
-            // The entities will be drawn to our graphics surface using
-            // their locations on the canvas.  We want them to be drawn
-            // relative to the 0,0 (upper, left corner) of our image.
-            // Therefore, calculate the offset required to position them
-            // (normalize) in our image and apply that translation to
-            // g2, the GDI+ drawing surface used to paint the entities to
-            // the image.  Notice we're actually calculating the offset
-            // relative to location 5,5.  We adjusting the image height
-            // and widht by 10 to ensure we catch everything, so by using
-            // location 5,5 here we kept things centered.
-            Point offset = new Point(
-                5 - bundle.Rectangle.X,
-                5 - bundle.Rectangle.Y);
-            Matrix matrix = new Matrix();
-            matrix.Translate(offset.X, offset.Y);
+namespace Netron.Diagramming.Core {
+  public class ImageExporter {
+    public static Bitmap FromBundle(IBundle bundle, Graphics g) {
+      // The entities will be drawn to our graphics surface using
+      // their locations on the canvas.  We want them to be drawn
+      // relative to the 0,0 (upper, left corner) of our image.
+      // Therefore, calculate the offset required to position them
+      // (normalize) in our image and apply that translation to
+      // g2, the GDI+ drawing surface used to paint the entities to
+      // the image.  Notice we're actually calculating the offset
+      // relative to location 5,5.  We adjusting the image height
+      // and widht by 10 to ensure we catch everything, so by using
+      // location 5,5 here we kept things centered.
+      Point offset = new Point(
+          5 - bundle.Rectangle.X,
+          5 - bundle.Rectangle.Y);
+      Matrix matrix = new Matrix();
+      matrix.Translate(offset.X, offset.Y);
 
-            Rectangle bundleArea = bundle.Rectangle;
-           // bundleArea.Inflate(5, 5);
+      Rectangle bundleArea = bundle.Rectangle;
+      // bundleArea.Inflate(5, 5);
 
-            Bitmap image = new Bitmap(
-                bundleArea.Width + 10,
-                bundleArea.Height + 10,
-                g);
-            Graphics g2 = Graphics.FromImage(image);
-            g2.Transform = matrix;
+      Bitmap image = new Bitmap(
+          bundleArea.Width + 10,
+          bundleArea.Height + 10,
+          g);
+      Graphics g2 = Graphics.FromImage(image);
+      g2.Transform = matrix;
 
 
-            // The background color is a weird blue, so I'm filling the
-            // entire area first with a white color to get around this.
-            g2.Clear(Color.White);
-            g2.SmoothingMode = SmoothingMode.HighQuality;
-            g2.CompositingQuality = CompositingQuality.HighQuality;
-            g2.InterpolationMode = InterpolationMode.HighQualityBicubic;
+      // The background color is a weird blue, so I'm filling the
+      // entire area first with a white color to get around this.
+      g2.Clear(Color.White);
+      g2.SmoothingMode = SmoothingMode.HighQuality;
+      g2.CompositingQuality = CompositingQuality.HighQuality;
+      g2.InterpolationMode = InterpolationMode.HighQualityBicubic;
 
-            // Deselect and set Hovered to 'false' for all entities so 
-            // they're drawn to the image in their *normal* state.
-            bundle.DeSelectAll();
-            bundle.SetHovered(false);
-            bundle.Paint(g2);
+      // Deselect and set Hovered to 'false' for all entities so 
+      // they're drawn to the image in their *normal* state.
+      bundle.DeSelectAll();
+      bundle.SetHovered(false);
+      bundle.Paint(g2);
 
-            g.Flush();
-            g2.Flush();
-            g.Dispose();
-            g2.Dispose();
+      g.Flush();
+      g2.Flush();
+      g.Dispose();
+      g2.Dispose();
 
-            //System.IntPtr dc1 = g.GetHdc();
+      //System.IntPtr dc1 = g.GetHdc();
 
-            //System.IntPtr dc2 = g2.GetHdc();
+      //System.IntPtr dc2 = g2.GetHdc();
 
-            //BitBlt(dc2, 0, 0, width, height, dc1, 0, 0, 0x00CC0020);
+      //BitBlt(dc2, 0, 0, width, height, dc1, 0, 0, 0x00CC0020);
 
-            //g.ReleaseHdc(dc1);
+      //g.ReleaseHdc(dc1);
 
-            //g2.ReleaseHdc(dc2);
+      //g2.ReleaseHdc(dc2);
 
-            //g.Dispose();
+      //g.Dispose();
 
-            //g2.Dispose();
-            return image;
-        }
+      //g2.Dispose();
+      return image;
+    }
 
-        // ------------------------------------------------------------------
-        /// <summary>
-        /// GDI32 imported function not available in the framework,
-        /// used here to create an image.
-        /// </summary>
-        /// <param name="hdcDest"></param>
-        /// <param name="nXDest"></param>
-        /// <param name="nYDest"></param>
-        /// <param name="nWidth"></param>
-        /// <param name="nHeight"></param>
-        /// <param name="hdcSrc"></param>
-        /// <param name="nXSrc"></param>
-        /// <param name="nYSrc"></param>
-        /// <param name="dwRop"></param>
-        /// <returns></returns>
-        // ------------------------------------------------------------------
-        [DllImport("gdi32.dll")]
-        private static extern bool BitBlt(
+    // ------------------------------------------------------------------
+    /// <summary>
+    /// GDI32 imported function not available in the framework,
+    /// used here to create an image.
+    /// </summary>
+    /// <param name="hdcDest"></param>
+    /// <param name="nXDest"></param>
+    /// <param name="nYDest"></param>
+    /// <param name="nWidth"></param>
+    /// <param name="nHeight"></param>
+    /// <param name="hdcSrc"></param>
+    /// <param name="nXSrc"></param>
+    /// <param name="nYSrc"></param>
+    /// <param name="dwRop"></param>
+    /// <returns></returns>
+    // ------------------------------------------------------------------
+    [DllImport("gdi32.dll")]
+    private static extern bool BitBlt(
 
-            IntPtr hdcDest, // handle to destination DC
+        IntPtr hdcDest, // handle to destination DC
 
-            int nXDest, // x-coord of destination upper-left corner
+        int nXDest, // x-coord of destination upper-left corner
 
-            int nYDest, // y-coord of destination upper-left corner
+        int nYDest, // y-coord of destination upper-left corner
 
-            int nWidth, // width of destination rectangle
+        int nWidth, // width of destination rectangle
 
-            int nHeight, // height of destination rectangle
+        int nHeight, // height of destination rectangle
 
-            IntPtr hdcSrc, // handle to source DC
+        IntPtr hdcSrc, // handle to source DC
 
-            int nXSrc, // x-coordinate of source upper-left corner
+        int nXSrc, // x-coordinate of source upper-left corner
 
-            int nYSrc, // y-coordinate of source upper-left corner
+        int nYSrc, // y-coordinate of source upper-left corner
 
-            System.Int32 dwRop // raster operation code
+        System.Int32 dwRop // raster operation code
 
-            );
-    }
+        );
+  }
 }
Index: /trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.Netron/3.0.2672.12446/Netron.Diagramming.Core-3.0.2672.12446/Utils/Measurements.cs
===================================================================
--- /trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.Netron/3.0.2672.12446/Netron.Diagramming.Core-3.0.2672.12446/Utils/Measurements.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.Netron/3.0.2672.12446/Netron.Diagramming.Core-3.0.2672.12446/Utils/Measurements.cs	(revision 4068)
@@ -1,17 +1,14 @@
 using System;
 using System.Drawing;
-using System.Runtime.CompilerServices;
-
-namespace Netron.Diagramming.Core
-{
-    static class Measurements
-    {
-        [ThreadStaticAttribute()]
-        private static float screenDpiX = 96.0F;
-
-        [ThreadStaticAttribute()]
-        private static float screenDpiY = 96.0F;
-
-        private static float[,] conversionRatios = new float[,]{
+
+namespace Netron.Diagramming.Core {
+  static class Measurements {
+    [ThreadStaticAttribute()]
+    private static float screenDpiX = 96.0F;
+
+    [ThreadStaticAttribute()]
+    private static float screenDpiY = 96.0F;
+
+    private static float[,] conversionRatios = new float[,]{
 	    {1.0F, 4.0F, 1.3333334e-002F, 0.33866665F, 0.95999998F}, 
 	    {0.25F, 1.0F, 3.3333334e-003F, 8.4666662e-002F, 0.23999999F}, 
@@ -21,521 +18,449 @@
 	    };
 
-        private static MeasurementsUnit[] englishUnits;
-
-        private static MeasurementsUnit[] metricUnits;
-
-
-        private static int GraphicsUnitIndex(GraphicsUnit graphicsUnit)
-        {
-            int i = -1;
-            switch (graphicsUnit)
-            {
-                case GraphicsUnit.Display:
-                    i = 0;
-                    break;
-
-                case GraphicsUnit.Document:
-                    i = 1;
-                    break;
-
-                case GraphicsUnit.Inch:
-                    i = 2;
-                    break;
-
-                case GraphicsUnit.Millimeter:
-                    i = 3;
-                    break;
-
-                case GraphicsUnit.Point:
-                    i = 4;
-                    break;
-            }
-            return i;
-        }
-
-        public static void InitScreenDPI()
-        {
-            Graphics graphics = Graphics.FromHwnd((IntPtr)0);
-            if (graphics != null)
-            {
-                screenDpiX = graphics.DpiX;
-                screenDpiY = graphics.DpiY;
-            }
-        }
-
-        public static float UnitsPerInch(GraphicsUnit unit)
-        {
-            float f = 1.0F;
-            switch (unit)
-            {
-                case GraphicsUnit.Inch:
-                    return 1.0F;
-
-                case GraphicsUnit.Millimeter:
-                    return 25.4F;
-
-                case GraphicsUnit.Point:
-                    return 72.0F;
-
-                case GraphicsUnit.Document:
-                    return 300.0F;
-
-                case GraphicsUnit.Display:
-                    return 75.0F;
-
-                default:
-                    return f;
-            }
-        }
-
-        public static float Convert(GraphicsUnit fromUnits, GraphicsUnit toUnits, float dpi, float value)
-        {
-            float f1 = value;
-            if (fromUnits != toUnits)
-            {
-                float f2;
-
-                GraphicsUnit graphicsUnit;
-
-                if (fromUnits == GraphicsUnit.Pixel)
-                {
-                    graphicsUnit = GraphicsUnit.Inch;
-                    f2 = value / dpi;
-                }
-                else
-                {
-                    f2 = value;
-                    graphicsUnit = fromUnits;
-                }
-                if (graphicsUnit == toUnits)
-                {
-                    f1 = f2;
-                }
-                else if (toUnits == GraphicsUnit.Pixel)
-                {
-                    if (graphicsUnit != GraphicsUnit.Inch)
-                    {
-                        int i = GraphicsUnitIndex(graphicsUnit);
-                        int j = GraphicsUnitIndex(GraphicsUnit.Inch);
-                        f2 *= conversionRatios[i, j];
-                    }
-                    f1 = f2 * dpi;
-                }
-                else
-                {
-                    int i = GraphicsUnitIndex(graphicsUnit);
-                    int j = GraphicsUnitIndex(toUnits);
-                    f1 = f2 * conversionRatios[i, j];
-                }
-            }
-            return f1;
-        }
-
-        public static float Convert(GraphicsUnit fromUnits, float fromScale, GraphicsUnit toUnits, float toScale, float dpi, float value)
-        {
-            float f1 = value;
-            if (fromUnits != toUnits || fromScale != toScale)
-            {
-                float f2;
-
-                GraphicsUnit graphicsUnit;
-
-                if (fromUnits == GraphicsUnit.Pixel)
-                {
-                    graphicsUnit = GraphicsUnit.Inch;
-                    f2 = value / dpi;
-                }
-                else
-                {
-                    f2 = value;
-                    graphicsUnit = fromUnits;
-                }
-                f2 *= fromScale;
-                if (graphicsUnit == toUnits)
-                {
-                    f1 = f2;
-                }
-                else if (toUnits == GraphicsUnit.Pixel)
-                {
-                    if (graphicsUnit != GraphicsUnit.Inch)
-                    {
-                        int i = GraphicsUnitIndex(graphicsUnit);
-                        int j = GraphicsUnitIndex(GraphicsUnit.Inch);
-                        f2 *= conversionRatios[i, j];
-                    }
-                    f1 = f2 * dpi;
-                }
-                else
-                {
-                    int i = GraphicsUnitIndex(graphicsUnit);
-                    int j = GraphicsUnitIndex(toUnits);
-                    f1 = f2 * conversionRatios[i, j];
-                }
-                f1 /= toScale;
-            }
-            return f1;
-        }
-
-        public static float Convert(MeasurementsUnit fromUnits, GraphicsUnit toUnits, float toScale, float dpi, float value)
-        {
-            GraphicsUnit graphicsUnit;
-            float f;
-            MeasurementsUnitToGraphicsUnit(fromUnits, out graphicsUnit, out f);
-            return Convert(graphicsUnit, f, toUnits, toScale, dpi, value);
-        }
-
-        public static float Convert(GraphicsUnit fromUnits, float fromScale, MeasurementsUnit toUnits, float dpi, float value)
-        {
-            GraphicsUnit graphicsUnit;
-            float f;
-            MeasurementsUnitToGraphicsUnit(toUnits, out graphicsUnit, out f);
-            return Convert(fromUnits, fromScale, graphicsUnit, f, dpi, value);
-        }
-
-        public static float Convert(MeasurementsUnit fromUnits, MeasurementsUnit toUnits, float dpi, float value)
-        {
-            GraphicsUnit graphicsUnit1, graphicsUnit2;
-            float f1, f2;
-            MeasurementsUnitToGraphicsUnit(fromUnits, out graphicsUnit1, out f1);
-            MeasurementsUnitToGraphicsUnit(toUnits, out graphicsUnit2, out f2);
-            return Convert(graphicsUnit1, f1, graphicsUnit2, f2, dpi, value);
-        }
-
-        public static float Convert(GraphicsUnit fromUnits, GraphicsUnit toUnits, float value)
-        {
-            return Convert(fromUnits, toUnits, screenDpiX, value);
-        }
-
-        public static float Convert(GraphicsUnit fromUnits, GraphicsUnit toUnits, Graphics grfx, float value)
-        {
-            float f = screenDpiX;
-            if (grfx != null)
-            {
-                f = grfx.DpiX;
-            }
-            return Convert(fromUnits, toUnits, f, value);
-        }
-
-        public static PointF Convert(GraphicsUnit fromUnits, GraphicsUnit toUnits, PointF value)
-        {
-            float f1 = screenDpiX;
-            float f2 = screenDpiY;
-            float f3 = Convert(fromUnits, toUnits, f1, value.X);
-            float f4 = Convert(fromUnits, toUnits, f2, value.Y);
-            return new PointF(f3, f4);
-        }
-
-        public static PointF Convert(GraphicsUnit fromUnits, GraphicsUnit toUnits, Graphics grfx, PointF value)
-        {
-            float f1 = screenDpiX;
-            float f2 = screenDpiY;
-            if (grfx != null)
-            {
-                f1 = grfx.DpiX;
-                f2 = grfx.DpiY;
-            }
-            float f3 = Convert(fromUnits, toUnits, f1, value.X);
-            float f4 = Convert(fromUnits, toUnits, f2, value.Y);
-            return new PointF(f3, f4);
-        }
-
-        public static PointF Convert(GraphicsUnit fromUnits, float fromScale, GraphicsUnit toUnits, float toScale, Graphics grfx, PointF value)
-        {
-            float f1 = screenDpiX;
-            float f2 = screenDpiY;
-            if (grfx != null)
-            {
-                f1 = grfx.DpiX;
-                f2 = grfx.DpiY;
-            }
-            float f3 = Convert(fromUnits, fromScale, toUnits, toScale, f1, value.X);
-            float f4 = Convert(fromUnits, fromScale, toUnits, toScale, f2, value.Y);
-            return new PointF(f3, f4);
-        }
-
-        public static PointF Convert(MeasurementsUnit fromUnits, MeasurementsUnit toUnits, Graphics grfx, PointF value)
-        {
-            float f1 = screenDpiX;
-            float f2 = screenDpiY;
-            if (grfx != null)
-            {
-                f1 = grfx.DpiX;
-                f2 = grfx.DpiY;
-            }
-            float f3 = Convert(fromUnits, toUnits, f1, value.X);
-            float f4 = Convert(fromUnits, toUnits, f2, value.Y);
-            return new PointF(f3, f4);
-        }
-
-        public static PointF Convert(GraphicsUnit fromUnits, float fromScale, MeasurementsUnit toUnits, Graphics grfx, PointF value)
-        {
-            float f1 = screenDpiX;
-            float f2 = screenDpiY;
-            if (grfx != null)
-            {
-                f1 = grfx.DpiX;
-                f2 = grfx.DpiY;
-            }
-            float f3 = Convert(fromUnits, fromScale, toUnits, f1, value.X);
-            float f4 = Convert(fromUnits, fromScale, toUnits, f2, value.Y);
-            return new PointF(f3, f4);
-        }
-
-        public static PointF Convert(MeasurementsUnit fromUnits, GraphicsUnit toUnits, float toScale, Graphics grfx, PointF value)
-        {
-            float f1 = screenDpiX;
-            float f2 = screenDpiY;
-            if (grfx != null)
-            {
-                f1 = grfx.DpiX;
-                f2 = grfx.DpiY;
-            }
-            float f3 = Convert(fromUnits, toUnits, toScale, f1, value.X);
-            float f4 = Convert(fromUnits, toUnits, toScale, f2, value.Y);
-            return new PointF(f3, f4);
-        }
-
-        public static SizeF Convert(GraphicsUnit fromUnits, GraphicsUnit toUnits, SizeF value)
-        {
-            float f1 = screenDpiX;
-            float f2 = screenDpiY;
-            float f3 = Convert(fromUnits, toUnits, f1, value.Width);
-            float f4 = Convert(fromUnits, toUnits, f2, value.Height);
-            return new SizeF(f3, f4);
-        }
-
-        public static SizeF Convert(GraphicsUnit fromUnits, GraphicsUnit toUnits, Graphics grfx, SizeF value)
-        {
-            float f1 = screenDpiX;
-            float f2 = screenDpiY;
-            if (grfx != null)
-            {
-                f1 = grfx.DpiX;
-                f2 = grfx.DpiY;
-            }
-            float f3 = Convert(fromUnits, toUnits, f1, value.Width);
-            float f4 = Convert(fromUnits, toUnits, f2, value.Height);
-            return new SizeF(f3, f4);
-        }
-
-        public static SizeF Convert(GraphicsUnit fromUnits, float fromScale, GraphicsUnit toUnits, float toScale, Graphics grfx, SizeF value)
-        {
-            float f1 = screenDpiX;
-            float f2 = screenDpiY;
-            if (grfx != null)
-            {
-                f1 = grfx.DpiX;
-                f2 = grfx.DpiY;
-            }
-            float f3 = Convert(fromUnits, fromScale, toUnits, toScale, f1, value.Width);
-            float f4 = Convert(fromUnits, fromScale, toUnits, toScale, f2, value.Height);
-            return new SizeF(f3, f4);
-        }
-
-        public static RectangleF Convert(GraphicsUnit fromUnits, GraphicsUnit toUnits, RectangleF value)
-        {
-            float f1 = screenDpiX;
-            float f2 = screenDpiY;
-            float f3 = Convert(fromUnits, toUnits, f1, value.X);
-            float f4 = Convert(fromUnits, toUnits, f2, value.Y);
-            float f5 = Convert(fromUnits, toUnits, f1, value.Width);
-            float f6 = Convert(fromUnits, toUnits, f2, value.Height);
-            return new RectangleF(f3, f4, f5, f6);
-        }
-
-        public static RectangleF Convert(GraphicsUnit fromUnits, GraphicsUnit toUnits, Graphics grfx, RectangleF value)
-        {
-            float f1 = screenDpiX;
-            float f2 = screenDpiY;
-            if (grfx != null)
-            {
-                f1 = grfx.DpiX;
-                f2 = grfx.DpiY;
-            }
-            float f3 = Convert(fromUnits, toUnits, f1, value.X);
-            float f4 = Convert(fromUnits, toUnits, f2, value.Y);
-            float f5 = Convert(fromUnits, toUnits, f1, value.Width);
-            float f6 = Convert(fromUnits, toUnits, f2, value.Height);
-            return new RectangleF(f3, f4, f5, f6);
-        }
-
-        public static void MeasurementsUnitToGraphicsUnit(MeasurementsUnit unitMeasure, out GraphicsUnit grfxUnit, out float grfxScale)
-        {
-            switch (unitMeasure)
-            {
-                case MeasurementsUnit.SixteenthInches:
-                    grfxUnit = GraphicsUnit.Inch;
-                    grfxScale = 6.25e-002F;
-                    return;
-
-                case MeasurementsUnit.EighthInches:
-                    grfxUnit = GraphicsUnit.Inch;
-                    grfxScale = 0.125F;
-                    return;
-
-                case MeasurementsUnit.QuarterInches:
-                    grfxUnit = GraphicsUnit.Inch;
-                    grfxScale = 0.25F;
-                    return;
-
-                case MeasurementsUnit.HalfInches:
-                    grfxUnit = GraphicsUnit.Inch;
-                    grfxScale = 0.5F;
-                    return;
-
-                case MeasurementsUnit.Inches:
-                    grfxUnit = GraphicsUnit.Inch;
-                    grfxScale = 1.0F;
-                    return;
-
-                case MeasurementsUnit.Feet:
-                    grfxUnit = GraphicsUnit.Inch;
-                    grfxScale = 12.0F;
-                    return;
-
-                case MeasurementsUnit.Yards:
-                    grfxUnit = GraphicsUnit.Inch;
-                    grfxScale = 36.0F;
-                    return;
-
-                case MeasurementsUnit.Miles:
-                    grfxUnit = GraphicsUnit.Inch;
-                    grfxScale = 63360.0F;
-                    return;
-
-                case MeasurementsUnit.Millimeters:
-                    grfxUnit = GraphicsUnit.Millimeter;
-                    grfxScale = 1.0F;
-                    return;
-
-                case MeasurementsUnit.Centimeters:
-                    grfxUnit = GraphicsUnit.Millimeter;
-                    grfxScale = 10.0F;
-                    return;
-
-                case MeasurementsUnit.Meters:
-                    grfxUnit = GraphicsUnit.Millimeter;
-                    grfxScale = 1000.0F;
-                    return;
-
-                case MeasurementsUnit.Kilometers:
-                    grfxUnit = GraphicsUnit.Millimeter;
-                    grfxScale = 1000000.0F;
-                    return;
-
-                case MeasurementsUnit.Points:
-                    grfxUnit = GraphicsUnit.Point;
-                    grfxScale = 1.0F;
-                    return;
-
-                default:
-                    grfxUnit = GraphicsUnit.Pixel;
-                    grfxScale = 1.0F;
-                    return;
-            }
-        }
-
-        public static MeasurementSystem GetUnitsSystem(MeasurementsUnit units)
-        {
-            MeasurementSystem measurementSystem = MeasurementSystem.English;
-            MeasurementsUnit[] measurementsUnits = metricUnits;
-            for (int i = 0; i < (int)measurementsUnits.Length; i++)
-            {
-                if (measurementsUnits[i] == units)
-                {
-                    measurementSystem = MeasurementSystem.Metric;
-                    break;
-                }
-            }
-            return measurementSystem;
-        }
-
-        public static bool GetLargerUnits(MeasurementsUnit units, out MeasurementsUnit largerUnits)
-        {
-            bool flag = false;
-            largerUnits = units;
-            for (int i = 0; !flag && i < (int)englishUnits.Length - 1; i++)
-            {
-                if (englishUnits[i] == units)
-                {
-                    largerUnits = englishUnits[i + 1];
-                    flag = true;
-                }
-            }
-            for (int j = 0; !flag && j < (int)metricUnits.Length - 1; j++)
-            {
-                if (metricUnits[j] == units)
-                {
-                    largerUnits = englishUnits[j + 1];
-                }
-            }
-            return flag;
-        }
-
-        public static bool GetSmallerUnits(MeasurementsUnit units, out MeasurementsUnit smallerUnits)
-        {
-            bool flag = false;
-            smallerUnits = units;
-            for (int i = (int)englishUnits.Length - 1; !flag && i > 0; i--)
-            {
-                if (englishUnits[i] == units)
-                {
-                    smallerUnits = englishUnits[i - 1];
-                    flag = true;
-                }
-            }
-            for (int j = (int)metricUnits.Length - 1; !flag && j > 0; j--)
-            {
-                if (metricUnits[j] == units)
-                {
-                    smallerUnits = metricUnits[j - 1];
-                    flag = true;
-                }
-            }
-            return flag;
-        }
-
-        public static MeasurementsUnit GetSystemUnits(MeasurementSystem measureSys, int unitOrdinal)
-        {
-            MeasurementsUnit measurementsUnit;
-
-            //if (measureSys == null)
-            //{
-            //  if (unitOrdinal < 0 || unitOrdinal >= (int)englishUnits.Length)
-            //  {
-            //      throw new InconsistencyException("Oops");
-            //  }
-            //  measurementsUnit = englishUnits[unitOrdinal];
-            //}
-            //else
-            {
-                if (measureSys != MeasurementSystem.Metric)
-                {
-                    throw new InconsistencyException("Oops");
-                }
-                if (unitOrdinal < 0 || unitOrdinal >= (int)metricUnits.Length)
-                {
-                    throw new InconsistencyException("Oops");
-                }
-                measurementsUnit = metricUnits[unitOrdinal];
-            }
-            return measurementsUnit;
-        }
-
-        static Measurements()
-        {
-            MeasurementsUnit[] measurementsUnits = new MeasurementsUnit[8];
-            measurementsUnits[1] = MeasurementsUnit.EighthInches;
-            measurementsUnits[2] = MeasurementsUnit.QuarterInches;
-            measurementsUnits[3] = MeasurementsUnit.HalfInches;
-            measurementsUnits[4] = MeasurementsUnit.Inches;
-            measurementsUnits[5] = MeasurementsUnit.Feet;
-            measurementsUnits[6] = MeasurementsUnit.Yards;
-            measurementsUnits[7] = MeasurementsUnit.Miles;
-            englishUnits = measurementsUnits;
-            measurementsUnits = new MeasurementsUnit[] { MeasurementsUnit.Millimeters, MeasurementsUnit.Centimeters, MeasurementsUnit.Meters, MeasurementsUnit.Kilometers };
-            metricUnits = measurementsUnits;
-        }
-    }
+    private static MeasurementsUnit[] englishUnits;
+
+    private static MeasurementsUnit[] metricUnits;
+
+
+    private static int GraphicsUnitIndex(GraphicsUnit graphicsUnit) {
+      int i = -1;
+      switch (graphicsUnit) {
+        case GraphicsUnit.Display:
+          i = 0;
+          break;
+
+        case GraphicsUnit.Document:
+          i = 1;
+          break;
+
+        case GraphicsUnit.Inch:
+          i = 2;
+          break;
+
+        case GraphicsUnit.Millimeter:
+          i = 3;
+          break;
+
+        case GraphicsUnit.Point:
+          i = 4;
+          break;
+      }
+      return i;
+    }
+
+    public static void InitScreenDPI() {
+      Graphics graphics = Graphics.FromHwnd((IntPtr)0);
+      if (graphics != null) {
+        screenDpiX = graphics.DpiX;
+        screenDpiY = graphics.DpiY;
+      }
+    }
+
+    public static float UnitsPerInch(GraphicsUnit unit) {
+      float f = 1.0F;
+      switch (unit) {
+        case GraphicsUnit.Inch:
+          return 1.0F;
+
+        case GraphicsUnit.Millimeter:
+          return 25.4F;
+
+        case GraphicsUnit.Point:
+          return 72.0F;
+
+        case GraphicsUnit.Document:
+          return 300.0F;
+
+        case GraphicsUnit.Display:
+          return 75.0F;
+
+        default:
+          return f;
+      }
+    }
+
+    public static float Convert(GraphicsUnit fromUnits, GraphicsUnit toUnits, float dpi, float value) {
+      float f1 = value;
+      if (fromUnits != toUnits) {
+        float f2;
+
+        GraphicsUnit graphicsUnit;
+
+        if (fromUnits == GraphicsUnit.Pixel) {
+          graphicsUnit = GraphicsUnit.Inch;
+          f2 = value / dpi;
+        } else {
+          f2 = value;
+          graphicsUnit = fromUnits;
+        }
+        if (graphicsUnit == toUnits) {
+          f1 = f2;
+        } else if (toUnits == GraphicsUnit.Pixel) {
+          if (graphicsUnit != GraphicsUnit.Inch) {
+            int i = GraphicsUnitIndex(graphicsUnit);
+            int j = GraphicsUnitIndex(GraphicsUnit.Inch);
+            f2 *= conversionRatios[i, j];
+          }
+          f1 = f2 * dpi;
+        } else {
+          int i = GraphicsUnitIndex(graphicsUnit);
+          int j = GraphicsUnitIndex(toUnits);
+          f1 = f2 * conversionRatios[i, j];
+        }
+      }
+      return f1;
+    }
+
+    public static float Convert(GraphicsUnit fromUnits, float fromScale, GraphicsUnit toUnits, float toScale, float dpi, float value) {
+      float f1 = value;
+      if (fromUnits != toUnits || fromScale != toScale) {
+        float f2;
+
+        GraphicsUnit graphicsUnit;
+
+        if (fromUnits == GraphicsUnit.Pixel) {
+          graphicsUnit = GraphicsUnit.Inch;
+          f2 = value / dpi;
+        } else {
+          f2 = value;
+          graphicsUnit = fromUnits;
+        }
+        f2 *= fromScale;
+        if (graphicsUnit == toUnits) {
+          f1 = f2;
+        } else if (toUnits == GraphicsUnit.Pixel) {
+          if (graphicsUnit != GraphicsUnit.Inch) {
+            int i = GraphicsUnitIndex(graphicsUnit);
+            int j = GraphicsUnitIndex(GraphicsUnit.Inch);
+            f2 *= conversionRatios[i, j];
+          }
+          f1 = f2 * dpi;
+        } else {
+          int i = GraphicsUnitIndex(graphicsUnit);
+          int j = GraphicsUnitIndex(toUnits);
+          f1 = f2 * conversionRatios[i, j];
+        }
+        f1 /= toScale;
+      }
+      return f1;
+    }
+
+    public static float Convert(MeasurementsUnit fromUnits, GraphicsUnit toUnits, float toScale, float dpi, float value) {
+      GraphicsUnit graphicsUnit;
+      float f;
+      MeasurementsUnitToGraphicsUnit(fromUnits, out graphicsUnit, out f);
+      return Convert(graphicsUnit, f, toUnits, toScale, dpi, value);
+    }
+
+    public static float Convert(GraphicsUnit fromUnits, float fromScale, MeasurementsUnit toUnits, float dpi, float value) {
+      GraphicsUnit graphicsUnit;
+      float f;
+      MeasurementsUnitToGraphicsUnit(toUnits, out graphicsUnit, out f);
+      return Convert(fromUnits, fromScale, graphicsUnit, f, dpi, value);
+    }
+
+    public static float Convert(MeasurementsUnit fromUnits, MeasurementsUnit toUnits, float dpi, float value) {
+      GraphicsUnit graphicsUnit1, graphicsUnit2;
+      float f1, f2;
+      MeasurementsUnitToGraphicsUnit(fromUnits, out graphicsUnit1, out f1);
+      MeasurementsUnitToGraphicsUnit(toUnits, out graphicsUnit2, out f2);
+      return Convert(graphicsUnit1, f1, graphicsUnit2, f2, dpi, value);
+    }
+
+    public static float Convert(GraphicsUnit fromUnits, GraphicsUnit toUnits, float value) {
+      return Convert(fromUnits, toUnits, screenDpiX, value);
+    }
+
+    public static float Convert(GraphicsUnit fromUnits, GraphicsUnit toUnits, Graphics grfx, float value) {
+      float f = screenDpiX;
+      if (grfx != null) {
+        f = grfx.DpiX;
+      }
+      return Convert(fromUnits, toUnits, f, value);
+    }
+
+    public static PointF Convert(GraphicsUnit fromUnits, GraphicsUnit toUnits, PointF value) {
+      float f1 = screenDpiX;
+      float f2 = screenDpiY;
+      float f3 = Convert(fromUnits, toUnits, f1, value.X);
+      float f4 = Convert(fromUnits, toUnits, f2, value.Y);
+      return new PointF(f3, f4);
+    }
+
+    public static PointF Convert(GraphicsUnit fromUnits, GraphicsUnit toUnits, Graphics grfx, PointF value) {
+      float f1 = screenDpiX;
+      float f2 = screenDpiY;
+      if (grfx != null) {
+        f1 = grfx.DpiX;
+        f2 = grfx.DpiY;
+      }
+      float f3 = Convert(fromUnits, toUnits, f1, value.X);
+      float f4 = Convert(fromUnits, toUnits, f2, value.Y);
+      return new PointF(f3, f4);
+    }
+
+    public static PointF Convert(GraphicsUnit fromUnits, float fromScale, GraphicsUnit toUnits, float toScale, Graphics grfx, PointF value) {
+      float f1 = screenDpiX;
+      float f2 = screenDpiY;
+      if (grfx != null) {
+        f1 = grfx.DpiX;
+        f2 = grfx.DpiY;
+      }
+      float f3 = Convert(fromUnits, fromScale, toUnits, toScale, f1, value.X);
+      float f4 = Convert(fromUnits, fromScale, toUnits, toScale, f2, value.Y);
+      return new PointF(f3, f4);
+    }
+
+    public static PointF Convert(MeasurementsUnit fromUnits, MeasurementsUnit toUnits, Graphics grfx, PointF value) {
+      float f1 = screenDpiX;
+      float f2 = screenDpiY;
+      if (grfx != null) {
+        f1 = grfx.DpiX;
+        f2 = grfx.DpiY;
+      }
+      float f3 = Convert(fromUnits, toUnits, f1, value.X);
+      float f4 = Convert(fromUnits, toUnits, f2, value.Y);
+      return new PointF(f3, f4);
+    }
+
+    public static PointF Convert(GraphicsUnit fromUnits, float fromScale, MeasurementsUnit toUnits, Graphics grfx, PointF value) {
+      float f1 = screenDpiX;
+      float f2 = screenDpiY;
+      if (grfx != null) {
+        f1 = grfx.DpiX;
+        f2 = grfx.DpiY;
+      }
+      float f3 = Convert(fromUnits, fromScale, toUnits, f1, value.X);
+      float f4 = Convert(fromUnits, fromScale, toUnits, f2, value.Y);
+      return new PointF(f3, f4);
+    }
+
+    public static PointF Convert(MeasurementsUnit fromUnits, GraphicsUnit toUnits, float toScale, Graphics grfx, PointF value) {
+      float f1 = screenDpiX;
+      float f2 = screenDpiY;
+      if (grfx != null) {
+        f1 = grfx.DpiX;
+        f2 = grfx.DpiY;
+      }
+      float f3 = Convert(fromUnits, toUnits, toScale, f1, value.X);
+      float f4 = Convert(fromUnits, toUnits, toScale, f2, value.Y);
+      return new PointF(f3, f4);
+    }
+
+    public static SizeF Convert(GraphicsUnit fromUnits, GraphicsUnit toUnits, SizeF value) {
+      float f1 = screenDpiX;
+      float f2 = screenDpiY;
+      float f3 = Convert(fromUnits, toUnits, f1, value.Width);
+      float f4 = Convert(fromUnits, toUnits, f2, value.Height);
+      return new SizeF(f3, f4);
+    }
+
+    public static SizeF Convert(GraphicsUnit fromUnits, GraphicsUnit toUnits, Graphics grfx, SizeF value) {
+      float f1 = screenDpiX;
+      float f2 = screenDpiY;
+      if (grfx != null) {
+        f1 = grfx.DpiX;
+        f2 = grfx.DpiY;
+      }
+      float f3 = Convert(fromUnits, toUnits, f1, value.Width);
+      float f4 = Convert(fromUnits, toUnits, f2, value.Height);
+      return new SizeF(f3, f4);
+    }
+
+    public static SizeF Convert(GraphicsUnit fromUnits, float fromScale, GraphicsUnit toUnits, float toScale, Graphics grfx, SizeF value) {
+      float f1 = screenDpiX;
+      float f2 = screenDpiY;
+      if (grfx != null) {
+        f1 = grfx.DpiX;
+        f2 = grfx.DpiY;
+      }
+      float f3 = Convert(fromUnits, fromScale, toUnits, toScale, f1, value.Width);
+      float f4 = Convert(fromUnits, fromScale, toUnits, toScale, f2, value.Height);
+      return new SizeF(f3, f4);
+    }
+
+    public static RectangleF Convert(GraphicsUnit fromUnits, GraphicsUnit toUnits, RectangleF value) {
+      float f1 = screenDpiX;
+      float f2 = screenDpiY;
+      float f3 = Convert(fromUnits, toUnits, f1, value.X);
+      float f4 = Convert(fromUnits, toUnits, f2, value.Y);
+      float f5 = Convert(fromUnits, toUnits, f1, value.Width);
+      float f6 = Convert(fromUnits, toUnits, f2, value.Height);
+      return new RectangleF(f3, f4, f5, f6);
+    }
+
+    public static RectangleF Convert(GraphicsUnit fromUnits, GraphicsUnit toUnits, Graphics grfx, RectangleF value) {
+      float f1 = screenDpiX;
+      float f2 = screenDpiY;
+      if (grfx != null) {
+        f1 = grfx.DpiX;
+        f2 = grfx.DpiY;
+      }
+      float f3 = Convert(fromUnits, toUnits, f1, value.X);
+      float f4 = Convert(fromUnits, toUnits, f2, value.Y);
+      float f5 = Convert(fromUnits, toUnits, f1, value.Width);
+      float f6 = Convert(fromUnits, toUnits, f2, value.Height);
+      return new RectangleF(f3, f4, f5, f6);
+    }
+
+    public static void MeasurementsUnitToGraphicsUnit(MeasurementsUnit unitMeasure, out GraphicsUnit grfxUnit, out float grfxScale) {
+      switch (unitMeasure) {
+        case MeasurementsUnit.SixteenthInches:
+          grfxUnit = GraphicsUnit.Inch;
+          grfxScale = 6.25e-002F;
+          return;
+
+        case MeasurementsUnit.EighthInches:
+          grfxUnit = GraphicsUnit.Inch;
+          grfxScale = 0.125F;
+          return;
+
+        case MeasurementsUnit.QuarterInches:
+          grfxUnit = GraphicsUnit.Inch;
+          grfxScale = 0.25F;
+          return;
+
+        case MeasurementsUnit.HalfInches:
+          grfxUnit = GraphicsUnit.Inch;
+          grfxScale = 0.5F;
+          return;
+
+        case MeasurementsUnit.Inches:
+          grfxUnit = GraphicsUnit.Inch;
+          grfxScale = 1.0F;
+          return;
+
+        case MeasurementsUnit.Feet:
+          grfxUnit = GraphicsUnit.Inch;
+          grfxScale = 12.0F;
+          return;
+
+        case MeasurementsUnit.Yards:
+          grfxUnit = GraphicsUnit.Inch;
+          grfxScale = 36.0F;
+          return;
+
+        case MeasurementsUnit.Miles:
+          grfxUnit = GraphicsUnit.Inch;
+          grfxScale = 63360.0F;
+          return;
+
+        case MeasurementsUnit.Millimeters:
+          grfxUnit = GraphicsUnit.Millimeter;
+          grfxScale = 1.0F;
+          return;
+
+        case MeasurementsUnit.Centimeters:
+          grfxUnit = GraphicsUnit.Millimeter;
+          grfxScale = 10.0F;
+          return;
+
+        case MeasurementsUnit.Meters:
+          grfxUnit = GraphicsUnit.Millimeter;
+          grfxScale = 1000.0F;
+          return;
+
+        case MeasurementsUnit.Kilometers:
+          grfxUnit = GraphicsUnit.Millimeter;
+          grfxScale = 1000000.0F;
+          return;
+
+        case MeasurementsUnit.Points:
+          grfxUnit = GraphicsUnit.Point;
+          grfxScale = 1.0F;
+          return;
+
+        default:
+          grfxUnit = GraphicsUnit.Pixel;
+          grfxScale = 1.0F;
+          return;
+      }
+    }
+
+    public static MeasurementSystem GetUnitsSystem(MeasurementsUnit units) {
+      MeasurementSystem measurementSystem = MeasurementSystem.English;
+      MeasurementsUnit[] measurementsUnits = metricUnits;
+      for (int i = 0; i < (int)measurementsUnits.Length; i++) {
+        if (measurementsUnits[i] == units) {
+          measurementSystem = MeasurementSystem.Metric;
+          break;
+        }
+      }
+      return measurementSystem;
+    }
+
+    public static bool GetLargerUnits(MeasurementsUnit units, out MeasurementsUnit largerUnits) {
+      bool flag = false;
+      largerUnits = units;
+      for (int i = 0; !flag && i < (int)englishUnits.Length - 1; i++) {
+        if (englishUnits[i] == units) {
+          largerUnits = englishUnits[i + 1];
+          flag = true;
+        }
+      }
+      for (int j = 0; !flag && j < (int)metricUnits.Length - 1; j++) {
+        if (metricUnits[j] == units) {
+          largerUnits = englishUnits[j + 1];
+        }
+      }
+      return flag;
+    }
+
+    public static bool GetSmallerUnits(MeasurementsUnit units, out MeasurementsUnit smallerUnits) {
+      bool flag = false;
+      smallerUnits = units;
+      for (int i = (int)englishUnits.Length - 1; !flag && i > 0; i--) {
+        if (englishUnits[i] == units) {
+          smallerUnits = englishUnits[i - 1];
+          flag = true;
+        }
+      }
+      for (int j = (int)metricUnits.Length - 1; !flag && j > 0; j--) {
+        if (metricUnits[j] == units) {
+          smallerUnits = metricUnits[j - 1];
+          flag = true;
+        }
+      }
+      return flag;
+    }
+
+    public static MeasurementsUnit GetSystemUnits(MeasurementSystem measureSys, int unitOrdinal) {
+      MeasurementsUnit measurementsUnit;
+
+      //if (measureSys == null)
+      //{
+      //  if (unitOrdinal < 0 || unitOrdinal >= (int)englishUnits.Length)
+      //  {
+      //      throw new InconsistencyException("Oops");
+      //  }
+      //  measurementsUnit = englishUnits[unitOrdinal];
+      //}
+      //else
+      {
+        if (measureSys != MeasurementSystem.Metric) {
+          throw new InconsistencyException("Oops");
+        }
+        if (unitOrdinal < 0 || unitOrdinal >= (int)metricUnits.Length) {
+          throw new InconsistencyException("Oops");
+        }
+        measurementsUnit = metricUnits[unitOrdinal];
+      }
+      return measurementsUnit;
+    }
+
+    static Measurements() {
+      MeasurementsUnit[] measurementsUnits = new MeasurementsUnit[8];
+      measurementsUnits[1] = MeasurementsUnit.EighthInches;
+      measurementsUnits[2] = MeasurementsUnit.QuarterInches;
+      measurementsUnits[3] = MeasurementsUnit.HalfInches;
+      measurementsUnits[4] = MeasurementsUnit.Inches;
+      measurementsUnits[5] = MeasurementsUnit.Feet;
+      measurementsUnits[6] = MeasurementsUnit.Yards;
+      measurementsUnits[7] = MeasurementsUnit.Miles;
+      englishUnits = measurementsUnits;
+      measurementsUnits = new MeasurementsUnit[] { MeasurementsUnit.Millimeters, MeasurementsUnit.Centimeters, MeasurementsUnit.Meters, MeasurementsUnit.Kilometers };
+      metricUnits = measurementsUnits;
+    }
+  }
 
 }
Index: /trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.Netron/3.0.2672.12446/Netron.Diagramming.Core-3.0.2672.12446/Utils/NetronClipboard.cs
===================================================================
--- /trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.Netron/3.0.2672.12446/Netron.Diagramming.Core-3.0.2672.12446/Utils/NetronClipboard.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.Netron/3.0.2672.12446/Netron.Diagramming.Core-3.0.2672.12446/Utils/NetronClipboard.cs	(revision 4068)
@@ -1,136 +1,114 @@
 using System;
-using System.Collections.Generic;
-using System.Text;
 using System.Collections;
-using System.Diagnostics;
 using System.IO;
 
-namespace Netron.Diagramming.Core
-{
-    // ----------------------------------------------------------------------
+namespace Netron.Diagramming.Core {
+  // ----------------------------------------------------------------------
+  /// <summary>
+  /// Our custom "clipboard" for copying diagram elements (or anything else
+  /// for that matter) to.
+  /// </summary>
+  // ----------------------------------------------------------------------
+  public static class NetronClipboard {
+    // ------------------------------------------------------------------
     /// <summary>
-    /// Our custom "clipboard" for copying diagram elements (or anything else
-    /// for that matter) to.
+    /// The items on the clipboard.
     /// </summary>
-    // ----------------------------------------------------------------------
-    public static class NetronClipboard
-    {
-        // ------------------------------------------------------------------
-        /// <summary>
-        /// The items on the clipboard.
-        /// </summary>
-        // ------------------------------------------------------------------
-        static ArrayList items = new ArrayList();
+    // ------------------------------------------------------------------
+    static ArrayList items = new ArrayList();
 
-        // ------------------------------------------------------------------
-        /// <summary>
-        /// Gets the collection of all items.
-        /// </summary>
-        // ------------------------------------------------------------------
-        public static ArrayList Items
-        {
-            get
-            {
-                return items;
-            }
+    // ------------------------------------------------------------------
+    /// <summary>
+    /// Gets the collection of all items.
+    /// </summary>
+    // ------------------------------------------------------------------
+    public static ArrayList Items {
+      get {
+        return items;
+      }
+    }
+
+    // ------------------------------------------------------------------
+    /// <summary>
+    /// Adds the item to the collection.
+    /// </summary>
+    /// <param name="item">object</param>
+    /// <returns>int</returns>
+    // ------------------------------------------------------------------
+    public static int Add(object item) {
+      return items.Add(item);
+    }
+
+    public static int AddStream(MemoryStream stream) {
+      return items.Add(stream);
+    }
+
+    // ------------------------------------------------------------------
+    /// <summary>
+    /// Clears the collection.
+    /// </summary>
+    // ------------------------------------------------------------------
+    public static void Clear() {
+      items.Clear();
+    }
+
+    // ------------------------------------------------------------------
+    /// <summary>
+    /// Returns if we have any items of the type specified.
+    /// </summary>
+    /// <param name="type">Type</param>
+    /// <returns>bool</returns>
+    // ------------------------------------------------------------------
+    public static bool ContainsData(Type type) {
+      foreach (Object obj in items) {
+        if (obj.GetType() == type) {
+          return true;
         }
+      }
+      return false;
+    }
 
-        // ------------------------------------------------------------------
-        /// <summary>
-        /// Adds the item to the collection.
-        /// </summary>
-        /// <param name="item">object</param>
-        /// <returns>int</returns>
-        // ------------------------------------------------------------------
-        public static int Add(object item)
-        {
-            return items.Add(item);
+    // ------------------------------------------------------------------
+    /// <summary>
+    /// Gets all items of the type specified.
+    /// </summary>
+    /// <param name="type"></param>
+    /// <returns></returns>
+    // ------------------------------------------------------------------
+    public static ArrayList GetAll(Type type) {
+      ArrayList subitems = new ArrayList();
+      foreach (Object obj in items) {
+        if (obj.GetType() == type) {
+          subitems.Add(obj);
         }
+      }
+      return subitems;
+    }
 
-        public static int AddStream(MemoryStream stream)
-        {
-            return items.Add(stream);
+    // ------------------------------------------------------------------
+    /// <summary>
+    /// Returns the FIRST item found that has the type specified.
+    /// </summary>
+    /// <param name="type">Type</param>
+    /// <returns>object</returns>
+    // ------------------------------------------------------------------
+    public static object Get(Type type) {
+      foreach (Object obj in items) {
+        if (obj.GetType() == type) {
+          return obj;
         }
+      }
+      return null;
+    }
 
-        // ------------------------------------------------------------------
-        /// <summary>
-        /// Clears the collection.
-        /// </summary>
-        // ------------------------------------------------------------------
-        public static void Clear()
-        {
-            items.Clear();
+    public static MemoryStream GetMemoryStream() {
+      foreach (object obj in items) {
+        if (obj is MemoryStream) {
+          return obj as MemoryStream;
         }
+      }
 
-        // ------------------------------------------------------------------
-        /// <summary>
-        /// Returns if we have any items of the type specified.
-        /// </summary>
-        /// <param name="type">Type</param>
-        /// <returns>bool</returns>
-        // ------------------------------------------------------------------
-        public static bool ContainsData(Type type)
-        {
-            foreach (Object obj in items)
-            {
-                if (obj.GetType() == type)
-                {
-                    return true;
-                }
-            }
-            return false;
-        }
-
-        // ------------------------------------------------------------------
-        /// <summary>
-        /// Gets all items of the type specified.
-        /// </summary>
-        /// <param name="type"></param>
-        /// <returns></returns>
-        // ------------------------------------------------------------------
-        public static ArrayList GetAll(Type type)
-        {
-            ArrayList subitems = new ArrayList();
-            foreach (Object obj in items)
-            {
-                if (obj.GetType() == type)
-                {
-                    subitems.Add(obj);
-                }
-            }
-            return subitems;
-        }
-
-        // ------------------------------------------------------------------
-        /// <summary>
-        /// Returns the FIRST item found that has the type specified.
-        /// </summary>
-        /// <param name="type">Type</param>
-        /// <returns>object</returns>
-        // ------------------------------------------------------------------
-        public static object Get(Type type)
-        {
-            foreach (Object obj in items)
-            {
-                if (obj.GetType() == type)
-                {
-                    return obj;
-                }
-            }
-            return null;
-        }
-
-        public static MemoryStream GetMemoryStream()
-        {
-            foreach (object obj in items)
-            {
-                if (obj is MemoryStream)
-                {
-                    return obj as MemoryStream;
-                }
-            }
-
-            return null;
-        }
+      return null;
     }
+  }
 }
Index: /trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.Netron/3.0.2672.12446/Netron.Diagramming.Core-3.0.2672.12446/Utils/Paint.cs
===================================================================
--- /trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.Netron/3.0.2672.12446/Netron.Diagramming.Core-3.0.2672.12446/Utils/Paint.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.Netron/3.0.2672.12446/Netron.Diagramming.Core-3.0.2672.12446/Utils/Paint.cs	(revision 4068)
@@ -1,16 +1,10 @@
-using System;
-using System.Collections.Generic;
-using System.Text;
 using System.Drawing;
 
-namespace Netron.Diagramming.Core
-{
-    public static class Paint
-    {
-        public static void SimpleConnector(
-            Graphics g,
-            Rectangle bounds)
-        {
-        }
+namespace Netron.Diagramming.Core {
+  public static class Paint {
+    public static void SimpleConnector(
+        Graphics g,
+        Rectangle bounds) {
     }
+  }
 }
Index: /trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.Netron/3.0.2672.12446/Netron.Diagramming.Core-3.0.2672.12446/Utils/SceneIndexComparer.cs
===================================================================
--- /trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.Netron/3.0.2672.12446/Netron.Diagramming.Core-3.0.2672.12446/Utils/SceneIndexComparer.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.Netron/3.0.2672.12446/Netron.Diagramming.Core-3.0.2672.12446/Utils/SceneIndexComparer.cs	(revision 4068)
@@ -1,39 +1,32 @@
-using System;
 using System.Collections;
 using System.Collections.Generic;
-using System.Text;
-using System.Drawing;
-using System.IO;
-namespace Netron.Diagramming.Core
-{
+namespace Netron.Diagramming.Core {
+  /// <summary>
+  /// This <see cref="IComparer"/> compares two diagram entities with respect to their scene index.
+  /// A diagram entity is 'less' than another if the scene index is smaller. Note that two distinct entities can never
+  /// have the same scene index. Since this comparer is used in the first place to re-order the <see cref="IPaintable"/> collection
+  /// it will throw an exception if two indices are found to be the same.
+  /// </summary>
+  /// <typeparam name="T"></typeparam>
+  class SceneIndexComparer<T> : IComparer<T> where T : IDiagramEntity {
     /// <summary>
-    /// This <see cref="IComparer"/> compares two diagram entities with respect to their scene index.
-    /// A diagram entity is 'less' than another if the scene index is smaller. Note that two distinct entities can never
-    /// have the same scene index. Since this comparer is used in the first place to re-order the <see cref="IPaintable"/> collection
-    /// it will throw an exception if two indices are found to be the same.
+    /// Compares two objects and returns a value indicating whether one is less than, equal to, or greater than the other.
     /// </summary>
-    /// <typeparam name="T"></typeparam>
-    class SceneIndexComparer<T> : IComparer<T> where T:IDiagramEntity
-    {
-        /// <summary>
-        /// Compares two objects and returns a value indicating whether one is less than, equal to, or greater than the other.
-        /// </summary>
-        /// <param name="x">The first object to compare.</param>
-        /// <param name="y">The second object to compare.</param>
-        /// <returns>
-        /// Value Condition Less than zerox is less than y.Zerox equals y.Greater than zerox is greater than y.
-        /// </returns>
-        public int Compare(T x, T y)
-        {
-            if(x.SceneIndex == y.SceneIndex)
-                throw new InconsistencyException("Inconsistent stack: two entities had the same scene index.");
+    /// <param name="x">The first object to compare.</param>
+    /// <param name="y">The second object to compare.</param>
+    /// <returns>
+    /// Value Condition Less than zerox is less than y.Zerox equals y.Greater than zerox is greater than y.
+    /// </returns>
+    public int Compare(T x, T y) {
+      if (x.SceneIndex == y.SceneIndex)
+        throw new InconsistencyException("Inconsistent stack: two entities had the same scene index.");
 
-            if(x.SceneIndex < y.SceneIndex)
-                return -1;
-            else
-                return +1;
-        }
+      if (x.SceneIndex < y.SceneIndex)
+        return -1;
+      else
+        return +1;
+    }
 
 
-    }
+  }
 }
Index: /trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.Netron/3.0.2672.12446/Netron.Diagramming.Core-3.0.2672.12446/Utils/Selection.cs
===================================================================
--- /trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.Netron/3.0.2672.12446/Netron.Diagramming.Core-3.0.2672.12446/Utils/Selection.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.Netron/3.0.2672.12446/Netron.Diagramming.Core-3.0.2672.12446/Utils/Selection.cs	(revision 4068)
@@ -1,6 +1,4 @@
 using System;
-using System.Collections.Generic;
 using System.Collections;
-using System.Text;
 using System.Drawing;
 using System.Drawing.Drawing2D;
@@ -153,5 +151,5 @@
       g.SmoothingMode = SmoothingMode.HighQuality;
       Bundle bundle = new Bundle(SelectedItems.Copy());
-      return ImageExporter.FromBundle(bundle,g);
+      return ImageExporter.FromBundle(bundle, g);
     }
 
Index: /trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.Netron/3.0.2672.12446/Netron.Diagramming.Core-3.0.2672.12446/Utils/Styling/ArtPalette.cs
===================================================================
--- /trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.Netron/3.0.2672.12446/Netron.Diagramming.Core-3.0.2672.12446/Utils/Styling/ArtPalette.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.Netron/3.0.2672.12446/Netron.Diagramming.Core-3.0.2672.12446/Utils/Styling/ArtPalette.cs	(revision 4068)
@@ -1,538 +1,477 @@
 using System;
-using System.Collections.Generic;
-using System.Text;
 using System.Drawing;
 using System.Drawing.Drawing2D;
-namespace Netron.Diagramming.Core
-{
-    /// <summary>
-    /// The art pallet consists of the often used colors, brushes, font etc. used by the painting methods.
-    /// You can set the pallet at starup of the diagram control
-    /// </summary>
-    public static class ArtPalette
-    {
-
-        #region Fields
-        private static Font mTitleFont = new Font("Arial", 20F, FontStyle.Bold);
-
-        // ------------------------------------------------------------------
-        /// <summary>
-        /// The default color for new pages.
-        /// </summary>
-        // ------------------------------------------------------------------
-        static Color mDefaultPageColor = Color.White;
-
-        // ------------------------------------------------------------------
-        /// <summary>
-        /// The default color for the page background.
-        /// </summary>
-        // ------------------------------------------------------------------
-        static Color mDefaultPageBackgroundColor = Color.DarkGray;
-
-        // ------------------------------------------------------------------
-        /// <summary>
-        /// whether shadows of entities are painted
-        /// </summary>
-        // ------------------------------------------------------------------
-        private static bool mEnableShadows = true;
-
-        // ------------------------------------------------------------------
-        /// <summary>
-        /// the font for the marks on the rulers
-        /// </summary>
-        // ------------------------------------------------------------------
-        private static Font mRulerFont = new Font(
-            "Arial", 7.0F, FontStyle.Regular);
-
-        // ------------------------------------------------------------------
-        /// <summary>
-        /// the ruler pen 
-        /// </summary>
-        // ------------------------------------------------------------------
-        private static Pen mRulerPen = Pens.Black;
-
-        // ------------------------------------------------------------------
-        /// <summary>
-        /// the background of the rulers
-        /// </summary>
-        // ------------------------------------------------------------------
-        private static Brush mRulerFillBrush = Brushes.White;
-        /// <summary>
-        /// the brush with which to paint the ghosts
-        /// </summary>
-        private static  Brush mGhostBrush = new SolidBrush(Color.FromArgb(120, Color.LightYellow));
-        /// <summary>
-        ///  the ghost pen
-        /// </summary>
-        private static Pen mGhostPen = new Pen(Color.Green, 1.5f);
-        /// <summary>
-        /// the pen to draw the interconnecting folder lines
-        /// </summary>
-        private static Pen mFolderLinesPen = new Pen(Color.Gray, 1.0F);
-        /// <summary>
-        /// the pen used for drawing the tracker
-        /// </summary>
-        private static Pen mTrackerPen = new Pen(Color.DimGray, 1.5F);
-        /// <summary>
-        /// the brush used to paint the grips
-        /// </summary>
-        private static Brush mGripBrush = Brushes.WhiteSmoke;
-        /// <summary>
-        /// Default font for drawing text
-        /// </summary>
-        private static Font mDefaultFont = new Font("Tahoma", 8.5F);
-        /// <summary>
-        /// the font used to  draw bold text
-        /// </summary>
-        private static Font mDefaultBoldFont = new Font("Tahoma", 8.5F, FontStyle.Bold);
-        /// <summary>
-        /// randomizer for generating random colors of a certain style
-        /// </summary>
-        private static Random rnd = new Random();
-        /// <summary>
-        /// Default black pen
-        /// </summary>
-        private static Pen mBlackPen = new Pen(Brushes.Black, 1F);  
-        /// <summary>
-        /// the global shadow brush
-        /// </summary>
-        private static Brush mShadowBrush = new SolidBrush(Color.FromArgb(30, Color.Black));
-        /// <summary>
-        /// Default red pen
-        /// </summary>
-        private static Pen mHighlightPen = new Pen(Brushes.OrangeRed, 1.7F);
-        /// <summary>
-        /// the global shadow pen
-        /// </summary>
-        private static Pen mShadowPen = new Pen(Color.FromArgb(30, Color.Black), 1F);
-        /// <summary>
-        /// the pen used to paint the connections
-        /// </summary>
-        private static Pen mConnectionPen = new Pen(Color.Silver,1F);
-        /// <summary>
-        /// the pen used to paint the highlighted connection
-        /// </summary>
-        private static Pen mConnectionHighlightPen = new Pen(Color.Red, 2.5F);
-
-        private static IPaintStyle mTransparentPaintStyle = new SolidPaintStyle(Color.Transparent);
-        #endregion
-
-        #region Properties
-        
-        // ------------------------------------------------------------------
-        /// <summary>
-        /// Gets or sets the default color for new pages.
-        /// </summary>
-        // ------------------------------------------------------------------
-        public static Color DefaultPageColor
-        {
-            get
-            {
-                return mDefaultPageColor;
-            }
-            set
-            {
-                mDefaultPageColor = value;
-            }
-        }
-
-        // ------------------------------------------------------------------
-        /// <summary>
-        /// Gets or sets the default color for the background of new pages.
-        /// </summary>
-        // ------------------------------------------------------------------
-        public static Color DefaultPageBackgroundColor
-        {
-            get
-            {
-                return mDefaultPageBackgroundColor;
-            }
-            set
-            {
-                mDefaultPageBackgroundColor = value;
-            }
-        }
-
-        /// <summary>
-        /// Gets or sets the title font used on the canvas to display the title of the current page.
-        /// </summary>
-        /// <value>The title font.</value>
-        public static Font TitleFont
-        {
-            get { return mTitleFont; }
-            set { mTitleFont = value; }
-        }
-        /// <summary>
-        /// Gets or sets the global value indicating whether to enable entities shadows.
-        /// </summary>
-        /// <value><c>true</c> to enable shadows; otherwise, <c>false</c>.</value>
-        public static bool EnableShadows
-        {
-            get { return mEnableShadows; }
-            set { mEnableShadows = value; }
-        }
-        /// <summary>
-        /// Gets the ruler font.
-        /// </summary>
-        /// <value>The ruler font.</value>
-        public static Font RulerFont
-        {
-            get { return mRulerFont; }
-        }
-        /// <summary>
-        /// Gets the pen with which the ruler is drawn.
-        /// </summary>
-        /// <value>The ruler pen.</value>
-        public static Pen RulerPen
-        {
-            get { return mRulerPen; }
-        }
-
-        /// <summary>
-        /// Gets the ruller fill brush.
-        /// </summary>
-        /// <value>The ruller fill brush.</value>
-        public static Brush RullerFillBrush
-        {
-            get {
-                return mRulerFillBrush;
-            }
-        }
-
-        /// <summary>
-        /// Gets the brush with which the ghosts are painted.
-        /// </summary>
-        /// <value>The ghost brush.</value>
-        public static Brush GhostBrush
-        {
-            get
-            {
-                return mGhostBrush; 
-            }
-        }
-        /// <summary>
-        /// Gets the pen to draw the multi-point ghost lines.
-        /// </summary>
-        /// <value>The ghost pen.</value>
-        public static Pen GhostPen
-        {
-            get
-            {
-                return mGhostPen;
-            }
-        }
-        /// <summary>
-        /// Gets the pen used to draw the dashed line between <see cref="FolderMaterial"/> nodes.
-        /// </summary>
-        /// <value>The folder lines pen.</value>
-        public static Pen FolderLinesPen
-        {
-            get {
-
-                return mFolderLinesPen;
-            }
-        }
-        /// <summary>
-        /// Gets or sets the connection pen.
-        /// </summary>
-        /// <value>The connection pen.</value>
-        public static Pen ConnectionPen
-        {
-            get
-            {
-                return mConnectionPen;
-            }
-            set
-            {
-                mConnectionPen = value;
-            }
-        }
-        /// <summary>
-        /// Gets or sets the pen used to paint the highlighted connection.
-        /// </summary>
-        /// <value>The connection highlight pen.</value>
-        public static Pen ConnectionHighlightPen
-        {
-            get
-            {
-                return mConnectionHighlightPen;
-            }
-            set
-            {
-                mConnectionHighlightPen = value;
-            }
-        }
-
-        /// <summary>
-        /// Gets or sets the grip brush.
-        /// </summary>
-        /// <value>The grip brush.</value>
-        public static Brush GripBrush
-        {
-            get { return mGripBrush; }
-            set { mGripBrush = value; }
-        }
-
-        #endregion
-
-        #region Methods
-        /// <summary>
-        /// Inits the static instance.
-        /// </summary>
-        public static void Init()
-        {
-            mTrackerPen.DashStyle = System.Drawing.Drawing2D.DashStyle.Dash;
-            mBlackPen.LineJoin = LineJoin.Round;
-            
-            //AdjustableArrowCap ccap = new AdjustableArrowCap(5, 7, true);
-            //mConnectionPen.EndCap = LineCap.Custom;
-            //mConnectionPen.CustomEndCap = ccap;
-
-            //mConnectionHighlightPen.EndCap = LineCap.Custom;
-            //mConnectionHighlightPen.CustomEndCap = ccap;
-
-            mFolderLinesPen.DashStyle = DashStyle.Dot;
-        }
-        /// <summary>
-        /// Gets or sets the default font to render text on the canvas.
-        /// </summary>
-        /// <value>The font.</value>
-        public static Font DefaultFont
-        {
-            get
-            {
-                return ArtPalette.mDefaultFont;
-            }
-            set
-            {
-                ArtPalette.mDefaultFont = value;
-            }
-        }
-        /// <summary>
-        /// Gets or sets the default bold font to render text on the canvas.
-        /// </summary>
-        /// <value>The font.</value>
-        public static Font DefaultBoldFont
-        {
-            get
-            {
-                return ArtPalette.mDefaultBoldFont;
-            }
-            set
-            {
-                ArtPalette.mDefaultBoldFont = value;
-            }
-        }
-        /// <summary>
-        /// Gets the black pen.
-        /// </summary>
-        /// <value>The black pen.</value>
-        public static Pen BlackPen
-        {
-            get
-            {
-                return ArtPalette.mBlackPen;
-            }
-            set
-            {
-                ArtPalette.mBlackPen = value;
-            }
-        }
-        /// <summary>
-        /// Gets the tracker pen.
-        /// </summary>
-        /// <value>The red pen.</value>
-        public static Pen TrackerPen
-        {
-            get { 
-                return ArtPalette.mTrackerPen; }
-            set { ArtPalette.mTrackerPen = value; }
-        }
-        /// <summary>
-        /// Gets the red pen.
-        /// </summary>
-        /// <value>The red pen.</value>
-        public static Pen HighlightPen
-        {
-            get
-            {
-                return ArtPalette.mHighlightPen;
-            }
-            set
-            {
-                ArtPalette.mHighlightPen = value;
-            }
-        }
-        /// <summary>
-        /// Gets the shadow brush.
-        /// </summary>
-        /// <value>The shadow brush.</value>
-        public static Brush ShadowBrush
-        {
-            get
-            {
-                return ArtPalette.mShadowBrush;
-            }
-            set
-            {
-                ArtPalette.mShadowBrush = value;
-            }
-        }
-        /// <summary>
-        /// Gets the shadow pen to paint the shadow of the connections.
-        /// </summary>
-        /// <value>The shadow pen.</value>
-        public static Pen ConnectionShadow
-        {
-            get
-            {
-                return ArtPalette.mShadowPen;
-            }
-            set
-            {
-                ArtPalette.mShadowPen = value;
-            }
-        }
-        /// <summary>
-        /// Gets a random color from the whole available color spectrum.
-        /// </summary>
-        /// <value>The random color.</value>
-        ///<example file="ArtPallet.RandomColor.xml">
-        ///
-        /// 
-        /// wdfgsdfgsdfs
-        ///</example>
-        public static Color RandomColor
-        {
-            get
-            {
-                return Color.FromArgb(rnd.Next(10, 250), rnd.Next(10, 250), rnd.Next(10, 250));
-            }
-        }
-        /// <summary>
-        /// Gets a random blue color.
-        /// <remarks>You can generate any variation of a certain color range by specifying the HSV range and a utility function will convert it to 
-        /// an RGB value (<see cref="Utils.HSL2RGB"/>).
-        /// </remarks>
-        /// </summary>
-        /// <value>The random blues.</value>
-        public static Color RandomBlues
-        {
-            get
-            {
-                return (Color) Utils.HSL2RGB(
-                    (rnd.NextDouble() * 20D + 150D) / 255D, 
-                    (rnd.NextDouble() * 150D + 100D) / 255D, 
-                    (rnd.NextDouble() * 50D + 150D) / 255D);
-            }
-        }
-        /// <summary>
-        /// Gets a random low saturation color.
-        /// </summary>
-        /// <value>The random color.</value>
-        public static Color RandomLowSaturationColor
-        {
-            get
-            {
-                return (Color) Utils.HSL2RGB(
-                    (rnd.NextDouble() * 255D) / 255D, 
-                    (rnd.NextDouble() * 20D + 30D) / 255D, 
-                    (rnd.NextDouble() * 20D + 130D) / 255D);
-            }
-        }
-
-        /// <summary>
-        /// Gets the solid brush.
-        /// </summary>
-        /// <param name="color">The color.</param>
-        /// <param name="alpha">The alpha.</param>
-        /// <returns></returns>
-        public static Brush GetSolidBrush(Color color, int alpha)
-        {
-            return new SolidBrush(Color.FromArgb(alpha, color));
-        }
-
-        /// <summary>
-        /// Gets the gradient brush.
-        /// </summary>
-        /// <param name="startColor">The start color.</param>
-        /// <param name="endColor">The end color.</param>
-        /// <param name="rectangle">The rectangle.</param>
-        /// <param name="angle">The angle.</param>
-        /// <returns></returns>
-        public static Brush GetGradientBrush(Color startColor, Color endColor, Rectangle rectangle, float angle)
-        {
-            return new LinearGradientBrush(rectangle, startColor, endColor, angle);
-        }
-
-        /// <summary>
-        /// Gets the default solid <see cref="IPaintStyle"/>.
-        /// </summary>
-        /// <returns></returns>
-        public static IPaintStyle GetDefaultSolidPaintStyle()
-        {
-           return  new SolidPaintStyle(ArtPalette.RandomLowSaturationColor);
-        }
-        /// <summary>
-        /// Gets the default gradient <see cref="IPaintStyle"/>.
-        /// </summary>
-        /// <returns></returns>
-        public static IPaintStyle GetDefaultGradientPaintStyle()
-        {
-           return  new GradientPaintStyle();
-        }
-        /// <summary>
-        /// Gets the transparent <see cref="IPaintStyle"/>.
-        /// </summary>
-        /// <returns></returns>
-        public static IPaintStyle GetTransparentPaintStyle()
-        {
-            return mTransparentPaintStyle;
-        }
-
-        /// <summary>
-        /// Returns the default paint style for the whole control.
-        /// </summary>
-        /// <returns></returns>
-        public static IPaintStyle GetDefaultPaintStyle()
-        {
-            return GetDefaultGradientPaintStyle();
-        }
-
-        /// <summary>
-        /// Gets the default <see cref="IPenStyle"/>.
-        /// </summary>
-        /// <returns></returns>
-        public static IPenStyle GetDefaultPenStyle()
-        {
-            return new PenStyle(); //this returns a black, standard pen.
-        }
-
-        /// <summary>
-        /// The <see cref="IPenStyle"/> used when the ConnectorStyle is 
-        /// 'Simple'.
-        /// </summary>
-        /// <returns></returns>
-        public static IPenStyle GetSimpleConnectorPenStyle()
-        {
-            LinePenStyle penStyle = new LinePenStyle();
-            penStyle.DashStyle = DashStyle.Solid;
-            penStyle.Color = Color.Blue;
-            return penStyle;
-        }
-
-        /// <summary>
-        /// Returns the <see cref="IPaintStyle"/> used when the 
-        /// ConnectorStyle is 'Simple'.
-        /// </summary>
-        /// <returns></returns>
-        public static IPaintStyle GetSimpleConnectorPaintStyle()
-        {
-            return new SolidPaintStyle(Color.Transparent);
-        }
-
-        #endregion
-        
-    }
- 
+namespace Netron.Diagramming.Core {
+  /// <summary>
+  /// The art pallet consists of the often used colors, brushes, font etc. used by the painting methods.
+  /// You can set the pallet at starup of the diagram control
+  /// </summary>
+  public static class ArtPalette {
+
+    #region Fields
+    private static Font mTitleFont = new Font("Arial", 20F, FontStyle.Bold);
+
+    // ------------------------------------------------------------------
+    /// <summary>
+    /// The default color for new pages.
+    /// </summary>
+    // ------------------------------------------------------------------
+    static Color mDefaultPageColor = Color.White;
+
+    // ------------------------------------------------------------------
+    /// <summary>
+    /// The default color for the page background.
+    /// </summary>
+    // ------------------------------------------------------------------
+    static Color mDefaultPageBackgroundColor = Color.DarkGray;
+
+    // ------------------------------------------------------------------
+    /// <summary>
+    /// whether shadows of entities are painted
+    /// </summary>
+    // ------------------------------------------------------------------
+    private static bool mEnableShadows = true;
+
+    // ------------------------------------------------------------------
+    /// <summary>
+    /// the font for the marks on the rulers
+    /// </summary>
+    // ------------------------------------------------------------------
+    private static Font mRulerFont = new Font(
+        "Arial", 7.0F, FontStyle.Regular);
+
+    // ------------------------------------------------------------------
+    /// <summary>
+    /// the ruler pen 
+    /// </summary>
+    // ------------------------------------------------------------------
+    private static Pen mRulerPen = Pens.Black;
+
+    // ------------------------------------------------------------------
+    /// <summary>
+    /// the background of the rulers
+    /// </summary>
+    // ------------------------------------------------------------------
+    private static Brush mRulerFillBrush = Brushes.White;
+    /// <summary>
+    /// the brush with which to paint the ghosts
+    /// </summary>
+    private static Brush mGhostBrush = new SolidBrush(Color.FromArgb(120, Color.LightYellow));
+    /// <summary>
+    ///  the ghost pen
+    /// </summary>
+    private static Pen mGhostPen = new Pen(Color.Green, 1.5f);
+    /// <summary>
+    /// the pen to draw the interconnecting folder lines
+    /// </summary>
+    private static Pen mFolderLinesPen = new Pen(Color.Gray, 1.0F);
+    /// <summary>
+    /// the pen used for drawing the tracker
+    /// </summary>
+    private static Pen mTrackerPen = new Pen(Color.DimGray, 1.5F);
+    /// <summary>
+    /// the brush used to paint the grips
+    /// </summary>
+    private static Brush mGripBrush = Brushes.WhiteSmoke;
+    /// <summary>
+    /// Default font for drawing text
+    /// </summary>
+    private static Font mDefaultFont = new Font("Tahoma", 8.5F);
+    /// <summary>
+    /// the font used to  draw bold text
+    /// </summary>
+    private static Font mDefaultBoldFont = new Font("Tahoma", 8.5F, FontStyle.Bold);
+    /// <summary>
+    /// randomizer for generating random colors of a certain style
+    /// </summary>
+    private static Random rnd = new Random();
+    /// <summary>
+    /// Default black pen
+    /// </summary>
+    private static Pen mBlackPen = new Pen(Brushes.Black, 1F);
+    /// <summary>
+    /// the global shadow brush
+    /// </summary>
+    private static Brush mShadowBrush = new SolidBrush(Color.FromArgb(30, Color.Black));
+    /// <summary>
+    /// Default red pen
+    /// </summary>
+    private static Pen mHighlightPen = new Pen(Brushes.OrangeRed, 1.7F);
+    /// <summary>
+    /// the global shadow pen
+    /// </summary>
+    private static Pen mShadowPen = new Pen(Color.FromArgb(30, Color.Black), 1F);
+    /// <summary>
+    /// the pen used to paint the connections
+    /// </summary>
+    private static Pen mConnectionPen = new Pen(Color.Silver, 1F);
+    /// <summary>
+    /// the pen used to paint the highlighted connection
+    /// </summary>
+    private static Pen mConnectionHighlightPen = new Pen(Color.Red, 2.5F);
+
+    private static IPaintStyle mTransparentPaintStyle = new SolidPaintStyle(Color.Transparent);
+    #endregion
+
+    #region Properties
+
+    // ------------------------------------------------------------------
+    /// <summary>
+    /// Gets or sets the default color for new pages.
+    /// </summary>
+    // ------------------------------------------------------------------
+    public static Color DefaultPageColor {
+      get {
+        return mDefaultPageColor;
+      }
+      set {
+        mDefaultPageColor = value;
+      }
+    }
+
+    // ------------------------------------------------------------------
+    /// <summary>
+    /// Gets or sets the default color for the background of new pages.
+    /// </summary>
+    // ------------------------------------------------------------------
+    public static Color DefaultPageBackgroundColor {
+      get {
+        return mDefaultPageBackgroundColor;
+      }
+      set {
+        mDefaultPageBackgroundColor = value;
+      }
+    }
+
+    /// <summary>
+    /// Gets or sets the title font used on the canvas to display the title of the current page.
+    /// </summary>
+    /// <value>The title font.</value>
+    public static Font TitleFont {
+      get { return mTitleFont; }
+      set { mTitleFont = value; }
+    }
+    /// <summary>
+    /// Gets or sets the global value indicating whether to enable entities shadows.
+    /// </summary>
+    /// <value><c>true</c> to enable shadows; otherwise, <c>false</c>.</value>
+    public static bool EnableShadows {
+      get { return mEnableShadows; }
+      set { mEnableShadows = value; }
+    }
+    /// <summary>
+    /// Gets the ruler font.
+    /// </summary>
+    /// <value>The ruler font.</value>
+    public static Font RulerFont {
+      get { return mRulerFont; }
+    }
+    /// <summary>
+    /// Gets the pen with which the ruler is drawn.
+    /// </summary>
+    /// <value>The ruler pen.</value>
+    public static Pen RulerPen {
+      get { return mRulerPen; }
+    }
+
+    /// <summary>
+    /// Gets the ruller fill brush.
+    /// </summary>
+    /// <value>The ruller fill brush.</value>
+    public static Brush RullerFillBrush {
+      get {
+        return mRulerFillBrush;
+      }
+    }
+
+    /// <summary>
+    /// Gets the brush with which the ghosts are painted.
+    /// </summary>
+    /// <value>The ghost brush.</value>
+    public static Brush GhostBrush {
+      get {
+        return mGhostBrush;
+      }
+    }
+    /// <summary>
+    /// Gets the pen to draw the multi-point ghost lines.
+    /// </summary>
+    /// <value>The ghost pen.</value>
+    public static Pen GhostPen {
+      get {
+        return mGhostPen;
+      }
+    }
+    /// <summary>
+    /// Gets the pen used to draw the dashed line between <see cref="FolderMaterial"/> nodes.
+    /// </summary>
+    /// <value>The folder lines pen.</value>
+    public static Pen FolderLinesPen {
+      get {
+
+        return mFolderLinesPen;
+      }
+    }
+    /// <summary>
+    /// Gets or sets the connection pen.
+    /// </summary>
+    /// <value>The connection pen.</value>
+    public static Pen ConnectionPen {
+      get {
+        return mConnectionPen;
+      }
+      set {
+        mConnectionPen = value;
+      }
+    }
+    /// <summary>
+    /// Gets or sets the pen used to paint the highlighted connection.
+    /// </summary>
+    /// <value>The connection highlight pen.</value>
+    public static Pen ConnectionHighlightPen {
+      get {
+        return mConnectionHighlightPen;
+      }
+      set {
+        mConnectionHighlightPen = value;
+      }
+    }
+
+    /// <summary>
+    /// Gets or sets the grip brush.
+    /// </summary>
+    /// <value>The grip brush.</value>
+    public static Brush GripBrush {
+      get { return mGripBrush; }
+      set { mGripBrush = value; }
+    }
+
+    #endregion
+
+    #region Methods
+    /// <summary>
+    /// Inits the static instance.
+    /// </summary>
+    public static void Init() {
+      mTrackerPen.DashStyle = System.Drawing.Drawing2D.DashStyle.Dash;
+      mBlackPen.LineJoin = LineJoin.Round;
+
+      //AdjustableArrowCap ccap = new AdjustableArrowCap(5, 7, true);
+      //mConnectionPen.EndCap = LineCap.Custom;
+      //mConnectionPen.CustomEndCap = ccap;
+
+      //mConnectionHighlightPen.EndCap = LineCap.Custom;
+      //mConnectionHighlightPen.CustomEndCap = ccap;
+
+      mFolderLinesPen.DashStyle = DashStyle.Dot;
+    }
+    /// <summary>
+    /// Gets or sets the default font to render text on the canvas.
+    /// </summary>
+    /// <value>The font.</value>
+    public static Font DefaultFont {
+      get {
+        return ArtPalette.mDefaultFont;
+      }
+      set {
+        ArtPalette.mDefaultFont = value;
+      }
+    }
+    /// <summary>
+    /// Gets or sets the default bold font to render text on the canvas.
+    /// </summary>
+    /// <value>The font.</value>
+    public static Font DefaultBoldFont {
+      get {
+        return ArtPalette.mDefaultBoldFont;
+      }
+      set {
+        ArtPalette.mDefaultBoldFont = value;
+      }
+    }
+    /// <summary>
+    /// Gets the black pen.
+    /// </summary>
+    /// <value>The black pen.</value>
+    public static Pen BlackPen {
+      get {
+        return ArtPalette.mBlackPen;
+      }
+      set {
+        ArtPalette.mBlackPen = value;
+      }
+    }
+    /// <summary>
+    /// Gets the tracker pen.
+    /// </summary>
+    /// <value>The red pen.</value>
+    public static Pen TrackerPen {
+      get {
+        return ArtPalette.mTrackerPen;
+      }
+      set { ArtPalette.mTrackerPen = value; }
+    }
+    /// <summary>
+    /// Gets the red pen.
+    /// </summary>
+    /// <value>The red pen.</value>
+    public static Pen HighlightPen {
+      get {
+        return ArtPalette.mHighlightPen;
+      }
+      set {
+        ArtPalette.mHighlightPen = value;
+      }
+    }
+    /// <summary>
+    /// Gets the shadow brush.
+    /// </summary>
+    /// <value>The shadow brush.</value>
+    public static Brush ShadowBrush {
+      get {
+        return ArtPalette.mShadowBrush;
+      }
+      set {
+        ArtPalette.mShadowBrush = value;
+      }
+    }
+    /// <summary>
+    /// Gets the shadow pen to paint the shadow of the connections.
+    /// </summary>
+    /// <value>The shadow pen.</value>
+    public static Pen ConnectionShadow {
+      get {
+        return ArtPalette.mShadowPen;
+      }
+      set {
+        ArtPalette.mShadowPen = value;
+      }
+    }
+    /// <summary>
+    /// Gets a random color from the whole available color spectrum.
+    /// </summary>
+    /// <value>The random color.</value>
+    ///<example file="ArtPallet.RandomColor.xml">
+    ///
+    /// 
+    /// wdfgsdfgsdfs
+    ///</example>
+    public static Color RandomColor {
+      get {
+        return Color.FromArgb(rnd.Next(10, 250), rnd.Next(10, 250), rnd.Next(10, 250));
+      }
+    }
+    /// <summary>
+    /// Gets a random blue color.
+    /// <remarks>You can generate any variation of a certain color range by specifying the HSV range and a utility function will convert it to 
+    /// an RGB value (<see cref="Utils.HSL2RGB"/>).
+    /// </remarks>
+    /// </summary>
+    /// <value>The random blues.</value>
+    public static Color RandomBlues {
+      get {
+        return (Color)Utils.HSL2RGB(
+            (rnd.NextDouble() * 20D + 150D) / 255D,
+            (rnd.NextDouble() * 150D + 100D) / 255D,
+            (rnd.NextDouble() * 50D + 150D) / 255D);
+      }
+    }
+    /// <summary>
+    /// Gets a random low saturation color.
+    /// </summary>
+    /// <value>The random color.</value>
+    public static Color RandomLowSaturationColor {
+      get {
+        return (Color)Utils.HSL2RGB(
+            (rnd.NextDouble() * 255D) / 255D,
+            (rnd.NextDouble() * 20D + 30D) / 255D,
+            (rnd.NextDouble() * 20D + 130D) / 255D);
+      }
+    }
+
+    /// <summary>
+    /// Gets the solid brush.
+    /// </summary>
+    /// <param name="color">The color.</param>
+    /// <param name="alpha">The alpha.</param>
+    /// <returns></returns>
+    public static Brush GetSolidBrush(Color color, int alpha) {
+      return new SolidBrush(Color.FromArgb(alpha, color));
+    }
+
+    /// <summary>
+    /// Gets the gradient brush.
+    /// </summary>
+    /// <param name="startColor">The start color.</param>
+    /// <param name="endColor">The end color.</param>
+    /// <param name="rectangle">The rectangle.</param>
+    /// <param name="angle">The angle.</param>
+    /// <returns></returns>
+    public static Brush GetGradientBrush(Color startColor, Color endColor, Rectangle rectangle, float angle) {
+      return new LinearGradientBrush(rectangle, startColor, endColor, angle);
+    }
+
+    /// <summary>
+    /// Gets the default solid <see cref="IPaintStyle"/>.
+    /// </summary>
+    /// <returns></returns>
+    public static IPaintStyle GetDefaultSolidPaintStyle() {
+      return new SolidPaintStyle(ArtPalette.RandomLowSaturationColor);
+    }
+    /// <summary>
+    /// Gets the default gradient <see cref="IPaintStyle"/>.
+    /// </summary>
+    /// <returns></returns>
+    public static IPaintStyle GetDefaultGradientPaintStyle() {
+      return new GradientPaintStyle();
+    }
+    /// <summary>
+    /// Gets the transparent <see cref="IPaintStyle"/>.
+    /// </summary>
+    /// <returns></returns>
+    public static IPaintStyle GetTransparentPaintStyle() {
+      return mTransparentPaintStyle;
+    }
+
+    /// <summary>
+    /// Returns the default paint style for the whole control.
+    /// </summary>
+    /// <returns></returns>
+    public static IPaintStyle GetDefaultPaintStyle() {
+      return GetDefaultGradientPaintStyle();
+    }
+
+    /// <summary>
+    /// Gets the default <see cref="IPenStyle"/>.
+    /// </summary>
+    /// <returns></returns>
+    public static IPenStyle GetDefaultPenStyle() {
+      return new PenStyle(); //this returns a black, standard pen.
+    }
+
+    /// <summary>
+    /// The <see cref="IPenStyle"/> used when the ConnectorStyle is 
+    /// 'Simple'.
+    /// </summary>
+    /// <returns></returns>
+    public static IPenStyle GetSimpleConnectorPenStyle() {
+      LinePenStyle penStyle = new LinePenStyle();
+      penStyle.DashStyle = DashStyle.Solid;
+      penStyle.Color = Color.Blue;
+      return penStyle;
+    }
+
+    /// <summary>
+    /// Returns the <see cref="IPaintStyle"/> used when the 
+    /// ConnectorStyle is 'Simple'.
+    /// </summary>
+    /// <returns></returns>
+    public static IPaintStyle GetSimpleConnectorPaintStyle() {
+      return new SolidPaintStyle(Color.Transparent);
+    }
+
+    #endregion
+
+  }
+
 }
Index: /trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.Netron/3.0.2672.12446/Netron.Diagramming.Core-3.0.2672.12446/Utils/Styling/CursorPalette.cs
===================================================================
--- /trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.Netron/3.0.2672.12446/Netron.Diagramming.Core-3.0.2672.12446/Utils/Styling/CursorPalette.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.Netron/3.0.2672.12446/Netron.Diagramming.Core-3.0.2672.12446/Utils/Styling/CursorPalette.cs	(revision 4068)
@@ -1,250 +1,219 @@
-using System;
-using System.Collections.Generic;
-using System.Text;
+using System.IO;
+using System.Reflection;
 using System.Windows.Forms;
-using System.Reflection;
-using System.IO;
-namespace Netron.Diagramming.Core
-{
-    /// <summary>
-    /// Pallet of cursors
-    /// <remarks>
-    /// You can define your own cursors or change the existing ones by dropping a cursor file in the Resources directory
-    /// and set the compile flag to 'embedded resource'.
-    /// </remarks>
-    /// </summary>
-    public static class CursorPalette
-    {
-        #region Fields
-        /// <summary>
-        /// The root namespace.
-        /// </summary>
-        private const string NameSpace = "Netron.Diagramming.Core";
-
-
-        static Cursor myDrawRectangle = GetCursor("DrawRectangle.cur");
-        static Cursor myDrawEllipse = GetCursor("DrawEllipse.cur");
-        static Cursor myPan = GetCursor("Pan.cur");
-
-        /// <summary>
-        /// the grip cursor
-        /// </summary>
-        private static Cursor mGrip = new Cursor(Assembly.GetExecutingAssembly().GetManifestResourceStream(NameSpace + ".Resources.Grip.cur"));
-        /// <summary>
-        /// the add cursor
-        /// </summary>
-        private static Cursor mAdd = new Cursor(Assembly.GetExecutingAssembly().GetManifestResourceStream(NameSpace + ".Resources.Add.cur"));
-        /// <summary>
-        /// the cross cursor
-        /// </summary>
-        private static Cursor mCross = new Cursor(Assembly.GetExecutingAssembly().GetManifestResourceStream(NameSpace + ".Resources.Cross.cur"));
-        /// <summary>
-        /// the move cursor
-        /// </summary>
-        private static Cursor mMove = new Cursor(Assembly.GetExecutingAssembly().GetManifestResourceStream(NameSpace + ".Resources.Move.cur"));
-        /// <summary>
-        /// the selection cursor
-        /// </summary>
-        private static Cursor mSelection = new Cursor(Assembly.GetExecutingAssembly().GetManifestResourceStream(NameSpace + ".Resources.Selection.cur"));
-        /// <summary>
-        /// the select cursor
-        /// </summary>
-        private static Cursor mSelect = new Cursor(Assembly.GetExecutingAssembly().GetManifestResourceStream(NameSpace + ".Resources.Select.cur"));
-        /// <summary>
-        /// the drop text cursor
-        /// </summary>
-        private static Cursor mDropText = new Cursor(Assembly.GetExecutingAssembly().GetManifestResourceStream(NameSpace + ".Resources.DropText.cur"));
-        /// <summary>
-        /// the drop shape cursor
-        /// </summary>
-        private static Cursor mDropShape = new Cursor(Assembly.GetExecutingAssembly().GetManifestResourceStream(NameSpace + ".Resources.DropShape.cur"));
-        /// <summary>
-        /// the drop image cursor
-        /// </summary>
-        private static Cursor mDropImage = new Cursor(Assembly.GetExecutingAssembly().GetManifestResourceStream(NameSpace + ".Resources.DropImage.cur"));
-        
-
-        #endregion 
-
-        #region Properties
-
-        // ------------------------------------------------------------------
-        /// <summary>
-        /// Gets the cursor used when drawing a rectangle.
-        /// </summary>
-        // ------------------------------------------------------------------
-        public static Cursor DrawRectangle
-        {
-            get
-            {
-                return myDrawRectangle;
-            }
-        }
-
-        // ------------------------------------------------------------------
-        /// <summary>
-        /// Gets the cursor used when drawing an ellipse.
-        /// </summary>
-        // ------------------------------------------------------------------
-        public static Cursor DrawEllipse
-        {
-            get
-            {
-                return myDrawEllipse;
-            }
-        }
-
-        /// <summary>
-        /// Gets the drop-image cursor to reflect the creation of a new image-shape by dragdrop onto the canvas.
-        /// </summary>
-        /// <value>The drop-image cursor.</value>
-        public static Cursor DropImage
-        {
-            get
-            {
-                return mDropImage;
-            }
-        }
-        /// <summary>
-        /// Gets the drop-text cursor to reflect the creation of a new text-shape by dragdrop onto the canvas.
-        /// </summary>
-        /// <value>The drop-text cursor.</value>
-        public static Cursor DropText
-        {
-            get
-            {
-                return mDropText;
-            }
-        }
-        /// <summary>
-        /// Gets the drop-shape cursor to reflect the creation of a new shape by dragdrop onto the canvas.
-        /// </summary>
-        /// <value>The drop-shape cursor.</value>
-        public static Cursor DropShape
-        {
-            get
-            {
-                return mDropShape;
-            }
-        }
-        /// <summary>
-        /// Gets the grip cursor to reflect the creation of a (new) connection .
-        /// </summary>
-        /// <value>The grip.</value>
-        public static Cursor Grip
-        {
-            get
-            {
-                return mGrip;
-            }
-        }
-        /// <summary>
-        /// Gets the add to reflect the creation of a (new) drawing shape.
-        /// </summary>
-        /// <value>The add.</value>
-        public static Cursor Add
-        {
-            get
-            {
-                return mAdd;
-            }
-        }
-
-        /// <summary>
-        /// Gets the cross cursor.
-        /// </summary>
-        /// <value>The cross.</value>
-        public static Cursor Cross
-        {
-            get
-            {
-                return mCross;
-            }
-        }
-
-        /// <summary>
-        /// Gets the move cursor to reflect the motion of a selection over the canvas.
-        /// </summary>
-        /// <value>The move.</value>
-        public static Cursor Move
-        {
-            get
-            {
-                return mMove;
-            }
-        }
-
-        /// <summary>
-        /// Gets the pan cursor to reflect the action of panning canvas.
-        /// </summary>
-        /// <value>The move.</value>
-        public static Cursor Pan
-        {
-            get
-            {
-                return myPan;
-            }
-        }
-
-        /// <summary>
-        /// Gets the selection cursor to reflect the process of selection shapes by dragging over the canvas.
-        /// </summary>
-        /// <value>The selection.</value>
-        public static Cursor Selection
-        {
-            get
-            {
-                return mSelection;
-            }
-        }
-
-        /// <summary>
-        /// Gets the select cursor to reflect to motion and selection of a single connector (<see cref="ConnectorMoverTool"/>).
-        /// </summary>
-        /// <value>The select.</value>
-        public static Cursor Select
-        {
-            get
-            {
-                return mSelect;
-            }
-        }
-        #endregion
-
-        #region Methods
-
-        // ------------------------------------------------------------------
-        /// <summary>
-        /// Gets the image from the embedded resources for the specified 
-        /// filename.
-        /// </summary>
-        /// <param name="filename">string: The filename from the embedded
-        /// resources.</param>
-        /// <returns>Image</returns>
-        // ------------------------------------------------------------------
-        static Cursor GetCursor(string filename)
-        {
-            return new Cursor(GetStream(filename));
-        }
-
-        // ------------------------------------------------------------------
-        /// <summary>
-        /// Returns a Stream from the manifest resources for the specified 
-        /// filename.
-        /// </summary>
-        /// <param name="filename">string</param>
-        /// <returns>Stream</returns>
-        // ------------------------------------------------------------------
-        public static Stream GetStream(string filename)
-        {
-            return Assembly.GetExecutingAssembly().GetManifestResourceStream(
-                NameSpace +
-                ".Resources." +
-                filename);
-        }
-
-
-        #endregion
-
-    }
+namespace Netron.Diagramming.Core {
+  /// <summary>
+  /// Pallet of cursors
+  /// <remarks>
+  /// You can define your own cursors or change the existing ones by dropping a cursor file in the Resources directory
+  /// and set the compile flag to 'embedded resource'.
+  /// </remarks>
+  /// </summary>
+  public static class CursorPalette {
+    #region Fields
+    /// <summary>
+    /// The root namespace.
+    /// </summary>
+    private const string NameSpace = "Netron.Diagramming.Core";
+
+
+    static Cursor myDrawRectangle = GetCursor("DrawRectangle.cur");
+    static Cursor myDrawEllipse = GetCursor("DrawEllipse.cur");
+    static Cursor myPan = GetCursor("Pan.cur");
+
+    /// <summary>
+    /// the grip cursor
+    /// </summary>
+    private static Cursor mGrip = new Cursor(Assembly.GetExecutingAssembly().GetManifestResourceStream(NameSpace + ".Resources.Grip.cur"));
+    /// <summary>
+    /// the add cursor
+    /// </summary>
+    private static Cursor mAdd = new Cursor(Assembly.GetExecutingAssembly().GetManifestResourceStream(NameSpace + ".Resources.Add.cur"));
+    /// <summary>
+    /// the cross cursor
+    /// </summary>
+    private static Cursor mCross = new Cursor(Assembly.GetExecutingAssembly().GetManifestResourceStream(NameSpace + ".Resources.Cross.cur"));
+    /// <summary>
+    /// the move cursor
+    /// </summary>
+    private static Cursor mMove = new Cursor(Assembly.GetExecutingAssembly().GetManifestResourceStream(NameSpace + ".Resources.Move.cur"));
+    /// <summary>
+    /// the selection cursor
+    /// </summary>
+    private static Cursor mSelection = new Cursor(Assembly.GetExecutingAssembly().GetManifestResourceStream(NameSpace + ".Resources.Selection.cur"));
+    /// <summary>
+    /// the select cursor
+    /// </summary>
+    private static Cursor mSelect = new Cursor(Assembly.GetExecutingAssembly().GetManifestResourceStream(NameSpace + ".Resources.Select.cur"));
+    /// <summary>
+    /// the drop text cursor
+    /// </summary>
+    private static Cursor mDropText = new Cursor(Assembly.GetExecutingAssembly().GetManifestResourceStream(NameSpace + ".Resources.DropText.cur"));
+    /// <summary>
+    /// the drop shape cursor
+    /// </summary>
+    private static Cursor mDropShape = new Cursor(Assembly.GetExecutingAssembly().GetManifestResourceStream(NameSpace + ".Resources.DropShape.cur"));
+    /// <summary>
+    /// the drop image cursor
+    /// </summary>
+    private static Cursor mDropImage = new Cursor(Assembly.GetExecutingAssembly().GetManifestResourceStream(NameSpace + ".Resources.DropImage.cur"));
+
+
+    #endregion
+
+    #region Properties
+
+    // ------------------------------------------------------------------
+    /// <summary>
+    /// Gets the cursor used when drawing a rectangle.
+    /// </summary>
+    // ------------------------------------------------------------------
+    public static Cursor DrawRectangle {
+      get {
+        return myDrawRectangle;
+      }
+    }
+
+    // ------------------------------------------------------------------
+    /// <summary>
+    /// Gets the cursor used when drawing an ellipse.
+    /// </summary>
+    // ------------------------------------------------------------------
+    public static Cursor DrawEllipse {
+      get {
+        return myDrawEllipse;
+      }
+    }
+
+    /// <summary>
+    /// Gets the drop-image cursor to reflect the creation of a new image-shape by dragdrop onto the canvas.
+    /// </summary>
+    /// <value>The drop-image cursor.</value>
+    public static Cursor DropImage {
+      get {
+        return mDropImage;
+      }
+    }
+    /// <summary>
+    /// Gets the drop-text cursor to reflect the creation of a new text-shape by dragdrop onto the canvas.
+    /// </summary>
+    /// <value>The drop-text cursor.</value>
+    public static Cursor DropText {
+      get {
+        return mDropText;
+      }
+    }
+    /// <summary>
+    /// Gets the drop-shape cursor to reflect the creation of a new shape by dragdrop onto the canvas.
+    /// </summary>
+    /// <value>The drop-shape cursor.</value>
+    public static Cursor DropShape {
+      get {
+        return mDropShape;
+      }
+    }
+    /// <summary>
+    /// Gets the grip cursor to reflect the creation of a (new) connection .
+    /// </summary>
+    /// <value>The grip.</value>
+    public static Cursor Grip {
+      get {
+        return mGrip;
+      }
+    }
+    /// <summary>
+    /// Gets the add to reflect the creation of a (new) drawing shape.
+    /// </summary>
+    /// <value>The add.</value>
+    public static Cursor Add {
+      get {
+        return mAdd;
+      }
+    }
+
+    /// <summary>
+    /// Gets the cross cursor.
+    /// </summary>
+    /// <value>The cross.</value>
+    public static Cursor Cross {
+      get {
+        return mCross;
+      }
+    }
+
+    /// <summary>
+    /// Gets the move cursor to reflect the motion of a selection over the canvas.
+    /// </summary>
+    /// <value>The move.</value>
+    public static Cursor Move {
+      get {
+        return mMove;
+      }
+    }
+
+    /// <summary>
+    /// Gets the pan cursor to reflect the action of panning canvas.
+    /// </summary>
+    /// <value>The move.</value>
+    public static Cursor Pan {
+      get {
+        return myPan;
+      }
+    }
+
+    /// <summary>
+    /// Gets the selection cursor to reflect the process of selection shapes by dragging over the canvas.
+    /// </summary>
+    /// <value>The selection.</value>
+    public static Cursor Selection {
+      get {
+        return mSelection;
+      }
+    }
+
+    /// <summary>
+    /// Gets the select cursor to reflect to motion and selection of a single connector (<see cref="ConnectorMoverTool"/>).
+    /// </summary>
+    /// <value>The select.</value>
+    public static Cursor Select {
+      get {
+        return mSelect;
+      }
+    }
+    #endregion
+
+    #region Methods
+
+    // ------------------------------------------------------------------
+    /// <summary>
+    /// Gets the image from the embedded resources for the specified 
+    /// filename.
+    /// </summary>
+    /// <param name="filename">string: The filename from the embedded
+    /// resources.</param>
+    /// <returns>Image</returns>
+    // ------------------------------------------------------------------
+    static Cursor GetCursor(string filename) {
+      return new Cursor(GetStream(filename));
+    }
+
+    // ------------------------------------------------------------------
+    /// <summary>
+    /// Returns a Stream from the manifest resources for the specified 
+    /// filename.
+    /// </summary>
+    /// <param name="filename">string</param>
+    /// <returns>Stream</returns>
+    // ------------------------------------------------------------------
+    public static Stream GetStream(string filename) {
+      return Assembly.GetExecutingAssembly().GetManifestResourceStream(
+          NameSpace +
+          ".Resources." +
+          filename);
+    }
+
+
+    #endregion
+
+  }
 }
Index: /trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.Netron/3.0.2672.12446/Netron.Diagramming.Core-3.0.2672.12446/Utils/Styling/GradientPaintStyle.cs
===================================================================
--- /trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.Netron/3.0.2672.12446/Netron.Diagramming.Core-3.0.2672.12446/Utils/Styling/GradientPaintStyle.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.Netron/3.0.2672.12446/Netron.Diagramming.Core-3.0.2672.12446/Utils/Styling/GradientPaintStyle.cs	(revision 4068)
@@ -1,210 +1,184 @@
-using System;
-using System.Collections.Generic;
-using System.Text;
 using System.Drawing;
 using System.Drawing.Drawing2D;
 
-namespace Netron.Diagramming.Core
-{
-    // ----------------------------------------------------------------------
+namespace Netron.Diagramming.Core {
+  // ----------------------------------------------------------------------
+  /// <summary>
+  /// The gradient paint style
+  /// </summary>
+  // ----------------------------------------------------------------------
+  public partial class GradientPaintStyle :
+      IPaintStyle,
+      IVersion {
+    // ------------------------------------------------------------------
     /// <summary>
-    /// The gradient paint style
+    /// Event raised when this paint style is changed.
     /// </summary>
-    // ----------------------------------------------------------------------
-    public partial class GradientPaintStyle : 
-        IPaintStyle,
-        IVersion
-    {
-        // ------------------------------------------------------------------
-        /// <summary>
-        /// Event raised when this paint style is changed.
-        /// </summary>
-        // ------------------------------------------------------------------
-        public event PaintStyleChangedEventHandler PaintStyleChanged;
+    // ------------------------------------------------------------------
+    public event PaintStyleChangedEventHandler PaintStyleChanged;
 
-        #region Fields
-        
-        // ------------------------------------------------------------------
-        /// <summary>
-        /// Implementation of IVersion - the current version of 
-        /// GradientPaintStyle.
-        /// </summary>
-        // ------------------------------------------------------------------
-        protected const double gradientPaintStyleVersion = 1.0;
+    #region Fields
 
-        // ------------------------------------------------------------------
-        /// <summary>
-        /// the Angle field.
-        /// </summary>
-        // ------------------------------------------------------------------
-        private float mAngle;
+    // ------------------------------------------------------------------
+    /// <summary>
+    /// Implementation of IVersion - the current version of 
+    /// GradientPaintStyle.
+    /// </summary>
+    // ------------------------------------------------------------------
+    protected const double gradientPaintStyleVersion = 1.0;
 
-        // ------------------------------------------------------------------
-        /// <summary>
-        /// the EndColor field
-        /// </summary>
-        // ------------------------------------------------------------------
-        private Color mEndColor;
+    // ------------------------------------------------------------------
+    /// <summary>
+    /// the Angle field.
+    /// </summary>
+    // ------------------------------------------------------------------
+    private float mAngle;
 
-        // ------------------------------------------------------------------
-        /// <summary>
-        /// the StartColor field
-        /// </summary>
-        // ------------------------------------------------------------------
-        private Color mStartColor;
+    // ------------------------------------------------------------------
+    /// <summary>
+    /// the EndColor field
+    /// </summary>
+    // ------------------------------------------------------------------
+    private Color mEndColor;
 
-        #endregion
+    // ------------------------------------------------------------------
+    /// <summary>
+    /// the StartColor field
+    /// </summary>
+    // ------------------------------------------------------------------
+    private Color mStartColor;
 
-        #region Properties
+    #endregion
 
-        // ------------------------------------------------------------------
-        /// <summary>
-        /// Gets the current version.
-        /// </summary>
-        // ------------------------------------------------------------------
-        public virtual double Version
-        {
-            get
-            {
-                return gradientPaintStyleVersion;
-            }
+    #region Properties
+
+    // ------------------------------------------------------------------
+    /// <summary>
+    /// Gets the current version.
+    /// </summary>
+    // ------------------------------------------------------------------
+    public virtual double Version {
+      get {
+        return gradientPaintStyleVersion;
+      }
+    }
+
+    // ------------------------------------------------------------------
+    /// <summary>
+    /// Gets or sets the StartColor
+    /// </summary>
+    // ------------------------------------------------------------------
+    public Color StartColor {
+      get {
+        return mStartColor;
+      }
+      set {
+        mStartColor = value;
+        RaisePaintStyleChanged();
+      }
+    }
+
+    // ------------------------------------------------------------------
+    /// <summary>
+    /// Gets or sets the EndColor
+    /// </summary>
+    // ------------------------------------------------------------------
+    public Color EndColor {
+      get {
+        return mEndColor;
+      }
+      set {
+        mEndColor = value;
+        RaisePaintStyleChanged();
+      }
+    }
+
+    // ------------------------------------------------------------------
+    /// <summary>
+    /// Gets or sets the Angle
+    /// </summary>
+    // ------------------------------------------------------------------
+    public float Angle {
+      get {
+        return mAngle;
+      }
+      set {
+        mAngle = value;
+        RaisePaintStyleChanged();
+      }
+    }
+    #endregion
+
+    #region Constructor
+
+    // ------------------------------------------------------------------
+    ///<summary>
+    ///Default constructor
+    ///</summary>
+    // ------------------------------------------------------------------
+    public GradientPaintStyle(
+        Color startColor,
+        Color endColor,
+        float angle) {
+      mStartColor = startColor;
+      mEndColor = endColor;
+      mAngle = angle;
+    }
+
+    // ------------------------------------------------------------------
+    /// <summary>
+    /// Initializes a new instance of the 
+    /// <see cref="T:GradientPaintStyle"/> class.
+    /// </summary>
+    // ------------------------------------------------------------------
+    public GradientPaintStyle() {
+      mStartColor = ArtPalette.RandomLowSaturationColor;
+      mEndColor = Color.White;
+      mAngle = -135;
+    }
+    #endregion
+
+    // ------------------------------------------------------------------
+    /// <summary>
+    /// Gets the brush.
+    /// </summary>
+    /// <param name="rectangle">The rectangle.</param>
+    /// <returns>Brush</returns>
+    // ------------------------------------------------------------------
+    public Brush GetBrush(Rectangle rectangle) {
+      if (rectangle.Equals(Rectangle.Empty)) {
+        return new SolidBrush(mStartColor);
+      } else {
+        if (rectangle.Width == 0) {
+          rectangle.Width = 1;
         }
 
-        // ------------------------------------------------------------------
-        /// <summary>
-        /// Gets or sets the StartColor
-        /// </summary>
-        // ------------------------------------------------------------------
-        public Color StartColor
-        {
-            get 
-            { 
-                return mStartColor; 
-            }
-            set 
-            { 
-                mStartColor = value;
-                RaisePaintStyleChanged();
-            }
+        if (rectangle.Height == 0) {
+          rectangle.Height = 1;
         }
+        return new LinearGradientBrush(
+            rectangle,
+            mStartColor,
+            mEndColor,
+            mAngle,
+            true);
+      }
+    }
 
-        // ------------------------------------------------------------------
-        /// <summary>
-        /// Gets or sets the EndColor
-        /// </summary>
-        // ------------------------------------------------------------------
-        public Color EndColor
-        {
-            get 
-            { 
-                return mEndColor; 
-            }
-            set 
-            {
-                mEndColor = value;
-                RaisePaintStyleChanged();
-            }
-        }
-
-        // ------------------------------------------------------------------
-        /// <summary>
-        /// Gets or sets the Angle
-        /// </summary>
-        // ------------------------------------------------------------------
-        public float Angle
-        {
-            get 
-            { 
-                return mAngle; 
-            }
-            set 
-            {
-                mAngle = value;
-                RaisePaintStyleChanged();
-            }
-        }
-        #endregion
-
-        #region Constructor
-
-        // ------------------------------------------------------------------
-        ///<summary>
-        ///Default constructor
-        ///</summary>
-        // ------------------------------------------------------------------
-        public GradientPaintStyle(
-            Color startColor, 
-            Color endColor, 
-            float angle)
-        {
-            mStartColor = startColor;
-            mEndColor = endColor;
-            mAngle = angle;
-        }
-
-        // ------------------------------------------------------------------
-        /// <summary>
-        /// Initializes a new instance of the 
-        /// <see cref="T:GradientPaintStyle"/> class.
-        /// </summary>
-        // ------------------------------------------------------------------
-        public GradientPaintStyle()
-        {
-            mStartColor = ArtPalette.RandomLowSaturationColor;
-            mEndColor = Color.White;
-            mAngle = -135;
-        }
-        #endregion
-
-        // ------------------------------------------------------------------
-        /// <summary>
-        /// Gets the brush.
-        /// </summary>
-        /// <param name="rectangle">The rectangle.</param>
-        /// <returns>Brush</returns>
-        // ------------------------------------------------------------------
-        public Brush GetBrush(Rectangle rectangle)
-        {
-            if (rectangle.Equals(Rectangle.Empty))
-            {
-                return new SolidBrush(mStartColor);
-            }
-            else
-            {
-                if (rectangle.Width == 0)
-                {
-                    rectangle.Width = 1;
-                }
-
-                if (rectangle.Height == 0)
-                {
-                    rectangle.Height = 1;
-                }
-                return new LinearGradientBrush(
-                    rectangle,
-                    mStartColor,
-                    mEndColor,
-                    mAngle,
-                    true);
-            }
-        }
-
-        // ------------------------------------------------------------------
-        /// <summary>
-        /// Raises the PaintStyleChanged event.
-        /// </summary>
-        // ------------------------------------------------------------------
-        protected virtual void RaisePaintStyleChanged()
-        {
-            if (this.PaintStyleChanged != null)
-            {
-                // Raise the event
-                this.PaintStyleChanged(
-                    this,
-                    new PaintStyleChangedEventArgs(
-                    this, 
-                    FillType.LinearGradient));
-            }
-        }
+    // ------------------------------------------------------------------
+    /// <summary>
+    /// Raises the PaintStyleChanged event.
+    /// </summary>
+    // ------------------------------------------------------------------
+    protected virtual void RaisePaintStyleChanged() {
+      if (this.PaintStyleChanged != null) {
+        // Raise the event
+        this.PaintStyleChanged(
+            this,
+            new PaintStyleChangedEventArgs(
+            this,
+            FillType.LinearGradient));
+      }
     }
+  }
 }
Index: /trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.Netron/3.0.2672.12446/Netron.Diagramming.Core-3.0.2672.12446/Utils/Styling/ImagePalette.cs
===================================================================
--- /trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.Netron/3.0.2672.12446/Netron.Diagramming.Core-3.0.2672.12446/Utils/Styling/ImagePalette.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.Netron/3.0.2672.12446/Netron.Diagramming.Core-3.0.2672.12446/Utils/Styling/ImagePalette.cs	(revision 4068)
@@ -1,534 +1,467 @@
-using System;
-using System.Collections.Generic;
-using System.Text;
-using System.Windows.Forms;
 using System.Drawing;
+using System.IO;
 using System.Reflection;
-using System.IO;
-
-namespace Netron.Diagramming.Core
-{
-    public class ImagePalette
-    {
-        public const string PropertiesFileName =
-            "PropertiesHS.png";
-
-        #region Fields
-
-        const string mNameSpace = "Netron.Diagramming.Core";
-
-        static Image mAlignObjectsBottom =
-            GetImage("AlignObjectsBottomHS.png");
-
-        static Image mAlignObjectsCenteredHorizontal =
-            GetImage("AlignObjectsCenteredHorizontalHS.png");
-
-        static Image mAlignObjectsCenteredVertical =
-            GetImage("AlignObjectsCenteredVerticalHS.png");
-
-        static Image mAlignObjectsLeft = GetImage("AlignObjectsLeftHS.png");
-
-        static Image mAlignObjectsRight = GetImage("AlignObjectsRightHS.png");
-
-        static Image mAlignObjectsTop = GetImage("AlignObjectsTopHS.png");
-
-        static Image mArrow = GetImage("StandardArrow.png");
-
-        static Image mBringForward = GetImage("BringForwardHS.png");
-
-        static Image mBringToFront = GetImage("BringToFrontHS.png");
-
-        static Image mBucketFill = GetImage("BucketFill.bmp", Color.Magenta);
-
-        static Image mClassShape = GetImage("ClassShape.png");
-
-        static Image mCenterAlignment = GetImage(
-            "CenterAlignment.bmp", 
-            Color.Silver);
-
-        static Image mConnection = GetImage("Connection.png");
-
-        static Image mDrawEllipse = GetImage("DrawEllipse.png");
-
-        static Image mDrawRectangle = GetImage("DrawRectangle.png");
-
-        static Image mFont = GetImage("FontDialogHS.png");
-
-        static Image mGroup = GetImage("Group.png");
-        
-        static Image mLeftAlignment = GetImage(
-            "LeftAlignment.bmp",
-            Color.Silver);
-
-        static Image mMoveConnector = GetImage("ConnectorMover.png");
-
-        static Image mNewDocumnet = GetImage("NewDocumentHS.png");
-
-        static Image mOutline = GetImage(
-            "PenDraw.bmp",
-            Color.Magenta);
-
-        static Image mProperties = GetImage("PropertiesHS.png");
-
-        static Image mRedo = GetImage("Edit_RedoHS.png");
-
-        static Image mRightAlignment = GetImage(
-            "RightAlignment.bmp",
-            Color.Silver);
-
-        static Image mSendBackwards = GetImage("SendBackwardHS.png");
-
-        static Image mSendToBack = GetImage("SendToBackHS.png");
-
-        static Image mShortcut = GetImage("Shortcut.bmp");
-
-        static Image mUndo = GetImage("Edit_UndoHS.png");
-
-        static Image mUngroup = GetImage("Ungroup.png");
-
-        #endregion
-
-        #region Properties
-
-        // ------------------------------------------------------------------
-        /// <summary>
-        /// Gets the image that represents aligning the bottom edges of
-        /// objects.
-        /// </summary>
-        // ------------------------------------------------------------------
-        public static Image AlignObjectsBottom
-        {
-            get
-            {
-                return mAlignObjectsBottom;
-            }
-        }
-
-        // ------------------------------------------------------------------
-        /// <summary>
-        /// Gets the image that represents horizontally aligning the center
-        /// of objects.
-        /// </summary>
-        // ------------------------------------------------------------------
-        public static Image AlignObjectsCenteredHorizontal
-        {
-            get
-            {
-                return mAlignObjectsCenteredHorizontal;
-            }
-        }
-
-        // ------------------------------------------------------------------
-        /// <summary>
-        /// Gets the image that represents vertically aligning the center
-        /// of objects.
-        /// </summary>
-        // ------------------------------------------------------------------
-        public static Image AlignObjectsCenteredVertical
-        {
-            get
-            {
-                return mAlignObjectsCenteredVertical;
-            }
-        }
-
-        // ------------------------------------------------------------------
-        /// <summary>
-        /// Gets the image that represents aligning the left edge of objects.
-        /// </summary>
-        // ------------------------------------------------------------------
-        public static Image AlignObjectsLeft
-        {
-            get
-            {
-                return mAlignObjectsLeft;
-            }
-        }
-
-        // ------------------------------------------------------------------
-        /// <summary>
-        /// Gets the image that represents aligning the right edge of objects.
-        /// </summary>
-        // ------------------------------------------------------------------
-        public static Image AlignObjectsRight
-        {
-            get
-            {
-                return mAlignObjectsRight;
-            }
-        }
-
-        // ------------------------------------------------------------------
-        /// <summary>
-        /// Gets the image that represents aligning the top edge of objects.
-        /// </summary>
-        // ------------------------------------------------------------------
-        public static Image AlignObjectsTop
-        {
-            get
-            {
-                return mAlignObjectsTop;
-            }
-        }
-
-        // ------------------------------------------------------------------
-        /// <summary>
-        /// Gets the image that represents a arrow (standard cursor arrow).
-        /// </summary>
-        // ------------------------------------------------------------------
-        public static Image Arrow
-        {
-            get
-            {
-                return mArrow;
-            }
-        }
-
-        // ------------------------------------------------------------------
-        /// <summary>
-        /// Gets the image that represents bringing an object all the way to
-        /// to the front in the z-order.
-        /// </summary>
-        // ------------------------------------------------------------------
-        public static Image BringToFront
-        {
-            get
-            {
-                return mBringToFront;
-            }
-        }
-
-        // ------------------------------------------------------------------
-        /// <summary>
-        /// Gets the image that represents bring an object forward in the 
-        /// z-order.
-        /// </summary>
-        // ------------------------------------------------------------------
-        public static Image BringForward
-        {
-            get
-            {
-                return mBringForward;
-            }
-        }
-
-        // ------------------------------------------------------------------
-        /// <summary>
-        /// Gets an image of a bucket of color - used to illustrate fill 
-        /// color.
-        /// </summary>
-        // ------------------------------------------------------------------
-        public static Image BucketFill
-        {
-            get
-            {
-                return mBucketFill;
-            }
-        }
-
-        // ------------------------------------------------------------------
-        /// <summary>
-        /// Gets the image that represents text being centered.
-        /// </summary>
-        // ------------------------------------------------------------------
-        public static Image CenterAlignment
-        {
-            get
-            {
-                return mCenterAlignment;
-            }
-        }
-
-        // ------------------------------------------------------------------
-        /// <summary>
-        /// Gets the class shape image.
-        /// </summary>
-        // ------------------------------------------------------------------
-        public static Image ClassShape
-        {
-            get
-            {
-                return mClassShape;
-            }
-        }
-
-        // ------------------------------------------------------------------
-        /// <summary>
-        /// Gets the image that represents a connection line.
-        /// </summary>
-        // ------------------------------------------------------------------
-        public static Image Connection
-        {
-            get
-            {
-                return mConnection;
-            }
-        }
-
-        // ------------------------------------------------------------------
-        /// <summary>
-        /// Gets the image that represents an ellipse.
-        /// </summary>
-        // ------------------------------------------------------------------
-        public static Image DrawEllipse
-        {
-            get
-            {
-                return mDrawEllipse;
-            }
-        }
-
-        // ------------------------------------------------------------------
-        /// <summary>
-        /// Gets the image that represents a rectangle.
-        /// </summary>
-        // ------------------------------------------------------------------
-        public static Image DrawRectangle
-        {
-            get
-            {
-                return mDrawRectangle;
-            }
-        }
-
-        // ------------------------------------------------------------------
-        /// <summary>
-        /// Gets the image that represents font.
-        /// </summary>
-        // ------------------------------------------------------------------
-        public static Image Font
-        {
-            get
-            {
-                return mFont;
-            }
-        }
-
-        // ------------------------------------------------------------------
-        /// <summary>
-        /// Gets the image that represents grouping objects together..
-        /// </summary>
-        // ------------------------------------------------------------------
-        public static Image Group
-        {
-            get
-            {
-                return mGroup;
-            }
-        }
-
-        // ------------------------------------------------------------------
-        /// <summary>
-        /// Gets the image that represents text being aligned to the left.
-        /// </summary>
-        // ------------------------------------------------------------------
-        public static Image LeftAlignment
-        {
-            get
-            {
-                return mLeftAlignment;
-            }
-        }
-
-        // ------------------------------------------------------------------
-        /// <summary>
-        /// Gets the image that represents a connection line.
-        /// </summary>
-        // ------------------------------------------------------------------
-        public static Image MoveConnector
-        {
-            get
-            {
-                return mMoveConnector;
-            }
-        }
-
-        // ------------------------------------------------------------------
-        /// <summary>
-        /// Gets the image that represents creating a new diagram.
-        /// </summary>
-        // ------------------------------------------------------------------
-        public static Image NewDocument
-        {
-            get
-            {
-                return mNewDocumnet;
-            }
-        }
-
-        // ------------------------------------------------------------------
-        /// <summary>
-        /// Gets the image that represents a pen drawing a line with a
-        /// color - used to illustrate line color.
-        /// </summary>
-        // ------------------------------------------------------------------
-        public static Image Outline
-        {
-            get
-            {
-                return mOutline;
-            }
-        }
-
-        // ------------------------------------------------------------------
-        /// <summary>
-        /// Gets the image that represents properties.
-        /// </summary>
-        // ------------------------------------------------------------------
-        public static Image Properties
-        {
-            get
-            {
-                return mProperties;
-            }
-        }
-
-        // ------------------------------------------------------------------
-        /// <summary>
-        /// Gets the image that represents redoing a command.
-        /// </summary>
-        // ------------------------------------------------------------------
-        public static Image Redo
-        {
-            get
-            {
-                return mRedo;
-            }
-        }
-
-        // ------------------------------------------------------------------
-        /// <summary>
-        /// Gets the image that represents text being aligned to the right.
-        /// </summary>
-        // ------------------------------------------------------------------
-        public static Image RightAlignment
-        {
-            get
-            {
-                return mRightAlignment;
-            }
-        }
-
-        // ------------------------------------------------------------------
-        /// <summary>
-        /// Gets the image that represents sending an object back in the 
-        /// z-order.
-        /// </summary>
-        // ------------------------------------------------------------------
-        public static Image SendBackwards
-        {
-            get
-            {
-                return mSendBackwards;
-            }
-        }
-
-        // ------------------------------------------------------------------
-        /// <summary>
-        /// Gets the image that represents sending an object all the way back
-        /// in the z-order.
-        /// </summary>
-        // ------------------------------------------------------------------
-        public static Image SendToBack
-        {
-            get
-            {
-                return mSendToBack;
-            }
-        }
-
-        // ------------------------------------------------------------------
-        /// <summary>
-        /// Gets the image that represents a shortcut to a file or resource.
-        /// </summary>
-        // ------------------------------------------------------------------
-        public static Image Shortcut
-        {
-            get
-            {
-                return mShortcut;
-            }
-        }
-
-        // ------------------------------------------------------------------
-        /// <summary>
-        /// Gets the image that represents undoing a command.
-        /// </summary>
-        // ------------------------------------------------------------------
-        public static Image Undo
-        {
-            get
-            {
-                return mUndo;
-            }
-        }
-
-        // ------------------------------------------------------------------
-        /// <summary>
-        /// Gets the image that represents ungrouping objects.
-        /// </summary>
-        // ------------------------------------------------------------------
-        public static Image Ungroup
-        {
-            get
-            {
-                return mUngroup;
-            }
-        }
-
-        #endregion
-
-        #region Helpers
-
-        // ------------------------------------------------------------------
-        /// <summary>
-        /// Gets the image from the embedded resources for the specified 
-        /// filename and sets the image's transparent color to the one
-        /// specified..
-        /// </summary>
-        /// <param name="filename">string: The filename from the embedded
-        /// resources.</param>
-        /// <param name="transparentColor">Color: The transparent color
-        /// for the image.</param>
-        /// <returns>Image</returns>
-        // ------------------------------------------------------------------
-        static Image GetImage(string filename, Color transparentColor)
-        {
-            Bitmap bmp = GetImage(filename);
-            bmp.MakeTransparent(transparentColor);
-            return bmp;
-        }
-
-        // ------------------------------------------------------------------
-        /// <summary>
-        /// Gets the image from the embedded resources for the specified 
-        /// filename.
-        /// </summary>
-        /// <param name="filename">string: The filename from the embedded
-        /// resources.</param>
-        /// <returns>Image</returns>
-        // ------------------------------------------------------------------
-        static Bitmap GetImage(string filename)
-        {
-            return new Bitmap(GetStream(filename));
-        }
-
-        // ------------------------------------------------------------------
-        /// <summary>
-        /// Returns a Stream from the manifest resources for the specified 
-        /// filename.
-        /// </summary>
-        /// <param name="filename">string</param>
-        /// <returns>Stream</returns>
-        // ------------------------------------------------------------------
-        public static Stream GetStream(string filename)
-        {
-            return Assembly.GetExecutingAssembly().GetManifestResourceStream(
-                mNameSpace +
-                ".Resources." +
-                filename);
-        }
-
-        #endregion
-    }
+
+namespace Netron.Diagramming.Core {
+  public class ImagePalette {
+    public const string PropertiesFileName =
+        "PropertiesHS.png";
+
+    #region Fields
+
+    const string mNameSpace = "Netron.Diagramming.Core";
+
+    static Image mAlignObjectsBottom =
+        GetImage("AlignObjectsBottomHS.png");
+
+    static Image mAlignObjectsCenteredHorizontal =
+        GetImage("AlignObjectsCenteredHorizontalHS.png");
+
+    static Image mAlignObjectsCenteredVertical =
+        GetImage("AlignObjectsCenteredVerticalHS.png");
+
+    static Image mAlignObjectsLeft = GetImage("AlignObjectsLeftHS.png");
+
+    static Image mAlignObjectsRight = GetImage("AlignObjectsRightHS.png");
+
+    static Image mAlignObjectsTop = GetImage("AlignObjectsTopHS.png");
+
+    static Image mArrow = GetImage("StandardArrow.png");
+
+    static Image mBringForward = GetImage("BringForwardHS.png");
+
+    static Image mBringToFront = GetImage("BringToFrontHS.png");
+
+    static Image mBucketFill = GetImage("BucketFill.bmp", Color.Magenta);
+
+    static Image mClassShape = GetImage("ClassShape.png");
+
+    static Image mCenterAlignment = GetImage(
+        "CenterAlignment.bmp",
+        Color.Silver);
+
+    static Image mConnection = GetImage("Connection.png");
+
+    static Image mDrawEllipse = GetImage("DrawEllipse.png");
+
+    static Image mDrawRectangle = GetImage("DrawRectangle.png");
+
+    static Image mFont = GetImage("FontDialogHS.png");
+
+    static Image mGroup = GetImage("Group.png");
+
+    static Image mLeftAlignment = GetImage(
+        "LeftAlignment.bmp",
+        Color.Silver);
+
+    static Image mMoveConnector = GetImage("ConnectorMover.png");
+
+    static Image mNewDocumnet = GetImage("NewDocumentHS.png");
+
+    static Image mOutline = GetImage(
+        "PenDraw.bmp",
+        Color.Magenta);
+
+    static Image mProperties = GetImage("PropertiesHS.png");
+
+    static Image mRedo = GetImage("Edit_RedoHS.png");
+
+    static Image mRightAlignment = GetImage(
+        "RightAlignment.bmp",
+        Color.Silver);
+
+    static Image mSendBackwards = GetImage("SendBackwardHS.png");
+
+    static Image mSendToBack = GetImage("SendToBackHS.png");
+
+    static Image mShortcut = GetImage("Shortcut.bmp");
+
+    static Image mUndo = GetImage("Edit_UndoHS.png");
+
+    static Image mUngroup = GetImage("Ungroup.png");
+
+    #endregion
+
+    #region Properties
+
+    // ------------------------------------------------------------------
+    /// <summary>
+    /// Gets the image that represents aligning the bottom edges of
+    /// objects.
+    /// </summary>
+    // ------------------------------------------------------------------
+    public static Image AlignObjectsBottom {
+      get {
+        return mAlignObjectsBottom;
+      }
+    }
+
+    // ------------------------------------------------------------------
+    /// <summary>
+    /// Gets the image that represents horizontally aligning the center
+    /// of objects.
+    /// </summary>
+    // ------------------------------------------------------------------
+    public static Image AlignObjectsCenteredHorizontal {
+      get {
+        return mAlignObjectsCenteredHorizontal;
+      }
+    }
+
+    // ------------------------------------------------------------------
+    /// <summary>
+    /// Gets the image that represents vertically aligning the center
+    /// of objects.
+    /// </summary>
+    // ------------------------------------------------------------------
+    public static Image AlignObjectsCenteredVertical {
+      get {
+        return mAlignObjectsCenteredVertical;
+      }
+    }
+
+    // ------------------------------------------------------------------
+    /// <summary>
+    /// Gets the image that represents aligning the left edge of objects.
+    /// </summary>
+    // ------------------------------------------------------------------
+    public static Image AlignObjectsLeft {
+      get {
+        return mAlignObjectsLeft;
+      }
+    }
+
+    // ------------------------------------------------------------------
+    /// <summary>
+    /// Gets the image that represents aligning the right edge of objects.
+    /// </summary>
+    // ------------------------------------------------------------------
+    public static Image AlignObjectsRight {
+      get {
+        return mAlignObjectsRight;
+      }
+    }
+
+    // ------------------------------------------------------------------
+    /// <summary>
+    /// Gets the image that represents aligning the top edge of objects.
+    /// </summary>
+    // ------------------------------------------------------------------
+    public static Image AlignObjectsTop {
+      get {
+        return mAlignObjectsTop;
+      }
+    }
+
+    // ------------------------------------------------------------------
+    /// <summary>
+    /// Gets the image that represents a arrow (standard cursor arrow).
+    /// </summary>
+    // ------------------------------------------------------------------
+    public static Image Arrow {
+      get {
+        return mArrow;
+      }
+    }
+
+    // ------------------------------------------------------------------
+    /// <summary>
+    /// Gets the image that represents bringing an object all the way to
+    /// to the front in the z-order.
+    /// </summary>
+    // ------------------------------------------------------------------
+    public static Image BringToFront {
+      get {
+        return mBringToFront;
+      }
+    }
+
+    // ------------------------------------------------------------------
+    /// <summary>
+    /// Gets the image that represents bring an object forward in the 
+    /// z-order.
+    /// </summary>
+    // ------------------------------------------------------------------
+    public static Image BringForward {
+      get {
+        return mBringForward;
+      }
+    }
+
+    // ------------------------------------------------------------------
+    /// <summary>
+    /// Gets an image of a bucket of color - used to illustrate fill 
+    /// color.
+    /// </summary>
+    // ------------------------------------------------------------------
+    public static Image BucketFill {
+      get {
+        return mBucketFill;
+      }
+    }
+
+    // ------------------------------------------------------------------
+    /// <summary>
+    /// Gets the image that represents text being centered.
+    /// </summary>
+    // ------------------------------------------------------------------
+    public static Image CenterAlignment {
+      get {
+        return mCenterAlignment;
+      }
+    }
+
+    // ------------------------------------------------------------------
+    /// <summary>
+    /// Gets the class shape image.
+    /// </summary>
+    // ------------------------------------------------------------------
+    public static Image ClassShape {
+      get {
+        return mClassShape;
+      }
+    }
+
+    // ------------------------------------------------------------------
+    /// <summary>
+    /// Gets the image that represents a connection line.
+    /// </summary>
+    // ------------------------------------------------------------------
+    public static Image Connection {
+      get {
+        return mConnection;
+      }
+    }
+
+    // ------------------------------------------------------------------
+    /// <summary>
+    /// Gets the image that represents an ellipse.
+    /// </summary>
+    // ------------------------------------------------------------------
+    public static Image DrawEllipse {
+      get {
+        return mDrawEllipse;
+      }
+    }
+
+    // ------------------------------------------------------------------
+    /// <summary>
+    /// Gets the image that represents a rectangle.
+    /// </summary>
+    // ------------------------------------------------------------------
+    public static Image DrawRectangle {
+      get {
+        return mDrawRectangle;
+      }
+    }
+
+    // ------------------------------------------------------------------
+    /// <summary>
+    /// Gets the image that represents font.
+    /// </summary>
+    // ------------------------------------------------------------------
+    public static Image Font {
+      get {
+        return mFont;
+      }
+    }
+
+    // ------------------------------------------------------------------
+    /// <summary>
+    /// Gets the image that represents grouping objects together..
+    /// </summary>
+    // ------------------------------------------------------------------
+    public static Image Group {
+      get {
+        return mGroup;
+      }
+    }
+
+    // ------------------------------------------------------------------
+    /// <summary>
+    /// Gets the image that represents text being aligned to the left.
+    /// </summary>
+    // ------------------------------------------------------------------
+    public static Image LeftAlignment {
+      get {
+        return mLeftAlignment;
+      }
+    }
+
+    // ------------------------------------------------------------------
+    /// <summary>
+    /// Gets the image that represents a connection line.
+    /// </summary>
+    // ------------------------------------------------------------------
+    public static Image MoveConnector {
+      get {
+        return mMoveConnector;
+      }
+    }
+
+    // ------------------------------------------------------------------
+    /// <summary>
+    /// Gets the image that represents creating a new diagram.
+    /// </summary>
+    // ------------------------------------------------------------------
+    public static Image NewDocument {
+      get {
+        return mNewDocumnet;
+      }
+    }
+
+    // ------------------------------------------------------------------
+    /// <summary>
+    /// Gets the image that represents a pen drawing a line with a
+    /// color - used to illustrate line color.
+    /// </summary>
+    // ------------------------------------------------------------------
+    public static Image Outline {
+      get {
+        return mOutline;
+      }
+    }
+
+    // ------------------------------------------------------------------
+    /// <summary>
+    /// Gets the image that represents properties.
+    /// </summary>
+    // ------------------------------------------------------------------
+    public static Image Properties {
+      get {
+        return mProperties;
+      }
+    }
+
+    // ------------------------------------------------------------------
+    /// <summary>
+    /// Gets the image that represents redoing a command.
+    /// </summary>
+    // ------------------------------------------------------------------
+    public static Image Redo {
+      get {
+        return mRedo;
+      }
+    }
+
+    // ------------------------------------------------------------------
+    /// <summary>
+    /// Gets the image that represents text being aligned to the right.
+    /// </summary>
+    // ------------------------------------------------------------------
+    public static Image RightAlignment {
+      get {
+        return mRightAlignment;
+      }
+    }
+
+    // ------------------------------------------------------------------
+    /// <summary>
+    /// Gets the image that represents sending an object back in the 
+    /// z-order.
+    /// </summary>
+    // ------------------------------------------------------------------
+    public static Image SendBackwards {
+      get {
+        return mSendBackwards;
+      }
+    }
+
+    // ------------------------------------------------------------------
+    /// <summary>
+    /// Gets the image that represents sending an object all the way back
+    /// in the z-order.
+    /// </summary>
+    // ------------------------------------------------------------------
+    public static Image SendToBack {
+      get {
+        return mSendToBack;
+      }
+    }
+
+    // ------------------------------------------------------------------
+    /// <summary>
+    /// Gets the image that represents a shortcut to a file or resource.
+    /// </summary>
+    // ------------------------------------------------------------------
+    public static Image Shortcut {
+      get {
+        return mShortcut;
+      }
+    }
+
+    // ------------------------------------------------------------------
+    /// <summary>
+    /// Gets the image that represents undoing a command.
+    /// </summary>
+    // ------------------------------------------------------------------
+    public static Image Undo {
+      get {
+        return mUndo;
+      }
+    }
+
+    // ------------------------------------------------------------------
+    /// <summary>
+    /// Gets the image that represents ungrouping objects.
+    /// </summary>
+    // ------------------------------------------------------------------
+    public static Image Ungroup {
+      get {
+        return mUngroup;
+      }
+    }
+
+    #endregion
+
+    #region Helpers
+
+    // ------------------------------------------------------------------
+    /// <summary>
+    /// Gets the image from the embedded resources for the specified 
+    /// filename and sets the image's transparent color to the one
+    /// specified..
+    /// </summary>
+    /// <param name="filename">string: The filename from the embedded
+    /// resources.</param>
+    /// <param name="transparentColor">Color: The transparent color
+    /// for the image.</param>
+    /// <returns>Image</returns>
+    // ------------------------------------------------------------------
+    static Image GetImage(string filename, Color transparentColor) {
+      Bitmap bmp = GetImage(filename);
+      bmp.MakeTransparent(transparentColor);
+      return bmp;
+    }
+
+    // ------------------------------------------------------------------
+    /// <summary>
+    /// Gets the image from the embedded resources for the specified 
+    /// filename.
+    /// </summary>
+    /// <param name="filename">string: The filename from the embedded
+    /// resources.</param>
+    /// <returns>Image</returns>
+    // ------------------------------------------------------------------
+    static Bitmap GetImage(string filename) {
+      return new Bitmap(GetStream(filename));
+    }
+
+    // ------------------------------------------------------------------
+    /// <summary>
+    /// Returns a Stream from the manifest resources for the specified 
+    /// filename.
+    /// </summary>
+    /// <param name="filename">string</param>
+    /// <returns>Stream</returns>
+    // ------------------------------------------------------------------
+    public static Stream GetStream(string filename) {
+      return Assembly.GetExecutingAssembly().GetManifestResourceStream(
+          mNameSpace +
+          ".Resources." +
+          filename);
+    }
+
+    #endregion
+  }
 }
Index: /trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.Netron/3.0.2672.12446/Netron.Diagramming.Core-3.0.2672.12446/Utils/Styling/LinePenStyle.cs
===================================================================
--- /trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.Netron/3.0.2672.12446/Netron.Diagramming.Core-3.0.2672.12446/Utils/Styling/LinePenStyle.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.Netron/3.0.2672.12446/Netron.Diagramming.Core-3.0.2672.12446/Utils/Styling/LinePenStyle.cs	(revision 4068)
@@ -1,202 +1,179 @@
-using System;
-using System.Collections.Generic;
-using System.Text;
 using System.Drawing;
 using System.Drawing.Drawing2D;
 
-namespace Netron.Diagramming.Core
-{
-    // ----------------------------------------------------------------------
+namespace Netron.Diagramming.Core {
+  // ----------------------------------------------------------------------
+  /// <summary>
+  /// Extended <see cref="PenStyle"/> with extra properties for the design 
+  /// of connections.  
+  /// <remarks>Although the .Net 2.0 framework allows you to set line caps 
+  /// the result is, humbly said, rather poor. The caps are not drawn 
+  /// proportionally and custom caps cannot be filled resulting in a 'not 
+  /// implemented' exception.  So, the only working solution (read: hack) 
+  /// I found is to draw the caps with a secondary pen whose size is bigger 
+  /// than the base pen with which the line is drawn. Unfortunately this 
+  /// hack cannot solely be implemented in this class, you need to fix it 
+  /// in the painting routines.  Hopefully a solution will be around later 
+  /// on.
+  /// </remarks>
+  /// </summary>
+  // ----------------------------------------------------------------------
+  public partial class LinePenStyle : PenStyle {
+
+    #region Fields
+
+    // ------------------------------------------------------------------
     /// <summary>
-    /// Extended <see cref="PenStyle"/> with extra properties for the design 
-    /// of connections.  
-    /// <remarks>Although the .Net 2.0 framework allows you to set line caps 
-    /// the result is, humbly said, rather poor. The caps are not drawn 
-    /// proportionally and custom caps cannot be filled resulting in a 'not 
-    /// implemented' exception.  So, the only working solution (read: hack) 
-    /// I found is to draw the caps with a secondary pen whose size is bigger 
-    /// than the base pen with which the line is drawn. Unfortunately this 
-    /// hack cannot solely be implemented in this class, you need to fix it 
-    /// in the painting routines.  Hopefully a solution will be around later 
-    /// on.
-    /// </remarks>
+    /// Implementation of IVersion - the current version of 
+    /// LinePenStyle.
     /// </summary>
-    // ----------------------------------------------------------------------
-    public partial class LinePenStyle : PenStyle
-    {
+    // ------------------------------------------------------------------
+    protected const double linePenStyleVersion = 1.0;
 
-        #region Fields
+    // ------------------------------------------------------------------
+    /// <summary>
+    /// the custom end cap
+    /// </summary>
+    // ------------------------------------------------------------------
+    private CustomLineCap mCustomEndCap;
 
-        // ------------------------------------------------------------------
-        /// <summary>
-        /// Implementation of IVersion - the current version of 
-        /// LinePenStyle.
-        /// </summary>
-        // ------------------------------------------------------------------
-        protected const double linePenStyleVersion = 1.0;
+    // ------------------------------------------------------------------
+    /// <summary>
+    /// the custom start cap
+    /// </summary>
+    // ------------------------------------------------------------------
+    private CustomLineCap mCustomStartCap;
 
-        // ------------------------------------------------------------------
-        /// <summary>
-        /// the custom end cap
-        /// </summary>
-        // ------------------------------------------------------------------
-        private CustomLineCap mCustomEndCap;
+    // ------------------------------------------------------------------
+    /// <summary>
+    /// the start cap
+    /// </summary>
+    // ------------------------------------------------------------------
+    private LineCap mStartCap = LineCap.NoAnchor;
 
-        // ------------------------------------------------------------------
-        /// <summary>
-        /// the custom start cap
-        /// </summary>
-        // ------------------------------------------------------------------
-        private CustomLineCap mCustomStartCap;
+    // ------------------------------------------------------------------
+    /// <summary>
+    /// the end cap
+    /// </summary>
+    // ------------------------------------------------------------------
+    private LineCap mEndCap = LineCap.NoAnchor;
 
-        // ------------------------------------------------------------------
-        /// <summary>
-        /// the start cap
-        /// </summary>
-        // ------------------------------------------------------------------
-        private LineCap mStartCap = LineCap.NoAnchor;
+    // ------------------------------------------------------------------
+    /// <summary>
+    /// the static generalization cap
+    /// </summary>
+    // ------------------------------------------------------------------
+    private static CustomLineCap mGeneralizationCap;
 
-        // ------------------------------------------------------------------
-        /// <summary>
-        /// the end cap
-        /// </summary>
-        // ------------------------------------------------------------------
-        private LineCap mEndCap = LineCap.NoAnchor;
+    #endregion
 
-        // ------------------------------------------------------------------
-        /// <summary>
-        /// the static generalization cap
-        /// </summary>
-        // ------------------------------------------------------------------
-        private static CustomLineCap mGeneralizationCap;
+    #region Properties
 
-        #endregion
+    // ------------------------------------------------------------------
+    /// <summary>
+    /// Gets the current version.
+    /// </summary>
+    // ------------------------------------------------------------------
+    public override double Version {
+      get {
+        return linePenStyleVersion;
+      }
+    }
 
-        #region Properties
+    /// <summary>
+    /// Gets the 'generallization cap'. This <see cref="CustomLineCap"/> is an arrow used in UML diagram to emphasize a generalization
+    /// of an object, i.e. an object is inherited and expanded or generalized.
+    /// </summary>
+    /// <value>The generallization cap.</value>
+    public static CustomLineCap GenerallizationCap {
+      get {
+        return mGeneralizationCap;
+      }
+    }
 
-        // ------------------------------------------------------------------
-        /// <summary>
-        /// Gets the current version.
-        /// </summary>
-        // ------------------------------------------------------------------
-        public override double Version
-        {
-            get
-            {
-                return linePenStyleVersion;
-            }
-        }
+    /// <summary>
+    /// Gets or sets the custom end cap.
+    /// </summary>
+    /// <value>The custom end cap.</value>
+    public CustomLineCap CustomEndCap {
+      get {
+        return mCustomEndCap;
+      }
+      set {
+        mCustomEndCap = value;
+      }
+    }
 
-        /// <summary>
-        /// Gets the 'generallization cap'. This <see cref="CustomLineCap"/> is an arrow used in UML diagram to emphasize a generalization
-        /// of an object, i.e. an object is inherited and expanded or generalized.
-        /// </summary>
-        /// <value>The generallization cap.</value>
-        public static CustomLineCap GenerallizationCap
-        {
-            get {
-                return mGeneralizationCap;
-            }
-        }        
+    /// <summary>
+    /// Gets or sets the custom start cap.
+    /// </summary>
+    /// <value>The custom start cap.</value>
+    public CustomLineCap CustomStartCap {
+      get {
+        return mCustomStartCap;
+      }
+      set {
+        mCustomStartCap = value;
+      }
+    }
 
-        /// <summary>
-        /// Gets or sets the custom end cap.
-        /// </summary>
-        /// <value>The custom end cap.</value>
-        public CustomLineCap CustomEndCap
-        {
-            get
-            {
-                return mCustomEndCap;
-            }
-            set
-            {
-                mCustomEndCap = value;
-            }
-        }
+    /// <summary>
+    /// Gets or sets the start cap.
+    /// </summary>
+    /// <value>The start cap.</value>
+    public LineCap StartCap {
+      get {
+        return mStartCap;
+      }
+      set {
+        mStartCap = value;
+      }
+    }
 
-        /// <summary>
-        /// Gets or sets the custom start cap.
-        /// </summary>
-        /// <value>The custom start cap.</value>
-        public CustomLineCap CustomStartCap
-        {
-            get
-            {
-                return mCustomStartCap;
-            }
-            set
-            {
-                mCustomStartCap = value;
-            }
-        }
+    /// <summary>
+    /// Gets or sets the end cap.
+    /// </summary>
+    /// <value>The end cap.</value>
+    public LineCap EndCap {
+      get {
+        return mEndCap;
+      }
+      set {
+        mEndCap = value;
+      }
+    }
+    /// <summary>
+    /// The constructed pen
+    /// </summary>
+    /// <returns></returns>
+    public override Pen DrawingPen() {
+      Pen pen = base.DrawingPen();
+      /*
+       * Not a satisfying result, see the hack in the class comments above.
+      pen.CustomEndCap = mCustomEndCap;
+      pen.CustomStartCap = mCustomStartCap;
+      pen.StartCap = mStartCap;
+      pen.EndCap = mEndCap;
+       */
+      return pen;
+    }
+    #endregion
 
-        /// <summary>
-        /// Gets or sets the start cap.
-        /// </summary>
-        /// <value>The start cap.</value>
-        public LineCap StartCap
-        {
-            get
-            {
-                return mStartCap;
-            }
-            set
-            {
-                mStartCap = value;
-            }
-        }
+    #region Constructor
 
-        /// <summary>
-        /// Gets or sets the end cap.
-        /// </summary>
-        /// <value>The end cap.</value>
-        public LineCap EndCap
-        {
-            get
-            {
-                return mEndCap;
-            }
-            set
-            {
-                mEndCap = value;
-            }
-        }
-        /// <summary>
-        /// The constructed pen
-        /// </summary>
-        /// <returns></returns>
-        public override Pen DrawingPen()
-        {
-            Pen pen = base.DrawingPen();
-            /*
-             * Not a satisfying result, see the hack in the class comments above.
-            pen.CustomEndCap = mCustomEndCap;
-            pen.CustomStartCap = mCustomStartCap;
-            pen.StartCap = mStartCap;
-            pen.EndCap = mEndCap;
-             */
-            return pen;
-        }
-        #endregion
+    /// <summary>
+    /// Initializes the <see cref="T:LinePenStyle"/> class.
+    /// </summary>
+    static LinePenStyle() {
+      Point[] ps = new Point[3] { new Point(-2, 0), new Point(0, 4), new Point(2, 0) };
+      GraphicsPath gpath = new GraphicsPath();
+      gpath.AddPolygon(ps);
+      gpath.CloseAllFigures();
+      mGeneralizationCap = new CustomLineCap(null, gpath);
+    }
 
-        #region Constructor
+    public LinePenStyle() { }
 
-        /// <summary>
-        /// Initializes the <see cref="T:LinePenStyle"/> class.
-        /// </summary>
-        static LinePenStyle()
-        {
-            Point[] ps = new Point[3] { new Point(-2, 0), new Point(0, 4), new Point(2, 0) };
-            GraphicsPath gpath = new GraphicsPath();
-            gpath.AddPolygon(ps);
-            gpath.CloseAllFigures();
-            mGeneralizationCap = new CustomLineCap(null, gpath);
-        }
-
-        public LinePenStyle()
-        { }
-
-        #endregion
-    }
+    #endregion
+  }
 }
Index: /trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.Netron/3.0.2672.12446/Netron.Diagramming.Core-3.0.2672.12446/Utils/Styling/PenStyle.cs
===================================================================
--- /trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.Netron/3.0.2672.12446/Netron.Diagramming.Core-3.0.2672.12446/Utils/Styling/PenStyle.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.Netron/3.0.2672.12446/Netron.Diagramming.Core-3.0.2672.12446/Utils/Styling/PenStyle.cs	(revision 4068)
@@ -1,164 +1,145 @@
-using System;
-using System.Collections.Generic;
-using System.Text;
 using System.Drawing;
 using System.Drawing.Drawing2D;
 
-namespace Netron.Diagramming.Core
-{
-    // ----------------------------------------------------------------------
+namespace Netron.Diagramming.Core {
+  // ----------------------------------------------------------------------
+  /// <summary>
+  /// Basic <see cref="IPenStyle"/> implementation; this is the minimal 
+  /// structure for a pen, add other <see cref="Pen"/> properties as needed.
+  /// </summary>
+  // ----------------------------------------------------------------------
+  public partial class PenStyle : IPenStyle {
+    #region Fields
+
+    // ------------------------------------------------------------------
     /// <summary>
-    /// Basic <see cref="IPenStyle"/> implementation; this is the minimal 
-    /// structure for a pen, add other <see cref="Pen"/> properties as needed.
+    /// Implementation of IVersion - the current version of 
+    /// PenStyle.
     /// </summary>
-    // ----------------------------------------------------------------------
-    public partial class PenStyle : IPenStyle
-    {
-        #region Fields
+    // ------------------------------------------------------------------
+    protected const double penStyleVersion = 1.0;
 
-        // ------------------------------------------------------------------
-        /// <summary>
-        /// Implementation of IVersion - the current version of 
-        /// PenStyle.
-        /// </summary>
-        // ------------------------------------------------------------------
-        protected const double penStyleVersion = 1.0;
+    // -------------------------------------------------------------------
+    /// <summary>
+    /// the pen's color
+    /// </summary>
+    // -------------------------------------------------------------------
+    private Color mColor = Color.Gray;
 
-        // -------------------------------------------------------------------
-        /// <summary>
-        /// the pen's color
-        /// </summary>
-        // -------------------------------------------------------------------
-        private Color mColor = Color.Gray;
+    // -------------------------------------------------------------------
+    /// <summary>
+    /// the dashstyle of the pen
+    /// </summary>
+    // -------------------------------------------------------------------
+    private DashStyle mDashStyle = DashStyle.Solid;
 
-        // -------------------------------------------------------------------
-        /// <summary>
-        /// the dashstyle of the pen
-        /// </summary>
-        // -------------------------------------------------------------------
-        private DashStyle mDashStyle = DashStyle.Solid;
+    // -------------------------------------------------------------------
+    /// <summary>
+    /// the pen's width
+    /// </summary>
+    // -------------------------------------------------------------------
+    private float mWidth = 1F;
 
-        // -------------------------------------------------------------------
-        /// <summary>
-        /// the pen's width
-        /// </summary>
-        // -------------------------------------------------------------------
-        private float mWidth = 1F;
+    #endregion
 
-        #endregion
+    #region Properties
 
-        #region Properties
+    // ------------------------------------------------------------------
+    /// <summary>
+    /// Gets the current version.
+    /// </summary>
+    // ------------------------------------------------------------------
+    public virtual double Version {
+      get {
+        return penStyleVersion;
+      }
+    }
 
-        // ------------------------------------------------------------------
-        /// <summary>
-        /// Gets the current version.
-        /// </summary>
-        // ------------------------------------------------------------------
-        public virtual double Version
-        {
-            get
-            {
-                return penStyleVersion;
-            }
-        }
+    // -------------------------------------------------------------------
+    /// <summary>
+    /// Gets or sets the color.
+    /// </summary>
+    /// <value>The color.</value>
+    // -------------------------------------------------------------------
+    public Color Color {
+      get {
+        return mColor;
+      }
+      set {
+        mColor = value;
+      }
+    }
 
-        // -------------------------------------------------------------------
-        /// <summary>
-        /// Gets or sets the color.
-        /// </summary>
-        /// <value>The color.</value>
-        // -------------------------------------------------------------------
-        public Color Color
-        {
-            get
-            {
-                return mColor;
-            }
-            set
-            {
-                mColor = value;
-            }
-        }
+    // -------------------------------------------------------------------
+    /// <summary>
+    /// Gets or sets the dash style.
+    /// </summary>
+    /// <value>The dash style.</value>
+    // -------------------------------------------------------------------
+    public DashStyle DashStyle {
+      get {
+        return mDashStyle;
+      }
+      set {
+        mDashStyle = value;
+      }
+    }
 
-        // -------------------------------------------------------------------
-        /// <summary>
-        /// Gets or sets the dash style.
-        /// </summary>
-        /// <value>The dash style.</value>
-        // -------------------------------------------------------------------
-        public DashStyle DashStyle
-        {
-            get
-            {
-                return mDashStyle;
-            }
-            set
-            {
-                mDashStyle = value;
-            }
-        }
+    // -------------------------------------------------------------------
+    /// <summary>
+    /// Gets or sets the width.
+    /// </summary>
+    /// <value>The width.</value>
+    // -------------------------------------------------------------------
+    public float Width {
+      get {
+        return mWidth;
+      }
+      set {
+        mWidth = value;
+      }
+    }
 
-        // -------------------------------------------------------------------
-        /// <summary>
-        /// Gets or sets the width.
-        /// </summary>
-        /// <value>The width.</value>
-        // -------------------------------------------------------------------
-        public float Width
-        {
-            get
-            {
-                return mWidth;
-            }
-            set
-            {
-                mWidth = value;
-            }
-        }
+    #endregion
 
-        #endregion
+    #region Constructors
 
-        #region Constructors
+    // -------------------------------------------------------------------
+    /// <summary>
+    /// Initializes a new instance of the <see cref="T:PenStyle"/> class.
+    /// </summary>
+    // -------------------------------------------------------------------
+    public PenStyle() { }
 
-        // -------------------------------------------------------------------
-        /// <summary>
-        /// Initializes a new instance of the <see cref="T:PenStyle"/> class.
-        /// </summary>
-        // -------------------------------------------------------------------
-        public PenStyle()
-        { }
+    // -------------------------------------------------------------------
+    /// <summary>
+    /// Initializes a new instance of the <see cref="T:PenStyle"/> class.
+    /// </summary>
+    /// <param name="color">The color.</param>
+    /// <param name="dashStyle">The dash style.</param>
+    /// <param name="width">The width.</param>
+    // -------------------------------------------------------------------
+    public PenStyle(Color color, DashStyle dashStyle, float width) {
+      this.mColor = color;
+      this.mWidth = width;
+      this.mDashStyle = dashStyle;
+    }
 
-        // -------------------------------------------------------------------
-        /// <summary>
-        /// Initializes a new instance of the <see cref="T:PenStyle"/> class.
-        /// </summary>
-        /// <param name="color">The color.</param>
-        /// <param name="dashStyle">The dash style.</param>
-        /// <param name="width">The width.</param>
-        // -------------------------------------------------------------------
-        public PenStyle(Color color, DashStyle dashStyle, float width)
-        {
-            this.mColor = color;
-            this.mWidth = width;
-            this.mDashStyle = dashStyle;
-        }
+    #endregion
 
-        #endregion
+    #region Methods
 
-        #region Methods
-
-        // -------------------------------------------------------------------
-        /// <summary>
-        /// Returns the constructed pen.
-        /// </summary>
-        /// <returns>Pen</returns>
-        // -------------------------------------------------------------------
-        public virtual Pen DrawingPen()
-        {
-            Pen pen = new Pen(mColor, mWidth);
-            pen.DashStyle = mDashStyle;
-            return pen;
-        }
-        #endregion
+    // -------------------------------------------------------------------
+    /// <summary>
+    /// Returns the constructed pen.
+    /// </summary>
+    /// <returns>Pen</returns>
+    // -------------------------------------------------------------------
+    public virtual Pen DrawingPen() {
+      Pen pen = new Pen(mColor, mWidth);
+      pen.DashStyle = mDashStyle;
+      return pen;
     }
+    #endregion
+  }
 }
Index: /trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.Netron/3.0.2672.12446/Netron.Diagramming.Core-3.0.2672.12446/Utils/Styling/SimpleConnectorPaintStyle.cs
===================================================================
--- /trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.Netron/3.0.2672.12446/Netron.Diagramming.Core-3.0.2672.12446/Utils/Styling/SimpleConnectorPaintStyle.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.Netron/3.0.2672.12446/Netron.Diagramming.Core-3.0.2672.12446/Utils/Styling/SimpleConnectorPaintStyle.cs	(revision 4068)
@@ -1,88 +1,76 @@
-using System;
-using System.Collections.Generic;
-using System.Text;
 using System.Drawing;
-using System.Drawing.Drawing2D;
 
-namespace Netron.Diagramming.Core
-{
-    public partial class SimpleConnectorPaintStyle : IPaintStyle
-    {
-        // ------------------------------------------------------------------
-        /// <summary>
-        /// Event raised when this paint style is changed.
-        /// </summary>
-        // ------------------------------------------------------------------
-        public event PaintStyleChangedEventHandler PaintStyleChanged;
+namespace Netron.Diagramming.Core {
+  public partial class SimpleConnectorPaintStyle : IPaintStyle {
+    // ------------------------------------------------------------------
+    /// <summary>
+    /// Event raised when this paint style is changed.
+    /// </summary>
+    // ------------------------------------------------------------------
+    public event PaintStyleChangedEventHandler PaintStyleChanged;
 
-        #region Fields
+    #region Fields
 
-        // ------------------------------------------------------------------
-        /// <summary>
-        /// Implementation of IVersion - the current version of 
-        /// SimpleConnectorPaintStyle.
-        /// </summary>
-        // ------------------------------------------------------------------
-        protected const double simpleConnectorPaintStyleVersion = 1.0;
+    // ------------------------------------------------------------------
+    /// <summary>
+    /// Implementation of IVersion - the current version of 
+    /// SimpleConnectorPaintStyle.
+    /// </summary>
+    // ------------------------------------------------------------------
+    protected const double simpleConnectorPaintStyleVersion = 1.0;
 
-        Color mSolidColor = Color.Transparent;
+    Color mSolidColor = Color.Transparent;
 
-        #endregion
+    #endregion
 
-        // ------------------------------------------------------------------
-        /// <summary>
-        /// Gets the current version.
-        /// </summary>
-        // ------------------------------------------------------------------
-        public virtual double Version
-        {
-            get
-            {
-                return simpleConnectorPaintStyleVersion;
-            }
-        }
+    // ------------------------------------------------------------------
+    /// <summary>
+    /// Gets the current version.
+    /// </summary>
+    // ------------------------------------------------------------------
+    public virtual double Version {
+      get {
+        return simpleConnectorPaintStyleVersion;
+      }
+    }
 
-        // ------------------------------------------------------------------
-        /// <summary>
-        /// Constructor.
-        /// </summary>
-        // ------------------------------------------------------------------
-        public SimpleConnectorPaintStyle()
-        {
-        }
+    // ------------------------------------------------------------------
+    /// <summary>
+    /// Constructor.
+    /// </summary>
+    // ------------------------------------------------------------------
+    public SimpleConnectorPaintStyle() {
+    }
 
-        #region IPaintStyle Members
+    #region IPaintStyle Members
 
-        // ------------------------------------------------------------------
-        /// <summary>
-        /// Returns a brush that has a transparent color.
-        /// </summary>
-        /// <param name="rectangle">Rectangle</param>
-        /// <returns>Brush</returns>
-        // ------------------------------------------------------------------
-        public Brush GetBrush(Rectangle rectangle)
-        {
-            return new SolidBrush(mSolidColor);
-        }
+    // ------------------------------------------------------------------
+    /// <summary>
+    /// Returns a brush that has a transparent color.
+    /// </summary>
+    /// <param name="rectangle">Rectangle</param>
+    /// <returns>Brush</returns>
+    // ------------------------------------------------------------------
+    public Brush GetBrush(Rectangle rectangle) {
+      return new SolidBrush(mSolidColor);
+    }
 
-        #endregion
-        
-        // ------------------------------------------------------------------
-        /// <summary>
-        /// Raises the PaintStyleChanged event.
-        /// </summary>
-        // ------------------------------------------------------------------
-        protected virtual void RaisePaintStyleChanged()
-        {
-            if (this.PaintStyleChanged != null)
-            {
-                // Raise the event
-                this.PaintStyleChanged(
-                    this,
-                    new PaintStyleChangedEventArgs(
-                    this,
-                    FillType.LinearGradient));
-            }
-        }
+    #endregion
+
+    // ------------------------------------------------------------------
+    /// <summary>
+    /// Raises the PaintStyleChanged event.
+    /// </summary>
+    // ------------------------------------------------------------------
+    protected virtual void RaisePaintStyleChanged() {
+      if (this.PaintStyleChanged != null) {
+        // Raise the event
+        this.PaintStyleChanged(
+            this,
+            new PaintStyleChangedEventArgs(
+            this,
+            FillType.LinearGradient));
+      }
     }
+  }
 }
Index: /trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.Netron/3.0.2672.12446/Netron.Diagramming.Core-3.0.2672.12446/Utils/Styling/SolidPaintStyle.cs
===================================================================
--- /trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.Netron/3.0.2672.12446/Netron.Diagramming.Core-3.0.2672.12446/Utils/Styling/SolidPaintStyle.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.Netron/3.0.2672.12446/Netron.Diagramming.Core-3.0.2672.12446/Utils/Styling/SolidPaintStyle.cs	(revision 4068)
@@ -1,155 +1,136 @@
-using System;
-using System.Collections.Generic;
-using System.Text;
 using System.Drawing;
-using System.Drawing.Drawing2D;
 
-namespace Netron.Diagramming.Core
-{
-    // ----------------------------------------------------------------------
+namespace Netron.Diagramming.Core {
+  // ----------------------------------------------------------------------
+  /// <summary>
+  /// The solid paint style.
+  /// </summary>
+  // ----------------------------------------------------------------------
+  public partial class SolidPaintStyle : IPaintStyle, IVersion {
+    // ------------------------------------------------------------------
     /// <summary>
-    /// The solid paint style.
+    /// Event raised when this paint style is changed.
     /// </summary>
-    // ----------------------------------------------------------------------
-    public partial class SolidPaintStyle : IPaintStyle, IVersion
-    {
-        // ------------------------------------------------------------------
-        /// <summary>
-        /// Event raised when this paint style is changed.
-        /// </summary>
-        // ------------------------------------------------------------------
-        public event PaintStyleChangedEventHandler PaintStyleChanged;
+    // ------------------------------------------------------------------
+    public event PaintStyleChangedEventHandler PaintStyleChanged;
 
-        #region Fields
+    #region Fields
 
-        // ------------------------------------------------------------------
-        /// <summary>
-        /// Implementation of IVersion - the current version of 
-        /// SolidPaintStyle.
-        /// </summary>
-        // ------------------------------------------------------------------
-        protected const double solidPaintStyleVersion = 1.0;
+    // ------------------------------------------------------------------
+    /// <summary>
+    /// Implementation of IVersion - the current version of 
+    /// SolidPaintStyle.
+    /// </summary>
+    // ------------------------------------------------------------------
+    protected const double solidPaintStyleVersion = 1.0;
 
-        // ------------------------------------------------------------------
-        /// <summary>
-        /// the SolidColor field
-        /// </summary>
-        // ------------------------------------------------------------------
-        private Color mSolidColor;
+    // ------------------------------------------------------------------
+    /// <summary>
+    /// the SolidColor field
+    /// </summary>
+    // ------------------------------------------------------------------
+    private Color mSolidColor;
 
-        // ------------------------------------------------------------------
-        /// <summary>
-        /// the Alpha field
-        /// </summary>
-        // ------------------------------------------------------------------
-        private int mAlpha = 255;
+    // ------------------------------------------------------------------
+    /// <summary>
+    /// the Alpha field
+    /// </summary>
+    // ------------------------------------------------------------------
+    private int mAlpha = 255;
 
-        #endregion
+    #endregion
 
-        #region Properties
+    #region Properties
 
-        // ------------------------------------------------------------------
-        /// <summary>
-        /// Gets the current version.
-        /// </summary>
-        // ------------------------------------------------------------------
-        public virtual double Version
-        {
-            get
-            {
-                return solidPaintStyleVersion;
-            }
-        }
+    // ------------------------------------------------------------------
+    /// <summary>
+    /// Gets the current version.
+    /// </summary>
+    // ------------------------------------------------------------------
+    public virtual double Version {
+      get {
+        return solidPaintStyleVersion;
+      }
+    }
 
-        // ------------------------------------------------------------------
-        /// <summary>
-        /// Gets or sets the SolidColor
-        /// </summary>
-        // ------------------------------------------------------------------
-        public Color SolidColor
-        {
-            get 
-            { 
-                return mSolidColor; 
-            }
-            set 
-            { 
-                mSolidColor = value;
-                RaisePaintStyleChanged();
-            }
-        }
+    // ------------------------------------------------------------------
+    /// <summary>
+    /// Gets or sets the SolidColor
+    /// </summary>
+    // ------------------------------------------------------------------
+    public Color SolidColor {
+      get {
+        return mSolidColor;
+      }
+      set {
+        mSolidColor = value;
+        RaisePaintStyleChanged();
+      }
+    }
 
-        // ------------------------------------------------------------------
-        /// <summary>
-        /// Gets or sets the Alpha
-        /// </summary>
-        // ------------------------------------------------------------------
-        public int Alpha
-        {
-            get 
-            { 
-                return mAlpha; 
-            }
-            set 
-            {
-                mAlpha = value;
-                RaisePaintStyleChanged();
-            }
-        }
+    // ------------------------------------------------------------------
+    /// <summary>
+    /// Gets or sets the Alpha
+    /// </summary>
+    // ------------------------------------------------------------------
+    public int Alpha {
+      get {
+        return mAlpha;
+      }
+      set {
+        mAlpha = value;
+        RaisePaintStyleChanged();
+      }
+    }
 
-        #endregion
+    #endregion
 
-        #region Constructor
+    #region Constructor
 
-        // ------------------------------------------------------------------
-        ///<summary>
-        ///Default constructor.
-        ///</summary>
-        // ------------------------------------------------------------------
-        public SolidPaintStyle(Color color)
-        {
-            mSolidColor = color;
-        }
+    // ------------------------------------------------------------------
+    ///<summary>
+    ///Default constructor.
+    ///</summary>
+    // ------------------------------------------------------------------
+    public SolidPaintStyle(Color color) {
+      mSolidColor = color;
+    }
 
-        // ------------------------------------------------------------------
-        /// <summary>
-        /// Initializes a new instance of the 
-        /// <see cref="T:SolidPaintStyle"/> class.
-        /// </summary>
-        // ------------------------------------------------------------------
-        public SolidPaintStyle()
-        {
-            mSolidColor = ArtPalette.RandomLowSaturationColor;
-        }
+    // ------------------------------------------------------------------
+    /// <summary>
+    /// Initializes a new instance of the 
+    /// <see cref="T:SolidPaintStyle"/> class.
+    /// </summary>
+    // ------------------------------------------------------------------
+    public SolidPaintStyle() {
+      mSolidColor = ArtPalette.RandomLowSaturationColor;
+    }
 
-        #endregion
+    #endregion
 
-        // ------------------------------------------------------------------
-        /// <summary>
-        /// Gets the brush with which an entity can fe painted.
-        /// </summary>
-        /// <param name="rectangle">Rectangle: The rectangle.</param>
-        /// <returns>Brush</returns>
-        // ------------------------------------------------------------------
-        public Brush GetBrush(Rectangle rectangle)
-        {
-            return new SolidBrush(Color.FromArgb(mAlpha, mSolidColor));
-        }
+    // ------------------------------------------------------------------
+    /// <summary>
+    /// Gets the brush with which an entity can fe painted.
+    /// </summary>
+    /// <param name="rectangle">Rectangle: The rectangle.</param>
+    /// <returns>Brush</returns>
+    // ------------------------------------------------------------------
+    public Brush GetBrush(Rectangle rectangle) {
+      return new SolidBrush(Color.FromArgb(mAlpha, mSolidColor));
+    }
 
-        // ------------------------------------------------------------------
-        /// <summary>
-        /// Raises the PaintStyleChanged event.
-        /// </summary>
-        // ------------------------------------------------------------------
-        protected virtual void RaisePaintStyleChanged()
-        {
-            if (this.PaintStyleChanged != null)
-            {
-                // Raise the event
-                this.PaintStyleChanged(
-                    this,
-                    new PaintStyleChangedEventArgs(this, FillType.Solid));
-            }
-        }
+    // ------------------------------------------------------------------
+    /// <summary>
+    /// Raises the PaintStyleChanged event.
+    /// </summary>
+    // ------------------------------------------------------------------
+    protected virtual void RaisePaintStyleChanged() {
+      if (this.PaintStyleChanged != null) {
+        // Raise the event
+        this.PaintStyleChanged(
+            this,
+            new PaintStyleChangedEventArgs(this, FillType.Solid));
+      }
     }
+  }
 }
Index: /trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.Netron/3.0.2672.12446/Netron.Diagramming.Core-3.0.2672.12446/Utils/Styling/TextStyle.cs
===================================================================
--- /trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.Netron/3.0.2672.12446/Netron.Diagramming.Core-3.0.2672.12446/Utils/Styling/TextStyle.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.Netron/3.0.2672.12446/Netron.Diagramming.Core-3.0.2672.12446/Utils/Styling/TextStyle.cs	(revision 4068)
@@ -1,453 +1,403 @@
 using System;
-using System.Collections.Generic;
-using System.Text;
+using System.ComponentModel;
 using System.Drawing;
-using System.ComponentModel;
-
 using ToolBox.Formatting;
 
-namespace Netron.Diagramming.Core
-{
-    // ----------------------------------------------------------------------
-    /// <summary>
-    /// Specifies formatting for text to be drawn (such as color, alignment,
-    /// font size, etc.).  The event 'TextStyleChanged' is raised when a
-    /// property is changed.
-    /// </summary>
-    // ----------------------------------------------------------------------
-    public partial class TextStyle : ITextStyle
-    {
-        // ------------------------------------------------------------------
-        /// <summary>
-        /// Event raised when this TextStyle is changed.
-        /// </summary>
-        // ------------------------------------------------------------------
-        [field : NonSerialized()]
-        public event TextStyleChangedEventHandler TextStyleChanged;
-
-        // ------------------------------------------------------------------
-        /// <summary>
-        /// Implementation of IVersion - the current version of 
-        /// TextStyle.
-        /// </summary>
-        // ------------------------------------------------------------------
-        protected const double textStyleVersion = 1.0;
-
-        // ------------------------------------------------------------------
-        /// <summary>
-        /// Specifies the number of decimal places to use when a TextFormat
-        /// other than 'String' is specified.
-        /// </summary>
-        // ------------------------------------------------------------------
-        protected int mDecimalPlaces = 2;
-
-        // ------------------------------------------------------------------
-        /// <summary>
-        /// The formatting to apply to the text.
-        /// </summary>
-        // ------------------------------------------------------------------
-        protected TextFormat mTextFormat = TextFormat.String;
-
-        // ------------------------------------------------------------------
-        /// <summary>
-        /// The font.
-        /// </summary>
-        // ------------------------------------------------------------------
-        protected Font mFont = new Font("Arial", 10);
-
-        // ------------------------------------------------------------------
-        /// <summary>
-        /// The fontstyle to use (regular, bold, italics, etc.).
-        /// </summary>
-        // ------------------------------------------------------------------
-        protected FontStyle mFontStyle = FontStyle.Regular;
-
-        // ------------------------------------------------------------------
-        /// <summary>
-        /// The color for the text;
-        /// </summary>
-        // ------------------------------------------------------------------
-        protected Color mFontColor = Color.Black;
-
-        // ------------------------------------------------------------------
-        /// <summary>
-        /// The horizontal alignment of the text.
-        /// </summary>
-        // ------------------------------------------------------------------
-        protected StringAlignment mHorizontalAlignment =
-            StringAlignment.Center;
-
-        // ------------------------------------------------------------------
-        /// <summary>
-        /// The vertical alignment of the text.
-        /// </summary>
-        // ------------------------------------------------------------------
-        protected StringAlignment mVerticalAlignment =
-            StringAlignment.Center;
-
-        // ------------------------------------------------------------------
-        /// <summary>
-        /// Specifies if the font is bold.
-        /// </summary>
-        // ------------------------------------------------------------------
-        protected bool mIsBold = false;
-
-        // ------------------------------------------------------------------
-        /// <summary>
-        /// Specifies if the font is italic.
-        /// </summary>
-        // ------------------------------------------------------------------
-        protected bool mIsItalic = false;
-
-        // ------------------------------------------------------------------
-        /// <summary>
-        /// Specifies if the font is underlined.
-        /// </summary>
-        // ------------------------------------------------------------------
-        protected bool mIsUnderline = false;
-
-        #region ITextStyle Members
-
-        // ------------------------------------------------------------------
-        /// <summary>
-        /// Gets the current version.
-        /// </summary>
-        // ------------------------------------------------------------------
-        public virtual double Version
-        {
-            get
-            {
-                return textStyleVersion;
-            }
-        }
-
-        // ------------------------------------------------------------------
-        /// <summary>
-        /// Gets or sets the number of decimal places to use when a TextFormat
-        /// other than 'String' is specified.
-        /// </summary>
-        // ------------------------------------------------------------------
-        public virtual int DecimalPlaces
-        {
-            get
-            {
-                return mDecimalPlaces;
-            }
-            set
-            {
-                mDecimalPlaces = value;
-                RaiseTextStyleChanged();
-            }
-        }
-
-        // ------------------------------------------------------------------
-        /// <summary>
-        /// Gets or sets the formatting to apply to the text.
-        /// </summary>
-        // ------------------------------------------------------------------
-        public virtual TextFormat TextFormat
-        {
-            get
-            {
-                return mTextFormat;
-            }
-            set
-            {
-                mTextFormat = value;
-                RaiseTextStyleChanged();
-            }
-        }
-
-        // ------------------------------------------------------------------
-        /// <summary>
-        /// Gets or sets the text's font.
-        /// </summary>
-        // ------------------------------------------------------------------
-        public virtual Font Font
-        {
-            get
-            {
-                return this.mFont;
-            }
-            set
-            {
-                this.mFont = value;
-                RaiseTextStyleChanged();
-            }
-        }
-
-        // ------------------------------------------------------------------
-        /// <summary>
-        /// Gets or sets the text's font size.
-        /// </summary>
-        // ------------------------------------------------------------------
-        public virtual float FontSize
-        {
-            get
-            {
-                return this.mFont.Size;
-            }
-            set
-            {
-                this.mFont = new Font(
-                    mFont.FontFamily,
-                    value,
-                    mFont.Style);
-                RaiseTextStyleChanged();
-            }
-        }
-
-        // ------------------------------------------------------------------
-        /// <summary>
-        /// Gets or sets the text's color.
-        /// </summary>
-        // ------------------------------------------------------------------
-        public virtual Color FontColor
-        {
-            get
-            {
-                return mFontColor;
-            }
-            set
-            {
-                mFontColor = value;
-                RaiseTextStyleChanged();
-            }
-        }
-
-        // ------------------------------------------------------------------
-        /// <summary>
-        /// Gets or sets if the text is underlined.
-        /// </summary>
-        // ------------------------------------------------------------------
-        public virtual bool IsUnderlined
-        {
-            get
-            {
-                return mFont.Underline;
-            }
-            set
-            {
-                mIsUnderline = value;
-                SetFontStyle();
-                RaiseTextStyleChanged();
-            }
-        }
-
-        // ------------------------------------------------------------------
-        /// <summary>
-        /// Gets or sets if the text is bold.
-        /// </summary>
-        // ------------------------------------------------------------------
-        public virtual bool IsBold
-        {
-            get
-            {
-                return mFont.Bold;
-            }
-            set
-            {
-                mIsBold = value;
-                SetFontStyle();
-                RaiseTextStyleChanged();
-            }
-        }
-
-        // ------------------------------------------------------------------
-        /// <summary>
-        /// Gets or sets if the text is italic.
-        /// </summary>
-        // ------------------------------------------------------------------
-        public virtual bool IsItalic
-        {
-            get
-            {
-                return mFont.Italic;
-            }
-            set
-            {
-                mIsItalic = value;
-                SetFontStyle();
-                RaiseTextStyleChanged();
-            }
-        }
-
-        // ------------------------------------------------------------------
-        /// <summary>
-        /// Gets or sets the horizontal alignment of the text.
-        /// </summary>
-        // ------------------------------------------------------------------
-        [Browsable(true),
-        Description("The horizontal alignment of the text."),
-        Category("Layout")]
-        public virtual StringAlignment HorizontalAlignment
-        {
-            get
-            {
-                return mHorizontalAlignment;
-            }
-            set
-            {
-                mHorizontalAlignment = value;
-                RaiseTextStyleChanged();
-            }
-        }
-
-        // ------------------------------------------------------------------
-        /// <summary>
-        /// Gets or sets the vertical alignment of the text.
-        /// </summary>
-        // ------------------------------------------------------------------
-        [Browsable(true),
-        Description("The vertical alignment of the text."),
-        Category("Layout")]
-        public virtual StringAlignment VerticalAlignment
-        {
-            get
-            {
-                return mVerticalAlignment;
-            }
-            set
-            {
-                mVerticalAlignment = value;
-                RaiseTextStyleChanged();
-            }
-        }
-
-        // ------------------------------------------------------------------
-        /// <summary>
-        /// Gets the format of the string.
-        /// </summary>
-        // ------------------------------------------------------------------
-        public virtual StringFormat StringFormat
-        {
-            get
-            {
-                StringFormat format = new StringFormat();
-                format.Alignment = this.VerticalAlignment;
-                format.LineAlignment = this.HorizontalAlignment;
-                return format;
-            }
-        }
-
-        #endregion
-
-        #region Constructors
-
-        // ------------------------------------------------------------------
-        /// <summary>
-        /// Default constructor.
-        /// </summary>
-        // ------------------------------------------------------------------
-        public TextStyle()
-        {
-        }
-
-        // ------------------------------------------------------------------
-        /// <summary>
-        /// Constructor that receives the color of the font.
-        /// </summary>
-        /// <param name="color">Color</param>
-        // ------------------------------------------------------------------
-        public TextStyle(Color color)
-        {
-            mFontColor = color;
-        }
-
-        // ------------------------------------------------------------------
-        /// <summary>
-        /// Constructor that receives the font color, font, horizontal
-        /// alignment, and vertical alignment.
-        /// </summary>
-        /// <param name="color">Color</param>
-        /// <param name="font">Font</param>
-        /// <param name="horizontalAlignment">StringAlignment</param>
-        /// <param name="verticalAlignment">StringAlignment</param>
-        // ------------------------------------------------------------------
-        public TextStyle(
-            Color color,
-            Font font,
-            StringAlignment horizontalAlignment,
-            StringAlignment verticalAlignment)
-        {
-            mFontColor = color;
-            mFont = font;
-            mHorizontalAlignment = horizontalAlignment;
-            mVerticalAlignment = verticalAlignment;
-        }
-
-        #endregion
-        
-        // ------------------------------------------------------------------
-        /// <summary>
-        /// Creates a new font style using the current IsBold, IsItalic,
-        /// and IsUnderline properties.
-        /// </summary>
-        // ------------------------------------------------------------------
-        protected virtual void SetFontStyle()
-        {
-            FontStyle style = FontStyle.Regular;
-
-            if (mIsBold)
-            {
-                style = style | FontStyle.Bold;
-            }
-
-            if (mIsItalic)
-            {
-                style = style | FontStyle.Italic;
-            }
-
-            if (mIsUnderline)
-            {
-                style = style | FontStyle.Underline;
-            }
-
-            this.mFont = new Font(mFont, style);
-        }
-
-        // ------------------------------------------------------------------
-        /// <summary>
-        /// Gets the brush that's used to draw our text to a GDI+ graphics
-        /// surface.
-        /// </summary>
-        /// <returns>Brush</returns>
-        // ------------------------------------------------------------------
-        public virtual Brush GetBrush()
-        {
-            return new SolidBrush(mFontColor);
-        }
-
-        // ------------------------------------------------------------------
-        /// <summary>
-        /// Applies the formatting specified by TextFormatting to the text
-        /// specified.
-        /// </summary>
-        /// <param name="text">string: The un-formatted text.</param>
-        /// <returns>string: The formatted text.</returns>
-        // ------------------------------------------------------------------
-        public virtual string GetFormattedText(string text)
-        {
-            return TextFormatter.Format(
-                mTextFormat, 
-                text, 
-                mDecimalPlaces);
-        }
-
-        // ------------------------------------------------------------------
-        /// <summary>
-        /// Raises the TextStyleChanged event.
-        /// </summary>
-        // ------------------------------------------------------------------
-        protected virtual void RaiseTextStyleChanged()
-        {
-            if (this.TextStyleChanged != null)
-            {
-                // Raise the event
-                this.TextStyleChanged(
-                    this,
-                    new TextStyleChangedEventArgs(this));
-            }
-        }
-    }
+namespace Netron.Diagramming.Core {
+  // ----------------------------------------------------------------------
+  /// <summary>
+  /// Specifies formatting for text to be drawn (such as color, alignment,
+  /// font size, etc.).  The event 'TextStyleChanged' is raised when a
+  /// property is changed.
+  /// </summary>
+  // ----------------------------------------------------------------------
+  public partial class TextStyle : ITextStyle {
+    // ------------------------------------------------------------------
+    /// <summary>
+    /// Event raised when this TextStyle is changed.
+    /// </summary>
+    // ------------------------------------------------------------------
+    [field: NonSerialized()]
+    public event TextStyleChangedEventHandler TextStyleChanged;
+
+    // ------------------------------------------------------------------
+    /// <summary>
+    /// Implementation of IVersion - the current version of 
+    /// TextStyle.
+    /// </summary>
+    // ------------------------------------------------------------------
+    protected const double textStyleVersion = 1.0;
+
+    // ------------------------------------------------------------------
+    /// <summary>
+    /// Specifies the number of decimal places to use when a TextFormat
+    /// other than 'String' is specified.
+    /// </summary>
+    // ------------------------------------------------------------------
+    protected int mDecimalPlaces = 2;
+
+    // ------------------------------------------------------------------
+    /// <summary>
+    /// The formatting to apply to the text.
+    /// </summary>
+    // ------------------------------------------------------------------
+    protected TextFormat mTextFormat = TextFormat.String;
+
+    // ------------------------------------------------------------------
+    /// <summary>
+    /// The font.
+    /// </summary>
+    // ------------------------------------------------------------------
+    protected Font mFont = new Font("Arial", 10);
+
+    // ------------------------------------------------------------------
+    /// <summary>
+    /// The fontstyle to use (regular, bold, italics, etc.).
+    /// </summary>
+    // ------------------------------------------------------------------
+    protected FontStyle mFontStyle = FontStyle.Regular;
+
+    // ------------------------------------------------------------------
+    /// <summary>
+    /// The color for the text;
+    /// </summary>
+    // ------------------------------------------------------------------
+    protected Color mFontColor = Color.Black;
+
+    // ------------------------------------------------------------------
+    /// <summary>
+    /// The horizontal alignment of the text.
+    /// </summary>
+    // ------------------------------------------------------------------
+    protected StringAlignment mHorizontalAlignment =
+        StringAlignment.Center;
+
+    // ------------------------------------------------------------------
+    /// <summary>
+    /// The vertical alignment of the text.
+    /// </summary>
+    // ------------------------------------------------------------------
+    protected StringAlignment mVerticalAlignment =
+        StringAlignment.Center;
+
+    // ------------------------------------------------------------------
+    /// <summary>
+    /// Specifies if the font is bold.
+    /// </summary>
+    // ------------------------------------------------------------------
+    protected bool mIsBold = false;
+
+    // ------------------------------------------------------------------
+    /// <summary>
+    /// Specifies if the font is italic.
+    /// </summary>
+    // ------------------------------------------------------------------
+    protected bool mIsItalic = false;
+
+    // ------------------------------------------------------------------
+    /// <summary>
+    /// Specifies if the font is underlined.
+    /// </summary>
+    // ------------------------------------------------------------------
+    protected bool mIsUnderline = false;
+
+    #region ITextStyle Members
+
+    // ------------------------------------------------------------------
+    /// <summary>
+    /// Gets the current version.
+    /// </summary>
+    // ------------------------------------------------------------------
+    public virtual double Version {
+      get {
+        return textStyleVersion;
+      }
+    }
+
+    // ------------------------------------------------------------------
+    /// <summary>
+    /// Gets or sets the number of decimal places to use when a TextFormat
+    /// other than 'String' is specified.
+    /// </summary>
+    // ------------------------------------------------------------------
+    public virtual int DecimalPlaces {
+      get {
+        return mDecimalPlaces;
+      }
+      set {
+        mDecimalPlaces = value;
+        RaiseTextStyleChanged();
+      }
+    }
+
+    // ------------------------------------------------------------------
+    /// <summary>
+    /// Gets or sets the formatting to apply to the text.
+    /// </summary>
+    // ------------------------------------------------------------------
+    public virtual TextFormat TextFormat {
+      get {
+        return mTextFormat;
+      }
+      set {
+        mTextFormat = value;
+        RaiseTextStyleChanged();
+      }
+    }
+
+    // ------------------------------------------------------------------
+    /// <summary>
+    /// Gets or sets the text's font.
+    /// </summary>
+    // ------------------------------------------------------------------
+    public virtual Font Font {
+      get {
+        return this.mFont;
+      }
+      set {
+        this.mFont = value;
+        RaiseTextStyleChanged();
+      }
+    }
+
+    // ------------------------------------------------------------------
+    /// <summary>
+    /// Gets or sets the text's font size.
+    /// </summary>
+    // ------------------------------------------------------------------
+    public virtual float FontSize {
+      get {
+        return this.mFont.Size;
+      }
+      set {
+        this.mFont = new Font(
+            mFont.FontFamily,
+            value,
+            mFont.Style);
+        RaiseTextStyleChanged();
+      }
+    }
+
+    // ------------------------------------------------------------------
+    /// <summary>
+    /// Gets or sets the text's color.
+    /// </summary>
+    // ------------------------------------------------------------------
+    public virtual Color FontColor {
+      get {
+        return mFontColor;
+      }
+      set {
+        mFontColor = value;
+        RaiseTextStyleChanged();
+      }
+    }
+
+    // ------------------------------------------------------------------
+    /// <summary>
+    /// Gets or sets if the text is underlined.
+    /// </summary>
+    // ------------------------------------------------------------------
+    public virtual bool IsUnderlined {
+      get {
+        return mFont.Underline;
+      }
+      set {
+        mIsUnderline = value;
+        SetFontStyle();
+        RaiseTextStyleChanged();
+      }
+    }
+
+    // ------------------------------------------------------------------
+    /// <summary>
+    /// Gets or sets if the text is bold.
+    /// </summary>
+    // ------------------------------------------------------------------
+    public virtual bool IsBold {
+      get {
+        return mFont.Bold;
+      }
+      set {
+        mIsBold = value;
+        SetFontStyle();
+        RaiseTextStyleChanged();
+      }
+    }
+
+    // ------------------------------------------------------------------
+    /// <summary>
+    /// Gets or sets if the text is italic.
+    /// </summary>
+    // ------------------------------------------------------------------
+    public virtual bool IsItalic {
+      get {
+        return mFont.Italic;
+      }
+      set {
+        mIsItalic = value;
+        SetFontStyle();
+        RaiseTextStyleChanged();
+      }
+    }
+
+    // ------------------------------------------------------------------
+    /// <summary>
+    /// Gets or sets the horizontal alignment of the text.
+    /// </summary>
+    // ------------------------------------------------------------------
+    [Browsable(true),
+    Description("The horizontal alignment of the text."),
+    Category("Layout")]
+    public virtual StringAlignment HorizontalAlignment {
+      get {
+        return mHorizontalAlignment;
+      }
+      set {
+        mHorizontalAlignment = value;
+        RaiseTextStyleChanged();
+      }
+    }
+
+    // ------------------------------------------------------------------
+    /// <summary>
+    /// Gets or sets the vertical alignment of the text.
+    /// </summary>
+    // ------------------------------------------------------------------
+    [Browsable(true),
+    Description("The vertical alignment of the text."),
+    Category("Layout")]
+    public virtual StringAlignment VerticalAlignment {
+      get {
+        return mVerticalAlignment;
+      }
+      set {
+        mVerticalAlignment = value;
+        RaiseTextStyleChanged();
+      }
+    }
+
+    // ------------------------------------------------------------------
+    /// <summary>
+    /// Gets the format of the string.
+    /// </summary>
+    // ------------------------------------------------------------------
+    public virtual StringFormat StringFormat {
+      get {
+        StringFormat format = new StringFormat();
+        format.Alignment = this.VerticalAlignment;
+        format.LineAlignment = this.HorizontalAlignment;
+        return format;
+      }
+    }
+
+    #endregion
+
+    #region Constructors
+
+    // ------------------------------------------------------------------
+    /// <summary>
+    /// Default constructor.
+    /// </summary>
+    // ------------------------------------------------------------------
+    public TextStyle() {
+    }
+
+    // ------------------------------------------------------------------
+    /// <summary>
+    /// Constructor that receives the color of the font.
+    /// </summary>
+    /// <param name="color">Color</param>
+    // ------------------------------------------------------------------
+    public TextStyle(Color color) {
+      mFontColor = color;
+    }
+
+    // ------------------------------------------------------------------
+    /// <summary>
+    /// Constructor that receives the font color, font, horizontal
+    /// alignment, and vertical alignment.
+    /// </summary>
+    /// <param name="color">Color</param>
+    /// <param name="font">Font</param>
+    /// <param name="horizontalAlignment">StringAlignment</param>
+    /// <param name="verticalAlignment">StringAlignment</param>
+    // ------------------------------------------------------------------
+    public TextStyle(
+        Color color,
+        Font font,
+        StringAlignment horizontalAlignment,
+        StringAlignment verticalAlignment) {
+      mFontColor = color;
+      mFont = font;
+      mHorizontalAlignment = horizontalAlignment;
+      mVerticalAlignment = verticalAlignment;
+    }
+
+    #endregion
+
+    // ------------------------------------------------------------------
+    /// <summary>
+    /// Creates a new font style using the current IsBold, IsItalic,
+    /// and IsUnderline properties.
+    /// </summary>
+    // ------------------------------------------------------------------
+    protected virtual void SetFontStyle() {
+      FontStyle style = FontStyle.Regular;
+
+      if (mIsBold) {
+        style = style | FontStyle.Bold;
+      }
+
+      if (mIsItalic) {
+        style = style | FontStyle.Italic;
+      }
+
+      if (mIsUnderline) {
+        style = style | FontStyle.Underline;
+      }
+
+      this.mFont = new Font(mFont, style);
+    }
+
+    // ------------------------------------------------------------------
+    /// <summary>
+    /// Gets the brush that's used to draw our text to a GDI+ graphics
+    /// surface.
+    /// </summary>
+    /// <returns>Brush</returns>
+    // ------------------------------------------------------------------
+    public virtual Brush GetBrush() {
+      return new SolidBrush(mFontColor);
+    }
+
+    // ------------------------------------------------------------------
+    /// <summary>
+    /// Applies the formatting specified by TextFormatting to the text
+    /// specified.
+    /// </summary>
+    /// <param name="text">string: The un-formatted text.</param>
+    /// <returns>string: The formatted text.</returns>
+    // ------------------------------------------------------------------
+    public virtual string GetFormattedText(string text) {
+      return TextFormatter.Format(
+          mTextFormat,
+          text,
+          mDecimalPlaces);
+    }
+
+    // ------------------------------------------------------------------
+    /// <summary>
+    /// Raises the TextStyleChanged event.
+    /// </summary>
+    // ------------------------------------------------------------------
+    protected virtual void RaiseTextStyleChanged() {
+      if (this.TextStyleChanged != null) {
+        // Raise the event
+        this.TextStyleChanged(
+            this,
+            new TextStyleChangedEventArgs(this));
+      }
+    }
+  }
 }
Index: /trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.Netron/3.0.2672.12446/Netron.Diagramming.Core-3.0.2672.12446/Utils/Tracing.cs
===================================================================
--- /trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.Netron/3.0.2672.12446/Netron.Diagramming.Core-3.0.2672.12446/Utils/Tracing.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.Netron/3.0.2672.12446/Netron.Diagramming.Core-3.0.2672.12446/Utils/Tracing.cs	(revision 4068)
@@ -1,47 +1,38 @@
-using System;
-using System.Collections.Generic;
-using System.Text;
 using System.Diagnostics;
-namespace Netron.Diagramming.Core
-{
-    public static class Tracing
-    {
-        #region Fields
-        /// <summary>
-        /// the serialization switch
-        /// </summary>
-        private static BooleanSwitch mBinarySerializationSwitch = new BooleanSwitch("BinarySerializationSwitch", "This switch enables/disables the ouput of binary serialization information.");
-        /// <summary>
-        /// the deserialization switch
-        /// </summary>
-        private static BooleanSwitch mBinaryDeserializationSwitch = new BooleanSwitch("BinaryDeserializationSwitch", "This switch enables/disables the ouput of binary deserialization information.");
-        #endregion
+namespace Netron.Diagramming.Core {
+  public static class Tracing {
+    #region Fields
+    /// <summary>
+    /// the serialization switch
+    /// </summary>
+    private static BooleanSwitch mBinarySerializationSwitch = new BooleanSwitch("BinarySerializationSwitch", "This switch enables/disables the ouput of binary serialization information.");
+    /// <summary>
+    /// the deserialization switch
+    /// </summary>
+    private static BooleanSwitch mBinaryDeserializationSwitch = new BooleanSwitch("BinaryDeserializationSwitch", "This switch enables/disables the ouput of binary deserialization information.");
+    #endregion
 
-        #region Properties
-        /// <summary>
-        /// Gets the deserialization switch.
-        /// </summary>
-        /// <value>The deserialization switch.</value>
-        public static BooleanSwitch BinaryDeserializationSwitch
-        {
-            get
-            {
-                return mBinaryDeserializationSwitch;
-            }
-        }
-        /// <summary>
-        /// Gets the serialization switch.
-        /// </summary>
-        /// <value>The serialization switch.</value>
-        public static BooleanSwitch BinarySerializationSwitch
-        {
-            get
-            {
-                return mBinarySerializationSwitch;
-            }
-        }
-        #endregion
+    #region Properties
+    /// <summary>
+    /// Gets the deserialization switch.
+    /// </summary>
+    /// <value>The deserialization switch.</value>
+    public static BooleanSwitch BinaryDeserializationSwitch {
+      get {
+        return mBinaryDeserializationSwitch;
+      }
+    }
+    /// <summary>
+    /// Gets the serialization switch.
+    /// </summary>
+    /// <value>The serialization switch.</value>
+    public static BooleanSwitch BinarySerializationSwitch {
+      get {
+        return mBinarySerializationSwitch;
+      }
+    }
+    #endregion
 
 
-    }
+  }
 }
Index: /trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.Netron/3.0.2672.12446/Netron.Diagramming.Core-3.0.2672.12446/Utils/Utils.cs
===================================================================
--- /trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.Netron/3.0.2672.12446/Netron.Diagramming.Core-3.0.2672.12446/Utils/Utils.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.Netron/3.0.2672.12446/Netron.Diagramming.Core-3.0.2672.12446/Utils/Utils.cs	(revision 4068)
@@ -1,325 +1,288 @@
 using System;
-using System.Collections;
-using System.Collections.Generic;
-using System.Text;
+using System.Diagnostics;
 using System.Drawing;
 using System.Drawing.Drawing2D;
-using System.IO;
-using System.Diagnostics;
 using System.Runtime.Serialization;
-namespace Netron.Diagramming.Core
-{
-    /// <summary>
-    /// Static class of utility methods
-    /// </summary>
-    public static class Utils
-    {
-        public static void DrawRoundRect(Graphics g, Pen p, Rectangle rectangle)
-        {
-            DrawRoundRect(g, p, rectangle.X, rectangle.Y, rectangle.Width, rectangle.Height, 7F);
+namespace Netron.Diagramming.Core {
+  /// <summary>
+  /// Static class of utility methods
+  /// </summary>
+  public static class Utils {
+    public static void DrawRoundRect(Graphics g, Pen p, Rectangle rectangle) {
+      DrawRoundRect(g, p, rectangle.X, rectangle.Y, rectangle.Width, rectangle.Height, 7F);
+    }
+    public static void DrawRoundRect(Graphics g, Pen p, float X, float Y, float width, float height, float radius) {
+
+      GraphicsPath path = new GraphicsPath();
+      path.AddLine(X + radius, Y, X + width - (radius * 2), Y);
+      path.AddArc(X + width - (radius * 2), Y, radius * 2, radius * 2, 270, 90);
+      path.AddLine(X + width, Y + radius, X + width, Y + height - (radius * 2));
+      path.AddArc(X + width - (radius * 2), Y + height - (radius * 2), radius * 2, radius * 2, 0, 90);
+      path.AddLine(X + width - (radius * 2), Y + height, X + radius, Y + height);
+      path.AddArc(X, Y + height - (radius * 2), radius * 2, radius * 2, 90, 90);
+      path.AddLine(X, Y + height - (radius * 2), X, Y + radius);
+      path.AddArc(X, Y, radius * 2, radius * 2, 180, 90);
+      path.CloseFigure();
+
+      g.DrawPath(p, path);
+      path.Dispose();
+    }
+
+    /// <summary>
+    /// Returns the bounding rectangle of the given collection of entities.
+    /// </summary>
+    /// <param name="collection"></param>
+    /// <returns></returns>
+    public static Rectangle BoundingRectangle(CollectionBase<IDiagramEntity> collection) {
+      //get the bounding rectangle
+      bool first = true;
+      Rectangle rec = Rectangle.Empty;
+      foreach (IDiagramEntity entity in collection) {
+        if (first) {
+          rec = entity.Rectangle;
+          first = false;
+        } else
+          rec = Rectangle.Union(rec, entity.Rectangle);
+      }
+      return rec;
+    }
+
+    /// <summary>
+    /// Depth-first traversal of an <see cref="IGroup"/>
+    /// </summary>
+    /// <param name="group"></param>
+    /// <param name="collection"></param>
+    public static void TraverseCollect(IGroup group, ref CollectionBase<IDiagramEntity> collection) {
+      #region Checks
+      if (group == null)
+        throw new InconsistencyException("Cannot collect entities of a 'null' IGroup");
+      if (collection == null)
+        throw new InconsistencyException("You need to instantiate a collection before using this method.");
+      #endregion
+
+      foreach (IDiagramEntity entity in group.Entities) {
+        if (entity is IGroup)
+          TraverseCollect(entity as IGroup, ref collection);
+        else
+          collection.Add(entity);
+      }
+
+    }
+
+    // Given H,S,L in range of 0-1
+
+    // Returns a Color (RGB struct) in range of 0-255
+
+    /// <summary>
+    /// HSL to RGB conversion.
+    /// </summary>
+    /// <param name="h">The h.</param>
+    /// <param name="sl">The sl.</param>
+    /// <param name="l">The l.</param>
+    /// <returns></returns>
+    public static ColorRGB HSL2RGB(double h, double sl, double l) {
+
+      double v;
+      double r, g, b;
+      r = l;   // default to gray
+      g = l;
+      b = l;
+      v = (l <= 0.5) ? (l * (1.0 + sl)) : (l + sl - l * sl);
+      if (v > 0) {
+        double m;
+        double sv;
+        int sextant;
+        double fract, vsf, mid1, mid2;
+
+        m = l + l - v;
+        sv = (v - m) / v;
+        h *= 6.0;
+        sextant = (int)h;
+        fract = h - sextant;
+        vsf = v * sv * fract;
+        mid1 = m + vsf;
+        mid2 = v - vsf;
+        switch (sextant) {
+          case 0:
+            r = v;
+            g = mid1;
+            b = m;
+            break;
+          case 1:
+            r = mid2;
+            g = v;
+            b = m;
+            break;
+          case 2:
+            r = m;
+            g = v;
+            b = mid1;
+            break;
+          case 3:
+            r = m;
+            g = mid2;
+            b = v;
+            break;
+          case 4:
+            r = mid1;
+            g = m;
+            b = v;
+            break;
+          case 5:
+            r = v;
+            g = m;
+            b = mid2;
+            break;
         }
-        public static void DrawRoundRect(Graphics g, Pen p, float X, float Y, float width, float height, float radius)
-        {
-
-            GraphicsPath path = new GraphicsPath();
-            path.AddLine(X + radius, Y, X + width - (radius * 2), Y);
-            path.AddArc(X + width - (radius * 2), Y, radius * 2, radius * 2, 270, 90);
-            path.AddLine(X + width, Y + radius, X + width, Y + height - (radius * 2));
-            path.AddArc(X + width - (radius * 2), Y + height - (radius * 2), radius * 2, radius * 2, 0, 90);
-            path.AddLine(X + width - (radius * 2), Y + height, X + radius, Y + height);
-            path.AddArc(X, Y + height - (radius * 2), radius * 2, radius * 2, 90, 90);
-            path.AddLine(X, Y + height - (radius * 2), X, Y + radius);
-            path.AddArc(X, Y, radius * 2, radius * 2, 180, 90);
-            path.CloseFigure();
-
-            g.DrawPath(p, path);
-            path.Dispose();
-        }
-
-        /// <summary>
-        /// Returns the bounding rectangle of the given collection of entities.
-        /// </summary>
-        /// <param name="collection"></param>
-        /// <returns></returns>
-        public static Rectangle BoundingRectangle(CollectionBase<IDiagramEntity> collection)
-        {
-            //get the bounding rectangle
-            bool first = true;
-            Rectangle rec = Rectangle.Empty;
-            foreach (IDiagramEntity entity in collection)
-            {
-                if (first)
-                {
-                    rec = entity.Rectangle;
-                    first = false;
-                }
-                else
-                    rec = Rectangle.Union(rec, entity.Rectangle);
-            }
-            return rec;
-        }
-
-        /// <summary>
-        /// Depth-first traversal of an <see cref="IGroup"/>
-        /// </summary>
-        /// <param name="group"></param>
-        /// <param name="collection"></param>
-        public static void TraverseCollect(IGroup group, ref CollectionBase<IDiagramEntity> collection)
-        {
-            #region Checks
-            if(group == null)
-                throw new InconsistencyException("Cannot collect entities of a 'null' IGroup");
-            if(collection == null)
-                throw new InconsistencyException("You need to instantiate a collection before using this method.");
-            #endregion
-
-            foreach(IDiagramEntity entity in group.Entities)
-            {
-                if(entity is IGroup)
-                    TraverseCollect(entity as IGroup, ref collection);
-                else
-                    collection.Add(entity);
-            }
-
-        }
-
-        // Given H,S,L in range of 0-1
-
-        // Returns a Color (RGB struct) in range of 0-255
-
-        /// <summary>
-        /// HSL to RGB conversion.
-        /// </summary>
-        /// <param name="h">The h.</param>
-        /// <param name="sl">The sl.</param>
-        /// <param name="l">The l.</param>
-        /// <returns></returns>
-        public static ColorRGB HSL2RGB(double h, double sl, double l)
-        {
-
-            double v;
-            double r, g, b;
-            r = l;   // default to gray
-            g = l;
-            b = l;
-            v = (l <= 0.5) ? (l * (1.0 + sl)) : (l + sl - l * sl);
-            if(v > 0)
-            {
-                double m;
-                double sv;
-                int sextant;
-                double fract, vsf, mid1, mid2;
-
-                m = l + l - v;
-                sv = (v - m) / v;
-                h *= 6.0;
-                sextant = (int) h;
-                fract = h - sextant;
-                vsf = v * sv * fract;
-                mid1 = m + vsf;
-                mid2 = v - vsf;
-                switch(sextant)
-                {
-                    case 0:
-                        r = v;
-                        g = mid1;
-                        b = m;
-                        break;
-                    case 1:
-                        r = mid2;
-                        g = v;
-                        b = m;
-                        break;
-                    case 2:
-                        r = m;
-                        g = v;
-                        b = mid1;
-                        break;
-                    case 3:
-                        r = m;
-                        g = mid2;
-                        b = v;
-                        break;
-                    case 4:
-                        r = mid1;
-                        g = m;
-                        b = v;
-                        break;
-                    case 5:
-                        r = v;
-                        g = m;
-                        b = mid2;
-                        break;
-                }
-            }
-            ColorRGB rgb = new ColorRGB();
-            rgb.R = Convert.ToByte(r * 255.0f);
-            rgb.G = Convert.ToByte(g * 255.0f);
-            rgb.B = Convert.ToByte(b * 255.0f);
-            return rgb;
-
-        }
-
-        // Given a Color (RGB Struct) in range of 0-255
-
-        // Return H,S,L in range of 0-1
-
-        /// <summary>
-        /// RGB to HSL conversion
-        /// </summary>
-        /// <param name="rgb">The RGB.</param>
-        /// <param name="h">The h.</param>
-        /// <param name="s">The s.</param>
-        /// <param name="l">The l.</param>
-        public static void RGB2HSL(ColorRGB rgb, out double h, out double s, out double l)
-        {
-            double r = rgb.R / 255.0;
-            double g = rgb.G / 255.0;
-            double b = rgb.B / 255.0;
-            double v;
-            double m;
-            double vm;
-            double r2, g2, b2;
-
-            h = 0; // default to black
-            s = 0;
-            l = 0;
-            v = Math.Max(r, g);
-            v = Math.Max(v, b);
-            m = Math.Min(r, g);
-            m = Math.Min(m, b);
-
-            l = (m + v) / 2.0;
-            if(l <= 0.0)
-            {
-                return;
-            }
-            vm = v - m;
-            s = vm;
-            if(s > 0.0)
-            {
-                s /= (l <= 0.5) ? (v + m) : (2.0 - v - m);
-            }
-            else
-            {
-                return;
-            }
-            r2 = (v - r) / vm;
-            g2 = (v - g) / vm;
-            b2 = (v - b) / vm;
-            if(r == v)
-            {
-                h = (g == m ? 5.0 + b2 : 1.0 - g2);
-            }
-            else if(g == v)
-            {
-                h = (b == m ? 1.0 + r2 : 3.0 - b2);
-            }
-            else
-            {
-                h = (r == m ? 3.0 + g2 : 5.0 - r2);
-            }
-            h /= 6.0;
-        }
-        /// <summary>
-        /// Constrains the type.
-        /// </summary>
-        /// <param name="type">The type.</param>
-        public static void ConstrainType(Type type)
-        {
-            bool serializable = type.IsSerializable;
-            if(serializable == false)
-            {
-                string message = "The type " + type + " is not serializable";
-                throw new SerializationException(message);
-            }
-            bool genericType = type.IsGenericType;
-
-            if(genericType)
-            {
-                Type[] typeArguments = type.GetGenericArguments();
-                Debug.Assert(typeArguments.Length >= 1);
-                Array.ForEach(typeArguments, ConstrainType);
-            }
-        }
-
-      
-    }
-    /// <summary>
-    /// Utility struct for color conversions
-    /// </summary>
-    public struct ColorRGB
-    {
-        #region Fields
-        private byte r;
-        private byte g;
-        private byte b;
-        #endregion
-
-        /// <summary>
-        /// Gets or sets the Red value.
-        /// </summary>
-        /// <value>The R.</value>
-        public byte R
-        {
-            get { return r; }
-            set { r = value; }
-        }
-
-
-        /// <summary>
-        /// Gets or sets the Green value.
-        /// </summary>
-        /// <value>The G.</value>
-        public byte G
-        {
-            get { return g; }
-            set { g = value; }
-        }
-
-
-
-        /// <summary>
-        /// Gets or sets the Blue value.
-        /// </summary>
-        /// <value>The B.</value>
-        public byte B
-        {
-            get { return b; }
-            set { b = value; }
-        }
-        /// <summary>
-        /// Initializes a new instance of the <see cref="T:ColorRGB"/> class.
-        /// </summary>
-        /// <param name="value">The value.</param>
-        public ColorRGB(Color value)
-        {
-            this.r = value.R;
-            this.g = value.G;
-            this.b = value.B;
-        }
-        /// <summary>
-        /// Implicit conversion of the specified RGB.
-        /// </summary>
-        /// <param name="rgb">The RGB.</param>
-        /// <returns></returns>
-        public static implicit operator Color(ColorRGB rgb)
-        {
-            Color c = Color.FromArgb(rgb.R, rgb.G, rgb.B);
-            return c;
-        }
-        /// <summary>
-        /// Explicit conversion of the specified c.
-        /// </summary>
-        /// <param name="c">The c.</param>
-        /// <returns></returns>
-        public static explicit operator ColorRGB(Color c)
-        {
-            return new ColorRGB(c);
-        }
-    }
-
-
-    
+      }
+      ColorRGB rgb = new ColorRGB();
+      rgb.R = Convert.ToByte(r * 255.0f);
+      rgb.G = Convert.ToByte(g * 255.0f);
+      rgb.B = Convert.ToByte(b * 255.0f);
+      return rgb;
+
+    }
+
+    // Given a Color (RGB Struct) in range of 0-255
+
+    // Return H,S,L in range of 0-1
+
+    /// <summary>
+    /// RGB to HSL conversion
+    /// </summary>
+    /// <param name="rgb">The RGB.</param>
+    /// <param name="h">The h.</param>
+    /// <param name="s">The s.</param>
+    /// <param name="l">The l.</param>
+    public static void RGB2HSL(ColorRGB rgb, out double h, out double s, out double l) {
+      double r = rgb.R / 255.0;
+      double g = rgb.G / 255.0;
+      double b = rgb.B / 255.0;
+      double v;
+      double m;
+      double vm;
+      double r2, g2, b2;
+
+      h = 0; // default to black
+      s = 0;
+      l = 0;
+      v = Math.Max(r, g);
+      v = Math.Max(v, b);
+      m = Math.Min(r, g);
+      m = Math.Min(m, b);
+
+      l = (m + v) / 2.0;
+      if (l <= 0.0) {
+        return;
+      }
+      vm = v - m;
+      s = vm;
+      if (s > 0.0) {
+        s /= (l <= 0.5) ? (v + m) : (2.0 - v - m);
+      } else {
+        return;
+      }
+      r2 = (v - r) / vm;
+      g2 = (v - g) / vm;
+      b2 = (v - b) / vm;
+      if (r == v) {
+        h = (g == m ? 5.0 + b2 : 1.0 - g2);
+      } else if (g == v) {
+        h = (b == m ? 1.0 + r2 : 3.0 - b2);
+      } else {
+        h = (r == m ? 3.0 + g2 : 5.0 - r2);
+      }
+      h /= 6.0;
+    }
+    /// <summary>
+    /// Constrains the type.
+    /// </summary>
+    /// <param name="type">The type.</param>
+    public static void ConstrainType(Type type) {
+      bool serializable = type.IsSerializable;
+      if (serializable == false) {
+        string message = "The type " + type + " is not serializable";
+        throw new SerializationException(message);
+      }
+      bool genericType = type.IsGenericType;
+
+      if (genericType) {
+        Type[] typeArguments = type.GetGenericArguments();
+        Debug.Assert(typeArguments.Length >= 1);
+        Array.ForEach(typeArguments, ConstrainType);
+      }
+    }
+
+
+  }
+  /// <summary>
+  /// Utility struct for color conversions
+  /// </summary>
+  public struct ColorRGB {
+    #region Fields
+    private byte r;
+    private byte g;
+    private byte b;
+    #endregion
+
+    /// <summary>
+    /// Gets or sets the Red value.
+    /// </summary>
+    /// <value>The R.</value>
+    public byte R {
+      get { return r; }
+      set { r = value; }
+    }
+
+
+    /// <summary>
+    /// Gets or sets the Green value.
+    /// </summary>
+    /// <value>The G.</value>
+    public byte G {
+      get { return g; }
+      set { g = value; }
+    }
+
+
+
+    /// <summary>
+    /// Gets or sets the Blue value.
+    /// </summary>
+    /// <value>The B.</value>
+    public byte B {
+      get { return b; }
+      set { b = value; }
+    }
+    /// <summary>
+    /// Initializes a new instance of the <see cref="T:ColorRGB"/> class.
+    /// </summary>
+    /// <param name="value">The value.</param>
+    public ColorRGB(Color value) {
+      this.r = value.R;
+      this.g = value.G;
+      this.b = value.B;
+    }
+    /// <summary>
+    /// Implicit conversion of the specified RGB.
+    /// </summary>
+    /// <param name="rgb">The RGB.</param>
+    /// <returns></returns>
+    public static implicit operator Color(ColorRGB rgb) {
+      Color c = Color.FromArgb(rgb.R, rgb.G, rgb.B);
+      return c;
+    }
+    /// <summary>
+    /// Explicit conversion of the specified c.
+    /// </summary>
+    /// <param name="c">The c.</param>
+    /// <returns></returns>
+    public static explicit operator ColorRGB(Color c) {
+      return new ColorRGB(c);
+    }
+  }
+
+
+
 
 }
Index: /trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.ProtobufCS/0.9.1/ProtobufCS/src/ProtoBench/Properties/AssemblyInfo.cs
===================================================================
--- /trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.ProtobufCS/0.9.1/ProtobufCS/src/ProtoBench/Properties/AssemblyInfo.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.ProtobufCS/0.9.1/ProtobufCS/src/ProtoBench/Properties/AssemblyInfo.cs	(revision 4068)
@@ -1,4 +1,3 @@
 ﻿using System.Reflection;
-using System.Runtime.CompilerServices;
 using System.Runtime.InteropServices;
 
Index: /trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.ProtobufCS/0.9.1/ProtobufCS/src/ProtoDump/Properties/AssemblyInfo.cs
===================================================================
--- /trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.ProtobufCS/0.9.1/ProtobufCS/src/ProtoDump/Properties/AssemblyInfo.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.ProtobufCS/0.9.1/ProtobufCS/src/ProtoDump/Properties/AssemblyInfo.cs	(revision 4068)
@@ -1,4 +1,3 @@
 ﻿using System.Reflection;
-using System.Runtime.CompilerServices;
 using System.Runtime.InteropServices;
 
Index: /trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.ProtobufCS/0.9.1/ProtobufCS/src/ProtoGen.Test/Properties/AssemblyInfo.cs
===================================================================
--- /trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.ProtobufCS/0.9.1/ProtobufCS/src/ProtoGen.Test/Properties/AssemblyInfo.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.ProtobufCS/0.9.1/ProtobufCS/src/ProtoGen.Test/Properties/AssemblyInfo.cs	(revision 4068)
@@ -1,4 +1,3 @@
 using System.Reflection;
-using System.Runtime.CompilerServices;
 using System.Runtime.InteropServices;
 
Index: /trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.ProtobufCS/0.9.1/ProtobufCS/src/ProtoGen/Generator.cs
===================================================================
--- /trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.ProtobufCS/0.9.1/ProtobufCS/src/ProtoGen/Generator.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.ProtobufCS/0.9.1/ProtobufCS/src/ProtoGen/Generator.cs	(revision 4068)
@@ -34,9 +34,9 @@
 
 using System.Collections.Generic;
+using System.IO;
 using System.Text;
+using Google.ProtocolBuffers.Collections;
 using Google.ProtocolBuffers.DescriptorProtos;
-using System.IO;
 using Google.ProtocolBuffers.Descriptors;
-using Google.ProtocolBuffers.Collections;
 
 namespace Google.ProtocolBuffers.ProtoGen {
@@ -62,5 +62,5 @@
     public void Generate() {
       foreach (string inputFile in options.InputFiles) {
-        FileDescriptorSet descriptorProtos;       
+        FileDescriptorSet descriptorProtos;
         ExtensionRegistry extensionRegistry = ExtensionRegistry.CreateInstance();
         extensionRegistry.Add(CSharpOptions.CSharpFileOptions);
Index: /trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.ProtobufCS/0.9.1/ProtobufCS/src/ProtoMunge/Properties/AssemblyInfo.cs
===================================================================
--- /trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.ProtobufCS/0.9.1/ProtobufCS/src/ProtoMunge/Properties/AssemblyInfo.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.ProtobufCS/0.9.1/ProtobufCS/src/ProtoMunge/Properties/AssemblyInfo.cs	(revision 4068)
@@ -1,4 +1,3 @@
 ﻿using System.Reflection;
-using System.Runtime.CompilerServices;
 using System.Runtime.InteropServices;
 
Index: /trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.ProtobufCS/0.9.1/ProtobufCS/src/ProtocolBuffers.Test/AbstractMessageTest.cs
===================================================================
--- /trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.ProtobufCS/0.9.1/ProtobufCS/src/ProtocolBuffers.Test/AbstractMessageTest.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.ProtobufCS/0.9.1/ProtobufCS/src/ProtocolBuffers.Test/AbstractMessageTest.cs	(revision 4068)
@@ -36,6 +36,6 @@
 using System.Collections.Generic;
 using Google.ProtocolBuffers.Descriptors;
+using Google.ProtocolBuffers.TestProtos;
 using NUnit.Framework;
-using Google.ProtocolBuffers.TestProtos;
 
 namespace Google.ProtocolBuffers {
@@ -46,5 +46,5 @@
     public void Clear() {
       AbstractMessageWrapper message = new AbstractMessageWrapper.Builder(TestAllTypes.CreateBuilder(TestUtil.GetAllSet())).Clear().Build();
-      TestUtil.AssertClear((TestAllTypes) message.WrappedMessage);
+      TestUtil.AssertClear((TestAllTypes)message.WrappedMessage);
     }
 
@@ -52,5 +52,5 @@
     public void Copy() {
       AbstractMessageWrapper message = new AbstractMessageWrapper.Builder(TestAllTypes.CreateBuilder()).MergeFrom(TestUtil.GetAllSet()).Build();
-      TestUtil.AssertAllFieldsSet((TestAllTypes) message.WrappedMessage);
+      TestUtil.AssertAllFieldsSet((TestAllTypes)message.WrappedMessage);
     }
 
@@ -73,6 +73,6 @@
     public void Parsing() {
       IBuilder builder = new AbstractMessageWrapper.Builder(TestAllTypes.CreateBuilder());
-      AbstractMessageWrapper message = (AbstractMessageWrapper) builder.WeakMergeFrom(TestUtil.GetAllSet().ToByteString()).WeakBuild();
-      TestUtil.AssertAllFieldsSet((TestAllTypes) message.WrappedMessage);
+      AbstractMessageWrapper message = (AbstractMessageWrapper)builder.WeakMergeFrom(TestUtil.GetAllSet().ToByteString()).WeakBuild();
+      TestUtil.AssertAllFieldsSet((TestAllTypes)message.WrappedMessage);
     }
 
@@ -167,5 +167,5 @@
     [Test]
     public void MergeFrom() {
-      AbstractMessageWrapper result = (AbstractMessageWrapper) 
+      AbstractMessageWrapper result = (AbstractMessageWrapper)
         new AbstractMessageWrapper.Builder(TestAllTypes.CreateBuilder(MergeDest))
             .MergeFrom(MergeSource)
@@ -177,5 +177,5 @@
     // -----------------------------------------------------------------
     // Tests for equals and hashCode
-    
+
     [Test]
     public void EqualsAndHashCode() {
@@ -187,5 +187,5 @@
       TestAllExtensions f = TestAllExtensions.CreateBuilder(e)
           .AddExtension(UnitTestProtoFile.RepeatedInt32Extension, 999).Build();
-        
+
       CheckEqualsIsConsistent(a);
       CheckEqualsIsConsistent(b);
@@ -194,5 +194,5 @@
       CheckEqualsIsConsistent(e);
       CheckEqualsIsConsistent(f);
-      
+
       CheckNotEqual(a, b);
       CheckNotEqual(a, c);
@@ -226,5 +226,5 @@
       CheckEqualsIsConsistent(eUnknownFields, eUnknownFields2);
     }
-    
+
     /// <summary>
     /// Asserts that the given protos are equal and have the same hash code.
@@ -233,5 +233,5 @@
       // Object should be equal to itself.
       Assert.AreEqual(message, message);
-      
+
       // Object should be equal to a dynamic copy of itself.
       DynamicMessage dynamic = DynamicMessage.CreateBuilder(message).Build();
@@ -298,5 +298,5 @@
         return wrappedMessage.HasField(field);
       }
-    
+
       public override object this[FieldDescriptor field] {
         get { return wrappedMessage[field]; }
@@ -310,5 +310,5 @@
         return wrappedMessage.GetRepeatedFieldCount(field);
       }
-      
+
       public override UnknownFieldSet UnknownFields {
         get { return wrappedMessage.UnknownFields; }
@@ -322,5 +322,5 @@
         return new Builder(wrappedMessage.WeakToBuilder());
       }
-      
+
       internal class Builder : AbstractBuilder<AbstractMessageWrapper, Builder> {
         private readonly IBuilder wrappedBuilder;
Index: /trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.ProtobufCS/0.9.1/ProtobufCS/src/ProtocolBuffers.Test/CodedInputStreamTest.cs
===================================================================
--- /trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.ProtobufCS/0.9.1/ProtobufCS/src/ProtocolBuffers.Test/CodedInputStreamTest.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.ProtobufCS/0.9.1/ProtobufCS/src/ProtocolBuffers.Test/CodedInputStreamTest.cs	(revision 4068)
@@ -37,5 +37,4 @@
 using Google.ProtocolBuffers.TestProtos;
 using NUnit.Framework;
-using System.Diagnostics;
 
 namespace Google.ProtocolBuffers {
@@ -98,5 +97,6 @@
         input.ReadRawVarint32();
         Assert.Fail("Should have thrown an exception.");
-      } catch (InvalidProtocolBufferException e) {
+      }
+      catch (InvalidProtocolBufferException e) {
         Assert.AreEqual(expected.Message, e.Message);
       }
@@ -106,5 +106,6 @@
         input.ReadRawVarint64();
         Assert.Fail("Should have thrown an exception.");
-      } catch (InvalidProtocolBufferException e) {
+      }
+      catch (InvalidProtocolBufferException e) {
         Assert.AreEqual(expected.Message, e.Message);
       }
@@ -114,5 +115,6 @@
         CodedInputStream.ReadRawVarint32(new MemoryStream(data));
         Assert.Fail("Should have thrown an exception.");
-      } catch (InvalidProtocolBufferException e) {
+      }
+      catch (InvalidProtocolBufferException e) {
         Assert.AreEqual(expected.Message, e.Message);
       }
@@ -327,9 +329,10 @@
         input.ReadBytes();
         Assert.Fail("Should have thrown an exception!");
-      } catch (InvalidProtocolBufferException) {
+      }
+      catch (InvalidProtocolBufferException) {
         // success.
       }
     }
-    
+
     private static TestRecursiveMessage MakeRecursiveMessage(int depth) {
       if (depth == 0) {
@@ -361,5 +364,6 @@
         TestRecursiveMessage.ParseFrom(data65);
         Assert.Fail("Should have thrown an exception!");
-      } catch (InvalidProtocolBufferException) {
+      }
+      catch (InvalidProtocolBufferException) {
         // success.
       }
@@ -370,5 +374,6 @@
         TestRecursiveMessage.ParseFrom(input);
         Assert.Fail("Should have thrown an exception!");
-      } catch (InvalidProtocolBufferException) {
+      }
+      catch (InvalidProtocolBufferException) {
         // success.
       }
@@ -386,5 +391,6 @@
         TestAllTypes.ParseFrom(input);
         Assert.Fail("Should have thrown an exception!");
-      } catch (InvalidProtocolBufferException) {
+      }
+      catch (InvalidProtocolBufferException) {
         // success.
       }
@@ -401,5 +407,6 @@
         input.ReadRawByte();
         Assert.Fail("Should have thrown an exception!");
-      } catch (InvalidProtocolBufferException) {
+      }
+      catch (InvalidProtocolBufferException) {
         // Success.
       }
@@ -411,5 +418,6 @@
         input.ReadRawBytes(16);  // Hits limit again.
         Assert.Fail("Should have thrown an exception!");
-      } catch (InvalidProtocolBufferException) {
+      }
+      catch (InvalidProtocolBufferException) {
         // Success.
       }
@@ -422,5 +430,5 @@
     /// </summary>
     [Test]
-    public void ReadInvalidUtf8()  {
+    public void ReadInvalidUtf8() {
       MemoryStream ms = new MemoryStream();
       CodedOutputStream output = CodedOutputStream.CreateInstance(ms);
Index: /trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.ProtobufCS/0.9.1/ProtobufCS/src/ProtocolBuffers.Test/Descriptors/MessageDescriptorTest.cs
===================================================================
--- /trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.ProtobufCS/0.9.1/ProtobufCS/src/ProtocolBuffers.Test/Descriptors/MessageDescriptorTest.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.ProtobufCS/0.9.1/ProtobufCS/src/ProtocolBuffers.Test/Descriptors/MessageDescriptorTest.cs	(revision 4068)
@@ -33,6 +33,6 @@
 #endregion
 
+using Google.ProtocolBuffers.TestProtos;
 using NUnit.Framework;
-using Google.ProtocolBuffers.TestProtos;
 
 namespace Google.ProtocolBuffers.Descriptors {
Index: /trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.ProtobufCS/0.9.1/ProtobufCS/src/ProtocolBuffers.Test/Properties/AssemblyInfo.cs
===================================================================
--- /trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.ProtobufCS/0.9.1/ProtobufCS/src/ProtocolBuffers.Test/Properties/AssemblyInfo.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.ProtobufCS/0.9.1/ProtobufCS/src/ProtocolBuffers.Test/Properties/AssemblyInfo.cs	(revision 4068)
@@ -1,5 +1,4 @@
 using System;
 using System.Reflection;
-using System.Runtime.CompilerServices;
 using System.Runtime.InteropServices;
 
Index: /trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.ProtobufCS/0.9.1/ProtobufCS/src/ProtocolBuffers.Test/TestProtos/UnitTestCSharpOptionsProtoFile.cs
===================================================================
--- /trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.ProtobufCS/0.9.1/ProtobufCS/src/ProtocolBuffers.Test/TestProtos/UnitTestCSharpOptionsProtoFile.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.ProtobufCS/0.9.1/ProtobufCS/src/ProtocolBuffers.Test/TestProtos/UnitTestCSharpOptionsProtoFile.cs	(revision 4068)
@@ -2,11 +2,9 @@
 
 using pb = global::Google.ProtocolBuffers;
-using pbc = global::Google.ProtocolBuffers.Collections;
 using pbd = global::Google.ProtocolBuffers.Descriptors;
-using scg = global::System.Collections.Generic;
 namespace Google.ProtocolBuffers.TestProtos {
-  
+
   public static partial class UnitTestCSharpOptionsProtoFile {
-  
+
     #region Extension registration
     public static void RegisterAllExtensions(pb::ExtensionRegistry registry) {
@@ -22,18 +20,18 @@
     }
     private static pbd::FileDescriptor descriptor;
-    
+
     static UnitTestCSharpOptionsProtoFile() {
       byte[] descriptorData = global::System.Convert.FromBase64String(
-          "Ci1nb29nbGUvcHJvdG9idWYvdW5pdHRlc3RfY3NoYXJwX29wdGlvbnMucHJv" + 
-          "dG8SEXByb3RvYnVmX3VuaXR0ZXN0GiRnb29nbGUvcHJvdG9idWYvY3NoYXJw" + 
-          "X29wdGlvbnMucHJvdG8iXgoOT3B0aW9uc01lc3NhZ2USDgoGbm9ybWFsGAEg" + 
-          "ASgJEhcKD29wdGlvbnNfbWVzc2FnZRgCIAEoCRIjCgpjdXN0b21pemVkGAMg" + 
-          "ASgJQg/CPgwKCkN1c3RvbU5hbWVCRsI+QwohR29vZ2xlLlByb3RvY29sQnVm" + 
-          "ZmVycy5UZXN0UHJvdG9zEh5Vbml0VGVzdENTaGFycE9wdGlvbnNQcm90b0Zp" + 
+          "Ci1nb29nbGUvcHJvdG9idWYvdW5pdHRlc3RfY3NoYXJwX29wdGlvbnMucHJv" +
+          "dG8SEXByb3RvYnVmX3VuaXR0ZXN0GiRnb29nbGUvcHJvdG9idWYvY3NoYXJw" +
+          "X29wdGlvbnMucHJvdG8iXgoOT3B0aW9uc01lc3NhZ2USDgoGbm9ybWFsGAEg" +
+          "ASgJEhcKD29wdGlvbnNfbWVzc2FnZRgCIAEoCRIjCgpjdXN0b21pemVkGAMg" +
+          "ASgJQg/CPgwKCkN1c3RvbU5hbWVCRsI+QwohR29vZ2xlLlByb3RvY29sQnVm" +
+          "ZmVycy5UZXN0UHJvdG9zEh5Vbml0VGVzdENTaGFycE9wdGlvbnNQcm90b0Zp" +
           "bGU=");
       pbd::FileDescriptor.InternalDescriptorAssigner assigner = delegate(pbd::FileDescriptor root) {
         descriptor = root;
         internal__static_protobuf_unittest_OptionsMessage__Descriptor = Descriptor.MessageTypes[0];
-        internal__static_protobuf_unittest_OptionsMessage__FieldAccessorTable = 
+        internal__static_protobuf_unittest_OptionsMessage__FieldAccessorTable =
             new pb::FieldAccess.FieldAccessorTable<global::Google.ProtocolBuffers.TestProtos.OptionsMessage, global::Google.ProtocolBuffers.TestProtos.OptionsMessage.Builder>(internal__static_protobuf_unittest_OptionsMessage__Descriptor,
                 new string[] { "Normal", "OptionsMessage_", "CustomName", });
@@ -49,5 +47,5 @@
     }
     #endregion
-    
+
   }
   #region Messages
@@ -57,21 +55,21 @@
       get { return defaultInstance; }
     }
-    
+
     public override OptionsMessage DefaultInstanceForType {
       get { return defaultInstance; }
     }
-    
+
     protected override OptionsMessage ThisMessage {
       get { return this; }
     }
-    
+
     public static pbd::MessageDescriptor Descriptor {
       get { return global::Google.ProtocolBuffers.TestProtos.UnitTestCSharpOptionsProtoFile.internal__static_protobuf_unittest_OptionsMessage__Descriptor; }
     }
-    
+
     protected override pb::FieldAccess.FieldAccessorTable<OptionsMessage, OptionsMessage.Builder> InternalFieldAccessors {
       get { return global::Google.ProtocolBuffers.TestProtos.UnitTestCSharpOptionsProtoFile.internal__static_protobuf_unittest_OptionsMessage__FieldAccessorTable; }
     }
-    
+
     public const int NormalFieldNumber = 1;
     private bool hasNormal;
@@ -83,5 +81,5 @@
       get { return normal_; }
     }
-    
+
     public const int OptionsMessage_FieldNumber = 2;
     private bool hasOptionsMessage_;
@@ -93,5 +91,5 @@
       get { return optionsMessage_; }
     }
-    
+
     public const int CustomNameFieldNumber = 3;
     private bool hasCustomName;
@@ -103,5 +101,5 @@
       get { return customized_; }
     }
-    
+
     public override bool IsInitialized {
       get {
@@ -109,5 +107,5 @@
       }
     }
-    
+
     public override void WriteTo(pb::CodedOutputStream output) {
       int size = SerializedSize;
@@ -123,5 +121,5 @@
       UnknownFields.WriteTo(output);
     }
-    
+
     private int memoizedSerializedSize = -1;
     public override int SerializedSize {
@@ -129,5 +127,5 @@
         int size = memoizedSerializedSize;
         if (size != -1) return size;
-        
+
         size = 0;
         if (HasNormal) {
@@ -145,22 +143,22 @@
       }
     }
-    
+
     public static OptionsMessage ParseFrom(pb::ByteString data) {
-      return ((Builder) CreateBuilder().MergeFrom(data)).BuildParsed();
+      return ((Builder)CreateBuilder().MergeFrom(data)).BuildParsed();
     }
     public static OptionsMessage ParseFrom(pb::ByteString data, pb::ExtensionRegistry extensionRegistry) {
-      return ((Builder) CreateBuilder().MergeFrom(data, extensionRegistry)).BuildParsed();
+      return ((Builder)CreateBuilder().MergeFrom(data, extensionRegistry)).BuildParsed();
     }
     public static OptionsMessage ParseFrom(byte[] data) {
-      return ((Builder) CreateBuilder().MergeFrom(data)).BuildParsed();
+      return ((Builder)CreateBuilder().MergeFrom(data)).BuildParsed();
     }
     public static OptionsMessage ParseFrom(byte[] data, pb::ExtensionRegistry extensionRegistry) {
-      return ((Builder) CreateBuilder().MergeFrom(data, extensionRegistry)).BuildParsed();
+      return ((Builder)CreateBuilder().MergeFrom(data, extensionRegistry)).BuildParsed();
     }
     public static OptionsMessage ParseFrom(global::System.IO.Stream input) {
-      return ((Builder) CreateBuilder().MergeFrom(input)).BuildParsed();
+      return ((Builder)CreateBuilder().MergeFrom(input)).BuildParsed();
     }
     public static OptionsMessage ParseFrom(global::System.IO.Stream input, pb::ExtensionRegistry extensionRegistry) {
-      return ((Builder) CreateBuilder().MergeFrom(input, extensionRegistry)).BuildParsed();
+      return ((Builder)CreateBuilder().MergeFrom(input, extensionRegistry)).BuildParsed();
     }
     public static OptionsMessage ParseDelimitedFrom(global::System.IO.Stream input) {
@@ -171,8 +169,8 @@
     }
     public static OptionsMessage ParseFrom(pb::CodedInputStream input) {
-      return ((Builder) CreateBuilder().MergeFrom(input)).BuildParsed();
+      return ((Builder)CreateBuilder().MergeFrom(input)).BuildParsed();
     }
     public static OptionsMessage ParseFrom(pb::CodedInputStream input, pb::ExtensionRegistry extensionRegistry) {
-      return ((Builder) CreateBuilder().MergeFrom(input, extensionRegistry)).BuildParsed();
+      return ((Builder)CreateBuilder().MergeFrom(input, extensionRegistry)).BuildParsed();
     }
     public static Builder CreateBuilder() { return new Builder(); }
@@ -180,36 +178,36 @@
     public override Builder CreateBuilderForType() { return new Builder(); }
     public static Builder CreateBuilder(OptionsMessage prototype) {
-      return (Builder) new Builder().MergeFrom(prototype);
-    }
-    
+      return (Builder)new Builder().MergeFrom(prototype);
+    }
+
     public sealed partial class Builder : pb::GeneratedBuilder<OptionsMessage, Builder> {
       protected override Builder ThisBuilder {
         get { return this; }
       }
-      public Builder() {}
-      
+      public Builder() { }
+
       OptionsMessage result = new OptionsMessage();
-      
+
       protected override OptionsMessage MessageBeingBuilt {
         get { return result; }
       }
-      
+
       public override Builder Clear() {
         result = new OptionsMessage();
         return this;
       }
-      
+
       public override Builder Clone() {
         return new Builder().MergeFrom(result);
       }
-      
+
       public override pbd::MessageDescriptor DescriptorForType {
         get { return global::Google.ProtocolBuffers.TestProtos.OptionsMessage.Descriptor; }
       }
-      
+
       public override OptionsMessage DefaultInstanceForType {
         get { return global::Google.ProtocolBuffers.TestProtos.OptionsMessage.DefaultInstance; }
       }
-      
+
       public override OptionsMessage BuildPartial() {
         if (result == null) {
@@ -220,8 +218,8 @@
         return returnMe;
       }
-      
+
       public override Builder MergeFrom(pb::IMessage other) {
         if (other is OptionsMessage) {
-          return MergeFrom((OptionsMessage) other);
+          return MergeFrom((OptionsMessage)other);
         } else {
           base.MergeFrom(other);
@@ -229,5 +227,5 @@
         }
       }
-      
+
       public override Builder MergeFrom(OptionsMessage other) {
         if (other == global::Google.ProtocolBuffers.TestProtos.OptionsMessage.DefaultInstance) return this;
@@ -244,9 +242,9 @@
         return this;
       }
-      
+
       public override Builder MergeFrom(pb::CodedInputStream input) {
         return MergeFrom(input, pb::ExtensionRegistry.Empty);
       }
-      
+
       public override Builder MergeFrom(pb::CodedInputStream input, pb::ExtensionRegistry extensionRegistry) {
         pb::UnknownFieldSet.Builder unknownFields = null;
@@ -255,11 +253,4 @@
           switch (tag) {
             case 0: {
-              if (unknownFields != null) {
-                this.UnknownFields = unknownFields.Build();
-              }
-              return this;
-            }
-            default: {
-              if (pb::WireFormat.IsEndGroupTag(tag)) {
                 if (unknownFields != null) {
                   this.UnknownFields = unknownFields.Build();
@@ -267,27 +258,34 @@
                 return this;
               }
-              if (unknownFields == null) {
-                unknownFields = pb::UnknownFieldSet.CreateBuilder(this.UnknownFields);
-              }
-              ParseUnknownField(input, unknownFields, extensionRegistry, tag);
-              break;
-            }
+            default: {
+                if (pb::WireFormat.IsEndGroupTag(tag)) {
+                  if (unknownFields != null) {
+                    this.UnknownFields = unknownFields.Build();
+                  }
+                  return this;
+                }
+                if (unknownFields == null) {
+                  unknownFields = pb::UnknownFieldSet.CreateBuilder(this.UnknownFields);
+                }
+                ParseUnknownField(input, unknownFields, extensionRegistry, tag);
+                break;
+              }
             case 10: {
-              Normal = input.ReadString();
-              break;
-            }
+                Normal = input.ReadString();
+                break;
+              }
             case 18: {
-              OptionsMessage_ = input.ReadString();
-              break;
-            }
+                OptionsMessage_ = input.ReadString();
+                break;
+              }
             case 26: {
-              CustomName = input.ReadString();
-              break;
-            }
+                CustomName = input.ReadString();
+                break;
+              }
           }
         }
       }
-      
-      
+
+
       public bool HasNormal {
         get { return result.HasNormal; }
@@ -308,5 +306,5 @@
         return this;
       }
-      
+
       public bool HasOptionsMessage_ {
         get { return result.HasOptionsMessage_; }
@@ -327,5 +325,5 @@
         return this;
       }
-      
+
       public bool HasCustomName {
         get { return result.HasCustomName; }
@@ -351,6 +349,6 @@
     }
   }
-  
+
   #endregion
-  
+
 }
Index: /trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.ProtobufCS/0.9.1/ProtobufCS/src/ProtocolBuffers.Test/TestProtos/UnitTestCustomOptionsProtoFile.cs
===================================================================
--- /trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.ProtobufCS/0.9.1/ProtobufCS/src/ProtocolBuffers.Test/TestProtos/UnitTestCustomOptionsProtoFile.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.ProtobufCS/0.9.1/ProtobufCS/src/ProtocolBuffers.Test/TestProtos/UnitTestCustomOptionsProtoFile.cs	(revision 4068)
@@ -2,11 +2,9 @@
 
 using pb = global::Google.ProtocolBuffers;
-using pbc = global::Google.ProtocolBuffers.Collections;
 using pbd = global::Google.ProtocolBuffers.Descriptors;
-using scg = global::System.Collections.Generic;
 namespace Google.ProtocolBuffers.TestProtos {
-  
+
   public static partial class UnitTestCustomOptionsProtoFile {
-  
+
     #region Extension registration
     public static void RegisterAllExtensions(pb::ExtensionRegistry registry) {
@@ -118,5 +116,5 @@
     public static pb::GeneratedExtensionBase<global::Google.ProtocolBuffers.TestProtos.ComplexOpt6> ComplexOpt6;
     #endregion
-    
+
     #region Static variables
     internal static pbd::MessageDescriptor internal__static_protobuf_unittest_TestMessageWithCustomOptions__Descriptor;
@@ -160,170 +158,170 @@
     }
     private static pbd::FileDescriptor descriptor;
-    
+
     static UnitTestCustomOptionsProtoFile() {
       byte[] descriptorData = global::System.Convert.FromBase64String(
-          "Ci1nb29nbGUvcHJvdG9idWYvdW5pdHRlc3RfY3VzdG9tX29wdGlvbnMucHJv" + 
-          "dG8SEXByb3RvYnVmX3VuaXR0ZXN0GiRnb29nbGUvcHJvdG9idWYvY3NoYXJw" + 
-          "X29wdGlvbnMucHJvdG8aIGdvb2dsZS9wcm90b2J1Zi9kZXNjcmlwdG9yLnBy" + 
-          "b3RvIoYBChxUZXN0TWVzc2FnZVdpdGhDdXN0b21PcHRpb25zEh4KBmZpZWxk" + 
-          "MRgBIAEoCUIOCAHB4MMdLeF1CgIAAAAiNAoGQW5FbnVtEg8KC0FORU5VTV9W" + 
-          "QUwxEAESDwoLQU5FTlVNX1ZBTDIQAhoIxfbJHev8//86EAgA4OnCHcj/////" + 
-          "/////wEiGAoWQ3VzdG9tT3B0aW9uRm9vUmVxdWVzdCIZChdDdXN0b21PcHRp" + 
-          "b25Gb29SZXNwb25zZSJtChpEdW1teU1lc3NhZ2VDb250YWluaW5nRW51bSJP" + 
-          "CgxUZXN0RW51bVR5cGUSGgoWVEVTVF9PUFRJT05fRU5VTV9UWVBFMRAWEiMK" + 
-          "FlRFU1RfT1BUSU9OX0VOVU1fVFlQRTIQ6f//////////ASIhCh9EdW1teU1l" + 
-          "c3NhZ2VJbnZhbGlkQXNPcHRpb25UeXBlIooBChxDdXN0b21PcHRpb25NaW5J" + 
-          "bnRlZ2VyVmFsdWVzOmqZ1qgdAAAAAAAAAICtja8dAAAAgJHurx0AAAAAAAAA" + 
-          "AJ31rx0AAAAA+JewHf///////////wGAxLAd/////w/49bAdAICTsh0AsLyy" + 
-          "HYCAgICAgICAgAHoxrIdgICAgPj/////AdDesh0AIpEBChxDdXN0b21PcHRp" + 
-          "b25NYXhJbnRlZ2VyVmFsdWVzOnGZ1qgd/////////3+tja8d////f5Hurx3/" + 
-          "/////////531rx3/////+JewHf7//////////wGAxLAd/v///w/49bAd////" + 
-          "////////AYCTsh3/////D7C8sh3//////////3/oxrId/////wfQ3rIdASJu" + 
-          "ChdDdXN0b21PcHRpb25PdGhlclZhbHVlczpTiNmiHen//////////wGy2aId" + 
-          "C0hlbGxvAFdvcmxkqtyiHQ5IZWxsbywgIldvcmxkIuncoh37WYxCysDzP/Xf" + 
-          "ox3nh0VB6MayHZz//////////wEiNAocU2V0dGluZ1JlYWxzRnJvbVBvc2l0" + 
-          "aXZlSW50czoU6dyiHQAAAAAAQGNA9d+jHQAAQEEiNAocU2V0dGluZ1JlYWxz" + 
-          "RnJvbU5lZ2F0aXZlSW50czoU6dyiHQAAAAAAQGPA9d+jHQAAQMEiKwoSQ29t" + 
-          "cGxleE9wdGlvblR5cGUxEgsKA2ZvbxgBIAEoBSoICGQQgICAgAIiwQIKEkNv" + 
-          "bXBsZXhPcHRpb25UeXBlMhIyCgNiYXIYASABKAsyJS5wcm90b2J1Zl91bml0" + 
-          "dGVzdC5Db21wbGV4T3B0aW9uVHlwZTESCwoDYmF6GAIgASgFEkYKBGZyZWQY" + 
-          "AyABKAsyOC5wcm90b2J1Zl91bml0dGVzdC5Db21wbGV4T3B0aW9uVHlwZTIu" + 
-          "Q29tcGxleE9wdGlvblR5cGU0GpcBChJDb21wbGV4T3B0aW9uVHlwZTQSDQoF" + 
-          "d2FsZG8YASABKAUycgoMY29tcGxleF9vcHQ0Eh8uZ29vZ2xlLnByb3RvYnVm" + 
-          "Lk1lc3NhZ2VPcHRpb25zGIr10QMgASgLMjgucHJvdG9idWZfdW5pdHRlc3Qu" + 
-          "Q29tcGxleE9wdGlvblR5cGUyLkNvbXBsZXhPcHRpb25UeXBlNCoICGQQgICA" + 
-          "gAIinAEKEkNvbXBsZXhPcHRpb25UeXBlMxILCgNxdXgYASABKAUSVAoSY29t" + 
-          "cGxleG9wdGlvbnR5cGU1GAIgASgKMjgucHJvdG9idWZfdW5pdHRlc3QuQ29t" + 
-          "cGxleE9wdGlvblR5cGUzLkNvbXBsZXhPcHRpb25UeXBlNRojChJDb21wbGV4" + 
-          "T3B0aW9uVHlwZTUSDQoFcGx1Z2gYAyABKAUiHwoLQ29tcGxleE9wdDYSEAoF" + 
-          "eHl6enkY37/PAyABKAUi0AEKFVZhcmlvdXNDb21wbGV4T3B0aW9uczq2AePc" + 
-          "/Bz4/fscGOTc/BzSqI8dAwizD/rekB0CCAn63pAdBBMYFhSq/ZAdAxDbB6r9" + 
-          "kB0G+OaXHY4Fqv2QHQUKAwjnBar9kB0ICgbYhZ4dzw+q/ZAdCgoIkvWdHQMI" + 
-          "2A+q/ZAdCMKslx0DCOUFqv2QHQvCrJcdBtiFnh3OD6r9kB0NwqyXHQiS9Z0d" + 
-          "AwjJEKr9kB0FGgMIwQKi4pUdAggqouKVHQbYhZ4dxAKi4pUdCJL1nR0DCOwG" + 
-          "KjYKCk1ldGhvZE9wdDESEwoPTUVUSE9ET1BUMV9WQUwxEAESEwoPTUVUSE9E" + 
-          "T1BUMV9WQUwyEAIyjgEKHFRlc3RTZXJ2aWNlV2l0aEN1c3RvbU9wdGlvbnMS" + 
-          "YwoDRm9vEikucHJvdG9idWZfdW5pdHRlc3QuQ3VzdG9tT3B0aW9uRm9vUmVx" + 
-          "dWVzdBoqLnByb3RvYnVmX3VuaXR0ZXN0LkN1c3RvbU9wdGlvbkZvb1Jlc3Bv" + 
-          "bnNlIgXg+oweAhoJkLKLHtPbgMtJOjIKCWZpbGVfb3B0MRIcLmdvb2dsZS5w" + 
-          "cm90b2J1Zi5GaWxlT3B0aW9ucxiOndgDIAEoBDo4CgxtZXNzYWdlX29wdDES" + 
-          "Hy5nb29nbGUucHJvdG9idWYuTWVzc2FnZU9wdGlvbnMYnK3YAyABKAU6NAoK" + 
-          "ZmllbGRfb3B0MRIdLmdvb2dsZS5wcm90b2J1Zi5GaWVsZE9wdGlvbnMYiLzY" + 
-          "AyABKAY6OAoKZmllbGRfb3B0MhIdLmdvb2dsZS5wcm90b2J1Zi5GaWVsZE9w" + 
-          "dGlvbnMYuaHZAyABKAU6AjQyOjIKCWVudW1fb3B0MRIcLmdvb2dsZS5wcm90" + 
-          "b2J1Zi5FbnVtT3B0aW9ucxjontkDIAEoDzo4CgxzZXJ2aWNlX29wdDESHy5n" + 
-          "b29nbGUucHJvdG9idWYuU2VydmljZU9wdGlvbnMYorbhAyABKBI6VQoLbWV0" + 
-          "aG9kX29wdDESHi5nb29nbGUucHJvdG9idWYuTWV0aG9kT3B0aW9ucxisz+ED" + 
-          "IAEoDjIdLnByb3RvYnVmX3VuaXR0ZXN0Lk1ldGhvZE9wdDE6NAoIYm9vbF9v" + 
-          "cHQSHy5nb29nbGUucHJvdG9idWYuTWVzc2FnZU9wdGlvbnMY6qvWAyABKAg6" + 
-          "NQoJaW50MzJfb3B0Eh8uZ29vZ2xlLnByb3RvYnVmLk1lc3NhZ2VPcHRpb25z" + 
-          "GO2o1gMgASgFOjUKCWludDY0X29wdBIfLmdvb2dsZS5wcm90b2J1Zi5NZXNz" + 
-          "YWdlT3B0aW9ucxjGp9YDIAEoAzo2Cgp1aW50MzJfb3B0Eh8uZ29vZ2xlLnBy" + 
-          "b3RvYnVmLk1lc3NhZ2VPcHRpb25zGLCi1gMgASgNOjYKCnVpbnQ2NF9vcHQS" + 
-          "Hy5nb29nbGUucHJvdG9idWYuTWVzc2FnZU9wdGlvbnMY347WAyABKAQ6NgoK" + 
-          "c2ludDMyX29wdBIfLmdvb2dsZS5wcm90b2J1Zi5NZXNzYWdlT3B0aW9ucxjA" + 
-          "iNYDIAEoETo2CgpzaW50NjRfb3B0Eh8uZ29vZ2xlLnByb3RvYnVmLk1lc3Nh" + 
-          "Z2VPcHRpb25zGP+C1gMgASgSOjcKC2ZpeGVkMzJfb3B0Eh8uZ29vZ2xlLnBy" + 
-          "b3RvYnVmLk1lc3NhZ2VPcHRpb25zGNP+1QMgASgHOjcKC2ZpeGVkNjRfb3B0" + 
-          "Eh8uZ29vZ2xlLnByb3RvYnVmLk1lc3NhZ2VPcHRpb25zGOL91QMgASgGOjgK" + 
-          "DHNmaXhlZDMyX29wdBIfLmdvb2dsZS5wcm90b2J1Zi5NZXNzYWdlT3B0aW9u" + 
-          "cxjV8dUDIAEoDzo4CgxzZml4ZWQ2NF9vcHQSHy5nb29nbGUucHJvdG9idWYu" + 
-          "TWVzc2FnZU9wdGlvbnMY44rVAyABKBA6NQoJZmxvYXRfb3B0Eh8uZ29vZ2xl" + 
-          "LnByb3RvYnVmLk1lc3NhZ2VPcHRpb25zGP671AMgASgCOjYKCmRvdWJsZV9v" + 
-          "cHQSHy5nb29nbGUucHJvdG9idWYuTWVzc2FnZU9wdGlvbnMYzavUAyABKAE6" + 
-          "NgoKc3RyaW5nX29wdBIfLmdvb2dsZS5wcm90b2J1Zi5NZXNzYWdlT3B0aW9u" + 
-          "cxjFq9QDIAEoCTo1CglieXRlc19vcHQSHy5nb29nbGUucHJvdG9idWYuTWVz" + 
-          "c2FnZU9wdGlvbnMYlqvUAyABKAw6cAoIZW51bV9vcHQSHy5nb29nbGUucHJv" + 
-          "dG9idWYuTWVzc2FnZU9wdGlvbnMYkavUAyABKA4yOi5wcm90b2J1Zl91bml0" + 
-          "dGVzdC5EdW1teU1lc3NhZ2VDb250YWluaW5nRW51bS5UZXN0RW51bVR5cGU6" + 
-          "cAoQbWVzc2FnZV90eXBlX29wdBIfLmdvb2dsZS5wcm90b2J1Zi5NZXNzYWdl" + 
-          "T3B0aW9ucxiv8tMDIAEoCzIyLnByb3RvYnVmX3VuaXR0ZXN0LkR1bW15TWVz" + 
-          "c2FnZUludmFsaWRBc09wdGlvblR5cGU6NgoEcXV1eBIlLnByb3RvYnVmX3Vu" + 
-          "aXR0ZXN0LkNvbXBsZXhPcHRpb25UeXBlMRjb4NMDIAEoBTpeCgVjb3JnZRIl" + 
-          "LnByb3RvYnVmX3VuaXR0ZXN0LkNvbXBsZXhPcHRpb25UeXBlMRjS3tMDIAEo" + 
-          "CzIlLnByb3RvYnVmX3VuaXR0ZXN0LkNvbXBsZXhPcHRpb25UeXBlMzo4CgZn" + 
-          "cmF1bHQSJS5wcm90b2J1Zl91bml0dGVzdC5Db21wbGV4T3B0aW9uVHlwZTIY" + 
-          "7/zSAyABKAU6XwoGZ2FycGx5EiUucHJvdG9idWZfdW5pdHRlc3QuQ29tcGxl" + 
-          "eE9wdGlvblR5cGUyGMj10gMgASgLMiUucHJvdG9idWZfdW5pdHRlc3QuQ29t" + 
-          "cGxleE9wdGlvblR5cGUxOl8KDGNvbXBsZXhfb3B0MRIfLmdvb2dsZS5wcm90" + 
-          "b2J1Zi5NZXNzYWdlT3B0aW9ucxik3NIDIAEoCzIlLnByb3RvYnVmX3VuaXR0" + 
-          "ZXN0LkNvbXBsZXhPcHRpb25UeXBlMTpfCgxjb21wbGV4X29wdDISHy5nb29n" + 
-          "bGUucHJvdG9idWYuTWVzc2FnZU9wdGlvbnMY1Y/SAyABKAsyJS5wcm90b2J1" + 
-          "Zl91bml0dGVzdC5Db21wbGV4T3B0aW9uVHlwZTI6XwoMY29tcGxleF9vcHQz" + 
-          "Eh8uZ29vZ2xlLnByb3RvYnVmLk1lc3NhZ2VPcHRpb25zGO+L0gMgASgLMiUu" + 
-          "cHJvdG9idWZfdW5pdHRlc3QuQ29tcGxleE9wdGlvblR5cGUzOlcKC2NvbXBs" + 
-          "ZXhvcHQ2Eh8uZ29vZ2xlLnByb3RvYnVmLk1lc3NhZ2VPcHRpb25zGMzLzwMg" + 
-          "ASgKMh4ucHJvdG9idWZfdW5pdHRlc3QuQ29tcGxleE9wdDZCT8I+QwohR29v" + 
-          "Z2xlLlByb3RvY29sQnVmZmVycy5UZXN0UHJvdG9zEh5Vbml0VGVzdEN1c3Rv" + 
+          "Ci1nb29nbGUvcHJvdG9idWYvdW5pdHRlc3RfY3VzdG9tX29wdGlvbnMucHJv" +
+          "dG8SEXByb3RvYnVmX3VuaXR0ZXN0GiRnb29nbGUvcHJvdG9idWYvY3NoYXJw" +
+          "X29wdGlvbnMucHJvdG8aIGdvb2dsZS9wcm90b2J1Zi9kZXNjcmlwdG9yLnBy" +
+          "b3RvIoYBChxUZXN0TWVzc2FnZVdpdGhDdXN0b21PcHRpb25zEh4KBmZpZWxk" +
+          "MRgBIAEoCUIOCAHB4MMdLeF1CgIAAAAiNAoGQW5FbnVtEg8KC0FORU5VTV9W" +
+          "QUwxEAESDwoLQU5FTlVNX1ZBTDIQAhoIxfbJHev8//86EAgA4OnCHcj/////" +
+          "/////wEiGAoWQ3VzdG9tT3B0aW9uRm9vUmVxdWVzdCIZChdDdXN0b21PcHRp" +
+          "b25Gb29SZXNwb25zZSJtChpEdW1teU1lc3NhZ2VDb250YWluaW5nRW51bSJP" +
+          "CgxUZXN0RW51bVR5cGUSGgoWVEVTVF9PUFRJT05fRU5VTV9UWVBFMRAWEiMK" +
+          "FlRFU1RfT1BUSU9OX0VOVU1fVFlQRTIQ6f//////////ASIhCh9EdW1teU1l" +
+          "c3NhZ2VJbnZhbGlkQXNPcHRpb25UeXBlIooBChxDdXN0b21PcHRpb25NaW5J" +
+          "bnRlZ2VyVmFsdWVzOmqZ1qgdAAAAAAAAAICtja8dAAAAgJHurx0AAAAAAAAA" +
+          "AJ31rx0AAAAA+JewHf///////////wGAxLAd/////w/49bAdAICTsh0AsLyy" +
+          "HYCAgICAgICAgAHoxrIdgICAgPj/////AdDesh0AIpEBChxDdXN0b21PcHRp" +
+          "b25NYXhJbnRlZ2VyVmFsdWVzOnGZ1qgd/////////3+tja8d////f5Hurx3/" +
+          "/////////531rx3/////+JewHf7//////////wGAxLAd/v///w/49bAd////" +
+          "////////AYCTsh3/////D7C8sh3//////////3/oxrId/////wfQ3rIdASJu" +
+          "ChdDdXN0b21PcHRpb25PdGhlclZhbHVlczpTiNmiHen//////////wGy2aId" +
+          "C0hlbGxvAFdvcmxkqtyiHQ5IZWxsbywgIldvcmxkIuncoh37WYxCysDzP/Xf" +
+          "ox3nh0VB6MayHZz//////////wEiNAocU2V0dGluZ1JlYWxzRnJvbVBvc2l0" +
+          "aXZlSW50czoU6dyiHQAAAAAAQGNA9d+jHQAAQEEiNAocU2V0dGluZ1JlYWxz" +
+          "RnJvbU5lZ2F0aXZlSW50czoU6dyiHQAAAAAAQGPA9d+jHQAAQMEiKwoSQ29t" +
+          "cGxleE9wdGlvblR5cGUxEgsKA2ZvbxgBIAEoBSoICGQQgICAgAIiwQIKEkNv" +
+          "bXBsZXhPcHRpb25UeXBlMhIyCgNiYXIYASABKAsyJS5wcm90b2J1Zl91bml0" +
+          "dGVzdC5Db21wbGV4T3B0aW9uVHlwZTESCwoDYmF6GAIgASgFEkYKBGZyZWQY" +
+          "AyABKAsyOC5wcm90b2J1Zl91bml0dGVzdC5Db21wbGV4T3B0aW9uVHlwZTIu" +
+          "Q29tcGxleE9wdGlvblR5cGU0GpcBChJDb21wbGV4T3B0aW9uVHlwZTQSDQoF" +
+          "d2FsZG8YASABKAUycgoMY29tcGxleF9vcHQ0Eh8uZ29vZ2xlLnByb3RvYnVm" +
+          "Lk1lc3NhZ2VPcHRpb25zGIr10QMgASgLMjgucHJvdG9idWZfdW5pdHRlc3Qu" +
+          "Q29tcGxleE9wdGlvblR5cGUyLkNvbXBsZXhPcHRpb25UeXBlNCoICGQQgICA" +
+          "gAIinAEKEkNvbXBsZXhPcHRpb25UeXBlMxILCgNxdXgYASABKAUSVAoSY29t" +
+          "cGxleG9wdGlvbnR5cGU1GAIgASgKMjgucHJvdG9idWZfdW5pdHRlc3QuQ29t" +
+          "cGxleE9wdGlvblR5cGUzLkNvbXBsZXhPcHRpb25UeXBlNRojChJDb21wbGV4" +
+          "T3B0aW9uVHlwZTUSDQoFcGx1Z2gYAyABKAUiHwoLQ29tcGxleE9wdDYSEAoF" +
+          "eHl6enkY37/PAyABKAUi0AEKFVZhcmlvdXNDb21wbGV4T3B0aW9uczq2AePc" +
+          "/Bz4/fscGOTc/BzSqI8dAwizD/rekB0CCAn63pAdBBMYFhSq/ZAdAxDbB6r9" +
+          "kB0G+OaXHY4Fqv2QHQUKAwjnBar9kB0ICgbYhZ4dzw+q/ZAdCgoIkvWdHQMI" +
+          "2A+q/ZAdCMKslx0DCOUFqv2QHQvCrJcdBtiFnh3OD6r9kB0NwqyXHQiS9Z0d" +
+          "AwjJEKr9kB0FGgMIwQKi4pUdAggqouKVHQbYhZ4dxAKi4pUdCJL1nR0DCOwG" +
+          "KjYKCk1ldGhvZE9wdDESEwoPTUVUSE9ET1BUMV9WQUwxEAESEwoPTUVUSE9E" +
+          "T1BUMV9WQUwyEAIyjgEKHFRlc3RTZXJ2aWNlV2l0aEN1c3RvbU9wdGlvbnMS" +
+          "YwoDRm9vEikucHJvdG9idWZfdW5pdHRlc3QuQ3VzdG9tT3B0aW9uRm9vUmVx" +
+          "dWVzdBoqLnByb3RvYnVmX3VuaXR0ZXN0LkN1c3RvbU9wdGlvbkZvb1Jlc3Bv" +
+          "bnNlIgXg+oweAhoJkLKLHtPbgMtJOjIKCWZpbGVfb3B0MRIcLmdvb2dsZS5w" +
+          "cm90b2J1Zi5GaWxlT3B0aW9ucxiOndgDIAEoBDo4CgxtZXNzYWdlX29wdDES" +
+          "Hy5nb29nbGUucHJvdG9idWYuTWVzc2FnZU9wdGlvbnMYnK3YAyABKAU6NAoK" +
+          "ZmllbGRfb3B0MRIdLmdvb2dsZS5wcm90b2J1Zi5GaWVsZE9wdGlvbnMYiLzY" +
+          "AyABKAY6OAoKZmllbGRfb3B0MhIdLmdvb2dsZS5wcm90b2J1Zi5GaWVsZE9w" +
+          "dGlvbnMYuaHZAyABKAU6AjQyOjIKCWVudW1fb3B0MRIcLmdvb2dsZS5wcm90" +
+          "b2J1Zi5FbnVtT3B0aW9ucxjontkDIAEoDzo4CgxzZXJ2aWNlX29wdDESHy5n" +
+          "b29nbGUucHJvdG9idWYuU2VydmljZU9wdGlvbnMYorbhAyABKBI6VQoLbWV0" +
+          "aG9kX29wdDESHi5nb29nbGUucHJvdG9idWYuTWV0aG9kT3B0aW9ucxisz+ED" +
+          "IAEoDjIdLnByb3RvYnVmX3VuaXR0ZXN0Lk1ldGhvZE9wdDE6NAoIYm9vbF9v" +
+          "cHQSHy5nb29nbGUucHJvdG9idWYuTWVzc2FnZU9wdGlvbnMY6qvWAyABKAg6" +
+          "NQoJaW50MzJfb3B0Eh8uZ29vZ2xlLnByb3RvYnVmLk1lc3NhZ2VPcHRpb25z" +
+          "GO2o1gMgASgFOjUKCWludDY0X29wdBIfLmdvb2dsZS5wcm90b2J1Zi5NZXNz" +
+          "YWdlT3B0aW9ucxjGp9YDIAEoAzo2Cgp1aW50MzJfb3B0Eh8uZ29vZ2xlLnBy" +
+          "b3RvYnVmLk1lc3NhZ2VPcHRpb25zGLCi1gMgASgNOjYKCnVpbnQ2NF9vcHQS" +
+          "Hy5nb29nbGUucHJvdG9idWYuTWVzc2FnZU9wdGlvbnMY347WAyABKAQ6NgoK" +
+          "c2ludDMyX29wdBIfLmdvb2dsZS5wcm90b2J1Zi5NZXNzYWdlT3B0aW9ucxjA" +
+          "iNYDIAEoETo2CgpzaW50NjRfb3B0Eh8uZ29vZ2xlLnByb3RvYnVmLk1lc3Nh" +
+          "Z2VPcHRpb25zGP+C1gMgASgSOjcKC2ZpeGVkMzJfb3B0Eh8uZ29vZ2xlLnBy" +
+          "b3RvYnVmLk1lc3NhZ2VPcHRpb25zGNP+1QMgASgHOjcKC2ZpeGVkNjRfb3B0" +
+          "Eh8uZ29vZ2xlLnByb3RvYnVmLk1lc3NhZ2VPcHRpb25zGOL91QMgASgGOjgK" +
+          "DHNmaXhlZDMyX29wdBIfLmdvb2dsZS5wcm90b2J1Zi5NZXNzYWdlT3B0aW9u" +
+          "cxjV8dUDIAEoDzo4CgxzZml4ZWQ2NF9vcHQSHy5nb29nbGUucHJvdG9idWYu" +
+          "TWVzc2FnZU9wdGlvbnMY44rVAyABKBA6NQoJZmxvYXRfb3B0Eh8uZ29vZ2xl" +
+          "LnByb3RvYnVmLk1lc3NhZ2VPcHRpb25zGP671AMgASgCOjYKCmRvdWJsZV9v" +
+          "cHQSHy5nb29nbGUucHJvdG9idWYuTWVzc2FnZU9wdGlvbnMYzavUAyABKAE6" +
+          "NgoKc3RyaW5nX29wdBIfLmdvb2dsZS5wcm90b2J1Zi5NZXNzYWdlT3B0aW9u" +
+          "cxjFq9QDIAEoCTo1CglieXRlc19vcHQSHy5nb29nbGUucHJvdG9idWYuTWVz" +
+          "c2FnZU9wdGlvbnMYlqvUAyABKAw6cAoIZW51bV9vcHQSHy5nb29nbGUucHJv" +
+          "dG9idWYuTWVzc2FnZU9wdGlvbnMYkavUAyABKA4yOi5wcm90b2J1Zl91bml0" +
+          "dGVzdC5EdW1teU1lc3NhZ2VDb250YWluaW5nRW51bS5UZXN0RW51bVR5cGU6" +
+          "cAoQbWVzc2FnZV90eXBlX29wdBIfLmdvb2dsZS5wcm90b2J1Zi5NZXNzYWdl" +
+          "T3B0aW9ucxiv8tMDIAEoCzIyLnByb3RvYnVmX3VuaXR0ZXN0LkR1bW15TWVz" +
+          "c2FnZUludmFsaWRBc09wdGlvblR5cGU6NgoEcXV1eBIlLnByb3RvYnVmX3Vu" +
+          "aXR0ZXN0LkNvbXBsZXhPcHRpb25UeXBlMRjb4NMDIAEoBTpeCgVjb3JnZRIl" +
+          "LnByb3RvYnVmX3VuaXR0ZXN0LkNvbXBsZXhPcHRpb25UeXBlMRjS3tMDIAEo" +
+          "CzIlLnByb3RvYnVmX3VuaXR0ZXN0LkNvbXBsZXhPcHRpb25UeXBlMzo4CgZn" +
+          "cmF1bHQSJS5wcm90b2J1Zl91bml0dGVzdC5Db21wbGV4T3B0aW9uVHlwZTIY" +
+          "7/zSAyABKAU6XwoGZ2FycGx5EiUucHJvdG9idWZfdW5pdHRlc3QuQ29tcGxl" +
+          "eE9wdGlvblR5cGUyGMj10gMgASgLMiUucHJvdG9idWZfdW5pdHRlc3QuQ29t" +
+          "cGxleE9wdGlvblR5cGUxOl8KDGNvbXBsZXhfb3B0MRIfLmdvb2dsZS5wcm90" +
+          "b2J1Zi5NZXNzYWdlT3B0aW9ucxik3NIDIAEoCzIlLnByb3RvYnVmX3VuaXR0" +
+          "ZXN0LkNvbXBsZXhPcHRpb25UeXBlMTpfCgxjb21wbGV4X29wdDISHy5nb29n" +
+          "bGUucHJvdG9idWYuTWVzc2FnZU9wdGlvbnMY1Y/SAyABKAsyJS5wcm90b2J1" +
+          "Zl91bml0dGVzdC5Db21wbGV4T3B0aW9uVHlwZTI6XwoMY29tcGxleF9vcHQz" +
+          "Eh8uZ29vZ2xlLnByb3RvYnVmLk1lc3NhZ2VPcHRpb25zGO+L0gMgASgLMiUu" +
+          "cHJvdG9idWZfdW5pdHRlc3QuQ29tcGxleE9wdGlvblR5cGUzOlcKC2NvbXBs" +
+          "ZXhvcHQ2Eh8uZ29vZ2xlLnByb3RvYnVmLk1lc3NhZ2VPcHRpb25zGMzLzwMg" +
+          "ASgKMh4ucHJvdG9idWZfdW5pdHRlc3QuQ29tcGxleE9wdDZCT8I+QwohR29v" +
+          "Z2xlLlByb3RvY29sQnVmZmVycy5UZXN0UHJvdG9zEh5Vbml0VGVzdEN1c3Rv" +
           "bU9wdGlvbnNQcm90b0ZpbGXw6MEd6q3A5SQ=");
       pbd::FileDescriptor.InternalDescriptorAssigner assigner = delegate(pbd::FileDescriptor root) {
         descriptor = root;
         internal__static_protobuf_unittest_TestMessageWithCustomOptions__Descriptor = Descriptor.MessageTypes[0];
-        internal__static_protobuf_unittest_TestMessageWithCustomOptions__FieldAccessorTable = 
+        internal__static_protobuf_unittest_TestMessageWithCustomOptions__FieldAccessorTable =
             new pb::FieldAccess.FieldAccessorTable<global::Google.ProtocolBuffers.TestProtos.TestMessageWithCustomOptions, global::Google.ProtocolBuffers.TestProtos.TestMessageWithCustomOptions.Builder>(internal__static_protobuf_unittest_TestMessageWithCustomOptions__Descriptor,
                 new string[] { "Field1", });
         internal__static_protobuf_unittest_CustomOptionFooRequest__Descriptor = Descriptor.MessageTypes[1];
-        internal__static_protobuf_unittest_CustomOptionFooRequest__FieldAccessorTable = 
+        internal__static_protobuf_unittest_CustomOptionFooRequest__FieldAccessorTable =
             new pb::FieldAccess.FieldAccessorTable<global::Google.ProtocolBuffers.TestProtos.CustomOptionFooRequest, global::Google.ProtocolBuffers.TestProtos.CustomOptionFooRequest.Builder>(internal__static_protobuf_unittest_CustomOptionFooRequest__Descriptor,
                 new string[] { });
         internal__static_protobuf_unittest_CustomOptionFooResponse__Descriptor = Descriptor.MessageTypes[2];
-        internal__static_protobuf_unittest_CustomOptionFooResponse__FieldAccessorTable = 
+        internal__static_protobuf_unittest_CustomOptionFooResponse__FieldAccessorTable =
             new pb::FieldAccess.FieldAccessorTable<global::Google.ProtocolBuffers.TestProtos.CustomOptionFooResponse, global::Google.ProtocolBuffers.TestProtos.CustomOptionFooResponse.Builder>(internal__static_protobuf_unittest_CustomOptionFooResponse__Descriptor,
                 new string[] { });
         internal__static_protobuf_unittest_DummyMessageContainingEnum__Descriptor = Descriptor.MessageTypes[3];
-        internal__static_protobuf_unittest_DummyMessageContainingEnum__FieldAccessorTable = 
+        internal__static_protobuf_unittest_DummyMessageContainingEnum__FieldAccessorTable =
             new pb::FieldAccess.FieldAccessorTable<global::Google.ProtocolBuffers.TestProtos.DummyMessageContainingEnum, global::Google.ProtocolBuffers.TestProtos.DummyMessageContainingEnum.Builder>(internal__static_protobuf_unittest_DummyMessageContainingEnum__Descriptor,
                 new string[] { });
         internal__static_protobuf_unittest_DummyMessageInvalidAsOptionType__Descriptor = Descriptor.MessageTypes[4];
-        internal__static_protobuf_unittest_DummyMessageInvalidAsOptionType__FieldAccessorTable = 
+        internal__static_protobuf_unittest_DummyMessageInvalidAsOptionType__FieldAccessorTable =
             new pb::FieldAccess.FieldAccessorTable<global::Google.ProtocolBuffers.TestProtos.DummyMessageInvalidAsOptionType, global::Google.ProtocolBuffers.TestProtos.DummyMessageInvalidAsOptionType.Builder>(internal__static_protobuf_unittest_DummyMessageInvalidAsOptionType__Descriptor,
                 new string[] { });
         internal__static_protobuf_unittest_CustomOptionMinIntegerValues__Descriptor = Descriptor.MessageTypes[5];
-        internal__static_protobuf_unittest_CustomOptionMinIntegerValues__FieldAccessorTable = 
+        internal__static_protobuf_unittest_CustomOptionMinIntegerValues__FieldAccessorTable =
             new pb::FieldAccess.FieldAccessorTable<global::Google.ProtocolBuffers.TestProtos.CustomOptionMinIntegerValues, global::Google.ProtocolBuffers.TestProtos.CustomOptionMinIntegerValues.Builder>(internal__static_protobuf_unittest_CustomOptionMinIntegerValues__Descriptor,
                 new string[] { });
         internal__static_protobuf_unittest_CustomOptionMaxIntegerValues__Descriptor = Descriptor.MessageTypes[6];
-        internal__static_protobuf_unittest_CustomOptionMaxIntegerValues__FieldAccessorTable = 
+        internal__static_protobuf_unittest_CustomOptionMaxIntegerValues__FieldAccessorTable =
             new pb::FieldAccess.FieldAccessorTable<global::Google.ProtocolBuffers.TestProtos.CustomOptionMaxIntegerValues, global::Google.ProtocolBuffers.TestProtos.CustomOptionMaxIntegerValues.Builder>(internal__static_protobuf_unittest_CustomOptionMaxIntegerValues__Descriptor,
                 new string[] { });
         internal__static_protobuf_unittest_CustomOptionOtherValues__Descriptor = Descriptor.MessageTypes[7];
-        internal__static_protobuf_unittest_CustomOptionOtherValues__FieldAccessorTable = 
+        internal__static_protobuf_unittest_CustomOptionOtherValues__FieldAccessorTable =
             new pb::FieldAccess.FieldAccessorTable<global::Google.ProtocolBuffers.TestProtos.CustomOptionOtherValues, global::Google.ProtocolBuffers.TestProtos.CustomOptionOtherValues.Builder>(internal__static_protobuf_unittest_CustomOptionOtherValues__Descriptor,
                 new string[] { });
         internal__static_protobuf_unittest_SettingRealsFromPositiveInts__Descriptor = Descriptor.MessageTypes[8];
-        internal__static_protobuf_unittest_SettingRealsFromPositiveInts__FieldAccessorTable = 
+        internal__static_protobuf_unittest_SettingRealsFromPositiveInts__FieldAccessorTable =
             new pb::FieldAccess.FieldAccessorTable<global::Google.ProtocolBuffers.TestProtos.SettingRealsFromPositiveInts, global::Google.ProtocolBuffers.TestProtos.SettingRealsFromPositiveInts.Builder>(internal__static_protobuf_unittest_SettingRealsFromPositiveInts__Descriptor,
                 new string[] { });
         internal__static_protobuf_unittest_SettingRealsFromNegativeInts__Descriptor = Descriptor.MessageTypes[9];
-        internal__static_protobuf_unittest_SettingRealsFromNegativeInts__FieldAccessorTable = 
+        internal__static_protobuf_unittest_SettingRealsFromNegativeInts__FieldAccessorTable =
             new pb::FieldAccess.FieldAccessorTable<global::Google.ProtocolBuffers.TestProtos.SettingRealsFromNegativeInts, global::Google.ProtocolBuffers.TestProtos.SettingRealsFromNegativeInts.Builder>(internal__static_protobuf_unittest_SettingRealsFromNegativeInts__Descriptor,
                 new string[] { });
         internal__static_protobuf_unittest_ComplexOptionType1__Descriptor = Descriptor.MessageTypes[10];
-        internal__static_protobuf_unittest_ComplexOptionType1__FieldAccessorTable = 
+        internal__static_protobuf_unittest_ComplexOptionType1__FieldAccessorTable =
             new pb::FieldAccess.FieldAccessorTable<global::Google.ProtocolBuffers.TestProtos.ComplexOptionType1, global::Google.ProtocolBuffers.TestProtos.ComplexOptionType1.Builder>(internal__static_protobuf_unittest_ComplexOptionType1__Descriptor,
                 new string[] { "Foo", });
         internal__static_protobuf_unittest_ComplexOptionType2__Descriptor = Descriptor.MessageTypes[11];
-        internal__static_protobuf_unittest_ComplexOptionType2__FieldAccessorTable = 
+        internal__static_protobuf_unittest_ComplexOptionType2__FieldAccessorTable =
             new pb::FieldAccess.FieldAccessorTable<global::Google.ProtocolBuffers.TestProtos.ComplexOptionType2, global::Google.ProtocolBuffers.TestProtos.ComplexOptionType2.Builder>(internal__static_protobuf_unittest_ComplexOptionType2__Descriptor,
                 new string[] { "Bar", "Baz", "Fred", });
         internal__static_protobuf_unittest_ComplexOptionType2_ComplexOptionType4__Descriptor = internal__static_protobuf_unittest_ComplexOptionType2__Descriptor.NestedTypes[0];
-        internal__static_protobuf_unittest_ComplexOptionType2_ComplexOptionType4__FieldAccessorTable = 
+        internal__static_protobuf_unittest_ComplexOptionType2_ComplexOptionType4__FieldAccessorTable =
             new pb::FieldAccess.FieldAccessorTable<global::Google.ProtocolBuffers.TestProtos.ComplexOptionType2.Types.ComplexOptionType4, global::Google.ProtocolBuffers.TestProtos.ComplexOptionType2.Types.ComplexOptionType4.Builder>(internal__static_protobuf_unittest_ComplexOptionType2_ComplexOptionType4__Descriptor,
                 new string[] { "Waldo", });
         global::Google.ProtocolBuffers.TestProtos.ComplexOptionType2.Types.ComplexOptionType4.ComplexOpt4 = pb::GeneratedSingleExtension<global::Google.ProtocolBuffers.TestProtos.ComplexOptionType2.Types.ComplexOptionType4>.CreateInstance(global::Google.ProtocolBuffers.TestProtos.ComplexOptionType2.Types.ComplexOptionType4.Descriptor.Extensions[0]);
         internal__static_protobuf_unittest_ComplexOptionType3__Descriptor = Descriptor.MessageTypes[12];
-        internal__static_protobuf_unittest_ComplexOptionType3__FieldAccessorTable = 
+        internal__static_protobuf_unittest_ComplexOptionType3__FieldAccessorTable =
             new pb::FieldAccess.FieldAccessorTable<global::Google.ProtocolBuffers.TestProtos.ComplexOptionType3, global::Google.ProtocolBuffers.TestProtos.ComplexOptionType3.Builder>(internal__static_protobuf_unittest_ComplexOptionType3__Descriptor,
                 new string[] { "Qux", "ComplexOptionType5", });
         internal__static_protobuf_unittest_ComplexOptionType3_ComplexOptionType5__Descriptor = internal__static_protobuf_unittest_ComplexOptionType3__Descriptor.NestedTypes[0];
-        internal__static_protobuf_unittest_ComplexOptionType3_ComplexOptionType5__FieldAccessorTable = 
+        internal__static_protobuf_unittest_ComplexOptionType3_ComplexOptionType5__FieldAccessorTable =
             new pb::FieldAccess.FieldAccessorTable<global::Google.ProtocolBuffers.TestProtos.ComplexOptionType3.Types.ComplexOptionType5, global::Google.ProtocolBuffers.TestProtos.ComplexOptionType3.Types.ComplexOptionType5.Builder>(internal__static_protobuf_unittest_ComplexOptionType3_ComplexOptionType5__Descriptor,
                 new string[] { "Plugh", });
         internal__static_protobuf_unittest_ComplexOpt6__Descriptor = Descriptor.MessageTypes[13];
-        internal__static_protobuf_unittest_ComplexOpt6__FieldAccessorTable = 
+        internal__static_protobuf_unittest_ComplexOpt6__FieldAccessorTable =
             new pb::FieldAccess.FieldAccessorTable<global::Google.ProtocolBuffers.TestProtos.ComplexOpt6, global::Google.ProtocolBuffers.TestProtos.ComplexOpt6.Builder>(internal__static_protobuf_unittest_ComplexOpt6__Descriptor,
                 new string[] { "Xyzzy", });
         internal__static_protobuf_unittest_VariousComplexOptions__Descriptor = Descriptor.MessageTypes[14];
-        internal__static_protobuf_unittest_VariousComplexOptions__FieldAccessorTable = 
+        internal__static_protobuf_unittest_VariousComplexOptions__FieldAccessorTable =
             new pb::FieldAccess.FieldAccessorTable<global::Google.ProtocolBuffers.TestProtos.VariousComplexOptions, global::Google.ProtocolBuffers.TestProtos.VariousComplexOptions.Builder>(internal__static_protobuf_unittest_VariousComplexOptions__Descriptor,
                 new string[] { });
@@ -373,5 +371,5 @@
     }
     #endregion
-    
+
   }
   #region Enums
@@ -380,7 +378,7 @@
     METHODOPT1_VAL2 = 2,
   }
-  
+
   #endregion
-  
+
   #region Messages
   public sealed partial class TestMessageWithCustomOptions : pb::GeneratedMessage<TestMessageWithCustomOptions, TestMessageWithCustomOptions.Builder> {
@@ -389,21 +387,21 @@
       get { return defaultInstance; }
     }
-    
+
     public override TestMessageWithCustomOptions DefaultInstanceForType {
       get { return defaultInstance; }
     }
-    
+
     protected override TestMessageWithCustomOptions ThisMessage {
       get { return this; }
     }
-    
+
     public static pbd::MessageDescriptor Descriptor {
       get { return global::Google.ProtocolBuffers.TestProtos.UnitTestCustomOptionsProtoFile.internal__static_protobuf_unittest_TestMessageWithCustomOptions__Descriptor; }
     }
-    
+
     protected override pb::FieldAccess.FieldAccessorTable<TestMessageWithCustomOptions, TestMessageWithCustomOptions.Builder> InternalFieldAccessors {
       get { return global::Google.ProtocolBuffers.TestProtos.UnitTestCustomOptionsProtoFile.internal__static_protobuf_unittest_TestMessageWithCustomOptions__FieldAccessorTable; }
     }
-    
+
     #region Nested types
     public static class Types {
@@ -412,8 +410,8 @@
         ANENUM_VAL2 = 2,
       }
-      
+
     }
     #endregion
-    
+
     public const int Field1FieldNumber = 1;
     private bool hasField1;
@@ -425,5 +423,5 @@
       get { return field1_; }
     }
-    
+
     public override bool IsInitialized {
       get {
@@ -431,5 +429,5 @@
       }
     }
-    
+
     public override void WriteTo(pb::CodedOutputStream output) {
       int size = SerializedSize;
@@ -439,5 +437,5 @@
       UnknownFields.WriteTo(output);
     }
-    
+
     private int memoizedSerializedSize = -1;
     public override int SerializedSize {
@@ -445,5 +443,5 @@
         int size = memoizedSerializedSize;
         if (size != -1) return size;
-        
+
         size = 0;
         if (HasField1) {
@@ -455,22 +453,22 @@
       }
     }
-    
+
     public static TestMessageWithCustomOptions ParseFrom(pb::ByteString data) {
-      return ((Builder) CreateBuilder().MergeFrom(data)).BuildParsed();
+      return ((Builder)CreateBuilder().MergeFrom(data)).BuildParsed();
     }
     public static TestMessageWithCustomOptions ParseFrom(pb::ByteString data, pb::ExtensionRegistry extensionRegistry) {
-      return ((Builder) CreateBuilder().MergeFrom(data, extensionRegistry)).BuildParsed();
+      return ((Builder)CreateBuilder().MergeFrom(data, extensionRegistry)).BuildParsed();
     }
     public static TestMessageWithCustomOptions ParseFrom(byte[] data) {
-      return ((Builder) CreateBuilder().MergeFrom(data)).BuildParsed();
+      return ((Builder)CreateBuilder().MergeFrom(data)).BuildParsed();
     }
     public static TestMessageWithCustomOptions ParseFrom(byte[] data, pb::ExtensionRegistry extensionRegistry) {
-      return ((Builder) CreateBuilder().MergeFrom(data, extensionRegistry)).BuildParsed();
+      return ((Builder)CreateBuilder().MergeFrom(data, extensionRegistry)).BuildParsed();
     }
     public static TestMessageWithCustomOptions ParseFrom(global::System.IO.Stream input) {
-      return ((Builder) CreateBuilder().MergeFrom(input)).BuildParsed();
+      return ((Builder)CreateBuilder().MergeFrom(input)).BuildParsed();
     }
     public static TestMessageWithCustomOptions ParseFrom(global::System.IO.Stream input, pb::ExtensionRegistry extensionRegistry) {
-      return ((Builder) CreateBuilder().MergeFrom(input, extensionRegistry)).BuildParsed();
+      return ((Builder)CreateBuilder().MergeFrom(input, extensionRegistry)).BuildParsed();
     }
     public static TestMessageWithCustomOptions ParseDelimitedFrom(global::System.IO.Stream input) {
@@ -481,8 +479,8 @@
     }
     public static TestMessageWithCustomOptions ParseFrom(pb::CodedInputStream input) {
-      return ((Builder) CreateBuilder().MergeFrom(input)).BuildParsed();
+      return ((Builder)CreateBuilder().MergeFrom(input)).BuildParsed();
     }
     public static TestMessageWithCustomOptions ParseFrom(pb::CodedInputStream input, pb::ExtensionRegistry extensionRegistry) {
-      return ((Builder) CreateBuilder().MergeFrom(input, extensionRegistry)).BuildParsed();
+      return ((Builder)CreateBuilder().MergeFrom(input, extensionRegistry)).BuildParsed();
     }
     public static Builder CreateBuilder() { return new Builder(); }
@@ -490,36 +488,36 @@
     public override Builder CreateBuilderForType() { return new Builder(); }
     public static Builder CreateBuilder(TestMessageWithCustomOptions prototype) {
-      return (Builder) new Builder().MergeFrom(prototype);
-    }
-    
+      return (Builder)new Builder().MergeFrom(prototype);
+    }
+
     public sealed partial class Builder : pb::GeneratedBuilder<TestMessageWithCustomOptions, Builder> {
       protected override Builder ThisBuilder {
         get { return this; }
       }
-      public Builder() {}
-      
+      public Builder() { }
+
       TestMessageWithCustomOptions result = new TestMessageWithCustomOptions();
-      
+
       protected override TestMessageWithCustomOptions MessageBeingBuilt {
         get { return result; }
       }
-      
+
       public override Builder Clear() {
         result = new TestMessageWithCustomOptions();
         return this;
       }
-      
+
       public override Builder Clone() {
         return new Builder().MergeFrom(result);
       }
-      
+
       public override pbd::MessageDescriptor DescriptorForType {
         get { return global::Google.ProtocolBuffers.TestProtos.TestMessageWithCustomOptions.Descriptor; }
       }
-      
+
       public override TestMessageWithCustomOptions DefaultInstanceForType {
         get { return global::Google.ProtocolBuffers.TestProtos.TestMessageWithCustomOptions.DefaultInstance; }
       }
-      
+
       public override TestMessageWithCustomOptions BuildPartial() {
         if (result == null) {
@@ -530,8 +528,8 @@
         return returnMe;
       }
-      
+
       public override Builder MergeFrom(pb::IMessage other) {
         if (other is TestMessageWithCustomOptions) {
-          return MergeFrom((TestMessageWithCustomOptions) other);
+          return MergeFrom((TestMessageWithCustomOptions)other);
         } else {
           base.MergeFrom(other);
@@ -539,5 +537,5 @@
         }
       }
-      
+
       public override Builder MergeFrom(TestMessageWithCustomOptions other) {
         if (other == global::Google.ProtocolBuffers.TestProtos.TestMessageWithCustomOptions.DefaultInstance) return this;
@@ -548,9 +546,9 @@
         return this;
       }
-      
+
       public override Builder MergeFrom(pb::CodedInputStream input) {
         return MergeFrom(input, pb::ExtensionRegistry.Empty);
       }
-      
+
       public override Builder MergeFrom(pb::CodedInputStream input, pb::ExtensionRegistry extensionRegistry) {
         pb::UnknownFieldSet.Builder unknownFields = null;
@@ -559,11 +557,4 @@
           switch (tag) {
             case 0: {
-              if (unknownFields != null) {
-                this.UnknownFields = unknownFields.Build();
-              }
-              return this;
-            }
-            default: {
-              if (pb::WireFormat.IsEndGroupTag(tag)) {
                 if (unknownFields != null) {
                   this.UnknownFields = unknownFields.Build();
@@ -571,19 +562,26 @@
                 return this;
               }
-              if (unknownFields == null) {
-                unknownFields = pb::UnknownFieldSet.CreateBuilder(this.UnknownFields);
+            default: {
+                if (pb::WireFormat.IsEndGroupTag(tag)) {
+                  if (unknownFields != null) {
+                    this.UnknownFields = unknownFields.Build();
+                  }
+                  return this;
+                }
+                if (unknownFields == null) {
+                  unknownFields = pb::UnknownFieldSet.CreateBuilder(this.UnknownFields);
+                }
+                ParseUnknownField(input, unknownFields, extensionRegistry, tag);
+                break;
               }
-              ParseUnknownField(input, unknownFields, extensionRegistry, tag);
-              break;
-            }
             case 10: {
-              Field1 = input.ReadString();
-              break;
-            }
-          }
-        }
-      }
-      
-      
+                Field1 = input.ReadString();
+                break;
+              }
+          }
+        }
+      }
+
+
       public bool HasField1 {
         get { return result.HasField1; }
@@ -609,5 +607,5 @@
     }
   }
-  
+
   public sealed partial class CustomOptionFooRequest : pb::GeneratedMessage<CustomOptionFooRequest, CustomOptionFooRequest.Builder> {
     private static readonly CustomOptionFooRequest defaultInstance = new Builder().BuildPartial();
@@ -615,21 +613,21 @@
       get { return defaultInstance; }
     }
-    
+
     public override CustomOptionFooRequest DefaultInstanceForType {
       get { return defaultInstance; }
     }
-    
+
     protected override CustomOptionFooRequest ThisMessage {
       get { return this; }
     }
-    
+
     public static pbd::MessageDescriptor Descriptor {
       get { return global::Google.ProtocolBuffers.TestProtos.UnitTestCustomOptionsProtoFile.internal__static_protobuf_unittest_CustomOptionFooRequest__Descriptor; }
     }
-    
+
     protected override pb::FieldAccess.FieldAccessorTable<CustomOptionFooRequest, CustomOptionFooRequest.Builder> InternalFieldAccessors {
       get { return global::Google.ProtocolBuffers.TestProtos.UnitTestCustomOptionsProtoFile.internal__static_protobuf_unittest_CustomOptionFooRequest__FieldAccessorTable; }
     }
-    
+
     public override bool IsInitialized {
       get {
@@ -637,10 +635,10 @@
       }
     }
-    
+
     public override void WriteTo(pb::CodedOutputStream output) {
       int size = SerializedSize;
       UnknownFields.WriteTo(output);
     }
-    
+
     private int memoizedSerializedSize = -1;
     public override int SerializedSize {
@@ -648,5 +646,5 @@
         int size = memoizedSerializedSize;
         if (size != -1) return size;
-        
+
         size = 0;
         size += UnknownFields.SerializedSize;
@@ -655,22 +653,22 @@
       }
     }
-    
+
     public static CustomOptionFooRequest ParseFrom(pb::ByteString data) {
-      return ((Builder) CreateBuilder().MergeFrom(data)).BuildParsed();
+      return ((Builder)CreateBuilder().MergeFrom(data)).BuildParsed();
     }
     public static CustomOptionFooRequest ParseFrom(pb::ByteString data, pb::ExtensionRegistry extensionRegistry) {
-      return ((Builder) CreateBuilder().MergeFrom(data, extensionRegistry)).BuildParsed();
+      return ((Builder)CreateBuilder().MergeFrom(data, extensionRegistry)).BuildParsed();
     }
     public static CustomOptionFooRequest ParseFrom(byte[] data) {
-      return ((Builder) CreateBuilder().MergeFrom(data)).BuildParsed();
+      return ((Builder)CreateBuilder().MergeFrom(data)).BuildParsed();
     }
     public static CustomOptionFooRequest ParseFrom(byte[] data, pb::ExtensionRegistry extensionRegistry) {
-      return ((Builder) CreateBuilder().MergeFrom(data, extensionRegistry)).BuildParsed();
+      return ((Builder)CreateBuilder().MergeFrom(data, extensionRegistry)).BuildParsed();
     }
     public static CustomOptionFooRequest ParseFrom(global::System.IO.Stream input) {
-      return ((Builder) CreateBuilder().MergeFrom(input)).BuildParsed();
+      return ((Builder)CreateBuilder().MergeFrom(input)).BuildParsed();
     }
     public static CustomOptionFooRequest ParseFrom(global::System.IO.Stream input, pb::ExtensionRegistry extensionRegistry) {
-      return ((Builder) CreateBuilder().MergeFrom(input, extensionRegistry)).BuildParsed();
+      return ((Builder)CreateBuilder().MergeFrom(input, extensionRegistry)).BuildParsed();
     }
     public static CustomOptionFooRequest ParseDelimitedFrom(global::System.IO.Stream input) {
@@ -681,8 +679,8 @@
     }
     public static CustomOptionFooRequest ParseFrom(pb::CodedInputStream input) {
-      return ((Builder) CreateBuilder().MergeFrom(input)).BuildParsed();
+      return ((Builder)CreateBuilder().MergeFrom(input)).BuildParsed();
     }
     public static CustomOptionFooRequest ParseFrom(pb::CodedInputStream input, pb::ExtensionRegistry extensionRegistry) {
-      return ((Builder) CreateBuilder().MergeFrom(input, extensionRegistry)).BuildParsed();
+      return ((Builder)CreateBuilder().MergeFrom(input, extensionRegistry)).BuildParsed();
     }
     public static Builder CreateBuilder() { return new Builder(); }
@@ -690,36 +688,36 @@
     public override Builder CreateBuilderForType() { return new Builder(); }
     public static Builder CreateBuilder(CustomOptionFooRequest prototype) {
-      return (Builder) new Builder().MergeFrom(prototype);
-    }
-    
+      return (Builder)new Builder().MergeFrom(prototype);
+    }
+
     public sealed partial class Builder : pb::GeneratedBuilder<CustomOptionFooRequest, Builder> {
       protected override Builder ThisBuilder {
         get { return this; }
       }
-      public Builder() {}
-      
+      public Builder() { }
+
       CustomOptionFooRequest result = new CustomOptionFooRequest();
-      
+
       protected override CustomOptionFooRequest MessageBeingBuilt {
         get { return result; }
       }
-      
+
       public override Builder Clear() {
         result = new CustomOptionFooRequest();
         return this;
       }
-      
+
       public override Builder Clone() {
         return new Builder().MergeFrom(result);
       }
-      
+
       public override pbd::MessageDescriptor DescriptorForType {
         get { return global::Google.ProtocolBuffers.TestProtos.CustomOptionFooRequest.Descriptor; }
       }
-      
+
       public override CustomOptionFooRequest DefaultInstanceForType {
         get { return global::Google.ProtocolBuffers.TestProtos.CustomOptionFooRequest.DefaultInstance; }
       }
-      
+
       public override CustomOptionFooRequest BuildPartial() {
         if (result == null) {
@@ -730,8 +728,8 @@
         return returnMe;
       }
-      
+
       public override Builder MergeFrom(pb::IMessage other) {
         if (other is CustomOptionFooRequest) {
-          return MergeFrom((CustomOptionFooRequest) other);
+          return MergeFrom((CustomOptionFooRequest)other);
         } else {
           base.MergeFrom(other);
@@ -739,5 +737,5 @@
         }
       }
-      
+
       public override Builder MergeFrom(CustomOptionFooRequest other) {
         if (other == global::Google.ProtocolBuffers.TestProtos.CustomOptionFooRequest.DefaultInstance) return this;
@@ -745,9 +743,9 @@
         return this;
       }
-      
+
       public override Builder MergeFrom(pb::CodedInputStream input) {
         return MergeFrom(input, pb::ExtensionRegistry.Empty);
       }
-      
+
       public override Builder MergeFrom(pb::CodedInputStream input, pb::ExtensionRegistry extensionRegistry) {
         pb::UnknownFieldSet.Builder unknownFields = null;
@@ -756,11 +754,4 @@
           switch (tag) {
             case 0: {
-              if (unknownFields != null) {
-                this.UnknownFields = unknownFields.Build();
-              }
-              return this;
-            }
-            default: {
-              if (pb::WireFormat.IsEndGroupTag(tag)) {
                 if (unknownFields != null) {
                   this.UnknownFields = unknownFields.Build();
@@ -768,14 +759,21 @@
                 return this;
               }
-              if (unknownFields == null) {
-                unknownFields = pb::UnknownFieldSet.CreateBuilder(this.UnknownFields);
+            default: {
+                if (pb::WireFormat.IsEndGroupTag(tag)) {
+                  if (unknownFields != null) {
+                    this.UnknownFields = unknownFields.Build();
+                  }
+                  return this;
+                }
+                if (unknownFields == null) {
+                  unknownFields = pb::UnknownFieldSet.CreateBuilder(this.UnknownFields);
+                }
+                ParseUnknownField(input, unknownFields, extensionRegistry, tag);
+                break;
               }
-              ParseUnknownField(input, unknownFields, extensionRegistry, tag);
-              break;
-            }
-          }
-        }
-      }
-      
+          }
+        }
+      }
+
     }
     static CustomOptionFooRequest() {
@@ -783,5 +781,5 @@
     }
   }
-  
+
   public sealed partial class CustomOptionFooResponse : pb::GeneratedMessage<CustomOptionFooResponse, CustomOptionFooResponse.Builder> {
     private static readonly CustomOptionFooResponse defaultInstance = new Builder().BuildPartial();
@@ -789,21 +787,21 @@
       get { return defaultInstance; }
     }
-    
+
     public override CustomOptionFooResponse DefaultInstanceForType {
       get { return defaultInstance; }
     }
-    
+
     protected override CustomOptionFooResponse ThisMessage {
       get { return this; }
     }
-    
+
     public static pbd::MessageDescriptor Descriptor {
       get { return global::Google.ProtocolBuffers.TestProtos.UnitTestCustomOptionsProtoFile.internal__static_protobuf_unittest_CustomOptionFooResponse__Descriptor; }
     }
-    
+
     protected override pb::FieldAccess.FieldAccessorTable<CustomOptionFooResponse, CustomOptionFooResponse.Builder> InternalFieldAccessors {
       get { return global::Google.ProtocolBuffers.TestProtos.UnitTestCustomOptionsProtoFile.internal__static_protobuf_unittest_CustomOptionFooResponse__FieldAccessorTable; }
     }
-    
+
     public override bool IsInitialized {
       get {
@@ -811,10 +809,10 @@
       }
     }
-    
+
     public override void WriteTo(pb::CodedOutputStream output) {
       int size = SerializedSize;
       UnknownFields.WriteTo(output);
     }
-    
+
     private int memoizedSerializedSize = -1;
     public override int SerializedSize {
@@ -822,5 +820,5 @@
         int size = memoizedSerializedSize;
         if (size != -1) return size;
-        
+
         size = 0;
         size += UnknownFields.SerializedSize;
@@ -829,22 +827,22 @@
       }
     }
-    
+
     public static CustomOptionFooResponse ParseFrom(pb::ByteString data) {
-      return ((Builder) CreateBuilder().MergeFrom(data)).BuildParsed();
+      return ((Builder)CreateBuilder().MergeFrom(data)).BuildParsed();
     }
     public static CustomOptionFooResponse ParseFrom(pb::ByteString data, pb::ExtensionRegistry extensionRegistry) {
-      return ((Builder) CreateBuilder().MergeFrom(data, extensionRegistry)).BuildParsed();
+      return ((Builder)CreateBuilder().MergeFrom(data, extensionRegistry)).BuildParsed();
     }
     public static CustomOptionFooResponse ParseFrom(byte[] data) {
-      return ((Builder) CreateBuilder().MergeFrom(data)).BuildParsed();
+      return ((Builder)CreateBuilder().MergeFrom(data)).BuildParsed();
     }
     public static CustomOptionFooResponse ParseFrom(byte[] data, pb::ExtensionRegistry extensionRegistry) {
-      return ((Builder) CreateBuilder().MergeFrom(data, extensionRegistry)).BuildParsed();
+      return ((Builder)CreateBuilder().MergeFrom(data, extensionRegistry)).BuildParsed();
     }
     public static CustomOptionFooResponse ParseFrom(global::System.IO.Stream input) {
-      return ((Builder) CreateBuilder().MergeFrom(input)).BuildParsed();
+      return ((Builder)CreateBuilder().MergeFrom(input)).BuildParsed();
     }
     public static CustomOptionFooResponse ParseFrom(global::System.IO.Stream input, pb::ExtensionRegistry extensionRegistry) {
-      return ((Builder) CreateBuilder().MergeFrom(input, extensionRegistry)).BuildParsed();
+      return ((Builder)CreateBuilder().MergeFrom(input, extensionRegistry)).BuildParsed();
     }
     public static CustomOptionFooResponse ParseDelimitedFrom(global::System.IO.Stream input) {
@@ -855,8 +853,8 @@
     }
     public static CustomOptionFooResponse ParseFrom(pb::CodedInputStream input) {
-      return ((Builder) CreateBuilder().MergeFrom(input)).BuildParsed();
+      return ((Builder)CreateBuilder().MergeFrom(input)).BuildParsed();
     }
     public static CustomOptionFooResponse ParseFrom(pb::CodedInputStream input, pb::ExtensionRegistry extensionRegistry) {
-      return ((Builder) CreateBuilder().MergeFrom(input, extensionRegistry)).BuildParsed();
+      return ((Builder)CreateBuilder().MergeFrom(input, extensionRegistry)).BuildParsed();
     }
     public static Builder CreateBuilder() { return new Builder(); }
@@ -864,36 +862,36 @@
     public override Builder CreateBuilderForType() { return new Builder(); }
     public static Builder CreateBuilder(CustomOptionFooResponse prototype) {
-      return (Builder) new Builder().MergeFrom(prototype);
-    }
-    
+      return (Builder)new Builder().MergeFrom(prototype);
+    }
+
     public sealed partial class Builder : pb::GeneratedBuilder<CustomOptionFooResponse, Builder> {
       protected override Builder ThisBuilder {
         get { return this; }
       }
-      public Builder() {}
-      
+      public Builder() { }
+
       CustomOptionFooResponse result = new CustomOptionFooResponse();
-      
+
       protected override CustomOptionFooResponse MessageBeingBuilt {
         get { return result; }
       }
-      
+
       public override Builder Clear() {
         result = new CustomOptionFooResponse();
         return this;
       }
-      
+
       public override Builder Clone() {
         return new Builder().MergeFrom(result);
       }
-      
+
       public override pbd::MessageDescriptor DescriptorForType {
         get { return global::Google.ProtocolBuffers.TestProtos.CustomOptionFooResponse.Descriptor; }
       }
-      
+
       public override CustomOptionFooResponse DefaultInstanceForType {
         get { return global::Google.ProtocolBuffers.TestProtos.CustomOptionFooResponse.DefaultInstance; }
       }
-      
+
       public override CustomOptionFooResponse BuildPartial() {
         if (result == null) {
@@ -904,8 +902,8 @@
         return returnMe;
       }
-      
+
       public override Builder MergeFrom(pb::IMessage other) {
         if (other is CustomOptionFooResponse) {
-          return MergeFrom((CustomOptionFooResponse) other);
+          return MergeFrom((CustomOptionFooResponse)other);
         } else {
           base.MergeFrom(other);
@@ -913,5 +911,5 @@
         }
       }
-      
+
       public override Builder MergeFrom(CustomOptionFooResponse other) {
         if (other == global::Google.ProtocolBuffers.TestProtos.CustomOptionFooResponse.DefaultInstance) return this;
@@ -919,9 +917,9 @@
         return this;
       }
-      
+
       public override Builder MergeFrom(pb::CodedInputStream input) {
         return MergeFrom(input, pb::ExtensionRegistry.Empty);
       }
-      
+
       public override Builder MergeFrom(pb::CodedInputStream input, pb::ExtensionRegistry extensionRegistry) {
         pb::UnknownFieldSet.Builder unknownFields = null;
@@ -930,11 +928,4 @@
           switch (tag) {
             case 0: {
-              if (unknownFields != null) {
-                this.UnknownFields = unknownFields.Build();
-              }
-              return this;
-            }
-            default: {
-              if (pb::WireFormat.IsEndGroupTag(tag)) {
                 if (unknownFields != null) {
                   this.UnknownFields = unknownFields.Build();
@@ -942,14 +933,21 @@
                 return this;
               }
-              if (unknownFields == null) {
-                unknownFields = pb::UnknownFieldSet.CreateBuilder(this.UnknownFields);
+            default: {
+                if (pb::WireFormat.IsEndGroupTag(tag)) {
+                  if (unknownFields != null) {
+                    this.UnknownFields = unknownFields.Build();
+                  }
+                  return this;
+                }
+                if (unknownFields == null) {
+                  unknownFields = pb::UnknownFieldSet.CreateBuilder(this.UnknownFields);
+                }
+                ParseUnknownField(input, unknownFields, extensionRegistry, tag);
+                break;
               }
-              ParseUnknownField(input, unknownFields, extensionRegistry, tag);
-              break;
-            }
-          }
-        }
-      }
-      
+          }
+        }
+      }
+
     }
     static CustomOptionFooResponse() {
@@ -957,5 +955,5 @@
     }
   }
-  
+
   public sealed partial class DummyMessageContainingEnum : pb::GeneratedMessage<DummyMessageContainingEnum, DummyMessageContainingEnum.Builder> {
     private static readonly DummyMessageContainingEnum defaultInstance = new Builder().BuildPartial();
@@ -963,21 +961,21 @@
       get { return defaultInstance; }
     }
-    
+
     public override DummyMessageContainingEnum DefaultInstanceForType {
       get { return defaultInstance; }
     }
-    
+
     protected override DummyMessageContainingEnum ThisMessage {
       get { return this; }
     }
-    
+
     public static pbd::MessageDescriptor Descriptor {
       get { return global::Google.ProtocolBuffers.TestProtos.UnitTestCustomOptionsProtoFile.internal__static_protobuf_unittest_DummyMessageContainingEnum__Descriptor; }
     }
-    
+
     protected override pb::FieldAccess.FieldAccessorTable<DummyMessageContainingEnum, DummyMessageContainingEnum.Builder> InternalFieldAccessors {
       get { return global::Google.ProtocolBuffers.TestProtos.UnitTestCustomOptionsProtoFile.internal__static_protobuf_unittest_DummyMessageContainingEnum__FieldAccessorTable; }
     }
-    
+
     #region Nested types
     public static class Types {
@@ -986,8 +984,8 @@
         TEST_OPTION_ENUM_TYPE2 = -23,
       }
-      
+
     }
     #endregion
-    
+
     public override bool IsInitialized {
       get {
@@ -995,10 +993,10 @@
       }
     }
-    
+
     public override void WriteTo(pb::CodedOutputStream output) {
       int size = SerializedSize;
       UnknownFields.WriteTo(output);
     }
-    
+
     private int memoizedSerializedSize = -1;
     public override int SerializedSize {
@@ -1006,5 +1004,5 @@
         int size = memoizedSerializedSize;
         if (size != -1) return size;
-        
+
         size = 0;
         size += UnknownFields.SerializedSize;
@@ -1013,22 +1011,22 @@
       }
     }
-    
+
     public static DummyMessageContainingEnum ParseFrom(pb::ByteString data) {
-      return ((Builder) CreateBuilder().MergeFrom(data)).BuildParsed();
+      return ((Builder)CreateBuilder().MergeFrom(data)).BuildParsed();
     }
     public static DummyMessageContainingEnum ParseFrom(pb::ByteString data, pb::ExtensionRegistry extensionRegistry) {
-      return ((Builder) CreateBuilder().MergeFrom(data, extensionRegistry)).BuildParsed();
+      return ((Builder)CreateBuilder().MergeFrom(data, extensionRegistry)).BuildParsed();
     }
     public static DummyMessageContainingEnum ParseFrom(byte[] data) {
-      return ((Builder) CreateBuilder().MergeFrom(data)).BuildParsed();
+      return ((Builder)CreateBuilder().MergeFrom(data)).BuildParsed();
     }
     public static DummyMessageContainingEnum ParseFrom(byte[] data, pb::ExtensionRegistry extensionRegistry) {
-      return ((Builder) CreateBuilder().MergeFrom(data, extensionRegistry)).BuildParsed();
+      return ((Builder)CreateBuilder().MergeFrom(data, extensionRegistry)).BuildParsed();
     }
     public static DummyMessageContainingEnum ParseFrom(global::System.IO.Stream input) {
-      return ((Builder) CreateBuilder().MergeFrom(input)).BuildParsed();
+      return ((Builder)CreateBuilder().MergeFrom(input)).BuildParsed();
     }
     public static DummyMessageContainingEnum ParseFrom(global::System.IO.Stream input, pb::ExtensionRegistry extensionRegistry) {
-      return ((Builder) CreateBuilder().MergeFrom(input, extensionRegistry)).BuildParsed();
+      return ((Builder)CreateBuilder().MergeFrom(input, extensionRegistry)).BuildParsed();
     }
     public static DummyMessageContainingEnum ParseDelimitedFrom(global::System.IO.Stream input) {
@@ -1039,8 +1037,8 @@
     }
     public static DummyMessageContainingEnum ParseFrom(pb::CodedInputStream input) {
-      return ((Builder) CreateBuilder().MergeFrom(input)).BuildParsed();
+      return ((Builder)CreateBuilder().MergeFrom(input)).BuildParsed();
     }
     public static DummyMessageContainingEnum ParseFrom(pb::CodedInputStream input, pb::ExtensionRegistry extensionRegistry) {
-      return ((Builder) CreateBuilder().MergeFrom(input, extensionRegistry)).BuildParsed();
+      return ((Builder)CreateBuilder().MergeFrom(input, extensionRegistry)).BuildParsed();
     }
     public static Builder CreateBuilder() { return new Builder(); }
@@ -1048,36 +1046,36 @@
     public override Builder CreateBuilderForType() { return new Builder(); }
     public static Builder CreateBuilder(DummyMessageContainingEnum prototype) {
-      return (Builder) new Builder().MergeFrom(prototype);
-    }
-    
+      return (Builder)new Builder().MergeFrom(prototype);
+    }
+
     public sealed partial class Builder : pb::GeneratedBuilder<DummyMessageContainingEnum, Builder> {
       protected override Builder ThisBuilder {
         get { return this; }
       }
-      public Builder() {}
-      
+      public Builder() { }
+
       DummyMessageContainingEnum result = new DummyMessageContainingEnum();
-      
+
       protected override DummyMessageContainingEnum MessageBeingBuilt {
         get { return result; }
       }
-      
+
       public override Builder Clear() {
         result = new DummyMessageContainingEnum();
         return this;
       }
-      
+
       public override Builder Clone() {
         return new Builder().MergeFrom(result);
       }
-      
+
       public override pbd::MessageDescriptor DescriptorForType {
         get { return global::Google.ProtocolBuffers.TestProtos.DummyMessageContainingEnum.Descriptor; }
       }
-      
+
       public override DummyMessageContainingEnum DefaultInstanceForType {
         get { return global::Google.ProtocolBuffers.TestProtos.DummyMessageContainingEnum.DefaultInstance; }
       }
-      
+
       public override DummyMessageContainingEnum BuildPartial() {
         if (result == null) {
@@ -1088,8 +1086,8 @@
         return returnMe;
       }
-      
+
       public override Builder MergeFrom(pb::IMessage other) {
         if (other is DummyMessageContainingEnum) {
-          return MergeFrom((DummyMessageContainingEnum) other);
+          return MergeFrom((DummyMessageContainingEnum)other);
         } else {
           base.MergeFrom(other);
@@ -1097,5 +1095,5 @@
         }
       }
-      
+
       public override Builder MergeFrom(DummyMessageContainingEnum other) {
         if (other == global::Google.ProtocolBuffers.TestProtos.DummyMessageContainingEnum.DefaultInstance) return this;
@@ -1103,9 +1101,9 @@
         return this;
       }
-      
+
       public override Builder MergeFrom(pb::CodedInputStream input) {
         return MergeFrom(input, pb::ExtensionRegistry.Empty);
       }
-      
+
       public override Builder MergeFrom(pb::CodedInputStream input, pb::ExtensionRegistry extensionRegistry) {
         pb::UnknownFieldSet.Builder unknownFields = null;
@@ -1114,11 +1112,4 @@
           switch (tag) {
             case 0: {
-              if (unknownFields != null) {
-                this.UnknownFields = unknownFields.Build();
-              }
-              return this;
-            }
-            default: {
-              if (pb::WireFormat.IsEndGroupTag(tag)) {
                 if (unknownFields != null) {
                   this.UnknownFields = unknownFields.Build();
@@ -1126,14 +1117,21 @@
                 return this;
               }
-              if (unknownFields == null) {
-                unknownFields = pb::UnknownFieldSet.CreateBuilder(this.UnknownFields);
+            default: {
+                if (pb::WireFormat.IsEndGroupTag(tag)) {
+                  if (unknownFields != null) {
+                    this.UnknownFields = unknownFields.Build();
+                  }
+                  return this;
+                }
+                if (unknownFields == null) {
+                  unknownFields = pb::UnknownFieldSet.CreateBuilder(this.UnknownFields);
+                }
+                ParseUnknownField(input, unknownFields, extensionRegistry, tag);
+                break;
               }
-              ParseUnknownField(input, unknownFields, extensionRegistry, tag);
-              break;
-            }
-          }
-        }
-      }
-      
+          }
+        }
+      }
+
     }
     static DummyMessageContainingEnum() {
@@ -1141,5 +1139,5 @@
     }
   }
-  
+
   public sealed partial class DummyMessageInvalidAsOptionType : pb::GeneratedMessage<DummyMessageInvalidAsOptionType, DummyMessageInvalidAsOptionType.Builder> {
     private static readonly DummyMessageInvalidAsOptionType defaultInstance = new Builder().BuildPartial();
@@ -1147,21 +1145,21 @@
       get { return defaultInstance; }
     }
-    
+
     public override DummyMessageInvalidAsOptionType DefaultInstanceForType {
       get { return defaultInstance; }
     }
-    
+
     protected override DummyMessageInvalidAsOptionType ThisMessage {
       get { return this; }
     }
-    
+
     public static pbd::MessageDescriptor Descriptor {
       get { return global::Google.ProtocolBuffers.TestProtos.UnitTestCustomOptionsProtoFile.internal__static_protobuf_unittest_DummyMessageInvalidAsOptionType__Descriptor; }
     }
-    
+
     protected override pb::FieldAccess.FieldAccessorTable<DummyMessageInvalidAsOptionType, DummyMessageInvalidAsOptionType.Builder> InternalFieldAccessors {
       get { return global::Google.ProtocolBuffers.TestProtos.UnitTestCustomOptionsProtoFile.internal__static_protobuf_unittest_DummyMessageInvalidAsOptionType__FieldAccessorTable; }
     }
-    
+
     public override bool IsInitialized {
       get {
@@ -1169,10 +1167,10 @@
       }
     }
-    
+
     public override void WriteTo(pb::CodedOutputStream output) {
       int size = SerializedSize;
       UnknownFields.WriteTo(output);
     }
-    
+
     private int memoizedSerializedSize = -1;
     public override int SerializedSize {
@@ -1180,5 +1178,5 @@
         int size = memoizedSerializedSize;
         if (size != -1) return size;
-        
+
         size = 0;
         size += UnknownFields.SerializedSize;
@@ -1187,22 +1185,22 @@
       }
     }
-    
+
     public static DummyMessageInvalidAsOptionType ParseFrom(pb::ByteString data) {
-      return ((Builder) CreateBuilder().MergeFrom(data)).BuildParsed();
+      return ((Builder)CreateBuilder().MergeFrom(data)).BuildParsed();
     }
     public static DummyMessageInvalidAsOptionType ParseFrom(pb::ByteString data, pb::ExtensionRegistry extensionRegistry) {
-      return ((Builder) CreateBuilder().MergeFrom(data, extensionRegistry)).BuildParsed();
+      return ((Builder)CreateBuilder().MergeFrom(data, extensionRegistry)).BuildParsed();
     }
     public static DummyMessageInvalidAsOptionType ParseFrom(byte[] data) {
-      return ((Builder) CreateBuilder().MergeFrom(data)).BuildParsed();
+      return ((Builder)CreateBuilder().MergeFrom(data)).BuildParsed();
     }
     public static DummyMessageInvalidAsOptionType ParseFrom(byte[] data, pb::ExtensionRegistry extensionRegistry) {
-      return ((Builder) CreateBuilder().MergeFrom(data, extensionRegistry)).BuildParsed();
+      return ((Builder)CreateBuilder().MergeFrom(data, extensionRegistry)).BuildParsed();
     }
     public static DummyMessageInvalidAsOptionType ParseFrom(global::System.IO.Stream input) {
-      return ((Builder) CreateBuilder().MergeFrom(input)).BuildParsed();
+      return ((Builder)CreateBuilder().MergeFrom(input)).BuildParsed();
     }
     public static DummyMessageInvalidAsOptionType ParseFrom(global::System.IO.Stream input, pb::ExtensionRegistry extensionRegistry) {
-      return ((Builder) CreateBuilder().MergeFrom(input, extensionRegistry)).BuildParsed();
+      return ((Builder)CreateBuilder().MergeFrom(input, extensionRegistry)).BuildParsed();
     }
     public static DummyMessageInvalidAsOptionType ParseDelimitedFrom(global::System.IO.Stream input) {
@@ -1213,8 +1211,8 @@
     }
     public static DummyMessageInvalidAsOptionType ParseFrom(pb::CodedInputStream input) {
-      return ((Builder) CreateBuilder().MergeFrom(input)).BuildParsed();
+      return ((Builder)CreateBuilder().MergeFrom(input)).BuildParsed();
     }
     public static DummyMessageInvalidAsOptionType ParseFrom(pb::CodedInputStream input, pb::ExtensionRegistry extensionRegistry) {
-      return ((Builder) CreateBuilder().MergeFrom(input, extensionRegistry)).BuildParsed();
+      return ((Builder)CreateBuilder().MergeFrom(input, extensionRegistry)).BuildParsed();
     }
     public static Builder CreateBuilder() { return new Builder(); }
@@ -1222,36 +1220,36 @@
     public override Builder CreateBuilderForType() { return new Builder(); }
     public static Builder CreateBuilder(DummyMessageInvalidAsOptionType prototype) {
-      return (Builder) new Builder().MergeFrom(prototype);
-    }
-    
+      return (Builder)new Builder().MergeFrom(prototype);
+    }
+
     public sealed partial class Builder : pb::GeneratedBuilder<DummyMessageInvalidAsOptionType, Builder> {
       protected override Builder ThisBuilder {
         get { return this; }
       }
-      public Builder() {}
-      
+      public Builder() { }
+
       DummyMessageInvalidAsOptionType result = new DummyMessageInvalidAsOptionType();
-      
+
       protected override DummyMessageInvalidAsOptionType MessageBeingBuilt {
         get { return result; }
       }
-      
+
       public override Builder Clear() {
         result = new DummyMessageInvalidAsOptionType();
         return this;
       }
-      
+
       public override Builder Clone() {
         return new Builder().MergeFrom(result);
       }
-      
+
       public override pbd::MessageDescriptor DescriptorForType {
         get { return global::Google.ProtocolBuffers.TestProtos.DummyMessageInvalidAsOptionType.Descriptor; }
       }
-      
+
       public override DummyMessageInvalidAsOptionType DefaultInstanceForType {
         get { return global::Google.ProtocolBuffers.TestProtos.DummyMessageInvalidAsOptionType.DefaultInstance; }
       }
-      
+
       public override DummyMessageInvalidAsOptionType BuildPartial() {
         if (result == null) {
@@ -1262,8 +1260,8 @@
         return returnMe;
       }
-      
+
       public override Builder MergeFrom(pb::IMessage other) {
         if (other is DummyMessageInvalidAsOptionType) {
-          return MergeFrom((DummyMessageInvalidAsOptionType) other);
+          return MergeFrom((DummyMessageInvalidAsOptionType)other);
         } else {
           base.MergeFrom(other);
@@ -1271,5 +1269,5 @@
         }
       }
-      
+
       public override Builder MergeFrom(DummyMessageInvalidAsOptionType other) {
         if (other == global::Google.ProtocolBuffers.TestProtos.DummyMessageInvalidAsOptionType.DefaultInstance) return this;
@@ -1277,9 +1275,9 @@
         return this;
       }
-      
+
       public override Builder MergeFrom(pb::CodedInputStream input) {
         return MergeFrom(input, pb::ExtensionRegistry.Empty);
       }
-      
+
       public override Builder MergeFrom(pb::CodedInputStream input, pb::ExtensionRegistry extensionRegistry) {
         pb::UnknownFieldSet.Builder unknownFields = null;
@@ -1288,11 +1286,4 @@
           switch (tag) {
             case 0: {
-              if (unknownFields != null) {
-                this.UnknownFields = unknownFields.Build();
-              }
-              return this;
-            }
-            default: {
-              if (pb::WireFormat.IsEndGroupTag(tag)) {
                 if (unknownFields != null) {
                   this.UnknownFields = unknownFields.Build();
@@ -1300,14 +1291,21 @@
                 return this;
               }
-              if (unknownFields == null) {
-                unknownFields = pb::UnknownFieldSet.CreateBuilder(this.UnknownFields);
+            default: {
+                if (pb::WireFormat.IsEndGroupTag(tag)) {
+                  if (unknownFields != null) {
+                    this.UnknownFields = unknownFields.Build();
+                  }
+                  return this;
+                }
+                if (unknownFields == null) {
+                  unknownFields = pb::UnknownFieldSet.CreateBuilder(this.UnknownFields);
+                }
+                ParseUnknownField(input, unknownFields, extensionRegistry, tag);
+                break;
               }
-              ParseUnknownField(input, unknownFields, extensionRegistry, tag);
-              break;
-            }
-          }
-        }
-      }
-      
+          }
+        }
+      }
+
     }
     static DummyMessageInvalidAsOptionType() {
@@ -1315,5 +1313,5 @@
     }
   }
-  
+
   public sealed partial class CustomOptionMinIntegerValues : pb::GeneratedMessage<CustomOptionMinIntegerValues, CustomOptionMinIntegerValues.Builder> {
     private static readonly CustomOptionMinIntegerValues defaultInstance = new Builder().BuildPartial();
@@ -1321,21 +1319,21 @@
       get { return defaultInstance; }
     }
-    
+
     public override CustomOptionMinIntegerValues DefaultInstanceForType {
       get { return defaultInstance; }
     }
-    
+
     protected override CustomOptionMinIntegerValues ThisMessage {
       get { return this; }
     }
-    
+
     public static pbd::MessageDescriptor Descriptor {
       get { return global::Google.ProtocolBuffers.TestProtos.UnitTestCustomOptionsProtoFile.internal__static_protobuf_unittest_CustomOptionMinIntegerValues__Descriptor; }
     }
-    
+
     protected override pb::FieldAccess.FieldAccessorTable<CustomOptionMinIntegerValues, CustomOptionMinIntegerValues.Builder> InternalFieldAccessors {
       get { return global::Google.ProtocolBuffers.TestProtos.UnitTestCustomOptionsProtoFile.internal__static_protobuf_unittest_CustomOptionMinIntegerValues__FieldAccessorTable; }
     }
-    
+
     public override bool IsInitialized {
       get {
@@ -1343,10 +1341,10 @@
       }
     }
-    
+
     public override void WriteTo(pb::CodedOutputStream output) {
       int size = SerializedSize;
       UnknownFields.WriteTo(output);
     }
-    
+
     private int memoizedSerializedSize = -1;
     public override int SerializedSize {
@@ -1354,5 +1352,5 @@
         int size = memoizedSerializedSize;
         if (size != -1) return size;
-        
+
         size = 0;
         size += UnknownFields.SerializedSize;
@@ -1361,22 +1359,22 @@
       }
     }
-    
+
     public static CustomOptionMinIntegerValues ParseFrom(pb::ByteString data) {
-      return ((Builder) CreateBuilder().MergeFrom(data)).BuildParsed();
+      return ((Builder)CreateBuilder().MergeFrom(data)).BuildParsed();
     }
     public static CustomOptionMinIntegerValues ParseFrom(pb::ByteString data, pb::ExtensionRegistry extensionRegistry) {
-      return ((Builder) CreateBuilder().MergeFrom(data, extensionRegistry)).BuildParsed();
+      return ((Builder)CreateBuilder().MergeFrom(data, extensionRegistry)).BuildParsed();
     }
     public static CustomOptionMinIntegerValues ParseFrom(byte[] data) {
-      return ((Builder) CreateBuilder().MergeFrom(data)).BuildParsed();
+      return ((Builder)CreateBuilder().MergeFrom(data)).BuildParsed();
     }
     public static CustomOptionMinIntegerValues ParseFrom(byte[] data, pb::ExtensionRegistry extensionRegistry) {
-      return ((Builder) CreateBuilder().MergeFrom(data, extensionRegistry)).BuildParsed();
+      return ((Builder)CreateBuilder().MergeFrom(data, extensionRegistry)).BuildParsed();
     }
     public static CustomOptionMinIntegerValues ParseFrom(global::System.IO.Stream input) {
-      return ((Builder) CreateBuilder().MergeFrom(input)).BuildParsed();
+      return ((Builder)CreateBuilder().MergeFrom(input)).BuildParsed();
     }
     public static CustomOptionMinIntegerValues ParseFrom(global::System.IO.Stream input, pb::ExtensionRegistry extensionRegistry) {
-      return ((Builder) CreateBuilder().MergeFrom(input, extensionRegistry)).BuildParsed();
+      return ((Builder)CreateBuilder().MergeFrom(input, extensionRegistry)).BuildParsed();
     }
     public static CustomOptionMinIntegerValues ParseDelimitedFrom(global::System.IO.Stream input) {
@@ -1387,8 +1385,8 @@
     }
     public static CustomOptionMinIntegerValues ParseFrom(pb::CodedInputStream input) {
-      return ((Builder) CreateBuilder().MergeFrom(input)).BuildParsed();
+      return ((Builder)CreateBuilder().MergeFrom(input)).BuildParsed();
     }
     public static CustomOptionMinIntegerValues ParseFrom(pb::CodedInputStream input, pb::ExtensionRegistry extensionRegistry) {
-      return ((Builder) CreateBuilder().MergeFrom(input, extensionRegistry)).BuildParsed();
+      return ((Builder)CreateBuilder().MergeFrom(input, extensionRegistry)).BuildParsed();
     }
     public static Builder CreateBuilder() { return new Builder(); }
@@ -1396,36 +1394,36 @@
     public override Builder CreateBuilderForType() { return new Builder(); }
     public static Builder CreateBuilder(CustomOptionMinIntegerValues prototype) {
-      return (Builder) new Builder().MergeFrom(prototype);
-    }
-    
+      return (Builder)new Builder().MergeFrom(prototype);
+    }
+
     public sealed partial class Builder : pb::GeneratedBuilder<CustomOptionMinIntegerValues, Builder> {
       protected override Builder ThisBuilder {
         get { return this; }
       }
-      public Builder() {}
-      
+      public Builder() { }
+
       CustomOptionMinIntegerValues result = new CustomOptionMinIntegerValues();
-      
+
       protected override CustomOptionMinIntegerValues MessageBeingBuilt {
         get { return result; }
       }
-      
+
       public override Builder Clear() {
         result = new CustomOptionMinIntegerValues();
         return this;
       }
-      
+
       public override Builder Clone() {
         return new Builder().MergeFrom(result);
       }
-      
+
       public override pbd::MessageDescriptor DescriptorForType {
         get { return global::Google.ProtocolBuffers.TestProtos.CustomOptionMinIntegerValues.Descriptor; }
       }
-      
+
       public override CustomOptionMinIntegerValues DefaultInstanceForType {
         get { return global::Google.ProtocolBuffers.TestProtos.CustomOptionMinIntegerValues.DefaultInstance; }
       }
-      
+
       public override CustomOptionMinIntegerValues BuildPartial() {
         if (result == null) {
@@ -1436,8 +1434,8 @@
         return returnMe;
       }
-      
+
       public override Builder MergeFrom(pb::IMessage other) {
         if (other is CustomOptionMinIntegerValues) {
-          return MergeFrom((CustomOptionMinIntegerValues) other);
+          return MergeFrom((CustomOptionMinIntegerValues)other);
         } else {
           base.MergeFrom(other);
@@ -1445,5 +1443,5 @@
         }
       }
-      
+
       public override Builder MergeFrom(CustomOptionMinIntegerValues other) {
         if (other == global::Google.ProtocolBuffers.TestProtos.CustomOptionMinIntegerValues.DefaultInstance) return this;
@@ -1451,9 +1449,9 @@
         return this;
       }
-      
+
       public override Builder MergeFrom(pb::CodedInputStream input) {
         return MergeFrom(input, pb::ExtensionRegistry.Empty);
       }
-      
+
       public override Builder MergeFrom(pb::CodedInputStream input, pb::ExtensionRegistry extensionRegistry) {
         pb::UnknownFieldSet.Builder unknownFields = null;
@@ -1462,11 +1460,4 @@
           switch (tag) {
             case 0: {
-              if (unknownFields != null) {
-                this.UnknownFields = unknownFields.Build();
-              }
-              return this;
-            }
-            default: {
-              if (pb::WireFormat.IsEndGroupTag(tag)) {
                 if (unknownFields != null) {
                   this.UnknownFields = unknownFields.Build();
@@ -1474,14 +1465,21 @@
                 return this;
               }
-              if (unknownFields == null) {
-                unknownFields = pb::UnknownFieldSet.CreateBuilder(this.UnknownFields);
+            default: {
+                if (pb::WireFormat.IsEndGroupTag(tag)) {
+                  if (unknownFields != null) {
+                    this.UnknownFields = unknownFields.Build();
+                  }
+                  return this;
+                }
+                if (unknownFields == null) {
+                  unknownFields = pb::UnknownFieldSet.CreateBuilder(this.UnknownFields);
+                }
+                ParseUnknownField(input, unknownFields, extensionRegistry, tag);
+                break;
               }
-              ParseUnknownField(input, unknownFields, extensionRegistry, tag);
-              break;
-            }
-          }
-        }
-      }
-      
+          }
+        }
+      }
+
     }
     static CustomOptionMinIntegerValues() {
@@ -1489,5 +1487,5 @@
     }
   }
-  
+
   public sealed partial class CustomOptionMaxIntegerValues : pb::GeneratedMessage<CustomOptionMaxIntegerValues, CustomOptionMaxIntegerValues.Builder> {
     private static readonly CustomOptionMaxIntegerValues defaultInstance = new Builder().BuildPartial();
@@ -1495,21 +1493,21 @@
       get { return defaultInstance; }
     }
-    
+
     public override CustomOptionMaxIntegerValues DefaultInstanceForType {
       get { return defaultInstance; }
     }
-    
+
     protected override CustomOptionMaxIntegerValues ThisMessage {
       get { return this; }
     }
-    
+
     public static pbd::MessageDescriptor Descriptor {
       get { return global::Google.ProtocolBuffers.TestProtos.UnitTestCustomOptionsProtoFile.internal__static_protobuf_unittest_CustomOptionMaxIntegerValues__Descriptor; }
     }
-    
+
     protected override pb::FieldAccess.FieldAccessorTable<CustomOptionMaxIntegerValues, CustomOptionMaxIntegerValues.Builder> InternalFieldAccessors {
       get { return global::Google.ProtocolBuffers.TestProtos.UnitTestCustomOptionsProtoFile.internal__static_protobuf_unittest_CustomOptionMaxIntegerValues__FieldAccessorTable; }
     }
-    
+
     public override bool IsInitialized {
       get {
@@ -1517,10 +1515,10 @@
       }
     }
-    
+
     public override void WriteTo(pb::CodedOutputStream output) {
       int size = SerializedSize;
       UnknownFields.WriteTo(output);
     }
-    
+
     private int memoizedSerializedSize = -1;
     public override int SerializedSize {
@@ -1528,5 +1526,5 @@
         int size = memoizedSerializedSize;
         if (size != -1) return size;
-        
+
         size = 0;
         size += UnknownFields.SerializedSize;
@@ -1535,22 +1533,22 @@
       }
     }
-    
+
     public static CustomOptionMaxIntegerValues ParseFrom(pb::ByteString data) {
-      return ((Builder) CreateBuilder().MergeFrom(data)).BuildParsed();
+      return ((Builder)CreateBuilder().MergeFrom(data)).BuildParsed();
     }
     public static CustomOptionMaxIntegerValues ParseFrom(pb::ByteString data, pb::ExtensionRegistry extensionRegistry) {
-      return ((Builder) CreateBuilder().MergeFrom(data, extensionRegistry)).BuildParsed();
+      return ((Builder)CreateBuilder().MergeFrom(data, extensionRegistry)).BuildParsed();
     }
     public static CustomOptionMaxIntegerValues ParseFrom(byte[] data) {
-      return ((Builder) CreateBuilder().MergeFrom(data)).BuildParsed();
+      return ((Builder)CreateBuilder().MergeFrom(data)).BuildParsed();
     }
     public static CustomOptionMaxIntegerValues ParseFrom(byte[] data, pb::ExtensionRegistry extensionRegistry) {
-      return ((Builder) CreateBuilder().MergeFrom(data, extensionRegistry)).BuildParsed();
+      return ((Builder)CreateBuilder().MergeFrom(data, extensionRegistry)).BuildParsed();
     }
     public static CustomOptionMaxIntegerValues ParseFrom(global::System.IO.Stream input) {
-      return ((Builder) CreateBuilder().MergeFrom(input)).BuildParsed();
+      return ((Builder)CreateBuilder().MergeFrom(input)).BuildParsed();
     }
     public static CustomOptionMaxIntegerValues ParseFrom(global::System.IO.Stream input, pb::ExtensionRegistry extensionRegistry) {
-      return ((Builder) CreateBuilder().MergeFrom(input, extensionRegistry)).BuildParsed();
+      return ((Builder)CreateBuilder().MergeFrom(input, extensionRegistry)).BuildParsed();
     }
     public static CustomOptionMaxIntegerValues ParseDelimitedFrom(global::System.IO.Stream input) {
@@ -1561,8 +1559,8 @@
     }
     public static CustomOptionMaxIntegerValues ParseFrom(pb::CodedInputStream input) {
-      return ((Builder) CreateBuilder().MergeFrom(input)).BuildParsed();
+      return ((Builder)CreateBuilder().MergeFrom(input)).BuildParsed();
     }
     public static CustomOptionMaxIntegerValues ParseFrom(pb::CodedInputStream input, pb::ExtensionRegistry extensionRegistry) {
-      return ((Builder) CreateBuilder().MergeFrom(input, extensionRegistry)).BuildParsed();
+      return ((Builder)CreateBuilder().MergeFrom(input, extensionRegistry)).BuildParsed();
     }
     public static Builder CreateBuilder() { return new Builder(); }
@@ -1570,36 +1568,36 @@
     public override Builder CreateBuilderForType() { return new Builder(); }
     public static Builder CreateBuilder(CustomOptionMaxIntegerValues prototype) {
-      return (Builder) new Builder().MergeFrom(prototype);
-    }
-    
+      return (Builder)new Builder().MergeFrom(prototype);
+    }
+
     public sealed partial class Builder : pb::GeneratedBuilder<CustomOptionMaxIntegerValues, Builder> {
       protected override Builder ThisBuilder {
         get { return this; }
       }
-      public Builder() {}
-      
+      public Builder() { }
+
       CustomOptionMaxIntegerValues result = new CustomOptionMaxIntegerValues();
-      
+
       protected override CustomOptionMaxIntegerValues MessageBeingBuilt {
         get { return result; }
       }
-      
+
       public override Builder Clear() {
         result = new CustomOptionMaxIntegerValues();
         return this;
       }
-      
+
       public override Builder Clone() {
         return new Builder().MergeFrom(result);
       }
-      
+
       public override pbd::MessageDescriptor DescriptorForType {
         get { return global::Google.ProtocolBuffers.TestProtos.CustomOptionMaxIntegerValues.Descriptor; }
       }
-      
+
       public override CustomOptionMaxIntegerValues DefaultInstanceForType {
         get { return global::Google.ProtocolBuffers.TestProtos.CustomOptionMaxIntegerValues.DefaultInstance; }
       }
-      
+
       public override CustomOptionMaxIntegerValues BuildPartial() {
         if (result == null) {
@@ -1610,8 +1608,8 @@
         return returnMe;
       }
-      
+
       public override Builder MergeFrom(pb::IMessage other) {
         if (other is CustomOptionMaxIntegerValues) {
-          return MergeFrom((CustomOptionMaxIntegerValues) other);
+          return MergeFrom((CustomOptionMaxIntegerValues)other);
         } else {
           base.MergeFrom(other);
@@ -1619,5 +1617,5 @@
         }
       }
-      
+
       public override Builder MergeFrom(CustomOptionMaxIntegerValues other) {
         if (other == global::Google.ProtocolBuffers.TestProtos.CustomOptionMaxIntegerValues.DefaultInstance) return this;
@@ -1625,9 +1623,9 @@
         return this;
       }
-      
+
       public override Builder MergeFrom(pb::CodedInputStream input) {
         return MergeFrom(input, pb::ExtensionRegistry.Empty);
       }
-      
+
       public override Builder MergeFrom(pb::CodedInputStream input, pb::ExtensionRegistry extensionRegistry) {
         pb::UnknownFieldSet.Builder unknownFields = null;
@@ -1636,11 +1634,4 @@
           switch (tag) {
             case 0: {
-              if (unknownFields != null) {
-                this.UnknownFields = unknownFields.Build();
-              }
-              return this;
-            }
-            default: {
-              if (pb::WireFormat.IsEndGroupTag(tag)) {
                 if (unknownFields != null) {
                   this.UnknownFields = unknownFields.Build();
@@ -1648,14 +1639,21 @@
                 return this;
               }
-              if (unknownFields == null) {
-                unknownFields = pb::UnknownFieldSet.CreateBuilder(this.UnknownFields);
+            default: {
+                if (pb::WireFormat.IsEndGroupTag(tag)) {
+                  if (unknownFields != null) {
+                    this.UnknownFields = unknownFields.Build();
+                  }
+                  return this;
+                }
+                if (unknownFields == null) {
+                  unknownFields = pb::UnknownFieldSet.CreateBuilder(this.UnknownFields);
+                }
+                ParseUnknownField(input, unknownFields, extensionRegistry, tag);
+                break;
               }
-              ParseUnknownField(input, unknownFields, extensionRegistry, tag);
-              break;
-            }
-          }
-        }
-      }
-      
+          }
+        }
+      }
+
     }
     static CustomOptionMaxIntegerValues() {
@@ -1663,5 +1661,5 @@
     }
   }
-  
+
   public sealed partial class CustomOptionOtherValues : pb::GeneratedMessage<CustomOptionOtherValues, CustomOptionOtherValues.Builder> {
     private static readonly CustomOptionOtherValues defaultInstance = new Builder().BuildPartial();
@@ -1669,21 +1667,21 @@
       get { return defaultInstance; }
     }
-    
+
     public override CustomOptionOtherValues DefaultInstanceForType {
       get { return defaultInstance; }
     }
-    
+
     protected override CustomOptionOtherValues ThisMessage {
       get { return this; }
     }
-    
+
     public static pbd::MessageDescriptor Descriptor {
       get { return global::Google.ProtocolBuffers.TestProtos.UnitTestCustomOptionsProtoFile.internal__static_protobuf_unittest_CustomOptionOtherValues__Descriptor; }
     }
-    
+
     protected override pb::FieldAccess.FieldAccessorTable<CustomOptionOtherValues, CustomOptionOtherValues.Builder> InternalFieldAccessors {
       get { return global::Google.ProtocolBuffers.TestProtos.UnitTestCustomOptionsProtoFile.internal__static_protobuf_unittest_CustomOptionOtherValues__FieldAccessorTable; }
     }
-    
+
     public override bool IsInitialized {
       get {
@@ -1691,10 +1689,10 @@
       }
     }
-    
+
     public override void WriteTo(pb::CodedOutputStream output) {
       int size = SerializedSize;
       UnknownFields.WriteTo(output);
     }
-    
+
     private int memoizedSerializedSize = -1;
     public override int SerializedSize {
@@ -1702,5 +1700,5 @@
         int size = memoizedSerializedSize;
         if (size != -1) return size;
-        
+
         size = 0;
         size += UnknownFields.SerializedSize;
@@ -1709,22 +1707,22 @@
       }
     }
-    
+
     public static CustomOptionOtherValues ParseFrom(pb::ByteString data) {
-      return ((Builder) CreateBuilder().MergeFrom(data)).BuildParsed();
+      return ((Builder)CreateBuilder().MergeFrom(data)).BuildParsed();
     }
     public static CustomOptionOtherValues ParseFrom(pb::ByteString data, pb::ExtensionRegistry extensionRegistry) {
-      return ((Builder) CreateBuilder().MergeFrom(data, extensionRegistry)).BuildParsed();
+      return ((Builder)CreateBuilder().MergeFrom(data, extensionRegistry)).BuildParsed();
     }
     public static CustomOptionOtherValues ParseFrom(byte[] data) {
-      return ((Builder) CreateBuilder().MergeFrom(data)).BuildParsed();
+      return ((Builder)CreateBuilder().MergeFrom(data)).BuildParsed();
     }
     public static CustomOptionOtherValues ParseFrom(byte[] data, pb::ExtensionRegistry extensionRegistry) {
-      return ((Builder) CreateBuilder().MergeFrom(data, extensionRegistry)).BuildParsed();
+      return ((Builder)CreateBuilder().MergeFrom(data, extensionRegistry)).BuildParsed();
     }
     public static CustomOptionOtherValues ParseFrom(global::System.IO.Stream input) {
-      return ((Builder) CreateBuilder().MergeFrom(input)).BuildParsed();
+      return ((Builder)CreateBuilder().MergeFrom(input)).BuildParsed();
     }
     public static CustomOptionOtherValues ParseFrom(global::System.IO.Stream input, pb::ExtensionRegistry extensionRegistry) {
-      return ((Builder) CreateBuilder().MergeFrom(input, extensionRegistry)).BuildParsed();
+      return ((Builder)CreateBuilder().MergeFrom(input, extensionRegistry)).BuildParsed();
     }
     public static CustomOptionOtherValues ParseDelimitedFrom(global::System.IO.Stream input) {
@@ -1735,8 +1733,8 @@
     }
     public static CustomOptionOtherValues ParseFrom(pb::CodedInputStream input) {
-      return ((Builder) CreateBuilder().MergeFrom(input)).BuildParsed();
+      return ((Builder)CreateBuilder().MergeFrom(input)).BuildParsed();
     }
     public static CustomOptionOtherValues ParseFrom(pb::CodedInputStream input, pb::ExtensionRegistry extensionRegistry) {
-      return ((Builder) CreateBuilder().MergeFrom(input, extensionRegistry)).BuildParsed();
+      return ((Builder)CreateBuilder().MergeFrom(input, extensionRegistry)).BuildParsed();
     }
     public static Builder CreateBuilder() { return new Builder(); }
@@ -1744,36 +1742,36 @@
     public override Builder CreateBuilderForType() { return new Builder(); }
     public static Builder CreateBuilder(CustomOptionOtherValues prototype) {
-      return (Builder) new Builder().MergeFrom(prototype);
-    }
-    
+      return (Builder)new Builder().MergeFrom(prototype);
+    }
+
     public sealed partial class Builder : pb::GeneratedBuilder<CustomOptionOtherValues, Builder> {
       protected override Builder ThisBuilder {
         get { return this; }
       }
-      public Builder() {}
-      
+      public Builder() { }
+
       CustomOptionOtherValues result = new CustomOptionOtherValues();
-      
+
       protected override CustomOptionOtherValues MessageBeingBuilt {
         get { return result; }
       }
-      
+
       public override Builder Clear() {
         result = new CustomOptionOtherValues();
         return this;
       }
-      
+
       public override Builder Clone() {
         return new Builder().MergeFrom(result);
       }
-      
+
       public override pbd::MessageDescriptor DescriptorForType {
         get { return global::Google.ProtocolBuffers.TestProtos.CustomOptionOtherValues.Descriptor; }
       }
-      
+
       public override CustomOptionOtherValues DefaultInstanceForType {
         get { return global::Google.ProtocolBuffers.TestProtos.CustomOptionOtherValues.DefaultInstance; }
       }
-      
+
       public override CustomOptionOtherValues BuildPartial() {
         if (result == null) {
@@ -1784,8 +1782,8 @@
         return returnMe;
       }
-      
+
       public override Builder MergeFrom(pb::IMessage other) {
         if (other is CustomOptionOtherValues) {
-          return MergeFrom((CustomOptionOtherValues) other);
+          return MergeFrom((CustomOptionOtherValues)other);
         } else {
           base.MergeFrom(other);
@@ -1793,5 +1791,5 @@
         }
       }
-      
+
       public override Builder MergeFrom(CustomOptionOtherValues other) {
         if (other == global::Google.ProtocolBuffers.TestProtos.CustomOptionOtherValues.DefaultInstance) return this;
@@ -1799,9 +1797,9 @@
         return this;
       }
-      
+
       public override Builder MergeFrom(pb::CodedInputStream input) {
         return MergeFrom(input, pb::ExtensionRegistry.Empty);
       }
-      
+
       public override Builder MergeFrom(pb::CodedInputStream input, pb::ExtensionRegistry extensionRegistry) {
         pb::UnknownFieldSet.Builder unknownFields = null;
@@ -1810,11 +1808,4 @@
           switch (tag) {
             case 0: {
-              if (unknownFields != null) {
-                this.UnknownFields = unknownFields.Build();
-              }
-              return this;
-            }
-            default: {
-              if (pb::WireFormat.IsEndGroupTag(tag)) {
                 if (unknownFields != null) {
                   this.UnknownFields = unknownFields.Build();
@@ -1822,14 +1813,21 @@
                 return this;
               }
-              if (unknownFields == null) {
-                unknownFields = pb::UnknownFieldSet.CreateBuilder(this.UnknownFields);
+            default: {
+                if (pb::WireFormat.IsEndGroupTag(tag)) {
+                  if (unknownFields != null) {
+                    this.UnknownFields = unknownFields.Build();
+                  }
+                  return this;
+                }
+                if (unknownFields == null) {
+                  unknownFields = pb::UnknownFieldSet.CreateBuilder(this.UnknownFields);
+                }
+                ParseUnknownField(input, unknownFields, extensionRegistry, tag);
+                break;
               }
-              ParseUnknownField(input, unknownFields, extensionRegistry, tag);
-              break;
-            }
-          }
-        }
-      }
-      
+          }
+        }
+      }
+
     }
     static CustomOptionOtherValues() {
@@ -1837,5 +1835,5 @@
     }
   }
-  
+
   public sealed partial class SettingRealsFromPositiveInts : pb::GeneratedMessage<SettingRealsFromPositiveInts, SettingRealsFromPositiveInts.Builder> {
     private static readonly SettingRealsFromPositiveInts defaultInstance = new Builder().BuildPartial();
@@ -1843,21 +1841,21 @@
       get { return defaultInstance; }
     }
-    
+
     public override SettingRealsFromPositiveInts DefaultInstanceForType {
       get { return defaultInstance; }
     }
-    
+
     protected override SettingRealsFromPositiveInts ThisMessage {
       get { return this; }
     }
-    
+
     public static pbd::MessageDescriptor Descriptor {
       get { return global::Google.ProtocolBuffers.TestProtos.UnitTestCustomOptionsProtoFile.internal__static_protobuf_unittest_SettingRealsFromPositiveInts__Descriptor; }
     }
-    
+
     protected override pb::FieldAccess.FieldAccessorTable<SettingRealsFromPositiveInts, SettingRealsFromPositiveInts.Builder> InternalFieldAccessors {
       get { return global::Google.ProtocolBuffers.TestProtos.UnitTestCustomOptionsProtoFile.internal__static_protobuf_unittest_SettingRealsFromPositiveInts__FieldAccessorTable; }
     }
-    
+
     public override bool IsInitialized {
       get {
@@ -1865,10 +1863,10 @@
       }
     }
-    
+
     public override void WriteTo(pb::CodedOutputStream output) {
       int size = SerializedSize;
       UnknownFields.WriteTo(output);
     }
-    
+
     private int memoizedSerializedSize = -1;
     public override int SerializedSize {
@@ -1876,5 +1874,5 @@
         int size = memoizedSerializedSize;
         if (size != -1) return size;
-        
+
         size = 0;
         size += UnknownFields.SerializedSize;
@@ -1883,22 +1881,22 @@
       }
     }
-    
+
     public static SettingRealsFromPositiveInts ParseFrom(pb::ByteString data) {
-      return ((Builder) CreateBuilder().MergeFrom(data)).BuildParsed();
+      return ((Builder)CreateBuilder().MergeFrom(data)).BuildParsed();
     }
     public static SettingRealsFromPositiveInts ParseFrom(pb::ByteString data, pb::ExtensionRegistry extensionRegistry) {
-      return ((Builder) CreateBuilder().MergeFrom(data, extensionRegistry)).BuildParsed();
+      return ((Builder)CreateBuilder().MergeFrom(data, extensionRegistry)).BuildParsed();
     }
     public static SettingRealsFromPositiveInts ParseFrom(byte[] data) {
-      return ((Builder) CreateBuilder().MergeFrom(data)).BuildParsed();
+      return ((Builder)CreateBuilder().MergeFrom(data)).BuildParsed();
     }
     public static SettingRealsFromPositiveInts ParseFrom(byte[] data, pb::ExtensionRegistry extensionRegistry) {
-      return ((Builder) CreateBuilder().MergeFrom(data, extensionRegistry)).BuildParsed();
+      return ((Builder)CreateBuilder().MergeFrom(data, extensionRegistry)).BuildParsed();
     }
     public static SettingRealsFromPositiveInts ParseFrom(global::System.IO.Stream input) {
-      return ((Builder) CreateBuilder().MergeFrom(input)).BuildParsed();
+      return ((Builder)CreateBuilder().MergeFrom(input)).BuildParsed();
     }
     public static SettingRealsFromPositiveInts ParseFrom(global::System.IO.Stream input, pb::ExtensionRegistry extensionRegistry) {
-      return ((Builder) CreateBuilder().MergeFrom(input, extensionRegistry)).BuildParsed();
+      return ((Builder)CreateBuilder().MergeFrom(input, extensionRegistry)).BuildParsed();
     }
     public static SettingRealsFromPositiveInts ParseDelimitedFrom(global::System.IO.Stream input) {
@@ -1909,8 +1907,8 @@
     }
     public static SettingRealsFromPositiveInts ParseFrom(pb::CodedInputStream input) {
-      return ((Builder) CreateBuilder().MergeFrom(input)).BuildParsed();
+      return ((Builder)CreateBuilder().MergeFrom(input)).BuildParsed();
     }
     public static SettingRealsFromPositiveInts ParseFrom(pb::CodedInputStream input, pb::ExtensionRegistry extensionRegistry) {
-      return ((Builder) CreateBuilder().MergeFrom(input, extensionRegistry)).BuildParsed();
+      return ((Builder)CreateBuilder().MergeFrom(input, extensionRegistry)).BuildParsed();
     }
     public static Builder CreateBuilder() { return new Builder(); }
@@ -1918,36 +1916,36 @@
     public override Builder CreateBuilderForType() { return new Builder(); }
     public static Builder CreateBuilder(SettingRealsFromPositiveInts prototype) {
-      return (Builder) new Builder().MergeFrom(prototype);
-    }
-    
+      return (Builder)new Builder().MergeFrom(prototype);
+    }
+
     public sealed partial class Builder : pb::GeneratedBuilder<SettingRealsFromPositiveInts, Builder> {
       protected override Builder ThisBuilder {
         get { return this; }
       }
-      public Builder() {}
-      
+      public Builder() { }
+
       SettingRealsFromPositiveInts result = new SettingRealsFromPositiveInts();
-      
+
       protected override SettingRealsFromPositiveInts MessageBeingBuilt {
         get { return result; }
       }
-      
+
       public override Builder Clear() {
         result = new SettingRealsFromPositiveInts();
         return this;
       }
-      
+
       public override Builder Clone() {
         return new Builder().MergeFrom(result);
       }
-      
+
       public override pbd::MessageDescriptor DescriptorForType {
         get { return global::Google.ProtocolBuffers.TestProtos.SettingRealsFromPositiveInts.Descriptor; }
       }
-      
+
       public override SettingRealsFromPositiveInts DefaultInstanceForType {
         get { return global::Google.ProtocolBuffers.TestProtos.SettingRealsFromPositiveInts.DefaultInstance; }
       }
-      
+
       public override SettingRealsFromPositiveInts BuildPartial() {
         if (result == null) {
@@ -1958,8 +1956,8 @@
         return returnMe;
       }
-      
+
       public override Builder MergeFrom(pb::IMessage other) {
         if (other is SettingRealsFromPositiveInts) {
-          return MergeFrom((SettingRealsFromPositiveInts) other);
+          return MergeFrom((SettingRealsFromPositiveInts)other);
         } else {
           base.MergeFrom(other);
@@ -1967,5 +1965,5 @@
         }
       }
-      
+
       public override Builder MergeFrom(SettingRealsFromPositiveInts other) {
         if (other == global::Google.ProtocolBuffers.TestProtos.SettingRealsFromPositiveInts.DefaultInstance) return this;
@@ -1973,9 +1971,9 @@
         return this;
       }
-      
+
       public override Builder MergeFrom(pb::CodedInputStream input) {
         return MergeFrom(input, pb::ExtensionRegistry.Empty);
       }
-      
+
       public override Builder MergeFrom(pb::CodedInputStream input, pb::ExtensionRegistry extensionRegistry) {
         pb::UnknownFieldSet.Builder unknownFields = null;
@@ -1984,11 +1982,4 @@
           switch (tag) {
             case 0: {
-              if (unknownFields != null) {
-                this.UnknownFields = unknownFields.Build();
-              }
-              return this;
-            }
-            default: {
-              if (pb::WireFormat.IsEndGroupTag(tag)) {
                 if (unknownFields != null) {
                   this.UnknownFields = unknownFields.Build();
@@ -1996,14 +1987,21 @@
                 return this;
               }
-              if (unknownFields == null) {
-                unknownFields = pb::UnknownFieldSet.CreateBuilder(this.UnknownFields);
+            default: {
+                if (pb::WireFormat.IsEndGroupTag(tag)) {
+                  if (unknownFields != null) {
+                    this.UnknownFields = unknownFields.Build();
+                  }
+                  return this;
+                }
+                if (unknownFields == null) {
+                  unknownFields = pb::UnknownFieldSet.CreateBuilder(this.UnknownFields);
+                }
+                ParseUnknownField(input, unknownFields, extensionRegistry, tag);
+                break;
               }
-              ParseUnknownField(input, unknownFields, extensionRegistry, tag);
-              break;
-            }
-          }
-        }
-      }
-      
+          }
+        }
+      }
+
     }
     static SettingRealsFromPositiveInts() {
@@ -2011,5 +2009,5 @@
     }
   }
-  
+
   public sealed partial class SettingRealsFromNegativeInts : pb::GeneratedMessage<SettingRealsFromNegativeInts, SettingRealsFromNegativeInts.Builder> {
     private static readonly SettingRealsFromNegativeInts defaultInstance = new Builder().BuildPartial();
@@ -2017,21 +2015,21 @@
       get { return defaultInstance; }
     }
-    
+
     public override SettingRealsFromNegativeInts DefaultInstanceForType {
       get { return defaultInstance; }
     }
-    
+
     protected override SettingRealsFromNegativeInts ThisMessage {
       get { return this; }
     }
-    
+
     public static pbd::MessageDescriptor Descriptor {
       get { return global::Google.ProtocolBuffers.TestProtos.UnitTestCustomOptionsProtoFile.internal__static_protobuf_unittest_SettingRealsFromNegativeInts__Descriptor; }
     }
-    
+
     protected override pb::FieldAccess.FieldAccessorTable<SettingRealsFromNegativeInts, SettingRealsFromNegativeInts.Builder> InternalFieldAccessors {
       get { return global::Google.ProtocolBuffers.TestProtos.UnitTestCustomOptionsProtoFile.internal__static_protobuf_unittest_SettingRealsFromNegativeInts__FieldAccessorTable; }
     }
-    
+
     public override bool IsInitialized {
       get {
@@ -2039,10 +2037,10 @@
       }
     }
-    
+
     public override void WriteTo(pb::CodedOutputStream output) {
       int size = SerializedSize;
       UnknownFields.WriteTo(output);
     }
-    
+
     private int memoizedSerializedSize = -1;
     public override int SerializedSize {
@@ -2050,5 +2048,5 @@
         int size = memoizedSerializedSize;
         if (size != -1) return size;
-        
+
         size = 0;
         size += UnknownFields.SerializedSize;
@@ -2057,22 +2055,22 @@
       }
     }
-    
+
     public static SettingRealsFromNegativeInts ParseFrom(pb::ByteString data) {
-      return ((Builder) CreateBuilder().MergeFrom(data)).BuildParsed();
+      return ((Builder)CreateBuilder().MergeFrom(data)).BuildParsed();
     }
     public static SettingRealsFromNegativeInts ParseFrom(pb::ByteString data, pb::ExtensionRegistry extensionRegistry) {
-      return ((Builder) CreateBuilder().MergeFrom(data, extensionRegistry)).BuildParsed();
+      return ((Builder)CreateBuilder().MergeFrom(data, extensionRegistry)).BuildParsed();
     }
     public static SettingRealsFromNegativeInts ParseFrom(byte[] data) {
-      return ((Builder) CreateBuilder().MergeFrom(data)).BuildParsed();
+      return ((Builder)CreateBuilder().MergeFrom(data)).BuildParsed();
     }
     public static SettingRealsFromNegativeInts ParseFrom(byte[] data, pb::ExtensionRegistry extensionRegistry) {
-      return ((Builder) CreateBuilder().MergeFrom(data, extensionRegistry)).BuildParsed();
+      return ((Builder)CreateBuilder().MergeFrom(data, extensionRegistry)).BuildParsed();
     }
     public static SettingRealsFromNegativeInts ParseFrom(global::System.IO.Stream input) {
-      return ((Builder) CreateBuilder().MergeFrom(input)).BuildParsed();
+      return ((Builder)CreateBuilder().MergeFrom(input)).BuildParsed();
     }
     public static SettingRealsFromNegativeInts ParseFrom(global::System.IO.Stream input, pb::ExtensionRegistry extensionRegistry) {
-      return ((Builder) CreateBuilder().MergeFrom(input, extensionRegistry)).BuildParsed();
+      return ((Builder)CreateBuilder().MergeFrom(input, extensionRegistry)).BuildParsed();
     }
     public static SettingRealsFromNegativeInts ParseDelimitedFrom(global::System.IO.Stream input) {
@@ -2083,8 +2081,8 @@
     }
     public static SettingRealsFromNegativeInts ParseFrom(pb::CodedInputStream input) {
-      return ((Builder) CreateBuilder().MergeFrom(input)).BuildParsed();
+      return ((Builder)CreateBuilder().MergeFrom(input)).BuildParsed();
     }
     public static SettingRealsFromNegativeInts ParseFrom(pb::CodedInputStream input, pb::ExtensionRegistry extensionRegistry) {
-      return ((Builder) CreateBuilder().MergeFrom(input, extensionRegistry)).BuildParsed();
+      return ((Builder)CreateBuilder().MergeFrom(input, extensionRegistry)).BuildParsed();
     }
     public static Builder CreateBuilder() { return new Builder(); }
@@ -2092,36 +2090,36 @@
     public override Builder CreateBuilderForType() { return new Builder(); }
     public static Builder CreateBuilder(SettingRealsFromNegativeInts prototype) {
-      return (Builder) new Builder().MergeFrom(prototype);
-    }
-    
+      return (Builder)new Builder().MergeFrom(prototype);
+    }
+
     public sealed partial class Builder : pb::GeneratedBuilder<SettingRealsFromNegativeInts, Builder> {
       protected override Builder ThisBuilder {
         get { return this; }
       }
-      public Builder() {}
-      
+      public Builder() { }
+
       SettingRealsFromNegativeInts result = new SettingRealsFromNegativeInts();
-      
+
       protected override SettingRealsFromNegativeInts MessageBeingBuilt {
         get { return result; }
       }
-      
+
       public override Builder Clear() {
         result = new SettingRealsFromNegativeInts();
         return this;
       }
-      
+
       public override Builder Clone() {
         return new Builder().MergeFrom(result);
       }
-      
+
       public override pbd::MessageDescriptor DescriptorForType {
         get { return global::Google.ProtocolBuffers.TestProtos.SettingRealsFromNegativeInts.Descriptor; }
       }
-      
+
       public override SettingRealsFromNegativeInts DefaultInstanceForType {
         get { return global::Google.ProtocolBuffers.TestProtos.SettingRealsFromNegativeInts.DefaultInstance; }
       }
-      
+
       public override SettingRealsFromNegativeInts BuildPartial() {
         if (result == null) {
@@ -2132,8 +2130,8 @@
         return returnMe;
       }
-      
+
       public override Builder MergeFrom(pb::IMessage other) {
         if (other is SettingRealsFromNegativeInts) {
-          return MergeFrom((SettingRealsFromNegativeInts) other);
+          return MergeFrom((SettingRealsFromNegativeInts)other);
         } else {
           base.MergeFrom(other);
@@ -2141,5 +2139,5 @@
         }
       }
-      
+
       public override Builder MergeFrom(SettingRealsFromNegativeInts other) {
         if (other == global::Google.ProtocolBuffers.TestProtos.SettingRealsFromNegativeInts.DefaultInstance) return this;
@@ -2147,9 +2145,9 @@
         return this;
       }
-      
+
       public override Builder MergeFrom(pb::CodedInputStream input) {
         return MergeFrom(input, pb::ExtensionRegistry.Empty);
       }
-      
+
       public override Builder MergeFrom(pb::CodedInputStream input, pb::ExtensionRegistry extensionRegistry) {
         pb::UnknownFieldSet.Builder unknownFields = null;
@@ -2158,11 +2156,4 @@
           switch (tag) {
             case 0: {
-              if (unknownFields != null) {
-                this.UnknownFields = unknownFields.Build();
-              }
-              return this;
-            }
-            default: {
-              if (pb::WireFormat.IsEndGroupTag(tag)) {
                 if (unknownFields != null) {
                   this.UnknownFields = unknownFields.Build();
@@ -2170,14 +2161,21 @@
                 return this;
               }
-              if (unknownFields == null) {
-                unknownFields = pb::UnknownFieldSet.CreateBuilder(this.UnknownFields);
+            default: {
+                if (pb::WireFormat.IsEndGroupTag(tag)) {
+                  if (unknownFields != null) {
+                    this.UnknownFields = unknownFields.Build();
+                  }
+                  return this;
+                }
+                if (unknownFields == null) {
+                  unknownFields = pb::UnknownFieldSet.CreateBuilder(this.UnknownFields);
+                }
+                ParseUnknownField(input, unknownFields, extensionRegistry, tag);
+                break;
               }
-              ParseUnknownField(input, unknownFields, extensionRegistry, tag);
-              break;
-            }
-          }
-        }
-      }
-      
+          }
+        }
+      }
+
     }
     static SettingRealsFromNegativeInts() {
@@ -2185,5 +2183,5 @@
     }
   }
-  
+
   public sealed partial class ComplexOptionType1 : pb::ExtendableMessage<ComplexOptionType1, ComplexOptionType1.Builder> {
     private static readonly ComplexOptionType1 defaultInstance = new Builder().BuildPartial();
@@ -2191,21 +2189,21 @@
       get { return defaultInstance; }
     }
-    
+
     public override ComplexOptionType1 DefaultInstanceForType {
       get { return defaultInstance; }
     }
-    
+
     protected override ComplexOptionType1 ThisMessage {
       get { return this; }
     }
-    
+
     public static pbd::MessageDescriptor Descriptor {
       get { return global::Google.ProtocolBuffers.TestProtos.UnitTestCustomOptionsProtoFile.internal__static_protobuf_unittest_ComplexOptionType1__Descriptor; }
     }
-    
+
     protected override pb::FieldAccess.FieldAccessorTable<ComplexOptionType1, ComplexOptionType1.Builder> InternalFieldAccessors {
       get { return global::Google.ProtocolBuffers.TestProtos.UnitTestCustomOptionsProtoFile.internal__static_protobuf_unittest_ComplexOptionType1__FieldAccessorTable; }
     }
-    
+
     public const int FooFieldNumber = 1;
     private bool hasFoo;
@@ -2217,5 +2215,5 @@
       get { return foo_; }
     }
-    
+
     public override bool IsInitialized {
       get {
@@ -2224,5 +2222,5 @@
       }
     }
-    
+
     public override void WriteTo(pb::CodedOutputStream output) {
       int size = SerializedSize;
@@ -2234,5 +2232,5 @@
       UnknownFields.WriteTo(output);
     }
-    
+
     private int memoizedSerializedSize = -1;
     public override int SerializedSize {
@@ -2240,5 +2238,5 @@
         int size = memoizedSerializedSize;
         if (size != -1) return size;
-        
+
         size = 0;
         if (HasFoo) {
@@ -2251,22 +2249,22 @@
       }
     }
-    
+
     public static ComplexOptionType1 ParseFrom(pb::ByteString data) {
-      return ((Builder) CreateBuilder().MergeFrom(data)).BuildParsed();
+      return ((Builder)CreateBuilder().MergeFrom(data)).BuildParsed();
     }
     public static ComplexOptionType1 ParseFrom(pb::ByteString data, pb::ExtensionRegistry extensionRegistry) {
-      return ((Builder) CreateBuilder().MergeFrom(data, extensionRegistry)).BuildParsed();
+      return ((Builder)CreateBuilder().MergeFrom(data, extensionRegistry)).BuildParsed();
     }
     public static ComplexOptionType1 ParseFrom(byte[] data) {
-      return ((Builder) CreateBuilder().MergeFrom(data)).BuildParsed();
+      return ((Builder)CreateBuilder().MergeFrom(data)).BuildParsed();
     }
     public static ComplexOptionType1 ParseFrom(byte[] data, pb::ExtensionRegistry extensionRegistry) {
-      return ((Builder) CreateBuilder().MergeFrom(data, extensionRegistry)).BuildParsed();
+      return ((Builder)CreateBuilder().MergeFrom(data, extensionRegistry)).BuildParsed();
     }
     public static ComplexOptionType1 ParseFrom(global::System.IO.Stream input) {
-      return ((Builder) CreateBuilder().MergeFrom(input)).BuildParsed();
+      return ((Builder)CreateBuilder().MergeFrom(input)).BuildParsed();
     }
     public static ComplexOptionType1 ParseFrom(global::System.IO.Stream input, pb::ExtensionRegistry extensionRegistry) {
-      return ((Builder) CreateBuilder().MergeFrom(input, extensionRegistry)).BuildParsed();
+      return ((Builder)CreateBuilder().MergeFrom(input, extensionRegistry)).BuildParsed();
     }
     public static ComplexOptionType1 ParseDelimitedFrom(global::System.IO.Stream input) {
@@ -2277,8 +2275,8 @@
     }
     public static ComplexOptionType1 ParseFrom(pb::CodedInputStream input) {
-      return ((Builder) CreateBuilder().MergeFrom(input)).BuildParsed();
+      return ((Builder)CreateBuilder().MergeFrom(input)).BuildParsed();
     }
     public static ComplexOptionType1 ParseFrom(pb::CodedInputStream input, pb::ExtensionRegistry extensionRegistry) {
-      return ((Builder) CreateBuilder().MergeFrom(input, extensionRegistry)).BuildParsed();
+      return ((Builder)CreateBuilder().MergeFrom(input, extensionRegistry)).BuildParsed();
     }
     public static Builder CreateBuilder() { return new Builder(); }
@@ -2286,36 +2284,36 @@
     public override Builder CreateBuilderForType() { return new Builder(); }
     public static Builder CreateBuilder(ComplexOptionType1 prototype) {
-      return (Builder) new Builder().MergeFrom(prototype);
-    }
-    
+      return (Builder)new Builder().MergeFrom(prototype);
+    }
+
     public sealed partial class Builder : pb::ExtendableBuilder<ComplexOptionType1, Builder> {
       protected override Builder ThisBuilder {
         get { return this; }
       }
-      public Builder() {}
-      
+      public Builder() { }
+
       ComplexOptionType1 result = new ComplexOptionType1();
-      
+
       protected override ComplexOptionType1 MessageBeingBuilt {
         get { return result; }
       }
-      
+
       public override Builder Clear() {
         result = new ComplexOptionType1();
         return this;
       }
-      
+
       public override Builder Clone() {
         return new Builder().MergeFrom(result);
       }
-      
+
       public override pbd::MessageDescriptor DescriptorForType {
         get { return global::Google.ProtocolBuffers.TestProtos.ComplexOptionType1.Descriptor; }
       }
-      
+
       public override ComplexOptionType1 DefaultInstanceForType {
         get { return global::Google.ProtocolBuffers.TestProtos.ComplexOptionType1.DefaultInstance; }
       }
-      
+
       public override ComplexOptionType1 BuildPartial() {
         if (result == null) {
@@ -2326,8 +2324,8 @@
         return returnMe;
       }
-      
+
       public override Builder MergeFrom(pb::IMessage other) {
         if (other is ComplexOptionType1) {
-          return MergeFrom((ComplexOptionType1) other);
+          return MergeFrom((ComplexOptionType1)other);
         } else {
           base.MergeFrom(other);
@@ -2335,5 +2333,5 @@
         }
       }
-      
+
       public override Builder MergeFrom(ComplexOptionType1 other) {
         if (other == global::Google.ProtocolBuffers.TestProtos.ComplexOptionType1.DefaultInstance) return this;
@@ -2341,13 +2339,13 @@
           Foo = other.Foo;
         }
-          this.MergeExtensionFields(other);
+        this.MergeExtensionFields(other);
         this.MergeUnknownFields(other.UnknownFields);
         return this;
       }
-      
+
       public override Builder MergeFrom(pb::CodedInputStream input) {
         return MergeFrom(input, pb::ExtensionRegistry.Empty);
       }
-      
+
       public override Builder MergeFrom(pb::CodedInputStream input, pb::ExtensionRegistry extensionRegistry) {
         pb::UnknownFieldSet.Builder unknownFields = null;
@@ -2356,11 +2354,4 @@
           switch (tag) {
             case 0: {
-              if (unknownFields != null) {
-                this.UnknownFields = unknownFields.Build();
-              }
-              return this;
-            }
-            default: {
-              if (pb::WireFormat.IsEndGroupTag(tag)) {
                 if (unknownFields != null) {
                   this.UnknownFields = unknownFields.Build();
@@ -2368,19 +2359,26 @@
                 return this;
               }
-              if (unknownFields == null) {
-                unknownFields = pb::UnknownFieldSet.CreateBuilder(this.UnknownFields);
+            default: {
+                if (pb::WireFormat.IsEndGroupTag(tag)) {
+                  if (unknownFields != null) {
+                    this.UnknownFields = unknownFields.Build();
+                  }
+                  return this;
+                }
+                if (unknownFields == null) {
+                  unknownFields = pb::UnknownFieldSet.CreateBuilder(this.UnknownFields);
+                }
+                ParseUnknownField(input, unknownFields, extensionRegistry, tag);
+                break;
               }
-              ParseUnknownField(input, unknownFields, extensionRegistry, tag);
-              break;
-            }
             case 8: {
-              Foo = input.ReadInt32();
-              break;
-            }
-          }
-        }
-      }
-      
-      
+                Foo = input.ReadInt32();
+                break;
+              }
+          }
+        }
+      }
+
+
       public bool HasFoo {
         get { return result.HasFoo; }
@@ -2405,5 +2403,5 @@
     }
   }
-  
+
   public sealed partial class ComplexOptionType2 : pb::ExtendableMessage<ComplexOptionType2, ComplexOptionType2.Builder> {
     private static readonly ComplexOptionType2 defaultInstance = new Builder().BuildPartial();
@@ -2411,21 +2409,21 @@
       get { return defaultInstance; }
     }
-    
+
     public override ComplexOptionType2 DefaultInstanceForType {
       get { return defaultInstance; }
     }
-    
+
     protected override ComplexOptionType2 ThisMessage {
       get { return this; }
     }
-    
+
     public static pbd::MessageDescriptor Descriptor {
       get { return global::Google.ProtocolBuffers.TestProtos.UnitTestCustomOptionsProtoFile.internal__static_protobuf_unittest_ComplexOptionType2__Descriptor; }
     }
-    
+
     protected override pb::FieldAccess.FieldAccessorTable<ComplexOptionType2, ComplexOptionType2.Builder> InternalFieldAccessors {
       get { return global::Google.ProtocolBuffers.TestProtos.UnitTestCustomOptionsProtoFile.internal__static_protobuf_unittest_ComplexOptionType2__FieldAccessorTable; }
     }
-    
+
     #region Nested types
     public static class Types {
@@ -2435,21 +2433,21 @@
           get { return defaultInstance; }
         }
-        
+
         public override ComplexOptionType4 DefaultInstanceForType {
           get { return defaultInstance; }
         }
-        
+
         protected override ComplexOptionType4 ThisMessage {
           get { return this; }
         }
-        
+
         public static pbd::MessageDescriptor Descriptor {
           get { return global::Google.ProtocolBuffers.TestProtos.UnitTestCustomOptionsProtoFile.internal__static_protobuf_unittest_ComplexOptionType2_ComplexOptionType4__Descriptor; }
         }
-        
+
         protected override pb::FieldAccess.FieldAccessorTable<ComplexOptionType4, ComplexOptionType4.Builder> InternalFieldAccessors {
           get { return global::Google.ProtocolBuffers.TestProtos.UnitTestCustomOptionsProtoFile.internal__static_protobuf_unittest_ComplexOptionType2_ComplexOptionType4__FieldAccessorTable; }
         }
-        
+
         public const int ComplexOpt4FieldNumber = 7633546;
         public static pb::GeneratedExtensionBase<global::Google.ProtocolBuffers.TestProtos.ComplexOptionType2.Types.ComplexOptionType4> ComplexOpt4;
@@ -2463,5 +2461,5 @@
           get { return waldo_; }
         }
-        
+
         public override bool IsInitialized {
           get {
@@ -2469,5 +2467,5 @@
           }
         }
-        
+
         public override void WriteTo(pb::CodedOutputStream output) {
           int size = SerializedSize;
@@ -2477,5 +2475,5 @@
           UnknownFields.WriteTo(output);
         }
-        
+
         private int memoizedSerializedSize = -1;
         public override int SerializedSize {
@@ -2483,5 +2481,5 @@
             int size = memoizedSerializedSize;
             if (size != -1) return size;
-            
+
             size = 0;
             if (HasWaldo) {
@@ -2493,22 +2491,22 @@
           }
         }
-        
+
         public static ComplexOptionType4 ParseFrom(pb::ByteString data) {
-          return ((Builder) CreateBuilder().MergeFrom(data)).BuildParsed();
+          return ((Builder)CreateBuilder().MergeFrom(data)).BuildParsed();
         }
         public static ComplexOptionType4 ParseFrom(pb::ByteString data, pb::ExtensionRegistry extensionRegistry) {
-          return ((Builder) CreateBuilder().MergeFrom(data, extensionRegistry)).BuildParsed();
+          return ((Builder)CreateBuilder().MergeFrom(data, extensionRegistry)).BuildParsed();
         }
         public static ComplexOptionType4 ParseFrom(byte[] data) {
-          return ((Builder) CreateBuilder().MergeFrom(data)).BuildParsed();
+          return ((Builder)CreateBuilder().MergeFrom(data)).BuildParsed();
         }
         public static ComplexOptionType4 ParseFrom(byte[] data, pb::ExtensionRegistry extensionRegistry) {
-          return ((Builder) CreateBuilder().MergeFrom(data, extensionRegistry)).BuildParsed();
+          return ((Builder)CreateBuilder().MergeFrom(data, extensionRegistry)).BuildParsed();
         }
         public static ComplexOptionType4 ParseFrom(global::System.IO.Stream input) {
-          return ((Builder) CreateBuilder().MergeFrom(input)).BuildParsed();
+          return ((Builder)CreateBuilder().MergeFrom(input)).BuildParsed();
         }
         public static ComplexOptionType4 ParseFrom(global::System.IO.Stream input, pb::ExtensionRegistry extensionRegistry) {
-          return ((Builder) CreateBuilder().MergeFrom(input, extensionRegistry)).BuildParsed();
+          return ((Builder)CreateBuilder().MergeFrom(input, extensionRegistry)).BuildParsed();
         }
         public static ComplexOptionType4 ParseDelimitedFrom(global::System.IO.Stream input) {
@@ -2519,8 +2517,8 @@
         }
         public static ComplexOptionType4 ParseFrom(pb::CodedInputStream input) {
-          return ((Builder) CreateBuilder().MergeFrom(input)).BuildParsed();
+          return ((Builder)CreateBuilder().MergeFrom(input)).BuildParsed();
         }
         public static ComplexOptionType4 ParseFrom(pb::CodedInputStream input, pb::ExtensionRegistry extensionRegistry) {
-          return ((Builder) CreateBuilder().MergeFrom(input, extensionRegistry)).BuildParsed();
+          return ((Builder)CreateBuilder().MergeFrom(input, extensionRegistry)).BuildParsed();
         }
         public static Builder CreateBuilder() { return new Builder(); }
@@ -2528,36 +2526,36 @@
         public override Builder CreateBuilderForType() { return new Builder(); }
         public static Builder CreateBuilder(ComplexOptionType4 prototype) {
-          return (Builder) new Builder().MergeFrom(prototype);
-        }
-        
+          return (Builder)new Builder().MergeFrom(prototype);
+        }
+
         public sealed partial class Builder : pb::GeneratedBuilder<ComplexOptionType4, Builder> {
           protected override Builder ThisBuilder {
             get { return this; }
           }
-          public Builder() {}
-          
+          public Builder() { }
+
           ComplexOptionType4 result = new ComplexOptionType4();
-          
+
           protected override ComplexOptionType4 MessageBeingBuilt {
             get { return result; }
           }
-          
+
           public override Builder Clear() {
             result = new ComplexOptionType4();
             return this;
           }
-          
+
           public override Builder Clone() {
             return new Builder().MergeFrom(result);
           }
-          
+
           public override pbd::MessageDescriptor DescriptorForType {
             get { return global::Google.ProtocolBuffers.TestProtos.ComplexOptionType2.Types.ComplexOptionType4.Descriptor; }
           }
-          
+
           public override ComplexOptionType4 DefaultInstanceForType {
             get { return global::Google.ProtocolBuffers.TestProtos.ComplexOptionType2.Types.ComplexOptionType4.DefaultInstance; }
           }
-          
+
           public override ComplexOptionType4 BuildPartial() {
             if (result == null) {
@@ -2568,8 +2566,8 @@
             return returnMe;
           }
-          
+
           public override Builder MergeFrom(pb::IMessage other) {
             if (other is ComplexOptionType4) {
-              return MergeFrom((ComplexOptionType4) other);
+              return MergeFrom((ComplexOptionType4)other);
             } else {
               base.MergeFrom(other);
@@ -2577,5 +2575,5 @@
             }
           }
-          
+
           public override Builder MergeFrom(ComplexOptionType4 other) {
             if (other == global::Google.ProtocolBuffers.TestProtos.ComplexOptionType2.Types.ComplexOptionType4.DefaultInstance) return this;
@@ -2586,9 +2584,9 @@
             return this;
           }
-          
+
           public override Builder MergeFrom(pb::CodedInputStream input) {
             return MergeFrom(input, pb::ExtensionRegistry.Empty);
           }
-          
+
           public override Builder MergeFrom(pb::CodedInputStream input, pb::ExtensionRegistry extensionRegistry) {
             pb::UnknownFieldSet.Builder unknownFields = null;
@@ -2597,11 +2595,4 @@
               switch (tag) {
                 case 0: {
-                  if (unknownFields != null) {
-                    this.UnknownFields = unknownFields.Build();
-                  }
-                  return this;
-                }
-                default: {
-                  if (pb::WireFormat.IsEndGroupTag(tag)) {
                     if (unknownFields != null) {
                       this.UnknownFields = unknownFields.Build();
@@ -2609,19 +2600,26 @@
                     return this;
                   }
-                  if (unknownFields == null) {
-                    unknownFields = pb::UnknownFieldSet.CreateBuilder(this.UnknownFields);
+                default: {
+                    if (pb::WireFormat.IsEndGroupTag(tag)) {
+                      if (unknownFields != null) {
+                        this.UnknownFields = unknownFields.Build();
+                      }
+                      return this;
+                    }
+                    if (unknownFields == null) {
+                      unknownFields = pb::UnknownFieldSet.CreateBuilder(this.UnknownFields);
+                    }
+                    ParseUnknownField(input, unknownFields, extensionRegistry, tag);
+                    break;
                   }
-                  ParseUnknownField(input, unknownFields, extensionRegistry, tag);
-                  break;
-                }
                 case 8: {
-                  Waldo = input.ReadInt32();
-                  break;
-                }
+                    Waldo = input.ReadInt32();
+                    break;
+                  }
               }
             }
           }
-          
-          
+
+
           public bool HasWaldo {
             get { return result.HasWaldo; }
@@ -2646,8 +2644,8 @@
         }
       }
-      
+
     }
     #endregion
-    
+
     public const int BarFieldNumber = 1;
     private bool hasBar;
@@ -2659,5 +2657,5 @@
       get { return bar_; }
     }
-    
+
     public const int BazFieldNumber = 2;
     private bool hasBaz;
@@ -2669,5 +2667,5 @@
       get { return baz_; }
     }
-    
+
     public const int FredFieldNumber = 3;
     private bool hasFred;
@@ -2679,5 +2677,5 @@
       get { return fred_; }
     }
-    
+
     public override bool IsInitialized {
       get {
@@ -2689,5 +2687,5 @@
       }
     }
-    
+
     public override void WriteTo(pb::CodedOutputStream output) {
       int size = SerializedSize;
@@ -2705,5 +2703,5 @@
       UnknownFields.WriteTo(output);
     }
-    
+
     private int memoizedSerializedSize = -1;
     public override int SerializedSize {
@@ -2711,5 +2709,5 @@
         int size = memoizedSerializedSize;
         if (size != -1) return size;
-        
+
         size = 0;
         if (HasBar) {
@@ -2728,22 +2726,22 @@
       }
     }
-    
+
     public static ComplexOptionType2 ParseFrom(pb::ByteString data) {
-      return ((Builder) CreateBuilder().MergeFrom(data)).BuildParsed();
+      return ((Builder)CreateBuilder().MergeFrom(data)).BuildParsed();
     }
     public static ComplexOptionType2 ParseFrom(pb::ByteString data, pb::ExtensionRegistry extensionRegistry) {
-      return ((Builder) CreateBuilder().MergeFrom(data, extensionRegistry)).BuildParsed();
+      return ((Builder)CreateBuilder().MergeFrom(data, extensionRegistry)).BuildParsed();
     }
     public static ComplexOptionType2 ParseFrom(byte[] data) {
-      return ((Builder) CreateBuilder().MergeFrom(data)).BuildParsed();
+      return ((Builder)CreateBuilder().MergeFrom(data)).BuildParsed();
     }
     public static ComplexOptionType2 ParseFrom(byte[] data, pb::ExtensionRegistry extensionRegistry) {
-      return ((Builder) CreateBuilder().MergeFrom(data, extensionRegistry)).BuildParsed();
+      return ((Builder)CreateBuilder().MergeFrom(data, extensionRegistry)).BuildParsed();
     }
     public static ComplexOptionType2 ParseFrom(global::System.IO.Stream input) {
-      return ((Builder) CreateBuilder().MergeFrom(input)).BuildParsed();
+      return ((Builder)CreateBuilder().MergeFrom(input)).BuildParsed();
     }
     public static ComplexOptionType2 ParseFrom(global::System.IO.Stream input, pb::ExtensionRegistry extensionRegistry) {
-      return ((Builder) CreateBuilder().MergeFrom(input, extensionRegistry)).BuildParsed();
+      return ((Builder)CreateBuilder().MergeFrom(input, extensionRegistry)).BuildParsed();
     }
     public static ComplexOptionType2 ParseDelimitedFrom(global::System.IO.Stream input) {
@@ -2754,8 +2752,8 @@
     }
     public static ComplexOptionType2 ParseFrom(pb::CodedInputStream input) {
-      return ((Builder) CreateBuilder().MergeFrom(input)).BuildParsed();
+      return ((Builder)CreateBuilder().MergeFrom(input)).BuildParsed();
     }
     public static ComplexOptionType2 ParseFrom(pb::CodedInputStream input, pb::ExtensionRegistry extensionRegistry) {
-      return ((Builder) CreateBuilder().MergeFrom(input, extensionRegistry)).BuildParsed();
+      return ((Builder)CreateBuilder().MergeFrom(input, extensionRegistry)).BuildParsed();
     }
     public static Builder CreateBuilder() { return new Builder(); }
@@ -2763,36 +2761,36 @@
     public override Builder CreateBuilderForType() { return new Builder(); }
     public static Builder CreateBuilder(ComplexOptionType2 prototype) {
-      return (Builder) new Builder().MergeFrom(prototype);
-    }
-    
+      return (Builder)new Builder().MergeFrom(prototype);
+    }
+
     public sealed partial class Builder : pb::ExtendableBuilder<ComplexOptionType2, Builder> {
       protected override Builder ThisBuilder {
         get { return this; }
       }
-      public Builder() {}
-      
+      public Builder() { }
+
       ComplexOptionType2 result = new ComplexOptionType2();
-      
+
       protected override ComplexOptionType2 MessageBeingBuilt {
         get { return result; }
       }
-      
+
       public override Builder Clear() {
         result = new ComplexOptionType2();
         return this;
       }
-      
+
       public override Builder Clone() {
         return new Builder().MergeFrom(result);
       }
-      
+
       public override pbd::MessageDescriptor DescriptorForType {
         get { return global::Google.ProtocolBuffers.TestProtos.ComplexOptionType2.Descriptor; }
       }
-      
+
       public override ComplexOptionType2 DefaultInstanceForType {
         get { return global::Google.ProtocolBuffers.TestProtos.ComplexOptionType2.DefaultInstance; }
       }
-      
+
       public override ComplexOptionType2 BuildPartial() {
         if (result == null) {
@@ -2803,8 +2801,8 @@
         return returnMe;
       }
-      
+
       public override Builder MergeFrom(pb::IMessage other) {
         if (other is ComplexOptionType2) {
-          return MergeFrom((ComplexOptionType2) other);
+          return MergeFrom((ComplexOptionType2)other);
         } else {
           base.MergeFrom(other);
@@ -2812,5 +2810,5 @@
         }
       }
-      
+
       public override Builder MergeFrom(ComplexOptionType2 other) {
         if (other == global::Google.ProtocolBuffers.TestProtos.ComplexOptionType2.DefaultInstance) return this;
@@ -2824,13 +2822,13 @@
           MergeFred(other.Fred);
         }
-          this.MergeExtensionFields(other);
+        this.MergeExtensionFields(other);
         this.MergeUnknownFields(other.UnknownFields);
         return this;
       }
-      
+
       public override Builder MergeFrom(pb::CodedInputStream input) {
         return MergeFrom(input, pb::ExtensionRegistry.Empty);
       }
-      
+
       public override Builder MergeFrom(pb::CodedInputStream input, pb::ExtensionRegistry extensionRegistry) {
         pb::UnknownFieldSet.Builder unknownFields = null;
@@ -2839,11 +2837,4 @@
           switch (tag) {
             case 0: {
-              if (unknownFields != null) {
-                this.UnknownFields = unknownFields.Build();
-              }
-              return this;
-            }
-            default: {
-              if (pb::WireFormat.IsEndGroupTag(tag)) {
                 if (unknownFields != null) {
                   this.UnknownFields = unknownFields.Build();
@@ -2851,39 +2842,46 @@
                 return this;
               }
-              if (unknownFields == null) {
-                unknownFields = pb::UnknownFieldSet.CreateBuilder(this.UnknownFields);
+            default: {
+                if (pb::WireFormat.IsEndGroupTag(tag)) {
+                  if (unknownFields != null) {
+                    this.UnknownFields = unknownFields.Build();
+                  }
+                  return this;
+                }
+                if (unknownFields == null) {
+                  unknownFields = pb::UnknownFieldSet.CreateBuilder(this.UnknownFields);
+                }
+                ParseUnknownField(input, unknownFields, extensionRegistry, tag);
+                break;
               }
-              ParseUnknownField(input, unknownFields, extensionRegistry, tag);
-              break;
-            }
             case 10: {
-              global::Google.ProtocolBuffers.TestProtos.ComplexOptionType1.Builder subBuilder = global::Google.ProtocolBuffers.TestProtos.ComplexOptionType1.CreateBuilder();
-              if (HasBar) {
-                subBuilder.MergeFrom(Bar);
+                global::Google.ProtocolBuffers.TestProtos.ComplexOptionType1.Builder subBuilder = global::Google.ProtocolBuffers.TestProtos.ComplexOptionType1.CreateBuilder();
+                if (HasBar) {
+                  subBuilder.MergeFrom(Bar);
+                }
+                input.ReadMessage(subBuilder, extensionRegistry);
+                Bar = subBuilder.BuildPartial();
+                break;
               }
-              input.ReadMessage(subBuilder, extensionRegistry);
-              Bar = subBuilder.BuildPartial();
-              break;
-            }
             case 16: {
-              Baz = input.ReadInt32();
-              break;
-            }
+                Baz = input.ReadInt32();
+                break;
+              }
             case 26: {
-              global::Google.ProtocolBuffers.TestProtos.ComplexOptionType2.Types.ComplexOptionType4.Builder subBuilder = global::Google.ProtocolBuffers.TestProtos.ComplexOptionType2.Types.ComplexOptionType4.CreateBuilder();
-              if (HasFred) {
-                subBuilder.MergeFrom(Fred);
+                global::Google.ProtocolBuffers.TestProtos.ComplexOptionType2.Types.ComplexOptionType4.Builder subBuilder = global::Google.ProtocolBuffers.TestProtos.ComplexOptionType2.Types.ComplexOptionType4.CreateBuilder();
+                if (HasFred) {
+                  subBuilder.MergeFrom(Fred);
+                }
+                input.ReadMessage(subBuilder, extensionRegistry);
+                Fred = subBuilder.BuildPartial();
+                break;
               }
-              input.ReadMessage(subBuilder, extensionRegistry);
-              Fred = subBuilder.BuildPartial();
-              break;
-            }
-          }
-        }
-      }
-      
-      
+          }
+        }
+      }
+
+
       public bool HasBar {
-       get { return result.HasBar; }
+        get { return result.HasBar; }
       }
       public global::Google.ProtocolBuffers.TestProtos.ComplexOptionType1 Bar {
@@ -2907,5 +2905,5 @@
         if (result.HasBar &&
             result.bar_ != global::Google.ProtocolBuffers.TestProtos.ComplexOptionType1.DefaultInstance) {
-            result.bar_ = global::Google.ProtocolBuffers.TestProtos.ComplexOptionType1.CreateBuilder(result.bar_).MergeFrom(value).BuildPartial();
+          result.bar_ = global::Google.ProtocolBuffers.TestProtos.ComplexOptionType1.CreateBuilder(result.bar_).MergeFrom(value).BuildPartial();
         } else {
           result.bar_ = value;
@@ -2919,5 +2917,5 @@
         return this;
       }
-      
+
       public bool HasBaz {
         get { return result.HasBaz; }
@@ -2937,7 +2935,7 @@
         return this;
       }
-      
+
       public bool HasFred {
-       get { return result.HasFred; }
+        get { return result.HasFred; }
       }
       public global::Google.ProtocolBuffers.TestProtos.ComplexOptionType2.Types.ComplexOptionType4 Fred {
@@ -2961,5 +2959,5 @@
         if (result.HasFred &&
             result.fred_ != global::Google.ProtocolBuffers.TestProtos.ComplexOptionType2.Types.ComplexOptionType4.DefaultInstance) {
-            result.fred_ = global::Google.ProtocolBuffers.TestProtos.ComplexOptionType2.Types.ComplexOptionType4.CreateBuilder(result.fred_).MergeFrom(value).BuildPartial();
+          result.fred_ = global::Google.ProtocolBuffers.TestProtos.ComplexOptionType2.Types.ComplexOptionType4.CreateBuilder(result.fred_).MergeFrom(value).BuildPartial();
         } else {
           result.fred_ = value;
@@ -2978,5 +2976,5 @@
     }
   }
-  
+
   public sealed partial class ComplexOptionType3 : pb::GeneratedMessage<ComplexOptionType3, ComplexOptionType3.Builder> {
     private static readonly ComplexOptionType3 defaultInstance = new Builder().BuildPartial();
@@ -2984,21 +2982,21 @@
       get { return defaultInstance; }
     }
-    
+
     public override ComplexOptionType3 DefaultInstanceForType {
       get { return defaultInstance; }
     }
-    
+
     protected override ComplexOptionType3 ThisMessage {
       get { return this; }
     }
-    
+
     public static pbd::MessageDescriptor Descriptor {
       get { return global::Google.ProtocolBuffers.TestProtos.UnitTestCustomOptionsProtoFile.internal__static_protobuf_unittest_ComplexOptionType3__Descriptor; }
     }
-    
+
     protected override pb::FieldAccess.FieldAccessorTable<ComplexOptionType3, ComplexOptionType3.Builder> InternalFieldAccessors {
       get { return global::Google.ProtocolBuffers.TestProtos.UnitTestCustomOptionsProtoFile.internal__static_protobuf_unittest_ComplexOptionType3__FieldAccessorTable; }
     }
-    
+
     #region Nested types
     public static class Types {
@@ -3008,21 +3006,21 @@
           get { return defaultInstance; }
         }
-        
+
         public override ComplexOptionType5 DefaultInstanceForType {
           get { return defaultInstance; }
         }
-        
+
         protected override ComplexOptionType5 ThisMessage {
           get { return this; }
         }
-        
+
         public static pbd::MessageDescriptor Descriptor {
           get { return global::Google.ProtocolBuffers.TestProtos.UnitTestCustomOptionsProtoFile.internal__static_protobuf_unittest_ComplexOptionType3_ComplexOptionType5__Descriptor; }
         }
-        
+
         protected override pb::FieldAccess.FieldAccessorTable<ComplexOptionType5, ComplexOptionType5.Builder> InternalFieldAccessors {
           get { return global::Google.ProtocolBuffers.TestProtos.UnitTestCustomOptionsProtoFile.internal__static_protobuf_unittest_ComplexOptionType3_ComplexOptionType5__FieldAccessorTable; }
         }
-        
+
         public const int PlughFieldNumber = 3;
         private bool hasPlugh;
@@ -3034,5 +3032,5 @@
           get { return plugh_; }
         }
-        
+
         public override bool IsInitialized {
           get {
@@ -3040,5 +3038,5 @@
           }
         }
-        
+
         public override void WriteTo(pb::CodedOutputStream output) {
           int size = SerializedSize;
@@ -3048,5 +3046,5 @@
           UnknownFields.WriteTo(output);
         }
-        
+
         private int memoizedSerializedSize = -1;
         public override int SerializedSize {
@@ -3054,5 +3052,5 @@
             int size = memoizedSerializedSize;
             if (size != -1) return size;
-            
+
             size = 0;
             if (HasPlugh) {
@@ -3064,22 +3062,22 @@
           }
         }
-        
+
         public static ComplexOptionType5 ParseFrom(pb::ByteString data) {
-          return ((Builder) CreateBuilder().MergeFrom(data)).BuildParsed();
+          return ((Builder)CreateBuilder().MergeFrom(data)).BuildParsed();
         }
         public static ComplexOptionType5 ParseFrom(pb::ByteString data, pb::ExtensionRegistry extensionRegistry) {
-          return ((Builder) CreateBuilder().MergeFrom(data, extensionRegistry)).BuildParsed();
+          return ((Builder)CreateBuilder().MergeFrom(data, extensionRegistry)).BuildParsed();
         }
         public static ComplexOptionType5 ParseFrom(byte[] data) {
-          return ((Builder) CreateBuilder().MergeFrom(data)).BuildParsed();
+          return ((Builder)CreateBuilder().MergeFrom(data)).BuildParsed();
         }
         public static ComplexOptionType5 ParseFrom(byte[] data, pb::ExtensionRegistry extensionRegistry) {
-          return ((Builder) CreateBuilder().MergeFrom(data, extensionRegistry)).BuildParsed();
+          return ((Builder)CreateBuilder().MergeFrom(data, extensionRegistry)).BuildParsed();
         }
         public static ComplexOptionType5 ParseFrom(global::System.IO.Stream input) {
-          return ((Builder) CreateBuilder().MergeFrom(input)).BuildParsed();
+          return ((Builder)CreateBuilder().MergeFrom(input)).BuildParsed();
         }
         public static ComplexOptionType5 ParseFrom(global::System.IO.Stream input, pb::ExtensionRegistry extensionRegistry) {
-          return ((Builder) CreateBuilder().MergeFrom(input, extensionRegistry)).BuildParsed();
+          return ((Builder)CreateBuilder().MergeFrom(input, extensionRegistry)).BuildParsed();
         }
         public static ComplexOptionType5 ParseDelimitedFrom(global::System.IO.Stream input) {
@@ -3090,8 +3088,8 @@
         }
         public static ComplexOptionType5 ParseFrom(pb::CodedInputStream input) {
-          return ((Builder) CreateBuilder().MergeFrom(input)).BuildParsed();
+          return ((Builder)CreateBuilder().MergeFrom(input)).BuildParsed();
         }
         public static ComplexOptionType5 ParseFrom(pb::CodedInputStream input, pb::ExtensionRegistry extensionRegistry) {
-          return ((Builder) CreateBuilder().MergeFrom(input, extensionRegistry)).BuildParsed();
+          return ((Builder)CreateBuilder().MergeFrom(input, extensionRegistry)).BuildParsed();
         }
         public static Builder CreateBuilder() { return new Builder(); }
@@ -3099,36 +3097,36 @@
         public override Builder CreateBuilderForType() { return new Builder(); }
         public static Builder CreateBuilder(ComplexOptionType5 prototype) {
-          return (Builder) new Builder().MergeFrom(prototype);
-        }
-        
+          return (Builder)new Builder().MergeFrom(prototype);
+        }
+
         public sealed partial class Builder : pb::GeneratedBuilder<ComplexOptionType5, Builder> {
           protected override Builder ThisBuilder {
             get { return this; }
           }
-          public Builder() {}
-          
+          public Builder() { }
+
           ComplexOptionType5 result = new ComplexOptionType5();
-          
+
           protected override ComplexOptionType5 MessageBeingBuilt {
             get { return result; }
           }
-          
+
           public override Builder Clear() {
             result = new ComplexOptionType5();
             return this;
           }
-          
+
           public override Builder Clone() {
             return new Builder().MergeFrom(result);
           }
-          
+
           public override pbd::MessageDescriptor DescriptorForType {
             get { return global::Google.ProtocolBuffers.TestProtos.ComplexOptionType3.Types.ComplexOptionType5.Descriptor; }
           }
-          
+
           public override ComplexOptionType5 DefaultInstanceForType {
             get { return global::Google.ProtocolBuffers.TestProtos.ComplexOptionType3.Types.ComplexOptionType5.DefaultInstance; }
           }
-          
+
           public override ComplexOptionType5 BuildPartial() {
             if (result == null) {
@@ -3139,8 +3137,8 @@
             return returnMe;
           }
-          
+
           public override Builder MergeFrom(pb::IMessage other) {
             if (other is ComplexOptionType5) {
-              return MergeFrom((ComplexOptionType5) other);
+              return MergeFrom((ComplexOptionType5)other);
             } else {
               base.MergeFrom(other);
@@ -3148,5 +3146,5 @@
             }
           }
-          
+
           public override Builder MergeFrom(ComplexOptionType5 other) {
             if (other == global::Google.ProtocolBuffers.TestProtos.ComplexOptionType3.Types.ComplexOptionType5.DefaultInstance) return this;
@@ -3157,9 +3155,9 @@
             return this;
           }
-          
+
           public override Builder MergeFrom(pb::CodedInputStream input) {
             return MergeFrom(input, pb::ExtensionRegistry.Empty);
           }
-          
+
           public override Builder MergeFrom(pb::CodedInputStream input, pb::ExtensionRegistry extensionRegistry) {
             pb::UnknownFieldSet.Builder unknownFields = null;
@@ -3168,11 +3166,4 @@
               switch (tag) {
                 case 0: {
-                  if (unknownFields != null) {
-                    this.UnknownFields = unknownFields.Build();
-                  }
-                  return this;
-                }
-                default: {
-                  if (pb::WireFormat.IsEndGroupTag(tag)) {
                     if (unknownFields != null) {
                       this.UnknownFields = unknownFields.Build();
@@ -3180,19 +3171,26 @@
                     return this;
                   }
-                  if (unknownFields == null) {
-                    unknownFields = pb::UnknownFieldSet.CreateBuilder(this.UnknownFields);
+                default: {
+                    if (pb::WireFormat.IsEndGroupTag(tag)) {
+                      if (unknownFields != null) {
+                        this.UnknownFields = unknownFields.Build();
+                      }
+                      return this;
+                    }
+                    if (unknownFields == null) {
+                      unknownFields = pb::UnknownFieldSet.CreateBuilder(this.UnknownFields);
+                    }
+                    ParseUnknownField(input, unknownFields, extensionRegistry, tag);
+                    break;
                   }
-                  ParseUnknownField(input, unknownFields, extensionRegistry, tag);
-                  break;
-                }
                 case 24: {
-                  Plugh = input.ReadInt32();
-                  break;
-                }
+                    Plugh = input.ReadInt32();
+                    break;
+                  }
               }
             }
           }
-          
-          
+
+
           public bool HasPlugh {
             get { return result.HasPlugh; }
@@ -3217,8 +3215,8 @@
         }
       }
-      
+
     }
     #endregion
-    
+
     public const int QuxFieldNumber = 1;
     private bool hasQux;
@@ -3230,5 +3228,5 @@
       get { return qux_; }
     }
-    
+
     public const int ComplexOptionType5FieldNumber = 2;
     private bool hasComplexOptionType5;
@@ -3240,5 +3238,5 @@
       get { return complexOptionType5_; }
     }
-    
+
     public override bool IsInitialized {
       get {
@@ -3246,5 +3244,5 @@
       }
     }
-    
+
     public override void WriteTo(pb::CodedOutputStream output) {
       int size = SerializedSize;
@@ -3257,5 +3255,5 @@
       UnknownFields.WriteTo(output);
     }
-    
+
     private int memoizedSerializedSize = -1;
     public override int SerializedSize {
@@ -3263,5 +3261,5 @@
         int size = memoizedSerializedSize;
         if (size != -1) return size;
-        
+
         size = 0;
         if (HasQux) {
@@ -3276,22 +3274,22 @@
       }
     }
-    
+
     public static ComplexOptionType3 ParseFrom(pb::ByteString data) {
-      return ((Builder) CreateBuilder().MergeFrom(data)).BuildParsed();
+      return ((Builder)CreateBuilder().MergeFrom(data)).BuildParsed();
     }
     public static ComplexOptionType3 ParseFrom(pb::ByteString data, pb::ExtensionRegistry extensionRegistry) {
-      return ((Builder) CreateBuilder().MergeFrom(data, extensionRegistry)).BuildParsed();
+      return ((Builder)CreateBuilder().MergeFrom(data, extensionRegistry)).BuildParsed();
     }
     public static ComplexOptionType3 ParseFrom(byte[] data) {
-      return ((Builder) CreateBuilder().MergeFrom(data)).BuildParsed();
+      return ((Builder)CreateBuilder().MergeFrom(data)).BuildParsed();
     }
     public static ComplexOptionType3 ParseFrom(byte[] data, pb::ExtensionRegistry extensionRegistry) {
-      return ((Builder) CreateBuilder().MergeFrom(data, extensionRegistry)).BuildParsed();
+      return ((Builder)CreateBuilder().MergeFrom(data, extensionRegistry)).BuildParsed();
     }
     public static ComplexOptionType3 ParseFrom(global::System.IO.Stream input) {
-      return ((Builder) CreateBuilder().MergeFrom(input)).BuildParsed();
+      return ((Builder)CreateBuilder().MergeFrom(input)).BuildParsed();
     }
     public static ComplexOptionType3 ParseFrom(global::System.IO.Stream input, pb::ExtensionRegistry extensionRegistry) {
-      return ((Builder) CreateBuilder().MergeFrom(input, extensionRegistry)).BuildParsed();
+      return ((Builder)CreateBuilder().MergeFrom(input, extensionRegistry)).BuildParsed();
     }
     public static ComplexOptionType3 ParseDelimitedFrom(global::System.IO.Stream input) {
@@ -3302,8 +3300,8 @@
     }
     public static ComplexOptionType3 ParseFrom(pb::CodedInputStream input) {
-      return ((Builder) CreateBuilder().MergeFrom(input)).BuildParsed();
+      return ((Builder)CreateBuilder().MergeFrom(input)).BuildParsed();
     }
     public static ComplexOptionType3 ParseFrom(pb::CodedInputStream input, pb::ExtensionRegistry extensionRegistry) {
-      return ((Builder) CreateBuilder().MergeFrom(input, extensionRegistry)).BuildParsed();
+      return ((Builder)CreateBuilder().MergeFrom(input, extensionRegistry)).BuildParsed();
     }
     public static Builder CreateBuilder() { return new Builder(); }
@@ -3311,36 +3309,36 @@
     public override Builder CreateBuilderForType() { return new Builder(); }
     public static Builder CreateBuilder(ComplexOptionType3 prototype) {
-      return (Builder) new Builder().MergeFrom(prototype);
-    }
-    
+      return (Builder)new Builder().MergeFrom(prototype);
+    }
+
     public sealed partial class Builder : pb::GeneratedBuilder<ComplexOptionType3, Builder> {
       protected override Builder ThisBuilder {
         get { return this; }
       }
-      public Builder() {}
-      
+      public Builder() { }
+
       ComplexOptionType3 result = new ComplexOptionType3();
-      
+
       protected override ComplexOptionType3 MessageBeingBuilt {
         get { return result; }
       }
-      
+
       public override Builder Clear() {
         result = new ComplexOptionType3();
         return this;
       }
-      
+
       public override Builder Clone() {
         return new Builder().MergeFrom(result);
       }
-      
+
       public override pbd::MessageDescriptor DescriptorForType {
         get { return global::Google.ProtocolBuffers.TestProtos.ComplexOptionType3.Descriptor; }
       }
-      
+
       public override ComplexOptionType3 DefaultInstanceForType {
         get { return global::Google.ProtocolBuffers.TestProtos.ComplexOptionType3.DefaultInstance; }
       }
-      
+
       public override ComplexOptionType3 BuildPartial() {
         if (result == null) {
@@ -3351,8 +3349,8 @@
         return returnMe;
       }
-      
+
       public override Builder MergeFrom(pb::IMessage other) {
         if (other is ComplexOptionType3) {
-          return MergeFrom((ComplexOptionType3) other);
+          return MergeFrom((ComplexOptionType3)other);
         } else {
           base.MergeFrom(other);
@@ -3360,5 +3358,5 @@
         }
       }
-      
+
       public override Builder MergeFrom(ComplexOptionType3 other) {
         if (other == global::Google.ProtocolBuffers.TestProtos.ComplexOptionType3.DefaultInstance) return this;
@@ -3372,9 +3370,9 @@
         return this;
       }
-      
+
       public override Builder MergeFrom(pb::CodedInputStream input) {
         return MergeFrom(input, pb::ExtensionRegistry.Empty);
       }
-      
+
       public override Builder MergeFrom(pb::CodedInputStream input, pb::ExtensionRegistry extensionRegistry) {
         pb::UnknownFieldSet.Builder unknownFields = null;
@@ -3383,11 +3381,4 @@
           switch (tag) {
             case 0: {
-              if (unknownFields != null) {
-                this.UnknownFields = unknownFields.Build();
-              }
-              return this;
-            }
-            default: {
-              if (pb::WireFormat.IsEndGroupTag(tag)) {
                 if (unknownFields != null) {
                   this.UnknownFields = unknownFields.Build();
@@ -3395,28 +3386,35 @@
                 return this;
               }
-              if (unknownFields == null) {
-                unknownFields = pb::UnknownFieldSet.CreateBuilder(this.UnknownFields);
+            default: {
+                if (pb::WireFormat.IsEndGroupTag(tag)) {
+                  if (unknownFields != null) {
+                    this.UnknownFields = unknownFields.Build();
+                  }
+                  return this;
+                }
+                if (unknownFields == null) {
+                  unknownFields = pb::UnknownFieldSet.CreateBuilder(this.UnknownFields);
+                }
+                ParseUnknownField(input, unknownFields, extensionRegistry, tag);
+                break;
               }
-              ParseUnknownField(input, unknownFields, extensionRegistry, tag);
-              break;
-            }
             case 8: {
-              Qux = input.ReadInt32();
-              break;
-            }
+                Qux = input.ReadInt32();
+                break;
+              }
             case 19: {
-              global::Google.ProtocolBuffers.TestProtos.ComplexOptionType3.Types.ComplexOptionType5.Builder subBuilder = global::Google.ProtocolBuffers.TestProtos.ComplexOptionType3.Types.ComplexOptionType5.CreateBuilder();
-              if (HasComplexOptionType5) {
-                subBuilder.MergeFrom(ComplexOptionType5);
+                global::Google.ProtocolBuffers.TestProtos.ComplexOptionType3.Types.ComplexOptionType5.Builder subBuilder = global::Google.ProtocolBuffers.TestProtos.ComplexOptionType3.Types.ComplexOptionType5.CreateBuilder();
+                if (HasComplexOptionType5) {
+                  subBuilder.MergeFrom(ComplexOptionType5);
+                }
+                input.ReadGroup(2, subBuilder, extensionRegistry);
+                ComplexOptionType5 = subBuilder.BuildPartial();
+                break;
               }
-              input.ReadGroup(2, subBuilder, extensionRegistry);
-              ComplexOptionType5 = subBuilder.BuildPartial();
-              break;
-            }
-          }
-        }
-      }
-      
-      
+          }
+        }
+      }
+
+
       public bool HasQux {
         get { return result.HasQux; }
@@ -3436,7 +3434,7 @@
         return this;
       }
-      
+
       public bool HasComplexOptionType5 {
-       get { return result.HasComplexOptionType5; }
+        get { return result.HasComplexOptionType5; }
       }
       public global::Google.ProtocolBuffers.TestProtos.ComplexOptionType3.Types.ComplexOptionType5 ComplexOptionType5 {
@@ -3460,5 +3458,5 @@
         if (result.HasComplexOptionType5 &&
             result.complexOptionType5_ != global::Google.ProtocolBuffers.TestProtos.ComplexOptionType3.Types.ComplexOptionType5.DefaultInstance) {
-            result.complexOptionType5_ = global::Google.ProtocolBuffers.TestProtos.ComplexOptionType3.Types.ComplexOptionType5.CreateBuilder(result.complexOptionType5_).MergeFrom(value).BuildPartial();
+          result.complexOptionType5_ = global::Google.ProtocolBuffers.TestProtos.ComplexOptionType3.Types.ComplexOptionType5.CreateBuilder(result.complexOptionType5_).MergeFrom(value).BuildPartial();
         } else {
           result.complexOptionType5_ = value;
@@ -3477,5 +3475,5 @@
     }
   }
-  
+
   public sealed partial class ComplexOpt6 : pb::GeneratedMessage<ComplexOpt6, ComplexOpt6.Builder> {
     private static readonly ComplexOpt6 defaultInstance = new Builder().BuildPartial();
@@ -3483,21 +3481,21 @@
       get { return defaultInstance; }
     }
-    
+
     public override ComplexOpt6 DefaultInstanceForType {
       get { return defaultInstance; }
     }
-    
+
     protected override ComplexOpt6 ThisMessage {
       get { return this; }
     }
-    
+
     public static pbd::MessageDescriptor Descriptor {
       get { return global::Google.ProtocolBuffers.TestProtos.UnitTestCustomOptionsProtoFile.internal__static_protobuf_unittest_ComplexOpt6__Descriptor; }
     }
-    
+
     protected override pb::FieldAccess.FieldAccessorTable<ComplexOpt6, ComplexOpt6.Builder> InternalFieldAccessors {
       get { return global::Google.ProtocolBuffers.TestProtos.UnitTestCustomOptionsProtoFile.internal__static_protobuf_unittest_ComplexOpt6__FieldAccessorTable; }
     }
-    
+
     public const int XyzzyFieldNumber = 7593951;
     private bool hasXyzzy;
@@ -3509,5 +3507,5 @@
       get { return xyzzy_; }
     }
-    
+
     public override bool IsInitialized {
       get {
@@ -3515,5 +3513,5 @@
       }
     }
-    
+
     public override void WriteTo(pb::CodedOutputStream output) {
       int size = SerializedSize;
@@ -3523,5 +3521,5 @@
       UnknownFields.WriteTo(output);
     }
-    
+
     private int memoizedSerializedSize = -1;
     public override int SerializedSize {
@@ -3529,5 +3527,5 @@
         int size = memoizedSerializedSize;
         if (size != -1) return size;
-        
+
         size = 0;
         if (HasXyzzy) {
@@ -3539,22 +3537,22 @@
       }
     }
-    
+
     public static ComplexOpt6 ParseFrom(pb::ByteString data) {
-      return ((Builder) CreateBuilder().MergeFrom(data)).BuildParsed();
+      return ((Builder)CreateBuilder().MergeFrom(data)).BuildParsed();
     }
     public static ComplexOpt6 ParseFrom(pb::ByteString data, pb::ExtensionRegistry extensionRegistry) {
-      return ((Builder) CreateBuilder().MergeFrom(data, extensionRegistry)).BuildParsed();
+      return ((Builder)CreateBuilder().MergeFrom(data, extensionRegistry)).BuildParsed();
     }
     public static ComplexOpt6 ParseFrom(byte[] data) {
-      return ((Builder) CreateBuilder().MergeFrom(data)).BuildParsed();
+      return ((Builder)CreateBuilder().MergeFrom(data)).BuildParsed();
     }
     public static ComplexOpt6 ParseFrom(byte[] data, pb::ExtensionRegistry extensionRegistry) {
-      return ((Builder) CreateBuilder().MergeFrom(data, extensionRegistry)).BuildParsed();
+      return ((Builder)CreateBuilder().MergeFrom(data, extensionRegistry)).BuildParsed();
     }
     public static ComplexOpt6 ParseFrom(global::System.IO.Stream input) {
-      return ((Builder) CreateBuilder().MergeFrom(input)).BuildParsed();
+      return ((Builder)CreateBuilder().MergeFrom(input)).BuildParsed();
     }
     public static ComplexOpt6 ParseFrom(global::System.IO.Stream input, pb::ExtensionRegistry extensionRegistry) {
-      return ((Builder) CreateBuilder().MergeFrom(input, extensionRegistry)).BuildParsed();
+      return ((Builder)CreateBuilder().MergeFrom(input, extensionRegistry)).BuildParsed();
     }
     public static ComplexOpt6 ParseDelimitedFrom(global::System.IO.Stream input) {
@@ -3565,8 +3563,8 @@
     }
     public static ComplexOpt6 ParseFrom(pb::CodedInputStream input) {
-      return ((Builder) CreateBuilder().MergeFrom(input)).BuildParsed();
+      return ((Builder)CreateBuilder().MergeFrom(input)).BuildParsed();
     }
     public static ComplexOpt6 ParseFrom(pb::CodedInputStream input, pb::ExtensionRegistry extensionRegistry) {
-      return ((Builder) CreateBuilder().MergeFrom(input, extensionRegistry)).BuildParsed();
+      return ((Builder)CreateBuilder().MergeFrom(input, extensionRegistry)).BuildParsed();
     }
     public static Builder CreateBuilder() { return new Builder(); }
@@ -3574,36 +3572,36 @@
     public override Builder CreateBuilderForType() { return new Builder(); }
     public static Builder CreateBuilder(ComplexOpt6 prototype) {
-      return (Builder) new Builder().MergeFrom(prototype);
-    }
-    
+      return (Builder)new Builder().MergeFrom(prototype);
+    }
+
     public sealed partial class Builder : pb::GeneratedBuilder<ComplexOpt6, Builder> {
       protected override Builder ThisBuilder {
         get { return this; }
       }
-      public Builder() {}
-      
+      public Builder() { }
+
       ComplexOpt6 result = new ComplexOpt6();
-      
+
       protected override ComplexOpt6 MessageBeingBuilt {
         get { return result; }
       }
-      
+
       public override Builder Clear() {
         result = new ComplexOpt6();
         return this;
       }
-      
+
       public override Builder Clone() {
         return new Builder().MergeFrom(result);
       }
-      
+
       public override pbd::MessageDescriptor DescriptorForType {
         get { return global::Google.ProtocolBuffers.TestProtos.ComplexOpt6.Descriptor; }
       }
-      
+
       public override ComplexOpt6 DefaultInstanceForType {
         get { return global::Google.ProtocolBuffers.TestProtos.ComplexOpt6.DefaultInstance; }
       }
-      
+
       public override ComplexOpt6 BuildPartial() {
         if (result == null) {
@@ -3614,8 +3612,8 @@
         return returnMe;
       }
-      
+
       public override Builder MergeFrom(pb::IMessage other) {
         if (other is ComplexOpt6) {
-          return MergeFrom((ComplexOpt6) other);
+          return MergeFrom((ComplexOpt6)other);
         } else {
           base.MergeFrom(other);
@@ -3623,5 +3621,5 @@
         }
       }
-      
+
       public override Builder MergeFrom(ComplexOpt6 other) {
         if (other == global::Google.ProtocolBuffers.TestProtos.ComplexOpt6.DefaultInstance) return this;
@@ -3632,9 +3630,9 @@
         return this;
       }
-      
+
       public override Builder MergeFrom(pb::CodedInputStream input) {
         return MergeFrom(input, pb::ExtensionRegistry.Empty);
       }
-      
+
       public override Builder MergeFrom(pb::CodedInputStream input, pb::ExtensionRegistry extensionRegistry) {
         pb::UnknownFieldSet.Builder unknownFields = null;
@@ -3643,11 +3641,4 @@
           switch (tag) {
             case 0: {
-              if (unknownFields != null) {
-                this.UnknownFields = unknownFields.Build();
-              }
-              return this;
-            }
-            default: {
-              if (pb::WireFormat.IsEndGroupTag(tag)) {
                 if (unknownFields != null) {
                   this.UnknownFields = unknownFields.Build();
@@ -3655,19 +3646,26 @@
                 return this;
               }
-              if (unknownFields == null) {
-                unknownFields = pb::UnknownFieldSet.CreateBuilder(this.UnknownFields);
+            default: {
+                if (pb::WireFormat.IsEndGroupTag(tag)) {
+                  if (unknownFields != null) {
+                    this.UnknownFields = unknownFields.Build();
+                  }
+                  return this;
+                }
+                if (unknownFields == null) {
+                  unknownFields = pb::UnknownFieldSet.CreateBuilder(this.UnknownFields);
+                }
+                ParseUnknownField(input, unknownFields, extensionRegistry, tag);
+                break;
               }
-              ParseUnknownField(input, unknownFields, extensionRegistry, tag);
-              break;
-            }
             case 60751608: {
-              Xyzzy = input.ReadInt32();
-              break;
-            }
-          }
-        }
-      }
-      
-      
+                Xyzzy = input.ReadInt32();
+                break;
+              }
+          }
+        }
+      }
+
+
       public bool HasXyzzy {
         get { return result.HasXyzzy; }
@@ -3692,5 +3690,5 @@
     }
   }
-  
+
   public sealed partial class VariousComplexOptions : pb::GeneratedMessage<VariousComplexOptions, VariousComplexOptions.Builder> {
     private static readonly VariousComplexOptions defaultInstance = new Builder().BuildPartial();
@@ -3698,21 +3696,21 @@
       get { return defaultInstance; }
     }
-    
+
     public override VariousComplexOptions DefaultInstanceForType {
       get { return defaultInstance; }
     }
-    
+
     protected override VariousComplexOptions ThisMessage {
       get { return this; }
     }
-    
+
     public static pbd::MessageDescriptor Descriptor {
       get { return global::Google.ProtocolBuffers.TestProtos.UnitTestCustomOptionsProtoFile.internal__static_protobuf_unittest_VariousComplexOptions__Descriptor; }
     }
-    
+
     protected override pb::FieldAccess.FieldAccessorTable<VariousComplexOptions, VariousComplexOptions.Builder> InternalFieldAccessors {
       get { return global::Google.ProtocolBuffers.TestProtos.UnitTestCustomOptionsProtoFile.internal__static_protobuf_unittest_VariousComplexOptions__FieldAccessorTable; }
     }
-    
+
     public override bool IsInitialized {
       get {
@@ -3720,10 +3718,10 @@
       }
     }
-    
+
     public override void WriteTo(pb::CodedOutputStream output) {
       int size = SerializedSize;
       UnknownFields.WriteTo(output);
     }
-    
+
     private int memoizedSerializedSize = -1;
     public override int SerializedSize {
@@ -3731,5 +3729,5 @@
         int size = memoizedSerializedSize;
         if (size != -1) return size;
-        
+
         size = 0;
         size += UnknownFields.SerializedSize;
@@ -3738,22 +3736,22 @@
       }
     }
-    
+
     public static VariousComplexOptions ParseFrom(pb::ByteString data) {
-      return ((Builder) CreateBuilder().MergeFrom(data)).BuildParsed();
+      return ((Builder)CreateBuilder().MergeFrom(data)).BuildParsed();
     }
     public static VariousComplexOptions ParseFrom(pb::ByteString data, pb::ExtensionRegistry extensionRegistry) {
-      return ((Builder) CreateBuilder().MergeFrom(data, extensionRegistry)).BuildParsed();
+      return ((Builder)CreateBuilder().MergeFrom(data, extensionRegistry)).BuildParsed();
     }
     public static VariousComplexOptions ParseFrom(byte[] data) {
-      return ((Builder) CreateBuilder().MergeFrom(data)).BuildParsed();
+      return ((Builder)CreateBuilder().MergeFrom(data)).BuildParsed();
     }
     public static VariousComplexOptions ParseFrom(byte[] data, pb::ExtensionRegistry extensionRegistry) {
-      return ((Builder) CreateBuilder().MergeFrom(data, extensionRegistry)).BuildParsed();
+      return ((Builder)CreateBuilder().MergeFrom(data, extensionRegistry)).BuildParsed();
     }
     public static VariousComplexOptions ParseFrom(global::System.IO.Stream input) {
-      return ((Builder) CreateBuilder().MergeFrom(input)).BuildParsed();
+      return ((Builder)CreateBuilder().MergeFrom(input)).BuildParsed();
     }
     public static VariousComplexOptions ParseFrom(global::System.IO.Stream input, pb::ExtensionRegistry extensionRegistry) {
-      return ((Builder) CreateBuilder().MergeFrom(input, extensionRegistry)).BuildParsed();
+      return ((Builder)CreateBuilder().MergeFrom(input, extensionRegistry)).BuildParsed();
     }
     public static VariousComplexOptions ParseDelimitedFrom(global::System.IO.Stream input) {
@@ -3764,8 +3762,8 @@
     }
     public static VariousComplexOptions ParseFrom(pb::CodedInputStream input) {
-      return ((Builder) CreateBuilder().MergeFrom(input)).BuildParsed();
+      return ((Builder)CreateBuilder().MergeFrom(input)).BuildParsed();
     }
     public static VariousComplexOptions ParseFrom(pb::CodedInputStream input, pb::ExtensionRegistry extensionRegistry) {
-      return ((Builder) CreateBuilder().MergeFrom(input, extensionRegistry)).BuildParsed();
+      return ((Builder)CreateBuilder().MergeFrom(input, extensionRegistry)).BuildParsed();
     }
     public static Builder CreateBuilder() { return new Builder(); }
@@ -3773,36 +3771,36 @@
     public override Builder CreateBuilderForType() { return new Builder(); }
     public static Builder CreateBuilder(VariousComplexOptions prototype) {
-      return (Builder) new Builder().MergeFrom(prototype);
-    }
-    
+      return (Builder)new Builder().MergeFrom(prototype);
+    }
+
     public sealed partial class Builder : pb::GeneratedBuilder<VariousComplexOptions, Builder> {
       protected override Builder ThisBuilder {
         get { return this; }
       }
-      public Builder() {}
-      
+      public Builder() { }
+
       VariousComplexOptions result = new VariousComplexOptions();
-      
+
       protected override VariousComplexOptions MessageBeingBuilt {
         get { return result; }
       }
-      
+
       public override Builder Clear() {
         result = new VariousComplexOptions();
         return this;
       }
-      
+
       public override Builder Clone() {
         return new Builder().MergeFrom(result);
       }
-      
+
       public override pbd::MessageDescriptor DescriptorForType {
         get { return global::Google.ProtocolBuffers.TestProtos.VariousComplexOptions.Descriptor; }
       }
-      
+
       public override VariousComplexOptions DefaultInstanceForType {
         get { return global::Google.ProtocolBuffers.TestProtos.VariousComplexOptions.DefaultInstance; }
       }
-      
+
       public override VariousComplexOptions BuildPartial() {
         if (result == null) {
@@ -3813,8 +3811,8 @@
         return returnMe;
       }
-      
+
       public override Builder MergeFrom(pb::IMessage other) {
         if (other is VariousComplexOptions) {
-          return MergeFrom((VariousComplexOptions) other);
+          return MergeFrom((VariousComplexOptions)other);
         } else {
           base.MergeFrom(other);
@@ -3822,5 +3820,5 @@
         }
       }
-      
+
       public override Builder MergeFrom(VariousComplexOptions other) {
         if (other == global::Google.ProtocolBuffers.TestProtos.VariousComplexOptions.DefaultInstance) return this;
@@ -3828,9 +3826,9 @@
         return this;
       }
-      
+
       public override Builder MergeFrom(pb::CodedInputStream input) {
         return MergeFrom(input, pb::ExtensionRegistry.Empty);
       }
-      
+
       public override Builder MergeFrom(pb::CodedInputStream input, pb::ExtensionRegistry extensionRegistry) {
         pb::UnknownFieldSet.Builder unknownFields = null;
@@ -3839,11 +3837,4 @@
           switch (tag) {
             case 0: {
-              if (unknownFields != null) {
-                this.UnknownFields = unknownFields.Build();
-              }
-              return this;
-            }
-            default: {
-              if (pb::WireFormat.IsEndGroupTag(tag)) {
                 if (unknownFields != null) {
                   this.UnknownFields = unknownFields.Build();
@@ -3851,14 +3842,21 @@
                 return this;
               }
-              if (unknownFields == null) {
-                unknownFields = pb::UnknownFieldSet.CreateBuilder(this.UnknownFields);
+            default: {
+                if (pb::WireFormat.IsEndGroupTag(tag)) {
+                  if (unknownFields != null) {
+                    this.UnknownFields = unknownFields.Build();
+                  }
+                  return this;
+                }
+                if (unknownFields == null) {
+                  unknownFields = pb::UnknownFieldSet.CreateBuilder(this.UnknownFields);
+                }
+                ParseUnknownField(input, unknownFields, extensionRegistry, tag);
+                break;
               }
-              ParseUnknownField(input, unknownFields, extensionRegistry, tag);
-              break;
-            }
-          }
-        }
-      }
-      
+          }
+        }
+      }
+
     }
     static VariousComplexOptions() {
@@ -3866,7 +3864,7 @@
     }
   }
-  
+
   #endregion
-  
+
   #region Services
   public abstract class TestServiceWithCustomOptions : pb::IService {
@@ -3875,5 +3873,5 @@
         global::Google.ProtocolBuffers.TestProtos.CustomOptionFooRequest request,
         global::System.Action<global::Google.ProtocolBuffers.TestProtos.CustomOptionFooResponse> done);
-    
+
     public static pbd::ServiceDescriptor Descriptor {
       get { return UnitTestCustomOptionsProtoFile.Descriptor.Services[0]; }
@@ -3882,5 +3880,5 @@
       get { return Descriptor; }
     }
-    
+
     public void CallMethod(
         pbd::MethodDescriptor method,
@@ -3892,7 +3890,7 @@
             "Service.CallMethod() given method descriptor for wrong service type.");
       }
-      switch(method.Index) {
+      switch (method.Index) {
         case 0:
-          this.Foo(controller, (global::Google.ProtocolBuffers.TestProtos.CustomOptionFooRequest) request,
+          this.Foo(controller, (global::Google.ProtocolBuffers.TestProtos.CustomOptionFooRequest)request,
               pb::RpcUtil.SpecializeCallback<global::Google.ProtocolBuffers.TestProtos.CustomOptionFooResponse>(
               done));
@@ -3902,5 +3900,5 @@
       }
     }
-    
+
     public pb::IMessage GetRequestPrototype(pbd::MethodDescriptor method) {
       if (method.Service != Descriptor) {
@@ -3908,5 +3906,5 @@
             "Service.GetRequestPrototype() given method descriptor for wrong service type.");
       }
-      switch(method.Index) {
+      switch (method.Index) {
         case 0:
           return global::Google.ProtocolBuffers.TestProtos.CustomOptionFooRequest.DefaultInstance;
@@ -3915,5 +3913,5 @@
       }
     }
-    
+
     public pb::IMessage GetResponsePrototype(pbd::MethodDescriptor method) {
       if (method.Service != Descriptor) {
@@ -3921,5 +3919,5 @@
             "Service.GetResponsePrototype() given method descriptor for wrong service type.");
       }
-      switch(method.Index) {
+      switch (method.Index) {
         case 0:
           return global::Google.ProtocolBuffers.TestProtos.CustomOptionFooResponse.DefaultInstance;
@@ -3928,20 +3926,20 @@
       }
     }
-    
+
     public static Stub CreateStub(pb::IRpcChannel channel) {
       return new Stub(channel);
     }
-    
+
     public class Stub : global::Google.ProtocolBuffers.TestProtos.TestServiceWithCustomOptions {
       internal Stub(pb::IRpcChannel channel) {
         this.channel = channel;
       }
-      
+
       private readonly pb::IRpcChannel channel;
-      
+
       public pb::IRpcChannel Channel {
         get { return channel; }
       }
-      
+
       public override void Foo(
           pb::IRpcController controller,
@@ -3955,4 +3953,4 @@
   }
   #endregion
-  
+
 }
Index: /trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.ProtobufCS/0.9.1/ProtobufCS/src/ProtocolBuffers.Test/TestProtos/UnitTestImportProtoFile.cs
===================================================================
--- /trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.ProtobufCS/0.9.1/ProtobufCS/src/ProtocolBuffers.Test/TestProtos/UnitTestImportProtoFile.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.ProtobufCS/0.9.1/ProtobufCS/src/ProtocolBuffers.Test/TestProtos/UnitTestImportProtoFile.cs	(revision 4068)
@@ -2,11 +2,9 @@
 
 using pb = global::Google.ProtocolBuffers;
-using pbc = global::Google.ProtocolBuffers.Collections;
 using pbd = global::Google.ProtocolBuffers.Descriptors;
-using scg = global::System.Collections.Generic;
 namespace Google.ProtocolBuffers.TestProtos {
-  
+
   public static partial class UnitTestImportProtoFile {
-  
+
     #region Extension registration
     public static void RegisterAllExtensions(pb::ExtensionRegistry registry) {
@@ -22,18 +20,18 @@
     }
     private static pbd::FileDescriptor descriptor;
-    
+
     static UnitTestImportProtoFile() {
       byte[] descriptorData = global::System.Convert.FromBase64String(
-          "CiVnb29nbGUvcHJvdG9idWYvdW5pdHRlc3RfaW1wb3J0LnByb3RvEhhwcm90" + 
-          "b2J1Zl91bml0dGVzdF9pbXBvcnQaJGdvb2dsZS9wcm90b2J1Zi9jc2hhcnBf" + 
-          "b3B0aW9ucy5wcm90byIaCg1JbXBvcnRNZXNzYWdlEgkKAWQYASABKAUqPAoK" + 
-          "SW1wb3J0RW51bRIOCgpJTVBPUlRfRk9PEAcSDgoKSU1QT1JUX0JBUhAIEg4K" + 
-          "CklNUE9SVF9CQVoQCUJbChhjb20uZ29vZ2xlLnByb3RvYnVmLnRlc3RIAcI+" + 
-          "PAohR29vZ2xlLlByb3RvY29sQnVmZmVycy5UZXN0UHJvdG9zEhdVbml0VGVz" + 
+          "CiVnb29nbGUvcHJvdG9idWYvdW5pdHRlc3RfaW1wb3J0LnByb3RvEhhwcm90" +
+          "b2J1Zl91bml0dGVzdF9pbXBvcnQaJGdvb2dsZS9wcm90b2J1Zi9jc2hhcnBf" +
+          "b3B0aW9ucy5wcm90byIaCg1JbXBvcnRNZXNzYWdlEgkKAWQYASABKAUqPAoK" +
+          "SW1wb3J0RW51bRIOCgpJTVBPUlRfRk9PEAcSDgoKSU1QT1JUX0JBUhAIEg4K" +
+          "CklNUE9SVF9CQVoQCUJbChhjb20uZ29vZ2xlLnByb3RvYnVmLnRlc3RIAcI+" +
+          "PAohR29vZ2xlLlByb3RvY29sQnVmZmVycy5UZXN0UHJvdG9zEhdVbml0VGVz" +
           "dEltcG9ydFByb3RvRmlsZQ==");
       pbd::FileDescriptor.InternalDescriptorAssigner assigner = delegate(pbd::FileDescriptor root) {
         descriptor = root;
         internal__static_protobuf_unittest_import_ImportMessage__Descriptor = Descriptor.MessageTypes[0];
-        internal__static_protobuf_unittest_import_ImportMessage__FieldAccessorTable = 
+        internal__static_protobuf_unittest_import_ImportMessage__FieldAccessorTable =
             new pb::FieldAccess.FieldAccessorTable<global::Google.ProtocolBuffers.TestProtos.ImportMessage, global::Google.ProtocolBuffers.TestProtos.ImportMessage.Builder>(internal__static_protobuf_unittest_import_ImportMessage__Descriptor,
                 new string[] { "D", });
@@ -49,5 +47,5 @@
     }
     #endregion
-    
+
   }
   #region Enums
@@ -57,7 +55,7 @@
     IMPORT_BAZ = 9,
   }
-  
+
   #endregion
-  
+
   #region Messages
   public sealed partial class ImportMessage : pb::GeneratedMessage<ImportMessage, ImportMessage.Builder> {
@@ -66,21 +64,21 @@
       get { return defaultInstance; }
     }
-    
+
     public override ImportMessage DefaultInstanceForType {
       get { return defaultInstance; }
     }
-    
+
     protected override ImportMessage ThisMessage {
       get { return this; }
     }
-    
+
     public static pbd::MessageDescriptor Descriptor {
       get { return global::Google.ProtocolBuffers.TestProtos.UnitTestImportProtoFile.internal__static_protobuf_unittest_import_ImportMessage__Descriptor; }
     }
-    
+
     protected override pb::FieldAccess.FieldAccessorTable<ImportMessage, ImportMessage.Builder> InternalFieldAccessors {
       get { return global::Google.ProtocolBuffers.TestProtos.UnitTestImportProtoFile.internal__static_protobuf_unittest_import_ImportMessage__FieldAccessorTable; }
     }
-    
+
     public const int DFieldNumber = 1;
     private bool hasD;
@@ -92,5 +90,5 @@
       get { return d_; }
     }
-    
+
     public override bool IsInitialized {
       get {
@@ -98,5 +96,5 @@
       }
     }
-    
+
     public override void WriteTo(pb::CodedOutputStream output) {
       int size = SerializedSize;
@@ -106,5 +104,5 @@
       UnknownFields.WriteTo(output);
     }
-    
+
     private int memoizedSerializedSize = -1;
     public override int SerializedSize {
@@ -112,5 +110,5 @@
         int size = memoizedSerializedSize;
         if (size != -1) return size;
-        
+
         size = 0;
         if (HasD) {
@@ -122,22 +120,22 @@
       }
     }
-    
+
     public static ImportMessage ParseFrom(pb::ByteString data) {
-      return ((Builder) CreateBuilder().MergeFrom(data)).BuildParsed();
+      return ((Builder)CreateBuilder().MergeFrom(data)).BuildParsed();
     }
     public static ImportMessage ParseFrom(pb::ByteString data, pb::ExtensionRegistry extensionRegistry) {
-      return ((Builder) CreateBuilder().MergeFrom(data, extensionRegistry)).BuildParsed();
+      return ((Builder)CreateBuilder().MergeFrom(data, extensionRegistry)).BuildParsed();
     }
     public static ImportMessage ParseFrom(byte[] data) {
-      return ((Builder) CreateBuilder().MergeFrom(data)).BuildParsed();
+      return ((Builder)CreateBuilder().MergeFrom(data)).BuildParsed();
     }
     public static ImportMessage ParseFrom(byte[] data, pb::ExtensionRegistry extensionRegistry) {
-      return ((Builder) CreateBuilder().MergeFrom(data, extensionRegistry)).BuildParsed();
+      return ((Builder)CreateBuilder().MergeFrom(data, extensionRegistry)).BuildParsed();
     }
     public static ImportMessage ParseFrom(global::System.IO.Stream input) {
-      return ((Builder) CreateBuilder().MergeFrom(input)).BuildParsed();
+      return ((Builder)CreateBuilder().MergeFrom(input)).BuildParsed();
     }
     public static ImportMessage ParseFrom(global::System.IO.Stream input, pb::ExtensionRegistry extensionRegistry) {
-      return ((Builder) CreateBuilder().MergeFrom(input, extensionRegistry)).BuildParsed();
+      return ((Builder)CreateBuilder().MergeFrom(input, extensionRegistry)).BuildParsed();
     }
     public static ImportMessage ParseDelimitedFrom(global::System.IO.Stream input) {
@@ -148,8 +146,8 @@
     }
     public static ImportMessage ParseFrom(pb::CodedInputStream input) {
-      return ((Builder) CreateBuilder().MergeFrom(input)).BuildParsed();
+      return ((Builder)CreateBuilder().MergeFrom(input)).BuildParsed();
     }
     public static ImportMessage ParseFrom(pb::CodedInputStream input, pb::ExtensionRegistry extensionRegistry) {
-      return ((Builder) CreateBuilder().MergeFrom(input, extensionRegistry)).BuildParsed();
+      return ((Builder)CreateBuilder().MergeFrom(input, extensionRegistry)).BuildParsed();
     }
     public static Builder CreateBuilder() { return new Builder(); }
@@ -157,36 +155,36 @@
     public override Builder CreateBuilderForType() { return new Builder(); }
     public static Builder CreateBuilder(ImportMessage prototype) {
-      return (Builder) new Builder().MergeFrom(prototype);
-    }
-    
+      return (Builder)new Builder().MergeFrom(prototype);
+    }
+
     public sealed partial class Builder : pb::GeneratedBuilder<ImportMessage, Builder> {
       protected override Builder ThisBuilder {
         get { return this; }
       }
-      public Builder() {}
-      
+      public Builder() { }
+
       ImportMessage result = new ImportMessage();
-      
+
       protected override ImportMessage MessageBeingBuilt {
         get { return result; }
       }
-      
+
       public override Builder Clear() {
         result = new ImportMessage();
         return this;
       }
-      
+
       public override Builder Clone() {
         return new Builder().MergeFrom(result);
       }
-      
+
       public override pbd::MessageDescriptor DescriptorForType {
         get { return global::Google.ProtocolBuffers.TestProtos.ImportMessage.Descriptor; }
       }
-      
+
       public override ImportMessage DefaultInstanceForType {
         get { return global::Google.ProtocolBuffers.TestProtos.ImportMessage.DefaultInstance; }
       }
-      
+
       public override ImportMessage BuildPartial() {
         if (result == null) {
@@ -197,8 +195,8 @@
         return returnMe;
       }
-      
+
       public override Builder MergeFrom(pb::IMessage other) {
         if (other is ImportMessage) {
-          return MergeFrom((ImportMessage) other);
+          return MergeFrom((ImportMessage)other);
         } else {
           base.MergeFrom(other);
@@ -206,5 +204,5 @@
         }
       }
-      
+
       public override Builder MergeFrom(ImportMessage other) {
         if (other == global::Google.ProtocolBuffers.TestProtos.ImportMessage.DefaultInstance) return this;
@@ -215,9 +213,9 @@
         return this;
       }
-      
+
       public override Builder MergeFrom(pb::CodedInputStream input) {
         return MergeFrom(input, pb::ExtensionRegistry.Empty);
       }
-      
+
       public override Builder MergeFrom(pb::CodedInputStream input, pb::ExtensionRegistry extensionRegistry) {
         pb::UnknownFieldSet.Builder unknownFields = null;
@@ -226,11 +224,4 @@
           switch (tag) {
             case 0: {
-              if (unknownFields != null) {
-                this.UnknownFields = unknownFields.Build();
-              }
-              return this;
-            }
-            default: {
-              if (pb::WireFormat.IsEndGroupTag(tag)) {
                 if (unknownFields != null) {
                   this.UnknownFields = unknownFields.Build();
@@ -238,19 +229,26 @@
                 return this;
               }
-              if (unknownFields == null) {
-                unknownFields = pb::UnknownFieldSet.CreateBuilder(this.UnknownFields);
+            default: {
+                if (pb::WireFormat.IsEndGroupTag(tag)) {
+                  if (unknownFields != null) {
+                    this.UnknownFields = unknownFields.Build();
+                  }
+                  return this;
+                }
+                if (unknownFields == null) {
+                  unknownFields = pb::UnknownFieldSet.CreateBuilder(this.UnknownFields);
+                }
+                ParseUnknownField(input, unknownFields, extensionRegistry, tag);
+                break;
               }
-              ParseUnknownField(input, unknownFields, extensionRegistry, tag);
-              break;
-            }
             case 8: {
-              D = input.ReadInt32();
-              break;
-            }
+                D = input.ReadInt32();
+                break;
+              }
           }
         }
       }
-      
-      
+
+
       public bool HasD {
         get { return result.HasD; }
@@ -275,6 +273,6 @@
     }
   }
-  
+
   #endregion
-  
+
 }
Index: /trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.ProtobufCS/0.9.1/ProtobufCS/src/ProtocolBuffers.Test/TestProtos/UnitTestOptimizeForProtoFile.cs
===================================================================
--- /trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.ProtobufCS/0.9.1/ProtobufCS/src/ProtocolBuffers.Test/TestProtos/UnitTestOptimizeForProtoFile.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.ProtobufCS/0.9.1/ProtobufCS/src/ProtocolBuffers.Test/TestProtos/UnitTestOptimizeForProtoFile.cs	(revision 4068)
@@ -2,11 +2,9 @@
 
 using pb = global::Google.ProtocolBuffers;
-using pbc = global::Google.ProtocolBuffers.Collections;
 using pbd = global::Google.ProtocolBuffers.Descriptors;
-using scg = global::System.Collections.Generic;
 namespace Google.ProtocolBuffers.TestProtos {
-  
+
   public static partial class UnitTestOptimizeForProtoFile {
-  
+
     #region Extension registration
     public static void RegisterAllExtensions(pb::ExtensionRegistry registry) {
@@ -28,25 +26,25 @@
     }
     private static pbd::FileDescriptor descriptor;
-    
+
     static UnitTestOptimizeForProtoFile() {
       byte[] descriptorData = global::System.Convert.FromBase64String(
-          "Citnb29nbGUvcHJvdG9idWYvdW5pdHRlc3Rfb3B0aW1pemVfZm9yLnByb3Rv" + 
-          "EhFwcm90b2J1Zl91bml0dGVzdBokZ29vZ2xlL3Byb3RvYnVmL2NzaGFycF9v" + 
-          "cHRpb25zLnByb3RvGh5nb29nbGUvcHJvdG9idWYvdW5pdHRlc3QucHJvdG8i" + 
-          "kgIKFFRlc3RPcHRpbWl6ZWRGb3JTaXplEgkKAWkYASABKAUSLgoDbXNnGBMg" + 
-          "ASgLMiEucHJvdG9idWZfdW5pdHRlc3QuRm9yZWlnbk1lc3NhZ2UqCQjoBxCA" + 
-          "gICAAjJACg50ZXN0X2V4dGVuc2lvbhInLnByb3RvYnVmX3VuaXR0ZXN0LlRl" + 
-          "c3RPcHRpbWl6ZWRGb3JTaXplGNIJIAEoBTJyCg90ZXN0X2V4dGVuc2lvbjIS" + 
-          "Jy5wcm90b2J1Zl91bml0dGVzdC5UZXN0T3B0aW1pemVkRm9yU2l6ZRjTCSAB" + 
-          "KAsyLy5wcm90b2J1Zl91bml0dGVzdC5UZXN0UmVxdWlyZWRPcHRpbWl6ZWRG" + 
-          "b3JTaXplIikKHFRlc3RSZXF1aXJlZE9wdGltaXplZEZvclNpemUSCQoBeBgB" + 
-          "IAIoBSJaChxUZXN0T3B0aW9uYWxPcHRpbWl6ZWRGb3JTaXplEjoKAW8YASAB" + 
-          "KAsyLy5wcm90b2J1Zl91bml0dGVzdC5UZXN0UmVxdWlyZWRPcHRpbWl6ZWRG" + 
-          "b3JTaXplQkZIAsI+QQohR29vZ2xlLlByb3RvY29sQnVmZmVycy5UZXN0UHJv" + 
+          "Citnb29nbGUvcHJvdG9idWYvdW5pdHRlc3Rfb3B0aW1pemVfZm9yLnByb3Rv" +
+          "EhFwcm90b2J1Zl91bml0dGVzdBokZ29vZ2xlL3Byb3RvYnVmL2NzaGFycF9v" +
+          "cHRpb25zLnByb3RvGh5nb29nbGUvcHJvdG9idWYvdW5pdHRlc3QucHJvdG8i" +
+          "kgIKFFRlc3RPcHRpbWl6ZWRGb3JTaXplEgkKAWkYASABKAUSLgoDbXNnGBMg" +
+          "ASgLMiEucHJvdG9idWZfdW5pdHRlc3QuRm9yZWlnbk1lc3NhZ2UqCQjoBxCA" +
+          "gICAAjJACg50ZXN0X2V4dGVuc2lvbhInLnByb3RvYnVmX3VuaXR0ZXN0LlRl" +
+          "c3RPcHRpbWl6ZWRGb3JTaXplGNIJIAEoBTJyCg90ZXN0X2V4dGVuc2lvbjIS" +
+          "Jy5wcm90b2J1Zl91bml0dGVzdC5UZXN0T3B0aW1pemVkRm9yU2l6ZRjTCSAB" +
+          "KAsyLy5wcm90b2J1Zl91bml0dGVzdC5UZXN0UmVxdWlyZWRPcHRpbWl6ZWRG" +
+          "b3JTaXplIikKHFRlc3RSZXF1aXJlZE9wdGltaXplZEZvclNpemUSCQoBeBgB" +
+          "IAIoBSJaChxUZXN0T3B0aW9uYWxPcHRpbWl6ZWRGb3JTaXplEjoKAW8YASAB" +
+          "KAsyLy5wcm90b2J1Zl91bml0dGVzdC5UZXN0UmVxdWlyZWRPcHRpbWl6ZWRG" +
+          "b3JTaXplQkZIAsI+QQohR29vZ2xlLlByb3RvY29sQnVmZmVycy5UZXN0UHJv" +
           "dG9zEhxVbml0VGVzdE9wdGltaXplRm9yUHJvdG9GaWxl");
       pbd::FileDescriptor.InternalDescriptorAssigner assigner = delegate(pbd::FileDescriptor root) {
         descriptor = root;
         internal__static_protobuf_unittest_TestOptimizedForSize__Descriptor = Descriptor.MessageTypes[0];
-        internal__static_protobuf_unittest_TestOptimizedForSize__FieldAccessorTable = 
+        internal__static_protobuf_unittest_TestOptimizedForSize__FieldAccessorTable =
             new pb::FieldAccess.FieldAccessorTable<global::Google.ProtocolBuffers.TestProtos.TestOptimizedForSize, global::Google.ProtocolBuffers.TestProtos.TestOptimizedForSize.Builder>(internal__static_protobuf_unittest_TestOptimizedForSize__Descriptor,
                 new string[] { "I", "Msg", });
@@ -54,9 +52,9 @@
         global::Google.ProtocolBuffers.TestProtos.TestOptimizedForSize.TestExtension2 = pb::GeneratedSingleExtension<global::Google.ProtocolBuffers.TestProtos.TestRequiredOptimizedForSize>.CreateInstance(global::Google.ProtocolBuffers.TestProtos.TestOptimizedForSize.Descriptor.Extensions[1]);
         internal__static_protobuf_unittest_TestRequiredOptimizedForSize__Descriptor = Descriptor.MessageTypes[1];
-        internal__static_protobuf_unittest_TestRequiredOptimizedForSize__FieldAccessorTable = 
+        internal__static_protobuf_unittest_TestRequiredOptimizedForSize__FieldAccessorTable =
             new pb::FieldAccess.FieldAccessorTable<global::Google.ProtocolBuffers.TestProtos.TestRequiredOptimizedForSize, global::Google.ProtocolBuffers.TestProtos.TestRequiredOptimizedForSize.Builder>(internal__static_protobuf_unittest_TestRequiredOptimizedForSize__Descriptor,
                 new string[] { "X", });
         internal__static_protobuf_unittest_TestOptionalOptimizedForSize__Descriptor = Descriptor.MessageTypes[2];
-        internal__static_protobuf_unittest_TestOptionalOptimizedForSize__FieldAccessorTable = 
+        internal__static_protobuf_unittest_TestOptionalOptimizedForSize__FieldAccessorTable =
             new pb::FieldAccess.FieldAccessorTable<global::Google.ProtocolBuffers.TestProtos.TestOptionalOptimizedForSize, global::Google.ProtocolBuffers.TestProtos.TestOptionalOptimizedForSize.Builder>(internal__static_protobuf_unittest_TestOptionalOptimizedForSize__Descriptor,
                 new string[] { "O", });
@@ -74,5 +72,5 @@
     }
     #endregion
-    
+
   }
   #region Messages
@@ -82,21 +80,21 @@
       get { return defaultInstance; }
     }
-    
+
     public override TestOptimizedForSize DefaultInstanceForType {
       get { return defaultInstance; }
     }
-    
+
     protected override TestOptimizedForSize ThisMessage {
       get { return this; }
     }
-    
+
     public static pbd::MessageDescriptor Descriptor {
       get { return global::Google.ProtocolBuffers.TestProtos.UnitTestOptimizeForProtoFile.internal__static_protobuf_unittest_TestOptimizedForSize__Descriptor; }
     }
-    
+
     protected override pb::FieldAccess.FieldAccessorTable<TestOptimizedForSize, TestOptimizedForSize.Builder> InternalFieldAccessors {
       get { return global::Google.ProtocolBuffers.TestProtos.UnitTestOptimizeForProtoFile.internal__static_protobuf_unittest_TestOptimizedForSize__FieldAccessorTable; }
     }
-    
+
     public const int TestExtensionFieldNumber = 1234;
     public static pb::GeneratedExtensionBase<int> TestExtension;
@@ -112,5 +110,5 @@
       get { return i_; }
     }
-    
+
     public const int MsgFieldNumber = 19;
     private bool hasMsg;
@@ -122,22 +120,22 @@
       get { return msg_; }
     }
-    
+
     public static TestOptimizedForSize ParseFrom(pb::ByteString data) {
-      return ((Builder) CreateBuilder().MergeFrom(data)).BuildParsed();
+      return ((Builder)CreateBuilder().MergeFrom(data)).BuildParsed();
     }
     public static TestOptimizedForSize ParseFrom(pb::ByteString data, pb::ExtensionRegistry extensionRegistry) {
-      return ((Builder) CreateBuilder().MergeFrom(data, extensionRegistry)).BuildParsed();
+      return ((Builder)CreateBuilder().MergeFrom(data, extensionRegistry)).BuildParsed();
     }
     public static TestOptimizedForSize ParseFrom(byte[] data) {
-      return ((Builder) CreateBuilder().MergeFrom(data)).BuildParsed();
+      return ((Builder)CreateBuilder().MergeFrom(data)).BuildParsed();
     }
     public static TestOptimizedForSize ParseFrom(byte[] data, pb::ExtensionRegistry extensionRegistry) {
-      return ((Builder) CreateBuilder().MergeFrom(data, extensionRegistry)).BuildParsed();
+      return ((Builder)CreateBuilder().MergeFrom(data, extensionRegistry)).BuildParsed();
     }
     public static TestOptimizedForSize ParseFrom(global::System.IO.Stream input) {
-      return ((Builder) CreateBuilder().MergeFrom(input)).BuildParsed();
+      return ((Builder)CreateBuilder().MergeFrom(input)).BuildParsed();
     }
     public static TestOptimizedForSize ParseFrom(global::System.IO.Stream input, pb::ExtensionRegistry extensionRegistry) {
-      return ((Builder) CreateBuilder().MergeFrom(input, extensionRegistry)).BuildParsed();
+      return ((Builder)CreateBuilder().MergeFrom(input, extensionRegistry)).BuildParsed();
     }
     public static TestOptimizedForSize ParseDelimitedFrom(global::System.IO.Stream input) {
@@ -148,8 +146,8 @@
     }
     public static TestOptimizedForSize ParseFrom(pb::CodedInputStream input) {
-      return ((Builder) CreateBuilder().MergeFrom(input)).BuildParsed();
+      return ((Builder)CreateBuilder().MergeFrom(input)).BuildParsed();
     }
     public static TestOptimizedForSize ParseFrom(pb::CodedInputStream input, pb::ExtensionRegistry extensionRegistry) {
-      return ((Builder) CreateBuilder().MergeFrom(input, extensionRegistry)).BuildParsed();
+      return ((Builder)CreateBuilder().MergeFrom(input, extensionRegistry)).BuildParsed();
     }
     public static Builder CreateBuilder() { return new Builder(); }
@@ -157,36 +155,36 @@
     public override Builder CreateBuilderForType() { return new Builder(); }
     public static Builder CreateBuilder(TestOptimizedForSize prototype) {
-      return (Builder) new Builder().MergeFrom(prototype);
-    }
-    
+      return (Builder)new Builder().MergeFrom(prototype);
+    }
+
     public sealed partial class Builder : pb::ExtendableBuilder<TestOptimizedForSize, Builder> {
       protected override Builder ThisBuilder {
         get { return this; }
       }
-      public Builder() {}
-      
+      public Builder() { }
+
       TestOptimizedForSize result = new TestOptimizedForSize();
-      
+
       protected override TestOptimizedForSize MessageBeingBuilt {
         get { return result; }
       }
-      
+
       public override Builder Clear() {
         result = new TestOptimizedForSize();
         return this;
       }
-      
+
       public override Builder Clone() {
         return new Builder().MergeFrom(result);
       }
-      
+
       public override pbd::MessageDescriptor DescriptorForType {
         get { return global::Google.ProtocolBuffers.TestProtos.TestOptimizedForSize.Descriptor; }
       }
-      
+
       public override TestOptimizedForSize DefaultInstanceForType {
         get { return global::Google.ProtocolBuffers.TestProtos.TestOptimizedForSize.DefaultInstance; }
       }
-      
+
       public override TestOptimizedForSize BuildPartial() {
         if (result == null) {
@@ -197,6 +195,6 @@
         return returnMe;
       }
-      
-      
+
+
       public bool HasI {
         get { return result.HasI; }
@@ -216,7 +214,7 @@
         return this;
       }
-      
+
       public bool HasMsg {
-       get { return result.HasMsg; }
+        get { return result.HasMsg; }
       }
       public global::Google.ProtocolBuffers.TestProtos.ForeignMessage Msg {
@@ -240,5 +238,5 @@
         if (result.HasMsg &&
             result.msg_ != global::Google.ProtocolBuffers.TestProtos.ForeignMessage.DefaultInstance) {
-            result.msg_ = global::Google.ProtocolBuffers.TestProtos.ForeignMessage.CreateBuilder(result.msg_).MergeFrom(value).BuildPartial();
+          result.msg_ = global::Google.ProtocolBuffers.TestProtos.ForeignMessage.CreateBuilder(result.msg_).MergeFrom(value).BuildPartial();
         } else {
           result.msg_ = value;
@@ -257,5 +255,5 @@
     }
   }
-  
+
   public sealed partial class TestRequiredOptimizedForSize : pb::GeneratedMessage<TestRequiredOptimizedForSize, TestRequiredOptimizedForSize.Builder> {
     private static readonly TestRequiredOptimizedForSize defaultInstance = new Builder().BuildPartial();
@@ -263,21 +261,21 @@
       get { return defaultInstance; }
     }
-    
+
     public override TestRequiredOptimizedForSize DefaultInstanceForType {
       get { return defaultInstance; }
     }
-    
+
     protected override TestRequiredOptimizedForSize ThisMessage {
       get { return this; }
     }
-    
+
     public static pbd::MessageDescriptor Descriptor {
       get { return global::Google.ProtocolBuffers.TestProtos.UnitTestOptimizeForProtoFile.internal__static_protobuf_unittest_TestRequiredOptimizedForSize__Descriptor; }
     }
-    
+
     protected override pb::FieldAccess.FieldAccessorTable<TestRequiredOptimizedForSize, TestRequiredOptimizedForSize.Builder> InternalFieldAccessors {
       get { return global::Google.ProtocolBuffers.TestProtos.UnitTestOptimizeForProtoFile.internal__static_protobuf_unittest_TestRequiredOptimizedForSize__FieldAccessorTable; }
     }
-    
+
     public const int XFieldNumber = 1;
     private bool hasX;
@@ -289,22 +287,22 @@
       get { return x_; }
     }
-    
+
     public static TestRequiredOptimizedForSize ParseFrom(pb::ByteString data) {
-      return ((Builder) CreateBuilder().MergeFrom(data)).BuildParsed();
+      return ((Builder)CreateBuilder().MergeFrom(data)).BuildParsed();
     }
     public static TestRequiredOptimizedForSize ParseFrom(pb::ByteString data, pb::ExtensionRegistry extensionRegistry) {
-      return ((Builder) CreateBuilder().MergeFrom(data, extensionRegistry)).BuildParsed();
+      return ((Builder)CreateBuilder().MergeFrom(data, extensionRegistry)).BuildParsed();
     }
     public static TestRequiredOptimizedForSize ParseFrom(byte[] data) {
-      return ((Builder) CreateBuilder().MergeFrom(data)).BuildParsed();
+      return ((Builder)CreateBuilder().MergeFrom(data)).BuildParsed();
     }
     public static TestRequiredOptimizedForSize ParseFrom(byte[] data, pb::ExtensionRegistry extensionRegistry) {
-      return ((Builder) CreateBuilder().MergeFrom(data, extensionRegistry)).BuildParsed();
+      return ((Builder)CreateBuilder().MergeFrom(data, extensionRegistry)).BuildParsed();
     }
     public static TestRequiredOptimizedForSize ParseFrom(global::System.IO.Stream input) {
-      return ((Builder) CreateBuilder().MergeFrom(input)).BuildParsed();
+      return ((Builder)CreateBuilder().MergeFrom(input)).BuildParsed();
     }
     public static TestRequiredOptimizedForSize ParseFrom(global::System.IO.Stream input, pb::ExtensionRegistry extensionRegistry) {
-      return ((Builder) CreateBuilder().MergeFrom(input, extensionRegistry)).BuildParsed();
+      return ((Builder)CreateBuilder().MergeFrom(input, extensionRegistry)).BuildParsed();
     }
     public static TestRequiredOptimizedForSize ParseDelimitedFrom(global::System.IO.Stream input) {
@@ -315,8 +313,8 @@
     }
     public static TestRequiredOptimizedForSize ParseFrom(pb::CodedInputStream input) {
-      return ((Builder) CreateBuilder().MergeFrom(input)).BuildParsed();
+      return ((Builder)CreateBuilder().MergeFrom(input)).BuildParsed();
     }
     public static TestRequiredOptimizedForSize ParseFrom(pb::CodedInputStream input, pb::ExtensionRegistry extensionRegistry) {
-      return ((Builder) CreateBuilder().MergeFrom(input, extensionRegistry)).BuildParsed();
+      return ((Builder)CreateBuilder().MergeFrom(input, extensionRegistry)).BuildParsed();
     }
     public static Builder CreateBuilder() { return new Builder(); }
@@ -324,36 +322,36 @@
     public override Builder CreateBuilderForType() { return new Builder(); }
     public static Builder CreateBuilder(TestRequiredOptimizedForSize prototype) {
-      return (Builder) new Builder().MergeFrom(prototype);
-    }
-    
+      return (Builder)new Builder().MergeFrom(prototype);
+    }
+
     public sealed partial class Builder : pb::GeneratedBuilder<TestRequiredOptimizedForSize, Builder> {
       protected override Builder ThisBuilder {
         get { return this; }
       }
-      public Builder() {}
-      
+      public Builder() { }
+
       TestRequiredOptimizedForSize result = new TestRequiredOptimizedForSize();
-      
+
       protected override TestRequiredOptimizedForSize MessageBeingBuilt {
         get { return result; }
       }
-      
+
       public override Builder Clear() {
         result = new TestRequiredOptimizedForSize();
         return this;
       }
-      
+
       public override Builder Clone() {
         return new Builder().MergeFrom(result);
       }
-      
+
       public override pbd::MessageDescriptor DescriptorForType {
         get { return global::Google.ProtocolBuffers.TestProtos.TestRequiredOptimizedForSize.Descriptor; }
       }
-      
+
       public override TestRequiredOptimizedForSize DefaultInstanceForType {
         get { return global::Google.ProtocolBuffers.TestProtos.TestRequiredOptimizedForSize.DefaultInstance; }
       }
-      
+
       public override TestRequiredOptimizedForSize BuildPartial() {
         if (result == null) {
@@ -364,6 +362,6 @@
         return returnMe;
       }
-      
-      
+
+
       public bool HasX {
         get { return result.HasX; }
@@ -388,5 +386,5 @@
     }
   }
-  
+
   public sealed partial class TestOptionalOptimizedForSize : pb::GeneratedMessage<TestOptionalOptimizedForSize, TestOptionalOptimizedForSize.Builder> {
     private static readonly TestOptionalOptimizedForSize defaultInstance = new Builder().BuildPartial();
@@ -394,21 +392,21 @@
       get { return defaultInstance; }
     }
-    
+
     public override TestOptionalOptimizedForSize DefaultInstanceForType {
       get { return defaultInstance; }
     }
-    
+
     protected override TestOptionalOptimizedForSize ThisMessage {
       get { return this; }
     }
-    
+
     public static pbd::MessageDescriptor Descriptor {
       get { return global::Google.ProtocolBuffers.TestProtos.UnitTestOptimizeForProtoFile.internal__static_protobuf_unittest_TestOptionalOptimizedForSize__Descriptor; }
     }
-    
+
     protected override pb::FieldAccess.FieldAccessorTable<TestOptionalOptimizedForSize, TestOptionalOptimizedForSize.Builder> InternalFieldAccessors {
       get { return global::Google.ProtocolBuffers.TestProtos.UnitTestOptimizeForProtoFile.internal__static_protobuf_unittest_TestOptionalOptimizedForSize__FieldAccessorTable; }
     }
-    
+
     public const int OFieldNumber = 1;
     private bool hasO;
@@ -420,22 +418,22 @@
       get { return o_; }
     }
-    
+
     public static TestOptionalOptimizedForSize ParseFrom(pb::ByteString data) {
-      return ((Builder) CreateBuilder().MergeFrom(data)).BuildParsed();
+      return ((Builder)CreateBuilder().MergeFrom(data)).BuildParsed();
     }
     public static TestOptionalOptimizedForSize ParseFrom(pb::ByteString data, pb::ExtensionRegistry extensionRegistry) {
-      return ((Builder) CreateBuilder().MergeFrom(data, extensionRegistry)).BuildParsed();
+      return ((Builder)CreateBuilder().MergeFrom(data, extensionRegistry)).BuildParsed();
     }
     public static TestOptionalOptimizedForSize ParseFrom(byte[] data) {
-      return ((Builder) CreateBuilder().MergeFrom(data)).BuildParsed();
+      return ((Builder)CreateBuilder().MergeFrom(data)).BuildParsed();
     }
     public static TestOptionalOptimizedForSize ParseFrom(byte[] data, pb::ExtensionRegistry extensionRegistry) {
-      return ((Builder) CreateBuilder().MergeFrom(data, extensionRegistry)).BuildParsed();
+      return ((Builder)CreateBuilder().MergeFrom(data, extensionRegistry)).BuildParsed();
     }
     public static TestOptionalOptimizedForSize ParseFrom(global::System.IO.Stream input) {
-      return ((Builder) CreateBuilder().MergeFrom(input)).BuildParsed();
+      return ((Builder)CreateBuilder().MergeFrom(input)).BuildParsed();
     }
     public static TestOptionalOptimizedForSize ParseFrom(global::System.IO.Stream input, pb::ExtensionRegistry extensionRegistry) {
-      return ((Builder) CreateBuilder().MergeFrom(input, extensionRegistry)).BuildParsed();
+      return ((Builder)CreateBuilder().MergeFrom(input, extensionRegistry)).BuildParsed();
     }
     public static TestOptionalOptimizedForSize ParseDelimitedFrom(global::System.IO.Stream input) {
@@ -446,8 +444,8 @@
     }
     public static TestOptionalOptimizedForSize ParseFrom(pb::CodedInputStream input) {
-      return ((Builder) CreateBuilder().MergeFrom(input)).BuildParsed();
+      return ((Builder)CreateBuilder().MergeFrom(input)).BuildParsed();
     }
     public static TestOptionalOptimizedForSize ParseFrom(pb::CodedInputStream input, pb::ExtensionRegistry extensionRegistry) {
-      return ((Builder) CreateBuilder().MergeFrom(input, extensionRegistry)).BuildParsed();
+      return ((Builder)CreateBuilder().MergeFrom(input, extensionRegistry)).BuildParsed();
     }
     public static Builder CreateBuilder() { return new Builder(); }
@@ -455,36 +453,36 @@
     public override Builder CreateBuilderForType() { return new Builder(); }
     public static Builder CreateBuilder(TestOptionalOptimizedForSize prototype) {
-      return (Builder) new Builder().MergeFrom(prototype);
-    }
-    
+      return (Builder)new Builder().MergeFrom(prototype);
+    }
+
     public sealed partial class Builder : pb::GeneratedBuilder<TestOptionalOptimizedForSize, Builder> {
       protected override Builder ThisBuilder {
         get { return this; }
       }
-      public Builder() {}
-      
+      public Builder() { }
+
       TestOptionalOptimizedForSize result = new TestOptionalOptimizedForSize();
-      
+
       protected override TestOptionalOptimizedForSize MessageBeingBuilt {
         get { return result; }
       }
-      
+
       public override Builder Clear() {
         result = new TestOptionalOptimizedForSize();
         return this;
       }
-      
+
       public override Builder Clone() {
         return new Builder().MergeFrom(result);
       }
-      
+
       public override pbd::MessageDescriptor DescriptorForType {
         get { return global::Google.ProtocolBuffers.TestProtos.TestOptionalOptimizedForSize.Descriptor; }
       }
-      
+
       public override TestOptionalOptimizedForSize DefaultInstanceForType {
         get { return global::Google.ProtocolBuffers.TestProtos.TestOptionalOptimizedForSize.DefaultInstance; }
       }
-      
+
       public override TestOptionalOptimizedForSize BuildPartial() {
         if (result == null) {
@@ -495,8 +493,8 @@
         return returnMe;
       }
-      
-      
+
+
       public bool HasO {
-       get { return result.HasO; }
+        get { return result.HasO; }
       }
       public global::Google.ProtocolBuffers.TestProtos.TestRequiredOptimizedForSize O {
@@ -520,5 +518,5 @@
         if (result.HasO &&
             result.o_ != global::Google.ProtocolBuffers.TestProtos.TestRequiredOptimizedForSize.DefaultInstance) {
-            result.o_ = global::Google.ProtocolBuffers.TestProtos.TestRequiredOptimizedForSize.CreateBuilder(result.o_).MergeFrom(value).BuildPartial();
+          result.o_ = global::Google.ProtocolBuffers.TestProtos.TestRequiredOptimizedForSize.CreateBuilder(result.o_).MergeFrom(value).BuildPartial();
         } else {
           result.o_ = value;
@@ -537,6 +535,6 @@
     }
   }
-  
+
   #endregion
-  
+
 }
Index: /trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.ProtobufCS/0.9.1/ProtobufCS/src/ProtocolBuffers.Test/TextFormatTest.cs
===================================================================
--- /trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.ProtobufCS/0.9.1/ProtobufCS/src/ProtocolBuffers.Test/TextFormatTest.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.ProtobufCS/0.9.1/ProtobufCS/src/ProtocolBuffers.Test/TextFormatTest.cs	(revision 4068)
@@ -38,6 +38,4 @@
 using Google.ProtocolBuffers.TestProtos;
 using NUnit.Framework;
-using System.Globalization;
-using System.Threading;
 
 namespace Google.ProtocolBuffers {
@@ -82,5 +80,5 @@
       "  str: \"foo\"\n" +
       "}\n";
-    
+
     /// <summary>
     /// Print TestAllTypes and compare with golden file. 
@@ -166,5 +164,5 @@
     private static ByteString Bytes(string str) {
       return ByteString.CopyFrom(Encoding.GetEncoding(28591).GetBytes(str));
-    }   
+    }
 
     [Test]
@@ -172,12 +170,12 @@
       IMessage message = TestAllTypes.CreateBuilder()
         // Signed vs. unsigned numbers.
-        .AddRepeatedInt32 (-1)
+        .AddRepeatedInt32(-1)
         .AddRepeatedUint32(uint.MaxValue)
-        .AddRepeatedInt64 (-1)
+        .AddRepeatedInt64(-1)
         .AddRepeatedUint64(ulong.MaxValue)
 
-        .AddRepeatedInt32 (1  << 31)
-        .AddRepeatedUint32(1U  << 31)
-        .AddRepeatedInt64 (1L << 63)
+        .AddRepeatedInt32(1 << 31)
+        .AddRepeatedUint32(1U << 31)
+        .AddRepeatedInt64(1L << 63)
         .AddRepeatedUint64(1UL << 63)
 
@@ -334,5 +332,6 @@
         TextFormat.Merge(text, TestUtil.CreateExtensionRegistry(), builder);
         Assert.Fail("Expected parse exception.");
-      } catch (FormatException e) {
+      }
+      catch (FormatException e) {
         Assert.AreEqual(error, e.Message);
       }
@@ -418,5 +417,6 @@
         action();
         Assert.Fail("Should have thrown an exception.");
-      } catch (FormatException) {
+      }
+      catch (FormatException) {
         // success
       }
@@ -451,37 +451,37 @@
     [Test]
     public void ParseInteger() {
-      Assert.AreEqual(          0, TextFormat.ParseInt32(          "0"));
-      Assert.AreEqual(          1, TextFormat.ParseInt32(          "1"));
-      Assert.AreEqual(         -1, TextFormat.ParseInt32(         "-1"));
-      Assert.AreEqual(      12345, TextFormat.ParseInt32(      "12345"));
-      Assert.AreEqual(     -12345, TextFormat.ParseInt32(     "-12345"));
-      Assert.AreEqual( 2147483647, TextFormat.ParseInt32( "2147483647"));
+      Assert.AreEqual(0, TextFormat.ParseInt32("0"));
+      Assert.AreEqual(1, TextFormat.ParseInt32("1"));
+      Assert.AreEqual(-1, TextFormat.ParseInt32("-1"));
+      Assert.AreEqual(12345, TextFormat.ParseInt32("12345"));
+      Assert.AreEqual(-12345, TextFormat.ParseInt32("-12345"));
+      Assert.AreEqual(2147483647, TextFormat.ParseInt32("2147483647"));
       Assert.AreEqual(-2147483648, TextFormat.ParseInt32("-2147483648"));
 
-      Assert.AreEqual(          0, TextFormat.ParseUInt32(         "0"));
-      Assert.AreEqual(          1, TextFormat.ParseUInt32(         "1"));
-      Assert.AreEqual(      12345, TextFormat.ParseUInt32(     "12345"));
-      Assert.AreEqual( 2147483647, TextFormat.ParseUInt32("2147483647"));
+      Assert.AreEqual(0, TextFormat.ParseUInt32("0"));
+      Assert.AreEqual(1, TextFormat.ParseUInt32("1"));
+      Assert.AreEqual(12345, TextFormat.ParseUInt32("12345"));
+      Assert.AreEqual(2147483647, TextFormat.ParseUInt32("2147483647"));
       Assert.AreEqual(2147483648U, TextFormat.ParseUInt32("2147483648"));
       Assert.AreEqual(4294967295U, TextFormat.ParseUInt32("4294967295"));
 
-      Assert.AreEqual(          0L, TextFormat.ParseInt64(          "0"));
-      Assert.AreEqual(          1L, TextFormat.ParseInt64(          "1"));
-      Assert.AreEqual(         -1L, TextFormat.ParseInt64(         "-1"));
-      Assert.AreEqual(      12345L, TextFormat.ParseInt64(      "12345"));
-      Assert.AreEqual(     -12345L, TextFormat.ParseInt64(     "-12345"));
-      Assert.AreEqual( 2147483647L, TextFormat.ParseInt64( "2147483647"));
+      Assert.AreEqual(0L, TextFormat.ParseInt64("0"));
+      Assert.AreEqual(1L, TextFormat.ParseInt64("1"));
+      Assert.AreEqual(-1L, TextFormat.ParseInt64("-1"));
+      Assert.AreEqual(12345L, TextFormat.ParseInt64("12345"));
+      Assert.AreEqual(-12345L, TextFormat.ParseInt64("-12345"));
+      Assert.AreEqual(2147483647L, TextFormat.ParseInt64("2147483647"));
       Assert.AreEqual(-2147483648L, TextFormat.ParseInt64("-2147483648"));
-      Assert.AreEqual( 4294967295L, TextFormat.ParseInt64( "4294967295"));
-      Assert.AreEqual( 4294967296L, TextFormat.ParseInt64( "4294967296"));
+      Assert.AreEqual(4294967295L, TextFormat.ParseInt64("4294967295"));
+      Assert.AreEqual(4294967296L, TextFormat.ParseInt64("4294967296"));
       Assert.AreEqual(9223372036854775807L, TextFormat.ParseInt64("9223372036854775807"));
       Assert.AreEqual(-9223372036854775808L, TextFormat.ParseInt64("-9223372036854775808"));
 
-      Assert.AreEqual(          0L, TextFormat.ParseUInt64(          "0"));
-      Assert.AreEqual(          1L, TextFormat.ParseUInt64(          "1"));
-      Assert.AreEqual(      12345L, TextFormat.ParseUInt64(      "12345"));
-      Assert.AreEqual( 2147483647L, TextFormat.ParseUInt64( "2147483647"));
-      Assert.AreEqual( 4294967295L, TextFormat.ParseUInt64( "4294967295"));
-      Assert.AreEqual( 4294967296L, TextFormat.ParseUInt64( "4294967296"));
+      Assert.AreEqual(0L, TextFormat.ParseUInt64("0"));
+      Assert.AreEqual(1L, TextFormat.ParseUInt64("1"));
+      Assert.AreEqual(12345L, TextFormat.ParseUInt64("12345"));
+      Assert.AreEqual(2147483647L, TextFormat.ParseUInt64("2147483647"));
+      Assert.AreEqual(4294967295L, TextFormat.ParseUInt64("4294967295"));
+      Assert.AreEqual(4294967296L, TextFormat.ParseUInt64("4294967296"));
       Assert.AreEqual(9223372036854775807UL, TextFormat.ParseUInt64("9223372036854775807"));
       Assert.AreEqual(9223372036854775808UL, TextFormat.ParseUInt64("9223372036854775808"));
Index: /trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.ProtobufCS/0.9.1/ProtobufCS/src/ProtocolBuffers/Collections/Dictionaries.cs
===================================================================
--- /trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.ProtobufCS/0.9.1/ProtobufCS/src/ProtocolBuffers/Collections/Dictionaries.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.ProtobufCS/0.9.1/ProtobufCS/src/ProtocolBuffers/Collections/Dictionaries.cs	(revision 4068)
@@ -30,5 +30,4 @@
 // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
 // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-using System;
 using System.Collections;
 using System.Collections.Generic;
@@ -50,6 +49,5 @@
         return false;
       }
-      foreach (KeyValuePair<TKey,TValue> leftEntry in left)
-      {
+      foreach (KeyValuePair<TKey, TValue> leftEntry in left) {
         TValue rightValue;
         if (!right.TryGetValue(leftEntry.Key, out rightValue)) {
@@ -72,5 +70,5 @@
     }
 
-    public static IDictionary<TKey, TValue> AsReadOnly<TKey, TValue> (IDictionary<TKey, TValue> dictionary) {
+    public static IDictionary<TKey, TValue> AsReadOnly<TKey, TValue>(IDictionary<TKey, TValue> dictionary) {
       return dictionary.IsReadOnly ? dictionary : new ReadOnlyDictionary<TKey, TValue>(dictionary);
     }
Index: /trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.ProtobufCS/0.9.1/ProtobufCS/src/ProtocolBuffers/Collections/PopsicleList.cs
===================================================================
--- /trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.ProtobufCS/0.9.1/ProtobufCS/src/ProtocolBuffers/Collections/PopsicleList.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.ProtobufCS/0.9.1/ProtobufCS/src/ProtocolBuffers/Collections/PopsicleList.cs	(revision 4068)
@@ -31,6 +31,6 @@
 // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 using System;
+using System.Collections;
 using System.Collections.Generic;
-using System.Collections;
 
 namespace Google.ProtocolBuffers.Collections {
Index: /trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.ProtobufCS/0.9.1/ProtobufCS/src/ProtocolBuffers/DescriptorProtos/CSharpOptions.cs
===================================================================
--- /trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.ProtobufCS/0.9.1/ProtobufCS/src/ProtocolBuffers/DescriptorProtos/CSharpOptions.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.ProtobufCS/0.9.1/ProtobufCS/src/ProtocolBuffers/DescriptorProtos/CSharpOptions.cs	(revision 4068)
@@ -2,11 +2,9 @@
 
 using pb = global::Google.ProtocolBuffers;
-using pbc = global::Google.ProtocolBuffers.Collections;
 using pbd = global::Google.ProtocolBuffers.Descriptors;
-using scg = global::System.Collections.Generic;
 namespace Google.ProtocolBuffers.DescriptorProtos {
-  
+
   public static partial class CSharpOptions {
-  
+
     #region Extension registration
     public static void RegisterAllExtensions(pb::ExtensionRegistry registry) {
@@ -21,5 +19,5 @@
     public static pb::GeneratedExtensionBase<global::Google.ProtocolBuffers.DescriptorProtos.CSharpFieldOptions> CSharpFieldOptions;
     #endregion
-    
+
     #region Static variables
     internal static pbd::MessageDescriptor internal__static_google_protobuf_CSharpFileOptions__Descriptor;
@@ -33,27 +31,27 @@
     }
     private static pbd::FileDescriptor descriptor;
-    
+
     static CSharpOptions() {
       byte[] descriptorData = global::System.Convert.FromBase64String(
-          "CiRnb29nbGUvcHJvdG9idWYvY3NoYXJwX29wdGlvbnMucHJvdG8SD2dvb2ds" + 
-          "ZS5wcm90b2J1ZhogZ29vZ2xlL3Byb3RvYnVmL2Rlc2NyaXB0b3IucHJvdG8i" + 
-          "zAEKEUNTaGFycEZpbGVPcHRpb25zEhEKCW5hbWVzcGFjZRgBIAEoCRIaChJ1" + 
-          "bWJyZWxsYV9jbGFzc25hbWUYAiABKAkSHAoOcHVibGljX2NsYXNzZXMYAyAB" + 
-          "KAg6BHRydWUSFgoObXVsdGlwbGVfZmlsZXMYBCABKAgSFAoMbmVzdF9jbGFz" + 
-          "c2VzGAUgASgIEhYKDmNvZGVfY29udHJhY3RzGAYgASgIEiQKHGV4cGFuZF9u" + 
-          "YW1lc3BhY2VfZGlyZWN0b3JpZXMYByABKAgiKwoSQ1NoYXJwRmllbGRPcHRp" + 
-          "b25zEhUKDXByb3BlcnR5X25hbWUYASABKAk6XgoTY3NoYXJwX2ZpbGVfb3B0" + 
-          "aW9ucxIcLmdvb2dsZS5wcm90b2J1Zi5GaWxlT3B0aW9ucxjoByABKAsyIi5n" + 
-          "b29nbGUucHJvdG9idWYuQ1NoYXJwRmlsZU9wdGlvbnM6YQoUY3NoYXJwX2Zp" + 
-          "ZWxkX29wdGlvbnMSHS5nb29nbGUucHJvdG9idWYuRmllbGRPcHRpb25zGOgH" + 
+          "CiRnb29nbGUvcHJvdG9idWYvY3NoYXJwX29wdGlvbnMucHJvdG8SD2dvb2ds" +
+          "ZS5wcm90b2J1ZhogZ29vZ2xlL3Byb3RvYnVmL2Rlc2NyaXB0b3IucHJvdG8i" +
+          "zAEKEUNTaGFycEZpbGVPcHRpb25zEhEKCW5hbWVzcGFjZRgBIAEoCRIaChJ1" +
+          "bWJyZWxsYV9jbGFzc25hbWUYAiABKAkSHAoOcHVibGljX2NsYXNzZXMYAyAB" +
+          "KAg6BHRydWUSFgoObXVsdGlwbGVfZmlsZXMYBCABKAgSFAoMbmVzdF9jbGFz" +
+          "c2VzGAUgASgIEhYKDmNvZGVfY29udHJhY3RzGAYgASgIEiQKHGV4cGFuZF9u" +
+          "YW1lc3BhY2VfZGlyZWN0b3JpZXMYByABKAgiKwoSQ1NoYXJwRmllbGRPcHRp" +
+          "b25zEhUKDXByb3BlcnR5X25hbWUYASABKAk6XgoTY3NoYXJwX2ZpbGVfb3B0" +
+          "aW9ucxIcLmdvb2dsZS5wcm90b2J1Zi5GaWxlT3B0aW9ucxjoByABKAsyIi5n" +
+          "b29nbGUucHJvdG9idWYuQ1NoYXJwRmlsZU9wdGlvbnM6YQoUY3NoYXJwX2Zp" +
+          "ZWxkX29wdGlvbnMSHS5nb29nbGUucHJvdG9idWYuRmllbGRPcHRpb25zGOgH" +
           "IAEoCzIjLmdvb2dsZS5wcm90b2J1Zi5DU2hhcnBGaWVsZE9wdGlvbnM=");
       pbd::FileDescriptor.InternalDescriptorAssigner assigner = delegate(pbd::FileDescriptor root) {
         descriptor = root;
         internal__static_google_protobuf_CSharpFileOptions__Descriptor = Descriptor.MessageTypes[0];
-        internal__static_google_protobuf_CSharpFileOptions__FieldAccessorTable = 
+        internal__static_google_protobuf_CSharpFileOptions__FieldAccessorTable =
             new pb::FieldAccess.FieldAccessorTable<global::Google.ProtocolBuffers.DescriptorProtos.CSharpFileOptions, global::Google.ProtocolBuffers.DescriptorProtos.CSharpFileOptions.Builder>(internal__static_google_protobuf_CSharpFileOptions__Descriptor,
                 new string[] { "Namespace", "UmbrellaClassname", "PublicClasses", "MultipleFiles", "NestClasses", "CodeContracts", "ExpandNamespaceDirectories", });
         internal__static_google_protobuf_CSharpFieldOptions__Descriptor = Descriptor.MessageTypes[1];
-        internal__static_google_protobuf_CSharpFieldOptions__FieldAccessorTable = 
+        internal__static_google_protobuf_CSharpFieldOptions__FieldAccessorTable =
             new pb::FieldAccess.FieldAccessorTable<global::Google.ProtocolBuffers.DescriptorProtos.CSharpFieldOptions, global::Google.ProtocolBuffers.DescriptorProtos.CSharpFieldOptions.Builder>(internal__static_google_protobuf_CSharpFieldOptions__Descriptor,
                 new string[] { "PropertyName", });
@@ -68,5 +66,5 @@
     }
     #endregion
-    
+
   }
   #region Messages
@@ -76,21 +74,21 @@
       get { return defaultInstance; }
     }
-    
+
     public override CSharpFileOptions DefaultInstanceForType {
       get { return defaultInstance; }
     }
-    
+
     protected override CSharpFileOptions ThisMessage {
       get { return this; }
     }
-    
+
     public static pbd::MessageDescriptor Descriptor {
       get { return global::Google.ProtocolBuffers.DescriptorProtos.CSharpOptions.internal__static_google_protobuf_CSharpFileOptions__Descriptor; }
     }
-    
+
     protected override pb::FieldAccess.FieldAccessorTable<CSharpFileOptions, CSharpFileOptions.Builder> InternalFieldAccessors {
       get { return global::Google.ProtocolBuffers.DescriptorProtos.CSharpOptions.internal__static_google_protobuf_CSharpFileOptions__FieldAccessorTable; }
     }
-    
+
     public const int NamespaceFieldNumber = 1;
     private bool hasNamespace;
@@ -102,5 +100,5 @@
       get { return namespace_; }
     }
-    
+
     public const int UmbrellaClassnameFieldNumber = 2;
     private bool hasUmbrellaClassname;
@@ -112,5 +110,5 @@
       get { return umbrellaClassname_; }
     }
-    
+
     public const int PublicClassesFieldNumber = 3;
     private bool hasPublicClasses;
@@ -122,5 +120,5 @@
       get { return publicClasses_; }
     }
-    
+
     public const int MultipleFilesFieldNumber = 4;
     private bool hasMultipleFiles;
@@ -132,5 +130,5 @@
       get { return multipleFiles_; }
     }
-    
+
     public const int NestClassesFieldNumber = 5;
     private bool hasNestClasses;
@@ -142,5 +140,5 @@
       get { return nestClasses_; }
     }
-    
+
     public const int CodeContractsFieldNumber = 6;
     private bool hasCodeContracts;
@@ -152,5 +150,5 @@
       get { return codeContracts_; }
     }
-    
+
     public const int ExpandNamespaceDirectoriesFieldNumber = 7;
     private bool hasExpandNamespaceDirectories;
@@ -162,5 +160,5 @@
       get { return expandNamespaceDirectories_; }
     }
-    
+
     public override bool IsInitialized {
       get {
@@ -168,5 +166,5 @@
       }
     }
-    
+
     public override void WriteTo(pb::CodedOutputStream output) {
       int size = SerializedSize;
@@ -194,5 +192,5 @@
       UnknownFields.WriteTo(output);
     }
-    
+
     private int memoizedSerializedSize = -1;
     public override int SerializedSize {
@@ -200,5 +198,5 @@
         int size = memoizedSerializedSize;
         if (size != -1) return size;
-        
+
         size = 0;
         if (HasNamespace) {
@@ -228,22 +226,22 @@
       }
     }
-    
+
     public static CSharpFileOptions ParseFrom(pb::ByteString data) {
-      return ((Builder) CreateBuilder().MergeFrom(data)).BuildParsed();
+      return ((Builder)CreateBuilder().MergeFrom(data)).BuildParsed();
     }
     public static CSharpFileOptions ParseFrom(pb::ByteString data, pb::ExtensionRegistry extensionRegistry) {
-      return ((Builder) CreateBuilder().MergeFrom(data, extensionRegistry)).BuildParsed();
+      return ((Builder)CreateBuilder().MergeFrom(data, extensionRegistry)).BuildParsed();
     }
     public static CSharpFileOptions ParseFrom(byte[] data) {
-      return ((Builder) CreateBuilder().MergeFrom(data)).BuildParsed();
+      return ((Builder)CreateBuilder().MergeFrom(data)).BuildParsed();
     }
     public static CSharpFileOptions ParseFrom(byte[] data, pb::ExtensionRegistry extensionRegistry) {
-      return ((Builder) CreateBuilder().MergeFrom(data, extensionRegistry)).BuildParsed();
+      return ((Builder)CreateBuilder().MergeFrom(data, extensionRegistry)).BuildParsed();
     }
     public static CSharpFileOptions ParseFrom(global::System.IO.Stream input) {
-      return ((Builder) CreateBuilder().MergeFrom(input)).BuildParsed();
+      return ((Builder)CreateBuilder().MergeFrom(input)).BuildParsed();
     }
     public static CSharpFileOptions ParseFrom(global::System.IO.Stream input, pb::ExtensionRegistry extensionRegistry) {
-      return ((Builder) CreateBuilder().MergeFrom(input, extensionRegistry)).BuildParsed();
+      return ((Builder)CreateBuilder().MergeFrom(input, extensionRegistry)).BuildParsed();
     }
     public static CSharpFileOptions ParseDelimitedFrom(global::System.IO.Stream input) {
@@ -254,8 +252,8 @@
     }
     public static CSharpFileOptions ParseFrom(pb::CodedInputStream input) {
-      return ((Builder) CreateBuilder().MergeFrom(input)).BuildParsed();
+      return ((Builder)CreateBuilder().MergeFrom(input)).BuildParsed();
     }
     public static CSharpFileOptions ParseFrom(pb::CodedInputStream input, pb::ExtensionRegistry extensionRegistry) {
-      return ((Builder) CreateBuilder().MergeFrom(input, extensionRegistry)).BuildParsed();
+      return ((Builder)CreateBuilder().MergeFrom(input, extensionRegistry)).BuildParsed();
     }
     public static Builder CreateBuilder() { return new Builder(); }
@@ -263,36 +261,36 @@
     public override Builder CreateBuilderForType() { return new Builder(); }
     public static Builder CreateBuilder(CSharpFileOptions prototype) {
-      return (Builder) new Builder().MergeFrom(prototype);
-    }
-    
+      return (Builder)new Builder().MergeFrom(prototype);
+    }
+
     public sealed partial class Builder : pb::GeneratedBuilder<CSharpFileOptions, Builder> {
       protected override Builder ThisBuilder {
         get { return this; }
       }
-      public Builder() {}
-      
+      public Builder() { }
+
       CSharpFileOptions result = new CSharpFileOptions();
-      
+
       protected override CSharpFileOptions MessageBeingBuilt {
         get { return result; }
       }
-      
+
       public override Builder Clear() {
         result = new CSharpFileOptions();
         return this;
       }
-      
+
       public override Builder Clone() {
         return new Builder().MergeFrom(result);
       }
-      
+
       public override pbd::MessageDescriptor DescriptorForType {
         get { return global::Google.ProtocolBuffers.DescriptorProtos.CSharpFileOptions.Descriptor; }
       }
-      
+
       public override CSharpFileOptions DefaultInstanceForType {
         get { return global::Google.ProtocolBuffers.DescriptorProtos.CSharpFileOptions.DefaultInstance; }
       }
-      
+
       public override CSharpFileOptions BuildPartial() {
         if (result == null) {
@@ -303,8 +301,8 @@
         return returnMe;
       }
-      
+
       public override Builder MergeFrom(pb::IMessage other) {
         if (other is CSharpFileOptions) {
-          return MergeFrom((CSharpFileOptions) other);
+          return MergeFrom((CSharpFileOptions)other);
         } else {
           base.MergeFrom(other);
@@ -312,5 +310,5 @@
         }
       }
-      
+
       public override Builder MergeFrom(CSharpFileOptions other) {
         if (other == global::Google.ProtocolBuffers.DescriptorProtos.CSharpFileOptions.DefaultInstance) return this;
@@ -339,9 +337,9 @@
         return this;
       }
-      
+
       public override Builder MergeFrom(pb::CodedInputStream input) {
         return MergeFrom(input, pb::ExtensionRegistry.Empty);
       }
-      
+
       public override Builder MergeFrom(pb::CodedInputStream input, pb::ExtensionRegistry extensionRegistry) {
         pb::UnknownFieldSet.Builder unknownFields = null;
@@ -350,11 +348,4 @@
           switch (tag) {
             case 0: {
-              if (unknownFields != null) {
-                this.UnknownFields = unknownFields.Build();
-              }
-              return this;
-            }
-            default: {
-              if (pb::WireFormat.IsEndGroupTag(tag)) {
                 if (unknownFields != null) {
                   this.UnknownFields = unknownFields.Build();
@@ -362,43 +353,50 @@
                 return this;
               }
-              if (unknownFields == null) {
-                unknownFields = pb::UnknownFieldSet.CreateBuilder(this.UnknownFields);
-              }
-              ParseUnknownField(input, unknownFields, extensionRegistry, tag);
-              break;
-            }
+            default: {
+                if (pb::WireFormat.IsEndGroupTag(tag)) {
+                  if (unknownFields != null) {
+                    this.UnknownFields = unknownFields.Build();
+                  }
+                  return this;
+                }
+                if (unknownFields == null) {
+                  unknownFields = pb::UnknownFieldSet.CreateBuilder(this.UnknownFields);
+                }
+                ParseUnknownField(input, unknownFields, extensionRegistry, tag);
+                break;
+              }
             case 10: {
-              Namespace = input.ReadString();
-              break;
-            }
+                Namespace = input.ReadString();
+                break;
+              }
             case 18: {
-              UmbrellaClassname = input.ReadString();
-              break;
-            }
+                UmbrellaClassname = input.ReadString();
+                break;
+              }
             case 24: {
-              PublicClasses = input.ReadBool();
-              break;
-            }
+                PublicClasses = input.ReadBool();
+                break;
+              }
             case 32: {
-              MultipleFiles = input.ReadBool();
-              break;
-            }
+                MultipleFiles = input.ReadBool();
+                break;
+              }
             case 40: {
-              NestClasses = input.ReadBool();
-              break;
-            }
+                NestClasses = input.ReadBool();
+                break;
+              }
             case 48: {
-              CodeContracts = input.ReadBool();
-              break;
-            }
+                CodeContracts = input.ReadBool();
+                break;
+              }
             case 56: {
-              ExpandNamespaceDirectories = input.ReadBool();
-              break;
-            }
+                ExpandNamespaceDirectories = input.ReadBool();
+                break;
+              }
           }
         }
       }
-      
-      
+
+
       public bool HasNamespace {
         get { return result.HasNamespace; }
@@ -419,5 +417,5 @@
         return this;
       }
-      
+
       public bool HasUmbrellaClassname {
         get { return result.HasUmbrellaClassname; }
@@ -438,5 +436,5 @@
         return this;
       }
-      
+
       public bool HasPublicClasses {
         get { return result.HasPublicClasses; }
@@ -456,5 +454,5 @@
         return this;
       }
-      
+
       public bool HasMultipleFiles {
         get { return result.HasMultipleFiles; }
@@ -474,5 +472,5 @@
         return this;
       }
-      
+
       public bool HasNestClasses {
         get { return result.HasNestClasses; }
@@ -492,5 +490,5 @@
         return this;
       }
-      
+
       public bool HasCodeContracts {
         get { return result.HasCodeContracts; }
@@ -510,5 +508,5 @@
         return this;
       }
-      
+
       public bool HasExpandNamespaceDirectories {
         get { return result.HasExpandNamespaceDirectories; }
@@ -533,5 +531,5 @@
     }
   }
-  
+
   public sealed partial class CSharpFieldOptions : pb::GeneratedMessage<CSharpFieldOptions, CSharpFieldOptions.Builder> {
     private static readonly CSharpFieldOptions defaultInstance = new Builder().BuildPartial();
@@ -539,21 +537,21 @@
       get { return defaultInstance; }
     }
-    
+
     public override CSharpFieldOptions DefaultInstanceForType {
       get { return defaultInstance; }
     }
-    
+
     protected override CSharpFieldOptions ThisMessage {
       get { return this; }
     }
-    
+
     public static pbd::MessageDescriptor Descriptor {
       get { return global::Google.ProtocolBuffers.DescriptorProtos.CSharpOptions.internal__static_google_protobuf_CSharpFieldOptions__Descriptor; }
     }
-    
+
     protected override pb::FieldAccess.FieldAccessorTable<CSharpFieldOptions, CSharpFieldOptions.Builder> InternalFieldAccessors {
       get { return global::Google.ProtocolBuffers.DescriptorProtos.CSharpOptions.internal__static_google_protobuf_CSharpFieldOptions__FieldAccessorTable; }
     }
-    
+
     public const int PropertyNameFieldNumber = 1;
     private bool hasPropertyName;
@@ -565,5 +563,5 @@
       get { return propertyName_; }
     }
-    
+
     public override bool IsInitialized {
       get {
@@ -571,5 +569,5 @@
       }
     }
-    
+
     public override void WriteTo(pb::CodedOutputStream output) {
       int size = SerializedSize;
@@ -579,5 +577,5 @@
       UnknownFields.WriteTo(output);
     }
-    
+
     private int memoizedSerializedSize = -1;
     public override int SerializedSize {
@@ -585,5 +583,5 @@
         int size = memoizedSerializedSize;
         if (size != -1) return size;
-        
+
         size = 0;
         if (HasPropertyName) {
@@ -595,22 +593,22 @@
       }
     }
-    
+
     public static CSharpFieldOptions ParseFrom(pb::ByteString data) {
-      return ((Builder) CreateBuilder().MergeFrom(data)).BuildParsed();
+      return ((Builder)CreateBuilder().MergeFrom(data)).BuildParsed();
     }
     public static CSharpFieldOptions ParseFrom(pb::ByteString data, pb::ExtensionRegistry extensionRegistry) {
-      return ((Builder) CreateBuilder().MergeFrom(data, extensionRegistry)).BuildParsed();
+      return ((Builder)CreateBuilder().MergeFrom(data, extensionRegistry)).BuildParsed();
     }
     public static CSharpFieldOptions ParseFrom(byte[] data) {
-      return ((Builder) CreateBuilder().MergeFrom(data)).BuildParsed();
+      return ((Builder)CreateBuilder().MergeFrom(data)).BuildParsed();
     }
     public static CSharpFieldOptions ParseFrom(byte[] data, pb::ExtensionRegistry extensionRegistry) {
-      return ((Builder) CreateBuilder().MergeFrom(data, extensionRegistry)).BuildParsed();
+      return ((Builder)CreateBuilder().MergeFrom(data, extensionRegistry)).BuildParsed();
     }
     public static CSharpFieldOptions ParseFrom(global::System.IO.Stream input) {
-      return ((Builder) CreateBuilder().MergeFrom(input)).BuildParsed();
+      return ((Builder)CreateBuilder().MergeFrom(input)).BuildParsed();
     }
     public static CSharpFieldOptions ParseFrom(global::System.IO.Stream input, pb::ExtensionRegistry extensionRegistry) {
-      return ((Builder) CreateBuilder().MergeFrom(input, extensionRegistry)).BuildParsed();
+      return ((Builder)CreateBuilder().MergeFrom(input, extensionRegistry)).BuildParsed();
     }
     public static CSharpFieldOptions ParseDelimitedFrom(global::System.IO.Stream input) {
@@ -621,8 +619,8 @@
     }
     public static CSharpFieldOptions ParseFrom(pb::CodedInputStream input) {
-      return ((Builder) CreateBuilder().MergeFrom(input)).BuildParsed();
+      return ((Builder)CreateBuilder().MergeFrom(input)).BuildParsed();
     }
     public static CSharpFieldOptions ParseFrom(pb::CodedInputStream input, pb::ExtensionRegistry extensionRegistry) {
-      return ((Builder) CreateBuilder().MergeFrom(input, extensionRegistry)).BuildParsed();
+      return ((Builder)CreateBuilder().MergeFrom(input, extensionRegistry)).BuildParsed();
     }
     public static Builder CreateBuilder() { return new Builder(); }
@@ -630,36 +628,36 @@
     public override Builder CreateBuilderForType() { return new Builder(); }
     public static Builder CreateBuilder(CSharpFieldOptions prototype) {
-      return (Builder) new Builder().MergeFrom(prototype);
-    }
-    
+      return (Builder)new Builder().MergeFrom(prototype);
+    }
+
     public sealed partial class Builder : pb::GeneratedBuilder<CSharpFieldOptions, Builder> {
       protected override Builder ThisBuilder {
         get { return this; }
       }
-      public Builder() {}
-      
+      public Builder() { }
+
       CSharpFieldOptions result = new CSharpFieldOptions();
-      
+
       protected override CSharpFieldOptions MessageBeingBuilt {
         get { return result; }
       }
-      
+
       public override Builder Clear() {
         result = new CSharpFieldOptions();
         return this;
       }
-      
+
       public override Builder Clone() {
         return new Builder().MergeFrom(result);
       }
-      
+
       public override pbd::MessageDescriptor DescriptorForType {
         get { return global::Google.ProtocolBuffers.DescriptorProtos.CSharpFieldOptions.Descriptor; }
       }
-      
+
       public override CSharpFieldOptions DefaultInstanceForType {
         get { return global::Google.ProtocolBuffers.DescriptorProtos.CSharpFieldOptions.DefaultInstance; }
       }
-      
+
       public override CSharpFieldOptions BuildPartial() {
         if (result == null) {
@@ -670,8 +668,8 @@
         return returnMe;
       }
-      
+
       public override Builder MergeFrom(pb::IMessage other) {
         if (other is CSharpFieldOptions) {
-          return MergeFrom((CSharpFieldOptions) other);
+          return MergeFrom((CSharpFieldOptions)other);
         } else {
           base.MergeFrom(other);
@@ -679,5 +677,5 @@
         }
       }
-      
+
       public override Builder MergeFrom(CSharpFieldOptions other) {
         if (other == global::Google.ProtocolBuffers.DescriptorProtos.CSharpFieldOptions.DefaultInstance) return this;
@@ -688,9 +686,9 @@
         return this;
       }
-      
+
       public override Builder MergeFrom(pb::CodedInputStream input) {
         return MergeFrom(input, pb::ExtensionRegistry.Empty);
       }
-      
+
       public override Builder MergeFrom(pb::CodedInputStream input, pb::ExtensionRegistry extensionRegistry) {
         pb::UnknownFieldSet.Builder unknownFields = null;
@@ -699,11 +697,4 @@
           switch (tag) {
             case 0: {
-              if (unknownFields != null) {
-                this.UnknownFields = unknownFields.Build();
-              }
-              return this;
-            }
-            default: {
-              if (pb::WireFormat.IsEndGroupTag(tag)) {
                 if (unknownFields != null) {
                   this.UnknownFields = unknownFields.Build();
@@ -711,19 +702,26 @@
                 return this;
               }
-              if (unknownFields == null) {
-                unknownFields = pb::UnknownFieldSet.CreateBuilder(this.UnknownFields);
-              }
-              ParseUnknownField(input, unknownFields, extensionRegistry, tag);
-              break;
-            }
+            default: {
+                if (pb::WireFormat.IsEndGroupTag(tag)) {
+                  if (unknownFields != null) {
+                    this.UnknownFields = unknownFields.Build();
+                  }
+                  return this;
+                }
+                if (unknownFields == null) {
+                  unknownFields = pb::UnknownFieldSet.CreateBuilder(this.UnknownFields);
+                }
+                ParseUnknownField(input, unknownFields, extensionRegistry, tag);
+                break;
+              }
             case 10: {
-              PropertyName = input.ReadString();
-              break;
-            }
+                PropertyName = input.ReadString();
+                break;
+              }
           }
         }
       }
-      
-      
+
+
       public bool HasPropertyName {
         get { return result.HasPropertyName; }
@@ -749,6 +747,6 @@
     }
   }
-  
+
   #endregion
-  
+
 }
Index: /trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.ProtobufCS/0.9.1/ProtobufCS/src/ProtocolBuffers/Descriptors/DescriptorPool.cs
===================================================================
--- /trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.ProtobufCS/0.9.1/ProtobufCS/src/ProtocolBuffers/Descriptors/DescriptorPool.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.ProtobufCS/0.9.1/ProtobufCS/src/ProtocolBuffers/Descriptors/DescriptorPool.cs	(revision 4068)
@@ -1,2 +1,3 @@
+using System;
 // Protocol Buffers - Google's data interchange format
 // Copyright 2008 Google Inc.  All rights reserved.
@@ -31,5 +32,4 @@
 // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 using System.Collections.Generic;
-using System;
 using System.Text;
 using System.Text.RegularExpressions;
Index: /trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.ProtobufCS/0.9.1/ProtobufCS/src/ProtocolBuffers/ExtensionRegistry.cs
===================================================================
--- /trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.ProtobufCS/0.9.1/ProtobufCS/src/ProtocolBuffers/ExtensionRegistry.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.ProtobufCS/0.9.1/ProtobufCS/src/ProtocolBuffers/ExtensionRegistry.cs	(revision 4068)
@@ -33,7 +33,7 @@
 #endregion
 
+using System;
 using System.Collections.Generic;
 using Google.ProtocolBuffers.Descriptors;
-using System;
 
 namespace Google.ProtocolBuffers {
@@ -156,5 +156,5 @@
     /// Add an extension from a generated file to the registry.
     /// </summary>
-    public void Add<TExtension> (GeneratedExtensionBase<TExtension> extension) {
+    public void Add<TExtension>(GeneratedExtensionBase<TExtension> extension) {
       if (extension.Descriptor.MappedType == MappedType.Message) {
         Add(new ExtensionInfo(extension.Descriptor, extension.MessageDefaultInstance));
Index: /trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.ProtobufCS/0.9.1/ProtobufCS/src/ProtocolBuffers/GeneratedMessage.cs
===================================================================
--- /trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.ProtobufCS/0.9.1/ProtobufCS/src/ProtocolBuffers/GeneratedMessage.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.ProtobufCS/0.9.1/ProtobufCS/src/ProtocolBuffers/GeneratedMessage.cs	(revision 4068)
@@ -34,12 +34,12 @@
 
 using System;
+using System.Collections;
 using System.Collections.Generic;
 using Google.ProtocolBuffers.Collections;
 using Google.ProtocolBuffers.Descriptors;
 using Google.ProtocolBuffers.FieldAccess;
-using System.Collections;
 
 namespace Google.ProtocolBuffers {
-  
+
   /// <summary>
   /// All generated protocol message classes extend this class. It implements
@@ -48,6 +48,6 @@
   /// </summary>
   public abstract class GeneratedMessage<TMessage, TBuilder> : AbstractMessage<TMessage, TBuilder>
-      where TMessage : GeneratedMessage<TMessage, TBuilder> 
-      where TBuilder : GeneratedBuilder<TMessage, TBuilder> {
+    where TMessage : GeneratedMessage<TMessage, TBuilder>
+    where TBuilder : GeneratedBuilder<TMessage, TBuilder> {
 
     private UnknownFieldSet unknownFields = UnknownFieldSet.DefaultInstance;
@@ -100,5 +100,5 @@
               // We know it's an IList<T>, but not the exact type - so
               // IEnumerable is the best we can do. (C# generics aren't covariant yet.)
-              foreach (IMessage element in (IEnumerable) this[field]) {
+              foreach (IMessage element in (IEnumerable)this[field]) {
                 if (!element.IsInitialized) {
                   return false;
@@ -106,5 +106,5 @@
               }
             } else {
-              if (HasField(field) && !((IMessage) this[field]).IsInitialized) {
+              if (HasField(field) && !((IMessage)this[field]).IsInitialized) {
                 return false;
               }
@@ -148,5 +148,5 @@
     internal void SetUnknownFields(UnknownFieldSet fieldSet) {
       unknownFields = fieldSet;
-    }    
+    }
   }
 }
Index: /trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.ProtobufCS/0.9.1/ProtobufCS/src/ProtocolBuffers/GeneratedRepeatExtension.cs
===================================================================
--- /trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.ProtobufCS/0.9.1/ProtobufCS/src/ProtocolBuffers/GeneratedRepeatExtension.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.ProtobufCS/0.9.1/ProtobufCS/src/ProtocolBuffers/GeneratedRepeatExtension.cs	(revision 4068)
@@ -34,7 +34,7 @@
 
 using System;
+using System.Collections;
 using System.Collections.Generic;
 using Google.ProtocolBuffers.Descriptors;
-using System.Collections;
 
 namespace Google.ProtocolBuffers {
@@ -43,5 +43,6 @@
   /// </summary>
   public sealed class GeneratedRepeatExtension<TExtensionElement> : GeneratedExtensionBase<IList<TExtensionElement>> {
-    private GeneratedRepeatExtension(FieldDescriptor field) : base(field, typeof(TExtensionElement)) {
+    private GeneratedRepeatExtension(FieldDescriptor field)
+      : base(field, typeof(TExtensionElement)) {
     }
 
@@ -65,6 +66,6 @@
         // Must convert the whole list.
         List<TExtensionElement> result = new List<TExtensionElement>();
-        foreach (object element in (IEnumerable) value) {
-          result.Add((TExtensionElement) SingularFromReflectionType(element));
+        foreach (object element in (IEnumerable)value) {
+          result.Add((TExtensionElement)SingularFromReflectionType(element));
         }
         return result;
Index: /trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.ProtobufCS/0.9.1/ProtobufCS/src/ProtocolBuffers/MessageStreamIterator.cs
===================================================================
--- /trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.ProtobufCS/0.9.1/ProtobufCS/src/ProtocolBuffers/MessageStreamIterator.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.ProtobufCS/0.9.1/ProtobufCS/src/ProtocolBuffers/MessageStreamIterator.cs	(revision 4068)
@@ -34,6 +34,6 @@
 
 using System;
+using System.Collections;
 using System.Collections.Generic;
-using System.Collections;
 using System.IO;
 using System.Reflection;
@@ -91,9 +91,12 @@
         return (Func<CodedInputStream, ExtensionRegistry, TMessage>)Delegate.CreateDelegate(
           typeof(Func<CodedInputStream, ExtensionRegistry, TMessage>), builderBuilder, buildMethod);
-      } catch (ArgumentException e) {
+      }
+      catch (ArgumentException e) {
         typeInitializationException = e;
-      } catch (InvalidOperationException e) {
+      }
+      catch (InvalidOperationException e) {
         typeInitializationException = e;
-      } catch (InvalidCastException e) {
+      }
+      catch (InvalidCastException e) {
         // Can't see why this would happen, but best to know about it.
         typeInitializationException = e;
@@ -125,6 +128,6 @@
     }
 
-// This is only ever fetched by reflection, so the compiler may
-// complain that it's unused
+    // This is only ever fetched by reflection, so the compiler may
+    // complain that it's unused
 #pragma warning disable 0169
     /// <summary>
@@ -136,7 +139,7 @@
     /// be the same type when we construct the generic method by reflection.
     /// </summary>
-    private static TMessage BuildImpl<TMessage2, TBuilder>(Func<TBuilder> builderBuilder, CodedInputStream input, ExtensionRegistry registry) 
-        where TBuilder : IBuilder<TMessage2, TBuilder>
-        where TMessage2 : TMessage, IMessage<TMessage2, TBuilder> {
+    private static TMessage BuildImpl<TMessage2, TBuilder>(Func<TBuilder> builderBuilder, CodedInputStream input, ExtensionRegistry registry)
+      where TBuilder : IBuilder<TMessage2, TBuilder>
+      where TMessage2 : TMessage, IMessage<TMessage2, TBuilder> {
       TBuilder builder = builderBuilder();
       input.ReadMessage(builder, registry);
@@ -156,6 +159,6 @@
     }
 
-    private MessageStreamIterator(StreamProvider streamProvider, ExtensionRegistry extensionRegistry) 
-      : this (streamProvider, extensionRegistry, CodedInputStream.DefaultSizeLimit) {
+    private MessageStreamIterator(StreamProvider streamProvider, ExtensionRegistry extensionRegistry)
+      : this(streamProvider, extensionRegistry, CodedInputStream.DefaultSizeLimit) {
     }
 
Index: /trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.ProtobufCS/0.9.1/ProtobufCS/src/ProtocolBuffers/NameHelpers.cs
===================================================================
--- /trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.ProtobufCS/0.9.1/ProtobufCS/src/ProtocolBuffers/NameHelpers.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.ProtobufCS/0.9.1/ProtobufCS/src/ProtocolBuffers/NameHelpers.cs	(revision 4068)
@@ -33,6 +33,6 @@
 #endregion
 
+using System.Globalization;
 using System.Text;
-using System.Globalization;
 
 namespace Google.ProtocolBuffers {
Index: /trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.ProtobufCS/0.9.1/ProtobufCS/src/ProtocolBuffers/Properties/AssemblyInfo.cs
===================================================================
--- /trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.ProtobufCS/0.9.1/ProtobufCS/src/ProtocolBuffers/Properties/AssemblyInfo.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.ProtobufCS/0.9.1/ProtobufCS/src/ProtocolBuffers/Properties/AssemblyInfo.cs	(revision 4068)
@@ -32,6 +32,6 @@
 using System;
 using System.Reflection;
+using System.Runtime.CompilerServices;
 using System.Runtime.InteropServices;
-using System.Runtime.CompilerServices;
 
 // General Information about an assembly is controlled through the following 
@@ -69,9 +69,9 @@
 #endif
 
-[assembly:InternalsVisibleTo("Google.ProtocolBuffers.Test,PublicKey="+
-"00240000048000009400000006020000002400005253413100040000010001008179f2dd31a648"+
-"2a2359dbe33e53701167a888e7c369a9ae3210b64f93861d8a7d286447e58bc167e3d99483beda"+
-"72f738140072bb69990bc4f98a21365de2c105e848974a3d210e938b0a56103c0662901efd6b78"+
-"0ee6dbe977923d46a8fda18fb25c65dd73b149a5cd9f3100668b56649932dadd8cf5be52eb1dce"+
+[assembly: InternalsVisibleTo("Google.ProtocolBuffers.Test,PublicKey=" +
+"00240000048000009400000006020000002400005253413100040000010001008179f2dd31a648" +
+"2a2359dbe33e53701167a888e7c369a9ae3210b64f93861d8a7d286447e58bc167e3d99483beda" +
+"72f738140072bb69990bc4f98a21365de2c105e848974a3d210e938b0a56103c0662901efd6b78" +
+"0ee6dbe977923d46a8fda18fb25c65dd73b149a5cd9f3100668b56649932dadd8cf5be52eb1dce" +
 "ad5cedbf")]
 [assembly: InternalsVisibleTo("ProtoGen,PublicKey=" +
Index: /trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.ProtobufCS/0.9.1/ProtobufCS/src/ProtocolBuffers/TextFormat.cs
===================================================================
--- /trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.ProtobufCS/0.9.1/ProtobufCS/src/ProtocolBuffers/TextFormat.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.ProtobufCS/0.9.1/ProtobufCS/src/ProtocolBuffers/TextFormat.cs	(revision 4068)
@@ -34,4 +34,5 @@
 
 using System;
+using System.Collections;
 using System.Collections.Generic;
 using System.Globalization;
@@ -39,5 +40,4 @@
 using System.Text;
 using Google.ProtocolBuffers.Descriptors;
-using System.Collections;
 
 namespace Google.ProtocolBuffers {
@@ -87,5 +87,5 @@
       if (field.IsRepeated) {
         // Repeated field.  Print each element.
-        foreach (object element in (IEnumerable) value) {
+        foreach (object element in (IEnumerable)value) {
           PrintSingleField(field, element, generator);
         }
@@ -102,5 +102,5 @@
             && field.FieldType == FieldType.Message
             && field.IsOptional
-            // object equality (TODO(jonskeet): Work out what this comment means!)
+          // object equality (TODO(jonskeet): Work out what this comment means!)
             && field.ExtensionScope == field.MessageType) {
           generator.Print(field.MessageType.FullName);
@@ -150,32 +150,32 @@
           // The simple Object.ToString converts using the current culture.
           // We want to always use the invariant culture so it's predictable.
-          generator.Print(((IConvertible) value).ToString(CultureInfo.InvariantCulture));
+          generator.Print(((IConvertible)value).ToString(CultureInfo.InvariantCulture));
           break;
         case FieldType.Bool:
           // Explicitly use the Java true/false
-          generator.Print((bool) value ? "true" : "false");
+          generator.Print((bool)value ? "true" : "false");
           break;
 
         case FieldType.String:
           generator.Print("\"");
-          generator.Print(EscapeText((string) value));
+          generator.Print(EscapeText((string)value));
           generator.Print("\"");
           break;
 
         case FieldType.Bytes: {
-          generator.Print("\"");
-          generator.Print(EscapeBytes((ByteString) value));
-          generator.Print("\"");
-          break;
-        }
+            generator.Print("\"");
+            generator.Print(EscapeBytes((ByteString)value));
+            generator.Print("\"");
+            break;
+          }
 
         case FieldType.Enum: {
-          generator.Print(((EnumValueDescriptor) value).Name);
-          break;
-        }
+            generator.Print(((EnumValueDescriptor)value).Name);
+            break;
+          }
 
         case FieldType.Message:
         case FieldType.Group:
-          Print((IMessage) value, generator);
+          Print((IMessage)value, generator);
           break;
       }
@@ -220,5 +220,5 @@
 
     internal static ulong ParseUInt64(string text) {
-      return (ulong) ParseInteger(text, false, true);
+      return (ulong)ParseInteger(text, false, true);
     }
 
@@ -228,9 +228,9 @@
 
     internal static uint ParseUInt32(string text) {
-      return (uint) ParseInteger(text, false, false);
+      return (uint)ParseInteger(text, false, false);
     }
 
     internal static int ParseInt32(string text) {
-      return (int) ParseInteger(text, true, false);
+      return (int)ParseInteger(text, true, false);
     }
 
@@ -269,5 +269,5 @@
       }
     }
-    
+
     /// <summary>
     /// Parses an integer in hex (leading 0x), decimal (no prefix) or octal (leading 0).
@@ -298,5 +298,6 @@
         // We should be able to use Convert.ToUInt64 for all cases.
         result = radix == 10 ? ulong.Parse(text) : Convert.ToUInt64(text, radix);
-      } catch (OverflowException) {
+      }
+      catch (OverflowException) {
         // Convert OverflowException to FormatException so there's a single exception type this method can throw.
         string numberDescription = string.Format("{0}-bit {1}signed integer", isLong ? 64 : 32, isSigned ? "" : "un");
@@ -310,8 +311,8 @@
           throw new FormatException("Number out of range for " + numberDescription + ": " + original);
         }
-        return -((long) result);
-      } else {
-        ulong max = isSigned 
-            ? (isLong ? (ulong) long.MaxValue : int.MaxValue)
+        return -((long)result);
+      } else {
+        ulong max = isSigned
+            ? (isLong ? (ulong)long.MaxValue : int.MaxValue)
             : (isLong ? ulong.MaxValue : uint.MaxValue);
         if (result > max) {
@@ -319,5 +320,5 @@
           throw new FormatException("Number out of range for " + numberDescription + ": " + original);
         }
-        return (long) result;
+        return (long)result;
       }
     }
@@ -384,22 +385,22 @@
         switch (b) {
           // C# does not use \a or \v
-          case 0x07: builder.Append("\\a" ); break;
-          case (byte)'\b': builder.Append("\\b" ); break;
-          case (byte)'\f': builder.Append("\\f" ); break;
-          case (byte)'\n': builder.Append("\\n" ); break;
-          case (byte)'\r': builder.Append("\\r" ); break;
-          case (byte)'\t': builder.Append("\\t" ); break;
-          case 0x0b: builder.Append("\\v" ); break;
+          case 0x07: builder.Append("\\a"); break;
+          case (byte)'\b': builder.Append("\\b"); break;
+          case (byte)'\f': builder.Append("\\f"); break;
+          case (byte)'\n': builder.Append("\\n"); break;
+          case (byte)'\r': builder.Append("\\r"); break;
+          case (byte)'\t': builder.Append("\\t"); break;
+          case 0x0b: builder.Append("\\v"); break;
           case (byte)'\\': builder.Append("\\\\"); break;
           case (byte)'\'': builder.Append("\\\'"); break;
-          case (byte)'"' : builder.Append("\\\""); break;
+          case (byte)'"': builder.Append("\\\""); break;
           default:
             if (b >= 0x20 && b < 128) {
-              builder.Append((char) b);
+              builder.Append((char)b);
             } else {
               builder.Append('\\');
-              builder.Append((char) ('0' + ((b >> 6) & 3)));
-              builder.Append((char) ('0' + ((b >> 3) & 7)));
-              builder.Append((char) ('0' + (b & 7)));
+              builder.Append((char)('0' + ((b >> 6) & 3)));
+              builder.Append((char)('0' + ((b >> 3) & 7)));
+              builder.Append((char)('0' + (b & 7)));
             }
             break;
@@ -421,5 +422,5 @@
         }
         if (c != '\\') {
-          result[pos++] = (byte) c;
+          result[pos++] = (byte)c;
           continue;
         }
@@ -433,30 +434,30 @@
           // Octal escape. 
           int code = ParseDigit(c);
-          if (i + 1 < input.Length && IsOctal(input[i+1])) {
+          if (i + 1 < input.Length && IsOctal(input[i + 1])) {
             i++;
             code = code * 8 + ParseDigit(input[i]);
           }
-          if (i + 1 < input.Length && IsOctal(input[i+1])) {
+          if (i + 1 < input.Length && IsOctal(input[i + 1])) {
             i++;
             code = code * 8 + ParseDigit(input[i]);
           }
-          result[pos++] = (byte) code;
+          result[pos++] = (byte)code;
         } else {
           switch (c) {
             case 'a': result[pos++] = 0x07; break;
-            case 'b': result[pos++] = (byte) '\b'; break;
-            case 'f': result[pos++] = (byte) '\f'; break;
-            case 'n': result[pos++] = (byte) '\n'; break;
-            case 'r': result[pos++] = (byte) '\r'; break;
-            case 't': result[pos++] = (byte) '\t'; break;
+            case 'b': result[pos++] = (byte)'\b'; break;
+            case 'f': result[pos++] = (byte)'\f'; break;
+            case 'n': result[pos++] = (byte)'\n'; break;
+            case 'r': result[pos++] = (byte)'\r'; break;
+            case 't': result[pos++] = (byte)'\t'; break;
             case 'v': result[pos++] = 0x0b; break;
-            case '\\': result[pos++] = (byte) '\\'; break;
-            case '\'': result[pos++] = (byte) '\''; break;
-            case '"': result[pos++] = (byte) '\"'; break;
+            case '\\': result[pos++] = (byte)'\\'; break;
+            case '\'': result[pos++] = (byte)'\''; break;
+            case '"': result[pos++] = (byte)'\"'; break;
 
             case 'x':
               // hex escape
               int code;
-              if (i + 1 < input.Length && IsHex(input[i+1])) {
+              if (i + 1 < input.Length && IsHex(input[i + 1])) {
                 i++;
                 code = ParseDigit(input[i]);
@@ -464,5 +465,5 @@
                 throw new FormatException("Invalid escape sequence: '\\x' with no digits");
               }
-              if (i + 1 < input.Length && IsHex(input[i+1])) {
+              if (i + 1 < input.Length && IsHex(input[i + 1])) {
                 ++i;
                 code = code * 16 + ParseDigit(input[i]);
@@ -636,26 +637,26 @@
 
           case FieldType.Enum: {
-            EnumDescriptor enumType = field.EnumType;
-
-            if (tokenizer.LookingAtInteger()) {
-              int number = tokenizer.ConsumeInt32();
-              value = enumType.FindValueByNumber(number);
-              if (value == null) {
-                throw tokenizer.CreateFormatExceptionPreviousToken(
-                  "Enum type \"" + enumType.FullName +
-                  "\" has no value with number " + number + ".");
+              EnumDescriptor enumType = field.EnumType;
+
+              if (tokenizer.LookingAtInteger()) {
+                int number = tokenizer.ConsumeInt32();
+                value = enumType.FindValueByNumber(number);
+                if (value == null) {
+                  throw tokenizer.CreateFormatExceptionPreviousToken(
+                    "Enum type \"" + enumType.FullName +
+                    "\" has no value with number " + number + ".");
+                }
+              } else {
+                String id = tokenizer.ConsumeIdentifier();
+                value = enumType.FindValueByName(id);
+                if (value == null) {
+                  throw tokenizer.CreateFormatExceptionPreviousToken(
+                    "Enum type \"" + enumType.FullName +
+                    "\" has no value named \"" + id + "\".");
+                }
               }
-            } else {
-              String id = tokenizer.ConsumeIdentifier();
-              value = enumType.FindValueByName(id);
-              if (value == null) {
-                throw tokenizer.CreateFormatExceptionPreviousToken(
-                  "Enum type \"" + enumType.FullName +
-                  "\" has no value named \"" + id + "\".");
-              }
+
+              break;
             }
-
-            break;
-          }
 
           case FieldType.Message:
Index: /trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.ProtobufCS/0.9.1/ProtobufCS/src/ProtocolBuffers/UnknownFieldSet.cs
===================================================================
--- /trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.ProtobufCS/0.9.1/ProtobufCS/src/ProtocolBuffers/UnknownFieldSet.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.ProtobufCS/0.9.1/ProtobufCS/src/ProtocolBuffers/UnknownFieldSet.cs	(revision 4068)
@@ -38,5 +38,4 @@
 using Google.ProtocolBuffers.Collections;
 using Google.ProtocolBuffers.Descriptors;
-using Google.ProtocolBuffers.DescriptorProtos;
 
 namespace Google.ProtocolBuffers {
@@ -121,5 +120,5 @@
     /// Gets the number of bytes required to encode this set.
     /// </summary>
-    public int SerializedSize { 
+    public int SerializedSize {
       get {
         int result = 0;
@@ -128,5 +127,5 @@
         }
         return result;
-      } 
+      }
     }
 
@@ -241,6 +240,5 @@
     /// Builder for UnknownFieldSets.
     /// </summary>
-    public sealed class Builder
-    {
+    public sealed class Builder {
       /// <summary>
       /// Mapping from number to field. Note that by using a SortedList we ensure
@@ -320,5 +318,5 @@
         return this;
       }
-      
+
       /// <summary>
       /// Parse an entire message from <paramref name="input"/> and merge
@@ -335,11 +333,11 @@
       }
 
-        /// <summary>
-        /// Parse a single field from <paramref name="input"/> and merge it
-        /// into this set.
-        /// </summary>
-        /// <param name="tag">The field's tag number, which was already parsed.</param>
-        /// <param name="input">The coded input stream containing the field</param>
-        /// <returns>false if the tag is an "end group" tag, true otherwise</returns>
+      /// <summary>
+      /// Parse a single field from <paramref name="input"/> and merge it
+      /// into this set.
+      /// </summary>
+      /// <param name="tag">The field's tag number, which was already parsed.</param>
+      /// <param name="input">The coded input stream containing the field</param>
+      /// <returns>false if the tag is an "end group" tag, true otherwise</returns>
       [CLSCompliant(false)]
       public bool MergeFieldFrom(uint tag, CodedInputStream input) {
@@ -356,9 +354,9 @@
             return true;
           case WireFormat.WireType.StartGroup: {
-            Builder subBuilder = CreateBuilder();
-            input.ReadUnknownGroup(number, subBuilder);
-            GetFieldBuilder(number).AddGroup(subBuilder.Build());
-            return true;
-          }
+              Builder subBuilder = CreateBuilder();
+              input.ReadUnknownGroup(number, subBuilder);
+              GetFieldBuilder(number).AddGroup(subBuilder.Build());
+              return true;
+            }
           case WireFormat.WireType.EndGroup:
             return false;
@@ -428,5 +426,5 @@
       public Builder MergeFrom(UnknownFieldSet other) {
         if (other != DefaultInstance) {
-          foreach(KeyValuePair<int, UnknownField> entry in other.fields) {
+          foreach (KeyValuePair<int, UnknownField> entry in other.fields) {
             MergeField(entry.Key, entry.Value);
           }
@@ -486,5 +484,5 @@
       /// <param name="tag">The tag, which should already have been read from the input</param>
       /// <returns>true unless the tag is an end-group tag</returns>
-      internal bool MergeFieldFrom(CodedInputStream input, 
+      internal bool MergeFieldFrom(CodedInputStream input,
           ExtensionRegistry extensionRegistry, IBuilder builder, uint tag) {
 
Index: /trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.SharpDevelop/3.1.1.5327/HeuristicLabSharpDevelopPlugin.cs
===================================================================
--- /trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.SharpDevelop/3.1.1.5327/HeuristicLabSharpDevelopPlugin.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.SharpDevelop/3.1.1.5327/HeuristicLabSharpDevelopPlugin.cs	(revision 4068)
@@ -20,8 +20,4 @@
 #endregion
 
-using System;
-using System.Collections.Generic;
-using System.Linq;
-using System.Text;
 using HeuristicLab.PluginInfrastructure;
 
Index: /trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.WinFormsUI/2.3.1/WinFormsUI-2.3.1/Docking/AutoHideStripBase.cs
===================================================================
--- /trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.WinFormsUI/2.3.1/WinFormsUI-2.3.1/Docking/AutoHideStripBase.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.WinFormsUI/2.3.1/WinFormsUI-2.3.1/Docking/AutoHideStripBase.cs	(revision 4068)
@@ -1,193 +1,157 @@
 using System;
 using System.Collections;
-using System.Windows.Forms;
+using System.Collections.Generic;
+using System.Diagnostics.CodeAnalysis;
 using System.Drawing;
 using System.Drawing.Drawing2D;
-using System.Collections.Generic;
-using System.Diagnostics.CodeAnalysis;
-
-namespace WeifenLuo.WinFormsUI.Docking
-{
-	public abstract partial class AutoHideStripBase : Control
-	{
-        [SuppressMessage("Microsoft.Design", "CA1034:NestedTypesShouldNotBeVisible")]
-        protected class Tab : IDisposable
-        {
-            private IDockContent m_content;
-
-            protected internal Tab(IDockContent content)
-            {
-                m_content = content;
-            }
-
-            ~Tab()
-            {
-                Dispose(false);
-            }
-
-            public IDockContent Content
-            {
-                get { return m_content; }
-            }
-
-            public void Dispose()
-            {
-                Dispose(true);
-                GC.SuppressFinalize(this);
-            }
-
-            protected virtual void Dispose(bool disposing)
-            {
-            }
-        }
-
-        [SuppressMessage("Microsoft.Design", "CA1034:NestedTypesShouldNotBeVisible")]
-        protected sealed class TabCollection : IEnumerable<Tab>
-        {
-            #region IEnumerable Members
-            IEnumerator<Tab> IEnumerable<Tab>.GetEnumerator()
-            {
-                for (int i = 0; i < Count; i++)
-                    yield return this[i];
-            }
-
-            IEnumerator IEnumerable.GetEnumerator()
-            {
-                for (int i = 0; i < Count; i++)
-                    yield return this[i];
-            }
-            #endregion
-
-            internal TabCollection(DockPane pane)
-            {
-                m_dockPane = pane;
-            }
-
-            private DockPane m_dockPane = null;
-            public DockPane DockPane
-            {
-                get { return m_dockPane; }
-            }
-
-            public DockPanel DockPanel
-            {
-                get { return DockPane.DockPanel; }
-            }
-
-            public int Count
-            {
-                get { return DockPane.DisplayingContents.Count; }
-            }
-
-            public Tab this[int index]
-            {
-                get
-                {
-                    IDockContent content = DockPane.DisplayingContents[index];
-                    if (content == null)
-                        throw (new ArgumentOutOfRangeException("index"));
-                    if (content.DockHandler.AutoHideTab == null)
-                        content.DockHandler.AutoHideTab = (DockPanel.AutoHideStripControl.CreateTab(content));
-                    return content.DockHandler.AutoHideTab as Tab;
-                }
-            }
-
-            public bool Contains(Tab tab)
-            {
-                return (IndexOf(tab) != -1);
-            }
-
-            public bool Contains(IDockContent content)
-            {
-                return (IndexOf(content) != -1);
-            }
-
-            public int IndexOf(Tab tab)
-            {
-                if (tab == null)
-                    return -1;
-
-                return IndexOf(tab.Content);
-            }
-
-            public int IndexOf(IDockContent content)
-            {
-                return DockPane.DisplayingContents.IndexOf(content);
-            }
-        }
-
-        [SuppressMessage("Microsoft.Design", "CA1034:NestedTypesShouldNotBeVisible")]
-        protected class Pane : IDisposable
-        {
-            private DockPane m_dockPane;
-
-            protected internal Pane(DockPane dockPane)
-            {
-                m_dockPane = dockPane;
-            }
-
-            ~Pane()
-            {
-                Dispose(false);
-            }
-
-            public DockPane DockPane
-            {
-                get { return m_dockPane; }
-            }
-
-            public TabCollection AutoHideTabs
-            {
-                get
-                {
-                    if (DockPane.AutoHideTabs == null)
-                        DockPane.AutoHideTabs = new TabCollection(DockPane);
-                    return DockPane.AutoHideTabs as TabCollection;
-                }
-            }
-
-            public void Dispose()
-            {
-                Dispose(true);
-                GC.SuppressFinalize(this);
-            }
-
-            protected virtual void Dispose(bool disposing)
-            {
-            }
-        }
-
-        [SuppressMessage("Microsoft.Design", "CA1034:NestedTypesShouldNotBeVisible")]
-        protected sealed class PaneCollection : IEnumerable<Pane>
-        {
-            private class AutoHideState
-            {
-                public DockState m_dockState;
-                public bool m_selected = false;
-
-                public AutoHideState(DockState dockState)
-                {
-                    m_dockState = dockState;
-                }
-
-                public DockState DockState
-                {
-                    get { return m_dockState; }
-                }
-
-                public bool Selected
-                {
-                    get { return m_selected; }
-                    set { m_selected = value; }
-                }
-            }
-
-            private class AutoHideStateCollection
-            {
-                private AutoHideState[] m_states;
-
-                public AutoHideStateCollection()
-                {
-                    m_states = new AutoHideState[]	{	
+using System.Windows.Forms;
+
+namespace WeifenLuo.WinFormsUI.Docking {
+  public abstract partial class AutoHideStripBase : Control {
+    [SuppressMessage("Microsoft.Design", "CA1034:NestedTypesShouldNotBeVisible")]
+    protected class Tab : IDisposable {
+      private IDockContent m_content;
+
+      protected internal Tab(IDockContent content) {
+        m_content = content;
+      }
+
+      ~Tab() {
+        Dispose(false);
+      }
+
+      public IDockContent Content {
+        get { return m_content; }
+      }
+
+      public void Dispose() {
+        Dispose(true);
+        GC.SuppressFinalize(this);
+      }
+
+      protected virtual void Dispose(bool disposing) {
+      }
+    }
+
+    [SuppressMessage("Microsoft.Design", "CA1034:NestedTypesShouldNotBeVisible")]
+    protected sealed class TabCollection : IEnumerable<Tab> {
+      #region IEnumerable Members
+      IEnumerator<Tab> IEnumerable<Tab>.GetEnumerator() {
+        for (int i = 0; i < Count; i++)
+          yield return this[i];
+      }
+
+      IEnumerator IEnumerable.GetEnumerator() {
+        for (int i = 0; i < Count; i++)
+          yield return this[i];
+      }
+      #endregion
+
+      internal TabCollection(DockPane pane) {
+        m_dockPane = pane;
+      }
+
+      private DockPane m_dockPane = null;
+      public DockPane DockPane {
+        get { return m_dockPane; }
+      }
+
+      public DockPanel DockPanel {
+        get { return DockPane.DockPanel; }
+      }
+
+      public int Count {
+        get { return DockPane.DisplayingContents.Count; }
+      }
+
+      public Tab this[int index] {
+        get {
+          IDockContent content = DockPane.DisplayingContents[index];
+          if (content == null)
+            throw (new ArgumentOutOfRangeException("index"));
+          if (content.DockHandler.AutoHideTab == null)
+            content.DockHandler.AutoHideTab = (DockPanel.AutoHideStripControl.CreateTab(content));
+          return content.DockHandler.AutoHideTab as Tab;
+        }
+      }
+
+      public bool Contains(Tab tab) {
+        return (IndexOf(tab) != -1);
+      }
+
+      public bool Contains(IDockContent content) {
+        return (IndexOf(content) != -1);
+      }
+
+      public int IndexOf(Tab tab) {
+        if (tab == null)
+          return -1;
+
+        return IndexOf(tab.Content);
+      }
+
+      public int IndexOf(IDockContent content) {
+        return DockPane.DisplayingContents.IndexOf(content);
+      }
+    }
+
+    [SuppressMessage("Microsoft.Design", "CA1034:NestedTypesShouldNotBeVisible")]
+    protected class Pane : IDisposable {
+      private DockPane m_dockPane;
+
+      protected internal Pane(DockPane dockPane) {
+        m_dockPane = dockPane;
+      }
+
+      ~Pane() {
+        Dispose(false);
+      }
+
+      public DockPane DockPane {
+        get { return m_dockPane; }
+      }
+
+      public TabCollection AutoHideTabs {
+        get {
+          if (DockPane.AutoHideTabs == null)
+            DockPane.AutoHideTabs = new TabCollection(DockPane);
+          return DockPane.AutoHideTabs as TabCollection;
+        }
+      }
+
+      public void Dispose() {
+        Dispose(true);
+        GC.SuppressFinalize(this);
+      }
+
+      protected virtual void Dispose(bool disposing) {
+      }
+    }
+
+    [SuppressMessage("Microsoft.Design", "CA1034:NestedTypesShouldNotBeVisible")]
+    protected sealed class PaneCollection : IEnumerable<Pane> {
+      private class AutoHideState {
+        public DockState m_dockState;
+        public bool m_selected = false;
+
+        public AutoHideState(DockState dockState) {
+          m_dockState = dockState;
+        }
+
+        public DockState DockState {
+          get { return m_dockState; }
+        }
+
+        public bool Selected {
+          get { return m_selected; }
+          set { m_selected = value; }
+        }
+      }
+
+      private class AutoHideStateCollection {
+        private AutoHideState[] m_states;
+
+        public AutoHideStateCollection() {
+          m_states = new AutoHideState[]	{	
 												new AutoHideState(DockState.DockTopAutoHide),
 												new AutoHideState(DockState.DockBottomAutoHide),
@@ -195,336 +159,288 @@
 												new AutoHideState(DockState.DockRightAutoHide)
 											};
-                }
-
-                public AutoHideState this[DockState dockState]
-                {
-                    get
-                    {
-                        for (int i = 0; i < m_states.Length; i++)
-                        {
-                            if (m_states[i].DockState == dockState)
-                                return m_states[i];
-                        }
-                        throw new ArgumentOutOfRangeException("dockState");
-                    }
-                }
-
-                public bool ContainsPane(DockPane pane)
-                {
-                    if (pane.IsHidden)
-                        return false;
-
-                    for (int i = 0; i < m_states.Length; i++)
-                    {
-                        if (m_states[i].DockState == pane.DockState && m_states[i].Selected)
-                            return true;
-                    }
-                    return false;
-                }
+        }
+
+        public AutoHideState this[DockState dockState] {
+          get {
+            for (int i = 0; i < m_states.Length; i++) {
+              if (m_states[i].DockState == dockState)
+                return m_states[i];
             }
-
-            internal PaneCollection(DockPanel panel, DockState dockState)
-            {
-                m_dockPanel = panel;
-                m_states = new AutoHideStateCollection();
-                States[DockState.DockTopAutoHide].Selected = (dockState == DockState.DockTopAutoHide);
-                States[DockState.DockBottomAutoHide].Selected = (dockState == DockState.DockBottomAutoHide);
-                States[DockState.DockLeftAutoHide].Selected = (dockState == DockState.DockLeftAutoHide);
-                States[DockState.DockRightAutoHide].Selected = (dockState == DockState.DockRightAutoHide);
+            throw new ArgumentOutOfRangeException("dockState");
+          }
+        }
+
+        public bool ContainsPane(DockPane pane) {
+          if (pane.IsHidden)
+            return false;
+
+          for (int i = 0; i < m_states.Length; i++) {
+            if (m_states[i].DockState == pane.DockState && m_states[i].Selected)
+              return true;
+          }
+          return false;
+        }
+      }
+
+      internal PaneCollection(DockPanel panel, DockState dockState) {
+        m_dockPanel = panel;
+        m_states = new AutoHideStateCollection();
+        States[DockState.DockTopAutoHide].Selected = (dockState == DockState.DockTopAutoHide);
+        States[DockState.DockBottomAutoHide].Selected = (dockState == DockState.DockBottomAutoHide);
+        States[DockState.DockLeftAutoHide].Selected = (dockState == DockState.DockLeftAutoHide);
+        States[DockState.DockRightAutoHide].Selected = (dockState == DockState.DockRightAutoHide);
+      }
+
+      private DockPanel m_dockPanel;
+      public DockPanel DockPanel {
+        get { return m_dockPanel; }
+      }
+
+      private AutoHideStateCollection m_states;
+      private AutoHideStateCollection States {
+        get { return m_states; }
+      }
+
+      public int Count {
+        get {
+          int count = 0;
+          foreach (DockPane pane in DockPanel.Panes) {
+            if (States.ContainsPane(pane))
+              count++;
+          }
+
+          return count;
+        }
+      }
+
+      public Pane this[int index] {
+        get {
+          int count = 0;
+          foreach (DockPane pane in DockPanel.Panes) {
+            if (!States.ContainsPane(pane))
+              continue;
+
+            if (count == index) {
+              if (pane.AutoHidePane == null)
+                pane.AutoHidePane = DockPanel.AutoHideStripControl.CreatePane(pane);
+              return pane.AutoHidePane as Pane;
             }
 
-            private DockPanel m_dockPanel;
-            public DockPanel DockPanel
-            {
-                get { return m_dockPanel; }
-            }
-
-            private AutoHideStateCollection m_states;
-            private AutoHideStateCollection States
-            {
-                get { return m_states; }
-            }
-
-            public int Count
-            {
-                get
-                {
-                    int count = 0;
-                    foreach (DockPane pane in DockPanel.Panes)
-                    {
-                        if (States.ContainsPane(pane))
-                            count++;
-                    }
-
-                    return count;
-                }
-            }
-
-            public Pane this[int index]
-            {
-                get
-                {
-                    int count = 0;
-                    foreach (DockPane pane in DockPanel.Panes)
-                    {
-                        if (!States.ContainsPane(pane))
-                            continue;
-
-                        if (count == index)
-                        {
-                            if (pane.AutoHidePane == null)
-                                pane.AutoHidePane = DockPanel.AutoHideStripControl.CreatePane(pane);
-                            return pane.AutoHidePane as Pane;
-                        }
-
-                        count++;
-                    }
-                    throw new ArgumentOutOfRangeException("index");
-                }
-            }
-
-            public bool Contains(Pane pane)
-            {
-                return (IndexOf(pane) != -1);
-            }
-
-            public int IndexOf(Pane pane)
-            {
-                if (pane == null)
-                    return -1;
-
-                int index = 0;
-                foreach (DockPane dockPane in DockPanel.Panes)
-                {
-                    if (!States.ContainsPane(pane.DockPane))
-                        continue;
-
-                    if (pane == dockPane.AutoHidePane)
-                        return index;
-
-                    index++;
-                }
-                return -1;
-            }
-
-            #region IEnumerable Members
-
-            IEnumerator<Pane> IEnumerable<Pane>.GetEnumerator()
-            {
-                for (int i = 0; i < Count; i++)
-                    yield return this[i];
-            }
-
-            IEnumerator IEnumerable.GetEnumerator()
-            {
-                for (int i = 0; i < Count; i++)
-                    yield return this[i];
-            }
-
-            #endregion
-        }
-
-		protected AutoHideStripBase(DockPanel panel)
-		{
-			m_dockPanel = panel;
-			m_panesTop = new PaneCollection(panel, DockState.DockTopAutoHide);
-			m_panesBottom = new PaneCollection(panel, DockState.DockBottomAutoHide);
-			m_panesLeft = new PaneCollection(panel, DockState.DockLeftAutoHide);
-			m_panesRight = new PaneCollection(panel, DockState.DockRightAutoHide);
-
-			SetStyle(ControlStyles.OptimizedDoubleBuffer, true);
-			SetStyle(ControlStyles.Selectable, false);
-		}
-
-		private DockPanel m_dockPanel;
-		protected DockPanel DockPanel
-		{
-			get	{	return m_dockPanel;	}
-		}
-
-		private PaneCollection m_panesTop;
-		protected PaneCollection PanesTop
-		{
-			get	{	return m_panesTop;	}
-		}
-
-		private PaneCollection m_panesBottom;
-		protected PaneCollection PanesBottom
-		{
-			get	{	return m_panesBottom;	}
-		}
-
-		private PaneCollection m_panesLeft;
-		protected PaneCollection PanesLeft
-		{
-			get	{	return m_panesLeft;	}
-		}
-
-		private PaneCollection m_panesRight;
-		protected PaneCollection PanesRight
-		{
-			get	{	return m_panesRight;	}
-		}
-
-		protected PaneCollection GetPanes(DockState dockState)
-		{
-			if (dockState == DockState.DockTopAutoHide)
-				return PanesTop;
-			else if (dockState == DockState.DockBottomAutoHide)
-				return PanesBottom;
-			else if (dockState == DockState.DockLeftAutoHide)
-				return PanesLeft;
-			else if (dockState == DockState.DockRightAutoHide)
-				return PanesRight;
-			else
-				throw new ArgumentOutOfRangeException("dockState");
-		}
-
-        internal int GetNumberOfPanes(DockState dockState)
-        {
-            return GetPanes(dockState).Count;
-        }
-
-		protected Rectangle RectangleTopLeft
-		{
-			get
-			{	
-				int height = MeasureHeight();
-				return PanesTop.Count > 0 && PanesLeft.Count > 0 ? new Rectangle(0, 0, height, height) : Rectangle.Empty;
-			}
-		}
-
-		protected Rectangle RectangleTopRight
-		{
-			get
-			{
-				int height = MeasureHeight();
-				return PanesTop.Count > 0 && PanesRight.Count > 0 ? new Rectangle(Width - height, 0, height, height) : Rectangle.Empty;
-			}
-		}
-
-		protected Rectangle RectangleBottomLeft
-		{
-			get
-			{
-				int height = MeasureHeight();
-				return PanesBottom.Count > 0 && PanesLeft.Count > 0 ? new Rectangle(0, Height - height, height, height) : Rectangle.Empty;
-			}
-		}
-
-		protected Rectangle RectangleBottomRight
-		{
-			get
-			{
-				int height = MeasureHeight();
-				return PanesBottom.Count > 0 && PanesRight.Count > 0 ? new Rectangle(Width - height, Height - height, height, height) : Rectangle.Empty;
-			}
-		}
-
-		protected internal Rectangle GetTabStripRectangle(DockState dockState)
-		{
-			int height = MeasureHeight();
-			if (dockState == DockState.DockTopAutoHide && PanesTop.Count > 0)
-				return new Rectangle(RectangleTopLeft.Width, 0, Width - RectangleTopLeft.Width - RectangleTopRight.Width, height);
-			else if (dockState == DockState.DockBottomAutoHide && PanesBottom.Count > 0)
-				return new Rectangle(RectangleBottomLeft.Width, Height - height, Width - RectangleBottomLeft.Width - RectangleBottomRight.Width, height);
-			else if (dockState == DockState.DockLeftAutoHide && PanesLeft.Count > 0)
-				return new Rectangle(0, RectangleTopLeft.Width, height, Height - RectangleTopLeft.Height - RectangleBottomLeft.Height);
-			else if (dockState == DockState.DockRightAutoHide && PanesRight.Count > 0)
-				return new Rectangle(Width - height, RectangleTopRight.Width, height, Height - RectangleTopRight.Height - RectangleBottomRight.Height);
-			else
-				return Rectangle.Empty;
-		}
-
-		private GraphicsPath m_displayingArea = null;
-		private GraphicsPath DisplayingArea
-		{
-			get
-			{
-				if (m_displayingArea == null)
-					m_displayingArea = new GraphicsPath();
-
-				return m_displayingArea;
-			}
-		}
-
-		private void SetRegion()
-		{
-			DisplayingArea.Reset();
-			DisplayingArea.AddRectangle(RectangleTopLeft);
-			DisplayingArea.AddRectangle(RectangleTopRight);
-			DisplayingArea.AddRectangle(RectangleBottomLeft);
-			DisplayingArea.AddRectangle(RectangleBottomRight);
-			DisplayingArea.AddRectangle(GetTabStripRectangle(DockState.DockTopAutoHide));
-			DisplayingArea.AddRectangle(GetTabStripRectangle(DockState.DockBottomAutoHide));
-			DisplayingArea.AddRectangle(GetTabStripRectangle(DockState.DockLeftAutoHide));
-			DisplayingArea.AddRectangle(GetTabStripRectangle(DockState.DockRightAutoHide));
-			Region = new Region(DisplayingArea);
-		}
-
-		protected override void OnMouseDown(MouseEventArgs e)
-		{
-			base.OnMouseDown(e);
-
-			if (e.Button != MouseButtons.Left)
-				return;
-
-			IDockContent content = HitTest();
-			if (content == null)
-				return;
-
-			content.DockHandler.Activate();
-		}
-
-		protected override void OnMouseHover(EventArgs e)
-		{
-			base.OnMouseHover(e);
-
-			IDockContent content = HitTest();
-			if (content != null && DockPanel.ActiveAutoHideContent != content)
-				DockPanel.ActiveAutoHideContent = content;
-
-			// requires further tracking of mouse hover behavior,
-            ResetMouseEventArgs();
-		}
-
-		protected override void OnLayout(LayoutEventArgs levent)
-		{
-			RefreshChanges();
-			base.OnLayout (levent);
-		}
-
-		internal void RefreshChanges()
-		{
-            if (IsDisposed)
-                return;
-
-			SetRegion();
-			OnRefreshChanges();
-		}
-
-		protected virtual void OnRefreshChanges()
-		{
-		}
-
-		protected internal abstract int MeasureHeight();
-
-		private IDockContent HitTest()
-		{
-			Point ptMouse = PointToClient(Control.MousePosition);
-			return HitTest(ptMouse);
-		}
-
-        protected virtual Tab CreateTab(IDockContent content)
-        {
-            return new Tab(content);
-        }
-
-        protected virtual Pane CreatePane(DockPane dockPane)
-        {
-            return new Pane(dockPane);
-        }
-
-		protected abstract IDockContent HitTest(Point point);
-	}
+            count++;
+          }
+          throw new ArgumentOutOfRangeException("index");
+        }
+      }
+
+      public bool Contains(Pane pane) {
+        return (IndexOf(pane) != -1);
+      }
+
+      public int IndexOf(Pane pane) {
+        if (pane == null)
+          return -1;
+
+        int index = 0;
+        foreach (DockPane dockPane in DockPanel.Panes) {
+          if (!States.ContainsPane(pane.DockPane))
+            continue;
+
+          if (pane == dockPane.AutoHidePane)
+            return index;
+
+          index++;
+        }
+        return -1;
+      }
+
+      #region IEnumerable Members
+
+      IEnumerator<Pane> IEnumerable<Pane>.GetEnumerator() {
+        for (int i = 0; i < Count; i++)
+          yield return this[i];
+      }
+
+      IEnumerator IEnumerable.GetEnumerator() {
+        for (int i = 0; i < Count; i++)
+          yield return this[i];
+      }
+
+      #endregion
+    }
+
+    protected AutoHideStripBase(DockPanel panel) {
+      m_dockPanel = panel;
+      m_panesTop = new PaneCollection(panel, DockState.DockTopAutoHide);
+      m_panesBottom = new PaneCollection(panel, DockState.DockBottomAutoHide);
+      m_panesLeft = new PaneCollection(panel, DockState.DockLeftAutoHide);
+      m_panesRight = new PaneCollection(panel, DockState.DockRightAutoHide);
+
+      SetStyle(ControlStyles.OptimizedDoubleBuffer, true);
+      SetStyle(ControlStyles.Selectable, false);
+    }
+
+    private DockPanel m_dockPanel;
+    protected DockPanel DockPanel {
+      get { return m_dockPanel; }
+    }
+
+    private PaneCollection m_panesTop;
+    protected PaneCollection PanesTop {
+      get { return m_panesTop; }
+    }
+
+    private PaneCollection m_panesBottom;
+    protected PaneCollection PanesBottom {
+      get { return m_panesBottom; }
+    }
+
+    private PaneCollection m_panesLeft;
+    protected PaneCollection PanesLeft {
+      get { return m_panesLeft; }
+    }
+
+    private PaneCollection m_panesRight;
+    protected PaneCollection PanesRight {
+      get { return m_panesRight; }
+    }
+
+    protected PaneCollection GetPanes(DockState dockState) {
+      if (dockState == DockState.DockTopAutoHide)
+        return PanesTop;
+      else if (dockState == DockState.DockBottomAutoHide)
+        return PanesBottom;
+      else if (dockState == DockState.DockLeftAutoHide)
+        return PanesLeft;
+      else if (dockState == DockState.DockRightAutoHide)
+        return PanesRight;
+      else
+        throw new ArgumentOutOfRangeException("dockState");
+    }
+
+    internal int GetNumberOfPanes(DockState dockState) {
+      return GetPanes(dockState).Count;
+    }
+
+    protected Rectangle RectangleTopLeft {
+      get {
+        int height = MeasureHeight();
+        return PanesTop.Count > 0 && PanesLeft.Count > 0 ? new Rectangle(0, 0, height, height) : Rectangle.Empty;
+      }
+    }
+
+    protected Rectangle RectangleTopRight {
+      get {
+        int height = MeasureHeight();
+        return PanesTop.Count > 0 && PanesRight.Count > 0 ? new Rectangle(Width - height, 0, height, height) : Rectangle.Empty;
+      }
+    }
+
+    protected Rectangle RectangleBottomLeft {
+      get {
+        int height = MeasureHeight();
+        return PanesBottom.Count > 0 && PanesLeft.Count > 0 ? new Rectangle(0, Height - height, height, height) : Rectangle.Empty;
+      }
+    }
+
+    protected Rectangle RectangleBottomRight {
+      get {
+        int height = MeasureHeight();
+        return PanesBottom.Count > 0 && PanesRight.Count > 0 ? new Rectangle(Width - height, Height - height, height, height) : Rectangle.Empty;
+      }
+    }
+
+    protected internal Rectangle GetTabStripRectangle(DockState dockState) {
+      int height = MeasureHeight();
+      if (dockState == DockState.DockTopAutoHide && PanesTop.Count > 0)
+        return new Rectangle(RectangleTopLeft.Width, 0, Width - RectangleTopLeft.Width - RectangleTopRight.Width, height);
+      else if (dockState == DockState.DockBottomAutoHide && PanesBottom.Count > 0)
+        return new Rectangle(RectangleBottomLeft.Width, Height - height, Width - RectangleBottomLeft.Width - RectangleBottomRight.Width, height);
+      else if (dockState == DockState.DockLeftAutoHide && PanesLeft.Count > 0)
+        return new Rectangle(0, RectangleTopLeft.Width, height, Height - RectangleTopLeft.Height - RectangleBottomLeft.Height);
+      else if (dockState == DockState.DockRightAutoHide && PanesRight.Count > 0)
+        return new Rectangle(Width - height, RectangleTopRight.Width, height, Height - RectangleTopRight.Height - RectangleBottomRight.Height);
+      else
+        return Rectangle.Empty;
+    }
+
+    private GraphicsPath m_displayingArea = null;
+    private GraphicsPath DisplayingArea {
+      get {
+        if (m_displayingArea == null)
+          m_displayingArea = new GraphicsPath();
+
+        return m_displayingArea;
+      }
+    }
+
+    private void SetRegion() {
+      DisplayingArea.Reset();
+      DisplayingArea.AddRectangle(RectangleTopLeft);
+      DisplayingArea.AddRectangle(RectangleTopRight);
+      DisplayingArea.AddRectangle(RectangleBottomLeft);
+      DisplayingArea.AddRectangle(RectangleBottomRight);
+      DisplayingArea.AddRectangle(GetTabStripRectangle(DockState.DockTopAutoHide));
+      DisplayingArea.AddRectangle(GetTabStripRectangle(DockState.DockBottomAutoHide));
+      DisplayingArea.AddRectangle(GetTabStripRectangle(DockState.DockLeftAutoHide));
+      DisplayingArea.AddRectangle(GetTabStripRectangle(DockState.DockRightAutoHide));
+      Region = new Region(DisplayingArea);
+    }
+
+    protected override void OnMouseDown(MouseEventArgs e) {
+      base.OnMouseDown(e);
+
+      if (e.Button != MouseButtons.Left)
+        return;
+
+      IDockContent content = HitTest();
+      if (content == null)
+        return;
+
+      content.DockHandler.Activate();
+    }
+
+    protected override void OnMouseHover(EventArgs e) {
+      base.OnMouseHover(e);
+
+      IDockContent content = HitTest();
+      if (content != null && DockPanel.ActiveAutoHideContent != content)
+        DockPanel.ActiveAutoHideContent = content;
+
+      // requires further tracking of mouse hover behavior,
+      ResetMouseEventArgs();
+    }
+
+    protected override void OnLayout(LayoutEventArgs levent) {
+      RefreshChanges();
+      base.OnLayout(levent);
+    }
+
+    internal void RefreshChanges() {
+      if (IsDisposed)
+        return;
+
+      SetRegion();
+      OnRefreshChanges();
+    }
+
+    protected virtual void OnRefreshChanges() {
+    }
+
+    protected internal abstract int MeasureHeight();
+
+    private IDockContent HitTest() {
+      Point ptMouse = PointToClient(Control.MousePosition);
+      return HitTest(ptMouse);
+    }
+
+    protected virtual Tab CreateTab(IDockContent content) {
+      return new Tab(content);
+    }
+
+    protected virtual Pane CreatePane(DockPane dockPane) {
+      return new Pane(dockPane);
+    }
+
+    protected abstract IDockContent HitTest(Point point);
+  }
 }
Index: /trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.WinFormsUI/2.3.1/WinFormsUI-2.3.1/Docking/DockContent.cs
===================================================================
--- /trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.WinFormsUI/2.3.1/WinFormsUI-2.3.1/Docking/DockContent.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.WinFormsUI/2.3.1/WinFormsUI-2.3.1/Docking/DockContent.cs	(revision 4068)
@@ -1,304 +1,259 @@
 using System;
 using System.ComponentModel;
+using System.Diagnostics.CodeAnalysis;
 using System.Drawing;
 using System.Windows.Forms;
-using System.Runtime.InteropServices;
-using System.Diagnostics.CodeAnalysis;
-
-namespace WeifenLuo.WinFormsUI.Docking
-{
-	public class DockContent : Form, IDockContent
-	{
-		public DockContent()
-		{
-			m_dockHandler = new DockContentHandler(this, new GetPersistStringCallback(GetPersistString));
-			m_dockHandler.DockStateChanged += new EventHandler(DockHandler_DockStateChanged);
-			//Suggested as a fix by bensty regarding form resize
-            this.ParentChanged += new EventHandler(DockContent_ParentChanged);
-		}
-
-		//Suggested as a fix by bensty regarding form resize
-        private void DockContent_ParentChanged(object Sender, EventArgs e)
-        {
-            if (this.Parent != null)
-                this.Font = this.Parent.Font;
-		}
-
-		private DockContentHandler m_dockHandler = null;
-		[Browsable(false)]
-		public DockContentHandler DockHandler
-		{
-			get	{	return m_dockHandler;	}
-		}
-
-		[LocalizedCategory("Category_Docking")]
-		[LocalizedDescription("DockContent_AllowEndUserDocking_Description")]
-		[DefaultValue(true)]
-		public bool AllowEndUserDocking
-		{
-			get	{	return DockHandler.AllowEndUserDocking;	}
-			set	{	DockHandler.AllowEndUserDocking = value;	}
-		}
-
-		[LocalizedCategory("Category_Docking")]
-		[LocalizedDescription("DockContent_DockAreas_Description")]
-		[DefaultValue(DockAreas.DockLeft|DockAreas.DockRight|DockAreas.DockTop|DockAreas.DockBottom|DockAreas.Document|DockAreas.Float)]
-		public DockAreas DockAreas
-		{
-			get	{	return DockHandler.DockAreas;	}
-			set	{	DockHandler.DockAreas = value;	}
-		}
-
-		[LocalizedCategory("Category_Docking")]
-		[LocalizedDescription("DockContent_AutoHidePortion_Description")]
-		[DefaultValue(0.25)]
-		public double AutoHidePortion
-		{
-			get	{	return DockHandler.AutoHidePortion;	}
-			set	{	DockHandler.AutoHidePortion = value;	}
-		}
-
-		[Localizable(true)]
-		[LocalizedCategory("Category_Docking")]
-		[LocalizedDescription("DockContent_TabText_Description")]
-		[DefaultValue(null)]
-        private string m_tabText = null;
-		public string TabText
-		{
-            get { return m_tabText; }
-            set { DockHandler.TabText = m_tabText = value; }
-		}
-		private bool ShouldSerializeTabText()
-		{
-			return (m_tabText != null);
-		}
-
-		[LocalizedCategory("Category_Docking")]
-		[LocalizedDescription("DockContent_CloseButton_Description")]
-		[DefaultValue(true)]
-		public bool CloseButton
-		{
-			get	{	return DockHandler.CloseButton;	}
-			set	{	DockHandler.CloseButton = value;	}
-		}
-
-        [LocalizedCategory("Category_Docking")]
-        [LocalizedDescription("DockContent_CloseButtonVisible_Description")]
-        [DefaultValue(true)]
-        public bool CloseButtonVisible
-        {
-            get { return DockHandler.CloseButtonVisible; }
-            set { DockHandler.CloseButtonVisible = value; }
-        }
-		
-		[Browsable(false)]
-		public DockPanel DockPanel
-		{
-			get {	return DockHandler.DockPanel; }
-			set	{	DockHandler.DockPanel = value;	}
-		}
-
-		[Browsable(false)]
-		public DockState DockState
-		{
-			get	{	return DockHandler.DockState;	}
-			set	{	DockHandler.DockState = value;	}
-		}
-
-		[Browsable(false)]
-		public DockPane Pane
-		{
-			get {	return DockHandler.Pane; }
-			set	{	DockHandler.Pane = value;		}
-		}
-
-		[Browsable(false)]
-		public bool IsHidden
-		{
-			get	{	return DockHandler.IsHidden;	}
-			set	{	DockHandler.IsHidden = value;	}
-		}
-
-		[Browsable(false)]
-		public DockState VisibleState
-		{
-			get	{	return DockHandler.VisibleState;	}
-			set	{	DockHandler.VisibleState = value;	}
-		}
-
-		[Browsable(false)]
-		public bool IsFloat
-		{
-			get	{	return DockHandler.IsFloat;	}
-			set	{	DockHandler.IsFloat = value;	}
-		}
-
-		[Browsable(false)]
-		public DockPane PanelPane
-		{
-			get	{	return DockHandler.PanelPane;	}
-			set	{	DockHandler.PanelPane = value;	}
-		}
-
-		[Browsable(false)]
-		public DockPane FloatPane
-		{
-			get	{	return DockHandler.FloatPane;	}
-			set	{	DockHandler.FloatPane = value;	}
-		}
-
-        [SuppressMessage("Microsoft.Design", "CA1024:UsePropertiesWhereAppropriate")]
-        protected virtual string GetPersistString()
-		{
-            return GetType().ToString();
-		}
-
-		[LocalizedCategory("Category_Docking")]
-		[LocalizedDescription("DockContent_HideOnClose_Description")]
-		[DefaultValue(false)]
-		public bool HideOnClose
-		{
-			get	{	return DockHandler.HideOnClose;	}
-			set	{	DockHandler.HideOnClose = value;	}
-		}
-
-		[LocalizedCategory("Category_Docking")]
-		[LocalizedDescription("DockContent_ShowHint_Description")]
-		[DefaultValue(DockState.Unknown)]
-		public DockState ShowHint
-		{
-			get	{	return DockHandler.ShowHint;	}
-			set	{	DockHandler.ShowHint = value;	}
-		}
-
-		[Browsable(false)]
-		public bool IsActivated
-		{
-			get	{	return DockHandler.IsActivated;	}
-		}
-
-		public bool IsDockStateValid(DockState dockState)
-		{
-			return DockHandler.IsDockStateValid(dockState);
-		}
-
-		[LocalizedCategory("Category_Docking")]
-		[LocalizedDescription("DockContent_TabPageContextMenu_Description")]
-		[DefaultValue(null)]
-		public ContextMenu TabPageContextMenu
-		{
-			get	{	return DockHandler.TabPageContextMenu;	}
-			set	{	DockHandler.TabPageContextMenu = value;	}
-		}
-
-        [LocalizedCategory("Category_Docking")]
-        [LocalizedDescription("DockContent_TabPageContextMenuStrip_Description")]
-        [DefaultValue(null)]
-        public ContextMenuStrip TabPageContextMenuStrip
-        {
-            get { return DockHandler.TabPageContextMenuStrip; }
-            set { DockHandler.TabPageContextMenuStrip = value; }
-        }
-
-		[Localizable(true)]
-		[Category("Appearance")]
-		[LocalizedDescription("DockContent_ToolTipText_Description")]
-		[DefaultValue(null)]
-		public string ToolTipText
-		{
-			get	{	return DockHandler.ToolTipText;	}
-			set {	DockHandler.ToolTipText = value;	}
-		}
-
-		public new void Activate()
-		{
-			DockHandler.Activate();
-		}
-
-		public new void Hide()
-		{
-			DockHandler.Hide();
-		}
-
-		public new void Show()
-		{
-			DockHandler.Show();
-		}
-
-		public void Show(DockPanel dockPanel)
-		{
-			DockHandler.Show(dockPanel);
-		}
-
-		public void Show(DockPanel dockPanel, DockState dockState)
-		{
-			DockHandler.Show(dockPanel, dockState);
-		}
-
-        [SuppressMessage("Microsoft.Naming", "CA1720:AvoidTypeNamesInParameters")]
-		public void Show(DockPanel dockPanel, Rectangle floatWindowBounds)
-		{
-			DockHandler.Show(dockPanel, floatWindowBounds);
-		}
-
-		public void Show(DockPane pane, IDockContent beforeContent)
-		{
-			DockHandler.Show(pane, beforeContent);
-		}
-
-		public void Show(DockPane previousPane, DockAlignment alignment, double proportion)
-		{
-			DockHandler.Show(previousPane, alignment, proportion);
-		}
-
-        [SuppressMessage("Microsoft.Naming", "CA1720:AvoidTypeNamesInParameters")]
-        public void FloatAt(Rectangle floatWindowBounds)
-        {
-            DockHandler.FloatAt(floatWindowBounds);
-        }
-
-        public void DockTo(DockPane paneTo, DockStyle dockStyle, int contentIndex)
-        {
-            DockHandler.DockTo(paneTo, dockStyle, contentIndex);
-        }
-
-        public void DockTo(DockPanel panel, DockStyle dockStyle)
-        {
-            DockHandler.DockTo(panel, dockStyle);
-        }
-
-		#region IDockContent Members
-		void IDockContent.OnActivated(EventArgs e)
-		{
-			this.OnActivated(e);
-		}
-
-		void IDockContent.OnDeactivate(EventArgs e)
-		{
-			this.OnDeactivate(e);
-		}
-		#endregion
-
-		#region Events
-		private void DockHandler_DockStateChanged(object sender, EventArgs e)
-		{
-			OnDockStateChanged(e);
-		}
-
-		private static readonly object DockStateChangedEvent = new object();
-		[LocalizedCategory("Category_PropertyChanged")]
-		[LocalizedDescription("Pane_DockStateChanged_Description")]
-		public event EventHandler DockStateChanged
-		{
-			add	{	Events.AddHandler(DockStateChangedEvent, value);	}
-			remove	{	Events.RemoveHandler(DockStateChangedEvent, value);	}
-		}
-		protected virtual void OnDockStateChanged(EventArgs e)
-		{
-			EventHandler handler = (EventHandler)Events[DockStateChangedEvent];
-			if (handler != null)
-				handler(this, e);
-		}
-		#endregion
-	}
+
+namespace WeifenLuo.WinFormsUI.Docking {
+  public class DockContent : Form, IDockContent {
+    public DockContent() {
+      m_dockHandler = new DockContentHandler(this, new GetPersistStringCallback(GetPersistString));
+      m_dockHandler.DockStateChanged += new EventHandler(DockHandler_DockStateChanged);
+      //Suggested as a fix by bensty regarding form resize
+      this.ParentChanged += new EventHandler(DockContent_ParentChanged);
+    }
+
+    //Suggested as a fix by bensty regarding form resize
+    private void DockContent_ParentChanged(object Sender, EventArgs e) {
+      if (this.Parent != null)
+        this.Font = this.Parent.Font;
+    }
+
+    private DockContentHandler m_dockHandler = null;
+    [Browsable(false)]
+    public DockContentHandler DockHandler {
+      get { return m_dockHandler; }
+    }
+
+    [LocalizedCategory("Category_Docking")]
+    [LocalizedDescription("DockContent_AllowEndUserDocking_Description")]
+    [DefaultValue(true)]
+    public bool AllowEndUserDocking {
+      get { return DockHandler.AllowEndUserDocking; }
+      set { DockHandler.AllowEndUserDocking = value; }
+    }
+
+    [LocalizedCategory("Category_Docking")]
+    [LocalizedDescription("DockContent_DockAreas_Description")]
+    [DefaultValue(DockAreas.DockLeft | DockAreas.DockRight | DockAreas.DockTop | DockAreas.DockBottom | DockAreas.Document | DockAreas.Float)]
+    public DockAreas DockAreas {
+      get { return DockHandler.DockAreas; }
+      set { DockHandler.DockAreas = value; }
+    }
+
+    [LocalizedCategory("Category_Docking")]
+    [LocalizedDescription("DockContent_AutoHidePortion_Description")]
+    [DefaultValue(0.25)]
+    public double AutoHidePortion {
+      get { return DockHandler.AutoHidePortion; }
+      set { DockHandler.AutoHidePortion = value; }
+    }
+
+    [Localizable(true)]
+    [LocalizedCategory("Category_Docking")]
+    [LocalizedDescription("DockContent_TabText_Description")]
+    [DefaultValue(null)]
+    private string m_tabText = null;
+    public string TabText {
+      get { return m_tabText; }
+      set { DockHandler.TabText = m_tabText = value; }
+    }
+    private bool ShouldSerializeTabText() {
+      return (m_tabText != null);
+    }
+
+    [LocalizedCategory("Category_Docking")]
+    [LocalizedDescription("DockContent_CloseButton_Description")]
+    [DefaultValue(true)]
+    public bool CloseButton {
+      get { return DockHandler.CloseButton; }
+      set { DockHandler.CloseButton = value; }
+    }
+
+    [LocalizedCategory("Category_Docking")]
+    [LocalizedDescription("DockContent_CloseButtonVisible_Description")]
+    [DefaultValue(true)]
+    public bool CloseButtonVisible {
+      get { return DockHandler.CloseButtonVisible; }
+      set { DockHandler.CloseButtonVisible = value; }
+    }
+
+    [Browsable(false)]
+    public DockPanel DockPanel {
+      get { return DockHandler.DockPanel; }
+      set { DockHandler.DockPanel = value; }
+    }
+
+    [Browsable(false)]
+    public DockState DockState {
+      get { return DockHandler.DockState; }
+      set { DockHandler.DockState = value; }
+    }
+
+    [Browsable(false)]
+    public DockPane Pane {
+      get { return DockHandler.Pane; }
+      set { DockHandler.Pane = value; }
+    }
+
+    [Browsable(false)]
+    public bool IsHidden {
+      get { return DockHandler.IsHidden; }
+      set { DockHandler.IsHidden = value; }
+    }
+
+    [Browsable(false)]
+    public DockState VisibleState {
+      get { return DockHandler.VisibleState; }
+      set { DockHandler.VisibleState = value; }
+    }
+
+    [Browsable(false)]
+    public bool IsFloat {
+      get { return DockHandler.IsFloat; }
+      set { DockHandler.IsFloat = value; }
+    }
+
+    [Browsable(false)]
+    public DockPane PanelPane {
+      get { return DockHandler.PanelPane; }
+      set { DockHandler.PanelPane = value; }
+    }
+
+    [Browsable(false)]
+    public DockPane FloatPane {
+      get { return DockHandler.FloatPane; }
+      set { DockHandler.FloatPane = value; }
+    }
+
+    [SuppressMessage("Microsoft.Design", "CA1024:UsePropertiesWhereAppropriate")]
+    protected virtual string GetPersistString() {
+      return GetType().ToString();
+    }
+
+    [LocalizedCategory("Category_Docking")]
+    [LocalizedDescription("DockContent_HideOnClose_Description")]
+    [DefaultValue(false)]
+    public bool HideOnClose {
+      get { return DockHandler.HideOnClose; }
+      set { DockHandler.HideOnClose = value; }
+    }
+
+    [LocalizedCategory("Category_Docking")]
+    [LocalizedDescription("DockContent_ShowHint_Description")]
+    [DefaultValue(DockState.Unknown)]
+    public DockState ShowHint {
+      get { return DockHandler.ShowHint; }
+      set { DockHandler.ShowHint = value; }
+    }
+
+    [Browsable(false)]
+    public bool IsActivated {
+      get { return DockHandler.IsActivated; }
+    }
+
+    public bool IsDockStateValid(DockState dockState) {
+      return DockHandler.IsDockStateValid(dockState);
+    }
+
+    [LocalizedCategory("Category_Docking")]
+    [LocalizedDescription("DockContent_TabPageContextMenu_Description")]
+    [DefaultValue(null)]
+    public ContextMenu TabPageContextMenu {
+      get { return DockHandler.TabPageContextMenu; }
+      set { DockHandler.TabPageContextMenu = value; }
+    }
+
+    [LocalizedCategory("Category_Docking")]
+    [LocalizedDescription("DockContent_TabPageContextMenuStrip_Description")]
+    [DefaultValue(null)]
+    public ContextMenuStrip TabPageContextMenuStrip {
+      get { return DockHandler.TabPageContextMenuStrip; }
+      set { DockHandler.TabPageContextMenuStrip = value; }
+    }
+
+    [Localizable(true)]
+    [Category("Appearance")]
+    [LocalizedDescription("DockContent_ToolTipText_Description")]
+    [DefaultValue(null)]
+    public string ToolTipText {
+      get { return DockHandler.ToolTipText; }
+      set { DockHandler.ToolTipText = value; }
+    }
+
+    public new void Activate() {
+      DockHandler.Activate();
+    }
+
+    public new void Hide() {
+      DockHandler.Hide();
+    }
+
+    public new void Show() {
+      DockHandler.Show();
+    }
+
+    public void Show(DockPanel dockPanel) {
+      DockHandler.Show(dockPanel);
+    }
+
+    public void Show(DockPanel dockPanel, DockState dockState) {
+      DockHandler.Show(dockPanel, dockState);
+    }
+
+    [SuppressMessage("Microsoft.Naming", "CA1720:AvoidTypeNamesInParameters")]
+    public void Show(DockPanel dockPanel, Rectangle floatWindowBounds) {
+      DockHandler.Show(dockPanel, floatWindowBounds);
+    }
+
+    public void Show(DockPane pane, IDockContent beforeContent) {
+      DockHandler.Show(pane, beforeContent);
+    }
+
+    public void Show(DockPane previousPane, DockAlignment alignment, double proportion) {
+      DockHandler.Show(previousPane, alignment, proportion);
+    }
+
+    [SuppressMessage("Microsoft.Naming", "CA1720:AvoidTypeNamesInParameters")]
+    public void FloatAt(Rectangle floatWindowBounds) {
+      DockHandler.FloatAt(floatWindowBounds);
+    }
+
+    public void DockTo(DockPane paneTo, DockStyle dockStyle, int contentIndex) {
+      DockHandler.DockTo(paneTo, dockStyle, contentIndex);
+    }
+
+    public void DockTo(DockPanel panel, DockStyle dockStyle) {
+      DockHandler.DockTo(panel, dockStyle);
+    }
+
+    #region IDockContent Members
+    void IDockContent.OnActivated(EventArgs e) {
+      this.OnActivated(e);
+    }
+
+    void IDockContent.OnDeactivate(EventArgs e) {
+      this.OnDeactivate(e);
+    }
+    #endregion
+
+    #region Events
+    private void DockHandler_DockStateChanged(object sender, EventArgs e) {
+      OnDockStateChanged(e);
+    }
+
+    private static readonly object DockStateChangedEvent = new object();
+    [LocalizedCategory("Category_PropertyChanged")]
+    [LocalizedDescription("Pane_DockStateChanged_Description")]
+    public event EventHandler DockStateChanged {
+      add { Events.AddHandler(DockStateChangedEvent, value); }
+      remove { Events.RemoveHandler(DockStateChangedEvent, value); }
+    }
+    protected virtual void OnDockStateChanged(EventArgs e) {
+      EventHandler handler = (EventHandler)Events[DockStateChangedEvent];
+      if (handler != null)
+        handler(this, e);
+    }
+    #endregion
+  }
 }
Index: /trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.WinFormsUI/2.3.1/WinFormsUI-2.3.1/Docking/DockContentCollection.cs
===================================================================
--- /trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.WinFormsUI/2.3.1/WinFormsUI-2.3.1/Docking/DockContentCollection.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.WinFormsUI/2.3.1/WinFormsUI-2.3.1/Docking/DockContentCollection.cs	(revision 4068)
@@ -1,175 +1,150 @@
 using System;
-using System.Collections;
 using System.Collections.Generic;
 using System.Collections.ObjectModel;
 
-namespace WeifenLuo.WinFormsUI.Docking
-{
-    public class DockContentCollection : ReadOnlyCollection<IDockContent>
-    {
-        private static List<IDockContent> _emptyList = new List<IDockContent>(0);
+namespace WeifenLuo.WinFormsUI.Docking {
+  public class DockContentCollection : ReadOnlyCollection<IDockContent> {
+    private static List<IDockContent> _emptyList = new List<IDockContent>(0);
 
-        internal DockContentCollection()
-            : base(new List<IDockContent>())
-        {
-        }
+    internal DockContentCollection()
+      : base(new List<IDockContent>()) {
+    }
 
-        internal DockContentCollection(DockPane pane)
-            : base(_emptyList)
-        {
-            m_dockPane = pane;
-        }
+    internal DockContentCollection(DockPane pane)
+      : base(_emptyList) {
+      m_dockPane = pane;
+    }
 
-        private DockPane m_dockPane = null;
-        private DockPane DockPane
-        {
-            get { return m_dockPane; }
-        }
+    private DockPane m_dockPane = null;
+    private DockPane DockPane {
+      get { return m_dockPane; }
+    }
 
-        public new IDockContent this[int index]
-        {
-            get
-            {
-                if (DockPane == null)
-                    return Items[index] as IDockContent;
-                else
-                    return GetVisibleContent(index);
-            }
-        }
+    public new IDockContent this[int index] {
+      get {
+        if (DockPane == null)
+          return Items[index] as IDockContent;
+        else
+          return GetVisibleContent(index);
+      }
+    }
 
-        internal int Add(IDockContent content)
-        {
+    internal int Add(IDockContent content) {
 #if DEBUG
-			if (DockPane != null)
-				throw new InvalidOperationException();
+      if (DockPane != null)
+        throw new InvalidOperationException();
 #endif
 
-            if (Contains(content))
-                return IndexOf(content);
+      if (Contains(content))
+        return IndexOf(content);
 
-            Items.Add(content);
-            return Count - 1;
-        }
+      Items.Add(content);
+      return Count - 1;
+    }
 
-        internal void AddAt(IDockContent content, int index)
-        {
+    internal void AddAt(IDockContent content, int index) {
 #if DEBUG
-			if (DockPane != null)
-				throw new InvalidOperationException();
+      if (DockPane != null)
+        throw new InvalidOperationException();
 #endif
 
-            if (index < 0 || index > Items.Count - 1)
-                return;
+      if (index < 0 || index > Items.Count - 1)
+        return;
 
-            if (Contains(content))
-                return;
+      if (Contains(content))
+        return;
 
-            Items.Insert(index, content);
-        }
+      Items.Insert(index, content);
+    }
 
-        public new bool Contains(IDockContent content)
-        {
-            if (DockPane == null)
-                return Items.Contains(content);
-            else
-                return (GetIndexOfVisibleContents(content) != -1);
-        }
+    public new bool Contains(IDockContent content) {
+      if (DockPane == null)
+        return Items.Contains(content);
+      else
+        return (GetIndexOfVisibleContents(content) != -1);
+    }
 
-        public new int Count
-        {
-            get
-            {
-                if (DockPane == null)
-                    return base.Count;
-                else
-                    return CountOfVisibleContents;
-            }
-        }
+    public new int Count {
+      get {
+        if (DockPane == null)
+          return base.Count;
+        else
+          return CountOfVisibleContents;
+      }
+    }
 
-        public new int IndexOf(IDockContent content)
-        {
-            if (DockPane == null)
-            {
-                if (!Contains(content))
-                    return -1;
-                else
-                    return Items.IndexOf(content);
-            }
-            else
-                return GetIndexOfVisibleContents(content);
-        }
+    public new int IndexOf(IDockContent content) {
+      if (DockPane == null) {
+        if (!Contains(content))
+          return -1;
+        else
+          return Items.IndexOf(content);
+      } else
+        return GetIndexOfVisibleContents(content);
+    }
 
-        internal void Remove(IDockContent content)
-        {
-            if (DockPane != null)
-                throw new InvalidOperationException();
+    internal void Remove(IDockContent content) {
+      if (DockPane != null)
+        throw new InvalidOperationException();
 
-            if (!Contains(content))
-                return;
+      if (!Contains(content))
+        return;
 
-            Items.Remove(content);
-        }
+      Items.Remove(content);
+    }
 
-        private int CountOfVisibleContents
-        {
-            get
-            {
+    private int CountOfVisibleContents {
+      get {
 #if DEBUG
-				if (DockPane == null)
-					throw new InvalidOperationException();
+        if (DockPane == null)
+          throw new InvalidOperationException();
 #endif
 
-                int count = 0;
-                foreach (IDockContent content in DockPane.Contents)
-                {
-                    if (content.DockHandler.DockState == DockPane.DockState)
-                        count++;
-                }
-                return count;
-            }
+        int count = 0;
+        foreach (IDockContent content in DockPane.Contents) {
+          if (content.DockHandler.DockState == DockPane.DockState)
+            count++;
         }
+        return count;
+      }
+    }
 
-        private IDockContent GetVisibleContent(int index)
-        {
+    private IDockContent GetVisibleContent(int index) {
 #if DEBUG
-			if (DockPane == null)
-				throw new InvalidOperationException();
+      if (DockPane == null)
+        throw new InvalidOperationException();
 #endif
 
-            int currentIndex = -1;
-            foreach (IDockContent content in DockPane.Contents)
-            {
-                if (content.DockHandler.DockState == DockPane.DockState)
-                    currentIndex++;
+      int currentIndex = -1;
+      foreach (IDockContent content in DockPane.Contents) {
+        if (content.DockHandler.DockState == DockPane.DockState)
+          currentIndex++;
 
-                if (currentIndex == index)
-                    return content;
-            }
-            throw (new ArgumentOutOfRangeException());
-        }
+        if (currentIndex == index)
+          return content;
+      }
+      throw (new ArgumentOutOfRangeException());
+    }
 
-        private int GetIndexOfVisibleContents(IDockContent content)
-        {
+    private int GetIndexOfVisibleContents(IDockContent content) {
 #if DEBUG
-			if (DockPane == null)
-				throw new InvalidOperationException();
+      if (DockPane == null)
+        throw new InvalidOperationException();
 #endif
 
-            if (content == null)
-                return -1;
+      if (content == null)
+        return -1;
 
-            int index = -1;
-            foreach (IDockContent c in DockPane.Contents)
-            {
-                if (c.DockHandler.DockState == DockPane.DockState)
-                {
-                    index++;
+      int index = -1;
+      foreach (IDockContent c in DockPane.Contents) {
+        if (c.DockHandler.DockState == DockPane.DockState) {
+          index++;
 
-                    if (c == content)
-                        return index;
-                }
-            }
-            return -1;
+          if (c == content)
+            return index;
         }
+      }
+      return -1;
     }
+  }
 }
Index: /trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.WinFormsUI/2.3.1/WinFormsUI-2.3.1/Docking/DockContentHandler.cs
===================================================================
--- /trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.WinFormsUI/2.3.1/WinFormsUI-2.3.1/Docking/DockContentHandler.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.WinFormsUI/2.3.1/WinFormsUI-2.3.1/Docking/DockContentHandler.cs	(revision 4068)
@@ -1,1063 +1,934 @@
 using System;
-using System.Windows.Forms;
-using System.Drawing;
 using System.ComponentModel;
 using System.Diagnostics.CodeAnalysis;
-
-namespace WeifenLuo.WinFormsUI.Docking
-{
-	public delegate string GetPersistStringCallback();
-
-	public class DockContentHandler : IDisposable, IDockDragSource
-	{
-		public DockContentHandler(Form form) : this(form, null)
-		{
-		}
-
-		public DockContentHandler(Form form, GetPersistStringCallback getPersistStringCallback)
-		{
-			if (!(form is IDockContent))
-				throw new ArgumentException(Strings.DockContent_Constructor_InvalidForm, "form");
-
-			m_form = form;
-			m_getPersistStringCallback = getPersistStringCallback;
-
-			m_events = new EventHandlerList();
-			Form.Disposed +=new EventHandler(Form_Disposed);
-			Form.TextChanged += new EventHandler(Form_TextChanged);
-		}
-
-		public void Dispose()
-		{
-			Dispose(true);
-			GC.SuppressFinalize(this);
-		}
-
-		protected virtual void Dispose(bool disposing)
-		{
-			if(disposing)
-			{
-				lock(this)
-				{
-					DockPanel = null;
-					if (m_autoHideTab != null)
-						m_autoHideTab.Dispose();
-					if (m_tab != null)
-						m_tab.Dispose();
-
-					Form.Disposed -= new EventHandler(Form_Disposed);
-					Form.TextChanged -= new EventHandler(Form_TextChanged);
-					m_events.Dispose();
-				}
-			}
-		}
-
-		private Form m_form;
-		public Form Form
-		{
-			get	{	return m_form;	}
-		}
-
-		public IDockContent Content
-		{
-			get	{	return Form as IDockContent;	}
-		}
-
-        private IDockContent m_previousActive = null;
-        public IDockContent PreviousActive
-        {
-            get { return m_previousActive; }
-            internal set { m_previousActive = value; }
+using System.Drawing;
+using System.Windows.Forms;
+
+namespace WeifenLuo.WinFormsUI.Docking {
+  public delegate string GetPersistStringCallback();
+
+  public class DockContentHandler : IDisposable, IDockDragSource {
+    public DockContentHandler(Form form)
+      : this(form, null) {
+    }
+
+    public DockContentHandler(Form form, GetPersistStringCallback getPersistStringCallback) {
+      if (!(form is IDockContent))
+        throw new ArgumentException(Strings.DockContent_Constructor_InvalidForm, "form");
+
+      m_form = form;
+      m_getPersistStringCallback = getPersistStringCallback;
+
+      m_events = new EventHandlerList();
+      Form.Disposed += new EventHandler(Form_Disposed);
+      Form.TextChanged += new EventHandler(Form_TextChanged);
+    }
+
+    public void Dispose() {
+      Dispose(true);
+      GC.SuppressFinalize(this);
+    }
+
+    protected virtual void Dispose(bool disposing) {
+      if (disposing) {
+        lock (this) {
+          DockPanel = null;
+          if (m_autoHideTab != null)
+            m_autoHideTab.Dispose();
+          if (m_tab != null)
+            m_tab.Dispose();
+
+          Form.Disposed -= new EventHandler(Form_Disposed);
+          Form.TextChanged -= new EventHandler(Form_TextChanged);
+          m_events.Dispose();
         }
-
-        private IDockContent m_nextActive = null;
-        public IDockContent NextActive
-        {
-            get { return m_nextActive; }
-            internal set { m_nextActive = value; }
+      }
+    }
+
+    private Form m_form;
+    public Form Form {
+      get { return m_form; }
+    }
+
+    public IDockContent Content {
+      get { return Form as IDockContent; }
+    }
+
+    private IDockContent m_previousActive = null;
+    public IDockContent PreviousActive {
+      get { return m_previousActive; }
+      internal set { m_previousActive = value; }
+    }
+
+    private IDockContent m_nextActive = null;
+    public IDockContent NextActive {
+      get { return m_nextActive; }
+      internal set { m_nextActive = value; }
+    }
+
+    private EventHandlerList m_events;
+    private EventHandlerList Events {
+      get { return m_events; }
+    }
+
+    private bool m_allowEndUserDocking = true;
+    public bool AllowEndUserDocking {
+      get { return m_allowEndUserDocking; }
+      set { m_allowEndUserDocking = value; }
+    }
+
+    private double m_autoHidePortion = 0.25;
+    public double AutoHidePortion {
+      get { return m_autoHidePortion; }
+      set {
+        if (value <= 0)
+          throw (new ArgumentOutOfRangeException(Strings.DockContentHandler_AutoHidePortion_OutOfRange));
+
+        if (m_autoHidePortion == value)
+          return;
+
+        m_autoHidePortion = value;
+
+        if (DockPanel == null)
+          return;
+
+        if (DockPanel.ActiveAutoHideContent == Content)
+          DockPanel.PerformLayout();
+      }
+    }
+
+    private bool m_closeButton = true;
+    public bool CloseButton {
+      get { return m_closeButton; }
+      set {
+        if (m_closeButton == value)
+          return;
+
+        m_closeButton = value;
+        if (Pane != null)
+          if (Pane.ActiveContent.DockHandler == this)
+            Pane.RefreshChanges();
+      }
+    }
+
+    private bool m_closeButtonVisible = true;
+    /// <summary>
+    /// Determines whether the close button is visible on the content
+    /// </summary>
+    public bool CloseButtonVisible {
+      get { return m_closeButtonVisible; }
+      set { m_closeButtonVisible = value; }
+    }
+
+    private DockState DefaultDockState {
+      get {
+        if (ShowHint != DockState.Unknown && ShowHint != DockState.Hidden)
+          return ShowHint;
+
+        if ((DockAreas & DockAreas.Document) != 0)
+          return DockState.Document;
+        if ((DockAreas & DockAreas.DockRight) != 0)
+          return DockState.DockRight;
+        if ((DockAreas & DockAreas.DockLeft) != 0)
+          return DockState.DockLeft;
+        if ((DockAreas & DockAreas.DockBottom) != 0)
+          return DockState.DockBottom;
+        if ((DockAreas & DockAreas.DockTop) != 0)
+          return DockState.DockTop;
+
+        return DockState.Unknown;
+      }
+    }
+
+    private DockState DefaultShowState {
+      get {
+        if (ShowHint != DockState.Unknown)
+          return ShowHint;
+
+        if ((DockAreas & DockAreas.Document) != 0)
+          return DockState.Document;
+        if ((DockAreas & DockAreas.DockRight) != 0)
+          return DockState.DockRight;
+        if ((DockAreas & DockAreas.DockLeft) != 0)
+          return DockState.DockLeft;
+        if ((DockAreas & DockAreas.DockBottom) != 0)
+          return DockState.DockBottom;
+        if ((DockAreas & DockAreas.DockTop) != 0)
+          return DockState.DockTop;
+        if ((DockAreas & DockAreas.Float) != 0)
+          return DockState.Float;
+
+        return DockState.Unknown;
+      }
+    }
+
+    private DockAreas m_allowedAreas = DockAreas.DockLeft | DockAreas.DockRight | DockAreas.DockTop | DockAreas.DockBottom | DockAreas.Document | DockAreas.Float;
+    public DockAreas DockAreas {
+      get { return m_allowedAreas; }
+      set {
+        if (m_allowedAreas == value)
+          return;
+
+        if (!DockHelper.IsDockStateValid(DockState, value))
+          throw (new InvalidOperationException(Strings.DockContentHandler_DockAreas_InvalidValue));
+
+        m_allowedAreas = value;
+
+        if (!DockHelper.IsDockStateValid(ShowHint, m_allowedAreas))
+          ShowHint = DockState.Unknown;
+      }
+    }
+
+    private DockState m_dockState = DockState.Unknown;
+    public DockState DockState {
+      get { return m_dockState; }
+      set {
+        if (m_dockState == value)
+          return;
+
+        DockPanel.SuspendLayout(true);
+
+        if (value == DockState.Hidden)
+          IsHidden = true;
+        else
+          SetDockState(false, value, Pane);
+
+        DockPanel.ResumeLayout(true, true);
+      }
+    }
+
+    private DockPanel m_dockPanel = null;
+    public DockPanel DockPanel {
+      get { return m_dockPanel; }
+      set {
+        if (m_dockPanel == value)
+          return;
+
+        Pane = null;
+
+        if (m_dockPanel != null)
+          m_dockPanel.RemoveContent(Content);
+
+        if (m_tab != null) {
+          m_tab.Dispose();
+          m_tab = null;
         }
 
-		private EventHandlerList m_events;
-		private EventHandlerList Events
-		{
-			get	{	return m_events;	}
-		}
-
-		private bool m_allowEndUserDocking = true;
-		public bool AllowEndUserDocking
-		{
-			get	{	return m_allowEndUserDocking;	}
-			set	{	m_allowEndUserDocking = value;	}
-		}
-
-		private double m_autoHidePortion = 0.25;
-		public double AutoHidePortion
-		{
-			get	{	return m_autoHidePortion;	}
-			set
-			{
-				if (value <= 0)
-					throw(new ArgumentOutOfRangeException(Strings.DockContentHandler_AutoHidePortion_OutOfRange));
-
-				if (m_autoHidePortion == value)
-					return;
-
-				m_autoHidePortion = value;
-
-				if (DockPanel == null)
-					return;
-
-				if (DockPanel.ActiveAutoHideContent == Content)
-					DockPanel.PerformLayout();
-			}
-		}
-
-		private bool m_closeButton = true;
-		public bool CloseButton
-		{
-			get	{	return m_closeButton;	}
-			set
-			{
-				if (m_closeButton == value)
-					return;
-
-				m_closeButton = value;
-				if (Pane != null)
-					if (Pane.ActiveContent.DockHandler == this)
-						Pane.RefreshChanges();
-			}
-		}
-
-        private bool m_closeButtonVisible = true;
-        /// <summary>
-        /// Determines whether the close button is visible on the content
-        /// </summary>
-        public bool CloseButtonVisible
-        {
-            get { return m_closeButtonVisible; }
-            set { m_closeButtonVisible = value; }
+        if (m_autoHideTab != null) {
+          m_autoHideTab.Dispose();
+          m_autoHideTab = null;
         }
-		
-		private DockState DefaultDockState
-		{
-			get
-			{
-				if (ShowHint != DockState.Unknown && ShowHint != DockState.Hidden)
-					return ShowHint;
-
-				if ((DockAreas & DockAreas.Document) != 0)
-					return DockState.Document;
-				if ((DockAreas & DockAreas.DockRight) != 0)
-					return DockState.DockRight;
-				if ((DockAreas & DockAreas.DockLeft) != 0)
-					return DockState.DockLeft;
-				if ((DockAreas & DockAreas.DockBottom) != 0)
-					return DockState.DockBottom;
-				if ((DockAreas & DockAreas.DockTop) != 0)
-					return DockState.DockTop;
-
-				return DockState.Unknown;
-			}
-		}
-
-		private DockState DefaultShowState
-		{
-			get
-			{
-				if (ShowHint != DockState.Unknown)
-					return ShowHint;
-
-				if ((DockAreas & DockAreas.Document) != 0)
-					return DockState.Document;
-				if ((DockAreas & DockAreas.DockRight) != 0)
-					return DockState.DockRight;
-				if ((DockAreas & DockAreas.DockLeft) != 0)
-					return DockState.DockLeft;
-				if ((DockAreas & DockAreas.DockBottom) != 0)
-					return DockState.DockBottom;
-				if ((DockAreas & DockAreas.DockTop) != 0)
-					return DockState.DockTop;
-				if ((DockAreas & DockAreas.Float) != 0)
-					return DockState.Float;
-
-				return DockState.Unknown;
-			}
-		}
-
-		private DockAreas m_allowedAreas = DockAreas.DockLeft | DockAreas.DockRight | DockAreas.DockTop | DockAreas.DockBottom | DockAreas.Document | DockAreas.Float;
-		public DockAreas DockAreas
-		{
-			get	{	return m_allowedAreas;	}
-			set
-			{
-				if (m_allowedAreas == value)
-					return;
-
-				if (!DockHelper.IsDockStateValid(DockState, value))
-					throw(new InvalidOperationException(Strings.DockContentHandler_DockAreas_InvalidValue));
-
-				m_allowedAreas = value;
-
-				if (!DockHelper.IsDockStateValid(ShowHint, m_allowedAreas))
-					ShowHint = DockState.Unknown;
-			}
-		}
-
-		private DockState m_dockState = DockState.Unknown;
-		public DockState DockState
-		{
-			get	{	return m_dockState;	}
-			set
-			{
-				if (m_dockState == value)
-					return;
-
-                DockPanel.SuspendLayout(true);
-
-				if (value == DockState.Hidden)
-					IsHidden = true;
-				else
-					SetDockState(false, value, Pane);
-
-                DockPanel.ResumeLayout(true, true);
-			}
-		}
-
-		private DockPanel m_dockPanel = null;
-		public DockPanel DockPanel
-		{
-			get { return m_dockPanel; }
-			set
-			{
-				if (m_dockPanel == value)
-					return;
-
-				Pane = null;
-
-				if (m_dockPanel != null)
-					m_dockPanel.RemoveContent(Content);
-
-				if (m_tab != null)
-				{
-					m_tab.Dispose();
-					m_tab = null;
-				}
-
-				if (m_autoHideTab != null)
-				{
-					m_autoHideTab.Dispose();
-					m_autoHideTab = null;
-				}
-
-				m_dockPanel = value;
-
-				if (m_dockPanel != null)
-				{
-					m_dockPanel.AddContent(Content);
-					Form.TopLevel = false;
-					Form.FormBorderStyle = FormBorderStyle.None;
-					Form.ShowInTaskbar = false;
-                    Form.WindowState = FormWindowState.Normal;
-					NativeMethods.SetWindowPos(Form.Handle, IntPtr.Zero, 0, 0, 0, 0,
-						Win32.FlagsSetWindowPos.SWP_NOACTIVATE |
-						Win32.FlagsSetWindowPos.SWP_NOMOVE |
-						Win32.FlagsSetWindowPos.SWP_NOSIZE |
-						Win32.FlagsSetWindowPos.SWP_NOZORDER |
-						Win32.FlagsSetWindowPos.SWP_NOOWNERZORDER |
-						Win32.FlagsSetWindowPos.SWP_FRAMECHANGED);
-				}
-			}
-		}
-
-		public Icon Icon
-		{
-			get	{	return Form.Icon;	}
-		}
-
-		public DockPane Pane
-		{
-			get {	return IsFloat ? FloatPane : PanelPane; }
-			set
-			{
-				if (Pane == value)
-					return;
-
-                DockPanel.SuspendLayout(true);
-
-				DockPane oldPane = Pane;
-
-				SuspendSetDockState();
-				FloatPane = (value == null ? null : (value.IsFloat ? value : FloatPane));
-				PanelPane = (value == null ? null : (value.IsFloat ? PanelPane : value));
-				ResumeSetDockState(IsHidden, value != null ? value.DockState : DockState.Unknown, oldPane);
-
-                DockPanel.ResumeLayout(true, true);
-			}
-		}
-
-		private bool m_isHidden = true;
-		public bool IsHidden
-		{
-			get	{	return m_isHidden;	}
-			set
-			{
-				if (m_isHidden == value)
-					return;
-
-				SetDockState(value, VisibleState, Pane);
-			}
-		}
-
-		private string m_tabText = null;
-		public string TabText
-		{
-            get { return m_tabText == null || m_tabText == "" ? Form.Text : m_tabText; }
-			set
-			{
-				if (m_tabText == value)
-					return;
-
-				m_tabText = value;
-				if (Pane != null)
-					Pane.RefreshChanges();
-			}
-		}
-
-		private DockState m_visibleState = DockState.Unknown;
-		public DockState VisibleState
-		{
-			get	{	return m_visibleState;	}
-			set
-			{
-				if (m_visibleState == value)
-					return;
-
-				SetDockState(IsHidden, value, Pane);
-			}
-		}
-
-		private bool m_isFloat = false;
-		public bool IsFloat
-		{
-			get	{	return m_isFloat;	}
-			set
-			{
-				if (m_isFloat == value)
-					return;
-
-                DockState visibleState = CheckDockState(value);
-
-				if (visibleState == DockState.Unknown)
-					throw new InvalidOperationException(Strings.DockContentHandler_IsFloat_InvalidValue);
-
-				SetDockState(IsHidden, visibleState, Pane);
-			}
-		}
-
-        [SuppressMessage("Microsoft.Naming", "CA1720:AvoidTypeNamesInParameters")]
-        public DockState CheckDockState(bool isFloat)
-        {
-            DockState dockState;
-
-            if (isFloat)
-            {
-                if (!IsDockStateValid(DockState.Float))
-                    dockState = DockState.Unknown;
-                else
-                    dockState = DockState.Float;
-            }
-            else
-            {
-                dockState = (PanelPane != null) ? PanelPane.DockState : DefaultDockState;
-                if (dockState != DockState.Unknown && !IsDockStateValid(dockState))
-                    dockState = DockState.Unknown;
-            }
-
-            return dockState;
+
+        m_dockPanel = value;
+
+        if (m_dockPanel != null) {
+          m_dockPanel.AddContent(Content);
+          Form.TopLevel = false;
+          Form.FormBorderStyle = FormBorderStyle.None;
+          Form.ShowInTaskbar = false;
+          Form.WindowState = FormWindowState.Normal;
+          NativeMethods.SetWindowPos(Form.Handle, IntPtr.Zero, 0, 0, 0, 0,
+            Win32.FlagsSetWindowPos.SWP_NOACTIVATE |
+            Win32.FlagsSetWindowPos.SWP_NOMOVE |
+            Win32.FlagsSetWindowPos.SWP_NOSIZE |
+            Win32.FlagsSetWindowPos.SWP_NOZORDER |
+            Win32.FlagsSetWindowPos.SWP_NOOWNERZORDER |
+            Win32.FlagsSetWindowPos.SWP_FRAMECHANGED);
         }
-
-		private DockPane m_panelPane = null;
-		public DockPane PanelPane
-		{
-			get	{	return m_panelPane;	}
-			set
-			{
-				if (m_panelPane == value)
-					return;
-
-				if (value != null)
-				{
-					if (value.IsFloat || value.DockPanel != DockPanel)
-						throw new InvalidOperationException(Strings.DockContentHandler_DockPane_InvalidValue);
-				}
-
-				DockPane oldPane = Pane;
-
-                if (m_panelPane != null)
-                    RemoveFromPane(m_panelPane);
-				m_panelPane = value;
-				if (m_panelPane != null)
-				{
-					m_panelPane.AddContent(Content);
-					SetDockState(IsHidden, IsFloat ? DockState.Float : m_panelPane.DockState, oldPane);
-				}
-				else
-					SetDockState(IsHidden, DockState.Unknown, oldPane);
-			}
-		}
-
-        private void RemoveFromPane(DockPane pane)
-        {
-            pane.RemoveContent(Content);
-            SetPane(null);
-            if (pane.Contents.Count == 0)
-                pane.Dispose();
+      }
+    }
+
+    public Icon Icon {
+      get { return Form.Icon; }
+    }
+
+    public DockPane Pane {
+      get { return IsFloat ? FloatPane : PanelPane; }
+      set {
+        if (Pane == value)
+          return;
+
+        DockPanel.SuspendLayout(true);
+
+        DockPane oldPane = Pane;
+
+        SuspendSetDockState();
+        FloatPane = (value == null ? null : (value.IsFloat ? value : FloatPane));
+        PanelPane = (value == null ? null : (value.IsFloat ? PanelPane : value));
+        ResumeSetDockState(IsHidden, value != null ? value.DockState : DockState.Unknown, oldPane);
+
+        DockPanel.ResumeLayout(true, true);
+      }
+    }
+
+    private bool m_isHidden = true;
+    public bool IsHidden {
+      get { return m_isHidden; }
+      set {
+        if (m_isHidden == value)
+          return;
+
+        SetDockState(value, VisibleState, Pane);
+      }
+    }
+
+    private string m_tabText = null;
+    public string TabText {
+      get { return m_tabText == null || m_tabText == "" ? Form.Text : m_tabText; }
+      set {
+        if (m_tabText == value)
+          return;
+
+        m_tabText = value;
+        if (Pane != null)
+          Pane.RefreshChanges();
+      }
+    }
+
+    private DockState m_visibleState = DockState.Unknown;
+    public DockState VisibleState {
+      get { return m_visibleState; }
+      set {
+        if (m_visibleState == value)
+          return;
+
+        SetDockState(IsHidden, value, Pane);
+      }
+    }
+
+    private bool m_isFloat = false;
+    public bool IsFloat {
+      get { return m_isFloat; }
+      set {
+        if (m_isFloat == value)
+          return;
+
+        DockState visibleState = CheckDockState(value);
+
+        if (visibleState == DockState.Unknown)
+          throw new InvalidOperationException(Strings.DockContentHandler_IsFloat_InvalidValue);
+
+        SetDockState(IsHidden, visibleState, Pane);
+      }
+    }
+
+    [SuppressMessage("Microsoft.Naming", "CA1720:AvoidTypeNamesInParameters")]
+    public DockState CheckDockState(bool isFloat) {
+      DockState dockState;
+
+      if (isFloat) {
+        if (!IsDockStateValid(DockState.Float))
+          dockState = DockState.Unknown;
+        else
+          dockState = DockState.Float;
+      } else {
+        dockState = (PanelPane != null) ? PanelPane.DockState : DefaultDockState;
+        if (dockState != DockState.Unknown && !IsDockStateValid(dockState))
+          dockState = DockState.Unknown;
+      }
+
+      return dockState;
+    }
+
+    private DockPane m_panelPane = null;
+    public DockPane PanelPane {
+      get { return m_panelPane; }
+      set {
+        if (m_panelPane == value)
+          return;
+
+        if (value != null) {
+          if (value.IsFloat || value.DockPanel != DockPanel)
+            throw new InvalidOperationException(Strings.DockContentHandler_DockPane_InvalidValue);
         }
 
-		private DockPane m_floatPane = null;
-		public DockPane FloatPane
-		{
-			get	{	return m_floatPane;	}
-			set
-			{
-				if (m_floatPane == value)
-					return;
-
-				if (value != null)
-				{
-					if (!value.IsFloat || value.DockPanel != DockPanel)
-						throw new InvalidOperationException(Strings.DockContentHandler_FloatPane_InvalidValue);
-				}
-
-				DockPane oldPane = Pane;
-
-                if (m_floatPane != null)
-                    RemoveFromPane(m_floatPane);
-				m_floatPane = value;
-				if (m_floatPane != null)
-				{
-					m_floatPane.AddContent(Content);
-					SetDockState(IsHidden, IsFloat ? DockState.Float : VisibleState, oldPane);
-				}
-				else
-					SetDockState(IsHidden, DockState.Unknown, oldPane);
-			}
-		}
-
-		private int m_countSetDockState = 0;
-		private void SuspendSetDockState()
-		{
-			m_countSetDockState ++;
-		}
-
-		private void ResumeSetDockState()
-		{
-			m_countSetDockState --;
-			if (m_countSetDockState < 0)
-				m_countSetDockState = 0;
-		}
-
-		internal bool IsSuspendSetDockState
-		{
-			get	{	return m_countSetDockState != 0;	}
-		}
-
-		private void ResumeSetDockState(bool isHidden, DockState visibleState, DockPane oldPane)
-		{
-			ResumeSetDockState();
-			SetDockState(isHidden, visibleState, oldPane);
-		}
-
-		internal void SetDockState(bool isHidden, DockState visibleState, DockPane oldPane)
-		{
-			if (IsSuspendSetDockState)
-				return;
-
-			if (DockPanel == null && visibleState != DockState.Unknown)
-				throw new InvalidOperationException(Strings.DockContentHandler_SetDockState_NullPanel);
-
-			if (visibleState == DockState.Hidden || (visibleState != DockState.Unknown && !IsDockStateValid(visibleState)))
-				throw new InvalidOperationException(Strings.DockContentHandler_SetDockState_InvalidState);
-
-            DockPanel dockPanel = DockPanel;
-            if (dockPanel != null)
-                dockPanel.SuspendLayout(true);
-
-			SuspendSetDockState();
-
-			DockState oldDockState = DockState;
-
-			if (m_isHidden != isHidden || oldDockState == DockState.Unknown)
-			{
-				m_isHidden = isHidden;
-			}
-			m_visibleState = visibleState;
-			m_dockState = isHidden ? DockState.Hidden : visibleState;
-
-            if (visibleState == DockState.Unknown)
-                Pane = null;
-            else
-            {
-                m_isFloat = (m_visibleState == DockState.Float);
-
-                if (Pane == null)
-                    Pane = DockPanel.DockPaneFactory.CreateDockPane(Content, visibleState, true);
-                else if (Pane.DockState != visibleState)
-                {
-                    if (Pane.Contents.Count == 1)
-                        Pane.SetDockState(visibleState);
-                    else
-                        Pane = DockPanel.DockPaneFactory.CreateDockPane(Content, visibleState, true);
-                }
-            }
-
-            if (Form.ContainsFocus)
-                if (DockState == DockState.Hidden || DockState == DockState.Unknown)
-                    DockPanel.ContentFocusManager.GiveUpFocus(Content);
-
-            SetPaneAndVisible(Pane);
-
-			if (oldPane != null && !oldPane.IsDisposed && oldDockState == oldPane.DockState)
-				RefreshDockPane(oldPane);
-
-			if (Pane != null && DockState == Pane.DockState)
-			{
-				if ((Pane != oldPane) ||
-					(Pane == oldPane && oldDockState != oldPane.DockState))
-					// Avoid early refresh of hidden AutoHide panes
-					if ((Pane.DockWindow == null || Pane.DockWindow.Visible || Pane.IsHidden) && !Pane.IsAutoHide)
-						RefreshDockPane(Pane);			
-			}
-
-            if (oldDockState != DockState)
-            {
-                if (DockState == DockState.Hidden || DockState == DockState.Unknown ||
-                    DockHelper.IsDockStateAutoHide(DockState))
-                    DockPanel.ContentFocusManager.RemoveFromList(Content);
-                else
-                    DockPanel.ContentFocusManager.AddToList(Content);
-
-                OnDockStateChanged(EventArgs.Empty);
-            }
-			ResumeSetDockState();
-
-            if (dockPanel != null)
-                dockPanel.ResumeLayout(true, true);
-		}
-
-		private static void RefreshDockPane(DockPane pane)
-		{
-			pane.RefreshChanges();
-			pane.ValidateActiveContent();
-		}
-
-		internal string PersistString
-		{
-			get	{	return GetPersistStringCallback == null ? Form.GetType().ToString() : GetPersistStringCallback();	}
-		}
-
-		private GetPersistStringCallback m_getPersistStringCallback = null;
-		public GetPersistStringCallback GetPersistStringCallback
-		{
-			get	{	return m_getPersistStringCallback;	}
-			set	{	m_getPersistStringCallback = value;	}
-		}
-
-
-		private bool m_hideOnClose = false;
-		public bool HideOnClose
-		{
-			get	{	return m_hideOnClose;	}
-			set	{	m_hideOnClose = value;	}
-		}
-
-		private DockState m_showHint = DockState.Unknown;
-		public DockState ShowHint
-		{
-			get	{	return m_showHint;	}
-			set
-			{	
-				if (!DockHelper.IsDockStateValid(value, DockAreas))
-					throw (new InvalidOperationException(Strings.DockContentHandler_ShowHint_InvalidValue));
-
-				if (m_showHint == value)
-					return;
-
-				m_showHint = value;
-			}
-		}
-
-		private bool m_isActivated = false;
-		public bool IsActivated
-		{
-			get	{	return m_isActivated;	}
-		    internal set
-		    {
-	            if (m_isActivated == value)
-		            return;
-
-	            m_isActivated = value;
-		    }
-		}
-
-		public bool IsDockStateValid(DockState dockState)
-		{
-			if (DockPanel != null && dockState == DockState.Document && DockPanel.DocumentStyle == DocumentStyle.SystemMdi)
-				return false;
-			else
-				return DockHelper.IsDockStateValid(dockState, DockAreas);
-		}
-
-		private ContextMenu m_tabPageContextMenu = null;
-		public ContextMenu TabPageContextMenu
-		{
-			get	{	return m_tabPageContextMenu;	}
-			set	{	m_tabPageContextMenu = value;	}
-		}
-
-		private string m_toolTipText = null;
-		public string ToolTipText
-		{
-			get	{	return m_toolTipText;	}
-			set {	m_toolTipText = value;	}
-		}
-
-		public void Activate()
-		{
-			if (DockPanel == null)
-				Form.Activate();
-			else if (Pane == null)
-				Show(DockPanel);
-			else
-			{
-				IsHidden = false;
-				Pane.ActiveContent = Content;
-                if (DockState == DockState.Document && DockPanel.DocumentStyle == DocumentStyle.SystemMdi)
-                {
-                    Form.Activate();
-                    return;
-                }
-                else if (DockHelper.IsDockStateAutoHide(DockState))
-                    DockPanel.ActiveAutoHideContent = Content;
-
-                if (!Form.ContainsFocus)
-                    DockPanel.ContentFocusManager.Activate(Content);
-			}
-		}
-
-        public void GiveUpFocus()
-        {
-            DockPanel.ContentFocusManager.GiveUpFocus(Content);
+        DockPane oldPane = Pane;
+
+        if (m_panelPane != null)
+          RemoveFromPane(m_panelPane);
+        m_panelPane = value;
+        if (m_panelPane != null) {
+          m_panelPane.AddContent(Content);
+          SetDockState(IsHidden, IsFloat ? DockState.Float : m_panelPane.DockState, oldPane);
+        } else
+          SetDockState(IsHidden, DockState.Unknown, oldPane);
+      }
+    }
+
+    private void RemoveFromPane(DockPane pane) {
+      pane.RemoveContent(Content);
+      SetPane(null);
+      if (pane.Contents.Count == 0)
+        pane.Dispose();
+    }
+
+    private DockPane m_floatPane = null;
+    public DockPane FloatPane {
+      get { return m_floatPane; }
+      set {
+        if (m_floatPane == value)
+          return;
+
+        if (value != null) {
+          if (!value.IsFloat || value.DockPanel != DockPanel)
+            throw new InvalidOperationException(Strings.DockContentHandler_FloatPane_InvalidValue);
         }
 
-		private IntPtr m_activeWindowHandle = IntPtr.Zero;
-		internal IntPtr ActiveWindowHandle
-		{
-			get	{	return m_activeWindowHandle;	}
-			set	{	m_activeWindowHandle = value;	}
-		}
-
-		public void Hide()
-		{
-			IsHidden = true;
-		}
-
-        internal void SetPaneAndVisible(DockPane pane)
-        {
-            SetPane(pane);
-            SetVisible();
+        DockPane oldPane = Pane;
+
+        if (m_floatPane != null)
+          RemoveFromPane(m_floatPane);
+        m_floatPane = value;
+        if (m_floatPane != null) {
+          m_floatPane.AddContent(Content);
+          SetDockState(IsHidden, IsFloat ? DockState.Float : VisibleState, oldPane);
+        } else
+          SetDockState(IsHidden, DockState.Unknown, oldPane);
+      }
+    }
+
+    private int m_countSetDockState = 0;
+    private void SuspendSetDockState() {
+      m_countSetDockState++;
+    }
+
+    private void ResumeSetDockState() {
+      m_countSetDockState--;
+      if (m_countSetDockState < 0)
+        m_countSetDockState = 0;
+    }
+
+    internal bool IsSuspendSetDockState {
+      get { return m_countSetDockState != 0; }
+    }
+
+    private void ResumeSetDockState(bool isHidden, DockState visibleState, DockPane oldPane) {
+      ResumeSetDockState();
+      SetDockState(isHidden, visibleState, oldPane);
+    }
+
+    internal void SetDockState(bool isHidden, DockState visibleState, DockPane oldPane) {
+      if (IsSuspendSetDockState)
+        return;
+
+      if (DockPanel == null && visibleState != DockState.Unknown)
+        throw new InvalidOperationException(Strings.DockContentHandler_SetDockState_NullPanel);
+
+      if (visibleState == DockState.Hidden || (visibleState != DockState.Unknown && !IsDockStateValid(visibleState)))
+        throw new InvalidOperationException(Strings.DockContentHandler_SetDockState_InvalidState);
+
+      DockPanel dockPanel = DockPanel;
+      if (dockPanel != null)
+        dockPanel.SuspendLayout(true);
+
+      SuspendSetDockState();
+
+      DockState oldDockState = DockState;
+
+      if (m_isHidden != isHidden || oldDockState == DockState.Unknown) {
+        m_isHidden = isHidden;
+      }
+      m_visibleState = visibleState;
+      m_dockState = isHidden ? DockState.Hidden : visibleState;
+
+      if (visibleState == DockState.Unknown)
+        Pane = null;
+      else {
+        m_isFloat = (m_visibleState == DockState.Float);
+
+        if (Pane == null)
+          Pane = DockPanel.DockPaneFactory.CreateDockPane(Content, visibleState, true);
+        else if (Pane.DockState != visibleState) {
+          if (Pane.Contents.Count == 1)
+            Pane.SetDockState(visibleState);
+          else
+            Pane = DockPanel.DockPaneFactory.CreateDockPane(Content, visibleState, true);
         }
-
-		private void SetPane(DockPane pane)
-		{
-			if (pane != null && pane.DockState == DockState.Document && DockPanel.DocumentStyle == DocumentStyle.DockingMdi)
-			{
-				if (Form.Parent is DockPane)
-					SetParent(null);
-				if (Form.MdiParent != DockPanel.ParentForm)
-				{
-					FlagClipWindow = true;
-					Form.MdiParent = DockPanel.ParentForm;
-				}
-			}
-			else
-			{
-				FlagClipWindow = true;
-				if (Form.MdiParent != null)
-					Form.MdiParent = null;
-				if (Form.TopLevel)
-					Form.TopLevel = false;
-				SetParent(pane);
-			}
-		}
-
-		internal void SetVisible()
-		{
-			bool visible;
-
-			if (IsHidden)
-				visible = false;
-			else if (Pane != null && Pane.DockState == DockState.Document && DockPanel.DocumentStyle == DocumentStyle.DockingMdi)
-				visible = true;
-			else if (Pane != null && Pane.ActiveContent == Content)
-				visible = true;
-			else if (Pane != null && Pane.ActiveContent != Content)
-				visible = false;
-			else
-				visible = Form.Visible;
-
-            if (Form.Visible != visible)
-                Form.Visible = visible;
-		}
-
-		private void SetParent(Control value)
-		{
-			if (Form.Parent == value)
-				return;
-
-            //!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
-            // Workaround of .Net Framework bug:
-            // Change the parent of a control with focus may result in the first
-            // MDI child form get activated. 
-            //!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
-            bool bRestoreFocus = false;
-            if (Form.ContainsFocus)
-            {
-				//Suggested as a fix for a memory leak by bugreports
-                if (value == null && !IsFloat)
-                    DockPanel.ContentFocusManager.GiveUpFocus(this.Content);
-                else
-                {
-                    DockPanel.SaveFocus();
-                    bRestoreFocus = true;
-                }
-            }
-            //!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
-
-            Form.Parent = value;
-
-            //!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
-            // Workaround of .Net Framework bug:
-            // Change the parent of a control with focus may result in the first
-            // MDI child form get activated. 
-            //!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
-            if (bRestoreFocus)
-                Activate();
-            //!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
+      }
+
+      if (Form.ContainsFocus)
+        if (DockState == DockState.Hidden || DockState == DockState.Unknown)
+          DockPanel.ContentFocusManager.GiveUpFocus(Content);
+
+      SetPaneAndVisible(Pane);
+
+      if (oldPane != null && !oldPane.IsDisposed && oldDockState == oldPane.DockState)
+        RefreshDockPane(oldPane);
+
+      if (Pane != null && DockState == Pane.DockState) {
+        if ((Pane != oldPane) ||
+          (Pane == oldPane && oldDockState != oldPane.DockState))
+          // Avoid early refresh of hidden AutoHide panes
+          if ((Pane.DockWindow == null || Pane.DockWindow.Visible || Pane.IsHidden) && !Pane.IsAutoHide)
+            RefreshDockPane(Pane);
+      }
+
+      if (oldDockState != DockState) {
+        if (DockState == DockState.Hidden || DockState == DockState.Unknown ||
+            DockHelper.IsDockStateAutoHide(DockState))
+          DockPanel.ContentFocusManager.RemoveFromList(Content);
+        else
+          DockPanel.ContentFocusManager.AddToList(Content);
+
+        OnDockStateChanged(EventArgs.Empty);
+      }
+      ResumeSetDockState();
+
+      if (dockPanel != null)
+        dockPanel.ResumeLayout(true, true);
+    }
+
+    private static void RefreshDockPane(DockPane pane) {
+      pane.RefreshChanges();
+      pane.ValidateActiveContent();
+    }
+
+    internal string PersistString {
+      get { return GetPersistStringCallback == null ? Form.GetType().ToString() : GetPersistStringCallback(); }
+    }
+
+    private GetPersistStringCallback m_getPersistStringCallback = null;
+    public GetPersistStringCallback GetPersistStringCallback {
+      get { return m_getPersistStringCallback; }
+      set { m_getPersistStringCallback = value; }
+    }
+
+
+    private bool m_hideOnClose = false;
+    public bool HideOnClose {
+      get { return m_hideOnClose; }
+      set { m_hideOnClose = value; }
+    }
+
+    private DockState m_showHint = DockState.Unknown;
+    public DockState ShowHint {
+      get { return m_showHint; }
+      set {
+        if (!DockHelper.IsDockStateValid(value, DockAreas))
+          throw (new InvalidOperationException(Strings.DockContentHandler_ShowHint_InvalidValue));
+
+        if (m_showHint == value)
+          return;
+
+        m_showHint = value;
+      }
+    }
+
+    private bool m_isActivated = false;
+    public bool IsActivated {
+      get { return m_isActivated; }
+      internal set {
+        if (m_isActivated == value)
+          return;
+
+        m_isActivated = value;
+      }
+    }
+
+    public bool IsDockStateValid(DockState dockState) {
+      if (DockPanel != null && dockState == DockState.Document && DockPanel.DocumentStyle == DocumentStyle.SystemMdi)
+        return false;
+      else
+        return DockHelper.IsDockStateValid(dockState, DockAreas);
+    }
+
+    private ContextMenu m_tabPageContextMenu = null;
+    public ContextMenu TabPageContextMenu {
+      get { return m_tabPageContextMenu; }
+      set { m_tabPageContextMenu = value; }
+    }
+
+    private string m_toolTipText = null;
+    public string ToolTipText {
+      get { return m_toolTipText; }
+      set { m_toolTipText = value; }
+    }
+
+    public void Activate() {
+      if (DockPanel == null)
+        Form.Activate();
+      else if (Pane == null)
+        Show(DockPanel);
+      else {
+        IsHidden = false;
+        Pane.ActiveContent = Content;
+        if (DockState == DockState.Document && DockPanel.DocumentStyle == DocumentStyle.SystemMdi) {
+          Form.Activate();
+          return;
+        } else if (DockHelper.IsDockStateAutoHide(DockState))
+          DockPanel.ActiveAutoHideContent = Content;
+
+        if (!Form.ContainsFocus)
+          DockPanel.ContentFocusManager.Activate(Content);
+      }
+    }
+
+    public void GiveUpFocus() {
+      DockPanel.ContentFocusManager.GiveUpFocus(Content);
+    }
+
+    private IntPtr m_activeWindowHandle = IntPtr.Zero;
+    internal IntPtr ActiveWindowHandle {
+      get { return m_activeWindowHandle; }
+      set { m_activeWindowHandle = value; }
+    }
+
+    public void Hide() {
+      IsHidden = true;
+    }
+
+    internal void SetPaneAndVisible(DockPane pane) {
+      SetPane(pane);
+      SetVisible();
+    }
+
+    private void SetPane(DockPane pane) {
+      if (pane != null && pane.DockState == DockState.Document && DockPanel.DocumentStyle == DocumentStyle.DockingMdi) {
+        if (Form.Parent is DockPane)
+          SetParent(null);
+        if (Form.MdiParent != DockPanel.ParentForm) {
+          FlagClipWindow = true;
+          Form.MdiParent = DockPanel.ParentForm;
         }
-
-		public void Show()
-		{
-			if (DockPanel == null)
-				Form.Show();
-			else
-				Show(DockPanel);
-		}
-
-		public void Show(DockPanel dockPanel)
-		{
-			if (dockPanel == null)
-				throw(new ArgumentNullException(Strings.DockContentHandler_Show_NullDockPanel));
-
-			if (DockState == DockState.Unknown)
-				Show(dockPanel, DefaultShowState);
-			else			
-				Activate();
-		}
-
-		public void Show(DockPanel dockPanel, DockState dockState)
-		{
-			if (dockPanel == null)
-				throw(new ArgumentNullException(Strings.DockContentHandler_Show_NullDockPanel));
-
-			if (dockState == DockState.Unknown || dockState == DockState.Hidden)
-				throw(new ArgumentException(Strings.DockContentHandler_Show_InvalidDockState));
-
-            dockPanel.SuspendLayout(true);
-
-			DockPanel = dockPanel;
-
-			if (dockState == DockState.Float && FloatPane == null)
-				Pane = DockPanel.DockPaneFactory.CreateDockPane(Content, DockState.Float, true);
-			else if (PanelPane == null)
-			{
-				DockPane paneExisting = null;
-				foreach (DockPane pane in DockPanel.Panes)
-					if (pane.DockState == dockState)
-					{
-						paneExisting = pane;
-						break;
-					}
-
-				if (paneExisting == null)
-					Pane = DockPanel.DockPaneFactory.CreateDockPane(Content, dockState, true);
-				else
-					Pane = paneExisting;
-			}
-
-			DockState = dockState;
-            dockPanel.ResumeLayout(true, true); //we'll resume the layout before activating to ensure that the position
-            Activate();                         //and size of the form are finally processed before the form is shown
-		}
-
-        [SuppressMessage("Microsoft.Naming", "CA1720:AvoidTypeNamesInParameters")]
-		public void Show(DockPanel dockPanel, Rectangle floatWindowBounds)
-		{
-			if (dockPanel == null)
-				throw(new ArgumentNullException(Strings.DockContentHandler_Show_NullDockPanel));
-
-            dockPanel.SuspendLayout(true);
-
-			DockPanel = dockPanel;
-			if (FloatPane == null)
-			{
-				IsHidden = true;	// to reduce the screen flicker
-				FloatPane = DockPanel.DockPaneFactory.CreateDockPane(Content, DockState.Float, false);
-				FloatPane.FloatWindow.StartPosition = FormStartPosition.Manual;
-			}
-
-			FloatPane.FloatWindow.Bounds = floatWindowBounds;
-			
-			Show(dockPanel, DockState.Float);
-			Activate();
-
-            dockPanel.ResumeLayout(true, true);
-		}
-
-		public void Show(DockPane pane, IDockContent beforeContent)
-		{
-			if (pane == null)
-				throw(new ArgumentNullException(Strings.DockContentHandler_Show_NullPane));
-
-			if (beforeContent != null && pane.Contents.IndexOf(beforeContent) == -1)
-				throw(new ArgumentException(Strings.DockContentHandler_Show_InvalidBeforeContent));
-
-            pane.DockPanel.SuspendLayout(true);
-
-			DockPanel = pane.DockPanel;
-			Pane = pane;
-			pane.SetContentIndex(Content, pane.Contents.IndexOf(beforeContent));
-			Show();
-
-            pane.DockPanel.ResumeLayout(true, true);
-		}
-
-		public void Show(DockPane previousPane, DockAlignment alignment, double proportion)
-		{
-			if (previousPane == null)
-				throw(new ArgumentException(Strings.DockContentHandler_Show_InvalidPrevPane));
-
-			if (DockHelper.IsDockStateAutoHide(previousPane.DockState))
-				throw(new ArgumentException(Strings.DockContentHandler_Show_InvalidPrevPane));
-
-            previousPane.DockPanel.SuspendLayout(true);
-
-			DockPanel = previousPane.DockPanel;
-			DockPanel.DockPaneFactory.CreateDockPane(Content, previousPane, alignment, proportion, true);
-			Show();
-
-            previousPane.DockPanel.ResumeLayout(true, true);
-		}
-
-		public void Close()
-		{
-			DockPanel dockPanel = DockPanel;
-            if (dockPanel != null)
-                dockPanel.SuspendLayout(true);
-			Form.Close();
-			if (dockPanel != null)
-				dockPanel.ResumeLayout(true, true);
-
-		}
-
-		private DockPaneStripBase.Tab m_tab = null;
-		internal DockPaneStripBase.Tab GetTab(DockPaneStripBase dockPaneStrip)
-		{
-            if (m_tab == null)
-                m_tab = dockPaneStrip.CreateTab(Content);
-
-            return m_tab;
-		}
-
-		private IDisposable m_autoHideTab = null;
-		internal IDisposable AutoHideTab
-		{
-            get { return m_autoHideTab; }
-            set { m_autoHideTab = value; }
-		}
-
-		#region Events
-		private static readonly object DockStateChangedEvent = new object();
-		public event EventHandler DockStateChanged
-		{
-			add	{	Events.AddHandler(DockStateChangedEvent, value);	}
-			remove	{	Events.RemoveHandler(DockStateChangedEvent, value);	}
-		}
-		protected virtual void OnDockStateChanged(EventArgs e)
-		{
-			EventHandler handler = (EventHandler)Events[DockStateChangedEvent];
-			if (handler != null)
-				handler(this, e);
-		}
-		#endregion
-
-		private void Form_Disposed(object sender, EventArgs e)
-		{
-			Dispose();
-		}
-
-		private void Form_TextChanged(object sender, EventArgs e)
-		{
-			if (DockHelper.IsDockStateAutoHide(DockState))
-				DockPanel.RefreshAutoHideStrip();
-			else if (Pane != null)
-			{
-				if (Pane.FloatWindow != null)
-					Pane.FloatWindow.SetText();
-				Pane.RefreshChanges();
-			}
-		}
-
-		private bool m_flagClipWindow = false;
-		internal bool FlagClipWindow
-		{
-			get	{	return m_flagClipWindow;	}
-			set
-			{
-				if (m_flagClipWindow == value)
-					return;
-
-				m_flagClipWindow = value;
-				if (m_flagClipWindow)
-					Form.Region = new Region(Rectangle.Empty);
-				else
-					Form.Region = null;
-			}
-		}
-
-        private ContextMenuStrip m_tabPageContextMenuStrip = null;
-        public ContextMenuStrip TabPageContextMenuStrip
-        {
-            get { return m_tabPageContextMenuStrip; }
-            set { m_tabPageContextMenuStrip = value; }
+      } else {
+        FlagClipWindow = true;
+        if (Form.MdiParent != null)
+          Form.MdiParent = null;
+        if (Form.TopLevel)
+          Form.TopLevel = false;
+        SetParent(pane);
+      }
+    }
+
+    internal void SetVisible() {
+      bool visible;
+
+      if (IsHidden)
+        visible = false;
+      else if (Pane != null && Pane.DockState == DockState.Document && DockPanel.DocumentStyle == DocumentStyle.DockingMdi)
+        visible = true;
+      else if (Pane != null && Pane.ActiveContent == Content)
+        visible = true;
+      else if (Pane != null && Pane.ActiveContent != Content)
+        visible = false;
+      else
+        visible = Form.Visible;
+
+      if (Form.Visible != visible)
+        Form.Visible = visible;
+    }
+
+    private void SetParent(Control value) {
+      if (Form.Parent == value)
+        return;
+
+      //!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
+      // Workaround of .Net Framework bug:
+      // Change the parent of a control with focus may result in the first
+      // MDI child form get activated. 
+      //!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
+      bool bRestoreFocus = false;
+      if (Form.ContainsFocus) {
+        //Suggested as a fix for a memory leak by bugreports
+        if (value == null && !IsFloat)
+          DockPanel.ContentFocusManager.GiveUpFocus(this.Content);
+        else {
+          DockPanel.SaveFocus();
+          bRestoreFocus = true;
         }
-
-        #region IDockDragSource Members
-
-        Control IDragSource.DragControl
-        {
-            get { return Form; }
+      }
+      //!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
+
+      Form.Parent = value;
+
+      //!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
+      // Workaround of .Net Framework bug:
+      // Change the parent of a control with focus may result in the first
+      // MDI child form get activated. 
+      //!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
+      if (bRestoreFocus)
+        Activate();
+      //!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
+    }
+
+    public void Show() {
+      if (DockPanel == null)
+        Form.Show();
+      else
+        Show(DockPanel);
+    }
+
+    public void Show(DockPanel dockPanel) {
+      if (dockPanel == null)
+        throw (new ArgumentNullException(Strings.DockContentHandler_Show_NullDockPanel));
+
+      if (DockState == DockState.Unknown)
+        Show(dockPanel, DefaultShowState);
+      else
+        Activate();
+    }
+
+    public void Show(DockPanel dockPanel, DockState dockState) {
+      if (dockPanel == null)
+        throw (new ArgumentNullException(Strings.DockContentHandler_Show_NullDockPanel));
+
+      if (dockState == DockState.Unknown || dockState == DockState.Hidden)
+        throw (new ArgumentException(Strings.DockContentHandler_Show_InvalidDockState));
+
+      dockPanel.SuspendLayout(true);
+
+      DockPanel = dockPanel;
+
+      if (dockState == DockState.Float && FloatPane == null)
+        Pane = DockPanel.DockPaneFactory.CreateDockPane(Content, DockState.Float, true);
+      else if (PanelPane == null) {
+        DockPane paneExisting = null;
+        foreach (DockPane pane in DockPanel.Panes)
+          if (pane.DockState == dockState) {
+            paneExisting = pane;
+            break;
+          }
+
+        if (paneExisting == null)
+          Pane = DockPanel.DockPaneFactory.CreateDockPane(Content, dockState, true);
+        else
+          Pane = paneExisting;
+      }
+
+      DockState = dockState;
+      dockPanel.ResumeLayout(true, true); //we'll resume the layout before activating to ensure that the position
+      Activate();                         //and size of the form are finally processed before the form is shown
+    }
+
+    [SuppressMessage("Microsoft.Naming", "CA1720:AvoidTypeNamesInParameters")]
+    public void Show(DockPanel dockPanel, Rectangle floatWindowBounds) {
+      if (dockPanel == null)
+        throw (new ArgumentNullException(Strings.DockContentHandler_Show_NullDockPanel));
+
+      dockPanel.SuspendLayout(true);
+
+      DockPanel = dockPanel;
+      if (FloatPane == null) {
+        IsHidden = true;	// to reduce the screen flicker
+        FloatPane = DockPanel.DockPaneFactory.CreateDockPane(Content, DockState.Float, false);
+        FloatPane.FloatWindow.StartPosition = FormStartPosition.Manual;
+      }
+
+      FloatPane.FloatWindow.Bounds = floatWindowBounds;
+
+      Show(dockPanel, DockState.Float);
+      Activate();
+
+      dockPanel.ResumeLayout(true, true);
+    }
+
+    public void Show(DockPane pane, IDockContent beforeContent) {
+      if (pane == null)
+        throw (new ArgumentNullException(Strings.DockContentHandler_Show_NullPane));
+
+      if (beforeContent != null && pane.Contents.IndexOf(beforeContent) == -1)
+        throw (new ArgumentException(Strings.DockContentHandler_Show_InvalidBeforeContent));
+
+      pane.DockPanel.SuspendLayout(true);
+
+      DockPanel = pane.DockPanel;
+      Pane = pane;
+      pane.SetContentIndex(Content, pane.Contents.IndexOf(beforeContent));
+      Show();
+
+      pane.DockPanel.ResumeLayout(true, true);
+    }
+
+    public void Show(DockPane previousPane, DockAlignment alignment, double proportion) {
+      if (previousPane == null)
+        throw (new ArgumentException(Strings.DockContentHandler_Show_InvalidPrevPane));
+
+      if (DockHelper.IsDockStateAutoHide(previousPane.DockState))
+        throw (new ArgumentException(Strings.DockContentHandler_Show_InvalidPrevPane));
+
+      previousPane.DockPanel.SuspendLayout(true);
+
+      DockPanel = previousPane.DockPanel;
+      DockPanel.DockPaneFactory.CreateDockPane(Content, previousPane, alignment, proportion, true);
+      Show();
+
+      previousPane.DockPanel.ResumeLayout(true, true);
+    }
+
+    public void Close() {
+      DockPanel dockPanel = DockPanel;
+      if (dockPanel != null)
+        dockPanel.SuspendLayout(true);
+      Form.Close();
+      if (dockPanel != null)
+        dockPanel.ResumeLayout(true, true);
+
+    }
+
+    private DockPaneStripBase.Tab m_tab = null;
+    internal DockPaneStripBase.Tab GetTab(DockPaneStripBase dockPaneStrip) {
+      if (m_tab == null)
+        m_tab = dockPaneStrip.CreateTab(Content);
+
+      return m_tab;
+    }
+
+    private IDisposable m_autoHideTab = null;
+    internal IDisposable AutoHideTab {
+      get { return m_autoHideTab; }
+      set { m_autoHideTab = value; }
+    }
+
+    #region Events
+    private static readonly object DockStateChangedEvent = new object();
+    public event EventHandler DockStateChanged {
+      add { Events.AddHandler(DockStateChangedEvent, value); }
+      remove { Events.RemoveHandler(DockStateChangedEvent, value); }
+    }
+    protected virtual void OnDockStateChanged(EventArgs e) {
+      EventHandler handler = (EventHandler)Events[DockStateChangedEvent];
+      if (handler != null)
+        handler(this, e);
+    }
+    #endregion
+
+    private void Form_Disposed(object sender, EventArgs e) {
+      Dispose();
+    }
+
+    private void Form_TextChanged(object sender, EventArgs e) {
+      if (DockHelper.IsDockStateAutoHide(DockState))
+        DockPanel.RefreshAutoHideStrip();
+      else if (Pane != null) {
+        if (Pane.FloatWindow != null)
+          Pane.FloatWindow.SetText();
+        Pane.RefreshChanges();
+      }
+    }
+
+    private bool m_flagClipWindow = false;
+    internal bool FlagClipWindow {
+      get { return m_flagClipWindow; }
+      set {
+        if (m_flagClipWindow == value)
+          return;
+
+        m_flagClipWindow = value;
+        if (m_flagClipWindow)
+          Form.Region = new Region(Rectangle.Empty);
+        else
+          Form.Region = null;
+      }
+    }
+
+    private ContextMenuStrip m_tabPageContextMenuStrip = null;
+    public ContextMenuStrip TabPageContextMenuStrip {
+      get { return m_tabPageContextMenuStrip; }
+      set { m_tabPageContextMenuStrip = value; }
+    }
+
+    #region IDockDragSource Members
+
+    Control IDragSource.DragControl {
+      get { return Form; }
+    }
+
+    bool IDockDragSource.CanDockTo(DockPane pane) {
+      if (!IsDockStateValid(pane.DockState))
+        return false;
+
+      if (Pane == pane && pane.DisplayingContents.Count == 1)
+        return false;
+
+      return true;
+    }
+
+    Rectangle IDockDragSource.BeginDrag(Point ptMouse) {
+      Size size;
+      DockPane floatPane = this.FloatPane;
+      if (DockState == DockState.Float || floatPane == null || floatPane.FloatWindow.NestedPanes.Count != 1)
+        size = DockPanel.DefaultFloatWindowSize;
+      else
+        size = floatPane.FloatWindow.Size;
+
+      Point location;
+      Rectangle rectPane = Pane.ClientRectangle;
+      if (DockState == DockState.Document) {
+        if (Pane.DockPanel.DocumentTabStripLocation == DocumentTabStripLocation.Bottom)
+          location = new Point(rectPane.Left, rectPane.Bottom - size.Height);
+        else
+          location = new Point(rectPane.Left, rectPane.Top);
+      } else {
+        location = new Point(rectPane.Left, rectPane.Bottom);
+        location.Y -= size.Height;
+      }
+      location = Pane.PointToScreen(location);
+
+      if (ptMouse.X > location.X + size.Width)
+        location.X += ptMouse.X - (location.X + size.Width) + Measures.SplitterSize;
+
+      return new Rectangle(location, size);
+    }
+
+    public void FloatAt(Rectangle floatWindowBounds) {
+      DockPane pane = DockPanel.DockPaneFactory.CreateDockPane(Content, floatWindowBounds, true);
+    }
+
+    public void DockTo(DockPane pane, DockStyle dockStyle, int contentIndex) {
+      if (dockStyle == DockStyle.Fill) {
+        bool samePane = (Pane == pane);
+        if (!samePane)
+          Pane = pane;
+
+        if (contentIndex == -1 || !samePane)
+          pane.SetContentIndex(Content, contentIndex);
+        else {
+          DockContentCollection contents = pane.Contents;
+          int oldIndex = contents.IndexOf(Content);
+          int newIndex = contentIndex;
+          if (oldIndex < newIndex) {
+            newIndex += 1;
+            if (newIndex > contents.Count - 1)
+              newIndex = -1;
+          }
+          pane.SetContentIndex(Content, newIndex);
         }
-
-        bool IDockDragSource.CanDockTo(DockPane pane)
-        {
-            if (!IsDockStateValid(pane.DockState))
-                return false;
-
-            if (Pane == pane && pane.DisplayingContents.Count == 1)
-                return false;
-
-            return true;
-        }
-
-        Rectangle IDockDragSource.BeginDrag(Point ptMouse)
-        {
-            Size size;
-            DockPane floatPane = this.FloatPane;
-            if (DockState == DockState.Float || floatPane == null || floatPane.FloatWindow.NestedPanes.Count != 1)
-                size = DockPanel.DefaultFloatWindowSize;
-            else
-                size = floatPane.FloatWindow.Size;
-
-            Point location;
-			Rectangle rectPane = Pane.ClientRectangle;
-            if (DockState == DockState.Document)
-            {
-                if (Pane.DockPanel.DocumentTabStripLocation == DocumentTabStripLocation.Bottom)
-                    location = new Point(rectPane.Left, rectPane.Bottom - size.Height);
-                else
-                    location = new Point(rectPane.Left, rectPane.Top);
-            }
-            else
-            {
-                location = new Point(rectPane.Left, rectPane.Bottom);
-                location.Y -= size.Height;
-            }
-            location = Pane.PointToScreen(location);
-
-            if (ptMouse.X > location.X + size.Width)
-                location.X += ptMouse.X - (location.X + size.Width) + Measures.SplitterSize;
-
-            return new Rectangle(location, size);
-        }
-
-        public void FloatAt(Rectangle floatWindowBounds)
-        {
-            DockPane pane = DockPanel.DockPaneFactory.CreateDockPane(Content, floatWindowBounds, true);
-        }
-
-        public void DockTo(DockPane pane, DockStyle dockStyle, int contentIndex)
-        {
-			if (dockStyle == DockStyle.Fill)
-			{
-				bool samePane = (Pane == pane);
-				if (!samePane)
-					Pane = pane;
-
-				if (contentIndex == -1 || !samePane)
-					pane.SetContentIndex(Content, contentIndex);
-				else
-				{
-					DockContentCollection contents = pane.Contents;
-					int oldIndex = contents.IndexOf(Content);
-					int newIndex = contentIndex;
-					if (oldIndex < newIndex)
-					{
-						newIndex += 1;
-						if (newIndex > contents.Count -1)
-							newIndex = -1;
-					}
-					pane.SetContentIndex(Content, newIndex);
-				}
-			}
-			else
-			{
-				DockPane paneFrom = DockPanel.DockPaneFactory.CreateDockPane(Content, pane.DockState, true);
-				INestedPanesContainer container = pane.NestedPanesContainer;
-				if (dockStyle == DockStyle.Left)
-					paneFrom.DockTo(container, pane, DockAlignment.Left, 0.5);
-				else if (dockStyle == DockStyle.Right) 
-					paneFrom.DockTo(container, pane, DockAlignment.Right, 0.5);
-				else if (dockStyle == DockStyle.Top)
-					paneFrom.DockTo(container, pane, DockAlignment.Top, 0.5);
-				else if (dockStyle == DockStyle.Bottom) 
-					paneFrom.DockTo(container, pane, DockAlignment.Bottom, 0.5);
-
-				paneFrom.DockState = pane.DockState;
-			}
-        }
-
-        public void DockTo(DockPanel panel, DockStyle dockStyle)
-        {
-            if (panel != DockPanel)
-                throw new ArgumentException(Strings.IDockDragSource_DockTo_InvalidPanel, "panel");
-
-            DockPane pane;
-
-            if (dockStyle == DockStyle.Top)
-                pane = DockPanel.DockPaneFactory.CreateDockPane(Content, DockState.DockTop, true);
-            else if (dockStyle == DockStyle.Bottom)
-                pane = DockPanel.DockPaneFactory.CreateDockPane(Content, DockState.DockBottom, true);
-            else if (dockStyle == DockStyle.Left)
-                pane = DockPanel.DockPaneFactory.CreateDockPane(Content, DockState.DockLeft, true);
-            else if (dockStyle == DockStyle.Right)
-                pane = DockPanel.DockPaneFactory.CreateDockPane(Content, DockState.DockRight, true);
-            else if (dockStyle == DockStyle.Fill)
-                pane = DockPanel.DockPaneFactory.CreateDockPane(Content, DockState.Document, true);
-            else
-                return;
-        }
-
-        #endregion
-    }
+      } else {
+        DockPane paneFrom = DockPanel.DockPaneFactory.CreateDockPane(Content, pane.DockState, true);
+        INestedPanesContainer container = pane.NestedPanesContainer;
+        if (dockStyle == DockStyle.Left)
+          paneFrom.DockTo(container, pane, DockAlignment.Left, 0.5);
+        else if (dockStyle == DockStyle.Right)
+          paneFrom.DockTo(container, pane, DockAlignment.Right, 0.5);
+        else if (dockStyle == DockStyle.Top)
+          paneFrom.DockTo(container, pane, DockAlignment.Top, 0.5);
+        else if (dockStyle == DockStyle.Bottom)
+          paneFrom.DockTo(container, pane, DockAlignment.Bottom, 0.5);
+
+        paneFrom.DockState = pane.DockState;
+      }
+    }
+
+    public void DockTo(DockPanel panel, DockStyle dockStyle) {
+      if (panel != DockPanel)
+        throw new ArgumentException(Strings.IDockDragSource_DockTo_InvalidPanel, "panel");
+
+      DockPane pane;
+
+      if (dockStyle == DockStyle.Top)
+        pane = DockPanel.DockPaneFactory.CreateDockPane(Content, DockState.DockTop, true);
+      else if (dockStyle == DockStyle.Bottom)
+        pane = DockPanel.DockPaneFactory.CreateDockPane(Content, DockState.DockBottom, true);
+      else if (dockStyle == DockStyle.Left)
+        pane = DockPanel.DockPaneFactory.CreateDockPane(Content, DockState.DockLeft, true);
+      else if (dockStyle == DockStyle.Right)
+        pane = DockPanel.DockPaneFactory.CreateDockPane(Content, DockState.DockRight, true);
+      else if (dockStyle == DockStyle.Fill)
+        pane = DockPanel.DockPaneFactory.CreateDockPane(Content, DockState.Document, true);
+      else
+        return;
+    }
+
+    #endregion
+  }
 }
Index: /trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.WinFormsUI/2.3.1/WinFormsUI-2.3.1/Docking/DockOutlineBase.cs
===================================================================
--- /trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.WinFormsUI/2.3.1/WinFormsUI-2.3.1/Docking/DockOutlineBase.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.WinFormsUI/2.3.1/WinFormsUI-2.3.1/Docking/DockOutlineBase.cs	(revision 4068)
@@ -1,161 +1,135 @@
-using System;
 using System.Drawing;
 using System.Windows.Forms;
 
-namespace WeifenLuo.WinFormsUI.Docking
-{
-    internal abstract class DockOutlineBase
-    {
-        public DockOutlineBase()
-        {
-            Init();
-        }
+namespace WeifenLuo.WinFormsUI.Docking {
+  internal abstract class DockOutlineBase {
+    public DockOutlineBase() {
+      Init();
+    }
 
-        private void Init()
-        {
-            SetValues(Rectangle.Empty, null, DockStyle.None, -1);
-            SaveOldValues();
-        }
+    private void Init() {
+      SetValues(Rectangle.Empty, null, DockStyle.None, -1);
+      SaveOldValues();
+    }
 
-        private Rectangle m_oldFloatWindowBounds;
-        protected Rectangle OldFloatWindowBounds
-        {
-            get { return m_oldFloatWindowBounds; }
-        }
+    private Rectangle m_oldFloatWindowBounds;
+    protected Rectangle OldFloatWindowBounds {
+      get { return m_oldFloatWindowBounds; }
+    }
 
-        private Control m_oldDockTo;
-        protected Control OldDockTo
-        {
-            get { return m_oldDockTo; }
-        }
+    private Control m_oldDockTo;
+    protected Control OldDockTo {
+      get { return m_oldDockTo; }
+    }
 
-        private DockStyle m_oldDock;
-        protected DockStyle OldDock
-        {
-            get { return m_oldDock; }
-        }
+    private DockStyle m_oldDock;
+    protected DockStyle OldDock {
+      get { return m_oldDock; }
+    }
 
-        private int m_oldContentIndex;
-        protected int OldContentIndex
-        {
-            get { return m_oldContentIndex; }
-        }
+    private int m_oldContentIndex;
+    protected int OldContentIndex {
+      get { return m_oldContentIndex; }
+    }
 
-        protected bool SameAsOldValue
-        {
-            get
-            {
-                return FloatWindowBounds == OldFloatWindowBounds &&
-                    DockTo == OldDockTo &&
-                    Dock == OldDock &&
-                    ContentIndex == OldContentIndex;
-            }
-        }
+    protected bool SameAsOldValue {
+      get {
+        return FloatWindowBounds == OldFloatWindowBounds &&
+            DockTo == OldDockTo &&
+            Dock == OldDock &&
+            ContentIndex == OldContentIndex;
+      }
+    }
 
-        private Rectangle m_floatWindowBounds;
-        public Rectangle FloatWindowBounds
-        {
-            get { return m_floatWindowBounds; }
-        }
+    private Rectangle m_floatWindowBounds;
+    public Rectangle FloatWindowBounds {
+      get { return m_floatWindowBounds; }
+    }
 
-        private Control m_dockTo;
-        public Control DockTo
-        {
-            get { return m_dockTo; }
-        }
+    private Control m_dockTo;
+    public Control DockTo {
+      get { return m_dockTo; }
+    }
 
-        private DockStyle m_dock;
-        public DockStyle Dock
-        {
-            get { return m_dock; }
-        }
+    private DockStyle m_dock;
+    public DockStyle Dock {
+      get { return m_dock; }
+    }
 
-        private int m_contentIndex;
-        public int ContentIndex
-        {
-            get { return m_contentIndex; }
-        }
+    private int m_contentIndex;
+    public int ContentIndex {
+      get { return m_contentIndex; }
+    }
 
-        public bool FlagFullEdge
-        {
-            get { return m_contentIndex != 0; }
-        }
+    public bool FlagFullEdge {
+      get { return m_contentIndex != 0; }
+    }
 
-        private bool m_flagTestDrop = false;
-        public bool FlagTestDrop
-        {
-            get { return m_flagTestDrop; }
-            set { m_flagTestDrop = value; }
-        }
+    private bool m_flagTestDrop = false;
+    public bool FlagTestDrop {
+      get { return m_flagTestDrop; }
+      set { m_flagTestDrop = value; }
+    }
 
-        private void SaveOldValues()
-        {
-            m_oldDockTo = m_dockTo;
-            m_oldDock = m_dock;
-            m_oldContentIndex = m_contentIndex;
-            m_oldFloatWindowBounds = m_floatWindowBounds;
-        }
+    private void SaveOldValues() {
+      m_oldDockTo = m_dockTo;
+      m_oldDock = m_dock;
+      m_oldContentIndex = m_contentIndex;
+      m_oldFloatWindowBounds = m_floatWindowBounds;
+    }
 
-        protected abstract void OnShow();
+    protected abstract void OnShow();
 
-        protected abstract void OnClose();
+    protected abstract void OnClose();
 
-        private void SetValues(Rectangle floatWindowBounds, Control dockTo, DockStyle dock, int contentIndex)
-        {
-            m_floatWindowBounds = floatWindowBounds;
-            m_dockTo = dockTo;
-            m_dock = dock;
-            m_contentIndex = contentIndex;
-            FlagTestDrop = true;
-        }
+    private void SetValues(Rectangle floatWindowBounds, Control dockTo, DockStyle dock, int contentIndex) {
+      m_floatWindowBounds = floatWindowBounds;
+      m_dockTo = dockTo;
+      m_dock = dock;
+      m_contentIndex = contentIndex;
+      FlagTestDrop = true;
+    }
 
-        private void TestChange()
-        {
-            if (m_floatWindowBounds != m_oldFloatWindowBounds ||
-                m_dockTo != m_oldDockTo ||
-                m_dock != m_oldDock ||
-                m_contentIndex != m_oldContentIndex)
-                OnShow();
-        }
+    private void TestChange() {
+      if (m_floatWindowBounds != m_oldFloatWindowBounds ||
+          m_dockTo != m_oldDockTo ||
+          m_dock != m_oldDock ||
+          m_contentIndex != m_oldContentIndex)
+        OnShow();
+    }
 
-        public void Show()
-        {
-            SaveOldValues();
-            SetValues(Rectangle.Empty, null, DockStyle.None, -1);
-            TestChange();
-        }
+    public void Show() {
+      SaveOldValues();
+      SetValues(Rectangle.Empty, null, DockStyle.None, -1);
+      TestChange();
+    }
 
-        public void Show(DockPane pane, DockStyle dock)
-        {
-            SaveOldValues();
-            SetValues(Rectangle.Empty, pane, dock, -1);
-            TestChange();
-        }
+    public void Show(DockPane pane, DockStyle dock) {
+      SaveOldValues();
+      SetValues(Rectangle.Empty, pane, dock, -1);
+      TestChange();
+    }
 
-        public void Show(DockPane pane, int contentIndex)
-        {
-            SaveOldValues();
-            SetValues(Rectangle.Empty, pane, DockStyle.Fill, contentIndex);
-            TestChange();
-        }
+    public void Show(DockPane pane, int contentIndex) {
+      SaveOldValues();
+      SetValues(Rectangle.Empty, pane, DockStyle.Fill, contentIndex);
+      TestChange();
+    }
 
-        public void Show(DockPanel dockPanel, DockStyle dock, bool fullPanelEdge)
-        {
-            SaveOldValues();
-            SetValues(Rectangle.Empty, dockPanel, dock, fullPanelEdge ? -1 : 0);
-            TestChange();
-        }
+    public void Show(DockPanel dockPanel, DockStyle dock, bool fullPanelEdge) {
+      SaveOldValues();
+      SetValues(Rectangle.Empty, dockPanel, dock, fullPanelEdge ? -1 : 0);
+      TestChange();
+    }
 
-        public void Show(Rectangle floatWindowBounds)
-        {
-            SaveOldValues();
-            SetValues(floatWindowBounds, null, DockStyle.None, -1);
-            TestChange();
-        }
+    public void Show(Rectangle floatWindowBounds) {
+      SaveOldValues();
+      SetValues(floatWindowBounds, null, DockStyle.None, -1);
+      TestChange();
+    }
 
-        public void Close()
-        {
-            OnClose();
-        }
+    public void Close() {
+      OnClose();
     }
+  }
 }
Index: /trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.WinFormsUI/2.3.1/WinFormsUI-2.3.1/Docking/DockPane.SplitterControl.cs
===================================================================
--- /trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.WinFormsUI/2.3.1/WinFormsUI-2.3.1/Docking/DockPane.SplitterControl.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.WinFormsUI/2.3.1/WinFormsUI-2.3.1/Docking/DockPane.SplitterControl.cs	(revision 4068)
@@ -1,157 +1,131 @@
-using System;
-using System.Collections;
-using System.ComponentModel;
 using System.Drawing;
 using System.Windows.Forms;
 
-namespace WeifenLuo.WinFormsUI.Docking
-{
-    partial class DockPane
-    {
-        private class SplitterControl : Control, ISplitterDragSource
-        {
-            DockPane m_pane;
+namespace WeifenLuo.WinFormsUI.Docking {
+  partial class DockPane {
+    private class SplitterControl : Control, ISplitterDragSource {
+      DockPane m_pane;
 
-            public SplitterControl(DockPane pane)
-            {
-                SetStyle(ControlStyles.Selectable, false);
-                m_pane = pane;
-            }
+      public SplitterControl(DockPane pane) {
+        SetStyle(ControlStyles.Selectable, false);
+        m_pane = pane;
+      }
 
-            public DockPane DockPane
-            {
-                get { return m_pane; }
-            }
+      public DockPane DockPane {
+        get { return m_pane; }
+      }
 
-            private DockAlignment m_alignment;
-            public DockAlignment Alignment
-            {
-                get { return m_alignment; }
-                set
-                {
-                    m_alignment = value;
-                    if (m_alignment == DockAlignment.Left || m_alignment == DockAlignment.Right)
-                        Cursor = Cursors.VSplit;
-                    else if (m_alignment == DockAlignment.Top || m_alignment == DockAlignment.Bottom)
-                        Cursor = Cursors.HSplit;
-                    else
-                        Cursor = Cursors.Default;
+      private DockAlignment m_alignment;
+      public DockAlignment Alignment {
+        get { return m_alignment; }
+        set {
+          m_alignment = value;
+          if (m_alignment == DockAlignment.Left || m_alignment == DockAlignment.Right)
+            Cursor = Cursors.VSplit;
+          else if (m_alignment == DockAlignment.Top || m_alignment == DockAlignment.Bottom)
+            Cursor = Cursors.HSplit;
+          else
+            Cursor = Cursors.Default;
 
-                    if (DockPane.DockState == DockState.Document)
-                        Invalidate();
-                }
-            }
+          if (DockPane.DockState == DockState.Document)
+            Invalidate();
+        }
+      }
 
-            protected override void OnPaint(PaintEventArgs e)
-            {
-                base.OnPaint(e);
+      protected override void OnPaint(PaintEventArgs e) {
+        base.OnPaint(e);
 
-                if (DockPane.DockState != DockState.Document)
-                    return;
+        if (DockPane.DockState != DockState.Document)
+          return;
 
-                Graphics g = e.Graphics;
-                Rectangle rect = ClientRectangle;
-                if (Alignment == DockAlignment.Top || Alignment == DockAlignment.Bottom)
-                    g.DrawLine(SystemPens.ControlDark, rect.Left, rect.Bottom - 1, rect.Right, rect.Bottom - 1);
-                else if (Alignment == DockAlignment.Left || Alignment == DockAlignment.Right)
-                    g.DrawLine(SystemPens.ControlDarkDark, rect.Right - 1, rect.Top, rect.Right - 1, rect.Bottom);
-            }
+        Graphics g = e.Graphics;
+        Rectangle rect = ClientRectangle;
+        if (Alignment == DockAlignment.Top || Alignment == DockAlignment.Bottom)
+          g.DrawLine(SystemPens.ControlDark, rect.Left, rect.Bottom - 1, rect.Right, rect.Bottom - 1);
+        else if (Alignment == DockAlignment.Left || Alignment == DockAlignment.Right)
+          g.DrawLine(SystemPens.ControlDarkDark, rect.Right - 1, rect.Top, rect.Right - 1, rect.Bottom);
+      }
 
-            protected override void OnMouseDown(MouseEventArgs e)
-            {
-                base.OnMouseDown(e);
+      protected override void OnMouseDown(MouseEventArgs e) {
+        base.OnMouseDown(e);
 
-                if (e.Button != MouseButtons.Left)
-                    return;
+        if (e.Button != MouseButtons.Left)
+          return;
 
-                DockPane.DockPanel.BeginDrag(this, Parent.RectangleToScreen(Bounds));
-            }
+        DockPane.DockPanel.BeginDrag(this, Parent.RectangleToScreen(Bounds));
+      }
 
-            #region ISplitterDragSource Members
+      #region ISplitterDragSource Members
 
-            void ISplitterDragSource.BeginDrag(Rectangle rectSplitter)
-            {
-            }
+      void ISplitterDragSource.BeginDrag(Rectangle rectSplitter) {
+      }
 
-            void ISplitterDragSource.EndDrag()
-            {
-            }
+      void ISplitterDragSource.EndDrag() {
+      }
 
-            bool ISplitterDragSource.IsVertical
-            {
-                get
-                {
-                    NestedDockingStatus status = DockPane.NestedDockingStatus;
-                    return (status.DisplayingAlignment == DockAlignment.Left ||
-                        status.DisplayingAlignment == DockAlignment.Right);
-                }
-            }
+      bool ISplitterDragSource.IsVertical {
+        get {
+          NestedDockingStatus status = DockPane.NestedDockingStatus;
+          return (status.DisplayingAlignment == DockAlignment.Left ||
+              status.DisplayingAlignment == DockAlignment.Right);
+        }
+      }
 
-            Rectangle ISplitterDragSource.DragLimitBounds
-            {
-                get
-                {
-                    NestedDockingStatus status = DockPane.NestedDockingStatus;
-                    Rectangle rectLimit = Parent.RectangleToScreen(status.LogicalBounds);
-                    if (((ISplitterDragSource)this).IsVertical)
-                    {
-                        rectLimit.X += MeasurePane.MinSize;
-                        rectLimit.Width -= 2 * MeasurePane.MinSize;
-                    }
-                    else
-                    {
-                        rectLimit.Y += MeasurePane.MinSize;
-                        rectLimit.Height -= 2 * MeasurePane.MinSize;
-                    }
+      Rectangle ISplitterDragSource.DragLimitBounds {
+        get {
+          NestedDockingStatus status = DockPane.NestedDockingStatus;
+          Rectangle rectLimit = Parent.RectangleToScreen(status.LogicalBounds);
+          if (((ISplitterDragSource)this).IsVertical) {
+            rectLimit.X += MeasurePane.MinSize;
+            rectLimit.Width -= 2 * MeasurePane.MinSize;
+          } else {
+            rectLimit.Y += MeasurePane.MinSize;
+            rectLimit.Height -= 2 * MeasurePane.MinSize;
+          }
 
-                    return rectLimit;
-                }
-            }
+          return rectLimit;
+        }
+      }
 
-            void ISplitterDragSource.MoveSplitter(int offset)
-            {
-                NestedDockingStatus status = DockPane.NestedDockingStatus;
-                double proportion = status.Proportion;
-                if (status.LogicalBounds.Width <= 0 || status.LogicalBounds.Height <= 0)
-                    return;
-                else if (status.DisplayingAlignment == DockAlignment.Left)
-                    proportion += ((double)offset) / (double)status.LogicalBounds.Width;
-                else if (status.DisplayingAlignment == DockAlignment.Right)
-                    proportion -= ((double)offset) / (double)status.LogicalBounds.Width;
-                else if (status.DisplayingAlignment == DockAlignment.Top)
-                    proportion += ((double)offset) / (double)status.LogicalBounds.Height;
-                else
-                    proportion -= ((double)offset) / (double)status.LogicalBounds.Height;
+      void ISplitterDragSource.MoveSplitter(int offset) {
+        NestedDockingStatus status = DockPane.NestedDockingStatus;
+        double proportion = status.Proportion;
+        if (status.LogicalBounds.Width <= 0 || status.LogicalBounds.Height <= 0)
+          return;
+        else if (status.DisplayingAlignment == DockAlignment.Left)
+          proportion += ((double)offset) / (double)status.LogicalBounds.Width;
+        else if (status.DisplayingAlignment == DockAlignment.Right)
+          proportion -= ((double)offset) / (double)status.LogicalBounds.Width;
+        else if (status.DisplayingAlignment == DockAlignment.Top)
+          proportion += ((double)offset) / (double)status.LogicalBounds.Height;
+        else
+          proportion -= ((double)offset) / (double)status.LogicalBounds.Height;
 
-                DockPane.SetNestedDockingProportion(proportion);
-            }
+        DockPane.SetNestedDockingProportion(proportion);
+      }
 
-            #region IDragSource Members
+      #region IDragSource Members
 
-            Control IDragSource.DragControl
-            {
-                get { return this; }
-            }
+      Control IDragSource.DragControl {
+        get { return this; }
+      }
 
-            #endregion
+      #endregion
 
-            #endregion
-        }
+      #endregion
+    }
 
-        private SplitterControl m_splitter;
-        private SplitterControl Splitter
-        {
-            get { return m_splitter; }
-        }
+    private SplitterControl m_splitter;
+    private SplitterControl Splitter {
+      get { return m_splitter; }
+    }
 
-        internal Rectangle SplitterBounds
-        {
-            set { Splitter.Bounds = value; }
-        }
+    internal Rectangle SplitterBounds {
+      set { Splitter.Bounds = value; }
+    }
 
-        internal DockAlignment SplitterAlignment
-        {
-            set { Splitter.Alignment = value; }
-        }
+    internal DockAlignment SplitterAlignment {
+      set { Splitter.Alignment = value; }
     }
+  }
 }
Index: /trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.WinFormsUI/2.3.1/WinFormsUI-2.3.1/Docking/DockPane.cs
===================================================================
--- /trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.WinFormsUI/2.3.1/WinFormsUI-2.3.1/Docking/DockPane.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.WinFormsUI/2.3.1/WinFormsUI-2.3.1/Docking/DockPane.cs	(revision 4068)
@@ -1,1288 +1,1130 @@
 using System;
 using System.ComponentModel;
+using System.Diagnostics.CodeAnalysis;
 using System.Drawing;
-using System.Drawing.Drawing2D;
+using System.Security.Permissions;
 using System.Windows.Forms;
-using System.Runtime.InteropServices;
-using System.Security.Permissions;
-using System.Diagnostics.CodeAnalysis;
-
-namespace WeifenLuo.WinFormsUI.Docking
-{
-	[ToolboxItem(false)]
-	public partial class DockPane : UserControl, IDockDragSource
-	{
-		public enum AppearanceStyle
-		{
-			ToolWindow,
-			Document
-		}
-
-		private enum HitTestArea
-		{
-			Caption,
-			TabStrip,
-			Content,
-			None
-		}
-
-		private struct HitTestResult
-		{
-			public HitTestArea HitArea;
-			public int Index;
-
-			public HitTestResult(HitTestArea hitTestArea, int index)
-			{
-				HitArea = hitTestArea;
-				Index = index;
-			}
-		}
-
-		private DockPaneCaptionBase m_captionControl;
-		private DockPaneCaptionBase CaptionControl
-		{
-			get	{	return m_captionControl;	}
-		}
-
-		private DockPaneStripBase m_tabStripControl;
-		internal DockPaneStripBase TabStripControl
-		{
-			get	{	return m_tabStripControl;	}
-		}
-
-		internal protected DockPane(IDockContent content, DockState visibleState, bool show)
-		{
-			InternalConstruct(content, visibleState, false, Rectangle.Empty, null, DockAlignment.Right, 0.5, show);
-		}
-
-        [SuppressMessage("Microsoft.Naming", "CA1720:AvoidTypeNamesInParameters", MessageId = "1#")]
-		internal protected DockPane(IDockContent content, FloatWindow floatWindow, bool show)
-		{
-            if (floatWindow == null)
-                throw new ArgumentNullException("floatWindow");
-
-			InternalConstruct(content, DockState.Float, false, Rectangle.Empty, floatWindow.NestedPanes.GetDefaultPreviousPane(this), DockAlignment.Right, 0.5, show);
-		}
-
-		internal protected DockPane(IDockContent content, DockPane previousPane, DockAlignment alignment, double proportion, bool show)
-		{
-			if (previousPane == null)
-				throw(new ArgumentNullException("previousPane"));
-			InternalConstruct(content, previousPane.DockState, false, Rectangle.Empty, previousPane, alignment, proportion, show);
-		}
-
-        [SuppressMessage("Microsoft.Naming", "CA1720:AvoidTypeNamesInParameters", MessageId = "1#")]
-        internal protected DockPane(IDockContent content, Rectangle floatWindowBounds, bool show)
-		{
-			InternalConstruct(content, DockState.Float, true, floatWindowBounds, null, DockAlignment.Right, 0.5, show);
-		}
-
-		private void InternalConstruct(IDockContent content, DockState dockState, bool flagBounds, Rectangle floatWindowBounds, DockPane prevPane, DockAlignment alignment, double proportion, bool show)
-		{
-			if (dockState == DockState.Hidden || dockState == DockState.Unknown)
-				throw new ArgumentException(Strings.DockPane_SetDockState_InvalidState);
-
-			if (content == null)
-				throw new ArgumentNullException(Strings.DockPane_Constructor_NullContent);
-
-			if (content.DockHandler.DockPanel == null)
-				throw new ArgumentException(Strings.DockPane_Constructor_NullDockPanel);
-
-
-			SuspendLayout();
-			SetStyle(ControlStyles.Selectable, false);
-
-			m_isFloat = (dockState == DockState.Float);
-
-			m_contents = new DockContentCollection();
-			m_displayingContents = new DockContentCollection(this);
-			m_dockPanel = content.DockHandler.DockPanel;
-			m_dockPanel.AddPane(this);
-
-			m_splitter = new SplitterControl(this);
-
-			m_nestedDockingStatus = new NestedDockingStatus(this);
-
-			m_captionControl = DockPanel.DockPaneCaptionFactory.CreateDockPaneCaption(this);
-			m_tabStripControl = DockPanel.DockPaneStripFactory.CreateDockPaneStrip(this);
-			Controls.AddRange(new Control[] {	m_captionControl, m_tabStripControl	});
-			
-			DockPanel.SuspendLayout(true);
-			if (flagBounds)
-				FloatWindow = DockPanel.FloatWindowFactory.CreateFloatWindow(DockPanel, this, floatWindowBounds);
-			else if (prevPane != null)
-				DockTo(prevPane.NestedPanesContainer, prevPane, alignment, proportion);
-
-			SetDockState(dockState);
-			if (show)
-				content.DockHandler.Pane = this;
-			else if (this.IsFloat)
-				content.DockHandler.FloatPane = this;
-			else
-				content.DockHandler.PanelPane = this;
-
-			ResumeLayout();
-			DockPanel.ResumeLayout(true, true);
-		}
-
-		protected override void Dispose(bool disposing)
-		{
-			if (disposing)
-			{
-				m_dockState = DockState.Unknown;
-
-				if (NestedPanesContainer != null)
-					NestedPanesContainer.NestedPanes.Remove(this);
-
-				if (DockPanel != null)
-				{
-					DockPanel.RemovePane(this);
-					m_dockPanel = null;
-				}
-
-				Splitter.Dispose();
-                if (m_autoHidePane != null)
-				    m_autoHidePane.Dispose();
-			}
-			base.Dispose(disposing);
-		}
-
-		private IDockContent m_activeContent = null;
-		public virtual IDockContent ActiveContent
-		{
-			get	{	return m_activeContent;	}
-			set
-			{
-				if (ActiveContent == value)
-					return;
-
-				if (value != null)
-				{
-					if (!DisplayingContents.Contains(value))
-						throw(new InvalidOperationException(Strings.DockPane_ActiveContent_InvalidValue));
-				}
-				else
-				{
-					if (DisplayingContents.Count != 0)
-						throw(new InvalidOperationException(Strings.DockPane_ActiveContent_InvalidValue));
-				}
-
-				IDockContent oldValue = m_activeContent;
-
-				if (DockPanel.ActiveAutoHideContent == oldValue)
-					DockPanel.ActiveAutoHideContent = null;
-
-				m_activeContent = value;
-
-				if (DockPanel.DocumentStyle == DocumentStyle.DockingMdi && DockState == DockState.Document)
-				{
-					if (m_activeContent != null)
-						m_activeContent.DockHandler.Form.BringToFront();
-				}
-				else
-				{
-					if (m_activeContent != null)
-						m_activeContent.DockHandler.SetVisible();
-					if (oldValue != null && DisplayingContents.Contains(oldValue))
-						oldValue.DockHandler.SetVisible();
-                    if (IsActivated && m_activeContent != null)
-                        m_activeContent.DockHandler.Activate();
-				}
-
-				if (FloatWindow != null)
-					FloatWindow.SetText();
-
-                if (DockPanel.DocumentStyle == DocumentStyle.DockingMdi &&
-                    DockState == DockState.Document)
-                    RefreshChanges(false);  // delayed layout to reduce screen flicker
-                else
-                    RefreshChanges();
-
-				if (m_activeContent != null)
-					TabStripControl.EnsureTabVisible(m_activeContent);
-			}
-		}
-		
-		private bool m_allowDockDragAndDrop = true;
-		public virtual bool AllowDockDragAndDrop
-		{
-			get	{	return m_allowDockDragAndDrop;	}
-			set	{	m_allowDockDragAndDrop = value;	}
-		}
-
-        private IDisposable m_autoHidePane = null;
-        internal IDisposable AutoHidePane
-        {
-            get { return m_autoHidePane; }
-            set { m_autoHidePane = value; }
+
+namespace WeifenLuo.WinFormsUI.Docking {
+  [ToolboxItem(false)]
+  public partial class DockPane : UserControl, IDockDragSource {
+    public enum AppearanceStyle {
+      ToolWindow,
+      Document
+    }
+
+    private enum HitTestArea {
+      Caption,
+      TabStrip,
+      Content,
+      None
+    }
+
+    private struct HitTestResult {
+      public HitTestArea HitArea;
+      public int Index;
+
+      public HitTestResult(HitTestArea hitTestArea, int index) {
+        HitArea = hitTestArea;
+        Index = index;
+      }
+    }
+
+    private DockPaneCaptionBase m_captionControl;
+    private DockPaneCaptionBase CaptionControl {
+      get { return m_captionControl; }
+    }
+
+    private DockPaneStripBase m_tabStripControl;
+    internal DockPaneStripBase TabStripControl {
+      get { return m_tabStripControl; }
+    }
+
+    internal protected DockPane(IDockContent content, DockState visibleState, bool show) {
+      InternalConstruct(content, visibleState, false, Rectangle.Empty, null, DockAlignment.Right, 0.5, show);
+    }
+
+    [SuppressMessage("Microsoft.Naming", "CA1720:AvoidTypeNamesInParameters", MessageId = "1#")]
+    internal protected DockPane(IDockContent content, FloatWindow floatWindow, bool show) {
+      if (floatWindow == null)
+        throw new ArgumentNullException("floatWindow");
+
+      InternalConstruct(content, DockState.Float, false, Rectangle.Empty, floatWindow.NestedPanes.GetDefaultPreviousPane(this), DockAlignment.Right, 0.5, show);
+    }
+
+    internal protected DockPane(IDockContent content, DockPane previousPane, DockAlignment alignment, double proportion, bool show) {
+      if (previousPane == null)
+        throw (new ArgumentNullException("previousPane"));
+      InternalConstruct(content, previousPane.DockState, false, Rectangle.Empty, previousPane, alignment, proportion, show);
+    }
+
+    [SuppressMessage("Microsoft.Naming", "CA1720:AvoidTypeNamesInParameters", MessageId = "1#")]
+    internal protected DockPane(IDockContent content, Rectangle floatWindowBounds, bool show) {
+      InternalConstruct(content, DockState.Float, true, floatWindowBounds, null, DockAlignment.Right, 0.5, show);
+    }
+
+    private void InternalConstruct(IDockContent content, DockState dockState, bool flagBounds, Rectangle floatWindowBounds, DockPane prevPane, DockAlignment alignment, double proportion, bool show) {
+      if (dockState == DockState.Hidden || dockState == DockState.Unknown)
+        throw new ArgumentException(Strings.DockPane_SetDockState_InvalidState);
+
+      if (content == null)
+        throw new ArgumentNullException(Strings.DockPane_Constructor_NullContent);
+
+      if (content.DockHandler.DockPanel == null)
+        throw new ArgumentException(Strings.DockPane_Constructor_NullDockPanel);
+
+
+      SuspendLayout();
+      SetStyle(ControlStyles.Selectable, false);
+
+      m_isFloat = (dockState == DockState.Float);
+
+      m_contents = new DockContentCollection();
+      m_displayingContents = new DockContentCollection(this);
+      m_dockPanel = content.DockHandler.DockPanel;
+      m_dockPanel.AddPane(this);
+
+      m_splitter = new SplitterControl(this);
+
+      m_nestedDockingStatus = new NestedDockingStatus(this);
+
+      m_captionControl = DockPanel.DockPaneCaptionFactory.CreateDockPaneCaption(this);
+      m_tabStripControl = DockPanel.DockPaneStripFactory.CreateDockPaneStrip(this);
+      Controls.AddRange(new Control[] { m_captionControl, m_tabStripControl });
+
+      DockPanel.SuspendLayout(true);
+      if (flagBounds)
+        FloatWindow = DockPanel.FloatWindowFactory.CreateFloatWindow(DockPanel, this, floatWindowBounds);
+      else if (prevPane != null)
+        DockTo(prevPane.NestedPanesContainer, prevPane, alignment, proportion);
+
+      SetDockState(dockState);
+      if (show)
+        content.DockHandler.Pane = this;
+      else if (this.IsFloat)
+        content.DockHandler.FloatPane = this;
+      else
+        content.DockHandler.PanelPane = this;
+
+      ResumeLayout();
+      DockPanel.ResumeLayout(true, true);
+    }
+
+    protected override void Dispose(bool disposing) {
+      if (disposing) {
+        m_dockState = DockState.Unknown;
+
+        if (NestedPanesContainer != null)
+          NestedPanesContainer.NestedPanes.Remove(this);
+
+        if (DockPanel != null) {
+          DockPanel.RemovePane(this);
+          m_dockPanel = null;
         }
 
-        private object m_autoHideTabs = null;
-        internal object AutoHideTabs
-        {
-            get { return m_autoHideTabs; }
-            set { m_autoHideTabs = value; }
+        Splitter.Dispose();
+        if (m_autoHidePane != null)
+          m_autoHidePane.Dispose();
+      }
+      base.Dispose(disposing);
+    }
+
+    private IDockContent m_activeContent = null;
+    public virtual IDockContent ActiveContent {
+      get { return m_activeContent; }
+      set {
+        if (ActiveContent == value)
+          return;
+
+        if (value != null) {
+          if (!DisplayingContents.Contains(value))
+            throw (new InvalidOperationException(Strings.DockPane_ActiveContent_InvalidValue));
+        } else {
+          if (DisplayingContents.Count != 0)
+            throw (new InvalidOperationException(Strings.DockPane_ActiveContent_InvalidValue));
         }
 
-        private object TabPageContextMenu
-        {
-            get
-            {
-                IDockContent content = ActiveContent;
-
-                if (content == null)
-                    return null;
-
-                if (content.DockHandler.TabPageContextMenuStrip != null)
-                    return content.DockHandler.TabPageContextMenuStrip;
-                else if (content.DockHandler.TabPageContextMenu != null)
-                    return content.DockHandler.TabPageContextMenu;
-                else
-                    return null;
-            }
+        IDockContent oldValue = m_activeContent;
+
+        if (DockPanel.ActiveAutoHideContent == oldValue)
+          DockPanel.ActiveAutoHideContent = null;
+
+        m_activeContent = value;
+
+        if (DockPanel.DocumentStyle == DocumentStyle.DockingMdi && DockState == DockState.Document) {
+          if (m_activeContent != null)
+            m_activeContent.DockHandler.Form.BringToFront();
+        } else {
+          if (m_activeContent != null)
+            m_activeContent.DockHandler.SetVisible();
+          if (oldValue != null && DisplayingContents.Contains(oldValue))
+            oldValue.DockHandler.SetVisible();
+          if (IsActivated && m_activeContent != null)
+            m_activeContent.DockHandler.Activate();
         }
 
-        internal bool HasTabPageContextMenu
-        {
-            get { return TabPageContextMenu != null; }
+        if (FloatWindow != null)
+          FloatWindow.SetText();
+
+        if (DockPanel.DocumentStyle == DocumentStyle.DockingMdi &&
+            DockState == DockState.Document)
+          RefreshChanges(false);  // delayed layout to reduce screen flicker
+        else
+          RefreshChanges();
+
+        if (m_activeContent != null)
+          TabStripControl.EnsureTabVisible(m_activeContent);
+      }
+    }
+
+    private bool m_allowDockDragAndDrop = true;
+    public virtual bool AllowDockDragAndDrop {
+      get { return m_allowDockDragAndDrop; }
+      set { m_allowDockDragAndDrop = value; }
+    }
+
+    private IDisposable m_autoHidePane = null;
+    internal IDisposable AutoHidePane {
+      get { return m_autoHidePane; }
+      set { m_autoHidePane = value; }
+    }
+
+    private object m_autoHideTabs = null;
+    internal object AutoHideTabs {
+      get { return m_autoHideTabs; }
+      set { m_autoHideTabs = value; }
+    }
+
+    private object TabPageContextMenu {
+      get {
+        IDockContent content = ActiveContent;
+
+        if (content == null)
+          return null;
+
+        if (content.DockHandler.TabPageContextMenuStrip != null)
+          return content.DockHandler.TabPageContextMenuStrip;
+        else if (content.DockHandler.TabPageContextMenu != null)
+          return content.DockHandler.TabPageContextMenu;
+        else
+          return null;
+      }
+    }
+
+    internal bool HasTabPageContextMenu {
+      get { return TabPageContextMenu != null; }
+    }
+
+    internal void ShowTabPageContextMenu(Control control, Point position) {
+      object menu = TabPageContextMenu;
+
+      if (menu == null)
+        return;
+
+      ContextMenuStrip contextMenuStrip = menu as ContextMenuStrip;
+      if (contextMenuStrip != null) {
+        contextMenuStrip.Show(control, position);
+        return;
+      }
+
+      ContextMenu contextMenu = menu as ContextMenu;
+      if (contextMenu != null)
+        contextMenu.Show(this, position);
+    }
+
+    private Rectangle CaptionRectangle {
+      get {
+        if (!HasCaption)
+          return Rectangle.Empty;
+
+        Rectangle rectWindow = DisplayingRectangle;
+        int x, y, width;
+        x = rectWindow.X;
+        y = rectWindow.Y;
+        width = rectWindow.Width;
+        int height = CaptionControl.MeasureHeight();
+
+        return new Rectangle(x, y, width, height);
+      }
+    }
+
+    internal Rectangle ContentRectangle {
+      get {
+        Rectangle rectWindow = DisplayingRectangle;
+        Rectangle rectCaption = CaptionRectangle;
+        Rectangle rectTabStrip = TabStripRectangle;
+
+        int x = rectWindow.X;
+
+        int y = rectWindow.Y + (rectCaption.IsEmpty ? 0 : rectCaption.Height);
+        if (DockState == DockState.Document && DockPanel.DocumentTabStripLocation == DocumentTabStripLocation.Top)
+          y += rectTabStrip.Height;
+
+        int width = rectWindow.Width;
+        int height = rectWindow.Height - rectCaption.Height - rectTabStrip.Height;
+
+        return new Rectangle(x, y, width, height);
+      }
+    }
+
+    internal Rectangle TabStripRectangle {
+      get {
+        if (Appearance == AppearanceStyle.ToolWindow)
+          return TabStripRectangle_ToolWindow;
+        else
+          return TabStripRectangle_Document;
+      }
+    }
+
+    private Rectangle TabStripRectangle_ToolWindow {
+      get {
+        if (DisplayingContents.Count <= 1 || IsAutoHide)
+          return Rectangle.Empty;
+
+        Rectangle rectWindow = DisplayingRectangle;
+
+        int width = rectWindow.Width;
+        int height = TabStripControl.MeasureHeight();
+        int x = rectWindow.X;
+        int y = rectWindow.Bottom - height;
+        Rectangle rectCaption = CaptionRectangle;
+        if (rectCaption.Contains(x, y))
+          y = rectCaption.Y + rectCaption.Height;
+
+        return new Rectangle(x, y, width, height);
+      }
+    }
+
+    private Rectangle TabStripRectangle_Document {
+      get {
+        if (DisplayingContents.Count == 0)
+          return Rectangle.Empty;
+
+        if (DisplayingContents.Count == 1 && DockPanel.DocumentStyle == DocumentStyle.DockingSdi)
+          return Rectangle.Empty;
+
+        Rectangle rectWindow = DisplayingRectangle;
+        int x = rectWindow.X;
+        int width = rectWindow.Width;
+        int height = TabStripControl.MeasureHeight();
+
+        int y = 0;
+        if (DockPanel.DocumentTabStripLocation == DocumentTabStripLocation.Bottom)
+          y = rectWindow.Height - height;
+        else
+          y = rectWindow.Y;
+
+        return new Rectangle(x, y, width, height);
+      }
+    }
+
+    public virtual string CaptionText {
+      get { return ActiveContent == null ? string.Empty : ActiveContent.DockHandler.TabText; }
+    }
+
+    private DockContentCollection m_contents;
+    public DockContentCollection Contents {
+      get { return m_contents; }
+    }
+
+    private DockContentCollection m_displayingContents;
+    public DockContentCollection DisplayingContents {
+      get { return m_displayingContents; }
+    }
+
+    private DockPanel m_dockPanel;
+    public DockPanel DockPanel {
+      get { return m_dockPanel; }
+    }
+
+    private bool HasCaption {
+      get {
+        if (DockState == DockState.Document ||
+          DockState == DockState.Hidden ||
+          DockState == DockState.Unknown ||
+          (DockState == DockState.Float && FloatWindow.VisibleNestedPanes.Count <= 1))
+          return false;
+        else
+          return true;
+      }
+    }
+
+    private bool m_isActivated = false;
+    public bool IsActivated {
+      get { return m_isActivated; }
+    }
+    internal void SetIsActivated(bool value) {
+      if (m_isActivated == value)
+        return;
+
+      m_isActivated = value;
+      if (DockState != DockState.Document)
+        RefreshChanges(false);
+      OnIsActivatedChanged(EventArgs.Empty);
+    }
+
+    private bool m_isActiveDocumentPane = false;
+    public bool IsActiveDocumentPane {
+      get { return m_isActiveDocumentPane; }
+    }
+    internal void SetIsActiveDocumentPane(bool value) {
+      if (m_isActiveDocumentPane == value)
+        return;
+
+      m_isActiveDocumentPane = value;
+      if (DockState == DockState.Document)
+        RefreshChanges();
+      OnIsActiveDocumentPaneChanged(EventArgs.Empty);
+    }
+
+    public bool IsDockStateValid(DockState dockState) {
+      foreach (IDockContent content in Contents)
+        if (!content.DockHandler.IsDockStateValid(dockState))
+          return false;
+
+      return true;
+    }
+
+    public bool IsAutoHide {
+      get { return DockHelper.IsDockStateAutoHide(DockState); }
+    }
+
+    public AppearanceStyle Appearance {
+      get { return (DockState == DockState.Document) ? AppearanceStyle.Document : AppearanceStyle.ToolWindow; }
+    }
+
+    internal Rectangle DisplayingRectangle {
+      get { return ClientRectangle; }
+    }
+
+    public void Activate() {
+      if (DockHelper.IsDockStateAutoHide(DockState) && DockPanel.ActiveAutoHideContent != ActiveContent)
+        DockPanel.ActiveAutoHideContent = ActiveContent;
+      else if (!IsActivated && ActiveContent != null)
+        ActiveContent.DockHandler.Activate();
+    }
+
+    internal void AddContent(IDockContent content) {
+      if (Contents.Contains(content))
+        return;
+
+      Contents.Add(content);
+    }
+
+    internal void Close() {
+      Dispose();
+    }
+
+    public void CloseActiveContent() {
+      CloseContent(ActiveContent);
+    }
+
+    internal void CloseContent(IDockContent content) {
+      DockPanel dockPanel = DockPanel;
+      dockPanel.SuspendLayout(true);
+
+      if (content == null)
+        return;
+
+      if (!content.DockHandler.CloseButton)
+        return;
+
+      if (content.DockHandler.HideOnClose)
+        content.DockHandler.Hide();
+      else
+        content.DockHandler.Close();
+
+      dockPanel.ResumeLayout(true, true);
+    }
+
+    private HitTestResult GetHitTest(Point ptMouse) {
+      Point ptMouseClient = PointToClient(ptMouse);
+
+      Rectangle rectCaption = CaptionRectangle;
+      if (rectCaption.Contains(ptMouseClient))
+        return new HitTestResult(HitTestArea.Caption, -1);
+
+      Rectangle rectContent = ContentRectangle;
+      if (rectContent.Contains(ptMouseClient))
+        return new HitTestResult(HitTestArea.Content, -1);
+
+      Rectangle rectTabStrip = TabStripRectangle;
+      if (rectTabStrip.Contains(ptMouseClient))
+        return new HitTestResult(HitTestArea.TabStrip, TabStripControl.HitTest(TabStripControl.PointToClient(ptMouse)));
+
+      return new HitTestResult(HitTestArea.None, -1);
+    }
+
+    private bool m_isHidden = true;
+    public bool IsHidden {
+      get { return m_isHidden; }
+    }
+    private void SetIsHidden(bool value) {
+      if (m_isHidden == value)
+        return;
+
+      m_isHidden = value;
+      if (DockHelper.IsDockStateAutoHide(DockState)) {
+        DockPanel.RefreshAutoHideStrip();
+        DockPanel.PerformLayout();
+      } else if (NestedPanesContainer != null)
+        ((Control)NestedPanesContainer).PerformLayout();
+    }
+
+    protected override void OnLayout(LayoutEventArgs levent) {
+      SetIsHidden(DisplayingContents.Count == 0);
+      if (!IsHidden) {
+        CaptionControl.Bounds = CaptionRectangle;
+        TabStripControl.Bounds = TabStripRectangle;
+
+        SetContentBounds();
+
+        foreach (IDockContent content in Contents) {
+          if (DisplayingContents.Contains(content))
+            if (content.DockHandler.FlagClipWindow && content.DockHandler.Form.Visible)
+              content.DockHandler.FlagClipWindow = false;
         }
-
-        internal void ShowTabPageContextMenu(Control control, Point position)
-        {
-            object menu = TabPageContextMenu;
-
-            if (menu == null)
-                return;
-
-            ContextMenuStrip contextMenuStrip = menu as ContextMenuStrip;
-            if (contextMenuStrip != null)
-            {
-                contextMenuStrip.Show(control, position);
-                return;
-            }
-
-            ContextMenu contextMenu = menu as ContextMenu;
-            if (contextMenu != null)
-                contextMenu.Show(this, position);
+      }
+
+      base.OnLayout(levent);
+    }
+
+    internal void SetContentBounds() {
+      Rectangle rectContent = ContentRectangle;
+      if (DockState == DockState.Document && DockPanel.DocumentStyle == DocumentStyle.DockingMdi)
+        rectContent = DockPanel.RectangleToMdiClient(RectangleToScreen(rectContent));
+
+      Rectangle rectInactive = new Rectangle(-rectContent.Width, rectContent.Y, rectContent.Width, rectContent.Height);
+      foreach (IDockContent content in Contents)
+        if (content.DockHandler.Pane == this) {
+          if (content == ActiveContent)
+            content.DockHandler.Form.Bounds = rectContent;
+          else
+            content.DockHandler.Form.Bounds = rectInactive;
         }
-
-		private Rectangle CaptionRectangle
-		{
-			get
-			{
-				if (!HasCaption)
-					return Rectangle.Empty;
-
-				Rectangle rectWindow = DisplayingRectangle;
-				int x, y, width;
-				x = rectWindow.X;
-				y = rectWindow.Y;
-				width = rectWindow.Width;
-				int height = CaptionControl.MeasureHeight();
-
-				return new Rectangle(x, y, width, height);
-			}
-		}
-
-		internal Rectangle ContentRectangle
-		{
-			get
-			{
-				Rectangle rectWindow = DisplayingRectangle;
-				Rectangle rectCaption = CaptionRectangle;
-				Rectangle rectTabStrip = TabStripRectangle;
-
-				int x = rectWindow.X;
-
-                int y = rectWindow.Y + (rectCaption.IsEmpty ? 0 : rectCaption.Height);
-                if (DockState == DockState.Document && DockPanel.DocumentTabStripLocation == DocumentTabStripLocation.Top)
-                    y += rectTabStrip.Height;
-                
-				int width = rectWindow.Width;
-				int height = rectWindow.Height - rectCaption.Height - rectTabStrip.Height;
-
-				return new Rectangle(x, y, width, height);
-			}
-		}
-
-		internal Rectangle TabStripRectangle
-		{
-			get
-			{
-				if (Appearance == AppearanceStyle.ToolWindow)
-					return TabStripRectangle_ToolWindow;
-				else
-					return TabStripRectangle_Document;
-			}
-		}
-
-		private Rectangle TabStripRectangle_ToolWindow
-		{
-			get
-			{
-				if (DisplayingContents.Count <= 1 || IsAutoHide)
-					return Rectangle.Empty;
-
-				Rectangle rectWindow = DisplayingRectangle;
-
-				int width = rectWindow.Width;
-				int height = TabStripControl.MeasureHeight();
-				int x = rectWindow.X;
-				int y = rectWindow.Bottom - height;
-				Rectangle rectCaption = CaptionRectangle;
-				if (rectCaption.Contains(x, y))
-					y = rectCaption.Y + rectCaption.Height;
-
-				return new Rectangle(x, y, width, height);
-			}
-		}
-
-		private Rectangle TabStripRectangle_Document
-		{
-			get
-			{
-				if (DisplayingContents.Count == 0)
-					return Rectangle.Empty;
-
-				if (DisplayingContents.Count == 1 && DockPanel.DocumentStyle == DocumentStyle.DockingSdi)
-					return Rectangle.Empty;
-
-				Rectangle rectWindow = DisplayingRectangle;
-				int x = rectWindow.X;
-				int width = rectWindow.Width;
-				int height = TabStripControl.MeasureHeight();
-
-                int y = 0;
-                if (DockPanel.DocumentTabStripLocation == DocumentTabStripLocation.Bottom)
-                    y = rectWindow.Height - height;
-                else
-                    y = rectWindow.Y;
-
-				return new Rectangle(x, y, width, height);
-			}
-		}
-
-		public virtual string CaptionText
-		{
-			get	{	return ActiveContent == null ? string.Empty : ActiveContent.DockHandler.TabText;	}
-		}
-
-		private DockContentCollection m_contents;
-		public DockContentCollection Contents
-		{
-			get	{	return m_contents;	}
-		}
-
-		private DockContentCollection m_displayingContents;
-		public DockContentCollection DisplayingContents
-		{
-			get	{	return m_displayingContents;	}
-		}
-
-		private DockPanel m_dockPanel;
-		public DockPanel DockPanel
-		{
-			get	{	return m_dockPanel;	}
-		}
-
-		private bool HasCaption
-		{
-			get
-			{	
-				if (DockState == DockState.Document ||
-					DockState == DockState.Hidden ||
-					DockState == DockState.Unknown ||
-					(DockState == DockState.Float && FloatWindow.VisibleNestedPanes.Count <= 1))
-					return false;
-				else
-					return true;
-			}
-		}
-
-		private bool m_isActivated = false;
-		public bool IsActivated
-		{
-			get	{	return m_isActivated;	}
-		}
-		internal void SetIsActivated(bool value)
-		{
-			if (m_isActivated == value)
-				return;
-
-			m_isActivated = value;
-			if (DockState != DockState.Document)
-				RefreshChanges(false);
-			OnIsActivatedChanged(EventArgs.Empty);
-		}
-
-		private bool m_isActiveDocumentPane = false;
-		public bool IsActiveDocumentPane
-		{
-			get	{	return m_isActiveDocumentPane;	}
-		}
-		internal void SetIsActiveDocumentPane(bool value)
-		{
-			if (m_isActiveDocumentPane == value)
-				return;
-
-			m_isActiveDocumentPane = value;
-			if (DockState == DockState.Document)
-				RefreshChanges();
-			OnIsActiveDocumentPaneChanged(EventArgs.Empty);
-		}
-
-		public bool IsDockStateValid(DockState dockState)
-		{
-			foreach (IDockContent content in Contents)
-				if (!content.DockHandler.IsDockStateValid(dockState))
-					return false;
-
-			return true;
-		}
-
-		public bool IsAutoHide
-		{
-			get	{	return DockHelper.IsDockStateAutoHide(DockState);	}
-		}
-
-		public AppearanceStyle Appearance
-		{
-			get	{	return (DockState == DockState.Document) ? AppearanceStyle.Document : AppearanceStyle.ToolWindow;	}
-		}
-
-		internal Rectangle DisplayingRectangle
-		{
-			get	{	return ClientRectangle;	}
-		}
-
-		public void Activate()
-		{
-			if (DockHelper.IsDockStateAutoHide(DockState) && DockPanel.ActiveAutoHideContent != ActiveContent)
-				DockPanel.ActiveAutoHideContent = ActiveContent;
-			else if (!IsActivated && ActiveContent != null)
-				ActiveContent.DockHandler.Activate();
-		}
-
-		internal void AddContent(IDockContent content)
-		{
-			if (Contents.Contains(content))
-				return;
-
-			Contents.Add(content);
-		}
-
-		internal void Close()
-		{
-			Dispose();
-		}
-
-		public void CloseActiveContent()
-		{
-			CloseContent(ActiveContent);
-		}
-
-		internal void CloseContent(IDockContent content)
-		{
-            DockPanel dockPanel = DockPanel;
-            dockPanel.SuspendLayout(true);
-
-			if (content == null)
-				return;
-
-			if (!content.DockHandler.CloseButton)
-				return;
-
-			if (content.DockHandler.HideOnClose)
-				content.DockHandler.Hide();
-			else
-				content.DockHandler.Close();
-
-            dockPanel.ResumeLayout(true, true);
+    }
+
+    internal void RefreshChanges() {
+      RefreshChanges(true);
+    }
+
+    private void RefreshChanges(bool performLayout) {
+      if (IsDisposed)
+        return;
+
+      CaptionControl.RefreshChanges();
+      TabStripControl.RefreshChanges();
+      if (DockState == DockState.Float)
+        FloatWindow.RefreshChanges();
+      if (DockHelper.IsDockStateAutoHide(DockState) && DockPanel != null) {
+        DockPanel.RefreshAutoHideStrip();
+        DockPanel.PerformLayout();
+      }
+
+      if (performLayout)
+        PerformLayout();
+    }
+
+    internal void RemoveContent(IDockContent content) {
+      if (!Contents.Contains(content))
+        return;
+
+      Contents.Remove(content);
+    }
+
+    public void SetContentIndex(IDockContent content, int index) {
+      int oldIndex = Contents.IndexOf(content);
+      if (oldIndex == -1)
+        throw (new ArgumentException(Strings.DockPane_SetContentIndex_InvalidContent));
+
+      if (index < 0 || index > Contents.Count - 1)
+        if (index != -1)
+          throw (new ArgumentOutOfRangeException(Strings.DockPane_SetContentIndex_InvalidIndex));
+
+      if (oldIndex == index)
+        return;
+      if (oldIndex == Contents.Count - 1 && index == -1)
+        return;
+
+      Contents.Remove(content);
+      if (index == -1)
+        Contents.Add(content);
+      else if (oldIndex < index)
+        Contents.AddAt(content, index - 1);
+      else
+        Contents.AddAt(content, index);
+
+      RefreshChanges();
+    }
+
+    private void SetParent() {
+      if (DockState == DockState.Unknown || DockState == DockState.Hidden) {
+        SetParent(null);
+        Splitter.Parent = null;
+      } else if (DockState == DockState.Float) {
+        SetParent(FloatWindow);
+        Splitter.Parent = FloatWindow;
+      } else if (DockHelper.IsDockStateAutoHide(DockState)) {
+        SetParent(DockPanel.AutoHideControl);
+        Splitter.Parent = null;
+      } else {
+        SetParent(DockPanel.DockWindows[DockState]);
+        Splitter.Parent = Parent;
+      }
+    }
+
+    private void SetParent(Control value) {
+      if (Parent == value)
+        return;
+
+      //!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
+      // Workaround of .Net Framework bug:
+      // Change the parent of a control with focus may result in the first
+      // MDI child form get activated. 
+      //!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
+      IDockContent contentFocused = GetFocusedContent();
+      if (contentFocused != null)
+        DockPanel.SaveFocus();
+
+      //!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
+
+      Parent = value;
+
+      //!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
+      // Workaround of .Net Framework bug:
+      // Change the parent of a control with focus may result in the first
+      // MDI child form get activated. 
+      //!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
+      if (contentFocused != null)
+        contentFocused.DockHandler.Activate();
+      //!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
+    }
+
+    public new void Show() {
+      Activate();
+    }
+
+    internal void TestDrop(IDockDragSource dragSource, DockOutlineBase dockOutline) {
+      if (!dragSource.CanDockTo(this))
+        return;
+
+      Point ptMouse = Control.MousePosition;
+
+      HitTestResult hitTestResult = GetHitTest(ptMouse);
+      if (hitTestResult.HitArea == HitTestArea.Caption)
+        dockOutline.Show(this, -1);
+      else if (hitTestResult.HitArea == HitTestArea.TabStrip && hitTestResult.Index != -1)
+        dockOutline.Show(this, hitTestResult.Index);
+    }
+
+    internal void ValidateActiveContent() {
+      if (ActiveContent == null) {
+        if (DisplayingContents.Count != 0)
+          ActiveContent = DisplayingContents[0];
+        return;
+      }
+
+      if (DisplayingContents.IndexOf(ActiveContent) >= 0)
+        return;
+
+      IDockContent prevVisible = null;
+      for (int i = Contents.IndexOf(ActiveContent) - 1; i >= 0; i--)
+        if (Contents[i].DockHandler.DockState == DockState) {
+          prevVisible = Contents[i];
+          break;
         }
 
-		private HitTestResult GetHitTest(Point ptMouse)
-		{
-			Point ptMouseClient = PointToClient(ptMouse);
-
-			Rectangle rectCaption = CaptionRectangle;
-			if (rectCaption.Contains(ptMouseClient))
-				return new HitTestResult(HitTestArea.Caption, -1);
-
-			Rectangle rectContent = ContentRectangle;
-			if (rectContent.Contains(ptMouseClient))
-				return new HitTestResult(HitTestArea.Content, -1);
-
-			Rectangle rectTabStrip = TabStripRectangle;
-			if (rectTabStrip.Contains(ptMouseClient))
-				return new HitTestResult(HitTestArea.TabStrip, TabStripControl.HitTest(TabStripControl.PointToClient(ptMouse)));
-
-			return new HitTestResult(HitTestArea.None, -1);
-		}
-
-		private bool m_isHidden = true;
-		public bool IsHidden
-		{
-			get	{	return m_isHidden;	}
-		}
-		private void SetIsHidden(bool value)
-		{
-			if (m_isHidden == value)
-				return;
-
-			m_isHidden = value;
-			if (DockHelper.IsDockStateAutoHide(DockState))
-			{
-				DockPanel.RefreshAutoHideStrip();
-				DockPanel.PerformLayout();
-			}
-			else if (NestedPanesContainer != null)
-				((Control)NestedPanesContainer).PerformLayout();
-		}
-
-		protected override void OnLayout(LayoutEventArgs levent)
-		{
-			SetIsHidden(DisplayingContents.Count == 0);
-			if (!IsHidden)
-			{
-				CaptionControl.Bounds = CaptionRectangle;
-				TabStripControl.Bounds = TabStripRectangle;
-
-				SetContentBounds();
-
-				foreach (IDockContent content in Contents)
-				{
-					if (DisplayingContents.Contains(content))
-						if (content.DockHandler.FlagClipWindow && content.DockHandler.Form.Visible)
-							content.DockHandler.FlagClipWindow = false;
-				}
-			}
-
-			base.OnLayout(levent);
-		}
-
-		internal void SetContentBounds()
-		{
-			Rectangle rectContent = ContentRectangle;
-            if (DockState == DockState.Document && DockPanel.DocumentStyle == DocumentStyle.DockingMdi)
-                rectContent = DockPanel.RectangleToMdiClient(RectangleToScreen(rectContent));
-
-            Rectangle rectInactive = new Rectangle(-rectContent.Width, rectContent.Y, rectContent.Width, rectContent.Height);
-			foreach (IDockContent content in Contents)
-                if (content.DockHandler.Pane == this)
-                {
-                    if (content == ActiveContent)
-                        content.DockHandler.Form.Bounds = rectContent;
-                    else
-                        content.DockHandler.Form.Bounds = rectInactive;
-                }
-		}
-
-		internal void RefreshChanges()
-		{
-            RefreshChanges(true);
-		}
-
-        private void RefreshChanges(bool performLayout)
-        {
-            if (IsDisposed)
-                return;
-
-            CaptionControl.RefreshChanges();
-            TabStripControl.RefreshChanges();
-            if (DockState == DockState.Float)
-                FloatWindow.RefreshChanges();
-            if (DockHelper.IsDockStateAutoHide(DockState) && DockPanel != null)
-            {
-                DockPanel.RefreshAutoHideStrip();
-                DockPanel.PerformLayout();
-            }
-
-            if (performLayout)
-                PerformLayout();
+      IDockContent nextVisible = null;
+      for (int i = Contents.IndexOf(ActiveContent) + 1; i < Contents.Count; i++)
+        if (Contents[i].DockHandler.DockState == DockState) {
+          nextVisible = Contents[i];
+          break;
         }
 
-		internal void RemoveContent(IDockContent content)
-		{
-			if (!Contents.Contains(content))
-				return;
-			
-			Contents.Remove(content);
-		}
-
-		public void SetContentIndex(IDockContent content, int index)
-		{
-			int oldIndex = Contents.IndexOf(content);
-			if (oldIndex == -1)
-				throw(new ArgumentException(Strings.DockPane_SetContentIndex_InvalidContent));
-
-			if (index < 0 || index > Contents.Count - 1)
-				if (index != -1)
-					throw(new ArgumentOutOfRangeException(Strings.DockPane_SetContentIndex_InvalidIndex));
-				
-			if (oldIndex == index)
-				return;
-			if (oldIndex == Contents.Count - 1 && index == -1)
-				return;
-
-			Contents.Remove(content);
-			if (index == -1)
-				Contents.Add(content);
-			else if (oldIndex < index)
-				Contents.AddAt(content, index - 1);
-			else
-				Contents.AddAt(content, index);
-
-			RefreshChanges();
-		}
-
-		private void SetParent()
-		{
-			if (DockState == DockState.Unknown || DockState == DockState.Hidden)
-			{
-				SetParent(null);
-				Splitter.Parent = null;
-			}
-			else if (DockState == DockState.Float)
-			{
-				SetParent(FloatWindow);
-				Splitter.Parent = FloatWindow;
-			}
-			else if (DockHelper.IsDockStateAutoHide(DockState))
-			{
-				SetParent(DockPanel.AutoHideControl);
-				Splitter.Parent = null;
-			}
-			else
-			{
-				SetParent(DockPanel.DockWindows[DockState]);
-				Splitter.Parent = Parent;
-			}
-		}
-
-		private void SetParent(Control value)
-		{
-			if (Parent == value)
-				return;
-
-            //!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
-            // Workaround of .Net Framework bug:
-            // Change the parent of a control with focus may result in the first
-            // MDI child form get activated. 
-            //!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
-            IDockContent contentFocused = GetFocusedContent();
-            if (contentFocused != null)
-                DockPanel.SaveFocus();
-
-            //!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
-
-            Parent = value;
-
-            //!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
-            // Workaround of .Net Framework bug:
-            // Change the parent of a control with focus may result in the first
-            // MDI child form get activated. 
-            //!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
-            if (contentFocused != null)
-                contentFocused.DockHandler.Activate();
-            //!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
+      if (prevVisible != null)
+        ActiveContent = prevVisible;
+      else if (nextVisible != null)
+        ActiveContent = nextVisible;
+      else
+        ActiveContent = null;
+    }
+
+    private static readonly object DockStateChangedEvent = new object();
+    public event EventHandler DockStateChanged {
+      add { Events.AddHandler(DockStateChangedEvent, value); }
+      remove { Events.RemoveHandler(DockStateChangedEvent, value); }
+    }
+    protected virtual void OnDockStateChanged(EventArgs e) {
+      EventHandler handler = (EventHandler)Events[DockStateChangedEvent];
+      if (handler != null)
+        handler(this, e);
+    }
+
+    private static readonly object IsActivatedChangedEvent = new object();
+    public event EventHandler IsActivatedChanged {
+      add { Events.AddHandler(IsActivatedChangedEvent, value); }
+      remove { Events.RemoveHandler(IsActivatedChangedEvent, value); }
+    }
+    protected virtual void OnIsActivatedChanged(EventArgs e) {
+      EventHandler handler = (EventHandler)Events[IsActivatedChangedEvent];
+      if (handler != null)
+        handler(this, e);
+    }
+
+    private static readonly object IsActiveDocumentPaneChangedEvent = new object();
+    public event EventHandler IsActiveDocumentPaneChanged {
+      add { Events.AddHandler(IsActiveDocumentPaneChangedEvent, value); }
+      remove { Events.RemoveHandler(IsActiveDocumentPaneChangedEvent, value); }
+    }
+    protected virtual void OnIsActiveDocumentPaneChanged(EventArgs e) {
+      EventHandler handler = (EventHandler)Events[IsActiveDocumentPaneChangedEvent];
+      if (handler != null)
+        handler(this, e);
+    }
+
+    public DockWindow DockWindow {
+      get { return (m_nestedDockingStatus.NestedPanes == null) ? null : m_nestedDockingStatus.NestedPanes.Container as DockWindow; }
+      set {
+        DockWindow oldValue = DockWindow;
+        if (oldValue == value)
+          return;
+
+        DockTo(value);
+      }
+    }
+
+    public FloatWindow FloatWindow {
+      get { return (m_nestedDockingStatus.NestedPanes == null) ? null : m_nestedDockingStatus.NestedPanes.Container as FloatWindow; }
+      set {
+        FloatWindow oldValue = FloatWindow;
+        if (oldValue == value)
+          return;
+
+        DockTo(value);
+      }
+    }
+
+    private NestedDockingStatus m_nestedDockingStatus;
+    public NestedDockingStatus NestedDockingStatus {
+      get { return m_nestedDockingStatus; }
+    }
+
+    private bool m_isFloat;
+    public bool IsFloat {
+      get { return m_isFloat; }
+    }
+
+    public INestedPanesContainer NestedPanesContainer {
+      get {
+        if (NestedDockingStatus.NestedPanes == null)
+          return null;
+        else
+          return NestedDockingStatus.NestedPanes.Container;
+      }
+    }
+
+    private DockState m_dockState = DockState.Unknown;
+    public DockState DockState {
+      get { return m_dockState; }
+      set {
+        SetDockState(value);
+      }
+    }
+
+    public DockPane SetDockState(DockState value) {
+      if (value == DockState.Unknown || value == DockState.Hidden)
+        throw new InvalidOperationException(Strings.DockPane_SetDockState_InvalidState);
+
+      if ((value == DockState.Float) == this.IsFloat) {
+        InternalSetDockState(value);
+        return this;
+      }
+
+      if (DisplayingContents.Count == 0)
+        return null;
+
+      IDockContent firstContent = null;
+      for (int i = 0; i < DisplayingContents.Count; i++) {
+        IDockContent content = DisplayingContents[i];
+        if (content.DockHandler.IsDockStateValid(value)) {
+          firstContent = content;
+          break;
         }
-
-		public new void Show()
-		{
-			Activate();
-		}
-
-        internal void TestDrop(IDockDragSource dragSource, DockOutlineBase dockOutline)
-        {
-            if (!dragSource.CanDockTo(this))
-                return;
-
-            Point ptMouse = Control.MousePosition;
-
-            HitTestResult hitTestResult = GetHitTest(ptMouse);
-            if (hitTestResult.HitArea == HitTestArea.Caption)
-                dockOutline.Show(this, -1);
-            else if (hitTestResult.HitArea == HitTestArea.TabStrip && hitTestResult.Index != -1)
-                dockOutline.Show(this, hitTestResult.Index);
+      }
+      if (firstContent == null)
+        return null;
+
+      firstContent.DockHandler.DockState = value;
+      DockPane pane = firstContent.DockHandler.Pane;
+      DockPanel.SuspendLayout(true);
+      for (int i = 0; i < DisplayingContents.Count; i++) {
+        IDockContent content = DisplayingContents[i];
+        if (content.DockHandler.IsDockStateValid(value))
+          content.DockHandler.Pane = pane;
+      }
+      DockPanel.ResumeLayout(true, true);
+      return pane;
+    }
+
+    private void InternalSetDockState(DockState value) {
+      if (m_dockState == value)
+        return;
+
+      DockState oldDockState = m_dockState;
+      INestedPanesContainer oldContainer = NestedPanesContainer;
+
+      m_dockState = value;
+
+      SuspendRefreshStateChange();
+
+      IDockContent contentFocused = GetFocusedContent();
+      if (contentFocused != null)
+        DockPanel.SaveFocus();
+
+      if (!IsFloat)
+        DockWindow = DockPanel.DockWindows[DockState];
+      else if (FloatWindow == null)
+        FloatWindow = DockPanel.FloatWindowFactory.CreateFloatWindow(DockPanel, this);
+
+      if (contentFocused != null)
+        DockPanel.ContentFocusManager.Activate(contentFocused);
+
+      ResumeRefreshStateChange(oldContainer, oldDockState);
+    }
+
+    private int m_countRefreshStateChange = 0;
+    private void SuspendRefreshStateChange() {
+      m_countRefreshStateChange++;
+      DockPanel.SuspendLayout(true);
+    }
+
+    private void ResumeRefreshStateChange() {
+      m_countRefreshStateChange--;
+      System.Diagnostics.Debug.Assert(m_countRefreshStateChange >= 0);
+      DockPanel.ResumeLayout(true, true);
+    }
+
+    private bool IsRefreshStateChangeSuspended {
+      get { return m_countRefreshStateChange != 0; }
+    }
+
+    private void ResumeRefreshStateChange(INestedPanesContainer oldContainer, DockState oldDockState) {
+      ResumeRefreshStateChange();
+      RefreshStateChange(oldContainer, oldDockState);
+    }
+
+    private void RefreshStateChange(INestedPanesContainer oldContainer, DockState oldDockState) {
+      lock (this) {
+        if (IsRefreshStateChangeSuspended)
+          return;
+
+        SuspendRefreshStateChange();
+      }
+
+      DockPanel.SuspendLayout(true);
+
+      IDockContent contentFocused = GetFocusedContent();
+      if (contentFocused != null)
+        DockPanel.SaveFocus();
+      SetParent();
+
+      if (ActiveContent != null)
+        ActiveContent.DockHandler.SetDockState(ActiveContent.DockHandler.IsHidden, DockState, ActiveContent.DockHandler.Pane);
+      foreach (IDockContent content in Contents) {
+        if (content.DockHandler.Pane == this)
+          content.DockHandler.SetDockState(content.DockHandler.IsHidden, DockState, content.DockHandler.Pane);
+      }
+
+      if (oldContainer != null) {
+        Control oldContainerControl = (Control)oldContainer;
+        if (oldContainer.DockState == oldDockState && !oldContainerControl.IsDisposed)
+          oldContainerControl.PerformLayout();
+      }
+      if (DockHelper.IsDockStateAutoHide(oldDockState))
+        DockPanel.RefreshActiveAutoHideContent();
+
+      if (NestedPanesContainer.DockState == DockState)
+        ((Control)NestedPanesContainer).PerformLayout();
+      if (DockHelper.IsDockStateAutoHide(DockState))
+        DockPanel.RefreshActiveAutoHideContent();
+
+      if (DockHelper.IsDockStateAutoHide(oldDockState) ||
+        DockHelper.IsDockStateAutoHide(DockState)) {
+        DockPanel.RefreshAutoHideStrip();
+        DockPanel.PerformLayout();
+      }
+
+      ResumeRefreshStateChange();
+
+      if (contentFocused != null)
+        contentFocused.DockHandler.Activate();
+
+      DockPanel.ResumeLayout(true, true);
+
+      if (oldDockState != DockState)
+        OnDockStateChanged(EventArgs.Empty);
+    }
+
+    private IDockContent GetFocusedContent() {
+      IDockContent contentFocused = null;
+      foreach (IDockContent content in Contents) {
+        if (content.DockHandler.Form.ContainsFocus) {
+          contentFocused = content;
+          break;
         }
-
-		internal void ValidateActiveContent()
-		{
-			if (ActiveContent == null)
-			{
-				if (DisplayingContents.Count != 0)
-					ActiveContent = DisplayingContents[0];
-				return;
-			}
-
-			if (DisplayingContents.IndexOf(ActiveContent) >= 0)
-				return;
-
-			IDockContent prevVisible = null;
-			for (int i=Contents.IndexOf(ActiveContent)-1; i>=0; i--)
-				if (Contents[i].DockHandler.DockState == DockState)
-				{
-					prevVisible = Contents[i];
-					break;
-				}
-
-			IDockContent nextVisible = null;
-			for (int i=Contents.IndexOf(ActiveContent)+1; i<Contents.Count; i++)
-				if (Contents[i].DockHandler.DockState == DockState)
-				{
-					nextVisible = Contents[i];
-					break;
-				}
-
-			if (prevVisible != null)
-				ActiveContent = prevVisible;
-			else if (nextVisible != null)
-				ActiveContent = nextVisible;
-			else
-				ActiveContent = null;
-		}
-
-		private static readonly object DockStateChangedEvent = new object();
-		public event EventHandler DockStateChanged
-		{
-			add	{	Events.AddHandler(DockStateChangedEvent, value);	}
-			remove	{	Events.RemoveHandler(DockStateChangedEvent, value);	}
-		}
-		protected virtual void OnDockStateChanged(EventArgs e)
-		{
-			EventHandler handler = (EventHandler)Events[DockStateChangedEvent];
-			if (handler != null)
-				handler(this, e);
-		}
-
-		private static readonly object IsActivatedChangedEvent = new object();
-		public event EventHandler IsActivatedChanged
-		{
-			add	{	Events.AddHandler(IsActivatedChangedEvent, value);	}
-			remove	{	Events.RemoveHandler(IsActivatedChangedEvent, value);	}
-		}
-		protected virtual void OnIsActivatedChanged(EventArgs e)
-		{
-			EventHandler handler = (EventHandler)Events[IsActivatedChangedEvent];
-			if (handler != null)
-				handler(this, e);
-		}
-
-		private static readonly object IsActiveDocumentPaneChangedEvent = new object();
-		public event EventHandler IsActiveDocumentPaneChanged
-		{
-			add	{	Events.AddHandler(IsActiveDocumentPaneChangedEvent, value);	}
-			remove	{	Events.RemoveHandler(IsActiveDocumentPaneChangedEvent, value);	}
-		}
-		protected virtual void OnIsActiveDocumentPaneChanged(EventArgs e)
-		{
-			EventHandler handler = (EventHandler)Events[IsActiveDocumentPaneChangedEvent];
-			if (handler != null)
-				handler(this, e);
-		}
-
-		public DockWindow DockWindow
-		{
-			get	{	return (m_nestedDockingStatus.NestedPanes == null) ? null : m_nestedDockingStatus.NestedPanes.Container as DockWindow;	}
-			set
-			{
-				DockWindow oldValue = DockWindow;
-				if (oldValue == value)
-					return;
-
-				DockTo(value);
-			}
-		}
-
-		public FloatWindow FloatWindow
-		{
-			get	{	return (m_nestedDockingStatus.NestedPanes == null) ? null : m_nestedDockingStatus.NestedPanes.Container as FloatWindow;	}
-			set
-			{
-				FloatWindow oldValue = FloatWindow;
-				if (oldValue == value)
-					return;
-
-				DockTo(value);
-			}
-		}
-
-		private NestedDockingStatus m_nestedDockingStatus;
-		public NestedDockingStatus NestedDockingStatus
-		{
-			get	{	return m_nestedDockingStatus;	}
-		}
-	
-		private bool m_isFloat;
-		public bool IsFloat
-		{
-			get	{	return m_isFloat;	}
-		}
-
-		public INestedPanesContainer NestedPanesContainer
-		{
-			get
-			{
-				if (NestedDockingStatus.NestedPanes == null)
-					return null;
-				else
-					return NestedDockingStatus.NestedPanes.Container;
-			}
-		}
-
-		private DockState m_dockState = DockState.Unknown;
-		public DockState DockState
-		{
-			get	{	return m_dockState;	}
-			set
-			{
-				SetDockState(value);
-			}
-		}
-
-		public DockPane SetDockState(DockState value)
-		{
-			if (value == DockState.Unknown || value == DockState.Hidden)
-				throw new InvalidOperationException(Strings.DockPane_SetDockState_InvalidState);
-
-			if ((value == DockState.Float) == this.IsFloat)
-			{
-				InternalSetDockState(value);
-				return this;
-			}
-
-			if (DisplayingContents.Count == 0)
-				return null;
-
-			IDockContent firstContent = null;
-			for (int i=0; i<DisplayingContents.Count; i++)
-			{
-				IDockContent content = DisplayingContents[i];
-				if (content.DockHandler.IsDockStateValid(value))
-				{
-					firstContent = content;
-					break;
-				}
-			}
-			if (firstContent == null)
-				return null;
-
-			firstContent.DockHandler.DockState = value;
-			DockPane pane = firstContent.DockHandler.Pane;
-			DockPanel.SuspendLayout(true);
-			for (int i=0; i<DisplayingContents.Count; i++)
-			{
-				IDockContent content = DisplayingContents[i];
-				if (content.DockHandler.IsDockStateValid(value))
-					content.DockHandler.Pane = pane;
-			}
-			DockPanel.ResumeLayout(true, true);
-			return pane;
-		}
-
-		private void InternalSetDockState(DockState value)
-		{
-			if (m_dockState == value)
-				return;
-
-			DockState oldDockState = m_dockState;
-			INestedPanesContainer oldContainer = NestedPanesContainer;
-
-			m_dockState = value;
-
-			SuspendRefreshStateChange();
-
-            IDockContent contentFocused = GetFocusedContent();
-            if (contentFocused != null)
-                DockPanel.SaveFocus();
-
-            if (!IsFloat)
-                DockWindow = DockPanel.DockWindows[DockState];
-            else if (FloatWindow == null)
-                FloatWindow = DockPanel.FloatWindowFactory.CreateFloatWindow(DockPanel, this);
-
-            if (contentFocused != null)
-                DockPanel.ContentFocusManager.Activate(contentFocused);
-
-			ResumeRefreshStateChange(oldContainer, oldDockState);
+      }
+
+      return contentFocused;
+    }
+
+    public DockPane DockTo(INestedPanesContainer container) {
+      if (container == null)
+        throw new InvalidOperationException(Strings.DockPane_DockTo_NullContainer);
+
+      DockAlignment alignment;
+      if (container.DockState == DockState.DockLeft || container.DockState == DockState.DockRight)
+        alignment = DockAlignment.Bottom;
+      else
+        alignment = DockAlignment.Right;
+
+      return DockTo(container, container.NestedPanes.GetDefaultPreviousPane(this), alignment, 0.5);
+    }
+
+    public DockPane DockTo(INestedPanesContainer container, DockPane previousPane, DockAlignment alignment, double proportion) {
+      if (container == null)
+        throw new InvalidOperationException(Strings.DockPane_DockTo_NullContainer);
+
+      if (container.IsFloat == this.IsFloat) {
+        InternalAddToDockList(container, previousPane, alignment, proportion);
+        return this;
+      }
+
+      IDockContent firstContent = GetFirstContent(container.DockState);
+      if (firstContent == null)
+        return null;
+
+      DockPane pane;
+      DockPanel.DummyContent.DockPanel = DockPanel;
+      if (container.IsFloat)
+        pane = DockPanel.DockPaneFactory.CreateDockPane(DockPanel.DummyContent, (FloatWindow)container, true);
+      else
+        pane = DockPanel.DockPaneFactory.CreateDockPane(DockPanel.DummyContent, container.DockState, true);
+
+      pane.DockTo(container, previousPane, alignment, proportion);
+      SetVisibleContentsToPane(pane);
+      DockPanel.DummyContent.DockPanel = null;
+
+      return pane;
+    }
+
+    private void SetVisibleContentsToPane(DockPane pane) {
+      SetVisibleContentsToPane(pane, ActiveContent);
+    }
+
+    private void SetVisibleContentsToPane(DockPane pane, IDockContent activeContent) {
+      for (int i = 0; i < DisplayingContents.Count; i++) {
+        IDockContent content = DisplayingContents[i];
+        if (content.DockHandler.IsDockStateValid(pane.DockState)) {
+          content.DockHandler.Pane = pane;
+          i--;
         }
-
-		private int m_countRefreshStateChange = 0;
-		private void SuspendRefreshStateChange()
-		{
-			m_countRefreshStateChange ++;
-			DockPanel.SuspendLayout(true);
-		}
-
-		private void ResumeRefreshStateChange()
-		{
-			m_countRefreshStateChange --;
-			System.Diagnostics.Debug.Assert(m_countRefreshStateChange >= 0);
-			DockPanel.ResumeLayout(true, true);
-		}
-
-		private bool IsRefreshStateChangeSuspended
-		{
-			get	{	return m_countRefreshStateChange != 0;	}
-		}
-
-		private void ResumeRefreshStateChange(INestedPanesContainer oldContainer, DockState oldDockState)
-		{
-			ResumeRefreshStateChange();
-			RefreshStateChange(oldContainer, oldDockState);
-		}
-
-		private void RefreshStateChange(INestedPanesContainer oldContainer, DockState oldDockState)
-		{
-			lock (this)
-			{
-				if (IsRefreshStateChangeSuspended)
-					return;
-
-				SuspendRefreshStateChange();
-			}
-
-            DockPanel.SuspendLayout(true);
-
-            IDockContent contentFocused = GetFocusedContent();
-            if (contentFocused != null)
-                DockPanel.SaveFocus();
-			SetParent();
-
-			if (ActiveContent != null)
-				ActiveContent.DockHandler.SetDockState(ActiveContent.DockHandler.IsHidden, DockState, ActiveContent.DockHandler.Pane);
-			foreach (IDockContent content in Contents)
-			{
-				if (content.DockHandler.Pane == this)
-					content.DockHandler.SetDockState(content.DockHandler.IsHidden, DockState, content.DockHandler.Pane);
-			}
-
-			if (oldContainer != null)
-			{
-                Control oldContainerControl = (Control)oldContainer;
-				if (oldContainer.DockState == oldDockState && !oldContainerControl.IsDisposed)
-					oldContainerControl.PerformLayout();
-			}
-			if (DockHelper.IsDockStateAutoHide(oldDockState))
-				DockPanel.RefreshActiveAutoHideContent();
-
-			if (NestedPanesContainer.DockState == DockState)
-				((Control)NestedPanesContainer).PerformLayout();
-			if (DockHelper.IsDockStateAutoHide(DockState))
-				DockPanel.RefreshActiveAutoHideContent();
-
-			if (DockHelper.IsDockStateAutoHide(oldDockState) ||
-				DockHelper.IsDockStateAutoHide(DockState))
-			{
-				DockPanel.RefreshAutoHideStrip();
-				DockPanel.PerformLayout();
-			}
-
-			ResumeRefreshStateChange();
-
-            if (contentFocused != null)
-                contentFocused.DockHandler.Activate();
-
-            DockPanel.ResumeLayout(true, true);
-
-            if (oldDockState != DockState)
-                OnDockStateChanged(EventArgs.Empty);
-		}
-
-        private IDockContent GetFocusedContent()
-        {
-            IDockContent contentFocused = null;
-            foreach (IDockContent content in Contents)
-            {
-                if (content.DockHandler.Form.ContainsFocus)
-                {
-                    contentFocused = content;
-                    break;
-                }
-            }
-
-            return contentFocused;
+      }
+
+      if (activeContent.DockHandler.Pane == pane)
+        pane.ActiveContent = activeContent;
+    }
+
+    private void InternalAddToDockList(INestedPanesContainer container, DockPane prevPane, DockAlignment alignment, double proportion) {
+      if ((container.DockState == DockState.Float) != IsFloat)
+        throw new InvalidOperationException(Strings.DockPane_DockTo_InvalidContainer);
+
+      int count = container.NestedPanes.Count;
+      if (container.NestedPanes.Contains(this))
+        count--;
+      if (prevPane == null && count > 0)
+        throw new InvalidOperationException(Strings.DockPane_DockTo_NullPrevPane);
+
+      if (prevPane != null && !container.NestedPanes.Contains(prevPane))
+        throw new InvalidOperationException(Strings.DockPane_DockTo_NoPrevPane);
+
+      if (prevPane == this)
+        throw new InvalidOperationException(Strings.DockPane_DockTo_SelfPrevPane);
+
+      INestedPanesContainer oldContainer = NestedPanesContainer;
+      DockState oldDockState = DockState;
+      container.NestedPanes.Add(this);
+      NestedDockingStatus.SetStatus(container.NestedPanes, prevPane, alignment, proportion);
+
+      if (DockHelper.IsDockWindowState(DockState))
+        m_dockState = container.DockState;
+
+      RefreshStateChange(oldContainer, oldDockState);
+    }
+
+    public void SetNestedDockingProportion(double proportion) {
+      NestedDockingStatus.SetStatus(NestedDockingStatus.NestedPanes, NestedDockingStatus.PreviousPane, NestedDockingStatus.Alignment, proportion);
+      if (NestedPanesContainer != null)
+        ((Control)NestedPanesContainer).PerformLayout();
+    }
+
+    public DockPane Float() {
+      DockPanel.SuspendLayout(true);
+
+      IDockContent activeContent = ActiveContent;
+
+      DockPane floatPane = GetFloatPaneFromContents();
+      if (floatPane == null) {
+        IDockContent firstContent = GetFirstContent(DockState.Float);
+        if (firstContent == null) {
+          DockPanel.ResumeLayout(true, true);
+          return null;
         }
-
-		public DockPane DockTo(INestedPanesContainer container)
-		{
-			if (container == null)
-				throw new InvalidOperationException(Strings.DockPane_DockTo_NullContainer);
-
-			DockAlignment alignment;
-			if (container.DockState == DockState.DockLeft || container.DockState == DockState.DockRight)
-				alignment = DockAlignment.Bottom;
-			else
-				alignment = DockAlignment.Right;
-
-			return DockTo(container, container.NestedPanes.GetDefaultPreviousPane(this), alignment, 0.5);
-		}
-
-		public DockPane DockTo(INestedPanesContainer container, DockPane previousPane, DockAlignment alignment, double proportion)
-		{
-			if (container == null)
-				throw new InvalidOperationException(Strings.DockPane_DockTo_NullContainer);
-
-			if (container.IsFloat == this.IsFloat)
-			{
-				InternalAddToDockList(container, previousPane, alignment, proportion);
-				return this;
-			}
-
-			IDockContent firstContent = GetFirstContent(container.DockState);
-			if (firstContent == null)
-				return null;
-
-			DockPane pane;
-			DockPanel.DummyContent.DockPanel = DockPanel;
-			if (container.IsFloat)
-				pane = DockPanel.DockPaneFactory.CreateDockPane(DockPanel.DummyContent, (FloatWindow)container, true);
-			else
-				pane = DockPanel.DockPaneFactory.CreateDockPane(DockPanel.DummyContent, container.DockState, true);
-
-			pane.DockTo(container, previousPane, alignment, proportion);
-			SetVisibleContentsToPane(pane);
-			DockPanel.DummyContent.DockPanel = null;
-
-			return pane;
-		}
-
-		private void SetVisibleContentsToPane(DockPane pane)
-		{
-			SetVisibleContentsToPane(pane, ActiveContent);
-		}
-
-		private void SetVisibleContentsToPane(DockPane pane, IDockContent activeContent)
-		{
-			for (int i=0; i<DisplayingContents.Count; i++)
-			{
-				IDockContent content = DisplayingContents[i];
-				if (content.DockHandler.IsDockStateValid(pane.DockState))
-				{
-					content.DockHandler.Pane = pane;
-					i--;
-				}
-			}
-
-            if (activeContent.DockHandler.Pane == pane)
-			    pane.ActiveContent = activeContent;
-		}
-
-		private void InternalAddToDockList(INestedPanesContainer container, DockPane prevPane, DockAlignment alignment, double proportion)
-		{
-			if ((container.DockState == DockState.Float) != IsFloat)
-				throw new InvalidOperationException(Strings.DockPane_DockTo_InvalidContainer);
-
-			int count = container.NestedPanes.Count;
-			if (container.NestedPanes.Contains(this))
-				count --;
-			if (prevPane == null && count > 0)
-				throw new InvalidOperationException(Strings.DockPane_DockTo_NullPrevPane);
-
-			if (prevPane != null && !container.NestedPanes.Contains(prevPane))
-				throw new InvalidOperationException(Strings.DockPane_DockTo_NoPrevPane);
-
-			if (prevPane == this)
-				throw new InvalidOperationException(Strings.DockPane_DockTo_SelfPrevPane);
-
-			INestedPanesContainer oldContainer = NestedPanesContainer;
-			DockState oldDockState = DockState;
-			container.NestedPanes.Add(this);
-			NestedDockingStatus.SetStatus(container.NestedPanes, prevPane, alignment, proportion);
-
-			if (DockHelper.IsDockWindowState(DockState))
-				m_dockState = container.DockState;
-
-			RefreshStateChange(oldContainer, oldDockState);
-		}
-
-		public void SetNestedDockingProportion(double proportion)
-		{
-			NestedDockingStatus.SetStatus(NestedDockingStatus.NestedPanes, NestedDockingStatus.PreviousPane, NestedDockingStatus.Alignment, proportion);
-			if (NestedPanesContainer != null)
-				((Control)NestedPanesContainer).PerformLayout();
-		}
-
-		public DockPane Float()
-		{
-            DockPanel.SuspendLayout(true);
-
-			IDockContent activeContent = ActiveContent;
-
-			DockPane floatPane = GetFloatPaneFromContents();
-			if (floatPane == null)
-			{
-				IDockContent firstContent = GetFirstContent(DockState.Float);
-                if (firstContent == null)
-                {
-                    DockPanel.ResumeLayout(true, true);
-                    return null;
-                }
-				floatPane = DockPanel.DockPaneFactory.CreateDockPane(firstContent,DockState.Float, true);
-			}
-			SetVisibleContentsToPane(floatPane, activeContent);
-
-            DockPanel.ResumeLayout(true, true);
-			return floatPane;
-		}
-
-		private DockPane GetFloatPaneFromContents()
-		{
-			DockPane floatPane = null;
-			for (int i=0; i<DisplayingContents.Count; i++)
-			{
-				IDockContent content = DisplayingContents[i];
-				if (!content.DockHandler.IsDockStateValid(DockState.Float))
-					continue;
-
-				if (floatPane != null && content.DockHandler.FloatPane != floatPane)
-					return null;
-				else
-					floatPane = content.DockHandler.FloatPane;
-			}
-
-			return floatPane;
-		}
-
-		private IDockContent GetFirstContent(DockState dockState)
-		{
-			for (int i=0; i<DisplayingContents.Count; i++)
-			{
-				IDockContent content = DisplayingContents[i];
-				if (content.DockHandler.IsDockStateValid(dockState))
-					return content;
-			}
-			return null;
-		}
-
-		public void RestoreToPanel()
-		{
-            DockPanel.SuspendLayout(true);
-
-			IDockContent activeContent = DockPanel.ActiveContent;
-
-			for (int i=DisplayingContents.Count-1; i>=0; i--)
-			{
-				IDockContent content = DisplayingContents[i];
-                if (content.DockHandler.CheckDockState(false) != DockState.Unknown)
-				    content.DockHandler.IsFloat = false;
-			}
-
-            DockPanel.ResumeLayout(true, true);
-		}
-
-        [SecurityPermission(SecurityAction.LinkDemand, Flags = SecurityPermissionFlag.UnmanagedCode)]
-        protected override void WndProc(ref Message m)
-        {
-            if (m.Msg == (int)Win32.Msgs.WM_MOUSEACTIVATE)
-                Activate();
-
-            base.WndProc(ref m);
+        floatPane = DockPanel.DockPaneFactory.CreateDockPane(firstContent, DockState.Float, true);
+      }
+      SetVisibleContentsToPane(floatPane, activeContent);
+
+      DockPanel.ResumeLayout(true, true);
+      return floatPane;
+    }
+
+    private DockPane GetFloatPaneFromContents() {
+      DockPane floatPane = null;
+      for (int i = 0; i < DisplayingContents.Count; i++) {
+        IDockContent content = DisplayingContents[i];
+        if (!content.DockHandler.IsDockStateValid(DockState.Float))
+          continue;
+
+        if (floatPane != null && content.DockHandler.FloatPane != floatPane)
+          return null;
+        else
+          floatPane = content.DockHandler.FloatPane;
+      }
+
+      return floatPane;
+    }
+
+    private IDockContent GetFirstContent(DockState dockState) {
+      for (int i = 0; i < DisplayingContents.Count; i++) {
+        IDockContent content = DisplayingContents[i];
+        if (content.DockHandler.IsDockStateValid(dockState))
+          return content;
+      }
+      return null;
+    }
+
+    public void RestoreToPanel() {
+      DockPanel.SuspendLayout(true);
+
+      IDockContent activeContent = DockPanel.ActiveContent;
+
+      for (int i = DisplayingContents.Count - 1; i >= 0; i--) {
+        IDockContent content = DisplayingContents[i];
+        if (content.DockHandler.CheckDockState(false) != DockState.Unknown)
+          content.DockHandler.IsFloat = false;
+      }
+
+      DockPanel.ResumeLayout(true, true);
+    }
+
+    [SecurityPermission(SecurityAction.LinkDemand, Flags = SecurityPermissionFlag.UnmanagedCode)]
+    protected override void WndProc(ref Message m) {
+      if (m.Msg == (int)Win32.Msgs.WM_MOUSEACTIVATE)
+        Activate();
+
+      base.WndProc(ref m);
+    }
+
+    #region IDockDragSource Members
+
+    #region IDragSource Members
+
+    Control IDragSource.DragControl {
+      get { return this; }
+    }
+
+    #endregion
+
+    bool IDockDragSource.IsDockStateValid(DockState dockState) {
+      return IsDockStateValid(dockState);
+    }
+
+    bool IDockDragSource.CanDockTo(DockPane pane) {
+      if (!IsDockStateValid(pane.DockState))
+        return false;
+
+      if (pane == this)
+        return false;
+
+      return true;
+    }
+
+    Rectangle IDockDragSource.BeginDrag(Point ptMouse) {
+      Point location = PointToScreen(new Point(0, 0));
+      Size size;
+
+      DockPane floatPane = ActiveContent.DockHandler.FloatPane;
+      if (DockState == DockState.Float || floatPane == null || floatPane.FloatWindow.NestedPanes.Count != 1)
+        size = DockPanel.DefaultFloatWindowSize;
+      else
+        size = floatPane.FloatWindow.Size;
+
+      if (ptMouse.X > location.X + size.Width)
+        location.X += ptMouse.X - (location.X + size.Width) + Measures.SplitterSize;
+
+      return new Rectangle(location, size);
+    }
+
+    public void FloatAt(Rectangle floatWindowBounds) {
+      if (FloatWindow == null || FloatWindow.NestedPanes.Count != 1)
+        FloatWindow = DockPanel.FloatWindowFactory.CreateFloatWindow(DockPanel, this, floatWindowBounds);
+      else
+        FloatWindow.Bounds = floatWindowBounds;
+
+      DockState = DockState.Float;
+    }
+
+    public void DockTo(DockPane pane, DockStyle dockStyle, int contentIndex) {
+      if (dockStyle == DockStyle.Fill) {
+        IDockContent activeContent = ActiveContent;
+        for (int i = Contents.Count - 1; i >= 0; i--) {
+          IDockContent c = Contents[i];
+          if (c.DockHandler.DockState == DockState) {
+            c.DockHandler.Pane = pane;
+            if (contentIndex != -1)
+              pane.SetContentIndex(c, contentIndex);
+          }
         }
-
-        #region IDockDragSource Members
-
-        #region IDragSource Members
-
-        Control IDragSource.DragControl
-        {
-            get { return this; }
-        }
-
-        #endregion
-
-        bool IDockDragSource.IsDockStateValid(DockState dockState)
-        {
-            return IsDockStateValid(dockState);
-        }
-
-        bool IDockDragSource.CanDockTo(DockPane pane)
-        {
-            if (!IsDockStateValid(pane.DockState))
-                return false;
-
-            if (pane == this)
-                return false;
-
-            return true;
-        }
-
-        Rectangle IDockDragSource.BeginDrag(Point ptMouse)
-        {
-            Point location = PointToScreen(new Point(0, 0));
-            Size size;
-
-            DockPane floatPane = ActiveContent.DockHandler.FloatPane;
-            if (DockState == DockState.Float || floatPane == null || floatPane.FloatWindow.NestedPanes.Count != 1)
-                size = DockPanel.DefaultFloatWindowSize;
-            else
-                size = floatPane.FloatWindow.Size;
-
-            if (ptMouse.X > location.X + size.Width)
-                location.X += ptMouse.X - (location.X + size.Width) + Measures.SplitterSize;
-
-            return new Rectangle(location, size);
-        }
-
-        public void FloatAt(Rectangle floatWindowBounds)
-        {
-            if (FloatWindow == null || FloatWindow.NestedPanes.Count != 1)
-                FloatWindow = DockPanel.FloatWindowFactory.CreateFloatWindow(DockPanel, this, floatWindowBounds);
-            else
-                FloatWindow.Bounds = floatWindowBounds;
-
-            DockState = DockState.Float;
-        }
-
-        public void DockTo(DockPane pane, DockStyle dockStyle, int contentIndex)
-        {
-            if (dockStyle == DockStyle.Fill)
-            {
-                IDockContent activeContent = ActiveContent;
-                for (int i = Contents.Count - 1; i >= 0; i--)
-                {
-                    IDockContent c = Contents[i];
-                    if (c.DockHandler.DockState == DockState)
-                    {
-                        c.DockHandler.Pane = pane;
-                        if (contentIndex != -1)
-                            pane.SetContentIndex(c, contentIndex);
-                    }
-                }
-                pane.ActiveContent = activeContent;
-            }
-            else
-            {
-                if (dockStyle == DockStyle.Left)
-                    DockTo(pane.NestedPanesContainer, pane, DockAlignment.Left, 0.5);
-                else if (dockStyle == DockStyle.Right)
-                    DockTo(pane.NestedPanesContainer, pane, DockAlignment.Right, 0.5);
-                else if (dockStyle == DockStyle.Top)
-                    DockTo(pane.NestedPanesContainer, pane, DockAlignment.Top, 0.5);
-                else if (dockStyle == DockStyle.Bottom)
-                    DockTo(pane.NestedPanesContainer, pane, DockAlignment.Bottom, 0.5);
-
-                DockState = pane.DockState;
-            }
-        }
-
-        public void DockTo(DockPanel panel, DockStyle dockStyle)
-        {
-            if (panel != DockPanel)
-                throw new ArgumentException(Strings.IDockDragSource_DockTo_InvalidPanel, "panel");
-
-            if (dockStyle == DockStyle.Top)
-                DockState = DockState.DockTop;
-            else if (dockStyle == DockStyle.Bottom)
-                DockState = DockState.DockBottom;
-            else if (dockStyle == DockStyle.Left)
-                DockState = DockState.DockLeft;
-            else if (dockStyle == DockStyle.Right)
-                DockState = DockState.DockRight;
-            else if (dockStyle == DockStyle.Fill)
-                DockState = DockState.Document;
-        }
-
-        #endregion
-    }
+        pane.ActiveContent = activeContent;
+      } else {
+        if (dockStyle == DockStyle.Left)
+          DockTo(pane.NestedPanesContainer, pane, DockAlignment.Left, 0.5);
+        else if (dockStyle == DockStyle.Right)
+          DockTo(pane.NestedPanesContainer, pane, DockAlignment.Right, 0.5);
+        else if (dockStyle == DockStyle.Top)
+          DockTo(pane.NestedPanesContainer, pane, DockAlignment.Top, 0.5);
+        else if (dockStyle == DockStyle.Bottom)
+          DockTo(pane.NestedPanesContainer, pane, DockAlignment.Bottom, 0.5);
+
+        DockState = pane.DockState;
+      }
+    }
+
+    public void DockTo(DockPanel panel, DockStyle dockStyle) {
+      if (panel != DockPanel)
+        throw new ArgumentException(Strings.IDockDragSource_DockTo_InvalidPanel, "panel");
+
+      if (dockStyle == DockStyle.Top)
+        DockState = DockState.DockTop;
+      else if (dockStyle == DockStyle.Bottom)
+        DockState = DockState.DockBottom;
+      else if (dockStyle == DockStyle.Left)
+        DockState = DockState.DockLeft;
+      else if (dockStyle == DockStyle.Right)
+        DockState = DockState.DockRight;
+      else if (dockStyle == DockStyle.Fill)
+        DockState = DockState.Document;
+    }
+
+    #endregion
+  }
 }
Index: /trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.WinFormsUI/2.3.1/WinFormsUI-2.3.1/Docking/DockPaneCaptionBase.cs
===================================================================
--- /trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.WinFormsUI/2.3.1/WinFormsUI-2.3.1/Docking/DockPaneCaptionBase.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.WinFormsUI/2.3.1/WinFormsUI-2.3.1/Docking/DockPaneCaptionBase.cs	(revision 4068)
@@ -1,100 +1,83 @@
-using System;
+using System.Drawing;
+using System.Security.Permissions;
 using System.Windows.Forms;
-using System.Drawing;
-using System.Runtime.InteropServices;
-using System.Security.Permissions;
 
-namespace WeifenLuo.WinFormsUI.Docking
-{
-	public abstract class DockPaneCaptionBase : Control
-	{
-		protected internal DockPaneCaptionBase(DockPane pane)
-		{
-			m_dockPane = pane;
+namespace WeifenLuo.WinFormsUI.Docking {
+  public abstract class DockPaneCaptionBase : Control {
+    protected internal DockPaneCaptionBase(DockPane pane) {
+      m_dockPane = pane;
 
-			SetStyle(ControlStyles.OptimizedDoubleBuffer |
+      SetStyle(ControlStyles.OptimizedDoubleBuffer |
                 ControlStyles.ResizeRedraw |
                 ControlStyles.UserPaint |
                 ControlStyles.AllPaintingInWmPaint, true);
-			SetStyle(ControlStyles.Selectable, false);
-		}
+      SetStyle(ControlStyles.Selectable, false);
+    }
 
-		private DockPane m_dockPane;
-		protected DockPane DockPane
-		{
-			get	{	return m_dockPane;	}
-		}
+    private DockPane m_dockPane;
+    protected DockPane DockPane {
+      get { return m_dockPane; }
+    }
 
-		protected DockPane.AppearanceStyle Appearance
-		{
-			get	{	return DockPane.Appearance;	}
-		}
+    protected DockPane.AppearanceStyle Appearance {
+      get { return DockPane.Appearance; }
+    }
 
-        protected bool HasTabPageContextMenu
-        {
-            get { return DockPane.HasTabPageContextMenu; }
+    protected bool HasTabPageContextMenu {
+      get { return DockPane.HasTabPageContextMenu; }
+    }
+
+    protected void ShowTabPageContextMenu(Point position) {
+      DockPane.ShowTabPageContextMenu(this, position);
+    }
+
+    protected override void OnMouseUp(MouseEventArgs e) {
+      base.OnMouseUp(e);
+
+      if (e.Button == MouseButtons.Right)
+        ShowTabPageContextMenu(new Point(e.X, e.Y));
+    }
+
+    protected override void OnMouseDown(MouseEventArgs e) {
+      base.OnMouseDown(e);
+
+      if (e.Button == MouseButtons.Left &&
+    DockPane.DockPanel.AllowEndUserDocking &&
+          DockPane.AllowDockDragAndDrop &&
+  !DockHelper.IsDockStateAutoHide(DockPane.DockState) &&
+          DockPane.ActiveContent != null)
+        DockPane.DockPanel.BeginDrag(DockPane);
+    }
+
+    [SecurityPermission(SecurityAction.LinkDemand, Flags = SecurityPermissionFlag.UnmanagedCode)]
+    protected override void WndProc(ref Message m) {
+      if (m.Msg == (int)Win32.Msgs.WM_LBUTTONDBLCLK) {
+        if (DockHelper.IsDockStateAutoHide(DockPane.DockState)) {
+          DockPane.DockPanel.ActiveAutoHideContent = null;
+          return;
         }
 
-        protected void ShowTabPageContextMenu(Point position)
-        {
-            DockPane.ShowTabPageContextMenu(this, position);
-        }
+        if (DockPane.IsFloat)
+          DockPane.RestoreToPanel();
+        else
+          DockPane.Float();
+      }
+      base.WndProc(ref m);
+    }
 
-        protected override void OnMouseUp(MouseEventArgs e)
-        {
-            base.OnMouseUp(e);
+    internal void RefreshChanges() {
+      if (IsDisposed)
+        return;
 
-            if (e.Button == MouseButtons.Right)
-                ShowTabPageContextMenu(new Point(e.X, e.Y));
-        }
+      OnRefreshChanges();
+    }
 
-        protected override void OnMouseDown(MouseEventArgs e)
-        {
-            base.OnMouseDown(e);
+    protected virtual void OnRightToLeftLayoutChanged() {
+    }
 
-            if (e.Button == MouseButtons.Left &&
-			    DockPane.DockPanel.AllowEndUserDocking &&
-                DockPane.AllowDockDragAndDrop &&
-				!DockHelper.IsDockStateAutoHide(DockPane.DockState) &&
-                DockPane.ActiveContent != null)
-				DockPane.DockPanel.BeginDrag(DockPane);
-        }
+    protected virtual void OnRefreshChanges() {
+    }
 
-        [SecurityPermission(SecurityAction.LinkDemand, Flags = SecurityPermissionFlag.UnmanagedCode)]         
-        protected override void WndProc(ref Message m)
-        {
-            if (m.Msg == (int)Win32.Msgs.WM_LBUTTONDBLCLK)
-            {
-                if (DockHelper.IsDockStateAutoHide(DockPane.DockState))
-                {
-                    DockPane.DockPanel.ActiveAutoHideContent = null;
-                    return;
-                }
-
-                if (DockPane.IsFloat)
-                    DockPane.RestoreToPanel();
-                else
-                    DockPane.Float();
-            }
-            base.WndProc(ref m);
-        }
-
-		internal void RefreshChanges()
-		{
-            if (IsDisposed)
-                return;
-
-			OnRefreshChanges();
-		}
-
-        protected virtual void OnRightToLeftLayoutChanged()
-        {
-        }
-
-		protected virtual void OnRefreshChanges()
-		{
-		}
-
-		protected internal abstract int MeasureHeight();
-	}
+    protected internal abstract int MeasureHeight();
+  }
 }
Index: /trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.WinFormsUI/2.3.1/WinFormsUI-2.3.1/Docking/DockPaneCollection.cs
===================================================================
--- /trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.WinFormsUI/2.3.1/WinFormsUI-2.3.1/Docking/DockPaneCollection.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.WinFormsUI/2.3.1/WinFormsUI-2.3.1/Docking/DockPaneCollection.cs	(revision 4068)
@@ -1,47 +1,37 @@
-using System;
+using System.Collections.Generic;
 using System.Collections.ObjectModel;
-using System.Collections.Generic;
-using System.Drawing;
-using System.Windows.Forms;
 
-namespace WeifenLuo.WinFormsUI.Docking
-{
-	public class DockPaneCollection : ReadOnlyCollection<DockPane>
-	{
-        internal DockPaneCollection()
-            : base(new List<DockPane>())
-        {
-        }
+namespace WeifenLuo.WinFormsUI.Docking {
+  public class DockPaneCollection : ReadOnlyCollection<DockPane> {
+    internal DockPaneCollection()
+      : base(new List<DockPane>()) {
+    }
 
-		internal int Add(DockPane pane)
-		{
-			if (Items.Contains(pane))
-				return Items.IndexOf(pane);
+    internal int Add(DockPane pane) {
+      if (Items.Contains(pane))
+        return Items.IndexOf(pane);
 
-			Items.Add(pane);
-            return Count - 1;
-		}
+      Items.Add(pane);
+      return Count - 1;
+    }
 
-		internal void AddAt(DockPane pane, int index)
-		{
-			if (index < 0 || index > Items.Count - 1)
-				return;
-			
-			if (Contains(pane))
-				return;
+    internal void AddAt(DockPane pane, int index) {
+      if (index < 0 || index > Items.Count - 1)
+        return;
 
-			Items.Insert(index, pane);
-		}
+      if (Contains(pane))
+        return;
 
-		internal void Dispose()
-		{
-			for (int i=Count - 1; i>=0; i--)
-				this[i].Close();
-		}
+      Items.Insert(index, pane);
+    }
 
-		internal void Remove(DockPane pane)
-		{
-			Items.Remove(pane);
-		}
-	}
+    internal void Dispose() {
+      for (int i = Count - 1; i >= 0; i--)
+        this[i].Close();
+    }
+
+    internal void Remove(DockPane pane) {
+      Items.Remove(pane);
+    }
+  }
 }
Index: /trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.WinFormsUI/2.3.1/WinFormsUI-2.3.1/Docking/DockPaneStripBase.cs
===================================================================
--- /trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.WinFormsUI/2.3.1/WinFormsUI-2.3.1/Docking/DockPaneStripBase.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.WinFormsUI/2.3.1/WinFormsUI-2.3.1/Docking/DockPaneStripBase.cs	(revision 4068)
@@ -1,252 +1,211 @@
 using System;
-using System.Windows.Forms;
+using System.Collections;
+using System.Collections.Generic;
+using System.Diagnostics.CodeAnalysis;
 using System.Drawing;
 using System.Drawing.Drawing2D;
-using System.Collections;
-using System.Collections.Generic;
 using System.Security.Permissions;
-using System.Diagnostics.CodeAnalysis;
-
-namespace WeifenLuo.WinFormsUI.Docking
-{
-	public abstract class DockPaneStripBase : Control
-	{
-        [SuppressMessage("Microsoft.Design", "CA1034:NestedTypesShouldNotBeVisible")]        
-        protected internal class Tab : IDisposable
-        {
-            private IDockContent m_content;
-
-            public Tab(IDockContent content)
-            {
-                m_content = content;
-            }
-
-            ~Tab()
-            {
-                Dispose(false);
-            }
-
-            public IDockContent Content
-            {
-                get { return m_content; }
-            }
-
-            public Form ContentForm
-            {
-                get { return m_content as Form; }
-            }
-
-            public void Dispose()
-            {
-                Dispose(true);
-                GC.SuppressFinalize(this);
-            }
-
-            protected virtual void Dispose(bool disposing)
-            {
-            }
+using System.Windows.Forms;
+
+namespace WeifenLuo.WinFormsUI.Docking {
+  public abstract class DockPaneStripBase : Control {
+    [SuppressMessage("Microsoft.Design", "CA1034:NestedTypesShouldNotBeVisible")]
+    protected internal class Tab : IDisposable {
+      private IDockContent m_content;
+
+      public Tab(IDockContent content) {
+        m_content = content;
+      }
+
+      ~Tab() {
+        Dispose(false);
+      }
+
+      public IDockContent Content {
+        get { return m_content; }
+      }
+
+      public Form ContentForm {
+        get { return m_content as Form; }
+      }
+
+      public void Dispose() {
+        Dispose(true);
+        GC.SuppressFinalize(this);
+      }
+
+      protected virtual void Dispose(bool disposing) {
+      }
+    }
+
+    [SuppressMessage("Microsoft.Design", "CA1034:NestedTypesShouldNotBeVisible")]
+    protected sealed class TabCollection : IEnumerable<Tab> {
+      #region IEnumerable Members
+      IEnumerator<Tab> IEnumerable<Tab>.GetEnumerator() {
+        for (int i = 0; i < Count; i++)
+          yield return this[i];
+      }
+
+      IEnumerator IEnumerable.GetEnumerator() {
+        for (int i = 0; i < Count; i++)
+          yield return this[i];
+      }
+      #endregion
+
+      internal TabCollection(DockPane pane) {
+        m_dockPane = pane;
+      }
+
+      private DockPane m_dockPane;
+      public DockPane DockPane {
+        get { return m_dockPane; }
+      }
+
+      public int Count {
+        get { return DockPane.DisplayingContents.Count; }
+      }
+
+      public Tab this[int index] {
+        get {
+          IDockContent content = DockPane.DisplayingContents[index];
+          if (content == null)
+            throw (new ArgumentOutOfRangeException("index"));
+          return content.DockHandler.GetTab(DockPane.TabStripControl);
         }
-
-        [SuppressMessage("Microsoft.Design", "CA1034:NestedTypesShouldNotBeVisible")]        
-        protected sealed class TabCollection : IEnumerable<Tab>
-        {
-            #region IEnumerable Members
-            IEnumerator<Tab> IEnumerable<Tab>.GetEnumerator()
-            {
-                for (int i = 0; i < Count; i++)
-                    yield return this[i];
-            }
-
-            IEnumerator IEnumerable.GetEnumerator()
-            {
-                for (int i = 0; i < Count; i++)
-                    yield return this[i];
-            }
-            #endregion
-
-            internal TabCollection(DockPane pane)
-            {
-                m_dockPane = pane;
-            }
-
-            private DockPane m_dockPane;
-            public DockPane DockPane
-            {
-                get { return m_dockPane; }
-            }
-
-            public int Count
-            {
-                get { return DockPane.DisplayingContents.Count; }
-            }
-
-            public Tab this[int index]
-            {
-                get
-                {
-                    IDockContent content = DockPane.DisplayingContents[index];
-                    if (content == null)
-                        throw (new ArgumentOutOfRangeException("index"));
-                    return content.DockHandler.GetTab(DockPane.TabStripControl);
-                }
-            }
-
-            public bool Contains(Tab tab)
-            {
-                return (IndexOf(tab) != -1);
-            }
-
-            public bool Contains(IDockContent content)
-            {
-                return (IndexOf(content) != -1);
-            }
-
-            public int IndexOf(Tab tab)
-            {
-                if (tab == null)
-                    return -1;
-
-                return DockPane.DisplayingContents.IndexOf(tab.Content);
-            }
-
-            public int IndexOf(IDockContent content)
-            {
-                return DockPane.DisplayingContents.IndexOf(content);
-            }
+      }
+
+      public bool Contains(Tab tab) {
+        return (IndexOf(tab) != -1);
+      }
+
+      public bool Contains(IDockContent content) {
+        return (IndexOf(content) != -1);
+      }
+
+      public int IndexOf(Tab tab) {
+        if (tab == null)
+          return -1;
+
+        return DockPane.DisplayingContents.IndexOf(tab.Content);
+      }
+
+      public int IndexOf(IDockContent content) {
+        return DockPane.DisplayingContents.IndexOf(content);
+      }
+    }
+
+    protected DockPaneStripBase(DockPane pane) {
+      m_dockPane = pane;
+
+      SetStyle(ControlStyles.OptimizedDoubleBuffer, true);
+      SetStyle(ControlStyles.Selectable, false);
+      AllowDrop = true;
+    }
+
+    private DockPane m_dockPane;
+    protected DockPane DockPane {
+      get { return m_dockPane; }
+    }
+
+    protected DockPane.AppearanceStyle Appearance {
+      get { return DockPane.Appearance; }
+    }
+
+    private TabCollection m_tabs = null;
+    protected TabCollection Tabs {
+      get {
+        if (m_tabs == null)
+          m_tabs = new TabCollection(DockPane);
+
+        return m_tabs;
+      }
+    }
+
+    internal void RefreshChanges() {
+      if (IsDisposed)
+        return;
+
+      OnRefreshChanges();
+    }
+
+    protected virtual void OnRefreshChanges() {
+    }
+
+    protected internal abstract int MeasureHeight();
+
+    protected internal abstract void EnsureTabVisible(IDockContent content);
+
+    protected int HitTest() {
+      return HitTest(PointToClient(Control.MousePosition));
+    }
+
+    protected internal abstract int HitTest(Point point);
+
+    protected internal abstract GraphicsPath GetOutline(int index);
+
+    protected internal virtual Tab CreateTab(IDockContent content) {
+      return new Tab(content);
+    }
+
+    protected override void OnMouseDown(MouseEventArgs e) {
+      base.OnMouseDown(e);
+
+      int index = HitTest();
+      if (index != -1) {
+        IDockContent content = Tabs[index].Content;
+        if (DockPane.ActiveContent != content)
+          DockPane.ActiveContent = content;
+      }
+
+      if (e.Button == MouseButtons.Left) {
+        if (DockPane.DockPanel.AllowEndUserDocking && DockPane.AllowDockDragAndDrop && DockPane.ActiveContent.DockHandler.AllowEndUserDocking)
+          DockPane.DockPanel.BeginDrag(DockPane.ActiveContent.DockHandler);
+      }
+    }
+
+    protected bool HasTabPageContextMenu {
+      get { return DockPane.HasTabPageContextMenu; }
+    }
+
+    protected void ShowTabPageContextMenu(Point position) {
+      DockPane.ShowTabPageContextMenu(this, position);
+    }
+
+    protected override void OnMouseUp(MouseEventArgs e) {
+      base.OnMouseUp(e);
+
+      if (e.Button == MouseButtons.Right)
+        ShowTabPageContextMenu(new Point(e.X, e.Y));
+    }
+
+    [SecurityPermission(SecurityAction.LinkDemand, Flags = SecurityPermissionFlag.UnmanagedCode)]
+    protected override void WndProc(ref Message m) {
+      if (m.Msg == (int)Win32.Msgs.WM_LBUTTONDBLCLK) {
+        base.WndProc(ref m);
+
+        int index = HitTest();
+        if (DockPane.DockPanel.AllowEndUserDocking && index != -1) {
+          IDockContent content = Tabs[index].Content;
+          if (content.DockHandler.CheckDockState(!content.DockHandler.IsFloat) != DockState.Unknown)
+            content.DockHandler.IsFloat = !content.DockHandler.IsFloat;
         }
 
-		protected DockPaneStripBase(DockPane pane)
-		{
-			m_dockPane = pane;
-
-			SetStyle(ControlStyles.OptimizedDoubleBuffer, true);
-			SetStyle(ControlStyles.Selectable, false);
-            AllowDrop = true;
-		}
-
-		private DockPane m_dockPane;
-		protected DockPane DockPane
-		{
-			get	{	return m_dockPane;	}
-		}
-
-		protected DockPane.AppearanceStyle Appearance
-		{
-			get	{	return DockPane.Appearance;	}
-		}
-
-        private TabCollection m_tabs = null;
-		protected TabCollection Tabs
-		{
-			get
-            {
-                if (m_tabs == null)
-                    m_tabs = new TabCollection(DockPane);
-
-                return m_tabs;
-            }
-		}
-
-		internal void RefreshChanges()
-		{
-            if (IsDisposed)
-                return;
-
-			OnRefreshChanges();
-		}
-
-		protected virtual void OnRefreshChanges()
-		{
-		}
-
-		protected internal abstract int MeasureHeight();
-
-		protected internal abstract void EnsureTabVisible(IDockContent content);
-
-		protected int HitTest()
-		{
-			return HitTest(PointToClient(Control.MousePosition));
-		}
-
-		protected internal abstract int HitTest(Point point);
-
-		protected internal abstract GraphicsPath GetOutline(int index);
-
-        protected internal virtual Tab CreateTab(IDockContent content)
-        {
-            return new Tab(content);
-        }
-
-        protected override void OnMouseDown(MouseEventArgs e)
-        {
-            base.OnMouseDown(e);
-
-            int index = HitTest();
-            if (index != -1)
-            {
-                IDockContent content = Tabs[index].Content;
-                if (DockPane.ActiveContent != content)
-                    DockPane.ActiveContent = content;
-            }
-
-            if (e.Button == MouseButtons.Left)
-            {
-                if (DockPane.DockPanel.AllowEndUserDocking && DockPane.AllowDockDragAndDrop && DockPane.ActiveContent.DockHandler.AllowEndUserDocking)
-                    DockPane.DockPanel.BeginDrag(DockPane.ActiveContent.DockHandler);
-            }
-        }
-
-        protected bool HasTabPageContextMenu
-        {
-            get { return DockPane.HasTabPageContextMenu; }
-        }
-
-        protected void ShowTabPageContextMenu(Point position)
-        {
-            DockPane.ShowTabPageContextMenu(this, position);
-        }
-
-        protected override void OnMouseUp(MouseEventArgs e)
-        {
-            base.OnMouseUp(e);
-
-            if (e.Button == MouseButtons.Right)
-                ShowTabPageContextMenu(new Point(e.X, e.Y));
-        }
-
-        [SecurityPermission(SecurityAction.LinkDemand, Flags = SecurityPermissionFlag.UnmanagedCode)]
-		protected override void WndProc(ref Message m)
-		{
-			if (m.Msg == (int)Win32.Msgs.WM_LBUTTONDBLCLK)
-			{
-				base.WndProc(ref m);
-
-				int index = HitTest();
-				if (DockPane.DockPanel.AllowEndUserDocking && index != -1)
-				{
-					IDockContent content = Tabs[index].Content;
-                    if (content.DockHandler.CheckDockState(!content.DockHandler.IsFloat) != DockState.Unknown)
-					    content.DockHandler.IsFloat = !content.DockHandler.IsFloat;	
-				}
-
-				return;
-			}
-
-			base.WndProc(ref m);
-			return;
-		}
-
-        protected override void OnDragOver(DragEventArgs drgevent)
-        {
-            base.OnDragOver(drgevent);
-
-            int index = HitTest();
-            if (index != -1)
-            {
-                IDockContent content = Tabs[index].Content;
-                if (DockPane.ActiveContent != content)
-                    DockPane.ActiveContent = content;
-            }
-        }
-	}
+        return;
+      }
+
+      base.WndProc(ref m);
+      return;
+    }
+
+    protected override void OnDragOver(DragEventArgs drgevent) {
+      base.OnDragOver(drgevent);
+
+      int index = HitTest();
+      if (index != -1) {
+        IDockContent content = Tabs[index].Content;
+        if (DockPane.ActiveContent != content)
+          DockPane.ActiveContent = content;
+      }
+    }
+  }
 }
Index: /trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.WinFormsUI/2.3.1/WinFormsUI-2.3.1/Docking/DockPanel.AutoHideWindow.cs
===================================================================
--- /trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.WinFormsUI/2.3.1/WinFormsUI-2.3.1/Docking/DockPanel.AutoHideWindow.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.WinFormsUI/2.3.1/WinFormsUI-2.3.1/Docking/DockPanel.AutoHideWindow.cs	(revision 4068)
@@ -1,612 +1,516 @@
 using System;
+using System.Drawing;
 using System.Windows.Forms;
-using System.Drawing;
-using System.Runtime.InteropServices;
-
-namespace WeifenLuo.WinFormsUI.Docking
-{
-    partial class DockPanel
-    {
-        private class AutoHideWindowControl : Panel, ISplitterDragSource
-        {
-            private class SplitterControl : SplitterBase
-            {
-                public SplitterControl(AutoHideWindowControl autoHideWindow)
-                {
-                    m_autoHideWindow = autoHideWindow;
-                }
-
-                private AutoHideWindowControl m_autoHideWindow;
-                private AutoHideWindowControl AutoHideWindow
-                {
-                    get { return m_autoHideWindow; }
-                }
-
-                protected override int SplitterSize
-                {
-                    get { return Measures.SplitterSize; }
-                }
-
-                protected override void StartDrag()
-                {
-        			AutoHideWindow.DockPanel.BeginDrag(AutoHideWindow, AutoHideWindow.RectangleToScreen(Bounds));
-                }
-            }
-
-            #region consts
-            private const int ANIMATE_TIME = 100;	// in mini-seconds
-            #endregion
-
-            private Timer m_timerMouseTrack;
-            private SplitterControl m_splitter;
-
-            public AutoHideWindowControl(DockPanel dockPanel)
-            {
-                m_dockPanel = dockPanel;
-
-                m_timerMouseTrack = new Timer();
-                m_timerMouseTrack.Tick += new EventHandler(TimerMouseTrack_Tick);
-
-                Visible = false;
-                m_splitter = new SplitterControl(this);
-                Controls.Add(m_splitter);
-            }
-
-            protected override void Dispose(bool disposing)
-            {
-                if (disposing)
-                {
-                    m_timerMouseTrack.Dispose();
-                }
-                base.Dispose(disposing);
-            }
-
-            private DockPanel m_dockPanel = null;
-            public DockPanel DockPanel
-            {
-                get { return m_dockPanel; }
-            }
-
-            private DockPane m_activePane = null;
-            public DockPane ActivePane
-            {
-                get { return m_activePane; }
-            }
-            private void SetActivePane()
-            {
-                DockPane value = (ActiveContent == null ? null : ActiveContent.DockHandler.Pane);
-
-                if (value == m_activePane)
-                    return;
-
-                m_activePane = value;
-            }
-
-            private IDockContent m_activeContent = null;
-            public IDockContent ActiveContent
-            {
-                get { return m_activeContent; }
-                set
-                {
-                    if (value == m_activeContent)
-                        return;
-
-                    if (value != null)
-                    {
-                        if (!DockHelper.IsDockStateAutoHide(value.DockHandler.DockState) || value.DockHandler.DockPanel != DockPanel)
-                            throw (new InvalidOperationException(Strings.DockPanel_ActiveAutoHideContent_InvalidValue));
-                    }
-
-                    DockPanel.SuspendLayout();
-
-                    if (m_activeContent != null)
-                    {
-                        if (m_activeContent.DockHandler.Form.ContainsFocus)
-                            DockPanel.ContentFocusManager.GiveUpFocus(m_activeContent);
-                        AnimateWindow(false);
-                    }
-
-                    m_activeContent = value;
-                    SetActivePane();
-                    if (ActivePane != null)
-                        ActivePane.ActiveContent = m_activeContent;
-
-                    if (m_activeContent != null)
-                        AnimateWindow(true);
-
-                    DockPanel.ResumeLayout();
-                    DockPanel.RefreshAutoHideStrip();
-
-                    SetTimerMouseTrack();
-                }
-            }
-
-            public DockState DockState
-            {
-                get { return ActiveContent == null ? DockState.Unknown : ActiveContent.DockHandler.DockState; }
-            }
-
-            private bool m_flagAnimate = true;
-            private bool FlagAnimate
-            {
-                get { return m_flagAnimate; }
-                set { m_flagAnimate = value; }
-            }
-
-            private bool m_flagDragging = false;
-            internal bool FlagDragging
-            {
-                get { return m_flagDragging; }
-                set
-                {
-                    if (m_flagDragging == value)
-                        return;
-
-                    m_flagDragging = value;
-                    SetTimerMouseTrack();
-                }
-            }
-
-            private void AnimateWindow(bool show)
-            {
-                if (!FlagAnimate && Visible != show)
-                {
-                    Visible = show;
-                    return;
-                }
-
-                Parent.SuspendLayout();
-
-                Rectangle rectSource = GetRectangle(!show);
-                Rectangle rectTarget = GetRectangle(show);
-                int dxLoc, dyLoc;
-                int dWidth, dHeight;
-                dxLoc = dyLoc = dWidth = dHeight = 0;
-                if (DockState == DockState.DockTopAutoHide)
-                    dHeight = show ? 1 : -1;
-                else if (DockState == DockState.DockLeftAutoHide)
-                    dWidth = show ? 1 : -1;
-                else if (DockState == DockState.DockRightAutoHide)
-                {
-                    dxLoc = show ? -1 : 1;
-                    dWidth = show ? 1 : -1;
-                }
-                else if (DockState == DockState.DockBottomAutoHide)
-                {
-                    dyLoc = (show ? -1 : 1);
-                    dHeight = (show ? 1 : -1);
-                }
-
-                if (show)
-                {
-                    Bounds = DockPanel.GetAutoHideWindowBounds(new Rectangle(-rectTarget.Width, -rectTarget.Height, rectTarget.Width, rectTarget.Height));
-                    if (Visible == false)
-                        Visible = true;
-                    PerformLayout();
-                }
-
-                SuspendLayout();
-
-                LayoutAnimateWindow(rectSource);
-                if (Visible == false)
-                    Visible = true;
-
-                int speedFactor = 1;
-                int totalPixels = (rectSource.Width != rectTarget.Width) ?
-                    Math.Abs(rectSource.Width - rectTarget.Width) :
-                    Math.Abs(rectSource.Height - rectTarget.Height);
-                int remainPixels = totalPixels;
-                DateTime startingTime = DateTime.Now;
-                while (rectSource != rectTarget)
-                {
-                    DateTime startPerMove = DateTime.Now;
-
-                    rectSource.X += dxLoc * speedFactor;
-                    rectSource.Y += dyLoc * speedFactor;
-                    rectSource.Width += dWidth * speedFactor;
-                    rectSource.Height += dHeight * speedFactor;
-                    if (Math.Sign(rectTarget.X - rectSource.X) != Math.Sign(dxLoc))
-                        rectSource.X = rectTarget.X;
-                    if (Math.Sign(rectTarget.Y - rectSource.Y) != Math.Sign(dyLoc))
-                        rectSource.Y = rectTarget.Y;
-                    if (Math.Sign(rectTarget.Width - rectSource.Width) != Math.Sign(dWidth))
-                        rectSource.Width = rectTarget.Width;
-                    if (Math.Sign(rectTarget.Height - rectSource.Height) != Math.Sign(dHeight))
-                        rectSource.Height = rectTarget.Height;
-
-                    LayoutAnimateWindow(rectSource);
-                    if (Parent != null)
-                        Parent.Update();
-
-                    remainPixels -= speedFactor;
-
-                    while (true)
-                    {
-                        TimeSpan time = new TimeSpan(0, 0, 0, 0, ANIMATE_TIME);
-                        TimeSpan elapsedPerMove = DateTime.Now - startPerMove;
-                        TimeSpan elapsedTime = DateTime.Now - startingTime;
-                        if (((int)((time - elapsedTime).TotalMilliseconds)) <= 0)
-                        {
-                            speedFactor = remainPixels;
-                            break;
-                        }
-                        else
-                            speedFactor = remainPixels * (int)elapsedPerMove.TotalMilliseconds / (int)((time - elapsedTime).TotalMilliseconds);
-                        if (speedFactor >= 1)
-                            break;
-                    }
-                }
-                ResumeLayout();
-                Parent.ResumeLayout();
-            }
-
-            private void LayoutAnimateWindow(Rectangle rect)
-            {
-                Bounds = DockPanel.GetAutoHideWindowBounds(rect);
-
-                Rectangle rectClient = ClientRectangle;
-
-                if (DockState == DockState.DockLeftAutoHide)
-                    ActivePane.Location = new Point(rectClient.Right - 2 - Measures.SplitterSize - ActivePane.Width, ActivePane.Location.Y);
-                else if (DockState == DockState.DockTopAutoHide)
-                    ActivePane.Location = new Point(ActivePane.Location.X, rectClient.Bottom - 2 - Measures.SplitterSize - ActivePane.Height);
-            }
-
-            private Rectangle GetRectangle(bool show)
-            {
-                if (DockState == DockState.Unknown)
-                    return Rectangle.Empty;
-
-                Rectangle rect = DockPanel.AutoHideWindowRectangle;
-
-                if (show)
-                    return rect;
-
-                if (DockState == DockState.DockLeftAutoHide)
-                    rect.Width = 0;
-                else if (DockState == DockState.DockRightAutoHide)
-                {
-                    rect.X += rect.Width;
-                    rect.Width = 0;
-                }
-                else if (DockState == DockState.DockTopAutoHide)
-                    rect.Height = 0;
-                else
-                {
-                    rect.Y += rect.Height;
-                    rect.Height = 0;
-                }
-
-                return rect;
-            }
-
-            private void SetTimerMouseTrack()
-            {
-                if (ActivePane == null || ActivePane.IsActivated || FlagDragging)
-                {
-                    m_timerMouseTrack.Enabled = false;
-                    return;
-                }
-
-                // start the timer
-                int hovertime = SystemInformation.MouseHoverTime ;
-
-                // assign a default value 400 in case of setting Timer.Interval invalid value exception
-                if (hovertime <= 0)
-                    hovertime = 400;
-
-                m_timerMouseTrack.Interval = 2 * (int)hovertime;
-                m_timerMouseTrack.Enabled = true;
-            }
-
-            protected virtual Rectangle DisplayingRectangle
-            {
-                get
-                {
-                    Rectangle rect = ClientRectangle;
-
-                    // exclude the border and the splitter
-                    if (DockState == DockState.DockBottomAutoHide)
-                    {
-                        rect.Y += 2 + Measures.SplitterSize;
-                        rect.Height -= 2 + Measures.SplitterSize;
-                    }
-                    else if (DockState == DockState.DockRightAutoHide)
-                    {
-                        rect.X += 2 + Measures.SplitterSize;
-                        rect.Width -= 2 + Measures.SplitterSize;
-                    }
-                    else if (DockState == DockState.DockTopAutoHide)
-                        rect.Height -= 2 + Measures.SplitterSize;
-                    else if (DockState == DockState.DockLeftAutoHide)
-                        rect.Width -= 2 + Measures.SplitterSize;
-
-                    return rect;
-                }
-            }
-
-            protected override void OnLayout(LayoutEventArgs levent)
-            {
-                DockPadding.All = 0;
-                if (DockState == DockState.DockLeftAutoHide)
-                {
-                    DockPadding.Right = 2;
-                    m_splitter.Dock = DockStyle.Right;
-                }
-                else if (DockState == DockState.DockRightAutoHide)
-                {
-                    DockPadding.Left = 2;
-                    m_splitter.Dock = DockStyle.Left;
-                }
-                else if (DockState == DockState.DockTopAutoHide)
-                {
-                    DockPadding.Bottom = 2;
-                    m_splitter.Dock = DockStyle.Bottom;
-                }
-                else if (DockState == DockState.DockBottomAutoHide)
-                {
-                    DockPadding.Top = 2;
-                    m_splitter.Dock = DockStyle.Top;
-                }
-
-                Rectangle rectDisplaying = DisplayingRectangle;
-                Rectangle rectHidden = new Rectangle(-rectDisplaying.Width, rectDisplaying.Y, rectDisplaying.Width, rectDisplaying.Height);
-                foreach (Control c in Controls)
-                {
-                    DockPane pane = c as DockPane;
-                    if (pane == null)
-                        continue;
-                    
-                    
-                    if (pane == ActivePane)
-                        pane.Bounds = rectDisplaying;
-                    else
-                        pane.Bounds = rectHidden;
-                }
-
-                base.OnLayout(levent);
-            }
-
-            protected override void OnPaint(PaintEventArgs e)
-            {
-                // Draw the border
-                Graphics g = e.Graphics;
-
-                if (DockState == DockState.DockBottomAutoHide)
-                    g.DrawLine(SystemPens.ControlLightLight, 0, 1, ClientRectangle.Right, 1);
-                else if (DockState == DockState.DockRightAutoHide)
-                    g.DrawLine(SystemPens.ControlLightLight, 1, 0, 1, ClientRectangle.Bottom);
-                else if (DockState == DockState.DockTopAutoHide)
-                {
-                    g.DrawLine(SystemPens.ControlDark, 0, ClientRectangle.Height - 2, ClientRectangle.Right, ClientRectangle.Height - 2);
-                    g.DrawLine(SystemPens.ControlDarkDark, 0, ClientRectangle.Height - 1, ClientRectangle.Right, ClientRectangle.Height - 1);
-                }
-                else if (DockState == DockState.DockLeftAutoHide)
-                {
-                    g.DrawLine(SystemPens.ControlDark, ClientRectangle.Width - 2, 0, ClientRectangle.Width - 2, ClientRectangle.Bottom);
-                    g.DrawLine(SystemPens.ControlDarkDark, ClientRectangle.Width - 1, 0, ClientRectangle.Width - 1, ClientRectangle.Bottom);
-                }
-
-                base.OnPaint(e);
-            }
-
-            public void RefreshActiveContent()
-            {
-                if (ActiveContent == null)
-                    return;
-
-                if (!DockHelper.IsDockStateAutoHide(ActiveContent.DockHandler.DockState))
-                {
-                    FlagAnimate = false;
-                    ActiveContent = null;
-                    FlagAnimate = true;
-                }
-            }
-
-            public void RefreshActivePane()
-            {
-                SetTimerMouseTrack();
-            }
-
-            private void TimerMouseTrack_Tick(object sender, EventArgs e)
-            {
-                if (IsDisposed)
-                    return;
-
-                if (ActivePane == null || ActivePane.IsActivated)
-                {
-                    m_timerMouseTrack.Enabled = false;
-                    return;
-                }
-
-                DockPane pane = ActivePane;
-                Point ptMouseInAutoHideWindow = PointToClient(Control.MousePosition);
-                Point ptMouseInDockPanel = DockPanel.PointToClient(Control.MousePosition);
-
-                Rectangle rectTabStrip = DockPanel.GetTabStripRectangle(pane.DockState);
-
-                if (!ClientRectangle.Contains(ptMouseInAutoHideWindow) && !rectTabStrip.Contains(ptMouseInDockPanel))
-                {
-                    ActiveContent = null;
-                    m_timerMouseTrack.Enabled = false;
-                }
-            }
-
-            #region ISplitterDragSource Members
-
-            void ISplitterDragSource.BeginDrag(Rectangle rectSplitter)
-            {
-                FlagDragging = true;
-            }
-
-            void ISplitterDragSource.EndDrag()
-            {
-                FlagDragging = false;
-            }
-
-            bool ISplitterDragSource.IsVertical
-            {
-                get { return (DockState == DockState.DockLeftAutoHide || DockState == DockState.DockRightAutoHide); }
-            }
-
-            Rectangle ISplitterDragSource.DragLimitBounds
-            {
-                get
-                {
-                    Rectangle rectLimit = DockPanel.DockArea;
-
-                    if ((this as ISplitterDragSource).IsVertical)
-                    {
-                        rectLimit.X += MeasurePane.MinSize;
-                        rectLimit.Width -= 2 * MeasurePane.MinSize;
-                    }
-                    else
-                    {
-                        rectLimit.Y += MeasurePane.MinSize;
-                        rectLimit.Height -= 2 * MeasurePane.MinSize;
-                    }
-
-                    return DockPanel.RectangleToScreen(rectLimit);
-                }
-            }
-
-            void ISplitterDragSource.MoveSplitter(int offset)
-            {
-                Rectangle rectDockArea = DockPanel.DockArea;
-                IDockContent content = ActiveContent;
-                if (DockState == DockState.DockLeftAutoHide && rectDockArea.Width > 0)
-                {
-                    if (content.DockHandler.AutoHidePortion < 1)
-                        content.DockHandler.AutoHidePortion += ((double)offset) / (double)rectDockArea.Width;
-                    else
-                        content.DockHandler.AutoHidePortion = Width + offset;
-                }
-                else if (DockState == DockState.DockRightAutoHide && rectDockArea.Width > 0)
-                {
-                    if (content.DockHandler.AutoHidePortion < 1)
-                        content.DockHandler.AutoHidePortion -= ((double)offset) / (double)rectDockArea.Width;
-                    else
-                        content.DockHandler.AutoHidePortion = Width - offset;
-                }
-                else if (DockState == DockState.DockBottomAutoHide && rectDockArea.Height > 0)
-                {
-                    if (content.DockHandler.AutoHidePortion < 1)
-                        content.DockHandler.AutoHidePortion -= ((double)offset) / (double)rectDockArea.Height;
-                    else
-                        content.DockHandler.AutoHidePortion = Height - offset;
-                }
-                else if (DockState == DockState.DockTopAutoHide && rectDockArea.Height > 0)
-                {
-                    if (content.DockHandler.AutoHidePortion < 1)
-                        content.DockHandler.AutoHidePortion += ((double)offset) / (double)rectDockArea.Height;
-                    else
-                        content.DockHandler.AutoHidePortion = Height + offset;
-                }
-            }
-
-            #region IDragSource Members
-
-            Control IDragSource.DragControl
-            {
-                get { return this; }
-            }
-
-            #endregion
-
-            #endregion
-        }
-
-        private AutoHideWindowControl AutoHideWindow
-        {
-            get { return m_autoHideWindow; }
-        }
-
-        internal Control AutoHideControl
-        {
-            get { return m_autoHideWindow; }
-        }
-
-        internal void RefreshActiveAutoHideContent()
-        {
-            AutoHideWindow.RefreshActiveContent();
-        }
-
-        internal Rectangle AutoHideWindowRectangle
-        {
-            get
-            {
-                DockState state = AutoHideWindow.DockState;
-                Rectangle rectDockArea = DockArea;
-                if (ActiveAutoHideContent == null)
-                    return Rectangle.Empty;
-
-                if (Parent == null)
-                    return Rectangle.Empty;
-
-                Rectangle rect = Rectangle.Empty;
-                double autoHideSize = ActiveAutoHideContent.DockHandler.AutoHidePortion;
-                if (state == DockState.DockLeftAutoHide)
-                {
-                    if (autoHideSize < 1)
-                        autoHideSize = rectDockArea.Width * autoHideSize;
-                    if (autoHideSize > rectDockArea.Width - MeasurePane.MinSize)
-                        autoHideSize = rectDockArea.Width - MeasurePane.MinSize;
-                    rect.X = rectDockArea.X;
-                    rect.Y = rectDockArea.Y;
-                    rect.Width = (int)autoHideSize;
-                    rect.Height = rectDockArea.Height;
-                }
-                else if (state == DockState.DockRightAutoHide)
-                {
-                    if (autoHideSize < 1)
-                        autoHideSize = rectDockArea.Width * autoHideSize;
-                    if (autoHideSize > rectDockArea.Width - MeasurePane.MinSize)
-                        autoHideSize = rectDockArea.Width - MeasurePane.MinSize;
-                    rect.X = rectDockArea.X + rectDockArea.Width - (int)autoHideSize;
-                    rect.Y = rectDockArea.Y;
-                    rect.Width = (int)autoHideSize;
-                    rect.Height = rectDockArea.Height;
-                }
-                else if (state == DockState.DockTopAutoHide)
-                {
-                    if (autoHideSize < 1)
-                        autoHideSize = rectDockArea.Height * autoHideSize;
-                    if (autoHideSize > rectDockArea.Height - MeasurePane.MinSize)
-                        autoHideSize = rectDockArea.Height - MeasurePane.MinSize;
-                    rect.X = rectDockArea.X;
-                    rect.Y = rectDockArea.Y;
-                    rect.Width = rectDockArea.Width;
-                    rect.Height = (int)autoHideSize;
-                }
-                else if (state == DockState.DockBottomAutoHide)
-                {
-                    if (autoHideSize < 1)
-                        autoHideSize = rectDockArea.Height * autoHideSize;
-                    if (autoHideSize > rectDockArea.Height - MeasurePane.MinSize)
-                        autoHideSize = rectDockArea.Height - MeasurePane.MinSize;
-                    rect.X = rectDockArea.X;
-                    rect.Y = rectDockArea.Y + rectDockArea.Height - (int)autoHideSize;
-                    rect.Width = rectDockArea.Width;
-                    rect.Height = (int)autoHideSize;
-                }
-
-                return rect;
-            }
-        }
-
-        internal Rectangle GetAutoHideWindowBounds(Rectangle rectAutoHideWindow)
-        {
-            if (DocumentStyle == DocumentStyle.SystemMdi ||
-                DocumentStyle == DocumentStyle.DockingMdi)
-                return (Parent == null) ? Rectangle.Empty : Parent.RectangleToClient(RectangleToScreen(rectAutoHideWindow));
-            else
-                return rectAutoHideWindow;
-        }
-
-        internal void RefreshAutoHideStrip()
-        {
-            AutoHideStripControl.RefreshChanges();
-        }
-
-    }
+
+namespace WeifenLuo.WinFormsUI.Docking {
+  partial class DockPanel {
+    private class AutoHideWindowControl : Panel, ISplitterDragSource {
+      private class SplitterControl : SplitterBase {
+        public SplitterControl(AutoHideWindowControl autoHideWindow) {
+          m_autoHideWindow = autoHideWindow;
+        }
+
+        private AutoHideWindowControl m_autoHideWindow;
+        private AutoHideWindowControl AutoHideWindow {
+          get { return m_autoHideWindow; }
+        }
+
+        protected override int SplitterSize {
+          get { return Measures.SplitterSize; }
+        }
+
+        protected override void StartDrag() {
+          AutoHideWindow.DockPanel.BeginDrag(AutoHideWindow, AutoHideWindow.RectangleToScreen(Bounds));
+        }
+      }
+
+      #region consts
+      private const int ANIMATE_TIME = 100;	// in mini-seconds
+      #endregion
+
+      private Timer m_timerMouseTrack;
+      private SplitterControl m_splitter;
+
+      public AutoHideWindowControl(DockPanel dockPanel) {
+        m_dockPanel = dockPanel;
+
+        m_timerMouseTrack = new Timer();
+        m_timerMouseTrack.Tick += new EventHandler(TimerMouseTrack_Tick);
+
+        Visible = false;
+        m_splitter = new SplitterControl(this);
+        Controls.Add(m_splitter);
+      }
+
+      protected override void Dispose(bool disposing) {
+        if (disposing) {
+          m_timerMouseTrack.Dispose();
+        }
+        base.Dispose(disposing);
+      }
+
+      private DockPanel m_dockPanel = null;
+      public DockPanel DockPanel {
+        get { return m_dockPanel; }
+      }
+
+      private DockPane m_activePane = null;
+      public DockPane ActivePane {
+        get { return m_activePane; }
+      }
+      private void SetActivePane() {
+        DockPane value = (ActiveContent == null ? null : ActiveContent.DockHandler.Pane);
+
+        if (value == m_activePane)
+          return;
+
+        m_activePane = value;
+      }
+
+      private IDockContent m_activeContent = null;
+      public IDockContent ActiveContent {
+        get { return m_activeContent; }
+        set {
+          if (value == m_activeContent)
+            return;
+
+          if (value != null) {
+            if (!DockHelper.IsDockStateAutoHide(value.DockHandler.DockState) || value.DockHandler.DockPanel != DockPanel)
+              throw (new InvalidOperationException(Strings.DockPanel_ActiveAutoHideContent_InvalidValue));
+          }
+
+          DockPanel.SuspendLayout();
+
+          if (m_activeContent != null) {
+            if (m_activeContent.DockHandler.Form.ContainsFocus)
+              DockPanel.ContentFocusManager.GiveUpFocus(m_activeContent);
+            AnimateWindow(false);
+          }
+
+          m_activeContent = value;
+          SetActivePane();
+          if (ActivePane != null)
+            ActivePane.ActiveContent = m_activeContent;
+
+          if (m_activeContent != null)
+            AnimateWindow(true);
+
+          DockPanel.ResumeLayout();
+          DockPanel.RefreshAutoHideStrip();
+
+          SetTimerMouseTrack();
+        }
+      }
+
+      public DockState DockState {
+        get { return ActiveContent == null ? DockState.Unknown : ActiveContent.DockHandler.DockState; }
+      }
+
+      private bool m_flagAnimate = true;
+      private bool FlagAnimate {
+        get { return m_flagAnimate; }
+        set { m_flagAnimate = value; }
+      }
+
+      private bool m_flagDragging = false;
+      internal bool FlagDragging {
+        get { return m_flagDragging; }
+        set {
+          if (m_flagDragging == value)
+            return;
+
+          m_flagDragging = value;
+          SetTimerMouseTrack();
+        }
+      }
+
+      private void AnimateWindow(bool show) {
+        if (!FlagAnimate && Visible != show) {
+          Visible = show;
+          return;
+        }
+
+        Parent.SuspendLayout();
+
+        Rectangle rectSource = GetRectangle(!show);
+        Rectangle rectTarget = GetRectangle(show);
+        int dxLoc, dyLoc;
+        int dWidth, dHeight;
+        dxLoc = dyLoc = dWidth = dHeight = 0;
+        if (DockState == DockState.DockTopAutoHide)
+          dHeight = show ? 1 : -1;
+        else if (DockState == DockState.DockLeftAutoHide)
+          dWidth = show ? 1 : -1;
+        else if (DockState == DockState.DockRightAutoHide) {
+          dxLoc = show ? -1 : 1;
+          dWidth = show ? 1 : -1;
+        } else if (DockState == DockState.DockBottomAutoHide) {
+          dyLoc = (show ? -1 : 1);
+          dHeight = (show ? 1 : -1);
+        }
+
+        if (show) {
+          Bounds = DockPanel.GetAutoHideWindowBounds(new Rectangle(-rectTarget.Width, -rectTarget.Height, rectTarget.Width, rectTarget.Height));
+          if (Visible == false)
+            Visible = true;
+          PerformLayout();
+        }
+
+        SuspendLayout();
+
+        LayoutAnimateWindow(rectSource);
+        if (Visible == false)
+          Visible = true;
+
+        int speedFactor = 1;
+        int totalPixels = (rectSource.Width != rectTarget.Width) ?
+            Math.Abs(rectSource.Width - rectTarget.Width) :
+            Math.Abs(rectSource.Height - rectTarget.Height);
+        int remainPixels = totalPixels;
+        DateTime startingTime = DateTime.Now;
+        while (rectSource != rectTarget) {
+          DateTime startPerMove = DateTime.Now;
+
+          rectSource.X += dxLoc * speedFactor;
+          rectSource.Y += dyLoc * speedFactor;
+          rectSource.Width += dWidth * speedFactor;
+          rectSource.Height += dHeight * speedFactor;
+          if (Math.Sign(rectTarget.X - rectSource.X) != Math.Sign(dxLoc))
+            rectSource.X = rectTarget.X;
+          if (Math.Sign(rectTarget.Y - rectSource.Y) != Math.Sign(dyLoc))
+            rectSource.Y = rectTarget.Y;
+          if (Math.Sign(rectTarget.Width - rectSource.Width) != Math.Sign(dWidth))
+            rectSource.Width = rectTarget.Width;
+          if (Math.Sign(rectTarget.Height - rectSource.Height) != Math.Sign(dHeight))
+            rectSource.Height = rectTarget.Height;
+
+          LayoutAnimateWindow(rectSource);
+          if (Parent != null)
+            Parent.Update();
+
+          remainPixels -= speedFactor;
+
+          while (true) {
+            TimeSpan time = new TimeSpan(0, 0, 0, 0, ANIMATE_TIME);
+            TimeSpan elapsedPerMove = DateTime.Now - startPerMove;
+            TimeSpan elapsedTime = DateTime.Now - startingTime;
+            if (((int)((time - elapsedTime).TotalMilliseconds)) <= 0) {
+              speedFactor = remainPixels;
+              break;
+            } else
+              speedFactor = remainPixels * (int)elapsedPerMove.TotalMilliseconds / (int)((time - elapsedTime).TotalMilliseconds);
+            if (speedFactor >= 1)
+              break;
+          }
+        }
+        ResumeLayout();
+        Parent.ResumeLayout();
+      }
+
+      private void LayoutAnimateWindow(Rectangle rect) {
+        Bounds = DockPanel.GetAutoHideWindowBounds(rect);
+
+        Rectangle rectClient = ClientRectangle;
+
+        if (DockState == DockState.DockLeftAutoHide)
+          ActivePane.Location = new Point(rectClient.Right - 2 - Measures.SplitterSize - ActivePane.Width, ActivePane.Location.Y);
+        else if (DockState == DockState.DockTopAutoHide)
+          ActivePane.Location = new Point(ActivePane.Location.X, rectClient.Bottom - 2 - Measures.SplitterSize - ActivePane.Height);
+      }
+
+      private Rectangle GetRectangle(bool show) {
+        if (DockState == DockState.Unknown)
+          return Rectangle.Empty;
+
+        Rectangle rect = DockPanel.AutoHideWindowRectangle;
+
+        if (show)
+          return rect;
+
+        if (DockState == DockState.DockLeftAutoHide)
+          rect.Width = 0;
+        else if (DockState == DockState.DockRightAutoHide) {
+          rect.X += rect.Width;
+          rect.Width = 0;
+        } else if (DockState == DockState.DockTopAutoHide)
+          rect.Height = 0;
+        else {
+          rect.Y += rect.Height;
+          rect.Height = 0;
+        }
+
+        return rect;
+      }
+
+      private void SetTimerMouseTrack() {
+        if (ActivePane == null || ActivePane.IsActivated || FlagDragging) {
+          m_timerMouseTrack.Enabled = false;
+          return;
+        }
+
+        // start the timer
+        int hovertime = SystemInformation.MouseHoverTime;
+
+        // assign a default value 400 in case of setting Timer.Interval invalid value exception
+        if (hovertime <= 0)
+          hovertime = 400;
+
+        m_timerMouseTrack.Interval = 2 * (int)hovertime;
+        m_timerMouseTrack.Enabled = true;
+      }
+
+      protected virtual Rectangle DisplayingRectangle {
+        get {
+          Rectangle rect = ClientRectangle;
+
+          // exclude the border and the splitter
+          if (DockState == DockState.DockBottomAutoHide) {
+            rect.Y += 2 + Measures.SplitterSize;
+            rect.Height -= 2 + Measures.SplitterSize;
+          } else if (DockState == DockState.DockRightAutoHide) {
+            rect.X += 2 + Measures.SplitterSize;
+            rect.Width -= 2 + Measures.SplitterSize;
+          } else if (DockState == DockState.DockTopAutoHide)
+            rect.Height -= 2 + Measures.SplitterSize;
+          else if (DockState == DockState.DockLeftAutoHide)
+            rect.Width -= 2 + Measures.SplitterSize;
+
+          return rect;
+        }
+      }
+
+      protected override void OnLayout(LayoutEventArgs levent) {
+        DockPadding.All = 0;
+        if (DockState == DockState.DockLeftAutoHide) {
+          DockPadding.Right = 2;
+          m_splitter.Dock = DockStyle.Right;
+        } else if (DockState == DockState.DockRightAutoHide) {
+          DockPadding.Left = 2;
+          m_splitter.Dock = DockStyle.Left;
+        } else if (DockState == DockState.DockTopAutoHide) {
+          DockPadding.Bottom = 2;
+          m_splitter.Dock = DockStyle.Bottom;
+        } else if (DockState == DockState.DockBottomAutoHide) {
+          DockPadding.Top = 2;
+          m_splitter.Dock = DockStyle.Top;
+        }
+
+        Rectangle rectDisplaying = DisplayingRectangle;
+        Rectangle rectHidden = new Rectangle(-rectDisplaying.Width, rectDisplaying.Y, rectDisplaying.Width, rectDisplaying.Height);
+        foreach (Control c in Controls) {
+          DockPane pane = c as DockPane;
+          if (pane == null)
+            continue;
+
+
+          if (pane == ActivePane)
+            pane.Bounds = rectDisplaying;
+          else
+            pane.Bounds = rectHidden;
+        }
+
+        base.OnLayout(levent);
+      }
+
+      protected override void OnPaint(PaintEventArgs e) {
+        // Draw the border
+        Graphics g = e.Graphics;
+
+        if (DockState == DockState.DockBottomAutoHide)
+          g.DrawLine(SystemPens.ControlLightLight, 0, 1, ClientRectangle.Right, 1);
+        else if (DockState == DockState.DockRightAutoHide)
+          g.DrawLine(SystemPens.ControlLightLight, 1, 0, 1, ClientRectangle.Bottom);
+        else if (DockState == DockState.DockTopAutoHide) {
+          g.DrawLine(SystemPens.ControlDark, 0, ClientRectangle.Height - 2, ClientRectangle.Right, ClientRectangle.Height - 2);
+          g.DrawLine(SystemPens.ControlDarkDark, 0, ClientRectangle.Height - 1, ClientRectangle.Right, ClientRectangle.Height - 1);
+        } else if (DockState == DockState.DockLeftAutoHide) {
+          g.DrawLine(SystemPens.ControlDark, ClientRectangle.Width - 2, 0, ClientRectangle.Width - 2, ClientRectangle.Bottom);
+          g.DrawLine(SystemPens.ControlDarkDark, ClientRectangle.Width - 1, 0, ClientRectangle.Width - 1, ClientRectangle.Bottom);
+        }
+
+        base.OnPaint(e);
+      }
+
+      public void RefreshActiveContent() {
+        if (ActiveContent == null)
+          return;
+
+        if (!DockHelper.IsDockStateAutoHide(ActiveContent.DockHandler.DockState)) {
+          FlagAnimate = false;
+          ActiveContent = null;
+          FlagAnimate = true;
+        }
+      }
+
+      public void RefreshActivePane() {
+        SetTimerMouseTrack();
+      }
+
+      private void TimerMouseTrack_Tick(object sender, EventArgs e) {
+        if (IsDisposed)
+          return;
+
+        if (ActivePane == null || ActivePane.IsActivated) {
+          m_timerMouseTrack.Enabled = false;
+          return;
+        }
+
+        DockPane pane = ActivePane;
+        Point ptMouseInAutoHideWindow = PointToClient(Control.MousePosition);
+        Point ptMouseInDockPanel = DockPanel.PointToClient(Control.MousePosition);
+
+        Rectangle rectTabStrip = DockPanel.GetTabStripRectangle(pane.DockState);
+
+        if (!ClientRectangle.Contains(ptMouseInAutoHideWindow) && !rectTabStrip.Contains(ptMouseInDockPanel)) {
+          ActiveContent = null;
+          m_timerMouseTrack.Enabled = false;
+        }
+      }
+
+      #region ISplitterDragSource Members
+
+      void ISplitterDragSource.BeginDrag(Rectangle rectSplitter) {
+        FlagDragging = true;
+      }
+
+      void ISplitterDragSource.EndDrag() {
+        FlagDragging = false;
+      }
+
+      bool ISplitterDragSource.IsVertical {
+        get { return (DockState == DockState.DockLeftAutoHide || DockState == DockState.DockRightAutoHide); }
+      }
+
+      Rectangle ISplitterDragSource.DragLimitBounds {
+        get {
+          Rectangle rectLimit = DockPanel.DockArea;
+
+          if ((this as ISplitterDragSource).IsVertical) {
+            rectLimit.X += MeasurePane.MinSize;
+            rectLimit.Width -= 2 * MeasurePane.MinSize;
+          } else {
+            rectLimit.Y += MeasurePane.MinSize;
+            rectLimit.Height -= 2 * MeasurePane.MinSize;
+          }
+
+          return DockPanel.RectangleToScreen(rectLimit);
+        }
+      }
+
+      void ISplitterDragSource.MoveSplitter(int offset) {
+        Rectangle rectDockArea = DockPanel.DockArea;
+        IDockContent content = ActiveContent;
+        if (DockState == DockState.DockLeftAutoHide && rectDockArea.Width > 0) {
+          if (content.DockHandler.AutoHidePortion < 1)
+            content.DockHandler.AutoHidePortion += ((double)offset) / (double)rectDockArea.Width;
+          else
+            content.DockHandler.AutoHidePortion = Width + offset;
+        } else if (DockState == DockState.DockRightAutoHide && rectDockArea.Width > 0) {
+          if (content.DockHandler.AutoHidePortion < 1)
+            content.DockHandler.AutoHidePortion -= ((double)offset) / (double)rectDockArea.Width;
+          else
+            content.DockHandler.AutoHidePortion = Width - offset;
+        } else if (DockState == DockState.DockBottomAutoHide && rectDockArea.Height > 0) {
+          if (content.DockHandler.AutoHidePortion < 1)
+            content.DockHandler.AutoHidePortion -= ((double)offset) / (double)rectDockArea.Height;
+          else
+            content.DockHandler.AutoHidePortion = Height - offset;
+        } else if (DockState == DockState.DockTopAutoHide && rectDockArea.Height > 0) {
+          if (content.DockHandler.AutoHidePortion < 1)
+            content.DockHandler.AutoHidePortion += ((double)offset) / (double)rectDockArea.Height;
+          else
+            content.DockHandler.AutoHidePortion = Height + offset;
+        }
+      }
+
+      #region IDragSource Members
+
+      Control IDragSource.DragControl {
+        get { return this; }
+      }
+
+      #endregion
+
+      #endregion
+    }
+
+    private AutoHideWindowControl AutoHideWindow {
+      get { return m_autoHideWindow; }
+    }
+
+    internal Control AutoHideControl {
+      get { return m_autoHideWindow; }
+    }
+
+    internal void RefreshActiveAutoHideContent() {
+      AutoHideWindow.RefreshActiveContent();
+    }
+
+    internal Rectangle AutoHideWindowRectangle {
+      get {
+        DockState state = AutoHideWindow.DockState;
+        Rectangle rectDockArea = DockArea;
+        if (ActiveAutoHideContent == null)
+          return Rectangle.Empty;
+
+        if (Parent == null)
+          return Rectangle.Empty;
+
+        Rectangle rect = Rectangle.Empty;
+        double autoHideSize = ActiveAutoHideContent.DockHandler.AutoHidePortion;
+        if (state == DockState.DockLeftAutoHide) {
+          if (autoHideSize < 1)
+            autoHideSize = rectDockArea.Width * autoHideSize;
+          if (autoHideSize > rectDockArea.Width - MeasurePane.MinSize)
+            autoHideSize = rectDockArea.Width - MeasurePane.MinSize;
+          rect.X = rectDockArea.X;
+          rect.Y = rectDockArea.Y;
+          rect.Width = (int)autoHideSize;
+          rect.Height = rectDockArea.Height;
+        } else if (state == DockState.DockRightAutoHide) {
+          if (autoHideSize < 1)
+            autoHideSize = rectDockArea.Width * autoHideSize;
+          if (autoHideSize > rectDockArea.Width - MeasurePane.MinSize)
+            autoHideSize = rectDockArea.Width - MeasurePane.MinSize;
+          rect.X = rectDockArea.X + rectDockArea.Width - (int)autoHideSize;
+          rect.Y = rectDockArea.Y;
+          rect.Width = (int)autoHideSize;
+          rect.Height = rectDockArea.Height;
+        } else if (state == DockState.DockTopAutoHide) {
+          if (autoHideSize < 1)
+            autoHideSize = rectDockArea.Height * autoHideSize;
+          if (autoHideSize > rectDockArea.Height - MeasurePane.MinSize)
+            autoHideSize = rectDockArea.Height - MeasurePane.MinSize;
+          rect.X = rectDockArea.X;
+          rect.Y = rectDockArea.Y;
+          rect.Width = rectDockArea.Width;
+          rect.Height = (int)autoHideSize;
+        } else if (state == DockState.DockBottomAutoHide) {
+          if (autoHideSize < 1)
+            autoHideSize = rectDockArea.Height * autoHideSize;
+          if (autoHideSize > rectDockArea.Height - MeasurePane.MinSize)
+            autoHideSize = rectDockArea.Height - MeasurePane.MinSize;
+          rect.X = rectDockArea.X;
+          rect.Y = rectDockArea.Y + rectDockArea.Height - (int)autoHideSize;
+          rect.Width = rectDockArea.Width;
+          rect.Height = (int)autoHideSize;
+        }
+
+        return rect;
+      }
+    }
+
+    internal Rectangle GetAutoHideWindowBounds(Rectangle rectAutoHideWindow) {
+      if (DocumentStyle == DocumentStyle.SystemMdi ||
+          DocumentStyle == DocumentStyle.DockingMdi)
+        return (Parent == null) ? Rectangle.Empty : Parent.RectangleToClient(RectangleToScreen(rectAutoHideWindow));
+      else
+        return rectAutoHideWindow;
+    }
+
+    internal void RefreshAutoHideStrip() {
+      AutoHideStripControl.RefreshChanges();
+    }
+
+  }
 }
Index: /trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.WinFormsUI/2.3.1/WinFormsUI-2.3.1/Docking/DockPanel.DockDragHandler.cs
===================================================================
--- /trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.WinFormsUI/2.3.1/WinFormsUI-2.3.1/Docking/DockPanel.DockDragHandler.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.WinFormsUI/2.3.1/WinFormsUI-2.3.1/Docking/DockPanel.DockDragHandler.cs	(revision 4068)
@@ -1,166 +1,140 @@
-using System;
-using System.Collections.Generic;
-using System.Text;
-using System.Windows.Forms;
+using System.ComponentModel;
 using System.Drawing;
 using System.Drawing.Drawing2D;
-using System.ComponentModel;
-
-namespace WeifenLuo.WinFormsUI.Docking
-{
-    partial class DockPanel
-    {
-        private sealed class DockDragHandler : DragHandler
-        {
-            private class DockIndicator : DragForm
-            {
-                #region IHitTest
-                private interface IHitTest
-                {
-                    DockStyle HitTest(Point pt);
-                    DockStyle Status { get;	set;	}
-                }
-                #endregion
-
-                #region PanelIndicator
-                private class PanelIndicator : PictureBox, IHitTest
-                {
-                    private static Image _imagePanelLeft = Resources.DockIndicator_PanelLeft;
-                    private static Image _imagePanelRight = Resources.DockIndicator_PanelRight;
-                    private static Image _imagePanelTop = Resources.DockIndicator_PanelTop;
-                    private static Image _imagePanelBottom = Resources.DockIndicator_PanelBottom;
-                    private static Image _imagePanelFill = Resources.DockIndicator_PanelFill;
-                    private static Image _imagePanelLeftActive = Resources.DockIndicator_PanelLeft_Active;
-                    private static Image _imagePanelRightActive = Resources.DockIndicator_PanelRight_Active;
-                    private static Image _imagePanelTopActive = Resources.DockIndicator_PanelTop_Active;
-                    private static Image _imagePanelBottomActive = Resources.DockIndicator_PanelBottom_Active;
-                    private static Image _imagePanelFillActive = Resources.DockIndicator_PanelFill_Active;
-
-                    public PanelIndicator(DockStyle dockStyle)
-                    {
-                        m_dockStyle = dockStyle;
-                        SizeMode = PictureBoxSizeMode.AutoSize;
-                        Image = ImageInactive;
-                    }
-
-                    private DockStyle m_dockStyle;
-                    private DockStyle DockStyle
-                    {
-                        get { return m_dockStyle; }
-                    }
-
-                    private DockStyle m_status;
-                    public DockStyle Status
-                    {
-                        get { return m_status; }
-                        set
-                        {
-                            if (value != DockStyle && value != DockStyle.None)
-                                throw new InvalidEnumArgumentException();
-
-                            if (m_status == value)
-                                return;
-
-                            m_status = value;
-                            IsActivated = (m_status != DockStyle.None);
-                        }
-                    }
-
-                    private Image ImageInactive
-                    {
-                        get
-                        {
-                            if (DockStyle == DockStyle.Left)
-                                return _imagePanelLeft;
-                            else if (DockStyle == DockStyle.Right)
-                                return _imagePanelRight;
-                            else if (DockStyle == DockStyle.Top)
-                                return _imagePanelTop;
-                            else if (DockStyle == DockStyle.Bottom)
-                                return _imagePanelBottom;
-                            else if (DockStyle == DockStyle.Fill)
-                                return _imagePanelFill;
-                            else
-                                return null;
-                        }
-                    }
-
-                    private Image ImageActive
-                    {
-                        get
-                        {
-                            if (DockStyle == DockStyle.Left)
-                                return _imagePanelLeftActive;
-                            else if (DockStyle == DockStyle.Right)
-                                return _imagePanelRightActive;
-                            else if (DockStyle == DockStyle.Top)
-                                return _imagePanelTopActive;
-                            else if (DockStyle == DockStyle.Bottom)
-                                return _imagePanelBottomActive;
-                            else if (DockStyle == DockStyle.Fill)
-                                return _imagePanelFillActive;
-                            else
-                                return null;
-                        }
-                    }
-
-                    private bool m_isActivated = false;
-                    private bool IsActivated
-                    {
-                        get { return m_isActivated; }
-                        set
-                        {
-                            m_isActivated = value;
-                            Image = IsActivated ? ImageActive : ImageInactive;
-                        }
-                    }
-
-                    public DockStyle HitTest(Point pt)
-                    {
-                        return this.Visible && ClientRectangle.Contains(PointToClient(pt)) ? DockStyle : DockStyle.None;
-                    }
-                }
-                #endregion PanelIndicator
-
-                #region PaneIndicator
-                private class PaneIndicator : PictureBox, IHitTest
-                {
-                    private struct HotSpotIndex
-                    {
-                        public HotSpotIndex(int x, int y, DockStyle dockStyle)
-                        {
-                            m_x = x;
-                            m_y = y;
-                            m_dockStyle = dockStyle;
-                        }
-
-                        private int m_x;
-                        public int X
-                        {
-                            get { return m_x; }
-                        }
-
-                        private int m_y;
-                        public int Y
-                        {
-                            get { return m_y; }
-                        }
-
-                        private DockStyle m_dockStyle;
-                        public DockStyle DockStyle
-                        {
-                            get { return m_dockStyle; }
-                        }
-                    }
-
-                    private static Bitmap _bitmapPaneDiamond = Resources.DockIndicator_PaneDiamond;
-                    private static Bitmap _bitmapPaneDiamondLeft = Resources.DockIndicator_PaneDiamond_Left;
-                    private static Bitmap _bitmapPaneDiamondRight = Resources.DockIndicator_PaneDiamond_Right;
-                    private static Bitmap _bitmapPaneDiamondTop = Resources.DockIndicator_PaneDiamond_Top;
-                    private static Bitmap _bitmapPaneDiamondBottom = Resources.DockIndicator_PaneDiamond_Bottom;
-                    private static Bitmap _bitmapPaneDiamondFill = Resources.DockIndicator_PaneDiamond_Fill;
-                    private static Bitmap _bitmapPaneDiamondHotSpot = Resources.DockIndicator_PaneDiamond_HotSpot;
-                    private static Bitmap _bitmapPaneDiamondHotSpotIndex = Resources.DockIndicator_PaneDiamond_HotSpotIndex;
-                    private static HotSpotIndex[] _hotSpots = new HotSpotIndex[]
+using System.Windows.Forms;
+
+namespace WeifenLuo.WinFormsUI.Docking {
+  partial class DockPanel {
+    private sealed class DockDragHandler : DragHandler {
+      private class DockIndicator : DragForm {
+        #region IHitTest
+        private interface IHitTest {
+          DockStyle HitTest(Point pt);
+          DockStyle Status { get; set; }
+        }
+        #endregion
+
+        #region PanelIndicator
+        private class PanelIndicator : PictureBox, IHitTest {
+          private static Image _imagePanelLeft = Resources.DockIndicator_PanelLeft;
+          private static Image _imagePanelRight = Resources.DockIndicator_PanelRight;
+          private static Image _imagePanelTop = Resources.DockIndicator_PanelTop;
+          private static Image _imagePanelBottom = Resources.DockIndicator_PanelBottom;
+          private static Image _imagePanelFill = Resources.DockIndicator_PanelFill;
+          private static Image _imagePanelLeftActive = Resources.DockIndicator_PanelLeft_Active;
+          private static Image _imagePanelRightActive = Resources.DockIndicator_PanelRight_Active;
+          private static Image _imagePanelTopActive = Resources.DockIndicator_PanelTop_Active;
+          private static Image _imagePanelBottomActive = Resources.DockIndicator_PanelBottom_Active;
+          private static Image _imagePanelFillActive = Resources.DockIndicator_PanelFill_Active;
+
+          public PanelIndicator(DockStyle dockStyle) {
+            m_dockStyle = dockStyle;
+            SizeMode = PictureBoxSizeMode.AutoSize;
+            Image = ImageInactive;
+          }
+
+          private DockStyle m_dockStyle;
+          private DockStyle DockStyle {
+            get { return m_dockStyle; }
+          }
+
+          private DockStyle m_status;
+          public DockStyle Status {
+            get { return m_status; }
+            set {
+              if (value != DockStyle && value != DockStyle.None)
+                throw new InvalidEnumArgumentException();
+
+              if (m_status == value)
+                return;
+
+              m_status = value;
+              IsActivated = (m_status != DockStyle.None);
+            }
+          }
+
+          private Image ImageInactive {
+            get {
+              if (DockStyle == DockStyle.Left)
+                return _imagePanelLeft;
+              else if (DockStyle == DockStyle.Right)
+                return _imagePanelRight;
+              else if (DockStyle == DockStyle.Top)
+                return _imagePanelTop;
+              else if (DockStyle == DockStyle.Bottom)
+                return _imagePanelBottom;
+              else if (DockStyle == DockStyle.Fill)
+                return _imagePanelFill;
+              else
+                return null;
+            }
+          }
+
+          private Image ImageActive {
+            get {
+              if (DockStyle == DockStyle.Left)
+                return _imagePanelLeftActive;
+              else if (DockStyle == DockStyle.Right)
+                return _imagePanelRightActive;
+              else if (DockStyle == DockStyle.Top)
+                return _imagePanelTopActive;
+              else if (DockStyle == DockStyle.Bottom)
+                return _imagePanelBottomActive;
+              else if (DockStyle == DockStyle.Fill)
+                return _imagePanelFillActive;
+              else
+                return null;
+            }
+          }
+
+          private bool m_isActivated = false;
+          private bool IsActivated {
+            get { return m_isActivated; }
+            set {
+              m_isActivated = value;
+              Image = IsActivated ? ImageActive : ImageInactive;
+            }
+          }
+
+          public DockStyle HitTest(Point pt) {
+            return this.Visible && ClientRectangle.Contains(PointToClient(pt)) ? DockStyle : DockStyle.None;
+          }
+        }
+        #endregion PanelIndicator
+
+        #region PaneIndicator
+        private class PaneIndicator : PictureBox, IHitTest {
+          private struct HotSpotIndex {
+            public HotSpotIndex(int x, int y, DockStyle dockStyle) {
+              m_x = x;
+              m_y = y;
+              m_dockStyle = dockStyle;
+            }
+
+            private int m_x;
+            public int X {
+              get { return m_x; }
+            }
+
+            private int m_y;
+            public int Y {
+              get { return m_y; }
+            }
+
+            private DockStyle m_dockStyle;
+            public DockStyle DockStyle {
+              get { return m_dockStyle; }
+            }
+          }
+
+          private static Bitmap _bitmapPaneDiamond = Resources.DockIndicator_PaneDiamond;
+          private static Bitmap _bitmapPaneDiamondLeft = Resources.DockIndicator_PaneDiamond_Left;
+          private static Bitmap _bitmapPaneDiamondRight = Resources.DockIndicator_PaneDiamond_Right;
+          private static Bitmap _bitmapPaneDiamondTop = Resources.DockIndicator_PaneDiamond_Top;
+          private static Bitmap _bitmapPaneDiamondBottom = Resources.DockIndicator_PaneDiamond_Bottom;
+          private static Bitmap _bitmapPaneDiamondFill = Resources.DockIndicator_PaneDiamond_Fill;
+          private static Bitmap _bitmapPaneDiamondHotSpot = Resources.DockIndicator_PaneDiamond_HotSpot;
+          private static Bitmap _bitmapPaneDiamondHotSpotIndex = Resources.DockIndicator_PaneDiamond_HotSpotIndex;
+          private static HotSpotIndex[] _hotSpots = new HotSpotIndex[]
 			{
 				new HotSpotIndex(1, 0, DockStyle.Top),
@@ -170,70 +144,63 @@
 				new HotSpotIndex(1, 2, DockStyle.Bottom)
 			};
-                    private static GraphicsPath _displayingGraphicsPath = DrawHelper.CalculateGraphicsPathFromBitmap(_bitmapPaneDiamond);
-
-                    public PaneIndicator()
-                    {
-                        SizeMode = PictureBoxSizeMode.AutoSize;
-                        Image = _bitmapPaneDiamond;
-                        Region = new Region(DisplayingGraphicsPath);
-                    }
-
-                    public static GraphicsPath DisplayingGraphicsPath
-                    {
-                        get { return _displayingGraphicsPath; }
-                    }
-
-                    public DockStyle HitTest(Point pt)
-                    {
-                        if (!Visible)
-                            return DockStyle.None;
-
-                        pt = PointToClient(pt);
-                        if (!ClientRectangle.Contains(pt))
-                            return DockStyle.None;
-
-                        for (int i = _hotSpots.GetLowerBound(0); i <= _hotSpots.GetUpperBound(0); i++)
-                        {
-                            if (_bitmapPaneDiamondHotSpot.GetPixel(pt.X, pt.Y) == _bitmapPaneDiamondHotSpotIndex.GetPixel(_hotSpots[i].X, _hotSpots[i].Y))
-                                return _hotSpots[i].DockStyle;
-                        }
-
-                        return DockStyle.None;
-                    }
-
-                    private DockStyle m_status = DockStyle.None;
-                    public DockStyle Status
-                    {
-                        get { return m_status; }
-                        set
-                        {
-                            m_status = value;
-                            if (m_status == DockStyle.None)
-                                Image = _bitmapPaneDiamond;
-                            else if (m_status == DockStyle.Left)
-                                Image = _bitmapPaneDiamondLeft;
-                            else if (m_status == DockStyle.Right)
-                                Image = _bitmapPaneDiamondRight;
-                            else if (m_status == DockStyle.Top)
-                                Image = _bitmapPaneDiamondTop;
-                            else if (m_status == DockStyle.Bottom)
-                                Image = _bitmapPaneDiamondBottom;
-                            else if (m_status == DockStyle.Fill)
-                                Image = _bitmapPaneDiamondFill;
-                        }
-                    }
-                }
-                #endregion PaneIndicator
-
-                #region consts
-                private int _PanelIndicatorMargin = 10;
-                #endregion
-
-                private DockDragHandler m_dragHandler;
-
-                public DockIndicator(DockDragHandler dragHandler)
-                {
-                    m_dragHandler = dragHandler;
-                    Controls.AddRange(new Control[] {
+          private static GraphicsPath _displayingGraphicsPath = DrawHelper.CalculateGraphicsPathFromBitmap(_bitmapPaneDiamond);
+
+          public PaneIndicator() {
+            SizeMode = PictureBoxSizeMode.AutoSize;
+            Image = _bitmapPaneDiamond;
+            Region = new Region(DisplayingGraphicsPath);
+          }
+
+          public static GraphicsPath DisplayingGraphicsPath {
+            get { return _displayingGraphicsPath; }
+          }
+
+          public DockStyle HitTest(Point pt) {
+            if (!Visible)
+              return DockStyle.None;
+
+            pt = PointToClient(pt);
+            if (!ClientRectangle.Contains(pt))
+              return DockStyle.None;
+
+            for (int i = _hotSpots.GetLowerBound(0); i <= _hotSpots.GetUpperBound(0); i++) {
+              if (_bitmapPaneDiamondHotSpot.GetPixel(pt.X, pt.Y) == _bitmapPaneDiamondHotSpotIndex.GetPixel(_hotSpots[i].X, _hotSpots[i].Y))
+                return _hotSpots[i].DockStyle;
+            }
+
+            return DockStyle.None;
+          }
+
+          private DockStyle m_status = DockStyle.None;
+          public DockStyle Status {
+            get { return m_status; }
+            set {
+              m_status = value;
+              if (m_status == DockStyle.None)
+                Image = _bitmapPaneDiamond;
+              else if (m_status == DockStyle.Left)
+                Image = _bitmapPaneDiamondLeft;
+              else if (m_status == DockStyle.Right)
+                Image = _bitmapPaneDiamondRight;
+              else if (m_status == DockStyle.Top)
+                Image = _bitmapPaneDiamondTop;
+              else if (m_status == DockStyle.Bottom)
+                Image = _bitmapPaneDiamondBottom;
+              else if (m_status == DockStyle.Fill)
+                Image = _bitmapPaneDiamondFill;
+            }
+          }
+        }
+        #endregion PaneIndicator
+
+        #region consts
+        private int _PanelIndicatorMargin = 10;
+        #endregion
+
+        private DockDragHandler m_dragHandler;
+
+        public DockIndicator(DockDragHandler dragHandler) {
+          m_dragHandler = dragHandler;
+          Controls.AddRange(new Control[] {
 			            PaneDiamond,
 			            PanelLeft,
@@ -243,200 +210,166 @@
 			            PanelFill
 			            });
-                    Region = new Region(Rectangle.Empty);
-                }
-
-                private PaneIndicator m_paneDiamond = null;
-                private PaneIndicator PaneDiamond
-                {
-                    get
-                    {
-                        if (m_paneDiamond == null)
-                            m_paneDiamond = new PaneIndicator();
-
-                        return m_paneDiamond;
-                    }
-                }
-
-                private PanelIndicator m_panelLeft = null;
-                private PanelIndicator PanelLeft
-                {
-                    get
-                    {
-                        if (m_panelLeft == null)
-                            m_panelLeft = new PanelIndicator(DockStyle.Left);
-
-                        return m_panelLeft;
-                    }
-                }
-
-                private PanelIndicator m_panelRight = null;
-                private PanelIndicator PanelRight
-                {
-                    get
-                    {
-                        if (m_panelRight == null)
-                            m_panelRight = new PanelIndicator(DockStyle.Right);
-
-                        return m_panelRight;
-                    }
-                }
-
-                private PanelIndicator m_panelTop = null;
-                private PanelIndicator PanelTop
-                {
-                    get
-                    {
-                        if (m_panelTop == null)
-                            m_panelTop = new PanelIndicator(DockStyle.Top);
-
-                        return m_panelTop;
-                    }
-                }
-
-                private PanelIndicator m_panelBottom = null;
-                private PanelIndicator PanelBottom
-                {
-                    get
-                    {
-                        if (m_panelBottom == null)
-                            m_panelBottom = new PanelIndicator(DockStyle.Bottom);
-
-                        return m_panelBottom;
-                    }
-                }
-
-                private PanelIndicator m_panelFill = null;
-                private PanelIndicator PanelFill
-                {
-                    get
-                    {
-                        if (m_panelFill == null)
-                            m_panelFill = new PanelIndicator(DockStyle.Fill);
-
-                        return m_panelFill;
-                    }
-                }
-
-                private bool m_fullPanelEdge = false;
-                public bool FullPanelEdge
-                {
-                    get { return m_fullPanelEdge; }
-                    set
-                    {
-                        if (m_fullPanelEdge == value)
-                            return;
-
-                        m_fullPanelEdge = value;
-                        RefreshChanges();
-                    }
-                }
-
-                public DockDragHandler DragHandler
-                {
-                    get { return m_dragHandler; }
-                }
-
-                public DockPanel DockPanel
-                {
-                    get { return DragHandler.DockPanel; }
-                }
-
-                private DockPane m_dockPane = null;
-                public DockPane DockPane
-                {
-                    get { return m_dockPane; }
-                    internal set
-                    {
-                        if (m_dockPane == value)
-                            return;
-
-                        DockPane oldDisplayingPane = DisplayingPane;
-                        m_dockPane = value;
-                        if (oldDisplayingPane != DisplayingPane)
-                            RefreshChanges();
-                    }
-                }
-
-                private IHitTest m_hitTest = null;
-                private IHitTest HitTestResult
-                {
-                    get { return m_hitTest; }
-                    set
-                    {
-                        if (m_hitTest == value)
-                            return;
-
-                        if (m_hitTest != null)
-                            m_hitTest.Status = DockStyle.None;
-
-                        m_hitTest = value;
-                    }
-                }
-
-                private DockPane DisplayingPane
-                {
-                    get { return ShouldPaneDiamondVisible() ? DockPane : null; }
-                }
-
-                private void RefreshChanges()
-                {
-                    Region region = new Region(Rectangle.Empty);
-                    Rectangle rectDockArea = FullPanelEdge ? DockPanel.DockArea : DockPanel.DocumentWindowBounds;
-
-                    rectDockArea = RectangleToClient(DockPanel.RectangleToScreen(rectDockArea));
-                    if (ShouldPanelIndicatorVisible(DockState.DockLeft))
-                    {
-                        PanelLeft.Location = new Point(rectDockArea.X + _PanelIndicatorMargin, rectDockArea.Y + (rectDockArea.Height - PanelRight.Height) / 2);
-                        PanelLeft.Visible = true;
-                        region.Union(PanelLeft.Bounds);
-                    }
-                    else
-                        PanelLeft.Visible = false;
-
-                    if (ShouldPanelIndicatorVisible(DockState.DockRight))
-                    {
-                        PanelRight.Location = new Point(rectDockArea.X + rectDockArea.Width - PanelRight.Width - _PanelIndicatorMargin, rectDockArea.Y + (rectDockArea.Height - PanelRight.Height) / 2);
-                        PanelRight.Visible = true;
-                        region.Union(PanelRight.Bounds);
-                    }
-                    else
-                        PanelRight.Visible = false;
-
-                    if (ShouldPanelIndicatorVisible(DockState.DockTop))
-                    {
-                        PanelTop.Location = new Point(rectDockArea.X + (rectDockArea.Width - PanelTop.Width) / 2, rectDockArea.Y + _PanelIndicatorMargin);
-                        PanelTop.Visible = true;
-                        region.Union(PanelTop.Bounds);
-                    }
-                    else
-                        PanelTop.Visible = false;
-
-                    if (ShouldPanelIndicatorVisible(DockState.DockBottom))
-                    {
-                        PanelBottom.Location = new Point(rectDockArea.X + (rectDockArea.Width - PanelBottom.Width) / 2, rectDockArea.Y + rectDockArea.Height - PanelBottom.Height - _PanelIndicatorMargin);
-                        PanelBottom.Visible = true;
-                        region.Union(PanelBottom.Bounds);
-                    }
-                    else
-                        PanelBottom.Visible = false;
-
-                    if (ShouldPanelIndicatorVisible(DockState.Document))
-                    {
-                        Rectangle rectDocumentWindow = RectangleToClient(DockPanel.RectangleToScreen(DockPanel.DocumentWindowBounds));
-                        PanelFill.Location = new Point(rectDocumentWindow.X + (rectDocumentWindow.Width - PanelFill.Width) / 2, rectDocumentWindow.Y + (rectDocumentWindow.Height - PanelFill.Height) / 2);
-                        PanelFill.Visible = true;
-                        region.Union(PanelFill.Bounds);
-                    }
-                    else
-                        PanelFill.Visible = false;
-
-                    if (ShouldPaneDiamondVisible())
-                    {
-                        Rectangle rect = RectangleToClient(DockPane.RectangleToScreen(DockPane.ClientRectangle));
-                        PaneDiamond.Location = new Point(rect.Left + (rect.Width - PaneDiamond.Width) / 2, rect.Top + (rect.Height - PaneDiamond.Height) / 2);
-                        PaneDiamond.Visible = true;
-                        using (GraphicsPath graphicsPath = PaneIndicator.DisplayingGraphicsPath.Clone() as GraphicsPath)
-                        {
-                            Point[] pts = new Point[]
+          Region = new Region(Rectangle.Empty);
+        }
+
+        private PaneIndicator m_paneDiamond = null;
+        private PaneIndicator PaneDiamond {
+          get {
+            if (m_paneDiamond == null)
+              m_paneDiamond = new PaneIndicator();
+
+            return m_paneDiamond;
+          }
+        }
+
+        private PanelIndicator m_panelLeft = null;
+        private PanelIndicator PanelLeft {
+          get {
+            if (m_panelLeft == null)
+              m_panelLeft = new PanelIndicator(DockStyle.Left);
+
+            return m_panelLeft;
+          }
+        }
+
+        private PanelIndicator m_panelRight = null;
+        private PanelIndicator PanelRight {
+          get {
+            if (m_panelRight == null)
+              m_panelRight = new PanelIndicator(DockStyle.Right);
+
+            return m_panelRight;
+          }
+        }
+
+        private PanelIndicator m_panelTop = null;
+        private PanelIndicator PanelTop {
+          get {
+            if (m_panelTop == null)
+              m_panelTop = new PanelIndicator(DockStyle.Top);
+
+            return m_panelTop;
+          }
+        }
+
+        private PanelIndicator m_panelBottom = null;
+        private PanelIndicator PanelBottom {
+          get {
+            if (m_panelBottom == null)
+              m_panelBottom = new PanelIndicator(DockStyle.Bottom);
+
+            return m_panelBottom;
+          }
+        }
+
+        private PanelIndicator m_panelFill = null;
+        private PanelIndicator PanelFill {
+          get {
+            if (m_panelFill == null)
+              m_panelFill = new PanelIndicator(DockStyle.Fill);
+
+            return m_panelFill;
+          }
+        }
+
+        private bool m_fullPanelEdge = false;
+        public bool FullPanelEdge {
+          get { return m_fullPanelEdge; }
+          set {
+            if (m_fullPanelEdge == value)
+              return;
+
+            m_fullPanelEdge = value;
+            RefreshChanges();
+          }
+        }
+
+        public DockDragHandler DragHandler {
+          get { return m_dragHandler; }
+        }
+
+        public DockPanel DockPanel {
+          get { return DragHandler.DockPanel; }
+        }
+
+        private DockPane m_dockPane = null;
+        public DockPane DockPane {
+          get { return m_dockPane; }
+          internal set {
+            if (m_dockPane == value)
+              return;
+
+            DockPane oldDisplayingPane = DisplayingPane;
+            m_dockPane = value;
+            if (oldDisplayingPane != DisplayingPane)
+              RefreshChanges();
+          }
+        }
+
+        private IHitTest m_hitTest = null;
+        private IHitTest HitTestResult {
+          get { return m_hitTest; }
+          set {
+            if (m_hitTest == value)
+              return;
+
+            if (m_hitTest != null)
+              m_hitTest.Status = DockStyle.None;
+
+            m_hitTest = value;
+          }
+        }
+
+        private DockPane DisplayingPane {
+          get { return ShouldPaneDiamondVisible() ? DockPane : null; }
+        }
+
+        private void RefreshChanges() {
+          Region region = new Region(Rectangle.Empty);
+          Rectangle rectDockArea = FullPanelEdge ? DockPanel.DockArea : DockPanel.DocumentWindowBounds;
+
+          rectDockArea = RectangleToClient(DockPanel.RectangleToScreen(rectDockArea));
+          if (ShouldPanelIndicatorVisible(DockState.DockLeft)) {
+            PanelLeft.Location = new Point(rectDockArea.X + _PanelIndicatorMargin, rectDockArea.Y + (rectDockArea.Height - PanelRight.Height) / 2);
+            PanelLeft.Visible = true;
+            region.Union(PanelLeft.Bounds);
+          } else
+            PanelLeft.Visible = false;
+
+          if (ShouldPanelIndicatorVisible(DockState.DockRight)) {
+            PanelRight.Location = new Point(rectDockArea.X + rectDockArea.Width - PanelRight.Width - _PanelIndicatorMargin, rectDockArea.Y + (rectDockArea.Height - PanelRight.Height) / 2);
+            PanelRight.Visible = true;
+            region.Union(PanelRight.Bounds);
+          } else
+            PanelRight.Visible = false;
+
+          if (ShouldPanelIndicatorVisible(DockState.DockTop)) {
+            PanelTop.Location = new Point(rectDockArea.X + (rectDockArea.Width - PanelTop.Width) / 2, rectDockArea.Y + _PanelIndicatorMargin);
+            PanelTop.Visible = true;
+            region.Union(PanelTop.Bounds);
+          } else
+            PanelTop.Visible = false;
+
+          if (ShouldPanelIndicatorVisible(DockState.DockBottom)) {
+            PanelBottom.Location = new Point(rectDockArea.X + (rectDockArea.Width - PanelBottom.Width) / 2, rectDockArea.Y + rectDockArea.Height - PanelBottom.Height - _PanelIndicatorMargin);
+            PanelBottom.Visible = true;
+            region.Union(PanelBottom.Bounds);
+          } else
+            PanelBottom.Visible = false;
+
+          if (ShouldPanelIndicatorVisible(DockState.Document)) {
+            Rectangle rectDocumentWindow = RectangleToClient(DockPanel.RectangleToScreen(DockPanel.DocumentWindowBounds));
+            PanelFill.Location = new Point(rectDocumentWindow.X + (rectDocumentWindow.Width - PanelFill.Width) / 2, rectDocumentWindow.Y + (rectDocumentWindow.Height - PanelFill.Height) / 2);
+            PanelFill.Visible = true;
+            region.Union(PanelFill.Bounds);
+          } else
+            PanelFill.Visible = false;
+
+          if (ShouldPaneDiamondVisible()) {
+            Rectangle rect = RectangleToClient(DockPane.RectangleToScreen(DockPane.ClientRectangle));
+            PaneDiamond.Location = new Point(rect.Left + (rect.Width - PaneDiamond.Width) / 2, rect.Top + (rect.Height - PaneDiamond.Height) / 2);
+            PaneDiamond.Visible = true;
+            using (GraphicsPath graphicsPath = PaneIndicator.DisplayingGraphicsPath.Clone() as GraphicsPath) {
+              Point[] pts = new Point[]
 						{
 							new Point(PaneDiamond.Left, PaneDiamond.Top),
@@ -444,371 +377,311 @@
 							new Point(PaneDiamond.Left, PaneDiamond.Bottom)
 						};
-                            using (Matrix matrix = new Matrix(PaneDiamond.ClientRectangle, pts))
-                            {
-                                graphicsPath.Transform(matrix);
-                            }
-                            region.Union(graphicsPath);
-                        }
-                    }
-                    else
-                        PaneDiamond.Visible = false;
-
-                    Region = region;
-                }
-
-                private bool ShouldPanelIndicatorVisible(DockState dockState)
-                {
-                    if (!Visible)
-                        return false;
-
-                    if (DockPanel.DockWindows[dockState].Visible)
-                        return false;
-
-                    return DragHandler.DragSource.IsDockStateValid(dockState);
-                }
-
-                private bool ShouldPaneDiamondVisible()
-                {
-                    if (DockPane == null)
-                        return false;
-
-                    if (!DockPanel.AllowEndUserNestedDocking)
-                        return false;
-
-                    return DragHandler.DragSource.CanDockTo(DockPane);
-                }
-
-                public override void Show(bool bActivate)
-                {
-                    base.Show(bActivate);
-                    Bounds = SystemInformation.VirtualScreen;
-                    RefreshChanges();
-                }
-
-                public void TestDrop()
-                {
-                    Point pt = Control.MousePosition;
-                    DockPane = DockHelper.PaneAtPoint(pt, DockPanel);
-
-                    if (TestDrop(PanelLeft, pt) != DockStyle.None)
-                        HitTestResult = PanelLeft;
-                    else if (TestDrop(PanelRight, pt) != DockStyle.None)
-                        HitTestResult = PanelRight;
-                    else if (TestDrop(PanelTop, pt) != DockStyle.None)
-                        HitTestResult = PanelTop;
-                    else if (TestDrop(PanelBottom, pt) != DockStyle.None)
-                        HitTestResult = PanelBottom;
-                    else if (TestDrop(PanelFill, pt) != DockStyle.None)
-                        HitTestResult = PanelFill;
-                    else if (TestDrop(PaneDiamond, pt) != DockStyle.None)
-                        HitTestResult = PaneDiamond;
-                    else
-                        HitTestResult = null;
-
-                    if (HitTestResult != null)
-                    {
-                        if (HitTestResult is PaneIndicator)
-                            DragHandler.Outline.Show(DockPane, HitTestResult.Status);
-                        else
-                            DragHandler.Outline.Show(DockPanel, HitTestResult.Status, FullPanelEdge);
-                    }
-                }
-
-                private static DockStyle TestDrop(IHitTest hitTest, Point pt)
-                {
-                    return hitTest.Status = hitTest.HitTest(pt);
-                }
-            }
-
-            private class DockOutline : DockOutlineBase
-            {
-                public DockOutline()
-                {
-                    m_dragForm = new DragForm();
-                    SetDragForm(Rectangle.Empty);
-                    DragForm.BackColor = SystemColors.ActiveCaption;
-                    DragForm.Opacity = 0.5;
-                    DragForm.Show(false);
-                }
-
-                DragForm m_dragForm;
-                private DragForm DragForm
-                {
-                    get { return m_dragForm; }
-                }
-
-                protected override void OnShow()
-                {
-                    CalculateRegion();
-                }
-
-                protected override void OnClose()
-                {
-                    DragForm.Close();
-                }
-
-                private void CalculateRegion()
-                {
-                    if (SameAsOldValue)
-                        return;
-
-                    if (!FloatWindowBounds.IsEmpty)
-                        SetOutline(FloatWindowBounds);
-                    else if (DockTo is DockPanel)
-                        SetOutline(DockTo as DockPanel, Dock, (ContentIndex != 0));
-                    else if (DockTo is DockPane)
-                        SetOutline(DockTo as DockPane, Dock, ContentIndex);
-                    else
-                        SetOutline();
-                }
-
-                private void SetOutline()
-                {
-                    SetDragForm(Rectangle.Empty);
-                }
-
-                private void SetOutline(Rectangle floatWindowBounds)
-                {
-                    SetDragForm(floatWindowBounds);
-                }
-
-                private void SetOutline(DockPanel dockPanel, DockStyle dock, bool fullPanelEdge)
-                {
-                    Rectangle rect = fullPanelEdge ? dockPanel.DockArea : dockPanel.DocumentWindowBounds;
-                    rect.Location = dockPanel.PointToScreen(rect.Location);
-                    if (dock == DockStyle.Top)
-                    {
-                        int height = dockPanel.GetDockWindowSize(DockState.DockTop);
-                        rect = new Rectangle(rect.X, rect.Y, rect.Width, height);
-                    }
-                    else if (dock == DockStyle.Bottom)
-                    {
-                        int height = dockPanel.GetDockWindowSize(DockState.DockBottom);
-                        rect = new Rectangle(rect.X, rect.Bottom - height, rect.Width, height);
-                    }
-                    else if (dock == DockStyle.Left)
-                    {
-                        int width = dockPanel.GetDockWindowSize(DockState.DockLeft);
-                        rect = new Rectangle(rect.X, rect.Y, width, rect.Height);
-                    }
-                    else if (dock == DockStyle.Right)
-                    {
-                        int width = dockPanel.GetDockWindowSize(DockState.DockRight);
-                        rect = new Rectangle(rect.Right - width, rect.Y, width, rect.Height);
-                    }
-                    else if (dock == DockStyle.Fill)
-                    {
-                        rect = dockPanel.DocumentWindowBounds;
-                        rect.Location = dockPanel.PointToScreen(rect.Location);
-                    }
-
-                    SetDragForm(rect);
-                }
-
-                private void SetOutline(DockPane pane, DockStyle dock, int contentIndex)
-                {
-                    if (dock != DockStyle.Fill)
-                    {
-                        Rectangle rect = pane.DisplayingRectangle;
-                        if (dock == DockStyle.Right)
-                            rect.X += rect.Width / 2;
-                        if (dock == DockStyle.Bottom)
-                            rect.Y += rect.Height / 2;
-                        if (dock == DockStyle.Left || dock == DockStyle.Right)
-                            rect.Width -= rect.Width / 2;
-                        if (dock == DockStyle.Top || dock == DockStyle.Bottom)
-                            rect.Height -= rect.Height / 2;
-                        rect.Location = pane.PointToScreen(rect.Location);
-
-                        SetDragForm(rect);
-                    }
-                    else if (contentIndex == -1)
-                    {
-                        Rectangle rect = pane.DisplayingRectangle;
-                        rect.Location = pane.PointToScreen(rect.Location);
-                        SetDragForm(rect);
-                    }
-                    else
-                    {
-                        using (GraphicsPath path = pane.TabStripControl.GetOutline(contentIndex))
-                        {
-                            RectangleF rectF = path.GetBounds();
-                            Rectangle rect = new Rectangle((int)rectF.X, (int)rectF.Y, (int)rectF.Width, (int)rectF.Height);
-                            using (Matrix matrix = new Matrix(rect, new Point[] { new Point(0, 0), new Point(rect.Width, 0), new Point(0, rect.Height) }))
-                            {
-                                path.Transform(matrix);
-                            }
-                            Region region = new Region(path);
-                            SetDragForm(rect, region);
-                        }
-                    }
-                }
-
-                private void SetDragForm(Rectangle rect)
-                {
-                    DragForm.Bounds = rect;
-                    if (rect == Rectangle.Empty)
-                        DragForm.Region = new Region(Rectangle.Empty);
-                    else if (DragForm.Region != null)
-                        DragForm.Region = null;
-                }
-
-                private void SetDragForm(Rectangle rect, Region region)
-                {
-                    DragForm.Bounds = rect;
-                    DragForm.Region = region;
-                }
-            }
-
-            public DockDragHandler(DockPanel panel)
-                : base(panel)
-            {
-            }
-
-            public new IDockDragSource DragSource
-            {
-                get { return base.DragSource as IDockDragSource; }
-                set { base.DragSource = value; }
-            }
-
-            private DockOutlineBase m_outline;
-            public DockOutlineBase Outline
-            {
-                get { return m_outline; }
-                private set { m_outline = value; }
-            }
-
-            private DockIndicator m_indicator;
-            private DockIndicator Indicator
-            {
-                get { return m_indicator; }
-                set { m_indicator = value; }
-            }
-
-            private Rectangle m_floatOutlineBounds;
-            private Rectangle FloatOutlineBounds
-            {
-                get { return m_floatOutlineBounds; }
-                set { m_floatOutlineBounds = value; }
-            }
-
-            public void BeginDrag(IDockDragSource dragSource)
-            {
-                DragSource = dragSource;
-
-                if (!BeginDrag())
-                {
-                    DragSource = null;
-                    return;
-                }
-
-                Outline = new DockOutline();
-                Indicator = new DockIndicator(this);
-                Indicator.Show(false);
-
-                FloatOutlineBounds = DragSource.BeginDrag(StartMousePosition);
-            }
-
-            protected override void OnDragging()
-            {
-                TestDrop();
-            }
-
-            protected override void OnEndDrag(bool abort)
-            {
-                DockPanel.SuspendLayout(true);
-
-                Outline.Close();
-                Indicator.Close();
-
-                EndDrag(abort);
-
-                // Queue a request to layout all children controls
-                DockPanel.PerformMdiClientLayout();
-
-                DockPanel.ResumeLayout(true, true);
-
-                DragSource = null;
-            }
-
-            private void TestDrop()
-            {
-                Outline.FlagTestDrop = false;
-
-                Indicator.FullPanelEdge = ((Control.ModifierKeys & Keys.Shift) != 0);
-
-                if ((Control.ModifierKeys & Keys.Control) == 0)
-                {
-                    Indicator.TestDrop();
-
-                    if (!Outline.FlagTestDrop)
-                    {
-                        DockPane pane = DockHelper.PaneAtPoint(Control.MousePosition, DockPanel);
-                        if (pane != null && DragSource.IsDockStateValid(pane.DockState))
-                            pane.TestDrop(DragSource, Outline);
-                    }
-
-                    if (!Outline.FlagTestDrop && DragSource.IsDockStateValid(DockState.Float))
-                    {
-                        FloatWindow floatWindow = DockHelper.FloatWindowAtPoint(Control.MousePosition, DockPanel);
-                        if (floatWindow != null)
-                            floatWindow.TestDrop(DragSource, Outline);
-                    }
-                }
-                else
-                    Indicator.DockPane = DockHelper.PaneAtPoint(Control.MousePosition, DockPanel);
-
-                if (!Outline.FlagTestDrop)
-                {
-                    if (DragSource.IsDockStateValid(DockState.Float))
-                    {
-                        Rectangle rect = FloatOutlineBounds;
-                        rect.Offset(Control.MousePosition.X - StartMousePosition.X, Control.MousePosition.Y - StartMousePosition.Y);
-                        Outline.Show(rect);
-                    }
-                }
-
-                if (!Outline.FlagTestDrop)
-                {
-                    Cursor.Current = Cursors.No;
-                    Outline.Show();
-                }
-                else
-                    Cursor.Current = DragControl.Cursor;
-            }
-
-            private void EndDrag(bool abort)
-            {
-                if (abort)
-                    return;
-
-                if (!Outline.FloatWindowBounds.IsEmpty)
-                    DragSource.FloatAt(Outline.FloatWindowBounds);
-                else if (Outline.DockTo is DockPane)
-                {
-                    DockPane pane = Outline.DockTo as DockPane;
-                    DragSource.DockTo(pane, Outline.Dock, Outline.ContentIndex);
-                }
-                else if (Outline.DockTo is DockPanel)
-                {
-                    DockPanel panel = Outline.DockTo as DockPanel;
-                    panel.UpdateDockWindowZOrder(Outline.Dock, Outline.FlagFullEdge);
-                    DragSource.DockTo(panel, Outline.Dock);
-                }
-            }
-        }
-
-        private DockDragHandler m_dockDragHandler = null;
-        private DockDragHandler GetDockDragHandler()
-        {
-            if (m_dockDragHandler == null)
-                m_dockDragHandler = new DockDragHandler(this);
-            return m_dockDragHandler;
-        }
-
-        internal void BeginDrag(IDockDragSource dragSource)
-        {
-            GetDockDragHandler().BeginDrag(dragSource);
-        }
+              using (Matrix matrix = new Matrix(PaneDiamond.ClientRectangle, pts)) {
+                graphicsPath.Transform(matrix);
+              }
+              region.Union(graphicsPath);
+            }
+          } else
+            PaneDiamond.Visible = false;
+
+          Region = region;
+        }
+
+        private bool ShouldPanelIndicatorVisible(DockState dockState) {
+          if (!Visible)
+            return false;
+
+          if (DockPanel.DockWindows[dockState].Visible)
+            return false;
+
+          return DragHandler.DragSource.IsDockStateValid(dockState);
+        }
+
+        private bool ShouldPaneDiamondVisible() {
+          if (DockPane == null)
+            return false;
+
+          if (!DockPanel.AllowEndUserNestedDocking)
+            return false;
+
+          return DragHandler.DragSource.CanDockTo(DockPane);
+        }
+
+        public override void Show(bool bActivate) {
+          base.Show(bActivate);
+          Bounds = SystemInformation.VirtualScreen;
+          RefreshChanges();
+        }
+
+        public void TestDrop() {
+          Point pt = Control.MousePosition;
+          DockPane = DockHelper.PaneAtPoint(pt, DockPanel);
+
+          if (TestDrop(PanelLeft, pt) != DockStyle.None)
+            HitTestResult = PanelLeft;
+          else if (TestDrop(PanelRight, pt) != DockStyle.None)
+            HitTestResult = PanelRight;
+          else if (TestDrop(PanelTop, pt) != DockStyle.None)
+            HitTestResult = PanelTop;
+          else if (TestDrop(PanelBottom, pt) != DockStyle.None)
+            HitTestResult = PanelBottom;
+          else if (TestDrop(PanelFill, pt) != DockStyle.None)
+            HitTestResult = PanelFill;
+          else if (TestDrop(PaneDiamond, pt) != DockStyle.None)
+            HitTestResult = PaneDiamond;
+          else
+            HitTestResult = null;
+
+          if (HitTestResult != null) {
+            if (HitTestResult is PaneIndicator)
+              DragHandler.Outline.Show(DockPane, HitTestResult.Status);
+            else
+              DragHandler.Outline.Show(DockPanel, HitTestResult.Status, FullPanelEdge);
+          }
+        }
+
+        private static DockStyle TestDrop(IHitTest hitTest, Point pt) {
+          return hitTest.Status = hitTest.HitTest(pt);
+        }
+      }
+
+      private class DockOutline : DockOutlineBase {
+        public DockOutline() {
+          m_dragForm = new DragForm();
+          SetDragForm(Rectangle.Empty);
+          DragForm.BackColor = SystemColors.ActiveCaption;
+          DragForm.Opacity = 0.5;
+          DragForm.Show(false);
+        }
+
+        DragForm m_dragForm;
+        private DragForm DragForm {
+          get { return m_dragForm; }
+        }
+
+        protected override void OnShow() {
+          CalculateRegion();
+        }
+
+        protected override void OnClose() {
+          DragForm.Close();
+        }
+
+        private void CalculateRegion() {
+          if (SameAsOldValue)
+            return;
+
+          if (!FloatWindowBounds.IsEmpty)
+            SetOutline(FloatWindowBounds);
+          else if (DockTo is DockPanel)
+            SetOutline(DockTo as DockPanel, Dock, (ContentIndex != 0));
+          else if (DockTo is DockPane)
+            SetOutline(DockTo as DockPane, Dock, ContentIndex);
+          else
+            SetOutline();
+        }
+
+        private void SetOutline() {
+          SetDragForm(Rectangle.Empty);
+        }
+
+        private void SetOutline(Rectangle floatWindowBounds) {
+          SetDragForm(floatWindowBounds);
+        }
+
+        private void SetOutline(DockPanel dockPanel, DockStyle dock, bool fullPanelEdge) {
+          Rectangle rect = fullPanelEdge ? dockPanel.DockArea : dockPanel.DocumentWindowBounds;
+          rect.Location = dockPanel.PointToScreen(rect.Location);
+          if (dock == DockStyle.Top) {
+            int height = dockPanel.GetDockWindowSize(DockState.DockTop);
+            rect = new Rectangle(rect.X, rect.Y, rect.Width, height);
+          } else if (dock == DockStyle.Bottom) {
+            int height = dockPanel.GetDockWindowSize(DockState.DockBottom);
+            rect = new Rectangle(rect.X, rect.Bottom - height, rect.Width, height);
+          } else if (dock == DockStyle.Left) {
+            int width = dockPanel.GetDockWindowSize(DockState.DockLeft);
+            rect = new Rectangle(rect.X, rect.Y, width, rect.Height);
+          } else if (dock == DockStyle.Right) {
+            int width = dockPanel.GetDockWindowSize(DockState.DockRight);
+            rect = new Rectangle(rect.Right - width, rect.Y, width, rect.Height);
+          } else if (dock == DockStyle.Fill) {
+            rect = dockPanel.DocumentWindowBounds;
+            rect.Location = dockPanel.PointToScreen(rect.Location);
+          }
+
+          SetDragForm(rect);
+        }
+
+        private void SetOutline(DockPane pane, DockStyle dock, int contentIndex) {
+          if (dock != DockStyle.Fill) {
+            Rectangle rect = pane.DisplayingRectangle;
+            if (dock == DockStyle.Right)
+              rect.X += rect.Width / 2;
+            if (dock == DockStyle.Bottom)
+              rect.Y += rect.Height / 2;
+            if (dock == DockStyle.Left || dock == DockStyle.Right)
+              rect.Width -= rect.Width / 2;
+            if (dock == DockStyle.Top || dock == DockStyle.Bottom)
+              rect.Height -= rect.Height / 2;
+            rect.Location = pane.PointToScreen(rect.Location);
+
+            SetDragForm(rect);
+          } else if (contentIndex == -1) {
+            Rectangle rect = pane.DisplayingRectangle;
+            rect.Location = pane.PointToScreen(rect.Location);
+            SetDragForm(rect);
+          } else {
+            using (GraphicsPath path = pane.TabStripControl.GetOutline(contentIndex)) {
+              RectangleF rectF = path.GetBounds();
+              Rectangle rect = new Rectangle((int)rectF.X, (int)rectF.Y, (int)rectF.Width, (int)rectF.Height);
+              using (Matrix matrix = new Matrix(rect, new Point[] { new Point(0, 0), new Point(rect.Width, 0), new Point(0, rect.Height) })) {
+                path.Transform(matrix);
+              }
+              Region region = new Region(path);
+              SetDragForm(rect, region);
+            }
+          }
+        }
+
+        private void SetDragForm(Rectangle rect) {
+          DragForm.Bounds = rect;
+          if (rect == Rectangle.Empty)
+            DragForm.Region = new Region(Rectangle.Empty);
+          else if (DragForm.Region != null)
+            DragForm.Region = null;
+        }
+
+        private void SetDragForm(Rectangle rect, Region region) {
+          DragForm.Bounds = rect;
+          DragForm.Region = region;
+        }
+      }
+
+      public DockDragHandler(DockPanel panel)
+        : base(panel) {
+      }
+
+      public new IDockDragSource DragSource {
+        get { return base.DragSource as IDockDragSource; }
+        set { base.DragSource = value; }
+      }
+
+      private DockOutlineBase m_outline;
+      public DockOutlineBase Outline {
+        get { return m_outline; }
+        private set { m_outline = value; }
+      }
+
+      private DockIndicator m_indicator;
+      private DockIndicator Indicator {
+        get { return m_indicator; }
+        set { m_indicator = value; }
+      }
+
+      private Rectangle m_floatOutlineBounds;
+      private Rectangle FloatOutlineBounds {
+        get { return m_floatOutlineBounds; }
+        set { m_floatOutlineBounds = value; }
+      }
+
+      public void BeginDrag(IDockDragSource dragSource) {
+        DragSource = dragSource;
+
+        if (!BeginDrag()) {
+          DragSource = null;
+          return;
+        }
+
+        Outline = new DockOutline();
+        Indicator = new DockIndicator(this);
+        Indicator.Show(false);
+
+        FloatOutlineBounds = DragSource.BeginDrag(StartMousePosition);
+      }
+
+      protected override void OnDragging() {
+        TestDrop();
+      }
+
+      protected override void OnEndDrag(bool abort) {
+        DockPanel.SuspendLayout(true);
+
+        Outline.Close();
+        Indicator.Close();
+
+        EndDrag(abort);
+
+        // Queue a request to layout all children controls
+        DockPanel.PerformMdiClientLayout();
+
+        DockPanel.ResumeLayout(true, true);
+
+        DragSource = null;
+      }
+
+      private void TestDrop() {
+        Outline.FlagTestDrop = false;
+
+        Indicator.FullPanelEdge = ((Control.ModifierKeys & Keys.Shift) != 0);
+
+        if ((Control.ModifierKeys & Keys.Control) == 0) {
+          Indicator.TestDrop();
+
+          if (!Outline.FlagTestDrop) {
+            DockPane pane = DockHelper.PaneAtPoint(Control.MousePosition, DockPanel);
+            if (pane != null && DragSource.IsDockStateValid(pane.DockState))
+              pane.TestDrop(DragSource, Outline);
+          }
+
+          if (!Outline.FlagTestDrop && DragSource.IsDockStateValid(DockState.Float)) {
+            FloatWindow floatWindow = DockHelper.FloatWindowAtPoint(Control.MousePosition, DockPanel);
+            if (floatWindow != null)
+              floatWindow.TestDrop(DragSource, Outline);
+          }
+        } else
+          Indicator.DockPane = DockHelper.PaneAtPoint(Control.MousePosition, DockPanel);
+
+        if (!Outline.FlagTestDrop) {
+          if (DragSource.IsDockStateValid(DockState.Float)) {
+            Rectangle rect = FloatOutlineBounds;
+            rect.Offset(Control.MousePosition.X - StartMousePosition.X, Control.MousePosition.Y - StartMousePosition.Y);
+            Outline.Show(rect);
+          }
+        }
+
+        if (!Outline.FlagTestDrop) {
+          Cursor.Current = Cursors.No;
+          Outline.Show();
+        } else
+          Cursor.Current = DragControl.Cursor;
+      }
+
+      private void EndDrag(bool abort) {
+        if (abort)
+          return;
+
+        if (!Outline.FloatWindowBounds.IsEmpty)
+          DragSource.FloatAt(Outline.FloatWindowBounds);
+        else if (Outline.DockTo is DockPane) {
+          DockPane pane = Outline.DockTo as DockPane;
+          DragSource.DockTo(pane, Outline.Dock, Outline.ContentIndex);
+        } else if (Outline.DockTo is DockPanel) {
+          DockPanel panel = Outline.DockTo as DockPanel;
+          panel.UpdateDockWindowZOrder(Outline.Dock, Outline.FlagFullEdge);
+          DragSource.DockTo(panel, Outline.Dock);
+        }
+      }
     }
+
+    private DockDragHandler m_dockDragHandler = null;
+    private DockDragHandler GetDockDragHandler() {
+      if (m_dockDragHandler == null)
+        m_dockDragHandler = new DockDragHandler(this);
+      return m_dockDragHandler;
+    }
+
+    internal void BeginDrag(IDockDragSource dragSource) {
+      GetDockDragHandler().BeginDrag(dragSource);
+    }
+  }
 }
Index: /trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.WinFormsUI/2.3.1/WinFormsUI-2.3.1/Docking/DockPanel.DragHandler.cs
===================================================================
--- /trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.WinFormsUI/2.3.1/WinFormsUI-2.3.1/Docking/DockPanel.DragHandler.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.WinFormsUI/2.3.1/WinFormsUI-2.3.1/Docking/DockPanel.DragHandler.cs	(revision 4068)
@@ -1,135 +1,112 @@
-using System;
-using System.Collections.Generic;
-using System.Text;
+using System.Drawing;
 using System.Windows.Forms;
-using System.Drawing;
-using System.Drawing.Drawing2D;
-using System.ComponentModel;
 
-namespace WeifenLuo.WinFormsUI.Docking
-{
-    partial class DockPanel
-    {
-        /// <summary>
-        /// DragHandlerBase is the base class for drag handlers. The derived class should:
-        ///   1. Define its public method BeginDrag. From within this public BeginDrag method,
-        ///      DragHandlerBase.BeginDrag should be called to initialize the mouse capture
-        ///      and message filtering.
-        ///   2. Override the OnDragging and OnEndDrag methods.
-        /// </summary>
-        private abstract class DragHandlerBase : NativeWindow, IMessageFilter
-        {
-            protected DragHandlerBase()
-            {
-            }
+namespace WeifenLuo.WinFormsUI.Docking {
+  partial class DockPanel {
+    /// <summary>
+    /// DragHandlerBase is the base class for drag handlers. The derived class should:
+    ///   1. Define its public method BeginDrag. From within this public BeginDrag method,
+    ///      DragHandlerBase.BeginDrag should be called to initialize the mouse capture
+    ///      and message filtering.
+    ///   2. Override the OnDragging and OnEndDrag methods.
+    /// </summary>
+    private abstract class DragHandlerBase : NativeWindow, IMessageFilter {
+      protected DragHandlerBase() {
+      }
 
-            protected abstract Control DragControl
-            {
-                get;
-            }
+      protected abstract Control DragControl {
+        get;
+      }
 
-            private Point m_startMousePosition = Point.Empty;
-            protected Point StartMousePosition
-            {
-                get { return m_startMousePosition; }
-                private set { m_startMousePosition = value; }
-            }
+      private Point m_startMousePosition = Point.Empty;
+      protected Point StartMousePosition {
+        get { return m_startMousePosition; }
+        private set { m_startMousePosition = value; }
+      }
 
-            protected bool BeginDrag()
-            {
-                // Avoid re-entrance;
-                lock (this)
-                {
-                    if (DragControl == null)
-                        return false;
+      protected bool BeginDrag() {
+        // Avoid re-entrance;
+        lock (this) {
+          if (DragControl == null)
+            return false;
 
-                    StartMousePosition = Control.MousePosition;
+          StartMousePosition = Control.MousePosition;
 
-                    if (!NativeMethods.DragDetect(DragControl.Handle, StartMousePosition))
-                        return false;
+          if (!NativeMethods.DragDetect(DragControl.Handle, StartMousePosition))
+            return false;
 
-                    DragControl.FindForm().Capture = true;
-                    AssignHandle(DragControl.FindForm().Handle);
-                    Application.AddMessageFilter(this);
-                    return true;
-                }
-            }
+          DragControl.FindForm().Capture = true;
+          AssignHandle(DragControl.FindForm().Handle);
+          Application.AddMessageFilter(this);
+          return true;
+        }
+      }
 
-            protected abstract void OnDragging();
+      protected abstract void OnDragging();
 
-            protected abstract void OnEndDrag(bool abort);
+      protected abstract void OnEndDrag(bool abort);
 
-            private void EndDrag(bool abort)
-            {
-                ReleaseHandle();
-                Application.RemoveMessageFilter(this);
-                DragControl.FindForm().Capture = false;
+      private void EndDrag(bool abort) {
+        ReleaseHandle();
+        Application.RemoveMessageFilter(this);
+        DragControl.FindForm().Capture = false;
 
-                OnEndDrag(abort);
-            }
+        OnEndDrag(abort);
+      }
 
-            bool IMessageFilter.PreFilterMessage(ref Message m)
-            {
-                if (m.Msg == (int)Win32.Msgs.WM_MOUSEMOVE)
-                    OnDragging();
-                else if (m.Msg == (int)Win32.Msgs.WM_LBUTTONUP)
-                    EndDrag(false);
-                else if (m.Msg == (int)Win32.Msgs.WM_CAPTURECHANGED)
-                    EndDrag(true);
-                else if (m.Msg == (int)Win32.Msgs.WM_KEYDOWN && (int)m.WParam == (int)Keys.Escape)
-                    EndDrag(true);
+      bool IMessageFilter.PreFilterMessage(ref Message m) {
+        if (m.Msg == (int)Win32.Msgs.WM_MOUSEMOVE)
+          OnDragging();
+        else if (m.Msg == (int)Win32.Msgs.WM_LBUTTONUP)
+          EndDrag(false);
+        else if (m.Msg == (int)Win32.Msgs.WM_CAPTURECHANGED)
+          EndDrag(true);
+        else if (m.Msg == (int)Win32.Msgs.WM_KEYDOWN && (int)m.WParam == (int)Keys.Escape)
+          EndDrag(true);
 
-                return OnPreFilterMessage(ref m);
-            }
+        return OnPreFilterMessage(ref m);
+      }
 
-            protected virtual bool OnPreFilterMessage(ref Message m)
-            {
-                return false;
-            }
+      protected virtual bool OnPreFilterMessage(ref Message m) {
+        return false;
+      }
 
-            protected sealed override void WndProc(ref Message m)
-            {
-                if (m.Msg == (int)Win32.Msgs.WM_CANCELMODE || m.Msg == (int)Win32.Msgs.WM_CAPTURECHANGED)
-                    EndDrag(true);
+      protected sealed override void WndProc(ref Message m) {
+        if (m.Msg == (int)Win32.Msgs.WM_CANCELMODE || m.Msg == (int)Win32.Msgs.WM_CAPTURECHANGED)
+          EndDrag(true);
 
-                base.WndProc(ref m);
-            }
-        }
+        base.WndProc(ref m);
+      }
+    }
 
-        private abstract class DragHandler : DragHandlerBase
-        {
-            private DockPanel m_dockPanel;
+    private abstract class DragHandler : DragHandlerBase {
+      private DockPanel m_dockPanel;
 
-            protected DragHandler(DockPanel dockPanel)
-            {
-                m_dockPanel = dockPanel;
-            }
+      protected DragHandler(DockPanel dockPanel) {
+        m_dockPanel = dockPanel;
+      }
 
-            public DockPanel DockPanel
-            {
-                get { return m_dockPanel; }
-            }
+      public DockPanel DockPanel {
+        get { return m_dockPanel; }
+      }
 
-            private IDragSource m_dragSource;
-            protected IDragSource DragSource
-            {
-                get { return m_dragSource; }
-                set { m_dragSource = value; }
-            }
+      private IDragSource m_dragSource;
+      protected IDragSource DragSource {
+        get { return m_dragSource; }
+        set { m_dragSource = value; }
+      }
 
-            protected sealed override Control DragControl
-            {
-                get { return DragSource == null ? null : DragSource.DragControl; }
-            }
+      protected sealed override Control DragControl {
+        get { return DragSource == null ? null : DragSource.DragControl; }
+      }
 
-            protected sealed override bool OnPreFilterMessage(ref Message m)
-            {
-                if ((m.Msg == (int)Win32.Msgs.WM_KEYDOWN || m.Msg == (int)Win32.Msgs.WM_KEYUP) &&
-                    ((int)m.WParam == (int)Keys.ControlKey || (int)m.WParam == (int)Keys.ShiftKey))
-                    OnDragging();
+      protected sealed override bool OnPreFilterMessage(ref Message m) {
+        if ((m.Msg == (int)Win32.Msgs.WM_KEYDOWN || m.Msg == (int)Win32.Msgs.WM_KEYUP) &&
+            ((int)m.WParam == (int)Keys.ControlKey || (int)m.WParam == (int)Keys.ShiftKey))
+          OnDragging();
 
-                return base.OnPreFilterMessage(ref m);
-            }
-        }
+        return base.OnPreFilterMessage(ref m);
+      }
     }
+  }
 }
Index: /trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.WinFormsUI/2.3.1/WinFormsUI-2.3.1/Docking/DockPanel.FocusManager.cs
===================================================================
--- /trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.WinFormsUI/2.3.1/WinFormsUI-2.3.1/Docking/DockPanel.FocusManager.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.WinFormsUI/2.3.1/WinFormsUI-2.3.1/Docking/DockPanel.FocusManager.cs	(revision 4068)
@@ -1,568 +1,496 @@
 using System;
 using System.Collections.Generic;
-using System.Text;
 using System.ComponentModel;
+using System.Diagnostics.CodeAnalysis;
 using System.Runtime.InteropServices;
 using System.Windows.Forms;
-using System.Diagnostics.CodeAnalysis;
-
-namespace WeifenLuo.WinFormsUI.Docking
-{
-    internal interface IContentFocusManager
-    {
-        void Activate(IDockContent content);
-        void GiveUpFocus(IDockContent content);
-        void AddToList(IDockContent content);
-        void RemoveFromList(IDockContent content);
-    }
-
-    partial class DockPanel
-    {
-        private interface IFocusManager
-        {
-            void SuspendFocusTracking();
-            void ResumeFocusTracking();
-            bool IsFocusTrackingSuspended { get; }
-            IDockContent ActiveContent { get; }
-            DockPane ActivePane { get; }
-            IDockContent ActiveDocument { get; }
-            DockPane ActiveDocumentPane { get; }
-        }
-
-        private class FocusManagerImpl : Component, IContentFocusManager, IFocusManager
-        {
-            private class HookEventArgs : EventArgs
-            {
-                [SuppressMessage("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")]
-                public int HookCode;
-                [SuppressMessage("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")]
-                public IntPtr wParam;
-                public IntPtr lParam;
-            }
-
-            private class LocalWindowsHook : IDisposable
-            {
-                // Internal properties
-                private IntPtr m_hHook = IntPtr.Zero;
-                private NativeMethods.HookProc m_filterFunc = null;
-                private Win32.HookType m_hookType;
-
-                // Event delegate
-                public delegate void HookEventHandler(object sender, HookEventArgs e);
-
-                // Event: HookInvoked 
-                public event HookEventHandler HookInvoked;
-                protected void OnHookInvoked(HookEventArgs e)
-                {
-                    if (HookInvoked != null)
-                        HookInvoked(this, e);
-                }
-
-                public LocalWindowsHook(Win32.HookType hook)
-                {
-                    m_hookType = hook;
-                    m_filterFunc = new NativeMethods.HookProc(this.CoreHookProc);
-                }
-
-                // Default filter function
-                public IntPtr CoreHookProc(int code, IntPtr wParam, IntPtr lParam)
-                {
-                    if (code < 0)
-                        return NativeMethods.CallNextHookEx(m_hHook, code, wParam, lParam);
-
-                    // Let clients determine what to do
-                    HookEventArgs e = new HookEventArgs();
-                    e.HookCode = code;
-                    e.wParam = wParam;
-                    e.lParam = lParam;
-                    OnHookInvoked(e);
-
-                    // Yield to the next hook in the chain
-                    return NativeMethods.CallNextHookEx(m_hHook, code, wParam, lParam);
-                }
-
-                // Install the hook
-                public void Install()
-                {
-                    if (m_hHook != IntPtr.Zero)
-                        Uninstall();
-
-                    int threadId = NativeMethods.GetCurrentThreadId();
-                    m_hHook = NativeMethods.SetWindowsHookEx(m_hookType, m_filterFunc, IntPtr.Zero, threadId);
-                }
-
-                // Uninstall the hook
-                public void Uninstall()
-                {
-                    if (m_hHook != IntPtr.Zero)
-                    {
-                        NativeMethods.UnhookWindowsHookEx(m_hHook);
-                        m_hHook = IntPtr.Zero;
-                    }
-                }
-
-                ~LocalWindowsHook()
-                {
-                    Dispose(false);
-                }
-
-                public void Dispose()
-                {
-                    Dispose(true);
-                    GC.SuppressFinalize(this);
-                }
-
-                protected virtual void Dispose(bool disposing)
-                {
-                    Uninstall();
-                }
-            }
-
-            private LocalWindowsHook m_localWindowsHook;
-            private LocalWindowsHook.HookEventHandler m_hookEventHandler;
-
-            public FocusManagerImpl(DockPanel dockPanel)
-            {
-                m_dockPanel = dockPanel;
-                m_localWindowsHook = new LocalWindowsHook(Win32.HookType.WH_CALLWNDPROCRET);
-                m_hookEventHandler = new LocalWindowsHook.HookEventHandler(HookEventHandler);
-                m_localWindowsHook.HookInvoked += m_hookEventHandler;
-                m_localWindowsHook.Install();
-            }
-
-            private DockPanel m_dockPanel;
-            public DockPanel DockPanel
-            {
-                get { return m_dockPanel; }
-            }
-
-            private bool m_disposed = false;
-            protected override void Dispose(bool disposing)
-            {
-                lock (this)
-                {
-                    if (!m_disposed && disposing)
-                    {
-                        m_localWindowsHook.Dispose();
-                        m_disposed = true;
-                    }
-
-                    base.Dispose(disposing);
-                }
-            }
-
-            private IDockContent m_contentActivating = null;
-            private IDockContent ContentActivating
-            {
-                get { return m_contentActivating; }
-                set { m_contentActivating = value; }
-            }
-
-            public void Activate(IDockContent content)
-            {
-                if (IsFocusTrackingSuspended)
-                {
-                    ContentActivating = content;
-                    return;
-                }
-
-                if (content == null)
-                    return;
-                DockContentHandler handler = content.DockHandler;
-                if (handler.Form.IsDisposed)
-                    return; // Should not reach here, but better than throwing an exception
-                if (ContentContains(content, handler.ActiveWindowHandle))
-                    NativeMethods.SetFocus(handler.ActiveWindowHandle);
-                if (!handler.Form.ContainsFocus)
-                {
-                    if (!handler.Form.SelectNextControl(handler.Form.ActiveControl, true, true, true, true))
-                        // Since DockContent Form is not selectalbe, use Win32 SetFocus instead
-                        NativeMethods.SetFocus(handler.Form.Handle);
-                }
-            }
-
-            private List<IDockContent> m_listContent = new List<IDockContent>();
-            private List<IDockContent> ListContent
-            {
-                get { return m_listContent; }
-            }
-            public void AddToList(IDockContent content)
-            {
-                if (ListContent.Contains(content) || IsInActiveList(content))
-                    return;
-
-                ListContent.Add(content);
-            }
-
-            public void RemoveFromList(IDockContent content)
-            {
-                if (IsInActiveList(content))
-                    RemoveFromActiveList(content);
-                if (ListContent.Contains(content))
-                    ListContent.Remove(content);
-            }
-
-            private IDockContent m_lastActiveContent = null;
-            private IDockContent LastActiveContent
-            {
-                get { return m_lastActiveContent; }
-                set { m_lastActiveContent = value; }
-            }
-
-            private bool IsInActiveList(IDockContent content)
-            {
-                return !(content.DockHandler.NextActive == null && LastActiveContent != content);
-            }
-
-            private void AddLastToActiveList(IDockContent content)
-            {
-                IDockContent last = LastActiveContent;
-                if (last == content)
-                    return;
-
-                DockContentHandler handler = content.DockHandler;
-
-                if (IsInActiveList(content))
-                    RemoveFromActiveList(content);
-
-                handler.PreviousActive = last;
-                handler.NextActive = null;
-                LastActiveContent = content;
-                if (last != null)
-                    last.DockHandler.NextActive = LastActiveContent;
-            }
-
-            private void RemoveFromActiveList(IDockContent content)
-            {
-                if (LastActiveContent == content)
-                    LastActiveContent = content.DockHandler.PreviousActive;
-
-                IDockContent prev = content.DockHandler.PreviousActive;
-                IDockContent next = content.DockHandler.NextActive;
-                if (prev != null)
-                    prev.DockHandler.NextActive = next;
-                if (next != null)
-                    next.DockHandler.PreviousActive = prev;
-
-                content.DockHandler.PreviousActive = null;
-                content.DockHandler.NextActive = null;
-            }
-
-            public void GiveUpFocus(IDockContent content)
-            {
-                DockContentHandler handler = content.DockHandler;
-                if (!handler.Form.ContainsFocus)
-                    return;
-
-                if (IsFocusTrackingSuspended)
-                    DockPanel.DummyControl.Focus();
-
-                if (LastActiveContent == content)
-                {
-                    IDockContent prev = handler.PreviousActive;
-                    if (prev != null)
-                        Activate(prev);
-                    else if (ListContent.Count > 0)
-                        Activate(ListContent[ListContent.Count - 1]);
-                }
-                else if (LastActiveContent != null)
-                    Activate(LastActiveContent);
-                else if (ListContent.Count > 0)
-                    Activate(ListContent[ListContent.Count - 1]);
-            }
-
-            private static bool ContentContains(IDockContent content, IntPtr hWnd)
-            {
-                Control control = Control.FromChildHandle(hWnd);
-                for (Control parent = control; parent != null; parent = parent.Parent)
-                    if (parent == content.DockHandler.Form)
-                        return true;
-
-                return false;
-            }
-
-            private int m_countSuspendFocusTracking = 0;
-            public void SuspendFocusTracking()
-            {
-                m_countSuspendFocusTracking++;
-                m_localWindowsHook.HookInvoked -= m_hookEventHandler;
-            }
-
-            public void ResumeFocusTracking()
-            {
-                if (m_countSuspendFocusTracking > 0)
-                    m_countSuspendFocusTracking--;
-
-                if (m_countSuspendFocusTracking == 0)
-                {
-                    if (ContentActivating != null)
-                    {
-                        Activate(ContentActivating);
-                        ContentActivating = null;
-                    }
-                    m_localWindowsHook.HookInvoked += m_hookEventHandler;
-                    if (!InRefreshActiveWindow)
-                        RefreshActiveWindow();
-                }
-            }
-
-            public bool IsFocusTrackingSuspended
-            {
-                get { return m_countSuspendFocusTracking != 0; }
-            }
-
-            // Windows hook event handler
-            private void HookEventHandler(object sender, HookEventArgs e)
-            {
-                Win32.Msgs msg = (Win32.Msgs)Marshal.ReadInt32(e.lParam, IntPtr.Size * 3);
-
-                if (msg == Win32.Msgs.WM_KILLFOCUS)
-                {
-                    IntPtr wParam = Marshal.ReadIntPtr(e.lParam, IntPtr.Size * 2);
-                    DockPane pane = GetPaneFromHandle(wParam);
-                    if (pane == null)
-                        RefreshActiveWindow();
-                }
-                else if (msg == Win32.Msgs.WM_SETFOCUS)
-                    RefreshActiveWindow();
-            }
-
-            private DockPane GetPaneFromHandle(IntPtr hWnd)
-            {
-                Control control = Control.FromChildHandle(hWnd);
-
-                IDockContent content = null;
-                DockPane pane = null;
-                for (; control != null; control = control.Parent)
-                {
-                    content = control as IDockContent;
-                    if (content != null)
-                        content.DockHandler.ActiveWindowHandle = hWnd;
-
-                    if (content != null && content.DockHandler.DockPanel == DockPanel)
-                        return content.DockHandler.Pane;
-
-                    pane = control as DockPane;
-                    if (pane != null && pane.DockPanel == DockPanel)
-                        break;
-                }
-
-                return pane;
-            }
-
-            private bool m_inRefreshActiveWindow = false;
-            private bool InRefreshActiveWindow
-            {
-                get { return m_inRefreshActiveWindow; }
-            }
-
-            private void RefreshActiveWindow()
-            {
-                SuspendFocusTracking();
-                m_inRefreshActiveWindow = true;
-
-                DockPane oldActivePane = ActivePane;
-                IDockContent oldActiveContent = ActiveContent;
-                IDockContent oldActiveDocument = ActiveDocument;
-
-                SetActivePane();
-                SetActiveContent();
-                SetActiveDocumentPane();
-                SetActiveDocument();
-                DockPanel.AutoHideWindow.RefreshActivePane();
-
-                ResumeFocusTracking();
-                m_inRefreshActiveWindow = false;
-
-                if (oldActiveContent != ActiveContent)
-                    DockPanel.OnActiveContentChanged(EventArgs.Empty);
-                if (oldActiveDocument != ActiveDocument)
-                    DockPanel.OnActiveDocumentChanged(EventArgs.Empty);
-                if (oldActivePane != ActivePane)
-                    DockPanel.OnActivePaneChanged(EventArgs.Empty);
-            }
-
-            private DockPane m_activePane = null;
-            public DockPane ActivePane
-            {
-                get { return m_activePane; }
-            }
-
-            private void SetActivePane()
-            {
-                DockPane value = GetPaneFromHandle(NativeMethods.GetFocus());
-                if (m_activePane == value)
-                    return;
-
-                if (m_activePane != null)
-                    m_activePane.SetIsActivated(false);
-
-                m_activePane = value;
-
-                if (m_activePane != null)
-                    m_activePane.SetIsActivated(true);
-            }
-
-            private IDockContent m_activeContent = null;
-            public IDockContent ActiveContent
-            {
-                get { return m_activeContent; }
-            }
-
-            internal void SetActiveContent()
-            {
-                IDockContent value = ActivePane == null ? null : ActivePane.ActiveContent;
-
-                if (m_activeContent == value)
-                    return;
-
-                if (m_activeContent != null)
-                    m_activeContent.DockHandler.IsActivated = false;
-
-                m_activeContent = value;
-
-                if (m_activeContent != null)
-                {
-                    m_activeContent.DockHandler.IsActivated = true;
-                    if (!DockHelper.IsDockStateAutoHide((m_activeContent.DockHandler.DockState)))
-                        AddLastToActiveList(m_activeContent);
-                }
-            }
-
-            private DockPane m_activeDocumentPane = null;
-            public DockPane ActiveDocumentPane
-            {
-                get { return m_activeDocumentPane; }
-            }
-
-            private void SetActiveDocumentPane()
-            {
-                DockPane value = null;
-
-                if (ActivePane != null && ActivePane.DockState == DockState.Document)
-                    value = ActivePane;
-
-                if (value == null && DockPanel.DockWindows != null)
-                {
-                    if (ActiveDocumentPane == null)
-                        value = DockPanel.DockWindows[DockState.Document].DefaultPane;
-                    else if (ActiveDocumentPane.DockPanel != DockPanel || ActiveDocumentPane.DockState != DockState.Document)
-                        value = DockPanel.DockWindows[DockState.Document].DefaultPane;
-                    else
-                        value = ActiveDocumentPane;
-                }
-
-                if (m_activeDocumentPane == value)
-                    return;
-
-                if (m_activeDocumentPane != null)
-                    m_activeDocumentPane.SetIsActiveDocumentPane(false);
-
-                m_activeDocumentPane = value;
-
-                if (m_activeDocumentPane != null)
-                    m_activeDocumentPane.SetIsActiveDocumentPane(true);
-            }
-
-            private IDockContent m_activeDocument = null;
-            public IDockContent ActiveDocument
-            {
-                get { return m_activeDocument; }
-            }
-
-            private void SetActiveDocument()
-            {
-                IDockContent value = ActiveDocumentPane == null ? null : ActiveDocumentPane.ActiveContent;
-
-                if (m_activeDocument == value)
-                    return;
-
-                m_activeDocument = value;
-            }
-        }
-
-        private IFocusManager FocusManager
-        {
-            get { return m_focusManager; }
-        }
-
-        internal IContentFocusManager ContentFocusManager
-        {
-            get { return m_focusManager; }
-        }
-
-        internal void SaveFocus()
-        {
-            DummyControl.Focus();
-        }
-
-        [Browsable(false)]
-        public IDockContent ActiveContent
-        {
-            get { return FocusManager.ActiveContent; }
-        }
-
-        [Browsable(false)]
-        public DockPane ActivePane
-        {
-            get { return FocusManager.ActivePane; }
-        }
-
-        [Browsable(false)]
-        public IDockContent ActiveDocument
-        {
-            get { return FocusManager.ActiveDocument; }
-        }
-
-        [Browsable(false)]
-        public DockPane ActiveDocumentPane
-        {
-            get { return FocusManager.ActiveDocumentPane; }
-        }
-
-        private static readonly object ActiveDocumentChangedEvent = new object();
-        [LocalizedCategory("Category_PropertyChanged")]
-        [LocalizedDescription("DockPanel_ActiveDocumentChanged_Description")]
-        public event EventHandler ActiveDocumentChanged
-        {
-            add { Events.AddHandler(ActiveDocumentChangedEvent, value); }
-            remove { Events.RemoveHandler(ActiveDocumentChangedEvent, value); }
-        }
-        protected virtual void OnActiveDocumentChanged(EventArgs e)
-        {
-            EventHandler handler = (EventHandler)Events[ActiveDocumentChangedEvent];
-            if (handler != null)
-                handler(this, e);
-        }
-
-        private static readonly object ActiveContentChangedEvent = new object();
-        [LocalizedCategory("Category_PropertyChanged")]
-        [LocalizedDescription("DockPanel_ActiveContentChanged_Description")]
-        public event EventHandler ActiveContentChanged
-        {
-            add { Events.AddHandler(ActiveContentChangedEvent, value); }
-            remove { Events.RemoveHandler(ActiveContentChangedEvent, value); }
-        }
-        protected void OnActiveContentChanged(EventArgs e)
-        {
-            EventHandler handler = (EventHandler)Events[ActiveContentChangedEvent];
-            if (handler != null)
-                handler(this, e);
-        }
-
-        private static readonly object ActivePaneChangedEvent = new object();
-        [LocalizedCategory("Category_PropertyChanged")]
-        [LocalizedDescription("DockPanel_ActivePaneChanged_Description")]
-        public event EventHandler ActivePaneChanged
-        {
-            add { Events.AddHandler(ActivePaneChangedEvent, value); }
-            remove { Events.RemoveHandler(ActivePaneChangedEvent, value); }
-        }
-        protected virtual void OnActivePaneChanged(EventArgs e)
-        {
-            EventHandler handler = (EventHandler)Events[ActivePaneChangedEvent];
-            if (handler != null)
-                handler(this, e);
-        }
-    }
+
+namespace WeifenLuo.WinFormsUI.Docking {
+  internal interface IContentFocusManager {
+    void Activate(IDockContent content);
+    void GiveUpFocus(IDockContent content);
+    void AddToList(IDockContent content);
+    void RemoveFromList(IDockContent content);
+  }
+
+  partial class DockPanel {
+    private interface IFocusManager {
+      void SuspendFocusTracking();
+      void ResumeFocusTracking();
+      bool IsFocusTrackingSuspended { get; }
+      IDockContent ActiveContent { get; }
+      DockPane ActivePane { get; }
+      IDockContent ActiveDocument { get; }
+      DockPane ActiveDocumentPane { get; }
+    }
+
+    private class FocusManagerImpl : Component, IContentFocusManager, IFocusManager {
+      private class HookEventArgs : EventArgs {
+        [SuppressMessage("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")]
+        public int HookCode;
+        [SuppressMessage("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")]
+        public IntPtr wParam;
+        public IntPtr lParam;
+      }
+
+      private class LocalWindowsHook : IDisposable {
+        // Internal properties
+        private IntPtr m_hHook = IntPtr.Zero;
+        private NativeMethods.HookProc m_filterFunc = null;
+        private Win32.HookType m_hookType;
+
+        // Event delegate
+        public delegate void HookEventHandler(object sender, HookEventArgs e);
+
+        // Event: HookInvoked 
+        public event HookEventHandler HookInvoked;
+        protected void OnHookInvoked(HookEventArgs e) {
+          if (HookInvoked != null)
+            HookInvoked(this, e);
+        }
+
+        public LocalWindowsHook(Win32.HookType hook) {
+          m_hookType = hook;
+          m_filterFunc = new NativeMethods.HookProc(this.CoreHookProc);
+        }
+
+        // Default filter function
+        public IntPtr CoreHookProc(int code, IntPtr wParam, IntPtr lParam) {
+          if (code < 0)
+            return NativeMethods.CallNextHookEx(m_hHook, code, wParam, lParam);
+
+          // Let clients determine what to do
+          HookEventArgs e = new HookEventArgs();
+          e.HookCode = code;
+          e.wParam = wParam;
+          e.lParam = lParam;
+          OnHookInvoked(e);
+
+          // Yield to the next hook in the chain
+          return NativeMethods.CallNextHookEx(m_hHook, code, wParam, lParam);
+        }
+
+        // Install the hook
+        public void Install() {
+          if (m_hHook != IntPtr.Zero)
+            Uninstall();
+
+          int threadId = NativeMethods.GetCurrentThreadId();
+          m_hHook = NativeMethods.SetWindowsHookEx(m_hookType, m_filterFunc, IntPtr.Zero, threadId);
+        }
+
+        // Uninstall the hook
+        public void Uninstall() {
+          if (m_hHook != IntPtr.Zero) {
+            NativeMethods.UnhookWindowsHookEx(m_hHook);
+            m_hHook = IntPtr.Zero;
+          }
+        }
+
+        ~LocalWindowsHook() {
+          Dispose(false);
+        }
+
+        public void Dispose() {
+          Dispose(true);
+          GC.SuppressFinalize(this);
+        }
+
+        protected virtual void Dispose(bool disposing) {
+          Uninstall();
+        }
+      }
+
+      private LocalWindowsHook m_localWindowsHook;
+      private LocalWindowsHook.HookEventHandler m_hookEventHandler;
+
+      public FocusManagerImpl(DockPanel dockPanel) {
+        m_dockPanel = dockPanel;
+        m_localWindowsHook = new LocalWindowsHook(Win32.HookType.WH_CALLWNDPROCRET);
+        m_hookEventHandler = new LocalWindowsHook.HookEventHandler(HookEventHandler);
+        m_localWindowsHook.HookInvoked += m_hookEventHandler;
+        m_localWindowsHook.Install();
+      }
+
+      private DockPanel m_dockPanel;
+      public DockPanel DockPanel {
+        get { return m_dockPanel; }
+      }
+
+      private bool m_disposed = false;
+      protected override void Dispose(bool disposing) {
+        lock (this) {
+          if (!m_disposed && disposing) {
+            m_localWindowsHook.Dispose();
+            m_disposed = true;
+          }
+
+          base.Dispose(disposing);
+        }
+      }
+
+      private IDockContent m_contentActivating = null;
+      private IDockContent ContentActivating {
+        get { return m_contentActivating; }
+        set { m_contentActivating = value; }
+      }
+
+      public void Activate(IDockContent content) {
+        if (IsFocusTrackingSuspended) {
+          ContentActivating = content;
+          return;
+        }
+
+        if (content == null)
+          return;
+        DockContentHandler handler = content.DockHandler;
+        if (handler.Form.IsDisposed)
+          return; // Should not reach here, but better than throwing an exception
+        if (ContentContains(content, handler.ActiveWindowHandle))
+          NativeMethods.SetFocus(handler.ActiveWindowHandle);
+        if (!handler.Form.ContainsFocus) {
+          if (!handler.Form.SelectNextControl(handler.Form.ActiveControl, true, true, true, true))
+            // Since DockContent Form is not selectalbe, use Win32 SetFocus instead
+            NativeMethods.SetFocus(handler.Form.Handle);
+        }
+      }
+
+      private List<IDockContent> m_listContent = new List<IDockContent>();
+      private List<IDockContent> ListContent {
+        get { return m_listContent; }
+      }
+      public void AddToList(IDockContent content) {
+        if (ListContent.Contains(content) || IsInActiveList(content))
+          return;
+
+        ListContent.Add(content);
+      }
+
+      public void RemoveFromList(IDockContent content) {
+        if (IsInActiveList(content))
+          RemoveFromActiveList(content);
+        if (ListContent.Contains(content))
+          ListContent.Remove(content);
+      }
+
+      private IDockContent m_lastActiveContent = null;
+      private IDockContent LastActiveContent {
+        get { return m_lastActiveContent; }
+        set { m_lastActiveContent = value; }
+      }
+
+      private bool IsInActiveList(IDockContent content) {
+        return !(content.DockHandler.NextActive == null && LastActiveContent != content);
+      }
+
+      private void AddLastToActiveList(IDockContent content) {
+        IDockContent last = LastActiveContent;
+        if (last == content)
+          return;
+
+        DockContentHandler handler = content.DockHandler;
+
+        if (IsInActiveList(content))
+          RemoveFromActiveList(content);
+
+        handler.PreviousActive = last;
+        handler.NextActive = null;
+        LastActiveContent = content;
+        if (last != null)
+          last.DockHandler.NextActive = LastActiveContent;
+      }
+
+      private void RemoveFromActiveList(IDockContent content) {
+        if (LastActiveContent == content)
+          LastActiveContent = content.DockHandler.PreviousActive;
+
+        IDockContent prev = content.DockHandler.PreviousActive;
+        IDockContent next = content.DockHandler.NextActive;
+        if (prev != null)
+          prev.DockHandler.NextActive = next;
+        if (next != null)
+          next.DockHandler.PreviousActive = prev;
+
+        content.DockHandler.PreviousActive = null;
+        content.DockHandler.NextActive = null;
+      }
+
+      public void GiveUpFocus(IDockContent content) {
+        DockContentHandler handler = content.DockHandler;
+        if (!handler.Form.ContainsFocus)
+          return;
+
+        if (IsFocusTrackingSuspended)
+          DockPanel.DummyControl.Focus();
+
+        if (LastActiveContent == content) {
+          IDockContent prev = handler.PreviousActive;
+          if (prev != null)
+            Activate(prev);
+          else if (ListContent.Count > 0)
+            Activate(ListContent[ListContent.Count - 1]);
+        } else if (LastActiveContent != null)
+          Activate(LastActiveContent);
+        else if (ListContent.Count > 0)
+          Activate(ListContent[ListContent.Count - 1]);
+      }
+
+      private static bool ContentContains(IDockContent content, IntPtr hWnd) {
+        Control control = Control.FromChildHandle(hWnd);
+        for (Control parent = control; parent != null; parent = parent.Parent)
+          if (parent == content.DockHandler.Form)
+            return true;
+
+        return false;
+      }
+
+      private int m_countSuspendFocusTracking = 0;
+      public void SuspendFocusTracking() {
+        m_countSuspendFocusTracking++;
+        m_localWindowsHook.HookInvoked -= m_hookEventHandler;
+      }
+
+      public void ResumeFocusTracking() {
+        if (m_countSuspendFocusTracking > 0)
+          m_countSuspendFocusTracking--;
+
+        if (m_countSuspendFocusTracking == 0) {
+          if (ContentActivating != null) {
+            Activate(ContentActivating);
+            ContentActivating = null;
+          }
+          m_localWindowsHook.HookInvoked += m_hookEventHandler;
+          if (!InRefreshActiveWindow)
+            RefreshActiveWindow();
+        }
+      }
+
+      public bool IsFocusTrackingSuspended {
+        get { return m_countSuspendFocusTracking != 0; }
+      }
+
+      // Windows hook event handler
+      private void HookEventHandler(object sender, HookEventArgs e) {
+        Win32.Msgs msg = (Win32.Msgs)Marshal.ReadInt32(e.lParam, IntPtr.Size * 3);
+
+        if (msg == Win32.Msgs.WM_KILLFOCUS) {
+          IntPtr wParam = Marshal.ReadIntPtr(e.lParam, IntPtr.Size * 2);
+          DockPane pane = GetPaneFromHandle(wParam);
+          if (pane == null)
+            RefreshActiveWindow();
+        } else if (msg == Win32.Msgs.WM_SETFOCUS)
+          RefreshActiveWindow();
+      }
+
+      private DockPane GetPaneFromHandle(IntPtr hWnd) {
+        Control control = Control.FromChildHandle(hWnd);
+
+        IDockContent content = null;
+        DockPane pane = null;
+        for (; control != null; control = control.Parent) {
+          content = control as IDockContent;
+          if (content != null)
+            content.DockHandler.ActiveWindowHandle = hWnd;
+
+          if (content != null && content.DockHandler.DockPanel == DockPanel)
+            return content.DockHandler.Pane;
+
+          pane = control as DockPane;
+          if (pane != null && pane.DockPanel == DockPanel)
+            break;
+        }
+
+        return pane;
+      }
+
+      private bool m_inRefreshActiveWindow = false;
+      private bool InRefreshActiveWindow {
+        get { return m_inRefreshActiveWindow; }
+      }
+
+      private void RefreshActiveWindow() {
+        SuspendFocusTracking();
+        m_inRefreshActiveWindow = true;
+
+        DockPane oldActivePane = ActivePane;
+        IDockContent oldActiveContent = ActiveContent;
+        IDockContent oldActiveDocument = ActiveDocument;
+
+        SetActivePane();
+        SetActiveContent();
+        SetActiveDocumentPane();
+        SetActiveDocument();
+        DockPanel.AutoHideWindow.RefreshActivePane();
+
+        ResumeFocusTracking();
+        m_inRefreshActiveWindow = false;
+
+        if (oldActiveContent != ActiveContent)
+          DockPanel.OnActiveContentChanged(EventArgs.Empty);
+        if (oldActiveDocument != ActiveDocument)
+          DockPanel.OnActiveDocumentChanged(EventArgs.Empty);
+        if (oldActivePane != ActivePane)
+          DockPanel.OnActivePaneChanged(EventArgs.Empty);
+      }
+
+      private DockPane m_activePane = null;
+      public DockPane ActivePane {
+        get { return m_activePane; }
+      }
+
+      private void SetActivePane() {
+        DockPane value = GetPaneFromHandle(NativeMethods.GetFocus());
+        if (m_activePane == value)
+          return;
+
+        if (m_activePane != null)
+          m_activePane.SetIsActivated(false);
+
+        m_activePane = value;
+
+        if (m_activePane != null)
+          m_activePane.SetIsActivated(true);
+      }
+
+      private IDockContent m_activeContent = null;
+      public IDockContent ActiveContent {
+        get { return m_activeContent; }
+      }
+
+      internal void SetActiveContent() {
+        IDockContent value = ActivePane == null ? null : ActivePane.ActiveContent;
+
+        if (m_activeContent == value)
+          return;
+
+        if (m_activeContent != null)
+          m_activeContent.DockHandler.IsActivated = false;
+
+        m_activeContent = value;
+
+        if (m_activeContent != null) {
+          m_activeContent.DockHandler.IsActivated = true;
+          if (!DockHelper.IsDockStateAutoHide((m_activeContent.DockHandler.DockState)))
+            AddLastToActiveList(m_activeContent);
+        }
+      }
+
+      private DockPane m_activeDocumentPane = null;
+      public DockPane ActiveDocumentPane {
+        get { return m_activeDocumentPane; }
+      }
+
+      private void SetActiveDocumentPane() {
+        DockPane value = null;
+
+        if (ActivePane != null && ActivePane.DockState == DockState.Document)
+          value = ActivePane;
+
+        if (value == null && DockPanel.DockWindows != null) {
+          if (ActiveDocumentPane == null)
+            value = DockPanel.DockWindows[DockState.Document].DefaultPane;
+          else if (ActiveDocumentPane.DockPanel != DockPanel || ActiveDocumentPane.DockState != DockState.Document)
+            value = DockPanel.DockWindows[DockState.Document].DefaultPane;
+          else
+            value = ActiveDocumentPane;
+        }
+
+        if (m_activeDocumentPane == value)
+          return;
+
+        if (m_activeDocumentPane != null)
+          m_activeDocumentPane.SetIsActiveDocumentPane(false);
+
+        m_activeDocumentPane = value;
+
+        if (m_activeDocumentPane != null)
+          m_activeDocumentPane.SetIsActiveDocumentPane(true);
+      }
+
+      private IDockContent m_activeDocument = null;
+      public IDockContent ActiveDocument {
+        get { return m_activeDocument; }
+      }
+
+      private void SetActiveDocument() {
+        IDockContent value = ActiveDocumentPane == null ? null : ActiveDocumentPane.ActiveContent;
+
+        if (m_activeDocument == value)
+          return;
+
+        m_activeDocument = value;
+      }
+    }
+
+    private IFocusManager FocusManager {
+      get { return m_focusManager; }
+    }
+
+    internal IContentFocusManager ContentFocusManager {
+      get { return m_focusManager; }
+    }
+
+    internal void SaveFocus() {
+      DummyControl.Focus();
+    }
+
+    [Browsable(false)]
+    public IDockContent ActiveContent {
+      get { return FocusManager.ActiveContent; }
+    }
+
+    [Browsable(false)]
+    public DockPane ActivePane {
+      get { return FocusManager.ActivePane; }
+    }
+
+    [Browsable(false)]
+    public IDockContent ActiveDocument {
+      get { return FocusManager.ActiveDocument; }
+    }
+
+    [Browsable(false)]
+    public DockPane ActiveDocumentPane {
+      get { return FocusManager.ActiveDocumentPane; }
+    }
+
+    private static readonly object ActiveDocumentChangedEvent = new object();
+    [LocalizedCategory("Category_PropertyChanged")]
+    [LocalizedDescription("DockPanel_ActiveDocumentChanged_Description")]
+    public event EventHandler ActiveDocumentChanged {
+      add { Events.AddHandler(ActiveDocumentChangedEvent, value); }
+      remove { Events.RemoveHandler(ActiveDocumentChangedEvent, value); }
+    }
+    protected virtual void OnActiveDocumentChanged(EventArgs e) {
+      EventHandler handler = (EventHandler)Events[ActiveDocumentChangedEvent];
+      if (handler != null)
+        handler(this, e);
+    }
+
+    private static readonly object ActiveContentChangedEvent = new object();
+    [LocalizedCategory("Category_PropertyChanged")]
+    [LocalizedDescription("DockPanel_ActiveContentChanged_Description")]
+    public event EventHandler ActiveContentChanged {
+      add { Events.AddHandler(ActiveContentChangedEvent, value); }
+      remove { Events.RemoveHandler(ActiveContentChangedEvent, value); }
+    }
+    protected void OnActiveContentChanged(EventArgs e) {
+      EventHandler handler = (EventHandler)Events[ActiveContentChangedEvent];
+      if (handler != null)
+        handler(this, e);
+    }
+
+    private static readonly object ActivePaneChangedEvent = new object();
+    [LocalizedCategory("Category_PropertyChanged")]
+    [LocalizedDescription("DockPanel_ActivePaneChanged_Description")]
+    public event EventHandler ActivePaneChanged {
+      add { Events.AddHandler(ActivePaneChangedEvent, value); }
+      remove { Events.RemoveHandler(ActivePaneChangedEvent, value); }
+    }
+    protected virtual void OnActivePaneChanged(EventArgs e) {
+      EventHandler handler = (EventHandler)Events[ActivePaneChangedEvent];
+      if (handler != null)
+        handler(this, e);
+    }
+  }
 }
Index: /trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.WinFormsUI/2.3.1/WinFormsUI-2.3.1/Docking/DockPanel.MdiClientController.cs
===================================================================
--- /trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.WinFormsUI/2.3.1/WinFormsUI-2.3.1/Docking/DockPanel.MdiClientController.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.WinFormsUI/2.3.1/WinFormsUI-2.3.1/Docking/DockPanel.MdiClientController.cs	(revision 4068)
@@ -1,430 +1,374 @@
 using System;
+using System.ComponentModel;
+using System.ComponentModel.Design;
 using System.Drawing;
 using System.Windows.Forms;
-using System.ComponentModel;
-using System.ComponentModel.Design;
-using System.Runtime.InteropServices;
-
-namespace WeifenLuo.WinFormsUI.Docking
-{
-    partial class DockPanel
-    {
-        //  This class comes from Jacob Slusser's MdiClientController class:
-        //  http://www.codeproject.com/cs/miscctrl/mdiclientcontroller.asp
-        private class MdiClientController : NativeWindow, IComponent, IDisposable
-        {
-            private bool m_autoScroll = true;
-            private BorderStyle m_borderStyle = BorderStyle.Fixed3D;
-            private MdiClient m_mdiClient = null;
-            private Form m_parentForm = null;
-            private ISite m_site = null;
-
-            public MdiClientController()
-            {
-            }
-
-            public void Dispose()
-            {
-                Dispose(true);
-                GC.SuppressFinalize(this);
-            }
-
-            protected virtual void Dispose(bool disposing)
-            {
-                if (disposing)
-                {
-                    lock (this)
-                    {
-                        if (Site != null && Site.Container != null)
-                            Site.Container.Remove(this);
-
-                        if (Disposed != null)
-                            Disposed(this, EventArgs.Empty);
-                    }
-                }
-            }
-
-            public bool AutoScroll
-            {
-                get { return m_autoScroll; }
-                set
-                {
-                    // By default the MdiClient control scrolls. It can appear though that
-                    // there are no scrollbars by turning them off when the non-client
-                    // area is calculated. I decided to expose this method following
-                    // the .NET vernacular of an AutoScroll property.
-                    m_autoScroll = value;
-                    if (MdiClient != null)
-                        UpdateStyles();
-                }
-            }
-
-            public BorderStyle BorderStyle
-            {
-                set
-                {
-                    // Error-check the enum.
-                    if (!Enum.IsDefined(typeof(BorderStyle), value))
-                        throw new InvalidEnumArgumentException();
-
-                    m_borderStyle = value;
-
-                    if (MdiClient == null)
-                        return;
-
-                    // This property can actually be visible in design-mode,
-                    // but to keep it consistent with the others,
-                    // prevent this from being show at design-time.
-                    if (Site != null && Site.DesignMode)
-                        return;
-
-                    // There is no BorderStyle property exposed by the MdiClient class,
-                    // but this can be controlled by Win32 functions. A Win32 ExStyle
-                    // of WS_EX_CLIENTEDGE is equivalent to a Fixed3D border and a
-                    // Style of WS_BORDER is equivalent to a FixedSingle border.
-
-                    // This code is inspired Jason Dori's article:
-                    // "Adding designable borders to user controls".
-                    // http://www.codeproject.com/cs/miscctrl/CsAddingBorders.asp
-
-                    // Get styles using Win32 calls
-                    int style = NativeMethods.GetWindowLong(MdiClient.Handle, (int)Win32.GetWindowLongIndex.GWL_STYLE);
-                    int exStyle = NativeMethods.GetWindowLong(MdiClient.Handle, (int)Win32.GetWindowLongIndex.GWL_EXSTYLE);
-
-                    // Add or remove style flags as necessary.
-                    switch (m_borderStyle)
-                    {
-                        case BorderStyle.Fixed3D:
-                            exStyle |= (int)Win32.WindowExStyles.WS_EX_CLIENTEDGE;
-                            style &= ~((int)Win32.WindowStyles.WS_BORDER);
-                            break;
-
-                        case BorderStyle.FixedSingle:
-                            exStyle &= ~((int)Win32.WindowExStyles.WS_EX_CLIENTEDGE);
-                            style |= (int)Win32.WindowStyles.WS_BORDER;
-                            break;
-
-                        case BorderStyle.None:
-                            style &= ~((int)Win32.WindowStyles.WS_BORDER);
-                            exStyle &= ~((int)Win32.WindowExStyles.WS_EX_CLIENTEDGE);
-                            break;
-                    }
-
-                    // Set the styles using Win32 calls
-                    NativeMethods.SetWindowLong(MdiClient.Handle, (int)Win32.GetWindowLongIndex.GWL_STYLE, style);
-                    NativeMethods.SetWindowLong(MdiClient.Handle, (int)Win32.GetWindowLongIndex.GWL_EXSTYLE, exStyle);
-
-                    // Cause an update of the non-client area.
-                    UpdateStyles();
-                }
-            }
-
-            public MdiClient MdiClient
-            {
-                get { return m_mdiClient; }
-            }
-
-            [Browsable(false)]
-            public Form ParentForm
-            {
-                get { return m_parentForm; }
-                set
-                {
-                    // If the ParentForm has previously been set,
-                    // unwire events connected to the old parent.
-                    if (m_parentForm != null)
-                    {
-                        m_parentForm.HandleCreated -= new EventHandler(ParentFormHandleCreated);
-                        m_parentForm.MdiChildActivate -= new EventHandler(ParentFormMdiChildActivate);
-                    }
-
-                    m_parentForm = value;
-
-                    if (m_parentForm == null)
-                        return;
-
-                    // If the parent form has not been created yet,
-                    // wait to initialize the MDI client until it is.
-                    if (m_parentForm.IsHandleCreated)
-                    {
-                        InitializeMdiClient();
-                        RefreshProperties();
-                    }
-                    else
-                        m_parentForm.HandleCreated += new EventHandler(ParentFormHandleCreated);
-
-                    m_parentForm.MdiChildActivate += new EventHandler(ParentFormMdiChildActivate);
-                }
-            }
-
-            public ISite Site
-            {
-                get { return m_site; }
-                set
-                {
-                    m_site = value;
-
-                    if (m_site == null)
-                        return;
-
-                    // If the component is dropped onto a form during design-time,
-                    // set the ParentForm property.
-                    IDesignerHost host = (value.GetService(typeof(IDesignerHost)) as IDesignerHost);
-                    if (host != null)
-                    {
-                        Form parent = host.RootComponent as Form;
-                        if (parent != null)
-                            ParentForm = parent;
-                    }
-                }
-            }
-
-            public void RenewMdiClient()
-            {
-                // Reinitialize the MdiClient and its properties.
-                InitializeMdiClient();
-                RefreshProperties();
-            }
-
-            public event EventHandler Disposed;
-
-            public event EventHandler HandleAssigned;
-
-            public event EventHandler MdiChildActivate;
-
-            public event LayoutEventHandler Layout;
-
-            protected virtual void OnHandleAssigned(EventArgs e)
-            {
-                // Raise the HandleAssigned event.
-                if (HandleAssigned != null)
-                    HandleAssigned(this, e);
-            }
-
-            protected virtual void OnMdiChildActivate(EventArgs e)
-            {
-                // Raise the MdiChildActivate event
-                if (MdiChildActivate != null)
-                    MdiChildActivate(this, e);
-            }
-
-            protected virtual void OnLayout(LayoutEventArgs e)
-            {
-                // Raise the Layout event
-                if (Layout != null)
-                    Layout(this, e);
-            }
-
-            public event PaintEventHandler Paint;
-
-            protected virtual void OnPaint(PaintEventArgs e)
-            {
-                // Raise the Paint event.
-                if (Paint != null)
-                    Paint(this, e);
-            }
-
-            protected override void WndProc(ref Message m)
-            {
-                switch (m.Msg)
-                {
-                    case (int)Win32.Msgs.WM_NCCALCSIZE:
-                        // If AutoScroll is set to false, hide the scrollbars when the control
-                        // calculates its non-client area.
-                        if (!AutoScroll)
-                            NativeMethods.ShowScrollBar(m.HWnd, (int)Win32.ScrollBars.SB_BOTH, 0 /*false*/);
-                        break;
-                }
-
-                base.WndProc(ref m);
-            }
-
-            private void ParentFormHandleCreated(object sender, EventArgs e)
-            {
-                // The form has been created, unwire the event, and initialize the MdiClient.
-                this.m_parentForm.HandleCreated -= new EventHandler(ParentFormHandleCreated);
-                InitializeMdiClient();
-                RefreshProperties();
-            }
-
-            private void ParentFormMdiChildActivate(object sender, EventArgs e)
-            {
-                OnMdiChildActivate(e);
-            }
-
-            private void MdiClientLayout(object sender, LayoutEventArgs e)
-            {
-                OnLayout(e);
-            }
-
-            private void MdiClientHandleDestroyed(object sender, EventArgs e)
-            {
-                // If the MdiClient handle has been released, drop the reference and
-                // release the handle.
-                if (m_mdiClient != null)
-                {
-                    m_mdiClient.HandleDestroyed -= new EventHandler(MdiClientHandleDestroyed);
-                    m_mdiClient = null;
-                }
-
-                ReleaseHandle();
-            }
-
-            private void InitializeMdiClient()
-            {
-                // If the mdiClient has previously been set, unwire events connected
-                // to the old MDI.
-                if (MdiClient != null)
-                {
-                    MdiClient.HandleDestroyed -= new EventHandler(MdiClientHandleDestroyed);
-                    MdiClient.Layout -= new LayoutEventHandler(MdiClientLayout);
-                }
-
-                if (ParentForm == null)
-                    return;
-
-                // Get the MdiClient from the parent form.
-                foreach (Control control in ParentForm.Controls)
-                {
-                    // If the form is an MDI container, it will contain an MdiClient control
-                    // just as it would any other control.
-
-                    m_mdiClient = control as MdiClient;
-                    if (m_mdiClient == null)
-                        continue;
-
-                    // Assign the MdiClient Handle to the NativeWindow.
-                    ReleaseHandle();
-                    AssignHandle(MdiClient.Handle);
-
-                    // Raise the HandleAssigned event.
-                    OnHandleAssigned(EventArgs.Empty);
-
-                    // Monitor the MdiClient for when its handle is destroyed.
-                    MdiClient.HandleDestroyed += new EventHandler(MdiClientHandleDestroyed);
-                    MdiClient.Layout += new LayoutEventHandler(MdiClientLayout);
-
-                    break;
-                }
-            }
-
-            private void RefreshProperties()
-            {
-                // Refresh all the properties
-                BorderStyle = m_borderStyle;
-                AutoScroll = m_autoScroll;
-            }
-
-            private void UpdateStyles()
-            {
-                // To show style changes, the non-client area must be repainted. Using the
-                // control's Invalidate method does not affect the non-client area.
-                // Instead use a Win32 call to signal the style has changed.
-                NativeMethods.SetWindowPos(MdiClient.Handle, IntPtr.Zero, 0, 0, 0, 0,
-                    Win32.FlagsSetWindowPos.SWP_NOACTIVATE |
-                    Win32.FlagsSetWindowPos.SWP_NOMOVE |
-                    Win32.FlagsSetWindowPos.SWP_NOSIZE |
-                    Win32.FlagsSetWindowPos.SWP_NOZORDER |
-                    Win32.FlagsSetWindowPos.SWP_NOOWNERZORDER |
-                    Win32.FlagsSetWindowPos.SWP_FRAMECHANGED);
-            }
-        }
-
-        private MdiClientController m_mdiClientController = null;
-        private MdiClientController GetMdiClientController()
-        {
-            if (m_mdiClientController == null)
-            {
-                m_mdiClientController = new MdiClientController();
-                m_mdiClientController.HandleAssigned += new EventHandler(MdiClientHandleAssigned);
-                m_mdiClientController.MdiChildActivate += new EventHandler(ParentFormMdiChildActivate);
-                m_mdiClientController.Layout += new LayoutEventHandler(MdiClient_Layout);
-            }
-
-            return m_mdiClientController;
-        }
-
-        private void ParentFormMdiChildActivate(object sender, EventArgs e)
-        {
-            if (GetMdiClientController().ParentForm == null)
-                return;
-
-            IDockContent content = GetMdiClientController().ParentForm.ActiveMdiChild as IDockContent;
-            if (content == null)
-                return;
-
-            if (content.DockHandler.DockPanel == this && content.DockHandler.Pane != null)
-                content.DockHandler.Pane.ActiveContent = content;
-        }
-
-        private bool MdiClientExists
-        {
-            get { return GetMdiClientController().MdiClient != null; }
-        }
-
-        private void SetMdiClientBounds(Rectangle bounds)
-        {
-            GetMdiClientController().MdiClient.Bounds = bounds;
-        }
-
-        private void SuspendMdiClientLayout()
-        {
-            if (GetMdiClientController().MdiClient != null)
-                GetMdiClientController().MdiClient.SuspendLayout();
-        }
-
-        private void ResumeMdiClientLayout(bool perform)
-        {
-            if (GetMdiClientController().MdiClient != null)
-                GetMdiClientController().MdiClient.ResumeLayout(perform);
-        }
-
-        private void PerformMdiClientLayout()
-        {
-            if (GetMdiClientController().MdiClient != null)
-                GetMdiClientController().MdiClient.PerformLayout();
-        }
-
-        // Called when:
-        // 1. DockPanel.DocumentStyle changed
-        // 2. DockPanel.Visible changed
-        // 3. MdiClientController.Handle assigned
-        private void SetMdiClient()
-        {
-            MdiClientController controller = GetMdiClientController();
-
-            if (this.DocumentStyle == DocumentStyle.DockingMdi)
-            {
-                controller.AutoScroll = false;
-                controller.BorderStyle = BorderStyle.None;
-                if (MdiClientExists)
-                    controller.MdiClient.Dock = DockStyle.Fill;
-            }
-            else if (DocumentStyle == DocumentStyle.DockingSdi || DocumentStyle == DocumentStyle.DockingWindow)
-            {
-                controller.AutoScroll = true;
-                controller.BorderStyle = BorderStyle.Fixed3D;
-                if (MdiClientExists)
-                    controller.MdiClient.Dock = DockStyle.Fill;
-            }
-            else if (this.DocumentStyle == DocumentStyle.SystemMdi)
-            {
-                controller.AutoScroll = true;
-                controller.BorderStyle = BorderStyle.Fixed3D;
-                if (controller.MdiClient != null)
-                {
-                    controller.MdiClient.Dock = DockStyle.None;
-                    controller.MdiClient.Bounds = SystemMdiClientBounds;
-                }
-            }
-        }
-
-        internal Rectangle RectangleToMdiClient(Rectangle rect)
-        {
-            if (MdiClientExists)
-                return GetMdiClientController().MdiClient.RectangleToClient(rect);
-            else
-                return Rectangle.Empty;
-        }
-    }
+
+namespace WeifenLuo.WinFormsUI.Docking {
+  partial class DockPanel {
+    //  This class comes from Jacob Slusser's MdiClientController class:
+    //  http://www.codeproject.com/cs/miscctrl/mdiclientcontroller.asp
+    private class MdiClientController : NativeWindow, IComponent, IDisposable {
+      private bool m_autoScroll = true;
+      private BorderStyle m_borderStyle = BorderStyle.Fixed3D;
+      private MdiClient m_mdiClient = null;
+      private Form m_parentForm = null;
+      private ISite m_site = null;
+
+      public MdiClientController() {
+      }
+
+      public void Dispose() {
+        Dispose(true);
+        GC.SuppressFinalize(this);
+      }
+
+      protected virtual void Dispose(bool disposing) {
+        if (disposing) {
+          lock (this) {
+            if (Site != null && Site.Container != null)
+              Site.Container.Remove(this);
+
+            if (Disposed != null)
+              Disposed(this, EventArgs.Empty);
+          }
+        }
+      }
+
+      public bool AutoScroll {
+        get { return m_autoScroll; }
+        set {
+          // By default the MdiClient control scrolls. It can appear though that
+          // there are no scrollbars by turning them off when the non-client
+          // area is calculated. I decided to expose this method following
+          // the .NET vernacular of an AutoScroll property.
+          m_autoScroll = value;
+          if (MdiClient != null)
+            UpdateStyles();
+        }
+      }
+
+      public BorderStyle BorderStyle {
+        set {
+          // Error-check the enum.
+          if (!Enum.IsDefined(typeof(BorderStyle), value))
+            throw new InvalidEnumArgumentException();
+
+          m_borderStyle = value;
+
+          if (MdiClient == null)
+            return;
+
+          // This property can actually be visible in design-mode,
+          // but to keep it consistent with the others,
+          // prevent this from being show at design-time.
+          if (Site != null && Site.DesignMode)
+            return;
+
+          // There is no BorderStyle property exposed by the MdiClient class,
+          // but this can be controlled by Win32 functions. A Win32 ExStyle
+          // of WS_EX_CLIENTEDGE is equivalent to a Fixed3D border and a
+          // Style of WS_BORDER is equivalent to a FixedSingle border.
+
+          // This code is inspired Jason Dori's article:
+          // "Adding designable borders to user controls".
+          // http://www.codeproject.com/cs/miscctrl/CsAddingBorders.asp
+
+          // Get styles using Win32 calls
+          int style = NativeMethods.GetWindowLong(MdiClient.Handle, (int)Win32.GetWindowLongIndex.GWL_STYLE);
+          int exStyle = NativeMethods.GetWindowLong(MdiClient.Handle, (int)Win32.GetWindowLongIndex.GWL_EXSTYLE);
+
+          // Add or remove style flags as necessary.
+          switch (m_borderStyle) {
+            case BorderStyle.Fixed3D:
+              exStyle |= (int)Win32.WindowExStyles.WS_EX_CLIENTEDGE;
+              style &= ~((int)Win32.WindowStyles.WS_BORDER);
+              break;
+
+            case BorderStyle.FixedSingle:
+              exStyle &= ~((int)Win32.WindowExStyles.WS_EX_CLIENTEDGE);
+              style |= (int)Win32.WindowStyles.WS_BORDER;
+              break;
+
+            case BorderStyle.None:
+              style &= ~((int)Win32.WindowStyles.WS_BORDER);
+              exStyle &= ~((int)Win32.WindowExStyles.WS_EX_CLIENTEDGE);
+              break;
+          }
+
+          // Set the styles using Win32 calls
+          NativeMethods.SetWindowLong(MdiClient.Handle, (int)Win32.GetWindowLongIndex.GWL_STYLE, style);
+          NativeMethods.SetWindowLong(MdiClient.Handle, (int)Win32.GetWindowLongIndex.GWL_EXSTYLE, exStyle);
+
+          // Cause an update of the non-client area.
+          UpdateStyles();
+        }
+      }
+
+      public MdiClient MdiClient {
+        get { return m_mdiClient; }
+      }
+
+      [Browsable(false)]
+      public Form ParentForm {
+        get { return m_parentForm; }
+        set {
+          // If the ParentForm has previously been set,
+          // unwire events connected to the old parent.
+          if (m_parentForm != null) {
+            m_parentForm.HandleCreated -= new EventHandler(ParentFormHandleCreated);
+            m_parentForm.MdiChildActivate -= new EventHandler(ParentFormMdiChildActivate);
+          }
+
+          m_parentForm = value;
+
+          if (m_parentForm == null)
+            return;
+
+          // If the parent form has not been created yet,
+          // wait to initialize the MDI client until it is.
+          if (m_parentForm.IsHandleCreated) {
+            InitializeMdiClient();
+            RefreshProperties();
+          } else
+            m_parentForm.HandleCreated += new EventHandler(ParentFormHandleCreated);
+
+          m_parentForm.MdiChildActivate += new EventHandler(ParentFormMdiChildActivate);
+        }
+      }
+
+      public ISite Site {
+        get { return m_site; }
+        set {
+          m_site = value;
+
+          if (m_site == null)
+            return;
+
+          // If the component is dropped onto a form during design-time,
+          // set the ParentForm property.
+          IDesignerHost host = (value.GetService(typeof(IDesignerHost)) as IDesignerHost);
+          if (host != null) {
+            Form parent = host.RootComponent as Form;
+            if (parent != null)
+              ParentForm = parent;
+          }
+        }
+      }
+
+      public void RenewMdiClient() {
+        // Reinitialize the MdiClient and its properties.
+        InitializeMdiClient();
+        RefreshProperties();
+      }
+
+      public event EventHandler Disposed;
+
+      public event EventHandler HandleAssigned;
+
+      public event EventHandler MdiChildActivate;
+
+      public event LayoutEventHandler Layout;
+
+      protected virtual void OnHandleAssigned(EventArgs e) {
+        // Raise the HandleAssigned event.
+        if (HandleAssigned != null)
+          HandleAssigned(this, e);
+      }
+
+      protected virtual void OnMdiChildActivate(EventArgs e) {
+        // Raise the MdiChildActivate event
+        if (MdiChildActivate != null)
+          MdiChildActivate(this, e);
+      }
+
+      protected virtual void OnLayout(LayoutEventArgs e) {
+        // Raise the Layout event
+        if (Layout != null)
+          Layout(this, e);
+      }
+
+      public event PaintEventHandler Paint;
+
+      protected virtual void OnPaint(PaintEventArgs e) {
+        // Raise the Paint event.
+        if (Paint != null)
+          Paint(this, e);
+      }
+
+      protected override void WndProc(ref Message m) {
+        switch (m.Msg) {
+          case (int)Win32.Msgs.WM_NCCALCSIZE:
+            // If AutoScroll is set to false, hide the scrollbars when the control
+            // calculates its non-client area.
+            if (!AutoScroll)
+              NativeMethods.ShowScrollBar(m.HWnd, (int)Win32.ScrollBars.SB_BOTH, 0 /*false*/);
+            break;
+        }
+
+        base.WndProc(ref m);
+      }
+
+      private void ParentFormHandleCreated(object sender, EventArgs e) {
+        // The form has been created, unwire the event, and initialize the MdiClient.
+        this.m_parentForm.HandleCreated -= new EventHandler(ParentFormHandleCreated);
+        InitializeMdiClient();
+        RefreshProperties();
+      }
+
+      private void ParentFormMdiChildActivate(object sender, EventArgs e) {
+        OnMdiChildActivate(e);
+      }
+
+      private void MdiClientLayout(object sender, LayoutEventArgs e) {
+        OnLayout(e);
+      }
+
+      private void MdiClientHandleDestroyed(object sender, EventArgs e) {
+        // If the MdiClient handle has been released, drop the reference and
+        // release the handle.
+        if (m_mdiClient != null) {
+          m_mdiClient.HandleDestroyed -= new EventHandler(MdiClientHandleDestroyed);
+          m_mdiClient = null;
+        }
+
+        ReleaseHandle();
+      }
+
+      private void InitializeMdiClient() {
+        // If the mdiClient has previously been set, unwire events connected
+        // to the old MDI.
+        if (MdiClient != null) {
+          MdiClient.HandleDestroyed -= new EventHandler(MdiClientHandleDestroyed);
+          MdiClient.Layout -= new LayoutEventHandler(MdiClientLayout);
+        }
+
+        if (ParentForm == null)
+          return;
+
+        // Get the MdiClient from the parent form.
+        foreach (Control control in ParentForm.Controls) {
+          // If the form is an MDI container, it will contain an MdiClient control
+          // just as it would any other control.
+
+          m_mdiClient = control as MdiClient;
+          if (m_mdiClient == null)
+            continue;
+
+          // Assign the MdiClient Handle to the NativeWindow.
+          ReleaseHandle();
+          AssignHandle(MdiClient.Handle);
+
+          // Raise the HandleAssigned event.
+          OnHandleAssigned(EventArgs.Empty);
+
+          // Monitor the MdiClient for when its handle is destroyed.
+          MdiClient.HandleDestroyed += new EventHandler(MdiClientHandleDestroyed);
+          MdiClient.Layout += new LayoutEventHandler(MdiClientLayout);
+
+          break;
+        }
+      }
+
+      private void RefreshProperties() {
+        // Refresh all the properties
+        BorderStyle = m_borderStyle;
+        AutoScroll = m_autoScroll;
+      }
+
+      private void UpdateStyles() {
+        // To show style changes, the non-client area must be repainted. Using the
+        // control's Invalidate method does not affect the non-client area.
+        // Instead use a Win32 call to signal the style has changed.
+        NativeMethods.SetWindowPos(MdiClient.Handle, IntPtr.Zero, 0, 0, 0, 0,
+            Win32.FlagsSetWindowPos.SWP_NOACTIVATE |
+            Win32.FlagsSetWindowPos.SWP_NOMOVE |
+            Win32.FlagsSetWindowPos.SWP_NOSIZE |
+            Win32.FlagsSetWindowPos.SWP_NOZORDER |
+            Win32.FlagsSetWindowPos.SWP_NOOWNERZORDER |
+            Win32.FlagsSetWindowPos.SWP_FRAMECHANGED);
+      }
+    }
+
+    private MdiClientController m_mdiClientController = null;
+    private MdiClientController GetMdiClientController() {
+      if (m_mdiClientController == null) {
+        m_mdiClientController = new MdiClientController();
+        m_mdiClientController.HandleAssigned += new EventHandler(MdiClientHandleAssigned);
+        m_mdiClientController.MdiChildActivate += new EventHandler(ParentFormMdiChildActivate);
+        m_mdiClientController.Layout += new LayoutEventHandler(MdiClient_Layout);
+      }
+
+      return m_mdiClientController;
+    }
+
+    private void ParentFormMdiChildActivate(object sender, EventArgs e) {
+      if (GetMdiClientController().ParentForm == null)
+        return;
+
+      IDockContent content = GetMdiClientController().ParentForm.ActiveMdiChild as IDockContent;
+      if (content == null)
+        return;
+
+      if (content.DockHandler.DockPanel == this && content.DockHandler.Pane != null)
+        content.DockHandler.Pane.ActiveContent = content;
+    }
+
+    private bool MdiClientExists {
+      get { return GetMdiClientController().MdiClient != null; }
+    }
+
+    private void SetMdiClientBounds(Rectangle bounds) {
+      GetMdiClientController().MdiClient.Bounds = bounds;
+    }
+
+    private void SuspendMdiClientLayout() {
+      if (GetMdiClientController().MdiClient != null)
+        GetMdiClientController().MdiClient.SuspendLayout();
+    }
+
+    private void ResumeMdiClientLayout(bool perform) {
+      if (GetMdiClientController().MdiClient != null)
+        GetMdiClientController().MdiClient.ResumeLayout(perform);
+    }
+
+    private void PerformMdiClientLayout() {
+      if (GetMdiClientController().MdiClient != null)
+        GetMdiClientController().MdiClient.PerformLayout();
+    }
+
+    // Called when:
+    // 1. DockPanel.DocumentStyle changed
+    // 2. DockPanel.Visible changed
+    // 3. MdiClientController.Handle assigned
+    private void SetMdiClient() {
+      MdiClientController controller = GetMdiClientController();
+
+      if (this.DocumentStyle == DocumentStyle.DockingMdi) {
+        controller.AutoScroll = false;
+        controller.BorderStyle = BorderStyle.None;
+        if (MdiClientExists)
+          controller.MdiClient.Dock = DockStyle.Fill;
+      } else if (DocumentStyle == DocumentStyle.DockingSdi || DocumentStyle == DocumentStyle.DockingWindow) {
+        controller.AutoScroll = true;
+        controller.BorderStyle = BorderStyle.Fixed3D;
+        if (MdiClientExists)
+          controller.MdiClient.Dock = DockStyle.Fill;
+      } else if (this.DocumentStyle == DocumentStyle.SystemMdi) {
+        controller.AutoScroll = true;
+        controller.BorderStyle = BorderStyle.Fixed3D;
+        if (controller.MdiClient != null) {
+          controller.MdiClient.Dock = DockStyle.None;
+          controller.MdiClient.Bounds = SystemMdiClientBounds;
+        }
+      }
+    }
+
+    internal Rectangle RectangleToMdiClient(Rectangle rect) {
+      if (MdiClientExists)
+        return GetMdiClientController().MdiClient.RectangleToClient(rect);
+      else
+        return Rectangle.Empty;
+    }
+  }
 }
Index: /trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.WinFormsUI/2.3.1/WinFormsUI-2.3.1/Docking/DockPanel.Persistor.cs
===================================================================
--- /trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.WinFormsUI/2.3.1/WinFormsUI-2.3.1/Docking/DockPanel.Persistor.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.WinFormsUI/2.3.1/WinFormsUI-2.3.1/Docking/DockPanel.Persistor.cs	(revision 4068)
@@ -1,781 +1,686 @@
 using System;
 using System.ComponentModel;
-using System.Windows.Forms;
 using System.Drawing;
-using WeifenLuo.WinFormsUI.Docking;
+using System.Globalization;
 using System.IO;
 using System.Text;
 using System.Xml;
-using System.Globalization;
-
-namespace WeifenLuo.WinFormsUI.Docking
-{
-    partial class DockPanel
-    {
-        private static class Persistor
-        {
-            private const string ConfigFileVersion = "1.0";
-            private static string[] CompatibleConfigFileVersions = new string[] { };
-
-            private class DummyContent : DockContent
-            {
+
+namespace WeifenLuo.WinFormsUI.Docking {
+  partial class DockPanel {
+    private static class Persistor {
+      private const string ConfigFileVersion = "1.0";
+      private static string[] CompatibleConfigFileVersions = new string[] { };
+
+      private class DummyContent : DockContent {
+      }
+
+      private struct DockPanelStruct {
+        private double m_dockLeftPortion;
+        public double DockLeftPortion {
+          get { return m_dockLeftPortion; }
+          set { m_dockLeftPortion = value; }
+        }
+
+        private double m_dockRightPortion;
+        public double DockRightPortion {
+          get { return m_dockRightPortion; }
+          set { m_dockRightPortion = value; }
+        }
+
+        private double m_dockTopPortion;
+        public double DockTopPortion {
+          get { return m_dockTopPortion; }
+          set { m_dockTopPortion = value; }
+        }
+
+        private double m_dockBottomPortion;
+        public double DockBottomPortion {
+          get { return m_dockBottomPortion; }
+          set { m_dockBottomPortion = value; }
+        }
+
+        private int m_indexActiveDocumentPane;
+        public int IndexActiveDocumentPane {
+          get { return m_indexActiveDocumentPane; }
+          set { m_indexActiveDocumentPane = value; }
+        }
+
+        private int m_indexActivePane;
+        public int IndexActivePane {
+          get { return m_indexActivePane; }
+          set { m_indexActivePane = value; }
+        }
+      }
+
+      private struct ContentStruct {
+        private string m_persistString;
+        public string PersistString {
+          get { return m_persistString; }
+          set { m_persistString = value; }
+        }
+
+        private double m_autoHidePortion;
+        public double AutoHidePortion {
+          get { return m_autoHidePortion; }
+          set { m_autoHidePortion = value; }
+        }
+
+        private bool m_isHidden;
+        public bool IsHidden {
+          get { return m_isHidden; }
+          set { m_isHidden = value; }
+        }
+
+        private bool m_isFloat;
+        public bool IsFloat {
+          get { return m_isFloat; }
+          set { m_isFloat = value; }
+        }
+      }
+
+      private struct PaneStruct {
+        private DockState m_dockState;
+        public DockState DockState {
+          get { return m_dockState; }
+          set { m_dockState = value; }
+        }
+
+        private int m_indexActiveContent;
+        public int IndexActiveContent {
+          get { return m_indexActiveContent; }
+          set { m_indexActiveContent = value; }
+        }
+
+        private int[] m_indexContents;
+        public int[] IndexContents {
+          get { return m_indexContents; }
+          set { m_indexContents = value; }
+        }
+
+        private int m_zOrderIndex;
+        public int ZOrderIndex {
+          get { return m_zOrderIndex; }
+          set { m_zOrderIndex = value; }
+        }
+      }
+
+      private struct NestedPane {
+        private int m_indexPane;
+        public int IndexPane {
+          get { return m_indexPane; }
+          set { m_indexPane = value; }
+        }
+
+        private int m_indexPrevPane;
+        public int IndexPrevPane {
+          get { return m_indexPrevPane; }
+          set { m_indexPrevPane = value; }
+        }
+
+        private DockAlignment m_alignment;
+        public DockAlignment Alignment {
+          get { return m_alignment; }
+          set { m_alignment = value; }
+        }
+
+        private double m_proportion;
+        public double Proportion {
+          get { return m_proportion; }
+          set { m_proportion = value; }
+        }
+      }
+
+      private struct DockWindowStruct {
+        private DockState m_dockState;
+        public DockState DockState {
+          get { return m_dockState; }
+          set { m_dockState = value; }
+        }
+
+        private int m_zOrderIndex;
+        public int ZOrderIndex {
+          get { return m_zOrderIndex; }
+          set { m_zOrderIndex = value; }
+        }
+
+        private NestedPane[] m_nestedPanes;
+        public NestedPane[] NestedPanes {
+          get { return m_nestedPanes; }
+          set { m_nestedPanes = value; }
+        }
+      }
+
+      private struct FloatWindowStruct {
+        private Rectangle m_bounds;
+        public Rectangle Bounds {
+          get { return m_bounds; }
+          set { m_bounds = value; }
+        }
+
+        private int m_zOrderIndex;
+        public int ZOrderIndex {
+          get { return m_zOrderIndex; }
+          set { m_zOrderIndex = value; }
+        }
+
+        private NestedPane[] m_nestedPanes;
+        public NestedPane[] NestedPanes {
+          get { return m_nestedPanes; }
+          set { m_nestedPanes = value; }
+        }
+      }
+
+      public static void SaveAsXml(DockPanel dockPanel, string fileName) {
+        SaveAsXml(dockPanel, fileName, Encoding.Unicode);
+      }
+
+      public static void SaveAsXml(DockPanel dockPanel, string fileName, Encoding encoding) {
+        FileStream fs = new FileStream(fileName, FileMode.Create);
+        try {
+          SaveAsXml(dockPanel, fs, encoding);
+        }
+        finally {
+          fs.Close();
+        }
+      }
+
+      public static void SaveAsXml(DockPanel dockPanel, Stream stream, Encoding encoding) {
+        SaveAsXml(dockPanel, stream, encoding, false);
+      }
+
+      public static void SaveAsXml(DockPanel dockPanel, Stream stream, Encoding encoding, bool upstream) {
+        XmlTextWriter xmlOut = new XmlTextWriter(stream, encoding);
+
+        // Use indenting for readability
+        xmlOut.Formatting = Formatting.Indented;
+
+        if (!upstream)
+          xmlOut.WriteStartDocument();
+
+        // Always begin file with identification and warning
+        xmlOut.WriteComment(Strings.DockPanel_Persistor_XmlFileComment1);
+        xmlOut.WriteComment(Strings.DockPanel_Persistor_XmlFileComment2);
+
+        // Associate a version number with the root element so that future version of the code
+        // will be able to be backwards compatible or at least recognise out of date versions
+        xmlOut.WriteStartElement("DockPanel");
+        xmlOut.WriteAttributeString("FormatVersion", ConfigFileVersion);
+        xmlOut.WriteAttributeString("DockLeftPortion", dockPanel.DockLeftPortion.ToString(CultureInfo.InvariantCulture));
+        xmlOut.WriteAttributeString("DockRightPortion", dockPanel.DockRightPortion.ToString(CultureInfo.InvariantCulture));
+        xmlOut.WriteAttributeString("DockTopPortion", dockPanel.DockTopPortion.ToString(CultureInfo.InvariantCulture));
+        xmlOut.WriteAttributeString("DockBottomPortion", dockPanel.DockBottomPortion.ToString(CultureInfo.InvariantCulture));
+        xmlOut.WriteAttributeString("ActiveDocumentPane", dockPanel.Panes.IndexOf(dockPanel.ActiveDocumentPane).ToString(CultureInfo.InvariantCulture));
+        xmlOut.WriteAttributeString("ActivePane", dockPanel.Panes.IndexOf(dockPanel.ActivePane).ToString(CultureInfo.InvariantCulture));
+
+        // Contents
+        xmlOut.WriteStartElement("Contents");
+        xmlOut.WriteAttributeString("Count", dockPanel.Contents.Count.ToString(CultureInfo.InvariantCulture));
+        foreach (IDockContent content in dockPanel.Contents) {
+          xmlOut.WriteStartElement("Content");
+          xmlOut.WriteAttributeString("ID", dockPanel.Contents.IndexOf(content).ToString(CultureInfo.InvariantCulture));
+          xmlOut.WriteAttributeString("PersistString", content.DockHandler.PersistString);
+          xmlOut.WriteAttributeString("AutoHidePortion", content.DockHandler.AutoHidePortion.ToString(CultureInfo.InvariantCulture));
+          xmlOut.WriteAttributeString("IsHidden", content.DockHandler.IsHidden.ToString(CultureInfo.InvariantCulture));
+          xmlOut.WriteAttributeString("IsFloat", content.DockHandler.IsFloat.ToString(CultureInfo.InvariantCulture));
+          xmlOut.WriteEndElement();
+        }
+        xmlOut.WriteEndElement();
+
+        // Panes
+        xmlOut.WriteStartElement("Panes");
+        xmlOut.WriteAttributeString("Count", dockPanel.Panes.Count.ToString(CultureInfo.InvariantCulture));
+        foreach (DockPane pane in dockPanel.Panes) {
+          xmlOut.WriteStartElement("Pane");
+          xmlOut.WriteAttributeString("ID", dockPanel.Panes.IndexOf(pane).ToString(CultureInfo.InvariantCulture));
+          xmlOut.WriteAttributeString("DockState", pane.DockState.ToString());
+          xmlOut.WriteAttributeString("ActiveContent", dockPanel.Contents.IndexOf(pane.ActiveContent).ToString(CultureInfo.InvariantCulture));
+          xmlOut.WriteStartElement("Contents");
+          xmlOut.WriteAttributeString("Count", pane.Contents.Count.ToString(CultureInfo.InvariantCulture));
+          foreach (IDockContent content in pane.Contents) {
+            xmlOut.WriteStartElement("Content");
+            xmlOut.WriteAttributeString("ID", pane.Contents.IndexOf(content).ToString(CultureInfo.InvariantCulture));
+            xmlOut.WriteAttributeString("RefID", dockPanel.Contents.IndexOf(content).ToString(CultureInfo.InvariantCulture));
+            xmlOut.WriteEndElement();
+          }
+          xmlOut.WriteEndElement();
+          xmlOut.WriteEndElement();
+        }
+        xmlOut.WriteEndElement();
+
+        // DockWindows
+        xmlOut.WriteStartElement("DockWindows");
+        int dockWindowId = 0;
+        foreach (DockWindow dw in dockPanel.DockWindows) {
+          xmlOut.WriteStartElement("DockWindow");
+          xmlOut.WriteAttributeString("ID", dockWindowId.ToString(CultureInfo.InvariantCulture));
+          dockWindowId++;
+          xmlOut.WriteAttributeString("DockState", dw.DockState.ToString());
+          xmlOut.WriteAttributeString("ZOrderIndex", dockPanel.Controls.IndexOf(dw).ToString(CultureInfo.InvariantCulture));
+          xmlOut.WriteStartElement("NestedPanes");
+          xmlOut.WriteAttributeString("Count", dw.NestedPanes.Count.ToString(CultureInfo.InvariantCulture));
+          foreach (DockPane pane in dw.NestedPanes) {
+            xmlOut.WriteStartElement("Pane");
+            xmlOut.WriteAttributeString("ID", dw.NestedPanes.IndexOf(pane).ToString(CultureInfo.InvariantCulture));
+            xmlOut.WriteAttributeString("RefID", dockPanel.Panes.IndexOf(pane).ToString(CultureInfo.InvariantCulture));
+            NestedDockingStatus status = pane.NestedDockingStatus;
+            xmlOut.WriteAttributeString("PrevPane", dockPanel.Panes.IndexOf(status.PreviousPane).ToString(CultureInfo.InvariantCulture));
+            xmlOut.WriteAttributeString("Alignment", status.Alignment.ToString());
+            xmlOut.WriteAttributeString("Proportion", status.Proportion.ToString(CultureInfo.InvariantCulture));
+            xmlOut.WriteEndElement();
+          }
+          xmlOut.WriteEndElement();
+          xmlOut.WriteEndElement();
+        }
+        xmlOut.WriteEndElement();
+
+        // FloatWindows
+        RectangleConverter rectConverter = new RectangleConverter();
+        xmlOut.WriteStartElement("FloatWindows");
+        xmlOut.WriteAttributeString("Count", dockPanel.FloatWindows.Count.ToString(CultureInfo.InvariantCulture));
+        foreach (FloatWindow fw in dockPanel.FloatWindows) {
+          xmlOut.WriteStartElement("FloatWindow");
+          xmlOut.WriteAttributeString("ID", dockPanel.FloatWindows.IndexOf(fw).ToString(CultureInfo.InvariantCulture));
+          xmlOut.WriteAttributeString("Bounds", rectConverter.ConvertToInvariantString(fw.Bounds));
+          xmlOut.WriteAttributeString("ZOrderIndex", fw.DockPanel.FloatWindows.IndexOf(fw).ToString(CultureInfo.InvariantCulture));
+          xmlOut.WriteStartElement("NestedPanes");
+          xmlOut.WriteAttributeString("Count", fw.NestedPanes.Count.ToString(CultureInfo.InvariantCulture));
+          foreach (DockPane pane in fw.NestedPanes) {
+            xmlOut.WriteStartElement("Pane");
+            xmlOut.WriteAttributeString("ID", fw.NestedPanes.IndexOf(pane).ToString(CultureInfo.InvariantCulture));
+            xmlOut.WriteAttributeString("RefID", dockPanel.Panes.IndexOf(pane).ToString(CultureInfo.InvariantCulture));
+            NestedDockingStatus status = pane.NestedDockingStatus;
+            xmlOut.WriteAttributeString("PrevPane", dockPanel.Panes.IndexOf(status.PreviousPane).ToString(CultureInfo.InvariantCulture));
+            xmlOut.WriteAttributeString("Alignment", status.Alignment.ToString());
+            xmlOut.WriteAttributeString("Proportion", status.Proportion.ToString(CultureInfo.InvariantCulture));
+            xmlOut.WriteEndElement();
+          }
+          xmlOut.WriteEndElement();
+          xmlOut.WriteEndElement();
+        }
+        xmlOut.WriteEndElement();	//	</FloatWindows>
+
+        xmlOut.WriteEndElement();
+
+        if (!upstream) {
+          xmlOut.WriteEndDocument();
+          xmlOut.Close();
+        } else
+          xmlOut.Flush();
+      }
+
+      public static void LoadFromXml(DockPanel dockPanel, string fileName, DeserializeDockContent deserializeContent) {
+        FileStream fs = new FileStream(fileName, FileMode.Open, FileAccess.Read);
+        try {
+          LoadFromXml(dockPanel, fs, deserializeContent);
+        }
+        finally {
+          fs.Close();
+        }
+      }
+
+      public static void LoadFromXml(DockPanel dockPanel, Stream stream, DeserializeDockContent deserializeContent) {
+        LoadFromXml(dockPanel, stream, deserializeContent, true);
+      }
+
+      private static ContentStruct[] LoadContents(XmlTextReader xmlIn) {
+        int countOfContents = Convert.ToInt32(xmlIn.GetAttribute("Count"), CultureInfo.InvariantCulture);
+        ContentStruct[] contents = new ContentStruct[countOfContents];
+        MoveToNextElement(xmlIn);
+        for (int i = 0; i < countOfContents; i++) {
+          int id = Convert.ToInt32(xmlIn.GetAttribute("ID"), CultureInfo.InvariantCulture);
+          if (xmlIn.Name != "Content" || id != i)
+            throw new ArgumentException(Strings.DockPanel_LoadFromXml_InvalidXmlFormat);
+
+          contents[i].PersistString = xmlIn.GetAttribute("PersistString");
+          contents[i].AutoHidePortion = Convert.ToDouble(xmlIn.GetAttribute("AutoHidePortion"), CultureInfo.InvariantCulture);
+          contents[i].IsHidden = Convert.ToBoolean(xmlIn.GetAttribute("IsHidden"), CultureInfo.InvariantCulture);
+          contents[i].IsFloat = Convert.ToBoolean(xmlIn.GetAttribute("IsFloat"), CultureInfo.InvariantCulture);
+          MoveToNextElement(xmlIn);
+        }
+
+        return contents;
+      }
+
+      private static PaneStruct[] LoadPanes(XmlTextReader xmlIn) {
+        EnumConverter dockStateConverter = new EnumConverter(typeof(DockState));
+        int countOfPanes = Convert.ToInt32(xmlIn.GetAttribute("Count"), CultureInfo.InvariantCulture);
+        PaneStruct[] panes = new PaneStruct[countOfPanes];
+        MoveToNextElement(xmlIn);
+        for (int i = 0; i < countOfPanes; i++) {
+          int id = Convert.ToInt32(xmlIn.GetAttribute("ID"), CultureInfo.InvariantCulture);
+          if (xmlIn.Name != "Pane" || id != i)
+            throw new ArgumentException(Strings.DockPanel_LoadFromXml_InvalidXmlFormat);
+
+          panes[i].DockState = (DockState)dockStateConverter.ConvertFrom(xmlIn.GetAttribute("DockState"));
+          panes[i].IndexActiveContent = Convert.ToInt32(xmlIn.GetAttribute("ActiveContent"), CultureInfo.InvariantCulture);
+          panes[i].ZOrderIndex = -1;
+
+          MoveToNextElement(xmlIn);
+          if (xmlIn.Name != "Contents")
+            throw new ArgumentException(Strings.DockPanel_LoadFromXml_InvalidXmlFormat);
+          int countOfPaneContents = Convert.ToInt32(xmlIn.GetAttribute("Count"), CultureInfo.InvariantCulture);
+          panes[i].IndexContents = new int[countOfPaneContents];
+          MoveToNextElement(xmlIn);
+          for (int j = 0; j < countOfPaneContents; j++) {
+            int id2 = Convert.ToInt32(xmlIn.GetAttribute("ID"), CultureInfo.InvariantCulture);
+            if (xmlIn.Name != "Content" || id2 != j)
+              throw new ArgumentException(Strings.DockPanel_LoadFromXml_InvalidXmlFormat);
+
+            panes[i].IndexContents[j] = Convert.ToInt32(xmlIn.GetAttribute("RefID"), CultureInfo.InvariantCulture);
+            MoveToNextElement(xmlIn);
+          }
+        }
+
+        return panes;
+      }
+
+      private static DockWindowStruct[] LoadDockWindows(XmlTextReader xmlIn, DockPanel dockPanel) {
+        EnumConverter dockStateConverter = new EnumConverter(typeof(DockState));
+        EnumConverter dockAlignmentConverter = new EnumConverter(typeof(DockAlignment));
+        int countOfDockWindows = dockPanel.DockWindows.Count;
+        DockWindowStruct[] dockWindows = new DockWindowStruct[countOfDockWindows];
+        MoveToNextElement(xmlIn);
+        for (int i = 0; i < countOfDockWindows; i++) {
+          int id = Convert.ToInt32(xmlIn.GetAttribute("ID"), CultureInfo.InvariantCulture);
+          if (xmlIn.Name != "DockWindow" || id != i)
+            throw new ArgumentException(Strings.DockPanel_LoadFromXml_InvalidXmlFormat);
+
+          dockWindows[i].DockState = (DockState)dockStateConverter.ConvertFrom(xmlIn.GetAttribute("DockState"));
+          dockWindows[i].ZOrderIndex = Convert.ToInt32(xmlIn.GetAttribute("ZOrderIndex"), CultureInfo.InvariantCulture);
+          MoveToNextElement(xmlIn);
+          if (xmlIn.Name != "DockList" && xmlIn.Name != "NestedPanes")
+            throw new ArgumentException(Strings.DockPanel_LoadFromXml_InvalidXmlFormat);
+          int countOfNestedPanes = Convert.ToInt32(xmlIn.GetAttribute("Count"), CultureInfo.InvariantCulture);
+          dockWindows[i].NestedPanes = new NestedPane[countOfNestedPanes];
+          MoveToNextElement(xmlIn);
+          for (int j = 0; j < countOfNestedPanes; j++) {
+            int id2 = Convert.ToInt32(xmlIn.GetAttribute("ID"), CultureInfo.InvariantCulture);
+            if (xmlIn.Name != "Pane" || id2 != j)
+              throw new ArgumentException(Strings.DockPanel_LoadFromXml_InvalidXmlFormat);
+            dockWindows[i].NestedPanes[j].IndexPane = Convert.ToInt32(xmlIn.GetAttribute("RefID"), CultureInfo.InvariantCulture);
+            dockWindows[i].NestedPanes[j].IndexPrevPane = Convert.ToInt32(xmlIn.GetAttribute("PrevPane"), CultureInfo.InvariantCulture);
+            dockWindows[i].NestedPanes[j].Alignment = (DockAlignment)dockAlignmentConverter.ConvertFrom(xmlIn.GetAttribute("Alignment"));
+            dockWindows[i].NestedPanes[j].Proportion = Convert.ToDouble(xmlIn.GetAttribute("Proportion"), CultureInfo.InvariantCulture);
+            MoveToNextElement(xmlIn);
+          }
+        }
+
+        return dockWindows;
+      }
+
+      private static FloatWindowStruct[] LoadFloatWindows(XmlTextReader xmlIn) {
+        EnumConverter dockAlignmentConverter = new EnumConverter(typeof(DockAlignment));
+        RectangleConverter rectConverter = new RectangleConverter();
+        int countOfFloatWindows = Convert.ToInt32(xmlIn.GetAttribute("Count"), CultureInfo.InvariantCulture);
+        FloatWindowStruct[] floatWindows = new FloatWindowStruct[countOfFloatWindows];
+        MoveToNextElement(xmlIn);
+        for (int i = 0; i < countOfFloatWindows; i++) {
+          int id = Convert.ToInt32(xmlIn.GetAttribute("ID"), CultureInfo.InvariantCulture);
+          if (xmlIn.Name != "FloatWindow" || id != i)
+            throw new ArgumentException(Strings.DockPanel_LoadFromXml_InvalidXmlFormat);
+
+          floatWindows[i].Bounds = (Rectangle)rectConverter.ConvertFromInvariantString(xmlIn.GetAttribute("Bounds"));
+          floatWindows[i].ZOrderIndex = Convert.ToInt32(xmlIn.GetAttribute("ZOrderIndex"), CultureInfo.InvariantCulture);
+          MoveToNextElement(xmlIn);
+          if (xmlIn.Name != "DockList" && xmlIn.Name != "NestedPanes")
+            throw new ArgumentException(Strings.DockPanel_LoadFromXml_InvalidXmlFormat);
+          int countOfNestedPanes = Convert.ToInt32(xmlIn.GetAttribute("Count"), CultureInfo.InvariantCulture);
+          floatWindows[i].NestedPanes = new NestedPane[countOfNestedPanes];
+          MoveToNextElement(xmlIn);
+          for (int j = 0; j < countOfNestedPanes; j++) {
+            int id2 = Convert.ToInt32(xmlIn.GetAttribute("ID"), CultureInfo.InvariantCulture);
+            if (xmlIn.Name != "Pane" || id2 != j)
+              throw new ArgumentException(Strings.DockPanel_LoadFromXml_InvalidXmlFormat);
+            floatWindows[i].NestedPanes[j].IndexPane = Convert.ToInt32(xmlIn.GetAttribute("RefID"), CultureInfo.InvariantCulture);
+            floatWindows[i].NestedPanes[j].IndexPrevPane = Convert.ToInt32(xmlIn.GetAttribute("PrevPane"), CultureInfo.InvariantCulture);
+            floatWindows[i].NestedPanes[j].Alignment = (DockAlignment)dockAlignmentConverter.ConvertFrom(xmlIn.GetAttribute("Alignment"));
+            floatWindows[i].NestedPanes[j].Proportion = Convert.ToDouble(xmlIn.GetAttribute("Proportion"), CultureInfo.InvariantCulture);
+            MoveToNextElement(xmlIn);
+          }
+        }
+
+        return floatWindows;
+      }
+
+      public static void LoadFromXml(DockPanel dockPanel, Stream stream, DeserializeDockContent deserializeContent, bool closeStream) {
+
+        if (dockPanel.Contents.Count != 0)
+          throw new InvalidOperationException(Strings.DockPanel_LoadFromXml_AlreadyInitialized);
+
+        XmlTextReader xmlIn = new XmlTextReader(stream);
+        xmlIn.WhitespaceHandling = WhitespaceHandling.None;
+        xmlIn.MoveToContent();
+
+        while (!xmlIn.Name.Equals("DockPanel")) {
+          if (!MoveToNextElement(xmlIn))
+            throw new ArgumentException(Strings.DockPanel_LoadFromXml_InvalidXmlFormat);
+        }
+
+        string formatVersion = xmlIn.GetAttribute("FormatVersion");
+        if (!IsFormatVersionValid(formatVersion))
+          throw new ArgumentException(Strings.DockPanel_LoadFromXml_InvalidFormatVersion);
+
+        DockPanelStruct dockPanelStruct = new DockPanelStruct();
+        dockPanelStruct.DockLeftPortion = Convert.ToDouble(xmlIn.GetAttribute("DockLeftPortion"), CultureInfo.InvariantCulture);
+        dockPanelStruct.DockRightPortion = Convert.ToDouble(xmlIn.GetAttribute("DockRightPortion"), CultureInfo.InvariantCulture);
+        dockPanelStruct.DockTopPortion = Convert.ToDouble(xmlIn.GetAttribute("DockTopPortion"), CultureInfo.InvariantCulture);
+        dockPanelStruct.DockBottomPortion = Convert.ToDouble(xmlIn.GetAttribute("DockBottomPortion"), CultureInfo.InvariantCulture);
+        dockPanelStruct.IndexActiveDocumentPane = Convert.ToInt32(xmlIn.GetAttribute("ActiveDocumentPane"), CultureInfo.InvariantCulture);
+        dockPanelStruct.IndexActivePane = Convert.ToInt32(xmlIn.GetAttribute("ActivePane"), CultureInfo.InvariantCulture);
+
+        // Load Contents
+        MoveToNextElement(xmlIn);
+        if (xmlIn.Name != "Contents")
+          throw new ArgumentException(Strings.DockPanel_LoadFromXml_InvalidXmlFormat);
+        ContentStruct[] contents = LoadContents(xmlIn);
+
+        // Load Panes
+        if (xmlIn.Name != "Panes")
+          throw new ArgumentException(Strings.DockPanel_LoadFromXml_InvalidXmlFormat);
+        PaneStruct[] panes = LoadPanes(xmlIn);
+
+        // Load DockWindows
+        if (xmlIn.Name != "DockWindows")
+          throw new ArgumentException(Strings.DockPanel_LoadFromXml_InvalidXmlFormat);
+        DockWindowStruct[] dockWindows = LoadDockWindows(xmlIn, dockPanel);
+
+        // Load FloatWindows
+        if (xmlIn.Name != "FloatWindows")
+          throw new ArgumentException(Strings.DockPanel_LoadFromXml_InvalidXmlFormat);
+        FloatWindowStruct[] floatWindows = LoadFloatWindows(xmlIn);
+
+        if (closeStream)
+          xmlIn.Close();
+
+        dockPanel.SuspendLayout(true);
+
+        dockPanel.DockLeftPortion = dockPanelStruct.DockLeftPortion;
+        dockPanel.DockRightPortion = dockPanelStruct.DockRightPortion;
+        dockPanel.DockTopPortion = dockPanelStruct.DockTopPortion;
+        dockPanel.DockBottomPortion = dockPanelStruct.DockBottomPortion;
+
+        // Set DockWindow ZOrders
+        int prevMaxDockWindowZOrder = int.MaxValue;
+        for (int i = 0; i < dockWindows.Length; i++) {
+          int maxDockWindowZOrder = -1;
+          int index = -1;
+          for (int j = 0; j < dockWindows.Length; j++) {
+            if (dockWindows[j].ZOrderIndex > maxDockWindowZOrder && dockWindows[j].ZOrderIndex < prevMaxDockWindowZOrder) {
+              maxDockWindowZOrder = dockWindows[j].ZOrderIndex;
+              index = j;
             }
-
-            private struct DockPanelStruct
-            {
-                private double m_dockLeftPortion;
-                public double DockLeftPortion
-                {
-                    get { return m_dockLeftPortion; }
-                    set { m_dockLeftPortion = value; }
-                }
-
-                private double m_dockRightPortion;
-                public double DockRightPortion
-                {
-                    get { return m_dockRightPortion; }
-                    set { m_dockRightPortion = value; }
-                }
-
-                private double m_dockTopPortion;
-                public double DockTopPortion
-                {
-                    get { return m_dockTopPortion; }
-                    set { m_dockTopPortion = value; }
-                }
-
-                private double m_dockBottomPortion;
-                public double DockBottomPortion
-                {
-                    get { return m_dockBottomPortion; }
-                    set { m_dockBottomPortion = value; }
-                }
-
-                private int m_indexActiveDocumentPane;
-                public int IndexActiveDocumentPane
-                {
-                    get { return m_indexActiveDocumentPane; }
-                    set { m_indexActiveDocumentPane = value; }
-                }
-
-                private int m_indexActivePane;
-                public int IndexActivePane
-                {
-                    get { return m_indexActivePane; }
-                    set { m_indexActivePane = value; }
-                }
+          }
+
+          dockPanel.DockWindows[dockWindows[index].DockState].BringToFront();
+          prevMaxDockWindowZOrder = maxDockWindowZOrder;
+        }
+
+        // Create Contents
+        for (int i = 0; i < contents.Length; i++) {
+          IDockContent content = deserializeContent(contents[i].PersistString);
+          if (content == null)
+            content = new DummyContent();
+          content.DockHandler.DockPanel = dockPanel;
+          content.DockHandler.AutoHidePortion = contents[i].AutoHidePortion;
+          content.DockHandler.IsHidden = true;
+          content.DockHandler.IsFloat = contents[i].IsFloat;
+        }
+
+        // Create panes
+        for (int i = 0; i < panes.Length; i++) {
+          DockPane pane = null;
+          for (int j = 0; j < panes[i].IndexContents.Length; j++) {
+            IDockContent content = dockPanel.Contents[panes[i].IndexContents[j]];
+            if (j == 0)
+              pane = dockPanel.DockPaneFactory.CreateDockPane(content, panes[i].DockState, false);
+            else if (panes[i].DockState == DockState.Float)
+              content.DockHandler.FloatPane = pane;
+            else
+              content.DockHandler.PanelPane = pane;
+          }
+        }
+
+        // Assign Panes to DockWindows
+        for (int i = 0; i < dockWindows.Length; i++) {
+          for (int j = 0; j < dockWindows[i].NestedPanes.Length; j++) {
+            DockWindow dw = dockPanel.DockWindows[dockWindows[i].DockState];
+            int indexPane = dockWindows[i].NestedPanes[j].IndexPane;
+            DockPane pane = dockPanel.Panes[indexPane];
+            int indexPrevPane = dockWindows[i].NestedPanes[j].IndexPrevPane;
+            DockPane prevPane = (indexPrevPane == -1) ? dw.NestedPanes.GetDefaultPreviousPane(pane) : dockPanel.Panes[indexPrevPane];
+            DockAlignment alignment = dockWindows[i].NestedPanes[j].Alignment;
+            double proportion = dockWindows[i].NestedPanes[j].Proportion;
+            pane.DockTo(dw, prevPane, alignment, proportion);
+            if (panes[indexPane].DockState == dw.DockState)
+              panes[indexPane].ZOrderIndex = dockWindows[i].ZOrderIndex;
+          }
+        }
+
+        // Create float windows
+        for (int i = 0; i < floatWindows.Length; i++) {
+          FloatWindow fw = null;
+          for (int j = 0; j < floatWindows[i].NestedPanes.Length; j++) {
+            int indexPane = floatWindows[i].NestedPanes[j].IndexPane;
+            DockPane pane = dockPanel.Panes[indexPane];
+            if (j == 0)
+              fw = dockPanel.FloatWindowFactory.CreateFloatWindow(dockPanel, pane, floatWindows[i].Bounds);
+            else {
+              int indexPrevPane = floatWindows[i].NestedPanes[j].IndexPrevPane;
+              DockPane prevPane = indexPrevPane == -1 ? null : dockPanel.Panes[indexPrevPane];
+              DockAlignment alignment = floatWindows[i].NestedPanes[j].Alignment;
+              double proportion = floatWindows[i].NestedPanes[j].Proportion;
+              pane.DockTo(fw, prevPane, alignment, proportion);
             }
 
-            private struct ContentStruct
-            {
-                private string m_persistString;
-                public string PersistString
-                {
-                    get { return m_persistString; }
-                    set { m_persistString = value; }
-                }
-
-                private double m_autoHidePortion;
-                public double AutoHidePortion
-                {
-                    get { return m_autoHidePortion; }
-                    set { m_autoHidePortion = value; }
-                }
-
-                private bool m_isHidden;
-                public bool IsHidden
-                {
-                    get { return m_isHidden; }
-                    set { m_isHidden = value; }
-                }
-
-                private bool m_isFloat;
-                public bool IsFloat
-                {
-                    get { return m_isFloat; }
-                    set { m_isFloat = value; }
-                }
+            if (panes[indexPane].DockState == fw.DockState)
+              panes[indexPane].ZOrderIndex = floatWindows[i].ZOrderIndex;
+          }
+        }
+
+        // sort IDockContent by its Pane's ZOrder
+        int[] sortedContents = null;
+        if (contents.Length > 0) {
+          sortedContents = new int[contents.Length];
+          for (int i = 0; i < contents.Length; i++)
+            sortedContents[i] = i;
+
+          int lastDocument = contents.Length;
+          for (int i = 0; i < contents.Length - 1; i++) {
+            for (int j = i + 1; j < contents.Length; j++) {
+              DockPane pane1 = dockPanel.Contents[sortedContents[i]].DockHandler.Pane;
+              int ZOrderIndex1 = pane1 == null ? 0 : panes[dockPanel.Panes.IndexOf(pane1)].ZOrderIndex;
+              DockPane pane2 = dockPanel.Contents[sortedContents[j]].DockHandler.Pane;
+              int ZOrderIndex2 = pane2 == null ? 0 : panes[dockPanel.Panes.IndexOf(pane2)].ZOrderIndex;
+              if (ZOrderIndex1 > ZOrderIndex2) {
+                int temp = sortedContents[i];
+                sortedContents[i] = sortedContents[j];
+                sortedContents[j] = temp;
+              }
             }
-
-            private struct PaneStruct
-            {
-                private DockState m_dockState;
-                public DockState DockState
-                {
-                    get { return m_dockState; }
-                    set { m_dockState = value; }
-                }
-
-                private int m_indexActiveContent;
-                public int IndexActiveContent
-                {
-                    get { return m_indexActiveContent; }
-                    set { m_indexActiveContent = value; }
-                }
-
-                private int[] m_indexContents;
-                public int[] IndexContents
-                {
-                    get { return m_indexContents; }
-                    set { m_indexContents = value; }
-                }
-
-                private int m_zOrderIndex;
-                public int ZOrderIndex
-                {
-                    get { return m_zOrderIndex; }
-                    set { m_zOrderIndex = value; }
-                }
-            }
-
-            private struct NestedPane
-            {
-                private int m_indexPane;
-                public int IndexPane
-                {
-                    get { return m_indexPane; }
-                    set { m_indexPane = value; }
-                }
-
-                private int m_indexPrevPane;
-                public int IndexPrevPane
-                {
-                    get { return m_indexPrevPane; }
-                    set { m_indexPrevPane = value; }
-                }
-
-                private DockAlignment m_alignment;
-                public DockAlignment Alignment
-                {
-                    get { return m_alignment; }
-                    set { m_alignment = value; }
-                }
-
-                private double m_proportion;
-                public double Proportion
-                {
-                    get { return m_proportion; }
-                    set { m_proportion = value; }
-                }
-            }
-
-            private struct DockWindowStruct
-            {
-                private DockState m_dockState;
-                public DockState DockState
-                {
-                    get { return m_dockState; }
-                    set { m_dockState = value; }
-                }
-
-                private int m_zOrderIndex;
-                public int ZOrderIndex
-                {
-                    get { return m_zOrderIndex; }
-                    set { m_zOrderIndex = value; }
-                }
-
-                private NestedPane[] m_nestedPanes;
-                public NestedPane[] NestedPanes
-                {
-                    get { return m_nestedPanes; }
-                    set { m_nestedPanes = value; }
-                }
-            }
-
-            private struct FloatWindowStruct
-            {
-                private Rectangle m_bounds;
-                public Rectangle Bounds
-                {
-                    get { return m_bounds; }
-                    set { m_bounds = value; }
-                }
-
-                private int m_zOrderIndex;
-                public int ZOrderIndex
-                {
-                    get { return m_zOrderIndex; }
-                    set { m_zOrderIndex = value; }
-                }
-
-                private NestedPane[] m_nestedPanes;
-                public NestedPane[] NestedPanes
-                {
-                    get { return m_nestedPanes; }
-                    set { m_nestedPanes = value; }
-                }
-            }
-
-            public static void SaveAsXml(DockPanel dockPanel, string fileName)
-            {
-                SaveAsXml(dockPanel, fileName, Encoding.Unicode);
-            }
-
-            public static void SaveAsXml(DockPanel dockPanel, string fileName, Encoding encoding)
-            {
-                FileStream fs = new FileStream(fileName, FileMode.Create);
-                try
-                {
-                    SaveAsXml(dockPanel, fs, encoding);
-                }
-                finally
-                {
-                    fs.Close();
-                }
-            }
-
-            public static void SaveAsXml(DockPanel dockPanel, Stream stream, Encoding encoding)
-            {
-                SaveAsXml(dockPanel, stream, encoding, false);
-            }
-
-            public static void SaveAsXml(DockPanel dockPanel, Stream stream, Encoding encoding, bool upstream)
-            {
-                XmlTextWriter xmlOut = new XmlTextWriter(stream, encoding);
-
-                // Use indenting for readability
-                xmlOut.Formatting = Formatting.Indented;
-
-                if (!upstream)
-                    xmlOut.WriteStartDocument();
-
-                // Always begin file with identification and warning
-                xmlOut.WriteComment(Strings.DockPanel_Persistor_XmlFileComment1);
-                xmlOut.WriteComment(Strings.DockPanel_Persistor_XmlFileComment2);
-
-                // Associate a version number with the root element so that future version of the code
-                // will be able to be backwards compatible or at least recognise out of date versions
-                xmlOut.WriteStartElement("DockPanel");
-                xmlOut.WriteAttributeString("FormatVersion", ConfigFileVersion);
-                xmlOut.WriteAttributeString("DockLeftPortion", dockPanel.DockLeftPortion.ToString(CultureInfo.InvariantCulture));
-                xmlOut.WriteAttributeString("DockRightPortion", dockPanel.DockRightPortion.ToString(CultureInfo.InvariantCulture));
-                xmlOut.WriteAttributeString("DockTopPortion", dockPanel.DockTopPortion.ToString(CultureInfo.InvariantCulture));
-                xmlOut.WriteAttributeString("DockBottomPortion", dockPanel.DockBottomPortion.ToString(CultureInfo.InvariantCulture));
-                xmlOut.WriteAttributeString("ActiveDocumentPane", dockPanel.Panes.IndexOf(dockPanel.ActiveDocumentPane).ToString(CultureInfo.InvariantCulture));
-                xmlOut.WriteAttributeString("ActivePane", dockPanel.Panes.IndexOf(dockPanel.ActivePane).ToString(CultureInfo.InvariantCulture));
-
-                // Contents
-                xmlOut.WriteStartElement("Contents");
-                xmlOut.WriteAttributeString("Count", dockPanel.Contents.Count.ToString(CultureInfo.InvariantCulture));
-                foreach (IDockContent content in dockPanel.Contents)
-                {
-                    xmlOut.WriteStartElement("Content");
-                    xmlOut.WriteAttributeString("ID", dockPanel.Contents.IndexOf(content).ToString(CultureInfo.InvariantCulture));
-                    xmlOut.WriteAttributeString("PersistString", content.DockHandler.PersistString);
-                    xmlOut.WriteAttributeString("AutoHidePortion", content.DockHandler.AutoHidePortion.ToString(CultureInfo.InvariantCulture));
-                    xmlOut.WriteAttributeString("IsHidden", content.DockHandler.IsHidden.ToString(CultureInfo.InvariantCulture));
-                    xmlOut.WriteAttributeString("IsFloat", content.DockHandler.IsFloat.ToString(CultureInfo.InvariantCulture));
-                    xmlOut.WriteEndElement();
-                }
-                xmlOut.WriteEndElement();
-
-                // Panes
-                xmlOut.WriteStartElement("Panes");
-                xmlOut.WriteAttributeString("Count", dockPanel.Panes.Count.ToString(CultureInfo.InvariantCulture));
-                foreach (DockPane pane in dockPanel.Panes)
-                {
-                    xmlOut.WriteStartElement("Pane");
-                    xmlOut.WriteAttributeString("ID", dockPanel.Panes.IndexOf(pane).ToString(CultureInfo.InvariantCulture));
-                    xmlOut.WriteAttributeString("DockState", pane.DockState.ToString());
-                    xmlOut.WriteAttributeString("ActiveContent", dockPanel.Contents.IndexOf(pane.ActiveContent).ToString(CultureInfo.InvariantCulture));
-                    xmlOut.WriteStartElement("Contents");
-                    xmlOut.WriteAttributeString("Count", pane.Contents.Count.ToString(CultureInfo.InvariantCulture));
-                    foreach (IDockContent content in pane.Contents)
-                    {
-                        xmlOut.WriteStartElement("Content");
-                        xmlOut.WriteAttributeString("ID", pane.Contents.IndexOf(content).ToString(CultureInfo.InvariantCulture));
-                        xmlOut.WriteAttributeString("RefID", dockPanel.Contents.IndexOf(content).ToString(CultureInfo.InvariantCulture));
-                        xmlOut.WriteEndElement();
-                    }
-                    xmlOut.WriteEndElement();
-                    xmlOut.WriteEndElement();
-                }
-                xmlOut.WriteEndElement();
-
-                // DockWindows
-                xmlOut.WriteStartElement("DockWindows");
-                int dockWindowId = 0;
-                foreach (DockWindow dw in dockPanel.DockWindows)
-                {
-                    xmlOut.WriteStartElement("DockWindow");
-                    xmlOut.WriteAttributeString("ID", dockWindowId.ToString(CultureInfo.InvariantCulture));
-                    dockWindowId++;
-                    xmlOut.WriteAttributeString("DockState", dw.DockState.ToString());
-                    xmlOut.WriteAttributeString("ZOrderIndex", dockPanel.Controls.IndexOf(dw).ToString(CultureInfo.InvariantCulture));
-                    xmlOut.WriteStartElement("NestedPanes");
-                    xmlOut.WriteAttributeString("Count", dw.NestedPanes.Count.ToString(CultureInfo.InvariantCulture));
-                    foreach (DockPane pane in dw.NestedPanes)
-                    {
-                        xmlOut.WriteStartElement("Pane");
-                        xmlOut.WriteAttributeString("ID", dw.NestedPanes.IndexOf(pane).ToString(CultureInfo.InvariantCulture));
-                        xmlOut.WriteAttributeString("RefID", dockPanel.Panes.IndexOf(pane).ToString(CultureInfo.InvariantCulture));
-                        NestedDockingStatus status = pane.NestedDockingStatus;
-                        xmlOut.WriteAttributeString("PrevPane", dockPanel.Panes.IndexOf(status.PreviousPane).ToString(CultureInfo.InvariantCulture));
-                        xmlOut.WriteAttributeString("Alignment", status.Alignment.ToString());
-                        xmlOut.WriteAttributeString("Proportion", status.Proportion.ToString(CultureInfo.InvariantCulture));
-                        xmlOut.WriteEndElement();
-                    }
-                    xmlOut.WriteEndElement();
-                    xmlOut.WriteEndElement();
-                }
-                xmlOut.WriteEndElement();
-
-                // FloatWindows
-                RectangleConverter rectConverter = new RectangleConverter();
-                xmlOut.WriteStartElement("FloatWindows");
-                xmlOut.WriteAttributeString("Count", dockPanel.FloatWindows.Count.ToString(CultureInfo.InvariantCulture));
-                foreach (FloatWindow fw in dockPanel.FloatWindows)
-                {
-                    xmlOut.WriteStartElement("FloatWindow");
-                    xmlOut.WriteAttributeString("ID", dockPanel.FloatWindows.IndexOf(fw).ToString(CultureInfo.InvariantCulture));
-                    xmlOut.WriteAttributeString("Bounds", rectConverter.ConvertToInvariantString(fw.Bounds));
-                    xmlOut.WriteAttributeString("ZOrderIndex", fw.DockPanel.FloatWindows.IndexOf(fw).ToString(CultureInfo.InvariantCulture));
-                    xmlOut.WriteStartElement("NestedPanes");
-                    xmlOut.WriteAttributeString("Count", fw.NestedPanes.Count.ToString(CultureInfo.InvariantCulture));
-                    foreach (DockPane pane in fw.NestedPanes)
-                    {
-                        xmlOut.WriteStartElement("Pane");
-                        xmlOut.WriteAttributeString("ID", fw.NestedPanes.IndexOf(pane).ToString(CultureInfo.InvariantCulture));
-                        xmlOut.WriteAttributeString("RefID", dockPanel.Panes.IndexOf(pane).ToString(CultureInfo.InvariantCulture));
-                        NestedDockingStatus status = pane.NestedDockingStatus;
-                        xmlOut.WriteAttributeString("PrevPane", dockPanel.Panes.IndexOf(status.PreviousPane).ToString(CultureInfo.InvariantCulture));
-                        xmlOut.WriteAttributeString("Alignment", status.Alignment.ToString());
-                        xmlOut.WriteAttributeString("Proportion", status.Proportion.ToString(CultureInfo.InvariantCulture));
-                        xmlOut.WriteEndElement();
-                    }
-                    xmlOut.WriteEndElement();
-                    xmlOut.WriteEndElement();
-                }
-                xmlOut.WriteEndElement();	//	</FloatWindows>
-
-                xmlOut.WriteEndElement();
-
-                if (!upstream)
-                {
-                    xmlOut.WriteEndDocument();
-                    xmlOut.Close();
-                }
-                else
-                    xmlOut.Flush();
-            }
-
-            public static void LoadFromXml(DockPanel dockPanel, string fileName, DeserializeDockContent deserializeContent)
-            {
-                FileStream fs = new FileStream(fileName, FileMode.Open, FileAccess.Read);
-                try
-                {
-                    LoadFromXml(dockPanel, fs, deserializeContent);
-                }
-                finally
-                {
-                    fs.Close();
-                }
-            }
-
-            public static void LoadFromXml(DockPanel dockPanel, Stream stream, DeserializeDockContent deserializeContent)
-            {
-                LoadFromXml(dockPanel, stream, deserializeContent, true);
-            }
-
-            private static ContentStruct[] LoadContents(XmlTextReader xmlIn)
-            {
-                int countOfContents = Convert.ToInt32(xmlIn.GetAttribute("Count"), CultureInfo.InvariantCulture);
-                ContentStruct[] contents = new ContentStruct[countOfContents];
-                MoveToNextElement(xmlIn);
-                for (int i = 0; i < countOfContents; i++)
-                {
-                    int id = Convert.ToInt32(xmlIn.GetAttribute("ID"), CultureInfo.InvariantCulture);
-                    if (xmlIn.Name != "Content" || id != i)
-                        throw new ArgumentException(Strings.DockPanel_LoadFromXml_InvalidXmlFormat);
-
-                    contents[i].PersistString = xmlIn.GetAttribute("PersistString");
-                    contents[i].AutoHidePortion = Convert.ToDouble(xmlIn.GetAttribute("AutoHidePortion"), CultureInfo.InvariantCulture);
-                    contents[i].IsHidden = Convert.ToBoolean(xmlIn.GetAttribute("IsHidden"), CultureInfo.InvariantCulture);
-                    contents[i].IsFloat = Convert.ToBoolean(xmlIn.GetAttribute("IsFloat"), CultureInfo.InvariantCulture);
-                    MoveToNextElement(xmlIn);
-                }
-
-                return contents;
-            }
-
-            private static PaneStruct[] LoadPanes(XmlTextReader xmlIn)
-            {
-                EnumConverter dockStateConverter = new EnumConverter(typeof(DockState));
-                int countOfPanes = Convert.ToInt32(xmlIn.GetAttribute("Count"), CultureInfo.InvariantCulture);
-                PaneStruct[] panes = new PaneStruct[countOfPanes];
-                MoveToNextElement(xmlIn);
-                for (int i = 0; i < countOfPanes; i++)
-                {
-                    int id = Convert.ToInt32(xmlIn.GetAttribute("ID"), CultureInfo.InvariantCulture);
-                    if (xmlIn.Name != "Pane" || id != i)
-                        throw new ArgumentException(Strings.DockPanel_LoadFromXml_InvalidXmlFormat);
-
-                    panes[i].DockState = (DockState)dockStateConverter.ConvertFrom(xmlIn.GetAttribute("DockState"));
-                    panes[i].IndexActiveContent = Convert.ToInt32(xmlIn.GetAttribute("ActiveContent"), CultureInfo.InvariantCulture);
-                    panes[i].ZOrderIndex = -1;
-
-                    MoveToNextElement(xmlIn);
-                    if (xmlIn.Name != "Contents")
-                        throw new ArgumentException(Strings.DockPanel_LoadFromXml_InvalidXmlFormat);
-                    int countOfPaneContents = Convert.ToInt32(xmlIn.GetAttribute("Count"), CultureInfo.InvariantCulture);
-                    panes[i].IndexContents = new int[countOfPaneContents];
-                    MoveToNextElement(xmlIn);
-                    for (int j = 0; j < countOfPaneContents; j++)
-                    {
-                        int id2 = Convert.ToInt32(xmlIn.GetAttribute("ID"), CultureInfo.InvariantCulture);
-                        if (xmlIn.Name != "Content" || id2 != j)
-                            throw new ArgumentException(Strings.DockPanel_LoadFromXml_InvalidXmlFormat);
-
-                        panes[i].IndexContents[j] = Convert.ToInt32(xmlIn.GetAttribute("RefID"), CultureInfo.InvariantCulture);
-                        MoveToNextElement(xmlIn);
-                    }
-                }
-
-                return panes;
-            }
-
-            private static DockWindowStruct[] LoadDockWindows(XmlTextReader xmlIn, DockPanel dockPanel)
-            {
-                EnumConverter dockStateConverter = new EnumConverter(typeof(DockState));
-                EnumConverter dockAlignmentConverter = new EnumConverter(typeof(DockAlignment));
-                int countOfDockWindows = dockPanel.DockWindows.Count;
-                DockWindowStruct[] dockWindows = new DockWindowStruct[countOfDockWindows];
-                MoveToNextElement(xmlIn);
-                for (int i = 0; i < countOfDockWindows; i++)
-                {
-                    int id = Convert.ToInt32(xmlIn.GetAttribute("ID"), CultureInfo.InvariantCulture);
-                    if (xmlIn.Name != "DockWindow" || id != i)
-                        throw new ArgumentException(Strings.DockPanel_LoadFromXml_InvalidXmlFormat);
-
-                    dockWindows[i].DockState = (DockState)dockStateConverter.ConvertFrom(xmlIn.GetAttribute("DockState"));
-                    dockWindows[i].ZOrderIndex = Convert.ToInt32(xmlIn.GetAttribute("ZOrderIndex"), CultureInfo.InvariantCulture);
-                    MoveToNextElement(xmlIn);
-                    if (xmlIn.Name != "DockList" && xmlIn.Name != "NestedPanes")
-                        throw new ArgumentException(Strings.DockPanel_LoadFromXml_InvalidXmlFormat);
-                    int countOfNestedPanes = Convert.ToInt32(xmlIn.GetAttribute("Count"), CultureInfo.InvariantCulture);
-                    dockWindows[i].NestedPanes = new NestedPane[countOfNestedPanes];
-                    MoveToNextElement(xmlIn);
-                    for (int j = 0; j < countOfNestedPanes; j++)
-                    {
-                        int id2 = Convert.ToInt32(xmlIn.GetAttribute("ID"), CultureInfo.InvariantCulture);
-                        if (xmlIn.Name != "Pane" || id2 != j)
-                            throw new ArgumentException(Strings.DockPanel_LoadFromXml_InvalidXmlFormat);
-                        dockWindows[i].NestedPanes[j].IndexPane = Convert.ToInt32(xmlIn.GetAttribute("RefID"), CultureInfo.InvariantCulture);
-                        dockWindows[i].NestedPanes[j].IndexPrevPane = Convert.ToInt32(xmlIn.GetAttribute("PrevPane"), CultureInfo.InvariantCulture);
-                        dockWindows[i].NestedPanes[j].Alignment = (DockAlignment)dockAlignmentConverter.ConvertFrom(xmlIn.GetAttribute("Alignment"));
-                        dockWindows[i].NestedPanes[j].Proportion = Convert.ToDouble(xmlIn.GetAttribute("Proportion"), CultureInfo.InvariantCulture);
-                        MoveToNextElement(xmlIn);
-                    }
-                }
-
-                return dockWindows;
-            }
-
-            private static FloatWindowStruct[] LoadFloatWindows(XmlTextReader xmlIn)
-            {
-                EnumConverter dockAlignmentConverter = new EnumConverter(typeof(DockAlignment));
-                RectangleConverter rectConverter = new RectangleConverter();
-                int countOfFloatWindows = Convert.ToInt32(xmlIn.GetAttribute("Count"), CultureInfo.InvariantCulture);
-                FloatWindowStruct[] floatWindows = new FloatWindowStruct[countOfFloatWindows];
-                MoveToNextElement(xmlIn);
-                for (int i = 0; i < countOfFloatWindows; i++)
-                {
-                    int id = Convert.ToInt32(xmlIn.GetAttribute("ID"), CultureInfo.InvariantCulture);
-                    if (xmlIn.Name != "FloatWindow" || id != i)
-                        throw new ArgumentException(Strings.DockPanel_LoadFromXml_InvalidXmlFormat);
-
-                    floatWindows[i].Bounds = (Rectangle)rectConverter.ConvertFromInvariantString(xmlIn.GetAttribute("Bounds"));
-                    floatWindows[i].ZOrderIndex = Convert.ToInt32(xmlIn.GetAttribute("ZOrderIndex"), CultureInfo.InvariantCulture);
-                    MoveToNextElement(xmlIn);
-                    if (xmlIn.Name != "DockList" && xmlIn.Name != "NestedPanes")
-                        throw new ArgumentException(Strings.DockPanel_LoadFromXml_InvalidXmlFormat);
-                    int countOfNestedPanes = Convert.ToInt32(xmlIn.GetAttribute("Count"), CultureInfo.InvariantCulture);
-                    floatWindows[i].NestedPanes = new NestedPane[countOfNestedPanes];
-                    MoveToNextElement(xmlIn);
-                    for (int j = 0; j < countOfNestedPanes; j++)
-                    {
-                        int id2 = Convert.ToInt32(xmlIn.GetAttribute("ID"), CultureInfo.InvariantCulture);
-                        if (xmlIn.Name != "Pane" || id2 != j)
-                            throw new ArgumentException(Strings.DockPanel_LoadFromXml_InvalidXmlFormat);
-                        floatWindows[i].NestedPanes[j].IndexPane = Convert.ToInt32(xmlIn.GetAttribute("RefID"), CultureInfo.InvariantCulture);
-                        floatWindows[i].NestedPanes[j].IndexPrevPane = Convert.ToInt32(xmlIn.GetAttribute("PrevPane"), CultureInfo.InvariantCulture);
-                        floatWindows[i].NestedPanes[j].Alignment = (DockAlignment)dockAlignmentConverter.ConvertFrom(xmlIn.GetAttribute("Alignment"));
-                        floatWindows[i].NestedPanes[j].Proportion = Convert.ToDouble(xmlIn.GetAttribute("Proportion"), CultureInfo.InvariantCulture);
-                        MoveToNextElement(xmlIn);
-                    }
-                }
-
-                return floatWindows;
-            }
-
-            public static void LoadFromXml(DockPanel dockPanel, Stream stream, DeserializeDockContent deserializeContent, bool closeStream)
-            {
-
-                if (dockPanel.Contents.Count != 0)
-                    throw new InvalidOperationException(Strings.DockPanel_LoadFromXml_AlreadyInitialized);
-
-                XmlTextReader xmlIn = new XmlTextReader(stream);
-                xmlIn.WhitespaceHandling = WhitespaceHandling.None;
-                xmlIn.MoveToContent();
-
-                while (!xmlIn.Name.Equals("DockPanel"))
-                {
-                    if (!MoveToNextElement(xmlIn))
-                        throw new ArgumentException(Strings.DockPanel_LoadFromXml_InvalidXmlFormat);
-                }
-
-                string formatVersion = xmlIn.GetAttribute("FormatVersion");
-                if (!IsFormatVersionValid(formatVersion))
-                    throw new ArgumentException(Strings.DockPanel_LoadFromXml_InvalidFormatVersion);
-
-                DockPanelStruct dockPanelStruct = new DockPanelStruct();
-                dockPanelStruct.DockLeftPortion = Convert.ToDouble(xmlIn.GetAttribute("DockLeftPortion"), CultureInfo.InvariantCulture);
-                dockPanelStruct.DockRightPortion = Convert.ToDouble(xmlIn.GetAttribute("DockRightPortion"), CultureInfo.InvariantCulture);
-                dockPanelStruct.DockTopPortion = Convert.ToDouble(xmlIn.GetAttribute("DockTopPortion"), CultureInfo.InvariantCulture);
-                dockPanelStruct.DockBottomPortion = Convert.ToDouble(xmlIn.GetAttribute("DockBottomPortion"), CultureInfo.InvariantCulture);
-                dockPanelStruct.IndexActiveDocumentPane = Convert.ToInt32(xmlIn.GetAttribute("ActiveDocumentPane"), CultureInfo.InvariantCulture);
-                dockPanelStruct.IndexActivePane = Convert.ToInt32(xmlIn.GetAttribute("ActivePane"), CultureInfo.InvariantCulture);
-
-                // Load Contents
-                MoveToNextElement(xmlIn);
-                if (xmlIn.Name != "Contents")
-                    throw new ArgumentException(Strings.DockPanel_LoadFromXml_InvalidXmlFormat);
-                ContentStruct[] contents = LoadContents(xmlIn);
-
-                // Load Panes
-                if (xmlIn.Name != "Panes")
-                    throw new ArgumentException(Strings.DockPanel_LoadFromXml_InvalidXmlFormat);
-                PaneStruct[] panes = LoadPanes(xmlIn);
-
-                // Load DockWindows
-                if (xmlIn.Name != "DockWindows")
-                    throw new ArgumentException(Strings.DockPanel_LoadFromXml_InvalidXmlFormat);
-                DockWindowStruct[] dockWindows = LoadDockWindows(xmlIn, dockPanel);
-
-                // Load FloatWindows
-                if (xmlIn.Name != "FloatWindows")
-                    throw new ArgumentException(Strings.DockPanel_LoadFromXml_InvalidXmlFormat);
-                FloatWindowStruct[] floatWindows = LoadFloatWindows(xmlIn);
-
-                if (closeStream)
-                    xmlIn.Close();
-
-                dockPanel.SuspendLayout(true);
-
-                dockPanel.DockLeftPortion = dockPanelStruct.DockLeftPortion;
-                dockPanel.DockRightPortion = dockPanelStruct.DockRightPortion;
-                dockPanel.DockTopPortion = dockPanelStruct.DockTopPortion;
-                dockPanel.DockBottomPortion = dockPanelStruct.DockBottomPortion;
-
-                // Set DockWindow ZOrders
-                int prevMaxDockWindowZOrder = int.MaxValue;
-                for (int i = 0; i < dockWindows.Length; i++)
-                {
-                    int maxDockWindowZOrder = -1;
-                    int index = -1;
-                    for (int j = 0; j < dockWindows.Length; j++)
-                    {
-                        if (dockWindows[j].ZOrderIndex > maxDockWindowZOrder && dockWindows[j].ZOrderIndex < prevMaxDockWindowZOrder)
-                        {
-                            maxDockWindowZOrder = dockWindows[j].ZOrderIndex;
-                            index = j;
-                        }
-                    }
-
-                    dockPanel.DockWindows[dockWindows[index].DockState].BringToFront();
-                    prevMaxDockWindowZOrder = maxDockWindowZOrder;
-                }
-
-                // Create Contents
-                for (int i = 0; i < contents.Length; i++)
-                {
-                    IDockContent content = deserializeContent(contents[i].PersistString);
-                    if (content == null)
-                        content = new DummyContent();
-                    content.DockHandler.DockPanel = dockPanel;
-                    content.DockHandler.AutoHidePortion = contents[i].AutoHidePortion;
-                    content.DockHandler.IsHidden = true;
-                    content.DockHandler.IsFloat = contents[i].IsFloat;
-                }
-
-                // Create panes
-                for (int i = 0; i < panes.Length; i++)
-                {
-                    DockPane pane = null;
-                    for (int j = 0; j < panes[i].IndexContents.Length; j++)
-                    {
-                        IDockContent content = dockPanel.Contents[panes[i].IndexContents[j]];
-                        if (j == 0)
-                            pane = dockPanel.DockPaneFactory.CreateDockPane(content, panes[i].DockState, false);
-                        else if (panes[i].DockState == DockState.Float)
-                            content.DockHandler.FloatPane = pane;
-                        else
-                            content.DockHandler.PanelPane = pane;
-                    }
-                }
-
-                // Assign Panes to DockWindows
-                for (int i = 0; i < dockWindows.Length; i++)
-                {
-                    for (int j = 0; j < dockWindows[i].NestedPanes.Length; j++)
-                    {
-                        DockWindow dw = dockPanel.DockWindows[dockWindows[i].DockState];
-                        int indexPane = dockWindows[i].NestedPanes[j].IndexPane;
-                        DockPane pane = dockPanel.Panes[indexPane];
-                        int indexPrevPane = dockWindows[i].NestedPanes[j].IndexPrevPane;
-                        DockPane prevPane = (indexPrevPane == -1) ? dw.NestedPanes.GetDefaultPreviousPane(pane) : dockPanel.Panes[indexPrevPane];
-                        DockAlignment alignment = dockWindows[i].NestedPanes[j].Alignment;
-                        double proportion = dockWindows[i].NestedPanes[j].Proportion;
-                        pane.DockTo(dw, prevPane, alignment, proportion);
-                        if (panes[indexPane].DockState == dw.DockState)
-                            panes[indexPane].ZOrderIndex = dockWindows[i].ZOrderIndex;
-                    }
-                }
-
-                // Create float windows
-                for (int i = 0; i < floatWindows.Length; i++)
-                {
-                    FloatWindow fw = null;
-                    for (int j = 0; j < floatWindows[i].NestedPanes.Length; j++)
-                    {
-                        int indexPane = floatWindows[i].NestedPanes[j].IndexPane;
-                        DockPane pane = dockPanel.Panes[indexPane];
-                        if (j == 0)
-                            fw = dockPanel.FloatWindowFactory.CreateFloatWindow(dockPanel, pane, floatWindows[i].Bounds);
-                        else
-                        {
-                            int indexPrevPane = floatWindows[i].NestedPanes[j].IndexPrevPane;
-                            DockPane prevPane = indexPrevPane == -1 ? null : dockPanel.Panes[indexPrevPane];
-                            DockAlignment alignment = floatWindows[i].NestedPanes[j].Alignment;
-                            double proportion = floatWindows[i].NestedPanes[j].Proportion;
-                            pane.DockTo(fw, prevPane, alignment, proportion);
-                        }
-
-                        if (panes[indexPane].DockState == fw.DockState)
-                            panes[indexPane].ZOrderIndex = floatWindows[i].ZOrderIndex;
-                    }
-                }
-
-                // sort IDockContent by its Pane's ZOrder
-                int[] sortedContents = null;
-                if (contents.Length > 0)
-                {
-                    sortedContents = new int[contents.Length];
-                    for (int i = 0; i < contents.Length; i++)
-                        sortedContents[i] = i;
-
-                    int lastDocument = contents.Length;
-                    for (int i = 0; i < contents.Length - 1; i++)
-                    {
-                        for (int j = i + 1; j < contents.Length; j++)
-                        {
-                            DockPane pane1 = dockPanel.Contents[sortedContents[i]].DockHandler.Pane;
-                            int ZOrderIndex1 = pane1 == null ? 0 : panes[dockPanel.Panes.IndexOf(pane1)].ZOrderIndex;
-                            DockPane pane2 = dockPanel.Contents[sortedContents[j]].DockHandler.Pane;
-                            int ZOrderIndex2 = pane2 == null ? 0 : panes[dockPanel.Panes.IndexOf(pane2)].ZOrderIndex;
-                            if (ZOrderIndex1 > ZOrderIndex2)
-                            {
-                                int temp = sortedContents[i];
-                                sortedContents[i] = sortedContents[j];
-                                sortedContents[j] = temp;
-                            }
-                        }
-                    }
-                }
-
-                // show non-document IDockContent first to avoid screen flickers
-                for (int i = 0; i < contents.Length; i++)
-                {
-                    IDockContent content = dockPanel.Contents[sortedContents[i]];
-                    if (content.DockHandler.Pane != null && content.DockHandler.Pane.DockState != DockState.Document)
-                        content.DockHandler.IsHidden = contents[sortedContents[i]].IsHidden;
-                }
-
-                // after all non-document IDockContent, show document IDockContent
-                for (int i = 0; i < contents.Length; i++)
-                {
-                    IDockContent content = dockPanel.Contents[sortedContents[i]];
-                    if (content.DockHandler.Pane != null && content.DockHandler.Pane.DockState == DockState.Document)
-                        content.DockHandler.IsHidden = contents[sortedContents[i]].IsHidden;
-                }
-
-                for (int i = 0; i < panes.Length; i++)
-                    dockPanel.Panes[i].ActiveContent = panes[i].IndexActiveContent == -1 ? null : dockPanel.Contents[panes[i].IndexActiveContent];
-
-                if (dockPanelStruct.IndexActiveDocumentPane != -1)
-                    dockPanel.Panes[dockPanelStruct.IndexActiveDocumentPane].Activate();
-
-                if (dockPanelStruct.IndexActivePane != -1)
-                    dockPanel.Panes[dockPanelStruct.IndexActivePane].Activate();
-
-                for (int i = dockPanel.Contents.Count - 1; i >= 0; i--)
-                    if (dockPanel.Contents[i] is DummyContent)
-                        dockPanel.Contents[i].DockHandler.Form.Close();
-
-                dockPanel.ResumeLayout(true, true);
-            }
-
-            private static bool MoveToNextElement(XmlTextReader xmlIn)
-            {
-                if (!xmlIn.Read())
-                    return false;
-
-                while (xmlIn.NodeType == XmlNodeType.EndElement)
-                {
-                    if (!xmlIn.Read())
-                        return false;
-                }
-
-                return true;
-            }
-
-            private static bool IsFormatVersionValid(string formatVersion)
-            {
-                if (formatVersion == ConfigFileVersion)
-                    return true;
-
-                foreach (string s in CompatibleConfigFileVersions)
-                    if (s == formatVersion)
-                        return true;
-
-                return false;
-            }
-        }
-
-        public void SaveAsXml(string fileName)
-        {
-            Persistor.SaveAsXml(this, fileName);
-        }
-
-        public void SaveAsXml(string fileName, Encoding encoding)
-        {
-            Persistor.SaveAsXml(this, fileName, encoding);
-        }
-
-        public void SaveAsXml(Stream stream, Encoding encoding)
-        {
-            Persistor.SaveAsXml(this, stream, encoding);
-        }
-
-        public void SaveAsXml(Stream stream, Encoding encoding, bool upstream)
-        {
-            Persistor.SaveAsXml(this, stream, encoding, upstream);
-        }
-
-        public void LoadFromXml(string fileName, DeserializeDockContent deserializeContent)
-        {
-            Persistor.LoadFromXml(this, fileName, deserializeContent);
-        }
-
-        public void LoadFromXml(Stream stream, DeserializeDockContent deserializeContent)
-        {
-            Persistor.LoadFromXml(this, stream, deserializeContent);
-        }
-
-        public void LoadFromXml(Stream stream, DeserializeDockContent deserializeContent, bool closeStream)
-        {
-            Persistor.LoadFromXml(this, stream, deserializeContent, closeStream);
-        }
-    }
+          }
+        }
+
+        // show non-document IDockContent first to avoid screen flickers
+        for (int i = 0; i < contents.Length; i++) {
+          IDockContent content = dockPanel.Contents[sortedContents[i]];
+          if (content.DockHandler.Pane != null && content.DockHandler.Pane.DockState != DockState.Document)
+            content.DockHandler.IsHidden = contents[sortedContents[i]].IsHidden;
+        }
+
+        // after all non-document IDockContent, show document IDockContent
+        for (int i = 0; i < contents.Length; i++) {
+          IDockContent content = dockPanel.Contents[sortedContents[i]];
+          if (content.DockHandler.Pane != null && content.DockHandler.Pane.DockState == DockState.Document)
+            content.DockHandler.IsHidden = contents[sortedContents[i]].IsHidden;
+        }
+
+        for (int i = 0; i < panes.Length; i++)
+          dockPanel.Panes[i].ActiveContent = panes[i].IndexActiveContent == -1 ? null : dockPanel.Contents[panes[i].IndexActiveContent];
+
+        if (dockPanelStruct.IndexActiveDocumentPane != -1)
+          dockPanel.Panes[dockPanelStruct.IndexActiveDocumentPane].Activate();
+
+        if (dockPanelStruct.IndexActivePane != -1)
+          dockPanel.Panes[dockPanelStruct.IndexActivePane].Activate();
+
+        for (int i = dockPanel.Contents.Count - 1; i >= 0; i--)
+          if (dockPanel.Contents[i] is DummyContent)
+            dockPanel.Contents[i].DockHandler.Form.Close();
+
+        dockPanel.ResumeLayout(true, true);
+      }
+
+      private static bool MoveToNextElement(XmlTextReader xmlIn) {
+        if (!xmlIn.Read())
+          return false;
+
+        while (xmlIn.NodeType == XmlNodeType.EndElement) {
+          if (!xmlIn.Read())
+            return false;
+        }
+
+        return true;
+      }
+
+      private static bool IsFormatVersionValid(string formatVersion) {
+        if (formatVersion == ConfigFileVersion)
+          return true;
+
+        foreach (string s in CompatibleConfigFileVersions)
+          if (s == formatVersion)
+            return true;
+
+        return false;
+      }
+    }
+
+    public void SaveAsXml(string fileName) {
+      Persistor.SaveAsXml(this, fileName);
+    }
+
+    public void SaveAsXml(string fileName, Encoding encoding) {
+      Persistor.SaveAsXml(this, fileName, encoding);
+    }
+
+    public void SaveAsXml(Stream stream, Encoding encoding) {
+      Persistor.SaveAsXml(this, stream, encoding);
+    }
+
+    public void SaveAsXml(Stream stream, Encoding encoding, bool upstream) {
+      Persistor.SaveAsXml(this, stream, encoding, upstream);
+    }
+
+    public void LoadFromXml(string fileName, DeserializeDockContent deserializeContent) {
+      Persistor.LoadFromXml(this, fileName, deserializeContent);
+    }
+
+    public void LoadFromXml(Stream stream, DeserializeDockContent deserializeContent) {
+      Persistor.LoadFromXml(this, stream, deserializeContent);
+    }
+
+    public void LoadFromXml(Stream stream, DeserializeDockContent deserializeContent, bool closeStream) {
+      Persistor.LoadFromXml(this, stream, deserializeContent, closeStream);
+    }
+  }
 }
Index: /trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.WinFormsUI/2.3.1/WinFormsUI-2.3.1/Docking/DockPanel.SplitterDragHandler.cs
===================================================================
--- /trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.WinFormsUI/2.3.1/WinFormsUI-2.3.1/Docking/DockPanel.SplitterDragHandler.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.WinFormsUI/2.3.1/WinFormsUI-2.3.1/Docking/DockPanel.SplitterDragHandler.cs	(revision 4068)
@@ -1,165 +1,136 @@
-using System;
-using System.Collections.Generic;
-using System.Text;
+using System.Drawing;
 using System.Windows.Forms;
-using System.Drawing;
-using System.Drawing.Drawing2D;
-using System.ComponentModel;
 
-namespace WeifenLuo.WinFormsUI.Docking
-{
-    partial class DockPanel
-    {
-        private sealed class SplitterDragHandler : DragHandler
-        {
-            private class SplitterOutline
-            {
-                public SplitterOutline()
-                {
-                    m_dragForm = new DragForm();
-                    SetDragForm(Rectangle.Empty);
-                    DragForm.BackColor = Color.Black;
-                    DragForm.Opacity = 0.7;
-                    DragForm.Show(false);
-                }
-
-                DragForm m_dragForm;
-                private DragForm DragForm
-                {
-                    get { return m_dragForm; }
-                }
-
-                public void Show(Rectangle rect)
-                {
-                    SetDragForm(rect);
-                }
-
-                public void Close()
-                {
-                    DragForm.Close();
-                }
-
-                private void SetDragForm(Rectangle rect)
-                {
-                    DragForm.Bounds = rect;
-                    if (rect == Rectangle.Empty)
-                        DragForm.Region = new Region(Rectangle.Empty);
-                    else if (DragForm.Region != null)
-                        DragForm.Region = null;
-                }
-            }
-
-            public SplitterDragHandler(DockPanel dockPanel)
-                : base(dockPanel)
-            {
-            }
-
-            public new ISplitterDragSource DragSource
-            {
-                get { return base.DragSource as ISplitterDragSource; }
-                private set { base.DragSource = value; }
-            }
-
-            private SplitterOutline m_outline;
-            private SplitterOutline Outline
-            {
-                get { return m_outline; }
-                set { m_outline = value; }
-            }
-
-            private Rectangle m_rectSplitter;
-            private Rectangle RectSplitter
-            {
-                get { return m_rectSplitter; }
-                set { m_rectSplitter = value; }
-            }
-
-            public void BeginDrag(ISplitterDragSource dragSource, Rectangle rectSplitter)
-            {
-                DragSource = dragSource;
-                RectSplitter = rectSplitter;
-
-                if (!BeginDrag())
-                {
-                    DragSource = null;
-                    return;
-                }
-
-                Outline = new SplitterOutline();
-                Outline.Show(rectSplitter);
-                DragSource.BeginDrag(rectSplitter);
-            }
-
-            protected override void OnDragging()
-            {
-                Outline.Show(GetSplitterOutlineBounds(Control.MousePosition));
-            }
-
-            protected override void OnEndDrag(bool abort)
-            {
-                DockPanel.SuspendLayout(true);
-
-                Outline.Close();
-
-                if (!abort)
-                    DragSource.MoveSplitter(GetMovingOffset(Control.MousePosition));
-
-                DragSource.EndDrag();
-                DockPanel.ResumeLayout(true, true);
-            }
-
-            private int GetMovingOffset(Point ptMouse)
-            {
-                Rectangle rect = GetSplitterOutlineBounds(ptMouse);
-                if (DragSource.IsVertical)
-                    return rect.X - RectSplitter.X;
-                else
-                    return rect.Y - RectSplitter.Y;
-            }
-
-            private Rectangle GetSplitterOutlineBounds(Point ptMouse)
-            {
-                Rectangle rectLimit = DragSource.DragLimitBounds;
-
-                Rectangle rect = RectSplitter;
-                if (rectLimit.Width <= 0 || rectLimit.Height <= 0)
-                    return rect;
-
-                if (DragSource.IsVertical)
-                {
-                    rect.X += ptMouse.X - StartMousePosition.X;
-                    rect.Height = rectLimit.Height;
-                }
-                else
-                {
-                    rect.Y += ptMouse.Y - StartMousePosition.Y;
-                    rect.Width = rectLimit.Width;
-                }
-
-                if (rect.Left < rectLimit.Left)
-                    rect.X = rectLimit.X;
-                if (rect.Top < rectLimit.Top)
-                    rect.Y = rectLimit.Y;
-                if (rect.Right > rectLimit.Right)
-                    rect.X -= rect.Right - rectLimit.Right;
-                if (rect.Bottom > rectLimit.Bottom)
-                    rect.Y -= rect.Bottom - rectLimit.Bottom;
-
-                return rect;
-            }
+namespace WeifenLuo.WinFormsUI.Docking {
+  partial class DockPanel {
+    private sealed class SplitterDragHandler : DragHandler {
+      private class SplitterOutline {
+        public SplitterOutline() {
+          m_dragForm = new DragForm();
+          SetDragForm(Rectangle.Empty);
+          DragForm.BackColor = Color.Black;
+          DragForm.Opacity = 0.7;
+          DragForm.Show(false);
         }
 
-        private SplitterDragHandler m_splitterDragHandler = null;
-        private SplitterDragHandler GetSplitterDragHandler()
-        {
-            if (m_splitterDragHandler == null)
-                m_splitterDragHandler = new SplitterDragHandler(this);
-            return m_splitterDragHandler;
+        DragForm m_dragForm;
+        private DragForm DragForm {
+          get { return m_dragForm; }
         }
 
-        internal void BeginDrag(ISplitterDragSource dragSource, Rectangle rectSplitter)
-        {
-            GetSplitterDragHandler().BeginDrag(dragSource, rectSplitter);
+        public void Show(Rectangle rect) {
+          SetDragForm(rect);
         }
+
+        public void Close() {
+          DragForm.Close();
+        }
+
+        private void SetDragForm(Rectangle rect) {
+          DragForm.Bounds = rect;
+          if (rect == Rectangle.Empty)
+            DragForm.Region = new Region(Rectangle.Empty);
+          else if (DragForm.Region != null)
+            DragForm.Region = null;
+        }
+      }
+
+      public SplitterDragHandler(DockPanel dockPanel)
+        : base(dockPanel) {
+      }
+
+      public new ISplitterDragSource DragSource {
+        get { return base.DragSource as ISplitterDragSource; }
+        private set { base.DragSource = value; }
+      }
+
+      private SplitterOutline m_outline;
+      private SplitterOutline Outline {
+        get { return m_outline; }
+        set { m_outline = value; }
+      }
+
+      private Rectangle m_rectSplitter;
+      private Rectangle RectSplitter {
+        get { return m_rectSplitter; }
+        set { m_rectSplitter = value; }
+      }
+
+      public void BeginDrag(ISplitterDragSource dragSource, Rectangle rectSplitter) {
+        DragSource = dragSource;
+        RectSplitter = rectSplitter;
+
+        if (!BeginDrag()) {
+          DragSource = null;
+          return;
+        }
+
+        Outline = new SplitterOutline();
+        Outline.Show(rectSplitter);
+        DragSource.BeginDrag(rectSplitter);
+      }
+
+      protected override void OnDragging() {
+        Outline.Show(GetSplitterOutlineBounds(Control.MousePosition));
+      }
+
+      protected override void OnEndDrag(bool abort) {
+        DockPanel.SuspendLayout(true);
+
+        Outline.Close();
+
+        if (!abort)
+          DragSource.MoveSplitter(GetMovingOffset(Control.MousePosition));
+
+        DragSource.EndDrag();
+        DockPanel.ResumeLayout(true, true);
+      }
+
+      private int GetMovingOffset(Point ptMouse) {
+        Rectangle rect = GetSplitterOutlineBounds(ptMouse);
+        if (DragSource.IsVertical)
+          return rect.X - RectSplitter.X;
+        else
+          return rect.Y - RectSplitter.Y;
+      }
+
+      private Rectangle GetSplitterOutlineBounds(Point ptMouse) {
+        Rectangle rectLimit = DragSource.DragLimitBounds;
+
+        Rectangle rect = RectSplitter;
+        if (rectLimit.Width <= 0 || rectLimit.Height <= 0)
+          return rect;
+
+        if (DragSource.IsVertical) {
+          rect.X += ptMouse.X - StartMousePosition.X;
+          rect.Height = rectLimit.Height;
+        } else {
+          rect.Y += ptMouse.Y - StartMousePosition.Y;
+          rect.Width = rectLimit.Width;
+        }
+
+        if (rect.Left < rectLimit.Left)
+          rect.X = rectLimit.X;
+        if (rect.Top < rectLimit.Top)
+          rect.Y = rectLimit.Y;
+        if (rect.Right > rectLimit.Right)
+          rect.X -= rect.Right - rectLimit.Right;
+        if (rect.Bottom > rectLimit.Bottom)
+          rect.Y -= rect.Bottom - rectLimit.Bottom;
+
+        return rect;
+      }
     }
+
+    private SplitterDragHandler m_splitterDragHandler = null;
+    private SplitterDragHandler GetSplitterDragHandler() {
+      if (m_splitterDragHandler == null)
+        m_splitterDragHandler = new SplitterDragHandler(this);
+      return m_splitterDragHandler;
+    }
+
+    internal void BeginDrag(ISplitterDragSource dragSource, Rectangle rectSplitter) {
+      GetSplitterDragHandler().BeginDrag(dragSource, rectSplitter);
+    }
+  }
 }
Index: /trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.WinFormsUI/2.3.1/WinFormsUI-2.3.1/Docking/DockPanel.cs
===================================================================
--- /trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.WinFormsUI/2.3.1/WinFormsUI-2.3.1/Docking/DockPanel.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.WinFormsUI/2.3.1/WinFormsUI-2.3.1/Docking/DockPanel.cs	(revision 4068)
@@ -1,12 +1,8 @@
 using System;
+using System.Collections.Generic;
+using System.ComponentModel;
+using System.Diagnostics.CodeAnalysis;
 using System.Drawing;
-using System.Drawing.Drawing2D;
 using System.Windows.Forms;
-using System.ComponentModel;
-using System.Runtime.InteropServices;
-using System.IO;
-using System.Text;
-using System.Diagnostics.CodeAnalysis;
-using System.Collections.Generic;
 
 // To simplify the process of finding the toolbox bitmap resource:
@@ -15,48 +11,44 @@
 // #3 use the "<default namespace>.<resourcename>" string to locate the resource.
 // See: http://www.bobpowell.net/toolboxbitmap.htm
-internal class resfinder
-{
+internal class resfinder {
 }
 
-namespace WeifenLuo.WinFormsUI.Docking
-{
-    [SuppressMessage("Microsoft.Naming", "CA1720:AvoidTypeNamesInParameters", MessageId = "0#")]
-	public delegate IDockContent DeserializeDockContent(string persistString);
-
-    [LocalizedDescription("DockPanel_Description")]
-    [Designer(typeof(System.Windows.Forms.Design.ControlDesigner))]
-    [ToolboxBitmap(typeof(resfinder), "WeifenLuo.WinFormsUI.Docking.DockPanel.bmp")]
-    [DefaultProperty("DocumentStyle")]
-    [DefaultEvent("ActiveContentChanged")]
-	public partial class DockPanel : Panel
-	{
-        private FocusManagerImpl m_focusManager;
-        private DockPanelExtender m_extender;
-        private DockPaneCollection m_panes;
-        private FloatWindowCollection m_floatWindows;
-        private AutoHideWindowControl m_autoHideWindow;
-        private DockWindowCollection m_dockWindows;
-        private DockContent m_dummyContent; 
-        private Control m_dummyControl;
-        
-		public DockPanel()
-		{
-            m_focusManager = new FocusManagerImpl(this);
-			m_extender = new DockPanelExtender(this);
-			m_panes = new DockPaneCollection();
-			m_floatWindows = new FloatWindowCollection();
-
-            SuspendLayout();
-
-			m_autoHideWindow = new AutoHideWindowControl(this);
-			m_autoHideWindow.Visible = false;
-            SetAutoHideWindowParent();
-
-			m_dummyControl = new DummyControl();
-			m_dummyControl.Bounds = new Rectangle(0, 0, 1, 1);
-			Controls.Add(m_dummyControl);
-
-			m_dockWindows = new DockWindowCollection(this);
-			Controls.AddRange(new Control[]	{
+namespace WeifenLuo.WinFormsUI.Docking {
+  [SuppressMessage("Microsoft.Naming", "CA1720:AvoidTypeNamesInParameters", MessageId = "0#")]
+  public delegate IDockContent DeserializeDockContent(string persistString);
+
+  [LocalizedDescription("DockPanel_Description")]
+  [Designer(typeof(System.Windows.Forms.Design.ControlDesigner))]
+  [ToolboxBitmap(typeof(resfinder), "WeifenLuo.WinFormsUI.Docking.DockPanel.bmp")]
+  [DefaultProperty("DocumentStyle")]
+  [DefaultEvent("ActiveContentChanged")]
+  public partial class DockPanel : Panel {
+    private FocusManagerImpl m_focusManager;
+    private DockPanelExtender m_extender;
+    private DockPaneCollection m_panes;
+    private FloatWindowCollection m_floatWindows;
+    private AutoHideWindowControl m_autoHideWindow;
+    private DockWindowCollection m_dockWindows;
+    private DockContent m_dummyContent;
+    private Control m_dummyControl;
+
+    public DockPanel() {
+      m_focusManager = new FocusManagerImpl(this);
+      m_extender = new DockPanelExtender(this);
+      m_panes = new DockPaneCollection();
+      m_floatWindows = new FloatWindowCollection();
+
+      SuspendLayout();
+
+      m_autoHideWindow = new AutoHideWindowControl(this);
+      m_autoHideWindow.Visible = false;
+      SetAutoHideWindowParent();
+
+      m_dummyControl = new DummyControl();
+      m_dummyControl.Bounds = new Rectangle(0, 0, 1, 1);
+      Controls.Add(m_dummyControl);
+
+      m_dockWindows = new DockWindowCollection(this);
+      Controls.AddRange(new Control[]	{
 				DockWindows[DockState.Document],
 				DockWindows[DockState.DockLeft],
@@ -66,963 +58,830 @@
 				});
 
-			m_dummyContent = new DockContent();
-            ResumeLayout();
-        }
-        
-        private Color m_BackColor;
-        /// <summary>
-        /// Determines the color with which the client rectangle will be drawn.
-        /// If you take this property instead of the BackColor it will not have any influence on the borders to the surrounding controls (DockPane).
-        /// If you use BackColor the borders to the surrounding controls (DockPane) will also change there colors.
-        /// Alternatively you can use both of them (BackColor to draw the define the color of the borders and DockBackColor to define the color of the client rectangle). 
-        /// For Backgroundimages: Set your prefered Image, then set the DockBackColor and the BackColor to the same Color (Control)
-        /// </summary>
-        public Color DockBackColor
-        {
-            get
-            {
-                return !m_BackColor.IsEmpty ? m_BackColor : base.BackColor;
-            }
-            set
-            {
-                m_BackColor = value;
-            }
-        }
-
-		private AutoHideStripBase m_autoHideStripControl = null;
-		internal AutoHideStripBase AutoHideStripControl
-		{
-			get
-			{	
-				if (m_autoHideStripControl == null)
-				{
-					m_autoHideStripControl = AutoHideStripFactory.CreateAutoHideStrip(this);
-					Controls.Add(m_autoHideStripControl);
-				}
-				return m_autoHideStripControl;
-			}
-		}
-        internal void ResetAutoHideStripControl()
-        {
-            if (m_autoHideStripControl != null)
-                m_autoHideStripControl.Dispose();
-
-            m_autoHideStripControl = null;
-        }
-
-		private void MdiClientHandleAssigned(object sender, EventArgs e)
-		{
-			SetMdiClient();
-			PerformLayout();
-		}
-
-		private void MdiClient_Layout(object sender, LayoutEventArgs e)
-		{
-			if (DocumentStyle != DocumentStyle.DockingMdi)
-				return;
-
-			foreach (DockPane pane in Panes)
-				if (pane.DockState == DockState.Document)
-					pane.SetContentBounds();
-
-			InvalidateWindowRegion();
-		}
-
-		private bool m_disposed = false;
-		protected override void Dispose(bool disposing)
-		{
-			lock (this)
-			{
-				if (!m_disposed && disposing)
-				{
-                    m_focusManager.Dispose();
-					if (m_mdiClientController != null)
-					{
-						m_mdiClientController.HandleAssigned -= new EventHandler(MdiClientHandleAssigned);
-						m_mdiClientController.MdiChildActivate -= new EventHandler(ParentFormMdiChildActivate);
-						m_mdiClientController.Layout -= new LayoutEventHandler(MdiClient_Layout);
-						m_mdiClientController.Dispose();
-					}
-					FloatWindows.Dispose();
-					Panes.Dispose();
-					DummyContent.Dispose();
-
-					m_disposed = true;
-				}
-				
-				base.Dispose(disposing);
-			}
-		}
-
-		[Browsable(false)]
-		public IDockContent ActiveAutoHideContent
-		{
-			get	{	return AutoHideWindow.ActiveContent;	}
-			set	{	AutoHideWindow.ActiveContent = value;	}
-		}
-
-        private bool m_allowEndUserDocking = true;
-		[LocalizedCategory("Category_Docking")]
-		[LocalizedDescription("DockPanel_AllowEndUserDocking_Description")]
-		[DefaultValue(true)]
-		public bool AllowEndUserDocking
-		{
-			get	{	return m_allowEndUserDocking;	}
-			set	{	m_allowEndUserDocking = value;	}
-		}
-
-        private bool m_allowEndUserNestedDocking = true;
-        [LocalizedCategory("Category_Docking")]
-        [LocalizedDescription("DockPanel_AllowEndUserNestedDocking_Description")]
-        [DefaultValue(true)]
-        public bool AllowEndUserNestedDocking
-        {
-            get { return m_allowEndUserNestedDocking; }
-            set { m_allowEndUserNestedDocking = value; }
-        }
-
-        private DockContentCollection m_contents = new DockContentCollection();
-		[Browsable(false)]
-		public DockContentCollection Contents
-		{
-			get	{	return m_contents;	}
-		}
-
-		internal DockContent DummyContent
-		{
-			get	{	return m_dummyContent;	}
-		}
-
-        private bool m_rightToLeftLayout = false;
-        [DefaultValue(false)]
-        [LocalizedCategory("Appearance")]
-        [LocalizedDescription("DockPanel_RightToLeftLayout_Description")]
-        public bool RightToLeftLayout
-        {
-            get { return m_rightToLeftLayout; }
-            set
-            {
-                if (m_rightToLeftLayout == value)
-                    return;
-
-                m_rightToLeftLayout = value;
-                foreach (FloatWindow floatWindow in FloatWindows)
-                    floatWindow.RightToLeftLayout = value;
-            }
-        }
-
-        protected override void OnRightToLeftChanged(EventArgs e)
-        {
-            base.OnRightToLeftChanged(e);
-            foreach (FloatWindow floatWindow in FloatWindows)
-            {
-                if (floatWindow.RightToLeft != RightToLeft)
-                    floatWindow.RightToLeft = RightToLeft;
-            }
-        }
-
-		private bool m_showDocumentIcon = false;
-		[DefaultValue(false)]
-		[LocalizedCategory("Category_Docking")]
-		[LocalizedDescription("DockPanel_ShowDocumentIcon_Description")]
-		public bool ShowDocumentIcon
-		{
-			get	{	return m_showDocumentIcon;	}
-			set
-			{
-				if (m_showDocumentIcon == value)
-					return;
-
-				m_showDocumentIcon = value;
-				Refresh();
-			}
-		}
-
-        private DockPanelSkin m_dockPanelSkin = new DockPanelSkin();
-        [LocalizedCategory("Category_Docking")]
-        [LocalizedDescription("DockPanel_DockPanelSkin")]
-        public DockPanelSkin Skin
-        {
-            get { return m_dockPanelSkin; }
-            set { m_dockPanelSkin = value; }
-        }
-
-        private DocumentTabStripLocation m_documentTabStripLocation = DocumentTabStripLocation.Top;
-        [DefaultValue(DocumentTabStripLocation.Top)]
-        [LocalizedCategory("Category_Docking")]
-        [LocalizedDescription("DockPanel_DocumentTabStripLocation")]
-        public DocumentTabStripLocation DocumentTabStripLocation
-        {
-            get { return m_documentTabStripLocation; }
-            set { m_documentTabStripLocation = value; }
-        }
-
-		[Browsable(false)]
-		public DockPanelExtender Extender
-		{
-			get	{	return m_extender;	}
-		}
-
-		public DockPanelExtender.IDockPaneFactory DockPaneFactory
-		{
-			get	{	return Extender.DockPaneFactory;	}
-		}
-
-		public DockPanelExtender.IFloatWindowFactory FloatWindowFactory
-		{
-			get	{	return Extender.FloatWindowFactory;	}
-		}
-
-		internal DockPanelExtender.IDockPaneCaptionFactory DockPaneCaptionFactory
-		{
-			get	{	return Extender.DockPaneCaptionFactory;	}
-		}
-
-		internal DockPanelExtender.IDockPaneStripFactory DockPaneStripFactory
-		{
-			get	{	return Extender.DockPaneStripFactory;	}
-		}
-
-		internal DockPanelExtender.IAutoHideStripFactory AutoHideStripFactory
-		{
-			get	{	return Extender.AutoHideStripFactory;	}
-		}
-
-		[Browsable(false)]
-		public DockPaneCollection Panes
-		{
-			get	{	return m_panes;	}
-		}
-
-		internal Rectangle DockArea
-		{
-			get
-			{
-				return new Rectangle(DockPadding.Left, DockPadding.Top,
-					ClientRectangle.Width - DockPadding.Left - DockPadding.Right,
-					ClientRectangle.Height - DockPadding.Top - DockPadding.Bottom);
-			}
-		}
-
-		private double m_dockBottomPortion = 0.25;
-		[LocalizedCategory("Category_Docking")]
-		[LocalizedDescription("DockPanel_DockBottomPortion_Description")]
-		[DefaultValue(0.25)]
-		public double DockBottomPortion
-		{
-			get	{	return m_dockBottomPortion;	}
-			set
-			{
-				if (value <= 0)
-					throw new ArgumentOutOfRangeException("value");
-
-				if (value == m_dockBottomPortion)
-					return;
-
-				m_dockBottomPortion = value;
-
-                if (m_dockBottomPortion < 1 && m_dockTopPortion < 1)
-                {
-                    if (m_dockTopPortion + m_dockBottomPortion > 1)
-                        m_dockTopPortion = 1 - m_dockBottomPortion;
-                }
-
-				PerformLayout();
-			}
-		}
-
-		private double m_dockLeftPortion = 0.25;
-		[LocalizedCategory("Category_Docking")]
-		[LocalizedDescription("DockPanel_DockLeftPortion_Description")]
-		[DefaultValue(0.25)]
-		public double DockLeftPortion
-		{
-			get	{	return m_dockLeftPortion;	}
-			set
-			{
-				if (value <= 0)
-					throw new ArgumentOutOfRangeException("value");
-
-				if (value == m_dockLeftPortion)
-					return;
-
-				m_dockLeftPortion = value;
-
-                if (m_dockLeftPortion < 1 && m_dockRightPortion < 1)
-                {
-                    if (m_dockLeftPortion + m_dockRightPortion > 1)
-                        m_dockRightPortion = 1 - m_dockLeftPortion;
-                }
-				PerformLayout();
-			}
-		}
-
-		private double m_dockRightPortion = 0.25;
-		[LocalizedCategory("Category_Docking")]
-		[LocalizedDescription("DockPanel_DockRightPortion_Description")]
-		[DefaultValue(0.25)]
-		public double DockRightPortion
-		{
-			get	{	return m_dockRightPortion;	}
-			set
-			{
-				if (value <= 0)
-					throw new ArgumentOutOfRangeException("value");
-
-				if (value == m_dockRightPortion)
-					return;
-
-				m_dockRightPortion = value;
-
-                if (m_dockLeftPortion < 1 && m_dockRightPortion < 1)
-                {
-                    if (m_dockLeftPortion + m_dockRightPortion > 1)
-                        m_dockLeftPortion = 1 - m_dockRightPortion;
-                }
-				PerformLayout();
-			}
-		}
-
-		private double m_dockTopPortion = 0.25;
-		[LocalizedCategory("Category_Docking")]
-		[LocalizedDescription("DockPanel_DockTopPortion_Description")]
-		[DefaultValue(0.25)]
-		public double DockTopPortion
-		{
-			get	{	return m_dockTopPortion;	}
-			set
-			{
-				if (value <= 0)
-					throw new ArgumentOutOfRangeException("value");
-
-				if (value == m_dockTopPortion)
-					return;
-
-				m_dockTopPortion = value;
-
-                if (m_dockTopPortion < 1 && m_dockBottomPortion < 1)
-                {
-                    if (m_dockTopPortion + m_dockBottomPortion > 1)
-                        m_dockBottomPortion = 1 - m_dockTopPortion;
-                }
-				PerformLayout();
-			}
-		}
-
-		[Browsable(false)]
-		public DockWindowCollection DockWindows
-		{
-			get	{	return m_dockWindows;	}
-		}
-
-        public void UpdateDockWindowZOrder(DockStyle dockStyle, bool fullPanelEdge)
-        {
-            if (dockStyle == DockStyle.Left)
-            {
-                if (fullPanelEdge)
-                    DockWindows[DockState.DockLeft].SendToBack();
-                else
-                    DockWindows[DockState.DockLeft].BringToFront();
-            }
-            else if (dockStyle == DockStyle.Right)
-            {
-                if (fullPanelEdge)
-                    DockWindows[DockState.DockRight].SendToBack();
-                else
-                    DockWindows[DockState.DockRight].BringToFront();
-            }
-            else if (dockStyle == DockStyle.Top)
-            {
-                if (fullPanelEdge)
-                    DockWindows[DockState.DockTop].SendToBack();
-                else
-                    DockWindows[DockState.DockTop].BringToFront();
-            }
-            else if (dockStyle == DockStyle.Bottom)
-            {
-                if (fullPanelEdge)
-                    DockWindows[DockState.DockBottom].SendToBack();
-                else
-                    DockWindows[DockState.DockBottom].BringToFront();
-            }
-        }
-
-        public int DocumentsCount
-        {
-            get
-            {
-                int count = 0;
-                foreach (IDockContent content in Documents)
-                    count++;
-
-                return count;
-            }
-        }
-
-        public IDockContent[] DocumentsToArray()
-        {
-            int count = DocumentsCount;
-            IDockContent[] documents = new IDockContent[count];
-            int i = 0;
-            foreach (IDockContent content in Documents)
-            {
-                documents[i] = content;
-                i++;
-            }
-
-            return documents;
-        }
-
-		public IEnumerable<IDockContent> Documents
-		{
-            get
-            {
-                foreach (IDockContent content in Contents)
-                {
-                    if (content.DockHandler.DockState == DockState.Document)
-                        yield return content;
-                }
-            }
-		}
-
-		private Rectangle DocumentRectangle
-		{
-			get
-			{
-				Rectangle rect = DockArea;
-				if (DockWindows[DockState.DockLeft].VisibleNestedPanes.Count != 0)
-				{
-					rect.X += (int)(DockArea.Width * DockLeftPortion);
-					rect.Width -= (int)(DockArea.Width * DockLeftPortion);
-				}
-				if (DockWindows[DockState.DockRight].VisibleNestedPanes.Count != 0)
-					rect.Width -= (int)(DockArea.Width * DockRightPortion);
-				if (DockWindows[DockState.DockTop].VisibleNestedPanes.Count != 0)
-				{
-					rect.Y += (int)(DockArea.Height * DockTopPortion);
-					rect.Height -= (int)(DockArea.Height * DockTopPortion);
-				}
-				if (DockWindows[DockState.DockBottom].VisibleNestedPanes.Count != 0)
-					rect.Height -= (int)(DockArea.Height * DockBottomPortion);
-
-				return rect;
-			}
-		}
-
-		private Control DummyControl
-		{
-			get	{	return m_dummyControl;	}
-		}
-
-		[Browsable(false)]
-		public FloatWindowCollection FloatWindows
-		{
-			get	{	return m_floatWindows;	}
-		}
-
-        private Size m_defaultFloatWindowSize = new Size(300, 300);
-        [Category("Layout")]
-        [LocalizedDescription("DockPanel_DefaultFloatWindowSize_Description")]
-        public Size DefaultFloatWindowSize
-        {
-            get { return m_defaultFloatWindowSize; }
-            set { m_defaultFloatWindowSize = value; }
-        }
-        private bool ShouldSerializeDefaultFloatWindowSize()
-        {
-            return DefaultFloatWindowSize != new Size(300, 300);
-        }
-
-		private DocumentStyle m_documentStyle = DocumentStyle.DockingMdi;
-		[LocalizedCategory("Category_Docking")]
-		[LocalizedDescription("DockPanel_DocumentStyle_Description")]
-		[DefaultValue(DocumentStyle.DockingMdi)]
-		public DocumentStyle DocumentStyle
-		{
-			get	{	return m_documentStyle;	}
-			set
-			{
-				if (value == m_documentStyle)
-					return;
-
-				if (!Enum.IsDefined(typeof(DocumentStyle), value))
-					throw new InvalidEnumArgumentException();
-
-				if (value == DocumentStyle.SystemMdi && DockWindows[DockState.Document].VisibleNestedPanes.Count > 0)
-					throw new InvalidEnumArgumentException();
-
-				m_documentStyle = value;
-
-				SuspendLayout(true);
-
-                SetAutoHideWindowParent();
-				SetMdiClient();
-				InvalidateWindowRegion();
-
-				foreach (IDockContent content in Contents)
-				{
-					if (content.DockHandler.DockState == DockState.Document)
-						content.DockHandler.SetPaneAndVisible(content.DockHandler.Pane);
-				}
-
-                PerformMdiClientLayout();
-
-				ResumeLayout(true, true);
-			}
-		}
-
-        private int GetDockWindowSize(DockState dockState)
-        {
-            if (dockState == DockState.DockLeft || dockState == DockState.DockRight)
-            {
-                int width = ClientRectangle.Width - DockPadding.Left - DockPadding.Right;
-                int dockLeftSize = m_dockLeftPortion >= 1 ? (int)m_dockLeftPortion : (int)(width * m_dockLeftPortion);
-                int dockRightSize = m_dockRightPortion >= 1 ? (int)m_dockRightPortion : (int)(width * m_dockRightPortion);
-
-                if (dockLeftSize < MeasurePane.MinSize)
-                    dockLeftSize = MeasurePane.MinSize;
-                if (dockRightSize < MeasurePane.MinSize)
-                    dockRightSize = MeasurePane.MinSize;
-
-                if (dockLeftSize + dockRightSize > width - MeasurePane.MinSize)
-                {
-                    int adjust = (dockLeftSize + dockRightSize) - (width - MeasurePane.MinSize);
-                    dockLeftSize -= adjust / 2;
-                    dockRightSize -= adjust / 2;
-                }
-
-                return dockState == DockState.DockLeft ? dockLeftSize : dockRightSize;
-            }
-            else if (dockState == DockState.DockTop || dockState == DockState.DockBottom)
-            {
-                int height = ClientRectangle.Height - DockPadding.Top - DockPadding.Bottom;
-                int dockTopSize = m_dockTopPortion >= 1 ? (int)m_dockTopPortion : (int)(height * m_dockTopPortion);
-                int dockBottomSize = m_dockBottomPortion >= 1 ? (int)m_dockBottomPortion : (int)(height * m_dockBottomPortion);
-
-                if (dockTopSize < MeasurePane.MinSize)
-                    dockTopSize = MeasurePane.MinSize;
-                if (dockBottomSize < MeasurePane.MinSize)
-                    dockBottomSize = MeasurePane.MinSize;
-
-                if (dockTopSize + dockBottomSize > height - MeasurePane.MinSize)
-                {
-                    int adjust = (dockTopSize + dockBottomSize) - (height - MeasurePane.MinSize);
-                    dockTopSize -= adjust / 2;
-                    dockBottomSize -= adjust / 2;
-                }
-
-                return dockState == DockState.DockTop ? dockTopSize : dockBottomSize;
-            }
-            else
-                return 0;
-        }
-
-        protected override void OnLayout(LayoutEventArgs levent)
-		{
-			SuspendLayout(true);
-
-			AutoHideStripControl.Bounds = ClientRectangle;
-
-			CalculateDockPadding();
-
-            DockWindows[DockState.DockLeft].Width = GetDockWindowSize(DockState.DockLeft);
-			DockWindows[DockState.DockRight].Width = GetDockWindowSize(DockState.DockRight);
-			DockWindows[DockState.DockTop].Height = GetDockWindowSize(DockState.DockTop);
-			DockWindows[DockState.DockBottom].Height = GetDockWindowSize(DockState.DockBottom);
-
-			AutoHideWindow.Bounds = GetAutoHideWindowBounds(AutoHideWindowRectangle);
-
-			DockWindows[DockState.Document].BringToFront();
-			AutoHideWindow.BringToFront();
-
-			base.OnLayout(levent);
-
-            if (DocumentStyle == DocumentStyle.SystemMdi && MdiClientExists)
-            {
-                SetMdiClientBounds(SystemMdiClientBounds);
-                InvalidateWindowRegion();
-            }
-            else if (DocumentStyle == DocumentStyle.DockingMdi)
-                InvalidateWindowRegion();
-
-			ResumeLayout(true, true);
-		}
-
-		internal Rectangle GetTabStripRectangle(DockState dockState)
-		{
-			return AutoHideStripControl.GetTabStripRectangle(dockState);
-		}
-
-		protected override void OnPaint(PaintEventArgs e)
-		{
-			base.OnPaint(e);
-
-		    if (DockBackColor == BackColor) return;
-
-		    Graphics g = e.Graphics;
-		    SolidBrush bgBrush = new SolidBrush(DockBackColor);
-		    g.FillRectangle(bgBrush, ClientRectangle);
-		}
-
-		internal void AddContent(IDockContent content)
-		{
-			if (content == null)
-				throw(new ArgumentNullException());
-
-			if (!Contents.Contains(content))
-			{
-				Contents.Add(content);
-				OnContentAdded(new DockContentEventArgs(content));
-			}
-		}
-
-		internal void AddPane(DockPane pane)
-		{
-			if (Panes.Contains(pane))
-				return;
-
-			Panes.Add(pane);
-		}
-
-		internal void AddFloatWindow(FloatWindow floatWindow)
-		{
-			if (FloatWindows.Contains(floatWindow))
-				return;
-
-			FloatWindows.Add(floatWindow);
-		}
-
-		private void CalculateDockPadding()
-		{
-			DockPadding.All = 0;
-
-			int height = AutoHideStripControl.MeasureHeight();
-
-			if (AutoHideStripControl.GetNumberOfPanes(DockState.DockLeftAutoHide) > 0)
-				DockPadding.Left = height;
-			if (AutoHideStripControl.GetNumberOfPanes(DockState.DockRightAutoHide) > 0)
-				DockPadding.Right = height;
-			if (AutoHideStripControl.GetNumberOfPanes(DockState.DockTopAutoHide) > 0)
-				DockPadding.Top = height;
-			if (AutoHideStripControl.GetNumberOfPanes(DockState.DockBottomAutoHide) > 0)
-				DockPadding.Bottom = height;
-		}
-
-		internal void RemoveContent(IDockContent content)
-		{
-			if (content == null)
-				throw(new ArgumentNullException());
-			
-			if (Contents.Contains(content))
-			{
-				Contents.Remove(content);
-				OnContentRemoved(new DockContentEventArgs(content));
-			}
-		}
-
-		internal void RemovePane(DockPane pane)
-		{
-			if (!Panes.Contains(pane))
-				return;
-
-			Panes.Remove(pane);
-		}
-
-		internal void RemoveFloatWindow(FloatWindow floatWindow)
-		{
-			if (!FloatWindows.Contains(floatWindow))
-				return;
-
-			FloatWindows.Remove(floatWindow);
-		}
-
-		public void SetPaneIndex(DockPane pane, int index)
-		{
-			int oldIndex = Panes.IndexOf(pane);
-			if (oldIndex == -1)
-				throw(new ArgumentException(Strings.DockPanel_SetPaneIndex_InvalidPane));
-
-			if (index < 0 || index > Panes.Count - 1)
-				if (index != -1)
-					throw(new ArgumentOutOfRangeException(Strings.DockPanel_SetPaneIndex_InvalidIndex));
-				
-			if (oldIndex == index)
-				return;
-			if (oldIndex == Panes.Count - 1 && index == -1)
-				return;
-
-			Panes.Remove(pane);
-			if (index == -1)
-				Panes.Add(pane);
-			else if (oldIndex < index)
-				Panes.AddAt(pane, index - 1);
-			else
-				Panes.AddAt(pane, index);
-		}
-
-		public void SuspendLayout(bool allWindows)
-		{
-            FocusManager.SuspendFocusTracking();
-			SuspendLayout();
-			if (allWindows)
-				SuspendMdiClientLayout();
-		}
-
-		public void ResumeLayout(bool performLayout, bool allWindows)
-		{
-            FocusManager.ResumeFocusTracking();
-            ResumeLayout(performLayout);
-            if (allWindows)
-                ResumeMdiClientLayout(performLayout);
-		}
-
-	    internal Form ParentForm
-		{
-			get
-			{	
-				if (!IsParentFormValid())
-					throw new InvalidOperationException(Strings.DockPanel_ParentForm_Invalid);
-
-				return GetMdiClientController().ParentForm;
-			}
-		}
-
-		private bool IsParentFormValid()
-		{
-			if (DocumentStyle == DocumentStyle.DockingSdi || DocumentStyle == DocumentStyle.DockingWindow)
-				return true;
-
-            if (!MdiClientExists)
-                GetMdiClientController().RenewMdiClient();
-
-            return (MdiClientExists);
-		}
-
-		protected override void OnParentChanged(EventArgs e)
-		{
-            SetAutoHideWindowParent();
-            GetMdiClientController().ParentForm = (this.Parent as Form);
-			base.OnParentChanged (e);
-		}
-
-        private void SetAutoHideWindowParent()
-        {
-            Control parent;
-            if (DocumentStyle == DocumentStyle.DockingMdi ||
-                DocumentStyle == DocumentStyle.SystemMdi)
-                parent = this.Parent;
-            else
-                parent = this;
-            if (AutoHideWindow.Parent != parent)
-            {
-                AutoHideWindow.Parent = parent;
-                AutoHideWindow.BringToFront();
-            }
-        }
-
-		protected override void OnVisibleChanged(EventArgs e)
-		{
-			base.OnVisibleChanged (e);
-
-			if (Visible)
-				SetMdiClient();
-		}
-
-		private Rectangle SystemMdiClientBounds
-		{
-			get
-			{
-				if (!IsParentFormValid() || !Visible)
-					return Rectangle.Empty;
-
-				Rectangle rect = ParentForm.RectangleToClient(RectangleToScreen(DocumentWindowBounds));
-				return rect;
-			}
-		}
-
-		internal Rectangle DocumentWindowBounds
-		{
-			get
-			{
-				Rectangle rectDocumentBounds = DisplayRectangle;
-				if (DockWindows[DockState.DockLeft].Visible)
-				{
-					rectDocumentBounds.X += DockWindows[DockState.DockLeft].Width;
-					rectDocumentBounds.Width -= DockWindows[DockState.DockLeft].Width;
-				}
-				if (DockWindows[DockState.DockRight].Visible)
-					rectDocumentBounds.Width -= DockWindows[DockState.DockRight].Width;
-				if (DockWindows[DockState.DockTop].Visible)
-				{
-					rectDocumentBounds.Y += DockWindows[DockState.DockTop].Height;
-					rectDocumentBounds.Height -= DockWindows[DockState.DockTop].Height;
-				}
-				if (DockWindows[DockState.DockBottom].Visible)
-					rectDocumentBounds.Height -= DockWindows[DockState.DockBottom].Height;
-
-				return rectDocumentBounds;
-
-			}
-		}
-
-        private PaintEventHandler m_dummyControlPaintEventHandler = null;
-        private void InvalidateWindowRegion()
-        {
-            if (DesignMode)
-                return;
-
-            if (m_dummyControlPaintEventHandler == null)
-                m_dummyControlPaintEventHandler = new PaintEventHandler(DummyControl_Paint);
-
-            DummyControl.Paint += m_dummyControlPaintEventHandler;
-            DummyControl.Invalidate();
-        }
-
-        void DummyControl_Paint(object sender, PaintEventArgs e)
-        {
-            DummyControl.Paint -= m_dummyControlPaintEventHandler;
-            UpdateWindowRegion();
-        }
-
-		private void UpdateWindowRegion()
-		{
-			if (this.DocumentStyle == DocumentStyle.DockingMdi)
-				UpdateWindowRegion_ClipContent();
-			else if (this.DocumentStyle == DocumentStyle.DockingSdi ||
-				this.DocumentStyle == DocumentStyle.DockingWindow)
-				UpdateWindowRegion_FullDocumentArea();
-			else if (this.DocumentStyle == DocumentStyle.SystemMdi)
-				UpdateWindowRegion_EmptyDocumentArea();
-		}
-
-		private void UpdateWindowRegion_FullDocumentArea()
-		{
-			SetRegion(null);
-		}
-
-		private void UpdateWindowRegion_EmptyDocumentArea()
-		{
-			Rectangle rect = DocumentWindowBounds;
-			SetRegion(new Rectangle[] { rect });
-		}
-
-		private void UpdateWindowRegion_ClipContent()
-		{
-			int count = 0;
-			foreach (DockPane pane in this.Panes)
-			{
-				if (!pane.Visible || pane.DockState != DockState.Document)
-					continue;
-
-				count ++;
-			}
-
-            if (count == 0)
-            {
-                SetRegion(null);
-                return;
-            }
-
-			Rectangle[] rects = new Rectangle[count];
-			int i = 0;
-			foreach (DockPane pane in this.Panes)
-			{
-				if (!pane.Visible || pane.DockState != DockState.Document)
-					continue;
-
-                rects[i] = RectangleToClient(pane.RectangleToScreen(pane.ContentRectangle));
-				i++;
-			}
-
-			SetRegion(rects);
-		}
-
-		private Rectangle[] m_clipRects = null;
-		private void SetRegion(Rectangle[] clipRects)
-		{
-			if (!IsClipRectsChanged(clipRects))
-				return;
-
-			m_clipRects = clipRects;
-
-			if (m_clipRects == null || m_clipRects.GetLength(0) == 0)
-				Region = null;
-			else
-			{
-				Region region = new Region(new Rectangle(0, 0, this.Width, this.Height));
-				foreach (Rectangle rect in m_clipRects)
-					region.Exclude(rect);
-				Region = region;
-			}
-		}
-
-		private bool IsClipRectsChanged(Rectangle[] clipRects)
-		{
-			if (clipRects == null && m_clipRects == null)
-				return false;
-			else if ((clipRects == null) != (m_clipRects == null))
-				return true;
-
-			foreach (Rectangle rect in clipRects)
-			{
-				bool matched = false;
-				foreach (Rectangle rect2 in m_clipRects)
-				{
-					if (rect == rect2)
-					{
-						matched = true;
-						break;
-					}
-				}
-				if (!matched)
-					return true;
-			}
-
-			foreach (Rectangle rect2 in m_clipRects)
-			{
-				bool matched = false;
-				foreach (Rectangle rect in clipRects)
-				{
-					if (rect == rect2)
-					{
-						matched = true;
-						break;
-					}
-				}
-				if (!matched)
-					return true;
-			}
-			return false;
-		}
-
-		private static readonly object ContentAddedEvent = new object();
-		[LocalizedCategory("Category_DockingNotification")]
-		[LocalizedDescription("DockPanel_ContentAdded_Description")]
-		public event EventHandler<DockContentEventArgs> ContentAdded
-		{
-			add	{	Events.AddHandler(ContentAddedEvent, value);	}
-			remove	{	Events.RemoveHandler(ContentAddedEvent, value);	}
-		}
-		protected virtual void OnContentAdded(DockContentEventArgs e)
-		{
-			EventHandler<DockContentEventArgs> handler = (EventHandler<DockContentEventArgs>)Events[ContentAddedEvent];
-			if (handler != null)
-				handler(this, e);
-		}
-
-		private static readonly object ContentRemovedEvent = new object();
-		[LocalizedCategory("Category_DockingNotification")]
-		[LocalizedDescription("DockPanel_ContentRemoved_Description")]
-		public event EventHandler<DockContentEventArgs> ContentRemoved
-		{
-			add	{	Events.AddHandler(ContentRemovedEvent, value);	}
-			remove	{	Events.RemoveHandler(ContentRemovedEvent, value);	}
-		}
-		protected virtual void OnContentRemoved(DockContentEventArgs e)
-		{
-			EventHandler<DockContentEventArgs> handler = (EventHandler<DockContentEventArgs>)Events[ContentRemovedEvent];
-			if (handler != null)
-				handler(this, e);
-		}
-    }
+      m_dummyContent = new DockContent();
+      ResumeLayout();
+    }
+
+    private Color m_BackColor;
+    /// <summary>
+    /// Determines the color with which the client rectangle will be drawn.
+    /// If you take this property instead of the BackColor it will not have any influence on the borders to the surrounding controls (DockPane).
+    /// If you use BackColor the borders to the surrounding controls (DockPane) will also change there colors.
+    /// Alternatively you can use both of them (BackColor to draw the define the color of the borders and DockBackColor to define the color of the client rectangle). 
+    /// For Backgroundimages: Set your prefered Image, then set the DockBackColor and the BackColor to the same Color (Control)
+    /// </summary>
+    public Color DockBackColor {
+      get {
+        return !m_BackColor.IsEmpty ? m_BackColor : base.BackColor;
+      }
+      set {
+        m_BackColor = value;
+      }
+    }
+
+    private AutoHideStripBase m_autoHideStripControl = null;
+    internal AutoHideStripBase AutoHideStripControl {
+      get {
+        if (m_autoHideStripControl == null) {
+          m_autoHideStripControl = AutoHideStripFactory.CreateAutoHideStrip(this);
+          Controls.Add(m_autoHideStripControl);
+        }
+        return m_autoHideStripControl;
+      }
+    }
+    internal void ResetAutoHideStripControl() {
+      if (m_autoHideStripControl != null)
+        m_autoHideStripControl.Dispose();
+
+      m_autoHideStripControl = null;
+    }
+
+    private void MdiClientHandleAssigned(object sender, EventArgs e) {
+      SetMdiClient();
+      PerformLayout();
+    }
+
+    private void MdiClient_Layout(object sender, LayoutEventArgs e) {
+      if (DocumentStyle != DocumentStyle.DockingMdi)
+        return;
+
+      foreach (DockPane pane in Panes)
+        if (pane.DockState == DockState.Document)
+          pane.SetContentBounds();
+
+      InvalidateWindowRegion();
+    }
+
+    private bool m_disposed = false;
+    protected override void Dispose(bool disposing) {
+      lock (this) {
+        if (!m_disposed && disposing) {
+          m_focusManager.Dispose();
+          if (m_mdiClientController != null) {
+            m_mdiClientController.HandleAssigned -= new EventHandler(MdiClientHandleAssigned);
+            m_mdiClientController.MdiChildActivate -= new EventHandler(ParentFormMdiChildActivate);
+            m_mdiClientController.Layout -= new LayoutEventHandler(MdiClient_Layout);
+            m_mdiClientController.Dispose();
+          }
+          FloatWindows.Dispose();
+          Panes.Dispose();
+          DummyContent.Dispose();
+
+          m_disposed = true;
+        }
+
+        base.Dispose(disposing);
+      }
+    }
+
+    [Browsable(false)]
+    public IDockContent ActiveAutoHideContent {
+      get { return AutoHideWindow.ActiveContent; }
+      set { AutoHideWindow.ActiveContent = value; }
+    }
+
+    private bool m_allowEndUserDocking = true;
+    [LocalizedCategory("Category_Docking")]
+    [LocalizedDescription("DockPanel_AllowEndUserDocking_Description")]
+    [DefaultValue(true)]
+    public bool AllowEndUserDocking {
+      get { return m_allowEndUserDocking; }
+      set { m_allowEndUserDocking = value; }
+    }
+
+    private bool m_allowEndUserNestedDocking = true;
+    [LocalizedCategory("Category_Docking")]
+    [LocalizedDescription("DockPanel_AllowEndUserNestedDocking_Description")]
+    [DefaultValue(true)]
+    public bool AllowEndUserNestedDocking {
+      get { return m_allowEndUserNestedDocking; }
+      set { m_allowEndUserNestedDocking = value; }
+    }
+
+    private DockContentCollection m_contents = new DockContentCollection();
+    [Browsable(false)]
+    public DockContentCollection Contents {
+      get { return m_contents; }
+    }
+
+    internal DockContent DummyContent {
+      get { return m_dummyContent; }
+    }
+
+    private bool m_rightToLeftLayout = false;
+    [DefaultValue(false)]
+    [LocalizedCategory("Appearance")]
+    [LocalizedDescription("DockPanel_RightToLeftLayout_Description")]
+    public bool RightToLeftLayout {
+      get { return m_rightToLeftLayout; }
+      set {
+        if (m_rightToLeftLayout == value)
+          return;
+
+        m_rightToLeftLayout = value;
+        foreach (FloatWindow floatWindow in FloatWindows)
+          floatWindow.RightToLeftLayout = value;
+      }
+    }
+
+    protected override void OnRightToLeftChanged(EventArgs e) {
+      base.OnRightToLeftChanged(e);
+      foreach (FloatWindow floatWindow in FloatWindows) {
+        if (floatWindow.RightToLeft != RightToLeft)
+          floatWindow.RightToLeft = RightToLeft;
+      }
+    }
+
+    private bool m_showDocumentIcon = false;
+    [DefaultValue(false)]
+    [LocalizedCategory("Category_Docking")]
+    [LocalizedDescription("DockPanel_ShowDocumentIcon_Description")]
+    public bool ShowDocumentIcon {
+      get { return m_showDocumentIcon; }
+      set {
+        if (m_showDocumentIcon == value)
+          return;
+
+        m_showDocumentIcon = value;
+        Refresh();
+      }
+    }
+
+    private DockPanelSkin m_dockPanelSkin = new DockPanelSkin();
+    [LocalizedCategory("Category_Docking")]
+    [LocalizedDescription("DockPanel_DockPanelSkin")]
+    public DockPanelSkin Skin {
+      get { return m_dockPanelSkin; }
+      set { m_dockPanelSkin = value; }
+    }
+
+    private DocumentTabStripLocation m_documentTabStripLocation = DocumentTabStripLocation.Top;
+    [DefaultValue(DocumentTabStripLocation.Top)]
+    [LocalizedCategory("Category_Docking")]
+    [LocalizedDescription("DockPanel_DocumentTabStripLocation")]
+    public DocumentTabStripLocation DocumentTabStripLocation {
+      get { return m_documentTabStripLocation; }
+      set { m_documentTabStripLocation = value; }
+    }
+
+    [Browsable(false)]
+    public DockPanelExtender Extender {
+      get { return m_extender; }
+    }
+
+    public DockPanelExtender.IDockPaneFactory DockPaneFactory {
+      get { return Extender.DockPaneFactory; }
+    }
+
+    public DockPanelExtender.IFloatWindowFactory FloatWindowFactory {
+      get { return Extender.FloatWindowFactory; }
+    }
+
+    internal DockPanelExtender.IDockPaneCaptionFactory DockPaneCaptionFactory {
+      get { return Extender.DockPaneCaptionFactory; }
+    }
+
+    internal DockPanelExtender.IDockPaneStripFactory DockPaneStripFactory {
+      get { return Extender.DockPaneStripFactory; }
+    }
+
+    internal DockPanelExtender.IAutoHideStripFactory AutoHideStripFactory {
+      get { return Extender.AutoHideStripFactory; }
+    }
+
+    [Browsable(false)]
+    public DockPaneCollection Panes {
+      get { return m_panes; }
+    }
+
+    internal Rectangle DockArea {
+      get {
+        return new Rectangle(DockPadding.Left, DockPadding.Top,
+          ClientRectangle.Width - DockPadding.Left - DockPadding.Right,
+          ClientRectangle.Height - DockPadding.Top - DockPadding.Bottom);
+      }
+    }
+
+    private double m_dockBottomPortion = 0.25;
+    [LocalizedCategory("Category_Docking")]
+    [LocalizedDescription("DockPanel_DockBottomPortion_Description")]
+    [DefaultValue(0.25)]
+    public double DockBottomPortion {
+      get { return m_dockBottomPortion; }
+      set {
+        if (value <= 0)
+          throw new ArgumentOutOfRangeException("value");
+
+        if (value == m_dockBottomPortion)
+          return;
+
+        m_dockBottomPortion = value;
+
+        if (m_dockBottomPortion < 1 && m_dockTopPortion < 1) {
+          if (m_dockTopPortion + m_dockBottomPortion > 1)
+            m_dockTopPortion = 1 - m_dockBottomPortion;
+        }
+
+        PerformLayout();
+      }
+    }
+
+    private double m_dockLeftPortion = 0.25;
+    [LocalizedCategory("Category_Docking")]
+    [LocalizedDescription("DockPanel_DockLeftPortion_Description")]
+    [DefaultValue(0.25)]
+    public double DockLeftPortion {
+      get { return m_dockLeftPortion; }
+      set {
+        if (value <= 0)
+          throw new ArgumentOutOfRangeException("value");
+
+        if (value == m_dockLeftPortion)
+          return;
+
+        m_dockLeftPortion = value;
+
+        if (m_dockLeftPortion < 1 && m_dockRightPortion < 1) {
+          if (m_dockLeftPortion + m_dockRightPortion > 1)
+            m_dockRightPortion = 1 - m_dockLeftPortion;
+        }
+        PerformLayout();
+      }
+    }
+
+    private double m_dockRightPortion = 0.25;
+    [LocalizedCategory("Category_Docking")]
+    [LocalizedDescription("DockPanel_DockRightPortion_Description")]
+    [DefaultValue(0.25)]
+    public double DockRightPortion {
+      get { return m_dockRightPortion; }
+      set {
+        if (value <= 0)
+          throw new ArgumentOutOfRangeException("value");
+
+        if (value == m_dockRightPortion)
+          return;
+
+        m_dockRightPortion = value;
+
+        if (m_dockLeftPortion < 1 && m_dockRightPortion < 1) {
+          if (m_dockLeftPortion + m_dockRightPortion > 1)
+            m_dockLeftPortion = 1 - m_dockRightPortion;
+        }
+        PerformLayout();
+      }
+    }
+
+    private double m_dockTopPortion = 0.25;
+    [LocalizedCategory("Category_Docking")]
+    [LocalizedDescription("DockPanel_DockTopPortion_Description")]
+    [DefaultValue(0.25)]
+    public double DockTopPortion {
+      get { return m_dockTopPortion; }
+      set {
+        if (value <= 0)
+          throw new ArgumentOutOfRangeException("value");
+
+        if (value == m_dockTopPortion)
+          return;
+
+        m_dockTopPortion = value;
+
+        if (m_dockTopPortion < 1 && m_dockBottomPortion < 1) {
+          if (m_dockTopPortion + m_dockBottomPortion > 1)
+            m_dockBottomPortion = 1 - m_dockTopPortion;
+        }
+        PerformLayout();
+      }
+    }
+
+    [Browsable(false)]
+    public DockWindowCollection DockWindows {
+      get { return m_dockWindows; }
+    }
+
+    public void UpdateDockWindowZOrder(DockStyle dockStyle, bool fullPanelEdge) {
+      if (dockStyle == DockStyle.Left) {
+        if (fullPanelEdge)
+          DockWindows[DockState.DockLeft].SendToBack();
+        else
+          DockWindows[DockState.DockLeft].BringToFront();
+      } else if (dockStyle == DockStyle.Right) {
+        if (fullPanelEdge)
+          DockWindows[DockState.DockRight].SendToBack();
+        else
+          DockWindows[DockState.DockRight].BringToFront();
+      } else if (dockStyle == DockStyle.Top) {
+        if (fullPanelEdge)
+          DockWindows[DockState.DockTop].SendToBack();
+        else
+          DockWindows[DockState.DockTop].BringToFront();
+      } else if (dockStyle == DockStyle.Bottom) {
+        if (fullPanelEdge)
+          DockWindows[DockState.DockBottom].SendToBack();
+        else
+          DockWindows[DockState.DockBottom].BringToFront();
+      }
+    }
+
+    public int DocumentsCount {
+      get {
+        int count = 0;
+        foreach (IDockContent content in Documents)
+          count++;
+
+        return count;
+      }
+    }
+
+    public IDockContent[] DocumentsToArray() {
+      int count = DocumentsCount;
+      IDockContent[] documents = new IDockContent[count];
+      int i = 0;
+      foreach (IDockContent content in Documents) {
+        documents[i] = content;
+        i++;
+      }
+
+      return documents;
+    }
+
+    public IEnumerable<IDockContent> Documents {
+      get {
+        foreach (IDockContent content in Contents) {
+          if (content.DockHandler.DockState == DockState.Document)
+            yield return content;
+        }
+      }
+    }
+
+    private Rectangle DocumentRectangle {
+      get {
+        Rectangle rect = DockArea;
+        if (DockWindows[DockState.DockLeft].VisibleNestedPanes.Count != 0) {
+          rect.X += (int)(DockArea.Width * DockLeftPortion);
+          rect.Width -= (int)(DockArea.Width * DockLeftPortion);
+        }
+        if (DockWindows[DockState.DockRight].VisibleNestedPanes.Count != 0)
+          rect.Width -= (int)(DockArea.Width * DockRightPortion);
+        if (DockWindows[DockState.DockTop].VisibleNestedPanes.Count != 0) {
+          rect.Y += (int)(DockArea.Height * DockTopPortion);
+          rect.Height -= (int)(DockArea.Height * DockTopPortion);
+        }
+        if (DockWindows[DockState.DockBottom].VisibleNestedPanes.Count != 0)
+          rect.Height -= (int)(DockArea.Height * DockBottomPortion);
+
+        return rect;
+      }
+    }
+
+    private Control DummyControl {
+      get { return m_dummyControl; }
+    }
+
+    [Browsable(false)]
+    public FloatWindowCollection FloatWindows {
+      get { return m_floatWindows; }
+    }
+
+    private Size m_defaultFloatWindowSize = new Size(300, 300);
+    [Category("Layout")]
+    [LocalizedDescription("DockPanel_DefaultFloatWindowSize_Description")]
+    public Size DefaultFloatWindowSize {
+      get { return m_defaultFloatWindowSize; }
+      set { m_defaultFloatWindowSize = value; }
+    }
+    private bool ShouldSerializeDefaultFloatWindowSize() {
+      return DefaultFloatWindowSize != new Size(300, 300);
+    }
+
+    private DocumentStyle m_documentStyle = DocumentStyle.DockingMdi;
+    [LocalizedCategory("Category_Docking")]
+    [LocalizedDescription("DockPanel_DocumentStyle_Description")]
+    [DefaultValue(DocumentStyle.DockingMdi)]
+    public DocumentStyle DocumentStyle {
+      get { return m_documentStyle; }
+      set {
+        if (value == m_documentStyle)
+          return;
+
+        if (!Enum.IsDefined(typeof(DocumentStyle), value))
+          throw new InvalidEnumArgumentException();
+
+        if (value == DocumentStyle.SystemMdi && DockWindows[DockState.Document].VisibleNestedPanes.Count > 0)
+          throw new InvalidEnumArgumentException();
+
+        m_documentStyle = value;
+
+        SuspendLayout(true);
+
+        SetAutoHideWindowParent();
+        SetMdiClient();
+        InvalidateWindowRegion();
+
+        foreach (IDockContent content in Contents) {
+          if (content.DockHandler.DockState == DockState.Document)
+            content.DockHandler.SetPaneAndVisible(content.DockHandler.Pane);
+        }
+
+        PerformMdiClientLayout();
+
+        ResumeLayout(true, true);
+      }
+    }
+
+    private int GetDockWindowSize(DockState dockState) {
+      if (dockState == DockState.DockLeft || dockState == DockState.DockRight) {
+        int width = ClientRectangle.Width - DockPadding.Left - DockPadding.Right;
+        int dockLeftSize = m_dockLeftPortion >= 1 ? (int)m_dockLeftPortion : (int)(width * m_dockLeftPortion);
+        int dockRightSize = m_dockRightPortion >= 1 ? (int)m_dockRightPortion : (int)(width * m_dockRightPortion);
+
+        if (dockLeftSize < MeasurePane.MinSize)
+          dockLeftSize = MeasurePane.MinSize;
+        if (dockRightSize < MeasurePane.MinSize)
+          dockRightSize = MeasurePane.MinSize;
+
+        if (dockLeftSize + dockRightSize > width - MeasurePane.MinSize) {
+          int adjust = (dockLeftSize + dockRightSize) - (width - MeasurePane.MinSize);
+          dockLeftSize -= adjust / 2;
+          dockRightSize -= adjust / 2;
+        }
+
+        return dockState == DockState.DockLeft ? dockLeftSize : dockRightSize;
+      } else if (dockState == DockState.DockTop || dockState == DockState.DockBottom) {
+        int height = ClientRectangle.Height - DockPadding.Top - DockPadding.Bottom;
+        int dockTopSize = m_dockTopPortion >= 1 ? (int)m_dockTopPortion : (int)(height * m_dockTopPortion);
+        int dockBottomSize = m_dockBottomPortion >= 1 ? (int)m_dockBottomPortion : (int)(height * m_dockBottomPortion);
+
+        if (dockTopSize < MeasurePane.MinSize)
+          dockTopSize = MeasurePane.MinSize;
+        if (dockBottomSize < MeasurePane.MinSize)
+          dockBottomSize = MeasurePane.MinSize;
+
+        if (dockTopSize + dockBottomSize > height - MeasurePane.MinSize) {
+          int adjust = (dockTopSize + dockBottomSize) - (height - MeasurePane.MinSize);
+          dockTopSize -= adjust / 2;
+          dockBottomSize -= adjust / 2;
+        }
+
+        return dockState == DockState.DockTop ? dockTopSize : dockBottomSize;
+      } else
+        return 0;
+    }
+
+    protected override void OnLayout(LayoutEventArgs levent) {
+      SuspendLayout(true);
+
+      AutoHideStripControl.Bounds = ClientRectangle;
+
+      CalculateDockPadding();
+
+      DockWindows[DockState.DockLeft].Width = GetDockWindowSize(DockState.DockLeft);
+      DockWindows[DockState.DockRight].Width = GetDockWindowSize(DockState.DockRight);
+      DockWindows[DockState.DockTop].Height = GetDockWindowSize(DockState.DockTop);
+      DockWindows[DockState.DockBottom].Height = GetDockWindowSize(DockState.DockBottom);
+
+      AutoHideWindow.Bounds = GetAutoHideWindowBounds(AutoHideWindowRectangle);
+
+      DockWindows[DockState.Document].BringToFront();
+      AutoHideWindow.BringToFront();
+
+      base.OnLayout(levent);
+
+      if (DocumentStyle == DocumentStyle.SystemMdi && MdiClientExists) {
+        SetMdiClientBounds(SystemMdiClientBounds);
+        InvalidateWindowRegion();
+      } else if (DocumentStyle == DocumentStyle.DockingMdi)
+        InvalidateWindowRegion();
+
+      ResumeLayout(true, true);
+    }
+
+    internal Rectangle GetTabStripRectangle(DockState dockState) {
+      return AutoHideStripControl.GetTabStripRectangle(dockState);
+    }
+
+    protected override void OnPaint(PaintEventArgs e) {
+      base.OnPaint(e);
+
+      if (DockBackColor == BackColor) return;
+
+      Graphics g = e.Graphics;
+      SolidBrush bgBrush = new SolidBrush(DockBackColor);
+      g.FillRectangle(bgBrush, ClientRectangle);
+    }
+
+    internal void AddContent(IDockContent content) {
+      if (content == null)
+        throw (new ArgumentNullException());
+
+      if (!Contents.Contains(content)) {
+        Contents.Add(content);
+        OnContentAdded(new DockContentEventArgs(content));
+      }
+    }
+
+    internal void AddPane(DockPane pane) {
+      if (Panes.Contains(pane))
+        return;
+
+      Panes.Add(pane);
+    }
+
+    internal void AddFloatWindow(FloatWindow floatWindow) {
+      if (FloatWindows.Contains(floatWindow))
+        return;
+
+      FloatWindows.Add(floatWindow);
+    }
+
+    private void CalculateDockPadding() {
+      DockPadding.All = 0;
+
+      int height = AutoHideStripControl.MeasureHeight();
+
+      if (AutoHideStripControl.GetNumberOfPanes(DockState.DockLeftAutoHide) > 0)
+        DockPadding.Left = height;
+      if (AutoHideStripControl.GetNumberOfPanes(DockState.DockRightAutoHide) > 0)
+        DockPadding.Right = height;
+      if (AutoHideStripControl.GetNumberOfPanes(DockState.DockTopAutoHide) > 0)
+        DockPadding.Top = height;
+      if (AutoHideStripControl.GetNumberOfPanes(DockState.DockBottomAutoHide) > 0)
+        DockPadding.Bottom = height;
+    }
+
+    internal void RemoveContent(IDockContent content) {
+      if (content == null)
+        throw (new ArgumentNullException());
+
+      if (Contents.Contains(content)) {
+        Contents.Remove(content);
+        OnContentRemoved(new DockContentEventArgs(content));
+      }
+    }
+
+    internal void RemovePane(DockPane pane) {
+      if (!Panes.Contains(pane))
+        return;
+
+      Panes.Remove(pane);
+    }
+
+    internal void RemoveFloatWindow(FloatWindow floatWindow) {
+      if (!FloatWindows.Contains(floatWindow))
+        return;
+
+      FloatWindows.Remove(floatWindow);
+    }
+
+    public void SetPaneIndex(DockPane pane, int index) {
+      int oldIndex = Panes.IndexOf(pane);
+      if (oldIndex == -1)
+        throw (new ArgumentException(Strings.DockPanel_SetPaneIndex_InvalidPane));
+
+      if (index < 0 || index > Panes.Count - 1)
+        if (index != -1)
+          throw (new ArgumentOutOfRangeException(Strings.DockPanel_SetPaneIndex_InvalidIndex));
+
+      if (oldIndex == index)
+        return;
+      if (oldIndex == Panes.Count - 1 && index == -1)
+        return;
+
+      Panes.Remove(pane);
+      if (index == -1)
+        Panes.Add(pane);
+      else if (oldIndex < index)
+        Panes.AddAt(pane, index - 1);
+      else
+        Panes.AddAt(pane, index);
+    }
+
+    public void SuspendLayout(bool allWindows) {
+      FocusManager.SuspendFocusTracking();
+      SuspendLayout();
+      if (allWindows)
+        SuspendMdiClientLayout();
+    }
+
+    public void ResumeLayout(bool performLayout, bool allWindows) {
+      FocusManager.ResumeFocusTracking();
+      ResumeLayout(performLayout);
+      if (allWindows)
+        ResumeMdiClientLayout(performLayout);
+    }
+
+    internal Form ParentForm {
+      get {
+        if (!IsParentFormValid())
+          throw new InvalidOperationException(Strings.DockPanel_ParentForm_Invalid);
+
+        return GetMdiClientController().ParentForm;
+      }
+    }
+
+    private bool IsParentFormValid() {
+      if (DocumentStyle == DocumentStyle.DockingSdi || DocumentStyle == DocumentStyle.DockingWindow)
+        return true;
+
+      if (!MdiClientExists)
+        GetMdiClientController().RenewMdiClient();
+
+      return (MdiClientExists);
+    }
+
+    protected override void OnParentChanged(EventArgs e) {
+      SetAutoHideWindowParent();
+      GetMdiClientController().ParentForm = (this.Parent as Form);
+      base.OnParentChanged(e);
+    }
+
+    private void SetAutoHideWindowParent() {
+      Control parent;
+      if (DocumentStyle == DocumentStyle.DockingMdi ||
+          DocumentStyle == DocumentStyle.SystemMdi)
+        parent = this.Parent;
+      else
+        parent = this;
+      if (AutoHideWindow.Parent != parent) {
+        AutoHideWindow.Parent = parent;
+        AutoHideWindow.BringToFront();
+      }
+    }
+
+    protected override void OnVisibleChanged(EventArgs e) {
+      base.OnVisibleChanged(e);
+
+      if (Visible)
+        SetMdiClient();
+    }
+
+    private Rectangle SystemMdiClientBounds {
+      get {
+        if (!IsParentFormValid() || !Visible)
+          return Rectangle.Empty;
+
+        Rectangle rect = ParentForm.RectangleToClient(RectangleToScreen(DocumentWindowBounds));
+        return rect;
+      }
+    }
+
+    internal Rectangle DocumentWindowBounds {
+      get {
+        Rectangle rectDocumentBounds = DisplayRectangle;
+        if (DockWindows[DockState.DockLeft].Visible) {
+          rectDocumentBounds.X += DockWindows[DockState.DockLeft].Width;
+          rectDocumentBounds.Width -= DockWindows[DockState.DockLeft].Width;
+        }
+        if (DockWindows[DockState.DockRight].Visible)
+          rectDocumentBounds.Width -= DockWindows[DockState.DockRight].Width;
+        if (DockWindows[DockState.DockTop].Visible) {
+          rectDocumentBounds.Y += DockWindows[DockState.DockTop].Height;
+          rectDocumentBounds.Height -= DockWindows[DockState.DockTop].Height;
+        }
+        if (DockWindows[DockState.DockBottom].Visible)
+          rectDocumentBounds.Height -= DockWindows[DockState.DockBottom].Height;
+
+        return rectDocumentBounds;
+
+      }
+    }
+
+    private PaintEventHandler m_dummyControlPaintEventHandler = null;
+    private void InvalidateWindowRegion() {
+      if (DesignMode)
+        return;
+
+      if (m_dummyControlPaintEventHandler == null)
+        m_dummyControlPaintEventHandler = new PaintEventHandler(DummyControl_Paint);
+
+      DummyControl.Paint += m_dummyControlPaintEventHandler;
+      DummyControl.Invalidate();
+    }
+
+    void DummyControl_Paint(object sender, PaintEventArgs e) {
+      DummyControl.Paint -= m_dummyControlPaintEventHandler;
+      UpdateWindowRegion();
+    }
+
+    private void UpdateWindowRegion() {
+      if (this.DocumentStyle == DocumentStyle.DockingMdi)
+        UpdateWindowRegion_ClipContent();
+      else if (this.DocumentStyle == DocumentStyle.DockingSdi ||
+        this.DocumentStyle == DocumentStyle.DockingWindow)
+        UpdateWindowRegion_FullDocumentArea();
+      else if (this.DocumentStyle == DocumentStyle.SystemMdi)
+        UpdateWindowRegion_EmptyDocumentArea();
+    }
+
+    private void UpdateWindowRegion_FullDocumentArea() {
+      SetRegion(null);
+    }
+
+    private void UpdateWindowRegion_EmptyDocumentArea() {
+      Rectangle rect = DocumentWindowBounds;
+      SetRegion(new Rectangle[] { rect });
+    }
+
+    private void UpdateWindowRegion_ClipContent() {
+      int count = 0;
+      foreach (DockPane pane in this.Panes) {
+        if (!pane.Visible || pane.DockState != DockState.Document)
+          continue;
+
+        count++;
+      }
+
+      if (count == 0) {
+        SetRegion(null);
+        return;
+      }
+
+      Rectangle[] rects = new Rectangle[count];
+      int i = 0;
+      foreach (DockPane pane in this.Panes) {
+        if (!pane.Visible || pane.DockState != DockState.Document)
+          continue;
+
+        rects[i] = RectangleToClient(pane.RectangleToScreen(pane.ContentRectangle));
+        i++;
+      }
+
+      SetRegion(rects);
+    }
+
+    private Rectangle[] m_clipRects = null;
+    private void SetRegion(Rectangle[] clipRects) {
+      if (!IsClipRectsChanged(clipRects))
+        return;
+
+      m_clipRects = clipRects;
+
+      if (m_clipRects == null || m_clipRects.GetLength(0) == 0)
+        Region = null;
+      else {
+        Region region = new Region(new Rectangle(0, 0, this.Width, this.Height));
+        foreach (Rectangle rect in m_clipRects)
+          region.Exclude(rect);
+        Region = region;
+      }
+    }
+
+    private bool IsClipRectsChanged(Rectangle[] clipRects) {
+      if (clipRects == null && m_clipRects == null)
+        return false;
+      else if ((clipRects == null) != (m_clipRects == null))
+        return true;
+
+      foreach (Rectangle rect in clipRects) {
+        bool matched = false;
+        foreach (Rectangle rect2 in m_clipRects) {
+          if (rect == rect2) {
+            matched = true;
+            break;
+          }
+        }
+        if (!matched)
+          return true;
+      }
+
+      foreach (Rectangle rect2 in m_clipRects) {
+        bool matched = false;
+        foreach (Rectangle rect in clipRects) {
+          if (rect == rect2) {
+            matched = true;
+            break;
+          }
+        }
+        if (!matched)
+          return true;
+      }
+      return false;
+    }
+
+    private static readonly object ContentAddedEvent = new object();
+    [LocalizedCategory("Category_DockingNotification")]
+    [LocalizedDescription("DockPanel_ContentAdded_Description")]
+    public event EventHandler<DockContentEventArgs> ContentAdded {
+      add { Events.AddHandler(ContentAddedEvent, value); }
+      remove { Events.RemoveHandler(ContentAddedEvent, value); }
+    }
+    protected virtual void OnContentAdded(DockContentEventArgs e) {
+      EventHandler<DockContentEventArgs> handler = (EventHandler<DockContentEventArgs>)Events[ContentAddedEvent];
+      if (handler != null)
+        handler(this, e);
+    }
+
+    private static readonly object ContentRemovedEvent = new object();
+    [LocalizedCategory("Category_DockingNotification")]
+    [LocalizedDescription("DockPanel_ContentRemoved_Description")]
+    public event EventHandler<DockContentEventArgs> ContentRemoved {
+      add { Events.AddHandler(ContentRemovedEvent, value); }
+      remove { Events.RemoveHandler(ContentRemovedEvent, value); }
+    }
+    protected virtual void OnContentRemoved(DockContentEventArgs e) {
+      EventHandler<DockContentEventArgs> handler = (EventHandler<DockContentEventArgs>)Events[ContentRemovedEvent];
+      if (handler != null)
+        handler(this, e);
+    }
+  }
 }
Index: /trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.WinFormsUI/2.3.1/WinFormsUI-2.3.1/Docking/DockPanelExtender.cs
===================================================================
--- /trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.WinFormsUI/2.3.1/WinFormsUI-2.3.1/Docking/DockPanelExtender.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.WinFormsUI/2.3.1/WinFormsUI-2.3.1/Docking/DockPanelExtender.cs	(revision 4068)
@@ -1,225 +1,187 @@
 using System;
+using System.Diagnostics.CodeAnalysis;
 using System.Drawing;
-using System.Diagnostics.CodeAnalysis;
 
-namespace WeifenLuo.WinFormsUI.Docking
-{
-	public sealed class DockPanelExtender
-	{
-        [SuppressMessage("Microsoft.Design", "CA1034:NestedTypesShouldNotBeVisible")]
-        public interface IDockPaneFactory
-		{
-			DockPane CreateDockPane(IDockContent content, DockState visibleState, bool show);
-            [SuppressMessage("Microsoft.Naming", "CA1720:AvoidTypeNamesInParameters", MessageId = "1#")]            
-			DockPane CreateDockPane(IDockContent content, FloatWindow floatWindow, bool show);
-			DockPane CreateDockPane(IDockContent content, DockPane previousPane, DockAlignment alignment, double proportion, bool show);
-            [SuppressMessage("Microsoft.Naming", "CA1720:AvoidTypeNamesInParameters", MessageId = "1#")]            
-			DockPane CreateDockPane(IDockContent content, Rectangle floatWindowBounds, bool show);
-		}
+namespace WeifenLuo.WinFormsUI.Docking {
+  public sealed class DockPanelExtender {
+    [SuppressMessage("Microsoft.Design", "CA1034:NestedTypesShouldNotBeVisible")]
+    public interface IDockPaneFactory {
+      DockPane CreateDockPane(IDockContent content, DockState visibleState, bool show);
+      [SuppressMessage("Microsoft.Naming", "CA1720:AvoidTypeNamesInParameters", MessageId = "1#")]
+      DockPane CreateDockPane(IDockContent content, FloatWindow floatWindow, bool show);
+      DockPane CreateDockPane(IDockContent content, DockPane previousPane, DockAlignment alignment, double proportion, bool show);
+      [SuppressMessage("Microsoft.Naming", "CA1720:AvoidTypeNamesInParameters", MessageId = "1#")]
+      DockPane CreateDockPane(IDockContent content, Rectangle floatWindowBounds, bool show);
+    }
 
-        [SuppressMessage("Microsoft.Design", "CA1034:NestedTypesShouldNotBeVisible")]
-        public interface IFloatWindowFactory
-		{
-			FloatWindow CreateFloatWindow(DockPanel dockPanel, DockPane pane);
-			FloatWindow CreateFloatWindow(DockPanel dockPanel, DockPane pane, Rectangle bounds);
-		}
+    [SuppressMessage("Microsoft.Design", "CA1034:NestedTypesShouldNotBeVisible")]
+    public interface IFloatWindowFactory {
+      FloatWindow CreateFloatWindow(DockPanel dockPanel, DockPane pane);
+      FloatWindow CreateFloatWindow(DockPanel dockPanel, DockPane pane, Rectangle bounds);
+    }
 
-        [SuppressMessage("Microsoft.Design", "CA1034:NestedTypesShouldNotBeVisible")]
-        public interface IDockPaneCaptionFactory
-		{
-			DockPaneCaptionBase CreateDockPaneCaption(DockPane pane);
-		}
+    [SuppressMessage("Microsoft.Design", "CA1034:NestedTypesShouldNotBeVisible")]
+    public interface IDockPaneCaptionFactory {
+      DockPaneCaptionBase CreateDockPaneCaption(DockPane pane);
+    }
 
-        [SuppressMessage("Microsoft.Design", "CA1034:NestedTypesShouldNotBeVisible")]
-        public interface IDockPaneStripFactory
-		{
-			DockPaneStripBase CreateDockPaneStrip(DockPane pane);
-		}
+    [SuppressMessage("Microsoft.Design", "CA1034:NestedTypesShouldNotBeVisible")]
+    public interface IDockPaneStripFactory {
+      DockPaneStripBase CreateDockPaneStrip(DockPane pane);
+    }
 
-        [SuppressMessage("Microsoft.Design", "CA1034:NestedTypesShouldNotBeVisible")]
-        public interface IAutoHideStripFactory
-		{
-			AutoHideStripBase CreateAutoHideStrip(DockPanel panel);
-		}
+    [SuppressMessage("Microsoft.Design", "CA1034:NestedTypesShouldNotBeVisible")]
+    public interface IAutoHideStripFactory {
+      AutoHideStripBase CreateAutoHideStrip(DockPanel panel);
+    }
 
-		#region DefaultDockPaneFactory
-		private class DefaultDockPaneFactory : IDockPaneFactory
-		{
-			public DockPane CreateDockPane(IDockContent content, DockState visibleState, bool show)
-			{
-				return new DockPane(content, visibleState, show);
-			}
+    #region DefaultDockPaneFactory
+    private class DefaultDockPaneFactory : IDockPaneFactory {
+      public DockPane CreateDockPane(IDockContent content, DockState visibleState, bool show) {
+        return new DockPane(content, visibleState, show);
+      }
 
-			public DockPane CreateDockPane(IDockContent content, FloatWindow floatWindow, bool show)
-			{
-				return new DockPane(content, floatWindow, show);
-			}
+      public DockPane CreateDockPane(IDockContent content, FloatWindow floatWindow, bool show) {
+        return new DockPane(content, floatWindow, show);
+      }
 
-			public DockPane CreateDockPane(IDockContent content, DockPane prevPane, DockAlignment alignment, double proportion, bool show)
-			{
-				return new DockPane(content, prevPane, alignment, proportion, show);
-			}
+      public DockPane CreateDockPane(IDockContent content, DockPane prevPane, DockAlignment alignment, double proportion, bool show) {
+        return new DockPane(content, prevPane, alignment, proportion, show);
+      }
 
-			public DockPane CreateDockPane(IDockContent content, Rectangle floatWindowBounds, bool show)
-			{
-				return new DockPane(content, floatWindowBounds, show);
-			}
-		}
-		#endregion
+      public DockPane CreateDockPane(IDockContent content, Rectangle floatWindowBounds, bool show) {
+        return new DockPane(content, floatWindowBounds, show);
+      }
+    }
+    #endregion
 
-		#region DefaultFloatWindowFactory
-		private class DefaultFloatWindowFactory : IFloatWindowFactory
-		{
-			public FloatWindow CreateFloatWindow(DockPanel dockPanel, DockPane pane)
-			{
-				return new FloatWindow(dockPanel, pane);
-			}
+    #region DefaultFloatWindowFactory
+    private class DefaultFloatWindowFactory : IFloatWindowFactory {
+      public FloatWindow CreateFloatWindow(DockPanel dockPanel, DockPane pane) {
+        return new FloatWindow(dockPanel, pane);
+      }
 
-			public FloatWindow CreateFloatWindow(DockPanel dockPanel, DockPane pane, Rectangle bounds)
-			{
-				return new FloatWindow(dockPanel, pane, bounds);
-			}
-		}
-		#endregion
+      public FloatWindow CreateFloatWindow(DockPanel dockPanel, DockPane pane, Rectangle bounds) {
+        return new FloatWindow(dockPanel, pane, bounds);
+      }
+    }
+    #endregion
 
-		#region DefaultDockPaneCaptionFactory
-		private class DefaultDockPaneCaptionFactory : IDockPaneCaptionFactory
-		{
-			public DockPaneCaptionBase CreateDockPaneCaption(DockPane pane)
-			{
-				return new VS2005DockPaneCaption(pane);
-			}
-		}
-		#endregion
+    #region DefaultDockPaneCaptionFactory
+    private class DefaultDockPaneCaptionFactory : IDockPaneCaptionFactory {
+      public DockPaneCaptionBase CreateDockPaneCaption(DockPane pane) {
+        return new VS2005DockPaneCaption(pane);
+      }
+    }
+    #endregion
 
-		#region DefaultDockPaneTabStripFactory
-		private class DefaultDockPaneStripFactory : IDockPaneStripFactory
-		{
-			public DockPaneStripBase CreateDockPaneStrip(DockPane pane)
-			{
-				return new VS2005DockPaneStrip(pane);
-			}
-		}
-		#endregion
+    #region DefaultDockPaneTabStripFactory
+    private class DefaultDockPaneStripFactory : IDockPaneStripFactory {
+      public DockPaneStripBase CreateDockPaneStrip(DockPane pane) {
+        return new VS2005DockPaneStrip(pane);
+      }
+    }
+    #endregion
 
-		#region DefaultAutoHideStripFactory
-		private class DefaultAutoHideStripFactory : IAutoHideStripFactory
-		{
-			public AutoHideStripBase CreateAutoHideStrip(DockPanel panel)
-			{
-				return new VS2005AutoHideStrip(panel);
-			}
-		}
-		#endregion
+    #region DefaultAutoHideStripFactory
+    private class DefaultAutoHideStripFactory : IAutoHideStripFactory {
+      public AutoHideStripBase CreateAutoHideStrip(DockPanel panel) {
+        return new VS2005AutoHideStrip(panel);
+      }
+    }
+    #endregion
 
-		internal DockPanelExtender(DockPanel dockPanel)
-		{
-			m_dockPanel = dockPanel;
-		}
+    internal DockPanelExtender(DockPanel dockPanel) {
+      m_dockPanel = dockPanel;
+    }
 
-		private DockPanel m_dockPanel;
-		private DockPanel DockPanel
-		{
-			get	{	return m_dockPanel;	}
-		}
+    private DockPanel m_dockPanel;
+    private DockPanel DockPanel {
+      get { return m_dockPanel; }
+    }
 
-		private IDockPaneFactory m_dockPaneFactory = null;
-		public IDockPaneFactory DockPaneFactory
-		{
-			get
-			{
-				if (m_dockPaneFactory == null)
-					m_dockPaneFactory = new DefaultDockPaneFactory();
+    private IDockPaneFactory m_dockPaneFactory = null;
+    public IDockPaneFactory DockPaneFactory {
+      get {
+        if (m_dockPaneFactory == null)
+          m_dockPaneFactory = new DefaultDockPaneFactory();
 
-				return m_dockPaneFactory;
-			}
-			set
-			{
-				if (DockPanel.Panes.Count > 0)
-					throw new InvalidOperationException();
+        return m_dockPaneFactory;
+      }
+      set {
+        if (DockPanel.Panes.Count > 0)
+          throw new InvalidOperationException();
 
-				m_dockPaneFactory = value;
-			}
-		}
+        m_dockPaneFactory = value;
+      }
+    }
 
-		private IFloatWindowFactory m_floatWindowFactory = null;
-		public IFloatWindowFactory FloatWindowFactory
-		{
-			get
-			{
-				if (m_floatWindowFactory == null)
-					m_floatWindowFactory = new DefaultFloatWindowFactory();
+    private IFloatWindowFactory m_floatWindowFactory = null;
+    public IFloatWindowFactory FloatWindowFactory {
+      get {
+        if (m_floatWindowFactory == null)
+          m_floatWindowFactory = new DefaultFloatWindowFactory();
 
-				return m_floatWindowFactory;
-			}
-			set
-			{
-				if (DockPanel.FloatWindows.Count > 0)
-					throw new InvalidOperationException();
+        return m_floatWindowFactory;
+      }
+      set {
+        if (DockPanel.FloatWindows.Count > 0)
+          throw new InvalidOperationException();
 
-				m_floatWindowFactory = value;
-			}
-		}
+        m_floatWindowFactory = value;
+      }
+    }
 
-		private IDockPaneCaptionFactory m_dockPaneCaptionFactory = null;
-		public IDockPaneCaptionFactory DockPaneCaptionFactory
-		{	
-			get
-			{
-				if (m_dockPaneCaptionFactory == null)
-					m_dockPaneCaptionFactory = new DefaultDockPaneCaptionFactory();
+    private IDockPaneCaptionFactory m_dockPaneCaptionFactory = null;
+    public IDockPaneCaptionFactory DockPaneCaptionFactory {
+      get {
+        if (m_dockPaneCaptionFactory == null)
+          m_dockPaneCaptionFactory = new DefaultDockPaneCaptionFactory();
 
-				return m_dockPaneCaptionFactory;
-			}
-			set
-			{
-				if (DockPanel.Panes.Count > 0)
-					throw new InvalidOperationException();
+        return m_dockPaneCaptionFactory;
+      }
+      set {
+        if (DockPanel.Panes.Count > 0)
+          throw new InvalidOperationException();
 
-				m_dockPaneCaptionFactory = value;
-			}
-		}
+        m_dockPaneCaptionFactory = value;
+      }
+    }
 
-		private IDockPaneStripFactory m_dockPaneStripFactory = null;
-		public IDockPaneStripFactory DockPaneStripFactory
-		{
-			get
-			{
-				if (m_dockPaneStripFactory == null)
-					m_dockPaneStripFactory = new DefaultDockPaneStripFactory();
+    private IDockPaneStripFactory m_dockPaneStripFactory = null;
+    public IDockPaneStripFactory DockPaneStripFactory {
+      get {
+        if (m_dockPaneStripFactory == null)
+          m_dockPaneStripFactory = new DefaultDockPaneStripFactory();
 
-				return m_dockPaneStripFactory;
-			}
-			set
-			{
-				if (DockPanel.Contents.Count > 0)
-					throw new InvalidOperationException();
+        return m_dockPaneStripFactory;
+      }
+      set {
+        if (DockPanel.Contents.Count > 0)
+          throw new InvalidOperationException();
 
-				m_dockPaneStripFactory = value;
-			}
-		}
+        m_dockPaneStripFactory = value;
+      }
+    }
 
-		private IAutoHideStripFactory m_autoHideStripFactory = null;
-		public IAutoHideStripFactory AutoHideStripFactory
-		{	
-			get
-			{
-				if (m_autoHideStripFactory == null)
-					m_autoHideStripFactory = new DefaultAutoHideStripFactory();
+    private IAutoHideStripFactory m_autoHideStripFactory = null;
+    public IAutoHideStripFactory AutoHideStripFactory {
+      get {
+        if (m_autoHideStripFactory == null)
+          m_autoHideStripFactory = new DefaultAutoHideStripFactory();
 
-				return m_autoHideStripFactory;
-			}
-			set
-			{
-				if (DockPanel.Contents.Count > 0)
-					throw new InvalidOperationException();
+        return m_autoHideStripFactory;
+      }
+      set {
+        if (DockPanel.Contents.Count > 0)
+          throw new InvalidOperationException();
 
-				if (m_autoHideStripFactory == value)
-					return;
+        if (m_autoHideStripFactory == value)
+          return;
 
-				m_autoHideStripFactory = value;
-                DockPanel.ResetAutoHideStripControl();
-			}
-		}
-	}
+        m_autoHideStripFactory = value;
+        DockPanel.ResetAutoHideStripControl();
+      }
+    }
+  }
 }
Index: /trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.WinFormsUI/2.3.1/WinFormsUI-2.3.1/Docking/DockPanelSkin.cs
===================================================================
--- /trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.WinFormsUI/2.3.1/WinFormsUI-2.3.1/Docking/DockPanelSkin.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.WinFormsUI/2.3.1/WinFormsUI-2.3.1/Docking/DockPanelSkin.cs	(revision 4068)
@@ -1,421 +1,363 @@
 using System;
-using System.Collections.Generic;
-using System.Text;
+using System.ComponentModel;
 using System.Drawing;
 using System.Drawing.Drawing2D;
-using System.Drawing.Design;
-using System.Windows.Forms.Design;
-using System.ComponentModel;
-
-namespace WeifenLuo.WinFormsUI.Docking
-{
-    #region DockPanelSkin classes
-    /// <summary>
-    /// The skin to use when displaying the DockPanel.
-    /// The skin allows custom gradient color schemes to be used when drawing the
-    /// DockStrips and Tabs.
-    /// </summary>
-    [TypeConverter(typeof(DockPanelSkinConverter))]
-    public class DockPanelSkin
-    {
-        private AutoHideStripSkin m_autoHideStripSkin;
-        private DockPaneStripSkin m_dockPaneStripSkin;
-
-        public DockPanelSkin()
-        {
-            m_autoHideStripSkin = new AutoHideStripSkin();
-            m_dockPaneStripSkin = new DockPaneStripSkin();
-        }
-
-        /// <summary>
-        /// The skin used to display the auto hide strips and tabs.
-        /// </summary>
-        public AutoHideStripSkin AutoHideStripSkin
-        {
-            get { return m_autoHideStripSkin; }
-            set { m_autoHideStripSkin = value; }
-        }
-
-        /// <summary>
-        /// The skin used to display the Document and ToolWindow style DockStrips and Tabs.
-        /// </summary>
-        public DockPaneStripSkin DockPaneStripSkin
-        {
-            get { return m_dockPaneStripSkin; }
-            set { m_dockPaneStripSkin = value; }
-        }
-    }
-
-    /// <summary>
-    /// The skin used to display the auto hide strip and tabs.
-    /// </summary>
-    [TypeConverter(typeof(AutoHideStripConverter))]
-    public class AutoHideStripSkin
-    {
-        private DockPanelGradient m_dockStripGradient;
-        private TabGradient m_TabGradient;
-
-        public AutoHideStripSkin()
-        {
-            m_dockStripGradient = new DockPanelGradient();
-            m_dockStripGradient.StartColor = SystemColors.ControlLight;
-            m_dockStripGradient.EndColor = SystemColors.ControlLight;
-
-            m_TabGradient = new TabGradient();
-            m_TabGradient.TextColor = SystemColors.ControlDarkDark;
-        }
-
-        /// <summary>
-        /// The gradient color skin for the DockStrips.
-        /// </summary>
-        public DockPanelGradient DockStripGradient
-        {
-            get { return m_dockStripGradient; }
-            set { m_dockStripGradient = value; }
-        }
-
-        /// <summary>
-        /// The gradient color skin for the Tabs.
-        /// </summary>
-        public TabGradient TabGradient
-        {
-            get { return m_TabGradient; }
-            set { m_TabGradient = value; }
-        }
-    }
-
-    /// <summary>
-    /// The skin used to display the document and tool strips and tabs.
-    /// </summary>
-    [TypeConverter(typeof(DockPaneStripConverter))]
-    public class DockPaneStripSkin
-    {
-        private DockPaneStripGradient m_DocumentGradient;
-        private DockPaneStripToolWindowGradient m_ToolWindowGradient;
-
-        public DockPaneStripSkin()
-        {
-            m_DocumentGradient = new DockPaneStripGradient();
-            m_DocumentGradient.DockStripGradient.StartColor = SystemColors.Control;
-            m_DocumentGradient.DockStripGradient.EndColor = SystemColors.Control;
-            m_DocumentGradient.ActiveTabGradient.StartColor = SystemColors.ControlLightLight;
-            m_DocumentGradient.ActiveTabGradient.EndColor = SystemColors.ControlLightLight;
-            m_DocumentGradient.InactiveTabGradient.StartColor = SystemColors.ControlLight;
-            m_DocumentGradient.InactiveTabGradient.EndColor = SystemColors.ControlLight;
-
-            m_ToolWindowGradient = new DockPaneStripToolWindowGradient();
-            m_ToolWindowGradient.DockStripGradient.StartColor = SystemColors.ControlLight;
-            m_ToolWindowGradient.DockStripGradient.EndColor = SystemColors.ControlLight;
-            
-            m_ToolWindowGradient.ActiveTabGradient.StartColor = SystemColors.Control;
-            m_ToolWindowGradient.ActiveTabGradient.EndColor = SystemColors.Control;
-            
-            m_ToolWindowGradient.InactiveTabGradient.StartColor = Color.Transparent;
-            m_ToolWindowGradient.InactiveTabGradient.EndColor = Color.Transparent;
-            m_ToolWindowGradient.InactiveTabGradient.TextColor = SystemColors.ControlDarkDark;
-            
-            m_ToolWindowGradient.ActiveCaptionGradient.StartColor = SystemColors.GradientActiveCaption;
-            m_ToolWindowGradient.ActiveCaptionGradient.EndColor = SystemColors.ActiveCaption;
-            m_ToolWindowGradient.ActiveCaptionGradient.LinearGradientMode = LinearGradientMode.Vertical;
-            m_ToolWindowGradient.ActiveCaptionGradient.TextColor = SystemColors.ActiveCaptionText;
-
-            m_ToolWindowGradient.InactiveCaptionGradient.StartColor = SystemColors.GradientInactiveCaption;
-            m_ToolWindowGradient.InactiveCaptionGradient.EndColor = SystemColors.GradientInactiveCaption;
-            m_ToolWindowGradient.InactiveCaptionGradient.LinearGradientMode = LinearGradientMode.Vertical;
-            m_ToolWindowGradient.InactiveCaptionGradient.TextColor = SystemColors.ControlText;
-        }
-
-        /// <summary>
-        /// The skin used to display the Document style DockPane strip and tab.
-        /// </summary>
-        public DockPaneStripGradient DocumentGradient
-        {
-            get { return m_DocumentGradient; }
-            set { m_DocumentGradient = value; }
-        }
-
-        /// <summary>
-        /// The skin used to display the ToolWindow style DockPane strip and tab.
-        /// </summary>
-        public DockPaneStripToolWindowGradient ToolWindowGradient
-        {
-            get { return m_ToolWindowGradient; }
-            set { m_ToolWindowGradient = value; }
-        }
-    }
-
-    /// <summary>
-    /// The skin used to display the DockPane ToolWindow strip and tab.
-    /// </summary>
-    [TypeConverter(typeof(DockPaneStripGradientConverter))]
-    public class DockPaneStripToolWindowGradient : DockPaneStripGradient
-    {
-        private TabGradient m_activeCaptionGradient;
-        private TabGradient m_inactiveCaptionGradient;
-
-        public DockPaneStripToolWindowGradient()
-        {
-            m_activeCaptionGradient = new TabGradient();
-            m_inactiveCaptionGradient = new TabGradient();
-        }
-
-        /// <summary>
-        /// The skin used to display the active ToolWindow caption.
-        /// </summary>
-        public TabGradient ActiveCaptionGradient
-        {
-            get { return m_activeCaptionGradient; }
-            set { m_activeCaptionGradient = value; }
-        }
-
-        /// <summary>
-        /// The skin used to display the inactive ToolWindow caption.
-        /// </summary>
-        public TabGradient InactiveCaptionGradient
-        {
-            get { return m_inactiveCaptionGradient; }
-            set { m_inactiveCaptionGradient = value; }
-        }
-    }
-
-    /// <summary>
-    /// The skin used to display the DockPane strip and tab.
-    /// </summary>
-    [TypeConverter(typeof(DockPaneStripGradientConverter))]
-    public class DockPaneStripGradient
-    {
-        private DockPanelGradient m_dockStripGradient;
-        private TabGradient m_activeTabGradient;
-        private TabGradient m_inactiveTabGradient;
-
-        public DockPaneStripGradient()
-        {
-            m_dockStripGradient = new DockPanelGradient();
-            m_activeTabGradient = new TabGradient();
-            m_inactiveTabGradient = new TabGradient();
-        }
-
-        /// <summary>
-        /// The gradient color skin for the DockStrip.
-        /// </summary>
-        public DockPanelGradient DockStripGradient
-        {
-            get { return m_dockStripGradient; }
-            set { m_dockStripGradient = value; }
-        }
-
-        /// <summary>
-        /// The skin used to display the active DockPane tabs.
-        /// </summary>
-        public TabGradient ActiveTabGradient
-        {
-            get { return m_activeTabGradient; }
-            set { m_activeTabGradient = value; }
-        }
-
-        /// <summary>
-        /// The skin used to display the inactive DockPane tabs.
-        /// </summary>
-        public TabGradient InactiveTabGradient
-        {
-            get { return m_inactiveTabGradient; }
-            set { m_inactiveTabGradient = value; }
-        }
-    }
-
-    /// <summary>
-    /// The skin used to display the dock pane tab
-    /// </summary>
-    [TypeConverter(typeof(DockPaneTabGradientConverter))]
-    public class TabGradient : DockPanelGradient
-    {
-        private Color m_textColor;
-
-        public TabGradient()
-        {
-            m_textColor = SystemColors.ControlText;
-        }
-
-        /// <summary>
-        /// The text color.
-        /// </summary>
-        [DefaultValue(typeof(SystemColors), "ControlText")]
-        public Color TextColor
-        {
-            get { return m_textColor; }
-            set { m_textColor = value; }
-        }
-    }
-
-    /// <summary>
-    /// The gradient color skin.
-    /// </summary>
-    [TypeConverter(typeof(DockPanelGradientConverter))]
-    public class DockPanelGradient
-    {
-        private Color m_startColor;
-        private Color m_endColor;
-        private LinearGradientMode m_linearGradientMode;
-
-        public DockPanelGradient()
-        {
-            m_startColor = SystemColors.Control;
-            m_endColor = SystemColors.Control;
-            m_linearGradientMode = LinearGradientMode.Horizontal;
-        }
-
-        /// <summary>
-        /// The beginning gradient color.
-        /// </summary>
-        [DefaultValue(typeof(SystemColors), "Control")]
-        public Color StartColor
-        {
-            get { return m_startColor; }
-            set { m_startColor = value; }
-        }
-
-        /// <summary>
-        /// The ending gradient color.
-        /// </summary>
-        [DefaultValue(typeof(SystemColors), "Control")]
-        public Color EndColor
-        {
-            get { return m_endColor; }
-            set { m_endColor = value; }
-        }
-
-        /// <summary>
-        /// The gradient mode to display the colors.
-        /// </summary>
-        [DefaultValue(LinearGradientMode.Horizontal)]
-        public LinearGradientMode LinearGradientMode
-        {
-            get { return m_linearGradientMode; }
-            set { m_linearGradientMode = value; }
-        }
-    }
-
-    #endregion
-
-    #region Converters
-    public class DockPanelSkinConverter : ExpandableObjectConverter
-    {
-        public override bool CanConvertTo(ITypeDescriptorContext context, Type destinationType)
-        {
-            if (destinationType == typeof(DockPanelSkin))
-                return true;
-
-            return base.CanConvertTo(context, destinationType);
-        }
-
-        public override object ConvertTo(ITypeDescriptorContext context, System.Globalization.CultureInfo culture, object value, Type destinationType)
-        {
-            if (destinationType == typeof(String) && value is DockPanelSkin)
-            {
-                return "DockPanelSkin";
-            }
-            return base.ConvertTo(context, culture, value, destinationType);
-        }
-    }
-
-    public class DockPanelGradientConverter : ExpandableObjectConverter
-    {
-        public override bool CanConvertTo(ITypeDescriptorContext context, Type destinationType)
-        {
-            if (destinationType == typeof(DockPanelGradient))
-                return true;
-
-            return base.CanConvertTo(context, destinationType);
-        }
-
-        public override object ConvertTo(ITypeDescriptorContext context, System.Globalization.CultureInfo culture, object value, Type destinationType)
-        {
-            if (destinationType == typeof(String) && value is DockPanelGradient)
-            {
-                return "DockPanelGradient";
-            }
-            return base.ConvertTo(context, culture, value, destinationType);
-        }
-    }
-
-    public class AutoHideStripConverter : ExpandableObjectConverter
-    {
-        public override bool CanConvertTo(ITypeDescriptorContext context, Type destinationType)
-        {
-            if (destinationType == typeof(AutoHideStripSkin))
-                return true;
-
-            return base.CanConvertTo(context, destinationType);
-        }
-
-        public override object ConvertTo(ITypeDescriptorContext context, System.Globalization.CultureInfo culture, object value, Type destinationType)
-        {
-            if (destinationType == typeof(String) && value is AutoHideStripSkin)
-            {
-                return "AutoHideStripSkin";
-            }
-            return base.ConvertTo(context, culture, value, destinationType);
-        }
-    }
-
-    public class DockPaneStripConverter : ExpandableObjectConverter
-    {
-        public override bool CanConvertTo(ITypeDescriptorContext context, Type destinationType)
-        {
-            if (destinationType == typeof(DockPaneStripSkin))
-                return true;
-
-            return base.CanConvertTo(context, destinationType);
-        }
-
-        public override object ConvertTo(ITypeDescriptorContext context, System.Globalization.CultureInfo culture, object value, Type destinationType)
-        {
-            if (destinationType == typeof(String) && value is DockPaneStripSkin)
-            {
-                return "DockPaneStripSkin";
-            }
-            return base.ConvertTo(context, culture, value, destinationType);
-        }
-    }
-
-    public class DockPaneStripGradientConverter : ExpandableObjectConverter
-    {
-        public override bool CanConvertTo(ITypeDescriptorContext context, Type destinationType)
-        {
-            if (destinationType == typeof(DockPaneStripGradient))
-                return true;
-
-            return base.CanConvertTo(context, destinationType);
-        }
-
-        public override object ConvertTo(ITypeDescriptorContext context, System.Globalization.CultureInfo culture, object value, Type destinationType)
-        {
-            if (destinationType == typeof(String) && value is DockPaneStripGradient)
-            {
-                return "DockPaneStripGradient";
-            }
-            return base.ConvertTo(context, culture, value, destinationType);
-        }
-    }
-
-    public class DockPaneTabGradientConverter : ExpandableObjectConverter
-    {
-        public override bool CanConvertTo(ITypeDescriptorContext context, Type destinationType)
-        {
-            if (destinationType == typeof(TabGradient))
-                return true;
-
-            return base.CanConvertTo(context, destinationType);
-        }
-
-        public override object ConvertTo(ITypeDescriptorContext context, System.Globalization.CultureInfo culture, object value, Type destinationType)
-        {
-            if (destinationType == typeof(String) && value is TabGradient)
-            {
-                return "DockPaneTabGradient";
-            }
-            return base.ConvertTo(context, culture, value, destinationType);
-        }
-    }
-    #endregion
+
+namespace WeifenLuo.WinFormsUI.Docking {
+  #region DockPanelSkin classes
+  /// <summary>
+  /// The skin to use when displaying the DockPanel.
+  /// The skin allows custom gradient color schemes to be used when drawing the
+  /// DockStrips and Tabs.
+  /// </summary>
+  [TypeConverter(typeof(DockPanelSkinConverter))]
+  public class DockPanelSkin {
+    private AutoHideStripSkin m_autoHideStripSkin;
+    private DockPaneStripSkin m_dockPaneStripSkin;
+
+    public DockPanelSkin() {
+      m_autoHideStripSkin = new AutoHideStripSkin();
+      m_dockPaneStripSkin = new DockPaneStripSkin();
+    }
+
+    /// <summary>
+    /// The skin used to display the auto hide strips and tabs.
+    /// </summary>
+    public AutoHideStripSkin AutoHideStripSkin {
+      get { return m_autoHideStripSkin; }
+      set { m_autoHideStripSkin = value; }
+    }
+
+    /// <summary>
+    /// The skin used to display the Document and ToolWindow style DockStrips and Tabs.
+    /// </summary>
+    public DockPaneStripSkin DockPaneStripSkin {
+      get { return m_dockPaneStripSkin; }
+      set { m_dockPaneStripSkin = value; }
+    }
+  }
+
+  /// <summary>
+  /// The skin used to display the auto hide strip and tabs.
+  /// </summary>
+  [TypeConverter(typeof(AutoHideStripConverter))]
+  public class AutoHideStripSkin {
+    private DockPanelGradient m_dockStripGradient;
+    private TabGradient m_TabGradient;
+
+    public AutoHideStripSkin() {
+      m_dockStripGradient = new DockPanelGradient();
+      m_dockStripGradient.StartColor = SystemColors.ControlLight;
+      m_dockStripGradient.EndColor = SystemColors.ControlLight;
+
+      m_TabGradient = new TabGradient();
+      m_TabGradient.TextColor = SystemColors.ControlDarkDark;
+    }
+
+    /// <summary>
+    /// The gradient color skin for the DockStrips.
+    /// </summary>
+    public DockPanelGradient DockStripGradient {
+      get { return m_dockStripGradient; }
+      set { m_dockStripGradient = value; }
+    }
+
+    /// <summary>
+    /// The gradient color skin for the Tabs.
+    /// </summary>
+    public TabGradient TabGradient {
+      get { return m_TabGradient; }
+      set { m_TabGradient = value; }
+    }
+  }
+
+  /// <summary>
+  /// The skin used to display the document and tool strips and tabs.
+  /// </summary>
+  [TypeConverter(typeof(DockPaneStripConverter))]
+  public class DockPaneStripSkin {
+    private DockPaneStripGradient m_DocumentGradient;
+    private DockPaneStripToolWindowGradient m_ToolWindowGradient;
+
+    public DockPaneStripSkin() {
+      m_DocumentGradient = new DockPaneStripGradient();
+      m_DocumentGradient.DockStripGradient.StartColor = SystemColors.Control;
+      m_DocumentGradient.DockStripGradient.EndColor = SystemColors.Control;
+      m_DocumentGradient.ActiveTabGradient.StartColor = SystemColors.ControlLightLight;
+      m_DocumentGradient.ActiveTabGradient.EndColor = SystemColors.ControlLightLight;
+      m_DocumentGradient.InactiveTabGradient.StartColor = SystemColors.ControlLight;
+      m_DocumentGradient.InactiveTabGradient.EndColor = SystemColors.ControlLight;
+
+      m_ToolWindowGradient = new DockPaneStripToolWindowGradient();
+      m_ToolWindowGradient.DockStripGradient.StartColor = SystemColors.ControlLight;
+      m_ToolWindowGradient.DockStripGradient.EndColor = SystemColors.ControlLight;
+
+      m_ToolWindowGradient.ActiveTabGradient.StartColor = SystemColors.Control;
+      m_ToolWindowGradient.ActiveTabGradient.EndColor = SystemColors.Control;
+
+      m_ToolWindowGradient.InactiveTabGradient.StartColor = Color.Transparent;
+      m_ToolWindowGradient.InactiveTabGradient.EndColor = Color.Transparent;
+      m_ToolWindowGradient.InactiveTabGradient.TextColor = SystemColors.ControlDarkDark;
+
+      m_ToolWindowGradient.ActiveCaptionGradient.StartColor = SystemColors.GradientActiveCaption;
+      m_ToolWindowGradient.ActiveCaptionGradient.EndColor = SystemColors.ActiveCaption;
+      m_ToolWindowGradient.ActiveCaptionGradient.LinearGradientMode = LinearGradientMode.Vertical;
+      m_ToolWindowGradient.ActiveCaptionGradient.TextColor = SystemColors.ActiveCaptionText;
+
+      m_ToolWindowGradient.InactiveCaptionGradient.StartColor = SystemColors.GradientInactiveCaption;
+      m_ToolWindowGradient.InactiveCaptionGradient.EndColor = SystemColors.GradientInactiveCaption;
+      m_ToolWindowGradient.InactiveCaptionGradient.LinearGradientMode = LinearGradientMode.Vertical;
+      m_ToolWindowGradient.InactiveCaptionGradient.TextColor = SystemColors.ControlText;
+    }
+
+    /// <summary>
+    /// The skin used to display the Document style DockPane strip and tab.
+    /// </summary>
+    public DockPaneStripGradient DocumentGradient {
+      get { return m_DocumentGradient; }
+      set { m_DocumentGradient = value; }
+    }
+
+    /// <summary>
+    /// The skin used to display the ToolWindow style DockPane strip and tab.
+    /// </summary>
+    public DockPaneStripToolWindowGradient ToolWindowGradient {
+      get { return m_ToolWindowGradient; }
+      set { m_ToolWindowGradient = value; }
+    }
+  }
+
+  /// <summary>
+  /// The skin used to display the DockPane ToolWindow strip and tab.
+  /// </summary>
+  [TypeConverter(typeof(DockPaneStripGradientConverter))]
+  public class DockPaneStripToolWindowGradient : DockPaneStripGradient {
+    private TabGradient m_activeCaptionGradient;
+    private TabGradient m_inactiveCaptionGradient;
+
+    public DockPaneStripToolWindowGradient() {
+      m_activeCaptionGradient = new TabGradient();
+      m_inactiveCaptionGradient = new TabGradient();
+    }
+
+    /// <summary>
+    /// The skin used to display the active ToolWindow caption.
+    /// </summary>
+    public TabGradient ActiveCaptionGradient {
+      get { return m_activeCaptionGradient; }
+      set { m_activeCaptionGradient = value; }
+    }
+
+    /// <summary>
+    /// The skin used to display the inactive ToolWindow caption.
+    /// </summary>
+    public TabGradient InactiveCaptionGradient {
+      get { return m_inactiveCaptionGradient; }
+      set { m_inactiveCaptionGradient = value; }
+    }
+  }
+
+  /// <summary>
+  /// The skin used to display the DockPane strip and tab.
+  /// </summary>
+  [TypeConverter(typeof(DockPaneStripGradientConverter))]
+  public class DockPaneStripGradient {
+    private DockPanelGradient m_dockStripGradient;
+    private TabGradient m_activeTabGradient;
+    private TabGradient m_inactiveTabGradient;
+
+    public DockPaneStripGradient() {
+      m_dockStripGradient = new DockPanelGradient();
+      m_activeTabGradient = new TabGradient();
+      m_inactiveTabGradient = new TabGradient();
+    }
+
+    /// <summary>
+    /// The gradient color skin for the DockStrip.
+    /// </summary>
+    public DockPanelGradient DockStripGradient {
+      get { return m_dockStripGradient; }
+      set { m_dockStripGradient = value; }
+    }
+
+    /// <summary>
+    /// The skin used to display the active DockPane tabs.
+    /// </summary>
+    public TabGradient ActiveTabGradient {
+      get { return m_activeTabGradient; }
+      set { m_activeTabGradient = value; }
+    }
+
+    /// <summary>
+    /// The skin used to display the inactive DockPane tabs.
+    /// </summary>
+    public TabGradient InactiveTabGradient {
+      get { return m_inactiveTabGradient; }
+      set { m_inactiveTabGradient = value; }
+    }
+  }
+
+  /// <summary>
+  /// The skin used to display the dock pane tab
+  /// </summary>
+  [TypeConverter(typeof(DockPaneTabGradientConverter))]
+  public class TabGradient : DockPanelGradient {
+    private Color m_textColor;
+
+    public TabGradient() {
+      m_textColor = SystemColors.ControlText;
+    }
+
+    /// <summary>
+    /// The text color.
+    /// </summary>
+    [DefaultValue(typeof(SystemColors), "ControlText")]
+    public Color TextColor {
+      get { return m_textColor; }
+      set { m_textColor = value; }
+    }
+  }
+
+  /// <summary>
+  /// The gradient color skin.
+  /// </summary>
+  [TypeConverter(typeof(DockPanelGradientConverter))]
+  public class DockPanelGradient {
+    private Color m_startColor;
+    private Color m_endColor;
+    private LinearGradientMode m_linearGradientMode;
+
+    public DockPanelGradient() {
+      m_startColor = SystemColors.Control;
+      m_endColor = SystemColors.Control;
+      m_linearGradientMode = LinearGradientMode.Horizontal;
+    }
+
+    /// <summary>
+    /// The beginning gradient color.
+    /// </summary>
+    [DefaultValue(typeof(SystemColors), "Control")]
+    public Color StartColor {
+      get { return m_startColor; }
+      set { m_startColor = value; }
+    }
+
+    /// <summary>
+    /// The ending gradient color.
+    /// </summary>
+    [DefaultValue(typeof(SystemColors), "Control")]
+    public Color EndColor {
+      get { return m_endColor; }
+      set { m_endColor = value; }
+    }
+
+    /// <summary>
+    /// The gradient mode to display the colors.
+    /// </summary>
+    [DefaultValue(LinearGradientMode.Horizontal)]
+    public LinearGradientMode LinearGradientMode {
+      get { return m_linearGradientMode; }
+      set { m_linearGradientMode = value; }
+    }
+  }
+
+  #endregion
+
+  #region Converters
+  public class DockPanelSkinConverter : ExpandableObjectConverter {
+    public override bool CanConvertTo(ITypeDescriptorContext context, Type destinationType) {
+      if (destinationType == typeof(DockPanelSkin))
+        return true;
+
+      return base.CanConvertTo(context, destinationType);
+    }
+
+    public override object ConvertTo(ITypeDescriptorContext context, System.Globalization.CultureInfo culture, object value, Type destinationType) {
+      if (destinationType == typeof(String) && value is DockPanelSkin) {
+        return "DockPanelSkin";
+      }
+      return base.ConvertTo(context, culture, value, destinationType);
+    }
+  }
+
+  public class DockPanelGradientConverter : ExpandableObjectConverter {
+    public override bool CanConvertTo(ITypeDescriptorContext context, Type destinationType) {
+      if (destinationType == typeof(DockPanelGradient))
+        return true;
+
+      return base.CanConvertTo(context, destinationType);
+    }
+
+    public override object ConvertTo(ITypeDescriptorContext context, System.Globalization.CultureInfo culture, object value, Type destinationType) {
+      if (destinationType == typeof(String) && value is DockPanelGradient) {
+        return "DockPanelGradient";
+      }
+      return base.ConvertTo(context, culture, value, destinationType);
+    }
+  }
+
+  public class AutoHideStripConverter : ExpandableObjectConverter {
+    public override bool CanConvertTo(ITypeDescriptorContext context, Type destinationType) {
+      if (destinationType == typeof(AutoHideStripSkin))
+        return true;
+
+      return base.CanConvertTo(context, destinationType);
+    }
+
+    public override object ConvertTo(ITypeDescriptorContext context, System.Globalization.CultureInfo culture, object value, Type destinationType) {
+      if (destinationType == typeof(String) && value is AutoHideStripSkin) {
+        return "AutoHideStripSkin";
+      }
+      return base.ConvertTo(context, culture, value, destinationType);
+    }
+  }
+
+  public class DockPaneStripConverter : ExpandableObjectConverter {
+    public override bool CanConvertTo(ITypeDescriptorContext context, Type destinationType) {
+      if (destinationType == typeof(DockPaneStripSkin))
+        return true;
+
+      return base.CanConvertTo(context, destinationType);
+    }
+
+    public override object ConvertTo(ITypeDescriptorContext context, System.Globalization.CultureInfo culture, object value, Type destinationType) {
+      if (destinationType == typeof(String) && value is DockPaneStripSkin) {
+        return "DockPaneStripSkin";
+      }
+      return base.ConvertTo(context, culture, value, destinationType);
+    }
+  }
+
+  public class DockPaneStripGradientConverter : ExpandableObjectConverter {
+    public override bool CanConvertTo(ITypeDescriptorContext context, Type destinationType) {
+      if (destinationType == typeof(DockPaneStripGradient))
+        return true;
+
+      return base.CanConvertTo(context, destinationType);
+    }
+
+    public override object ConvertTo(ITypeDescriptorContext context, System.Globalization.CultureInfo culture, object value, Type destinationType) {
+      if (destinationType == typeof(String) && value is DockPaneStripGradient) {
+        return "DockPaneStripGradient";
+      }
+      return base.ConvertTo(context, culture, value, destinationType);
+    }
+  }
+
+  public class DockPaneTabGradientConverter : ExpandableObjectConverter {
+    public override bool CanConvertTo(ITypeDescriptorContext context, Type destinationType) {
+      if (destinationType == typeof(TabGradient))
+        return true;
+
+      return base.CanConvertTo(context, destinationType);
+    }
+
+    public override object ConvertTo(ITypeDescriptorContext context, System.Globalization.CultureInfo culture, object value, Type destinationType) {
+      if (destinationType == typeof(String) && value is TabGradient) {
+        return "DockPaneTabGradient";
+      }
+      return base.ConvertTo(context, culture, value, destinationType);
+    }
+  }
+  #endregion
 }
Index: /trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.WinFormsUI/2.3.1/WinFormsUI-2.3.1/Docking/DockWindow.SplitterControl.cs
===================================================================
--- /trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.WinFormsUI/2.3.1/WinFormsUI-2.3.1/Docking/DockWindow.SplitterControl.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.WinFormsUI/2.3.1/WinFormsUI-2.3.1/Docking/DockWindow.SplitterControl.cs	(revision 4068)
@@ -1,28 +1,18 @@
-using System;
-using System.Collections;
-using System.ComponentModel;
-using System.Drawing;
-using System.Windows.Forms;
 
-namespace WeifenLuo.WinFormsUI.Docking
-{
-    public partial class DockWindow
-    {
-        private class SplitterControl : SplitterBase
-        {
-            protected override int SplitterSize
-            {
-                get { return Measures.SplitterSize; }
-            }
+namespace WeifenLuo.WinFormsUI.Docking {
+  public partial class DockWindow {
+    private class SplitterControl : SplitterBase {
+      protected override int SplitterSize {
+        get { return Measures.SplitterSize; }
+      }
 
-            protected override void StartDrag()
-            {
-                DockWindow window = Parent as DockWindow;
-                if (window == null)
-                    return;
+      protected override void StartDrag() {
+        DockWindow window = Parent as DockWindow;
+        if (window == null)
+          return;
 
-                window.DockPanel.BeginDrag(window, window.RectangleToScreen(Bounds));
-            }
-        }
+        window.DockPanel.BeginDrag(window, window.RectangleToScreen(Bounds));
+      }
     }
+  }
 }
Index: /trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.WinFormsUI/2.3.1/WinFormsUI-2.3.1/Docking/DockWindow.cs
===================================================================
--- /trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.WinFormsUI/2.3.1/WinFormsUI-2.3.1/Docking/DockWindow.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.WinFormsUI/2.3.1/WinFormsUI-2.3.1/Docking/DockWindow.cs	(revision 4068)
@@ -1,243 +1,194 @@
-using System;
+using System.ComponentModel;
+using System.Drawing;
 using System.Windows.Forms;
-using System.Drawing;
-using System.Runtime.InteropServices;
-using System.ComponentModel;
 
-namespace WeifenLuo.WinFormsUI.Docking
-{
-	[ToolboxItem(false)]
-	public partial class DockWindow : Panel, INestedPanesContainer, ISplitterDragSource
-	{
-		private DockPanel m_dockPanel;
-		private DockState m_dockState;
-		private SplitterControl m_splitter;
-		private NestedPaneCollection m_nestedPanes;
+namespace WeifenLuo.WinFormsUI.Docking {
+  [ToolboxItem(false)]
+  public partial class DockWindow : Panel, INestedPanesContainer, ISplitterDragSource {
+    private DockPanel m_dockPanel;
+    private DockState m_dockState;
+    private SplitterControl m_splitter;
+    private NestedPaneCollection m_nestedPanes;
 
-		internal DockWindow(DockPanel dockPanel, DockState dockState)
-		{
-			m_nestedPanes = new NestedPaneCollection(this);
-			m_dockPanel = dockPanel;
-			m_dockState = dockState;
-			Visible = false;
+    internal DockWindow(DockPanel dockPanel, DockState dockState) {
+      m_nestedPanes = new NestedPaneCollection(this);
+      m_dockPanel = dockPanel;
+      m_dockState = dockState;
+      Visible = false;
 
-			SuspendLayout();
+      SuspendLayout();
 
-			if (DockState == DockState.DockLeft || DockState == DockState.DockRight ||
-				DockState == DockState.DockTop || DockState == DockState.DockBottom)
-			{
-				m_splitter = new SplitterControl();
-				Controls.Add(m_splitter);
-			}
+      if (DockState == DockState.DockLeft || DockState == DockState.DockRight ||
+        DockState == DockState.DockTop || DockState == DockState.DockBottom) {
+        m_splitter = new SplitterControl();
+        Controls.Add(m_splitter);
+      }
 
-			if (DockState == DockState.DockLeft)
-			{
-				Dock = DockStyle.Left;
-				m_splitter.Dock = DockStyle.Right;
-			}
-			else if (DockState == DockState.DockRight)
-			{
-				Dock = DockStyle.Right;
-				m_splitter.Dock = DockStyle.Left;
-			}
-			else if (DockState == DockState.DockTop)
-			{
-				Dock = DockStyle.Top;
-				m_splitter.Dock = DockStyle.Bottom;
-			}
-			else if (DockState == DockState.DockBottom)
-			{
-				Dock = DockStyle.Bottom;
-				m_splitter.Dock = DockStyle.Top;
-			}
-			else if (DockState == DockState.Document)
-			{
-				Dock = DockStyle.Fill;
-			}
+      if (DockState == DockState.DockLeft) {
+        Dock = DockStyle.Left;
+        m_splitter.Dock = DockStyle.Right;
+      } else if (DockState == DockState.DockRight) {
+        Dock = DockStyle.Right;
+        m_splitter.Dock = DockStyle.Left;
+      } else if (DockState == DockState.DockTop) {
+        Dock = DockStyle.Top;
+        m_splitter.Dock = DockStyle.Bottom;
+      } else if (DockState == DockState.DockBottom) {
+        Dock = DockStyle.Bottom;
+        m_splitter.Dock = DockStyle.Top;
+      } else if (DockState == DockState.Document) {
+        Dock = DockStyle.Fill;
+      }
 
-			ResumeLayout();
-		}
+      ResumeLayout();
+    }
 
-		public VisibleNestedPaneCollection VisibleNestedPanes
-		{
-			get	{	return NestedPanes.VisibleNestedPanes;	}
-		}
+    public VisibleNestedPaneCollection VisibleNestedPanes {
+      get { return NestedPanes.VisibleNestedPanes; }
+    }
 
-		public NestedPaneCollection NestedPanes
-		{
-			get	{	return m_nestedPanes;	}
-		}
+    public NestedPaneCollection NestedPanes {
+      get { return m_nestedPanes; }
+    }
 
-		public DockPanel DockPanel
-		{
-			get	{	return m_dockPanel;	}
-		}
+    public DockPanel DockPanel {
+      get { return m_dockPanel; }
+    }
 
-		public DockState DockState
-		{
-			get	{	return m_dockState;	}
-		}
+    public DockState DockState {
+      get { return m_dockState; }
+    }
 
-		public bool IsFloat
-		{
-			get	{	return DockState == DockState.Float;	}
-		}
+    public bool IsFloat {
+      get { return DockState == DockState.Float; }
+    }
 
-		internal DockPane DefaultPane
-		{
-			get	{	return VisibleNestedPanes.Count == 0 ? null : VisibleNestedPanes[0];	}
-		}
+    internal DockPane DefaultPane {
+      get { return VisibleNestedPanes.Count == 0 ? null : VisibleNestedPanes[0]; }
+    }
 
-		public virtual Rectangle DisplayingRectangle
-		{
-			get
-			{
-				Rectangle rect = ClientRectangle;
-				// if DockWindow is document, exclude the border
-				if (DockState == DockState.Document)
-				{
-					rect.X += 1;
-					rect.Y += 1;
-					rect.Width -= 2;
-					rect.Height -= 2;
-				}
-				// exclude the splitter
-				else if (DockState == DockState.DockLeft)
-					rect.Width -= Measures.SplitterSize;
-				else if (DockState == DockState.DockRight)
-				{
-					rect.X += Measures.SplitterSize;
-					rect.Width -= Measures.SplitterSize;
-				}
-				else if (DockState == DockState.DockTop)
-					rect.Height -= Measures.SplitterSize;
-				else if (DockState == DockState.DockBottom)
-				{
-					rect.Y += Measures.SplitterSize;
-					rect.Height -= Measures.SplitterSize;
-				}
-
-				return rect;
-			}
-		}
-
-		protected override void OnPaint(PaintEventArgs e)
-		{
-			// if DockWindow is document, draw the border
-            if (DockState == DockState.Document)
-                e.Graphics.DrawRectangle(SystemPens.ControlDark, ClientRectangle.X, ClientRectangle.Y, ClientRectangle.Width - 1, ClientRectangle.Height - 1);
-
-			base.OnPaint(e);
-		}
-
-		protected override void OnLayout(LayoutEventArgs levent)
-		{
-			VisibleNestedPanes.Refresh();
-			if (VisibleNestedPanes.Count == 0)
-			{
-                if (Visible)
-                    Visible = false;
-			}
-			else if (!Visible)
-			{
-				Visible = true;
-				VisibleNestedPanes.Refresh();
-			}
-
-			base.OnLayout (levent);
-		}
-
-        #region ISplitterDragSource Members
-
-        void ISplitterDragSource.BeginDrag(Rectangle rectSplitter)
-        {
+    public virtual Rectangle DisplayingRectangle {
+      get {
+        Rectangle rect = ClientRectangle;
+        // if DockWindow is document, exclude the border
+        if (DockState == DockState.Document) {
+          rect.X += 1;
+          rect.Y += 1;
+          rect.Width -= 2;
+          rect.Height -= 2;
+        }
+          // exclude the splitter
+        else if (DockState == DockState.DockLeft)
+          rect.Width -= Measures.SplitterSize;
+        else if (DockState == DockState.DockRight) {
+          rect.X += Measures.SplitterSize;
+          rect.Width -= Measures.SplitterSize;
+        } else if (DockState == DockState.DockTop)
+          rect.Height -= Measures.SplitterSize;
+        else if (DockState == DockState.DockBottom) {
+          rect.Y += Measures.SplitterSize;
+          rect.Height -= Measures.SplitterSize;
         }
 
-        void ISplitterDragSource.EndDrag()
-        {
+        return rect;
+      }
+    }
+
+    protected override void OnPaint(PaintEventArgs e) {
+      // if DockWindow is document, draw the border
+      if (DockState == DockState.Document)
+        e.Graphics.DrawRectangle(SystemPens.ControlDark, ClientRectangle.X, ClientRectangle.Y, ClientRectangle.Width - 1, ClientRectangle.Height - 1);
+
+      base.OnPaint(e);
+    }
+
+    protected override void OnLayout(LayoutEventArgs levent) {
+      VisibleNestedPanes.Refresh();
+      if (VisibleNestedPanes.Count == 0) {
+        if (Visible)
+          Visible = false;
+      } else if (!Visible) {
+        Visible = true;
+        VisibleNestedPanes.Refresh();
+      }
+
+      base.OnLayout(levent);
+    }
+
+    #region ISplitterDragSource Members
+
+    void ISplitterDragSource.BeginDrag(Rectangle rectSplitter) {
+    }
+
+    void ISplitterDragSource.EndDrag() {
+    }
+
+    bool ISplitterDragSource.IsVertical {
+      get { return (DockState == DockState.DockLeft || DockState == DockState.DockRight); }
+    }
+
+    Rectangle ISplitterDragSource.DragLimitBounds {
+      get {
+        Rectangle rectLimit = DockPanel.DockArea;
+        Point location;
+        if ((Control.ModifierKeys & Keys.Shift) == 0)
+          location = Location;
+        else
+          location = DockPanel.DockArea.Location;
+
+        if (((ISplitterDragSource)this).IsVertical) {
+          rectLimit.X += MeasurePane.MinSize;
+          rectLimit.Width -= 2 * MeasurePane.MinSize;
+          rectLimit.Y = location.Y;
+          if ((Control.ModifierKeys & Keys.Shift) == 0)
+            rectLimit.Height = Height;
+        } else {
+          rectLimit.Y += MeasurePane.MinSize;
+          rectLimit.Height -= 2 * MeasurePane.MinSize;
+          rectLimit.X = location.X;
+          if ((Control.ModifierKeys & Keys.Shift) == 0)
+            rectLimit.Width = Width;
         }
 
-        bool ISplitterDragSource.IsVertical
-        {
-            get { return (DockState == DockState.DockLeft || DockState == DockState.DockRight); }
-        }
+        return DockPanel.RectangleToScreen(rectLimit);
+      }
+    }
 
-        Rectangle ISplitterDragSource.DragLimitBounds
-        {
-            get
-            {
-                Rectangle rectLimit = DockPanel.DockArea;
-                Point location;
-                if ((Control.ModifierKeys & Keys.Shift) == 0)
-                    location = Location;
-                else
-                    location = DockPanel.DockArea.Location;
+    void ISplitterDragSource.MoveSplitter(int offset) {
+      if ((Control.ModifierKeys & Keys.Shift) != 0)
+        SendToBack();
 
-                if (((ISplitterDragSource)this).IsVertical)
-                {
-                    rectLimit.X += MeasurePane.MinSize;
-                    rectLimit.Width -= 2 * MeasurePane.MinSize;
-                    rectLimit.Y = location.Y;
-                    if ((Control.ModifierKeys & Keys.Shift) == 0)
-                        rectLimit.Height = Height;
-                }
-                else
-                {
-                    rectLimit.Y += MeasurePane.MinSize;
-                    rectLimit.Height -= 2 * MeasurePane.MinSize;
-                    rectLimit.X = location.X;
-                    if ((Control.ModifierKeys & Keys.Shift) == 0)
-                        rectLimit.Width = Width;
-                }
+      Rectangle rectDockArea = DockPanel.DockArea;
+      if (DockState == DockState.DockLeft && rectDockArea.Width > 0) {
+        if (DockPanel.DockLeftPortion > 1)
+          DockPanel.DockLeftPortion = Width + offset;
+        else
+          DockPanel.DockLeftPortion += ((double)offset) / (double)rectDockArea.Width;
+      } else if (DockState == DockState.DockRight && rectDockArea.Width > 0) {
+        if (DockPanel.DockRightPortion > 1)
+          DockPanel.DockRightPortion = Width - offset;
+        else
+          DockPanel.DockRightPortion -= ((double)offset) / (double)rectDockArea.Width;
+      } else if (DockState == DockState.DockBottom && rectDockArea.Height > 0) {
+        if (DockPanel.DockBottomPortion > 1)
+          DockPanel.DockBottomPortion = Height - offset;
+        else
+          DockPanel.DockBottomPortion -= ((double)offset) / (double)rectDockArea.Height;
+      } else if (DockState == DockState.DockTop && rectDockArea.Height > 0) {
+        if (DockPanel.DockTopPortion > 1)
+          DockPanel.DockTopPortion = Height + offset;
+        else
+          DockPanel.DockTopPortion += ((double)offset) / (double)rectDockArea.Height;
+      }
+    }
 
-                return DockPanel.RectangleToScreen(rectLimit);
-            }
-        }
+    #region IDragSource Members
 
-        void ISplitterDragSource.MoveSplitter(int offset)
-        {
-            if ((Control.ModifierKeys & Keys.Shift) != 0)
-                SendToBack();
+    Control IDragSource.DragControl {
+      get { return this; }
+    }
 
-            Rectangle rectDockArea = DockPanel.DockArea;
-            if (DockState == DockState.DockLeft && rectDockArea.Width > 0)
-            {
-                if (DockPanel.DockLeftPortion > 1)
-                    DockPanel.DockLeftPortion = Width + offset;
-                else
-                    DockPanel.DockLeftPortion += ((double)offset) / (double)rectDockArea.Width;
-            }
-            else if (DockState == DockState.DockRight && rectDockArea.Width > 0)
-            {
-                if (DockPanel.DockRightPortion > 1)
-                    DockPanel.DockRightPortion = Width - offset;
-                else
-                    DockPanel.DockRightPortion -= ((double)offset) / (double)rectDockArea.Width;
-            }
-            else if (DockState == DockState.DockBottom && rectDockArea.Height > 0)
-            {
-                if (DockPanel.DockBottomPortion > 1)
-                    DockPanel.DockBottomPortion = Height - offset;
-                else
-                    DockPanel.DockBottomPortion -= ((double)offset) / (double)rectDockArea.Height;
-            }
-            else if (DockState == DockState.DockTop && rectDockArea.Height > 0)
-            {
-                if (DockPanel.DockTopPortion > 1)
-                    DockPanel.DockTopPortion = Height + offset;
-                else
-                    DockPanel.DockTopPortion += ((double)offset) / (double)rectDockArea.Height;
-            }
-        }
-
-        #region IDragSource Members
-
-        Control IDragSource.DragControl
-        {
-            get { return this; }
-        }
-
-        #endregion
-        #endregion
-    }
+    #endregion
+    #endregion
+  }
 }
Index: /trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.WinFormsUI/2.3.1/WinFormsUI-2.3.1/Docking/DummyControl.cs
===================================================================
--- /trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.WinFormsUI/2.3.1/WinFormsUI-2.3.1/Docking/DummyControl.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.WinFormsUI/2.3.1/WinFormsUI-2.3.1/Docking/DummyControl.cs	(revision 4068)
@@ -1,13 +1,9 @@
-using System;
 using System.Windows.Forms;
 
-namespace WeifenLuo.WinFormsUI.Docking
-{
-	internal class DummyControl : Control
-	{
-		public DummyControl()
-		{
-			SetStyle(ControlStyles.Selectable, false);
-		}
-	}
+namespace WeifenLuo.WinFormsUI.Docking {
+  internal class DummyControl : Control {
+    public DummyControl() {
+      SetStyle(ControlStyles.Selectable, false);
+    }
+  }
 }
Index: /trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.WinFormsUI/2.3.1/WinFormsUI-2.3.1/Docking/Enums.cs
===================================================================
--- /trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.WinFormsUI/2.3.1/WinFormsUI-2.3.1/Docking/Enums.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.WinFormsUI/2.3.1/WinFormsUI-2.3.1/Docking/Enums.cs	(revision 4068)
@@ -1,60 +1,53 @@
 using System;
 using System.ComponentModel;
-using System.Windows.Forms;
 
-namespace WeifenLuo.WinFormsUI.Docking
-{
-	[Flags]
-	[Serializable]
-	[Editor(typeof(DockAreasEditor), typeof(System.Drawing.Design.UITypeEditor))]
-	public enum DockAreas
-	{
-		Float = 1,
-		DockLeft = 2,
-		DockRight = 4,
-		DockTop = 8,
-		DockBottom = 16,
-		Document = 32
-	}
+namespace WeifenLuo.WinFormsUI.Docking {
+  [Flags]
+  [Serializable]
+  [Editor(typeof(DockAreasEditor), typeof(System.Drawing.Design.UITypeEditor))]
+  public enum DockAreas {
+    Float = 1,
+    DockLeft = 2,
+    DockRight = 4,
+    DockTop = 8,
+    DockBottom = 16,
+    Document = 32
+  }
 
-	public enum DockState
-	{
-		Unknown = 0,
-		Float = 1,
-		DockTopAutoHide = 2,
-		DockLeftAutoHide = 3,
-		DockBottomAutoHide = 4,
-		DockRightAutoHide = 5,
-		Document = 6,
-		DockTop = 7,
-		DockLeft = 8,
-		DockBottom = 9,
-		DockRight = 10,
-		Hidden = 11
-	}
+  public enum DockState {
+    Unknown = 0,
+    Float = 1,
+    DockTopAutoHide = 2,
+    DockLeftAutoHide = 3,
+    DockBottomAutoHide = 4,
+    DockRightAutoHide = 5,
+    Document = 6,
+    DockTop = 7,
+    DockLeft = 8,
+    DockBottom = 9,
+    DockRight = 10,
+    Hidden = 11
+  }
 
-	public enum DockAlignment
-	{
-		Left,
-		Right,
-		Top,
-		Bottom
-	}
+  public enum DockAlignment {
+    Left,
+    Right,
+    Top,
+    Bottom
+  }
 
-	public enum DocumentStyle
-	{
-		DockingMdi,
-		DockingWindow,
-		DockingSdi,
-		SystemMdi,
-	}
+  public enum DocumentStyle {
+    DockingMdi,
+    DockingWindow,
+    DockingSdi,
+    SystemMdi,
+  }
 
-    /// <summary>
-    /// The location to draw the DockPaneStrip for Document style windows.
-    /// </summary>
-    public enum DocumentTabStripLocation
-    {
-        Top,
-        Bottom
-    }
+  /// <summary>
+  /// The location to draw the DockPaneStrip for Document style windows.
+  /// </summary>
+  public enum DocumentTabStripLocation {
+    Top,
+    Bottom
+  }
 }
Index: /trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.WinFormsUI/2.3.1/WinFormsUI-2.3.1/Docking/FloatWindow.cs
===================================================================
--- /trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.WinFormsUI/2.3.1/WinFormsUI-2.3.1/Docking/FloatWindow.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.WinFormsUI/2.3.1/WinFormsUI-2.3.1/Docking/FloatWindow.cs	(revision 4068)
@@ -1,453 +1,389 @@
 using System;
-using System.Collections;
+using System.Diagnostics.CodeAnalysis;
 using System.Drawing;
+using System.Security.Permissions;
 using System.Windows.Forms;
-using System.Runtime.InteropServices;
-using System.Security.Permissions;
-using System.Diagnostics.CodeAnalysis;
-
-namespace WeifenLuo.WinFormsUI.Docking
-{
-	public class FloatWindow : Form, INestedPanesContainer, IDockDragSource
-	{
-		private NestedPaneCollection m_nestedPanes;
-		internal const int WM_CHECKDISPOSE = (int)(Win32.Msgs.WM_USER + 1);
-
-		internal protected FloatWindow(DockPanel dockPanel, DockPane pane)
-		{
-			InternalConstruct(dockPanel, pane, false, Rectangle.Empty);
-		}
-
-		internal protected FloatWindow(DockPanel dockPanel, DockPane pane, Rectangle bounds)
-		{
-			InternalConstruct(dockPanel, pane, true, bounds);
-		}
-
-		private void InternalConstruct(DockPanel dockPanel, DockPane pane, bool boundsSpecified, Rectangle bounds)
-		{
-			if (dockPanel == null)
-				throw(new ArgumentNullException(Strings.FloatWindow_Constructor_NullDockPanel));
-
-			m_nestedPanes = new NestedPaneCollection(this);
-
-			FormBorderStyle = FormBorderStyle.SizableToolWindow;
-			ShowInTaskbar = false;
-            if (dockPanel.RightToLeft != RightToLeft)
-                RightToLeft = dockPanel.RightToLeft;
-            if (RightToLeftLayout != dockPanel.RightToLeftLayout)
-                RightToLeftLayout = dockPanel.RightToLeftLayout;
-			
-			SuspendLayout();
-            if (boundsSpecified)
-            {
-                Bounds = bounds;
-                StartPosition = FormStartPosition.Manual;
-            }
+
+namespace WeifenLuo.WinFormsUI.Docking {
+  public class FloatWindow : Form, INestedPanesContainer, IDockDragSource {
+    private NestedPaneCollection m_nestedPanes;
+    internal const int WM_CHECKDISPOSE = (int)(Win32.Msgs.WM_USER + 1);
+
+    internal protected FloatWindow(DockPanel dockPanel, DockPane pane) {
+      InternalConstruct(dockPanel, pane, false, Rectangle.Empty);
+    }
+
+    internal protected FloatWindow(DockPanel dockPanel, DockPane pane, Rectangle bounds) {
+      InternalConstruct(dockPanel, pane, true, bounds);
+    }
+
+    private void InternalConstruct(DockPanel dockPanel, DockPane pane, bool boundsSpecified, Rectangle bounds) {
+      if (dockPanel == null)
+        throw (new ArgumentNullException(Strings.FloatWindow_Constructor_NullDockPanel));
+
+      m_nestedPanes = new NestedPaneCollection(this);
+
+      FormBorderStyle = FormBorderStyle.SizableToolWindow;
+      ShowInTaskbar = false;
+      if (dockPanel.RightToLeft != RightToLeft)
+        RightToLeft = dockPanel.RightToLeft;
+      if (RightToLeftLayout != dockPanel.RightToLeftLayout)
+        RightToLeftLayout = dockPanel.RightToLeftLayout;
+
+      SuspendLayout();
+      if (boundsSpecified) {
+        Bounds = bounds;
+        StartPosition = FormStartPosition.Manual;
+      } else {
+        StartPosition = FormStartPosition.WindowsDefaultLocation;
+        Size = dockPanel.DefaultFloatWindowSize;
+      }
+
+      m_dockPanel = dockPanel;
+      Owner = DockPanel.FindForm();
+      DockPanel.AddFloatWindow(this);
+      if (pane != null)
+        pane.FloatWindow = this;
+
+      ResumeLayout();
+    }
+
+    protected override void Dispose(bool disposing) {
+      if (disposing) {
+        if (DockPanel != null)
+          DockPanel.RemoveFloatWindow(this);
+        m_dockPanel = null;
+      }
+      base.Dispose(disposing);
+    }
+
+    private bool m_allowEndUserDocking = true;
+    public bool AllowEndUserDocking {
+      get { return m_allowEndUserDocking; }
+      set { m_allowEndUserDocking = value; }
+    }
+
+    public NestedPaneCollection NestedPanes {
+      get { return m_nestedPanes; }
+    }
+
+    public VisibleNestedPaneCollection VisibleNestedPanes {
+      get { return NestedPanes.VisibleNestedPanes; }
+    }
+
+    private DockPanel m_dockPanel;
+    public DockPanel DockPanel {
+      get { return m_dockPanel; }
+    }
+
+    public DockState DockState {
+      get { return DockState.Float; }
+    }
+
+    public bool IsFloat {
+      get { return DockState == DockState.Float; }
+    }
+
+    internal bool IsDockStateValid(DockState dockState) {
+      foreach (DockPane pane in NestedPanes)
+        foreach (IDockContent content in pane.Contents)
+          if (!DockHelper.IsDockStateValid(dockState, content.DockHandler.DockAreas))
+            return false;
+
+      return true;
+    }
+
+    protected override void OnActivated(EventArgs e) {
+      DockPanel.FloatWindows.BringWindowToFront(this);
+      base.OnActivated(e);
+      // Propagate the Activated event to the visible panes content objects
+      foreach (DockPane pane in VisibleNestedPanes)
+        foreach (IDockContent content in pane.Contents)
+          content.OnActivated(e);
+    }
+
+    protected override void OnDeactivate(EventArgs e) {
+      base.OnDeactivate(e);
+      // Propagate the Deactivate event to the visible panes content objects
+      foreach (DockPane pane in VisibleNestedPanes)
+        foreach (IDockContent content in pane.Contents)
+          content.OnDeactivate(e);
+    }
+
+    protected override void OnLayout(LayoutEventArgs levent) {
+      VisibleNestedPanes.Refresh();
+      RefreshChanges();
+      Visible = (VisibleNestedPanes.Count > 0);
+      SetText();
+
+      base.OnLayout(levent);
+    }
+
+
+    [SuppressMessage("Microsoft.Globalization", "CA1303:DoNotPassLiteralsAsLocalizedParameters", MessageId = "System.Windows.Forms.Control.set_Text(System.String)")]
+    internal void SetText() {
+      DockPane theOnlyPane = (VisibleNestedPanes.Count == 1) ? VisibleNestedPanes[0] : null;
+
+      if (theOnlyPane == null)
+        Text = " ";	// use " " instead of string.Empty because the whole title bar will disappear when ControlBox is set to false.
+      else if (theOnlyPane.ActiveContent == null)
+        Text = " ";
+      else
+        Text = theOnlyPane.ActiveContent.DockHandler.TabText;
+    }
+
+    protected override void SetBoundsCore(int x, int y, int width, int height, BoundsSpecified specified) {
+      Rectangle rectWorkArea = SystemInformation.VirtualScreen;
+
+      if (y + height > rectWorkArea.Bottom)
+        y -= (y + height) - rectWorkArea.Bottom;
+
+      if (y < rectWorkArea.Top)
+        y += rectWorkArea.Top - y;
+
+      base.SetBoundsCore(x, y, width, height, specified);
+    }
+
+    [SecurityPermission(SecurityAction.LinkDemand, Flags = SecurityPermissionFlag.UnmanagedCode)]
+    protected override void WndProc(ref Message m) {
+      if (m.Msg == (int)Win32.Msgs.WM_NCLBUTTONDOWN) {
+        if (IsDisposed)
+          return;
+
+        uint result = NativeMethods.SendMessage(this.Handle, (int)Win32.Msgs.WM_NCHITTEST, 0, (uint)m.LParam);
+        if (result == 2 && DockPanel.AllowEndUserDocking && this.AllowEndUserDocking)	// HITTEST_CAPTION
+				{
+          Activate();
+          m_dockPanel.BeginDrag(this);
+        } else
+          base.WndProc(ref m);
+
+        return;
+      } else if (m.Msg == (int)Win32.Msgs.WM_NCRBUTTONDOWN) {
+        uint result = NativeMethods.SendMessage(this.Handle, (int)Win32.Msgs.WM_NCHITTEST, 0, (uint)m.LParam);
+        if (result == 2)	// HITTEST_CAPTION
+                {
+          DockPane theOnlyPane = (VisibleNestedPanes.Count == 1) ? VisibleNestedPanes[0] : null;
+          if (theOnlyPane != null && theOnlyPane.ActiveContent != null) {
+            theOnlyPane.ShowTabPageContextMenu(this, PointToClient(Control.MousePosition));
+            return;
+          }
+        }
+
+        base.WndProc(ref m);
+        return;
+      } else if (m.Msg == (int)Win32.Msgs.WM_CLOSE) {
+        if (NestedPanes.Count == 0) {
+          base.WndProc(ref m);
+          return;
+        }
+
+        for (int i = NestedPanes.Count - 1; i >= 0; i--) {
+          DockContentCollection contents = NestedPanes[i].Contents;
+          for (int j = contents.Count - 1; j >= 0; j--) {
+            IDockContent content = contents[j];
+            if (content.DockHandler.DockState != DockState.Float)
+              continue;
+
+            if (!content.DockHandler.CloseButton)
+              continue;
+
+            if (content.DockHandler.HideOnClose)
+              content.DockHandler.Hide();
             else
-            {
-                StartPosition = FormStartPosition.WindowsDefaultLocation;
-                Size = dockPanel.DefaultFloatWindowSize;
-            }
-
-			m_dockPanel = dockPanel;
-			Owner = DockPanel.FindForm();
-			DockPanel.AddFloatWindow(this);
-			if (pane != null)
-				pane.FloatWindow = this;
-
-			ResumeLayout();
-		}
-
-		protected override void Dispose(bool disposing)
-		{
-			if (disposing)
-			{
-				if (DockPanel != null)
-					DockPanel.RemoveFloatWindow(this);
-				m_dockPanel = null;
-			}
-			base.Dispose(disposing);
-		}
-
-		private bool m_allowEndUserDocking = true;
-		public bool AllowEndUserDocking
-		{
-			get	{	return m_allowEndUserDocking;	}
-			set	{	m_allowEndUserDocking = value;	}
-		}
-
-		public NestedPaneCollection NestedPanes
-		{
-			get	{	return m_nestedPanes;	}
-		}
-
-		public VisibleNestedPaneCollection VisibleNestedPanes
-		{
-			get	{	return NestedPanes.VisibleNestedPanes;	}
-		}
-
-		private DockPanel m_dockPanel;
-		public DockPanel DockPanel
-		{
-			get	{	return m_dockPanel;	}
-		}
-
-		public DockState DockState
-		{
-			get	{	return DockState.Float;	}
-		}
-	
-		public bool IsFloat
-		{
-			get	{	return DockState == DockState.Float;	}
-		}
-
-		internal bool IsDockStateValid(DockState dockState)
-		{
-			foreach (DockPane pane in NestedPanes)
-				foreach (IDockContent content in pane.Contents)
-					if (!DockHelper.IsDockStateValid(dockState, content.DockHandler.DockAreas))
-						return false;
-
-			return true;
-		}
-
-		protected override void OnActivated(EventArgs e)
-		{
-			DockPanel.FloatWindows.BringWindowToFront(this);
-			base.OnActivated (e);
-			// Propagate the Activated event to the visible panes content objects
-			foreach (DockPane pane in VisibleNestedPanes)
-				foreach (IDockContent content in pane.Contents)
-					content.OnActivated(e);
-		}
-
-		protected override void OnDeactivate(EventArgs e)
-		{
-			base.OnDeactivate(e);
-			// Propagate the Deactivate event to the visible panes content objects
-			foreach (DockPane pane in VisibleNestedPanes)
-				foreach (IDockContent content in pane.Contents)
-					content.OnDeactivate(e);
-		}
-
-		protected override void OnLayout(LayoutEventArgs levent)
-		{
-			VisibleNestedPanes.Refresh();
-			RefreshChanges();
-            Visible = (VisibleNestedPanes.Count > 0);
-            SetText();
-
-			base.OnLayout(levent);
-		}
-
-
-        [SuppressMessage("Microsoft.Globalization", "CA1303:DoNotPassLiteralsAsLocalizedParameters", MessageId = "System.Windows.Forms.Control.set_Text(System.String)")]
-        internal void SetText()
-		{
-			DockPane theOnlyPane = (VisibleNestedPanes.Count == 1) ? VisibleNestedPanes[0] : null;
-
-			if (theOnlyPane == null)
-				Text = " ";	// use " " instead of string.Empty because the whole title bar will disappear when ControlBox is set to false.
-			else if (theOnlyPane.ActiveContent == null)
-				Text = " ";
-			else
-				Text = theOnlyPane.ActiveContent.DockHandler.TabText;
-		}
-
-		protected override void SetBoundsCore(int x, int y, int width, int height, BoundsSpecified specified)
-		{
-			Rectangle rectWorkArea = SystemInformation.VirtualScreen;
-
-			if (y + height > rectWorkArea.Bottom)
-				y -= (y + height) - rectWorkArea.Bottom;
-
-			if (y < rectWorkArea.Top)
-				y += rectWorkArea.Top - y;
-
-			base.SetBoundsCore (x, y, width, height, specified);
-		}
-
-        [SecurityPermission(SecurityAction.LinkDemand, Flags = SecurityPermissionFlag.UnmanagedCode)]
-		protected override void WndProc(ref Message m)
-		{
-			if (m.Msg == (int)Win32.Msgs.WM_NCLBUTTONDOWN)
-			{
-				if (IsDisposed)
-					return;
-
-				uint result = NativeMethods.SendMessage(this.Handle, (int)Win32.Msgs.WM_NCHITTEST, 0, (uint)m.LParam);
-				if (result == 2 && DockPanel.AllowEndUserDocking && this.AllowEndUserDocking)	// HITTEST_CAPTION
-				{
-					Activate();
-					m_dockPanel.BeginDrag(this);
-				}
-				else
-					base.WndProc(ref m);
-
-				return;
-			}
-            else if (m.Msg == (int)Win32.Msgs.WM_NCRBUTTONDOWN)
-            {
-                uint result = NativeMethods.SendMessage(this.Handle, (int)Win32.Msgs.WM_NCHITTEST, 0, (uint)m.LParam);
-                if (result == 2)	// HITTEST_CAPTION
+              content.DockHandler.Close();
+          }
+        }
+
+        return;
+      } else if (m.Msg == (int)Win32.Msgs.WM_NCLBUTTONDBLCLK) {
+        uint result = NativeMethods.SendMessage(this.Handle, (int)Win32.Msgs.WM_NCHITTEST, 0, (uint)m.LParam);
+        if (result != 2)	// HITTEST_CAPTION
                 {
-                    DockPane theOnlyPane = (VisibleNestedPanes.Count == 1) ? VisibleNestedPanes[0] : null;
-                    if (theOnlyPane != null && theOnlyPane.ActiveContent != null)
-                    {
-                        theOnlyPane.ShowTabPageContextMenu(this, PointToClient(Control.MousePosition));
-                        return;
-                    }
-                }
-
-                base.WndProc(ref m);
-                return;
-            }
-            else if (m.Msg == (int)Win32.Msgs.WM_CLOSE)
-            {
-                if (NestedPanes.Count == 0)
-                {
-                    base.WndProc(ref m);
-                    return;
-                }
-
-                for (int i = NestedPanes.Count - 1; i >= 0; i--)
-                {
-                    DockContentCollection contents = NestedPanes[i].Contents;
-                    for (int j = contents.Count - 1; j >= 0; j--)
-                    {
-                        IDockContent content = contents[j];
-                        if (content.DockHandler.DockState != DockState.Float)
-                            continue;
-
-                        if (!content.DockHandler.CloseButton)
-                            continue;
-
-                        if (content.DockHandler.HideOnClose)
-                            content.DockHandler.Hide();
-                        else
-                            content.DockHandler.Close();
-                    }
-                }
-
-                return;
-            }
-            else if (m.Msg == (int)Win32.Msgs.WM_NCLBUTTONDBLCLK)
-            {
-                uint result = NativeMethods.SendMessage(this.Handle, (int)Win32.Msgs.WM_NCHITTEST, 0, (uint)m.LParam);
-                if (result != 2)	// HITTEST_CAPTION
-                {
-                    base.WndProc(ref m);
-                    return;
-                }
-
-                DockPanel.SuspendLayout(true);
-
-                // Restore to panel
-                foreach (DockPane pane in NestedPanes)
-                {
-                    if (pane.DockState != DockState.Float)
-                        continue;
-                    pane.RestoreToPanel();
-                }
-
-
-                DockPanel.ResumeLayout(true, true);
-                return;
-            }
-            else if (m.Msg == WM_CHECKDISPOSE)
-            {
-                if (NestedPanes.Count == 0)
-                    Dispose();
-
-                return;
-            }
-
-			base.WndProc(ref m);
-		}
-
-		internal void RefreshChanges()
-		{
-            if (IsDisposed)
-                return;
-
-			if (VisibleNestedPanes.Count == 0)
-			{
-				ControlBox = true;
-				return;
-			}
-
-			for (int i=VisibleNestedPanes.Count - 1; i>=0; i--)
-			{
-				DockContentCollection contents = VisibleNestedPanes[i].Contents;
-				for (int j=contents.Count - 1; j>=0; j--)
-				{
-					IDockContent content = contents[j];
-					if (content.DockHandler.DockState != DockState.Float)
-						continue;
-
-					if (content.DockHandler.CloseButton && content.DockHandler.CloseButtonVisible)
-					{
-						ControlBox = true;
-						return;
-					}
-				}
-			}
-			//Only if there is a ControlBox do we turn it off
-			//old code caused a flash of the window.
-            if (ControlBox)
-				ControlBox = false;
-		}
-
-		public virtual Rectangle DisplayingRectangle
-		{
-			get	{	return ClientRectangle;	}
-		}
-
-		internal void TestDrop(IDockDragSource dragSource, DockOutlineBase dockOutline)
-		{
-            if (VisibleNestedPanes.Count == 1)
-            {
-                DockPane pane = VisibleNestedPanes[0];
-                if (!dragSource.CanDockTo(pane))
-                    return;
-
-                Point ptMouse = Control.MousePosition;
-                uint lParam = Win32Helper.MakeLong(ptMouse.X, ptMouse.Y);
-                if (NativeMethods.SendMessage(Handle, (int)Win32.Msgs.WM_NCHITTEST, 0, lParam) == (uint)Win32.HitTest.HTCAPTION)
-                    dockOutline.Show(VisibleNestedPanes[0], -1);
-            }
-		}
-
-        #region IDockDragSource Members
-
-        #region IDragSource Members
-
-        Control IDragSource.DragControl
-        {
-            get { return this; }
-        }
-
-        #endregion
-
-        bool IDockDragSource.IsDockStateValid(DockState dockState)
-        {
-            return IsDockStateValid(dockState);
-        }
-
-        bool IDockDragSource.CanDockTo(DockPane pane)
-        {
-            if (!IsDockStateValid(pane.DockState))
-                return false;
-
-            if (pane.FloatWindow == this)
-                return false;
-
-            return true;
-        }
-
-        Rectangle IDockDragSource.BeginDrag(Point ptMouse)
-        {
-            return Bounds;
-        }
-
-        public  void FloatAt(Rectangle floatWindowBounds)
-        {
-            Bounds = floatWindowBounds;
-        }
-
-        public void DockTo(DockPane pane, DockStyle dockStyle, int contentIndex)
-        {
-            if (dockStyle == DockStyle.Fill)
-            {
-                for (int i = NestedPanes.Count - 1; i >= 0; i--)
-                {
-                    DockPane paneFrom = NestedPanes[i];
-                    for (int j = paneFrom.Contents.Count - 1; j >= 0; j--)
-                    {
-                        IDockContent c = paneFrom.Contents[j];
-                        c.DockHandler.Pane = pane;
-                        if (contentIndex != -1)
-                            pane.SetContentIndex(c, contentIndex);
-                        c.DockHandler.Activate();
-                    }
-                }
-            }
-            else
-            {
-                DockAlignment alignment = DockAlignment.Left;
-                if (dockStyle == DockStyle.Left)
-                    alignment = DockAlignment.Left;
-                else if (dockStyle == DockStyle.Right)
-                    alignment = DockAlignment.Right;
-                else if (dockStyle == DockStyle.Top)
-                    alignment = DockAlignment.Top;
-                else if (dockStyle == DockStyle.Bottom)
-                    alignment = DockAlignment.Bottom;
-
-                MergeNestedPanes(VisibleNestedPanes, pane.NestedPanesContainer.NestedPanes, pane, alignment, 0.5);
-            }
-        }
-
-        public void DockTo(DockPanel panel, DockStyle dockStyle)
-        {
-            if (panel != DockPanel)
-                throw new ArgumentException(Strings.IDockDragSource_DockTo_InvalidPanel, "panel");
-
-            NestedPaneCollection nestedPanesTo = null;
-
-            if (dockStyle == DockStyle.Top)
-                nestedPanesTo = DockPanel.DockWindows[DockState.DockTop].NestedPanes;
-            else if (dockStyle == DockStyle.Bottom)
-                nestedPanesTo = DockPanel.DockWindows[DockState.DockBottom].NestedPanes;
-            else if (dockStyle == DockStyle.Left)
-                nestedPanesTo = DockPanel.DockWindows[DockState.DockLeft].NestedPanes;
-            else if (dockStyle == DockStyle.Right)
-                nestedPanesTo = DockPanel.DockWindows[DockState.DockRight].NestedPanes;
-            else if (dockStyle == DockStyle.Fill)
-                nestedPanesTo = DockPanel.DockWindows[DockState.Document].NestedPanes;
-
-            DockPane prevPane = null;
-            for (int i = nestedPanesTo.Count - 1; i >= 0; i--)
-                if (nestedPanesTo[i] != VisibleNestedPanes[0])
-                    prevPane = nestedPanesTo[i];
-            MergeNestedPanes(VisibleNestedPanes, nestedPanesTo, prevPane, DockAlignment.Left, 0.5);
-        }
-
-        private static void MergeNestedPanes(VisibleNestedPaneCollection nestedPanesFrom, NestedPaneCollection nestedPanesTo, DockPane prevPane, DockAlignment alignment, double proportion)
-        {
-            if (nestedPanesFrom.Count == 0)
-                return;
-
-            int count = nestedPanesFrom.Count;
-            DockPane[] panes = new DockPane[count];
-            DockPane[] prevPanes = new DockPane[count];
-            DockAlignment[] alignments = new DockAlignment[count];
-            double[] proportions = new double[count];
-
-            for (int i = 0; i < count; i++)
-            {
-                panes[i] = nestedPanesFrom[i];
-                prevPanes[i] = nestedPanesFrom[i].NestedDockingStatus.PreviousPane;
-                alignments[i] = nestedPanesFrom[i].NestedDockingStatus.Alignment;
-                proportions[i] = nestedPanesFrom[i].NestedDockingStatus.Proportion;
-            }
-
-            DockPane pane = panes[0].DockTo(nestedPanesTo.Container, prevPane, alignment, proportion);
-            panes[0].DockState = nestedPanesTo.DockState;
-
-            for (int i = 1; i < count; i++)
-            {
-                for (int j = i; j < count; j++)
-                {
-                    if (prevPanes[j] == panes[i - 1])
-                        prevPanes[j] = pane;
-                }
-                pane = panes[i].DockTo(nestedPanesTo.Container, prevPanes[i], alignments[i], proportions[i]);
-                panes[i].DockState = nestedPanesTo.DockState;
-            }
-        }
-
-        #endregion
-    }
+          base.WndProc(ref m);
+          return;
+        }
+
+        DockPanel.SuspendLayout(true);
+
+        // Restore to panel
+        foreach (DockPane pane in NestedPanes) {
+          if (pane.DockState != DockState.Float)
+            continue;
+          pane.RestoreToPanel();
+        }
+
+
+        DockPanel.ResumeLayout(true, true);
+        return;
+      } else if (m.Msg == WM_CHECKDISPOSE) {
+        if (NestedPanes.Count == 0)
+          Dispose();
+
+        return;
+      }
+
+      base.WndProc(ref m);
+    }
+
+    internal void RefreshChanges() {
+      if (IsDisposed)
+        return;
+
+      if (VisibleNestedPanes.Count == 0) {
+        ControlBox = true;
+        return;
+      }
+
+      for (int i = VisibleNestedPanes.Count - 1; i >= 0; i--) {
+        DockContentCollection contents = VisibleNestedPanes[i].Contents;
+        for (int j = contents.Count - 1; j >= 0; j--) {
+          IDockContent content = contents[j];
+          if (content.DockHandler.DockState != DockState.Float)
+            continue;
+
+          if (content.DockHandler.CloseButton && content.DockHandler.CloseButtonVisible) {
+            ControlBox = true;
+            return;
+          }
+        }
+      }
+      //Only if there is a ControlBox do we turn it off
+      //old code caused a flash of the window.
+      if (ControlBox)
+        ControlBox = false;
+    }
+
+    public virtual Rectangle DisplayingRectangle {
+      get { return ClientRectangle; }
+    }
+
+    internal void TestDrop(IDockDragSource dragSource, DockOutlineBase dockOutline) {
+      if (VisibleNestedPanes.Count == 1) {
+        DockPane pane = VisibleNestedPanes[0];
+        if (!dragSource.CanDockTo(pane))
+          return;
+
+        Point ptMouse = Control.MousePosition;
+        uint lParam = Win32Helper.MakeLong(ptMouse.X, ptMouse.Y);
+        if (NativeMethods.SendMessage(Handle, (int)Win32.Msgs.WM_NCHITTEST, 0, lParam) == (uint)Win32.HitTest.HTCAPTION)
+          dockOutline.Show(VisibleNestedPanes[0], -1);
+      }
+    }
+
+    #region IDockDragSource Members
+
+    #region IDragSource Members
+
+    Control IDragSource.DragControl {
+      get { return this; }
+    }
+
+    #endregion
+
+    bool IDockDragSource.IsDockStateValid(DockState dockState) {
+      return IsDockStateValid(dockState);
+    }
+
+    bool IDockDragSource.CanDockTo(DockPane pane) {
+      if (!IsDockStateValid(pane.DockState))
+        return false;
+
+      if (pane.FloatWindow == this)
+        return false;
+
+      return true;
+    }
+
+    Rectangle IDockDragSource.BeginDrag(Point ptMouse) {
+      return Bounds;
+    }
+
+    public void FloatAt(Rectangle floatWindowBounds) {
+      Bounds = floatWindowBounds;
+    }
+
+    public void DockTo(DockPane pane, DockStyle dockStyle, int contentIndex) {
+      if (dockStyle == DockStyle.Fill) {
+        for (int i = NestedPanes.Count - 1; i >= 0; i--) {
+          DockPane paneFrom = NestedPanes[i];
+          for (int j = paneFrom.Contents.Count - 1; j >= 0; j--) {
+            IDockContent c = paneFrom.Contents[j];
+            c.DockHandler.Pane = pane;
+            if (contentIndex != -1)
+              pane.SetContentIndex(c, contentIndex);
+            c.DockHandler.Activate();
+          }
+        }
+      } else {
+        DockAlignment alignment = DockAlignment.Left;
+        if (dockStyle == DockStyle.Left)
+          alignment = DockAlignment.Left;
+        else if (dockStyle == DockStyle.Right)
+          alignment = DockAlignment.Right;
+        else if (dockStyle == DockStyle.Top)
+          alignment = DockAlignment.Top;
+        else if (dockStyle == DockStyle.Bottom)
+          alignment = DockAlignment.Bottom;
+
+        MergeNestedPanes(VisibleNestedPanes, pane.NestedPanesContainer.NestedPanes, pane, alignment, 0.5);
+      }
+    }
+
+    public void DockTo(DockPanel panel, DockStyle dockStyle) {
+      if (panel != DockPanel)
+        throw new ArgumentException(Strings.IDockDragSource_DockTo_InvalidPanel, "panel");
+
+      NestedPaneCollection nestedPanesTo = null;
+
+      if (dockStyle == DockStyle.Top)
+        nestedPanesTo = DockPanel.DockWindows[DockState.DockTop].NestedPanes;
+      else if (dockStyle == DockStyle.Bottom)
+        nestedPanesTo = DockPanel.DockWindows[DockState.DockBottom].NestedPanes;
+      else if (dockStyle == DockStyle.Left)
+        nestedPanesTo = DockPanel.DockWindows[DockState.DockLeft].NestedPanes;
+      else if (dockStyle == DockStyle.Right)
+        nestedPanesTo = DockPanel.DockWindows[DockState.DockRight].NestedPanes;
+      else if (dockStyle == DockStyle.Fill)
+        nestedPanesTo = DockPanel.DockWindows[DockState.Document].NestedPanes;
+
+      DockPane prevPane = null;
+      for (int i = nestedPanesTo.Count - 1; i >= 0; i--)
+        if (nestedPanesTo[i] != VisibleNestedPanes[0])
+          prevPane = nestedPanesTo[i];
+      MergeNestedPanes(VisibleNestedPanes, nestedPanesTo, prevPane, DockAlignment.Left, 0.5);
+    }
+
+    private static void MergeNestedPanes(VisibleNestedPaneCollection nestedPanesFrom, NestedPaneCollection nestedPanesTo, DockPane prevPane, DockAlignment alignment, double proportion) {
+      if (nestedPanesFrom.Count == 0)
+        return;
+
+      int count = nestedPanesFrom.Count;
+      DockPane[] panes = new DockPane[count];
+      DockPane[] prevPanes = new DockPane[count];
+      DockAlignment[] alignments = new DockAlignment[count];
+      double[] proportions = new double[count];
+
+      for (int i = 0; i < count; i++) {
+        panes[i] = nestedPanesFrom[i];
+        prevPanes[i] = nestedPanesFrom[i].NestedDockingStatus.PreviousPane;
+        alignments[i] = nestedPanesFrom[i].NestedDockingStatus.Alignment;
+        proportions[i] = nestedPanesFrom[i].NestedDockingStatus.Proportion;
+      }
+
+      DockPane pane = panes[0].DockTo(nestedPanesTo.Container, prevPane, alignment, proportion);
+      panes[0].DockState = nestedPanesTo.DockState;
+
+      for (int i = 1; i < count; i++) {
+        for (int j = i; j < count; j++) {
+          if (prevPanes[j] == panes[i - 1])
+            prevPanes[j] = pane;
+        }
+        pane = panes[i].DockTo(nestedPanesTo.Container, prevPanes[i], alignments[i], proportions[i]);
+        panes[i].DockState = nestedPanesTo.DockState;
+      }
+    }
+
+    #endregion
+  }
 }
Index: /trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.WinFormsUI/2.3.1/WinFormsUI-2.3.1/Docking/FloatWindowCollection.cs
===================================================================
--- /trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.WinFormsUI/2.3.1/WinFormsUI-2.3.1/Docking/FloatWindowCollection.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.WinFormsUI/2.3.1/WinFormsUI-2.3.1/Docking/FloatWindowCollection.cs	(revision 4068)
@@ -1,42 +1,32 @@
-using System;
 using System.Collections.Generic;
 using System.Collections.ObjectModel;
-using System.Drawing;
-using System.Windows.Forms;
 
-namespace WeifenLuo.WinFormsUI.Docking
-{
-	public class FloatWindowCollection : ReadOnlyCollection<FloatWindow>
-	{
-		internal FloatWindowCollection()
-            : base(new List<FloatWindow>())
-		{
-		}
+namespace WeifenLuo.WinFormsUI.Docking {
+  public class FloatWindowCollection : ReadOnlyCollection<FloatWindow> {
+    internal FloatWindowCollection()
+      : base(new List<FloatWindow>()) {
+    }
 
-		internal int Add(FloatWindow fw)
-		{
-			if (Items.Contains(fw))
-				return Items.IndexOf(fw);
+    internal int Add(FloatWindow fw) {
+      if (Items.Contains(fw))
+        return Items.IndexOf(fw);
 
-			Items.Add(fw);
-            return Count - 1;
-		}
+      Items.Add(fw);
+      return Count - 1;
+    }
 
-		internal void Dispose()
-		{
-			for (int i=Count - 1; i>=0; i--)
-				this[i].Close();
-		}
+    internal void Dispose() {
+      for (int i = Count - 1; i >= 0; i--)
+        this[i].Close();
+    }
 
-		internal void Remove(FloatWindow fw)
-		{
-			Items.Remove(fw);
-		}
+    internal void Remove(FloatWindow fw) {
+      Items.Remove(fw);
+    }
 
-		internal void BringWindowToFront(FloatWindow fw)
-		{
-			Items.Remove(fw);
-			Items.Add(fw);
-		}
-	}
+    internal void BringWindowToFront(FloatWindow fw) {
+      Items.Remove(fw);
+      Items.Add(fw);
+    }
+  }
 }
Index: /trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.WinFormsUI/2.3.1/WinFormsUI-2.3.1/Docking/Helpers/DockHelper.cs
===================================================================
--- /trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.WinFormsUI/2.3.1/WinFormsUI-2.3.1/Docking/Helpers/DockHelper.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.WinFormsUI/2.3.1/WinFormsUI-2.3.1/Docking/Helpers/DockHelper.cs	(revision 4068)
@@ -1,103 +1,92 @@
-using System;
 using System.Drawing;
 using System.Windows.Forms;
 
-namespace WeifenLuo.WinFormsUI.Docking
-{
-	internal static class DockHelper
-	{
-		public static bool IsDockStateAutoHide(DockState dockState)
-		{
-			if (dockState == DockState.DockLeftAutoHide ||
-				dockState == DockState.DockRightAutoHide ||
-				dockState == DockState.DockTopAutoHide ||
-				dockState == DockState.DockBottomAutoHide)
-				return true;
-			else
-				return false;
-		}
+namespace WeifenLuo.WinFormsUI.Docking {
+  internal static class DockHelper {
+    public static bool IsDockStateAutoHide(DockState dockState) {
+      if (dockState == DockState.DockLeftAutoHide ||
+        dockState == DockState.DockRightAutoHide ||
+        dockState == DockState.DockTopAutoHide ||
+        dockState == DockState.DockBottomAutoHide)
+        return true;
+      else
+        return false;
+    }
 
-		public static bool IsDockStateValid(DockState dockState, DockAreas dockableAreas)
-		{
-			if (((dockableAreas & DockAreas.Float) == 0) &&
-				(dockState == DockState.Float))
-				return false;
-			else if (((dockableAreas & DockAreas.Document) == 0) &&
-				(dockState == DockState.Document))
-				return false;
-			else if (((dockableAreas & DockAreas.DockLeft) == 0) &&
-				(dockState == DockState.DockLeft || dockState == DockState.DockLeftAutoHide))
-				return false;
-			else if (((dockableAreas & DockAreas.DockRight) == 0) &&
-				(dockState == DockState.DockRight || dockState == DockState.DockRightAutoHide))
-				return false;
-			else if (((dockableAreas & DockAreas.DockTop) == 0) &&
-				(dockState == DockState.DockTop || dockState == DockState.DockTopAutoHide))
-				return false;
-			else if (((dockableAreas & DockAreas.DockBottom) == 0) &&
-				(dockState == DockState.DockBottom || dockState == DockState.DockBottomAutoHide))
-				return false;
-			else
-				return true;
-		}
+    public static bool IsDockStateValid(DockState dockState, DockAreas dockableAreas) {
+      if (((dockableAreas & DockAreas.Float) == 0) &&
+        (dockState == DockState.Float))
+        return false;
+      else if (((dockableAreas & DockAreas.Document) == 0) &&
+        (dockState == DockState.Document))
+        return false;
+      else if (((dockableAreas & DockAreas.DockLeft) == 0) &&
+        (dockState == DockState.DockLeft || dockState == DockState.DockLeftAutoHide))
+        return false;
+      else if (((dockableAreas & DockAreas.DockRight) == 0) &&
+        (dockState == DockState.DockRight || dockState == DockState.DockRightAutoHide))
+        return false;
+      else if (((dockableAreas & DockAreas.DockTop) == 0) &&
+        (dockState == DockState.DockTop || dockState == DockState.DockTopAutoHide))
+        return false;
+      else if (((dockableAreas & DockAreas.DockBottom) == 0) &&
+        (dockState == DockState.DockBottom || dockState == DockState.DockBottomAutoHide))
+        return false;
+      else
+        return true;
+    }
 
-		public static bool IsDockWindowState(DockState state)
-		{
-			if (state == DockState.DockTop || state == DockState.DockBottom || state == DockState.DockLeft ||
-				state == DockState.DockRight || state == DockState.Document)
-				return true;
-			else
-				return false;
-		}
+    public static bool IsDockWindowState(DockState state) {
+      if (state == DockState.DockTop || state == DockState.DockBottom || state == DockState.DockLeft ||
+        state == DockState.DockRight || state == DockState.Document)
+        return true;
+      else
+        return false;
+    }
 
-		public static DockState ToggleAutoHideState(DockState state)
-		{
-			if (state == DockState.DockLeft)
-				return DockState.DockLeftAutoHide;
-			else if (state == DockState.DockRight)
-				return DockState.DockRightAutoHide;
-			else if (state == DockState.DockTop)
-				return DockState.DockTopAutoHide;
-			else if (state == DockState.DockBottom)
-				return DockState.DockBottomAutoHide;
-			else if (state == DockState.DockLeftAutoHide)
-				return DockState.DockLeft;
-			else if (state == DockState.DockRightAutoHide)
-				return DockState.DockRight;
-			else if (state == DockState.DockTopAutoHide)
-				return DockState.DockTop;
-			else if (state == DockState.DockBottomAutoHide)
-				return DockState.DockBottom;
-			else
-				return state;
-		}
+    public static DockState ToggleAutoHideState(DockState state) {
+      if (state == DockState.DockLeft)
+        return DockState.DockLeftAutoHide;
+      else if (state == DockState.DockRight)
+        return DockState.DockRightAutoHide;
+      else if (state == DockState.DockTop)
+        return DockState.DockTopAutoHide;
+      else if (state == DockState.DockBottom)
+        return DockState.DockBottomAutoHide;
+      else if (state == DockState.DockLeftAutoHide)
+        return DockState.DockLeft;
+      else if (state == DockState.DockRightAutoHide)
+        return DockState.DockRight;
+      else if (state == DockState.DockTopAutoHide)
+        return DockState.DockTop;
+      else if (state == DockState.DockBottomAutoHide)
+        return DockState.DockBottom;
+      else
+        return state;
+    }
 
-		public static DockPane PaneAtPoint(Point pt, DockPanel dockPanel)
-		{
-			for (Control control = Win32Helper.ControlAtPoint(pt); control != null; control = control.Parent)
-			{
-				IDockContent content = control as IDockContent;
-				if (content != null && content.DockHandler.DockPanel == dockPanel)
-					return content.DockHandler.Pane;
+    public static DockPane PaneAtPoint(Point pt, DockPanel dockPanel) {
+      for (Control control = Win32Helper.ControlAtPoint(pt); control != null; control = control.Parent) {
+        IDockContent content = control as IDockContent;
+        if (content != null && content.DockHandler.DockPanel == dockPanel)
+          return content.DockHandler.Pane;
 
-				DockPane pane = control as DockPane;
-				if (pane != null && pane.DockPanel == dockPanel)
-					return pane;
-			}
+        DockPane pane = control as DockPane;
+        if (pane != null && pane.DockPanel == dockPanel)
+          return pane;
+      }
 
-			return null;
-		}
+      return null;
+    }
 
-		public static FloatWindow FloatWindowAtPoint(Point pt, DockPanel dockPanel)
-		{
-			for (Control control = Win32Helper.ControlAtPoint(pt); control != null; control = control.Parent)
-			{
-				FloatWindow floatWindow = control as FloatWindow;
-				if (floatWindow != null && floatWindow.DockPanel == dockPanel)
-					return floatWindow;
-			}
+    public static FloatWindow FloatWindowAtPoint(Point pt, DockPanel dockPanel) {
+      for (Control control = Win32Helper.ControlAtPoint(pt); control != null; control = control.Parent) {
+        FloatWindow floatWindow = control as FloatWindow;
+        if (floatWindow != null && floatWindow.DockPanel == dockPanel)
+          return floatWindow;
+      }
 
-			return null;
-		}
-	}
+      return null;
+    }
+  }
 }
Index: /trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.WinFormsUI/2.3.1/WinFormsUI-2.3.1/Docking/Helpers/DrawHelper.cs
===================================================================
--- /trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.WinFormsUI/2.3.1/WinFormsUI-2.3.1/Docking/Helpers/DrawHelper.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.WinFormsUI/2.3.1/WinFormsUI-2.3.1/Docking/Helpers/DrawHelper.cs	(revision 4068)
@@ -1,88 +1,73 @@
-using System;
 using System.Drawing;
 using System.Drawing.Drawing2D;
-using System.Drawing.Imaging;
 using System.Windows.Forms;
 
-namespace WeifenLuo.WinFormsUI.Docking
-{
-	internal static class DrawHelper
-	{
-        public static Point RtlTransform(Control control, Point point)
-        {
-            if (control.RightToLeft != RightToLeft.Yes)
-                return point;
-            else
-                return new Point(control.Right - point.X, point.Y);
+namespace WeifenLuo.WinFormsUI.Docking {
+  internal static class DrawHelper {
+    public static Point RtlTransform(Control control, Point point) {
+      if (control.RightToLeft != RightToLeft.Yes)
+        return point;
+      else
+        return new Point(control.Right - point.X, point.Y);
+    }
+
+    public static Rectangle RtlTransform(Control control, Rectangle rectangle) {
+      if (control.RightToLeft != RightToLeft.Yes)
+        return rectangle;
+      else
+        return new Rectangle(control.ClientRectangle.Right - rectangle.Right, rectangle.Y, rectangle.Width, rectangle.Height);
+    }
+
+    public static GraphicsPath GetRoundedCornerTab(GraphicsPath graphicsPath, Rectangle rect, bool upCorner) {
+      if (graphicsPath == null)
+        graphicsPath = new GraphicsPath();
+      else
+        graphicsPath.Reset();
+
+      int curveSize = 6;
+      if (upCorner) {
+        graphicsPath.AddLine(rect.Left, rect.Bottom, rect.Left, rect.Top + curveSize / 2);
+        graphicsPath.AddArc(new Rectangle(rect.Left, rect.Top, curveSize, curveSize), 180, 90);
+        graphicsPath.AddLine(rect.Left + curveSize / 2, rect.Top, rect.Right - curveSize / 2, rect.Top);
+        graphicsPath.AddArc(new Rectangle(rect.Right - curveSize, rect.Top, curveSize, curveSize), -90, 90);
+        graphicsPath.AddLine(rect.Right, rect.Top + curveSize / 2, rect.Right, rect.Bottom);
+      } else {
+        graphicsPath.AddLine(rect.Right, rect.Top, rect.Right, rect.Bottom - curveSize / 2);
+        graphicsPath.AddArc(new Rectangle(rect.Right - curveSize, rect.Bottom - curveSize, curveSize, curveSize), 0, 90);
+        graphicsPath.AddLine(rect.Right - curveSize / 2, rect.Bottom, rect.Left + curveSize / 2, rect.Bottom);
+        graphicsPath.AddArc(new Rectangle(rect.Left, rect.Bottom - curveSize, curveSize, curveSize), 90, 90);
+        graphicsPath.AddLine(rect.Left, rect.Bottom - curveSize / 2, rect.Left, rect.Top);
+      }
+
+      return graphicsPath;
+    }
+
+    public static GraphicsPath CalculateGraphicsPathFromBitmap(Bitmap bitmap) {
+      return CalculateGraphicsPathFromBitmap(bitmap, Color.Empty);
+    }
+
+    // From http://edu.cnzz.cn/show_3281.html
+    public static GraphicsPath CalculateGraphicsPathFromBitmap(Bitmap bitmap, Color colorTransparent) {
+      GraphicsPath graphicsPath = new GraphicsPath();
+      if (colorTransparent == Color.Empty)
+        colorTransparent = bitmap.GetPixel(0, 0);
+
+      for (int row = 0; row < bitmap.Height; row++) {
+        int colOpaquePixel = 0;
+        for (int col = 0; col < bitmap.Width; col++) {
+          if (bitmap.GetPixel(col, row) != colorTransparent) {
+            colOpaquePixel = col;
+            int colNext = col;
+            for (colNext = colOpaquePixel; colNext < bitmap.Width; colNext++)
+              if (bitmap.GetPixel(colNext, row) == colorTransparent)
+                break;
+
+            graphicsPath.AddRectangle(new Rectangle(colOpaquePixel, row, colNext - colOpaquePixel, 1));
+            col = colNext;
+          }
         }
-
-        public static Rectangle RtlTransform(Control control, Rectangle rectangle)
-        {
-            if (control.RightToLeft != RightToLeft.Yes)
-                return rectangle;
-            else
-                return new Rectangle(control.ClientRectangle.Right - rectangle.Right, rectangle.Y, rectangle.Width, rectangle.Height);
-        }
-
-        public static GraphicsPath GetRoundedCornerTab(GraphicsPath graphicsPath, Rectangle rect, bool upCorner)
-        {
-            if (graphicsPath == null)
-                graphicsPath = new GraphicsPath();
-            else
-                graphicsPath.Reset();
-            
-            int curveSize = 6;
-            if (upCorner)
-            {
-                graphicsPath.AddLine(rect.Left, rect.Bottom, rect.Left, rect.Top + curveSize / 2);
-                graphicsPath.AddArc(new Rectangle(rect.Left, rect.Top, curveSize, curveSize), 180, 90);
-                graphicsPath.AddLine(rect.Left + curveSize / 2, rect.Top, rect.Right - curveSize / 2, rect.Top);
-                graphicsPath.AddArc(new Rectangle(rect.Right - curveSize, rect.Top, curveSize, curveSize), -90, 90);
-                graphicsPath.AddLine(rect.Right, rect.Top + curveSize / 2, rect.Right, rect.Bottom);
-            }
-            else
-            {
-                graphicsPath.AddLine(rect.Right, rect.Top, rect.Right, rect.Bottom - curveSize / 2);
-                graphicsPath.AddArc(new Rectangle(rect.Right - curveSize, rect.Bottom - curveSize, curveSize, curveSize), 0, 90);
-                graphicsPath.AddLine(rect.Right - curveSize / 2, rect.Bottom, rect.Left + curveSize / 2, rect.Bottom);
-                graphicsPath.AddArc(new Rectangle(rect.Left, rect.Bottom - curveSize, curveSize, curveSize), 90, 90);
-                graphicsPath.AddLine(rect.Left, rect.Bottom - curveSize / 2, rect.Left, rect.Top);
-            }
-
-            return graphicsPath;
-        }
-
-		public static GraphicsPath CalculateGraphicsPathFromBitmap(Bitmap bitmap)
-		{
-			return CalculateGraphicsPathFromBitmap(bitmap, Color.Empty);
-		}
-
-		// From http://edu.cnzz.cn/show_3281.html
-		public static GraphicsPath CalculateGraphicsPathFromBitmap(Bitmap bitmap, Color colorTransparent) 
-		{ 
-			GraphicsPath graphicsPath = new GraphicsPath(); 
-			if (colorTransparent == Color.Empty)
-				colorTransparent = bitmap.GetPixel(0, 0); 
-
-			for(int row = 0; row < bitmap.Height; row ++) 
-			{ 
-				int colOpaquePixel = 0;
-				for(int col = 0; col < bitmap.Width; col ++) 
-				{ 
-					if(bitmap.GetPixel(col, row) != colorTransparent) 
-					{ 
-						colOpaquePixel = col; 
-						int colNext = col; 
-						for(colNext = colOpaquePixel; colNext < bitmap.Width; colNext ++) 
-							if(bitmap.GetPixel(colNext, row) == colorTransparent) 
-								break;
- 
-						graphicsPath.AddRectangle(new Rectangle(colOpaquePixel, row, colNext - colOpaquePixel, 1)); 
-						col = colNext; 
-					} 
-				} 
-			} 
-			return graphicsPath; 
-		} 
-	}
+      }
+      return graphicsPath;
+    }
+  }
 }
Index: /trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.WinFormsUI/2.3.1/WinFormsUI-2.3.1/Docking/Helpers/ResourceHelper.cs
===================================================================
--- /trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.WinFormsUI/2.3.1/WinFormsUI-2.3.1/Docking/Helpers/ResourceHelper.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.WinFormsUI/2.3.1/WinFormsUI-2.3.1/Docking/Helpers/ResourceHelper.cs	(revision 4068)
@@ -1,29 +1,20 @@
-using System;
-using System.Drawing;
-using System.Reflection;
 using System.Resources;
-using System.Windows.Forms;
 
-namespace WeifenLuo.WinFormsUI.Docking
-{
-	internal static class ResourceHelper
-	{
-        private static ResourceManager _resourceManager = null;
+namespace WeifenLuo.WinFormsUI.Docking {
+  internal static class ResourceHelper {
+    private static ResourceManager _resourceManager = null;
 
-        private static ResourceManager ResourceManager
-        {
-            get
-            {
-                if (_resourceManager == null)
-                    _resourceManager = new ResourceManager("WeifenLuo.WinFormsUI.Docking.Strings", typeof(ResourceHelper).Assembly);
-                return _resourceManager;
-            }
+    private static ResourceManager ResourceManager {
+      get {
+        if (_resourceManager == null)
+          _resourceManager = new ResourceManager("WeifenLuo.WinFormsUI.Docking.Strings", typeof(ResourceHelper).Assembly);
+        return _resourceManager;
+      }
 
-        }
+    }
 
-		public static string GetString(string name)
-		{
-			return ResourceManager.GetString(name);
-		}
-	}
+    public static string GetString(string name) {
+      return ResourceManager.GetString(name);
+    }
+  }
 }
Index: /trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.WinFormsUI/2.3.1/WinFormsUI-2.3.1/Docking/Helpers/Win32Helper.cs
===================================================================
--- /trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.WinFormsUI/2.3.1/WinFormsUI-2.3.1/Docking/Helpers/Win32Helper.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.WinFormsUI/2.3.1/WinFormsUI-2.3.1/Docking/Helpers/Win32Helper.cs	(revision 4068)
@@ -1,19 +1,14 @@
-using System;
 using System.Drawing;
 using System.Windows.Forms;
 
-namespace WeifenLuo.WinFormsUI.Docking
-{
-	internal static class Win32Helper
-	{
-		public static Control ControlAtPoint(Point pt)
-		{
-			return Control.FromChildHandle(NativeMethods.WindowFromPoint(pt));
-		}
+namespace WeifenLuo.WinFormsUI.Docking {
+  internal static class Win32Helper {
+    public static Control ControlAtPoint(Point pt) {
+      return Control.FromChildHandle(NativeMethods.WindowFromPoint(pt));
+    }
 
-		public static uint MakeLong(int low, int high)
-		{
-			return (uint)((high << 16) + low);
-		}
-	}
+    public static uint MakeLong(int low, int high) {
+      return (uint)((high << 16) + low);
+    }
+  }
 }
Index: /trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.WinFormsUI/2.3.1/WinFormsUI-2.3.1/Docking/InertButtonBase.cs
===================================================================
--- /trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.WinFormsUI/2.3.1/WinFormsUI-2.3.1/Docking/InertButtonBase.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.WinFormsUI/2.3.1/WinFormsUI-2.3.1/Docking/InertButtonBase.cs	(revision 4068)
@@ -1,115 +1,97 @@
 using System;
-using System.Collections.Generic;
-using System.Text;
-using System.Windows.Forms;
 using System.Drawing;
 using System.Drawing.Imaging;
+using System.Windows.Forms;
 
-namespace WeifenLuo.WinFormsUI.Docking
-{
-    internal abstract class InertButtonBase : Control
-    {
-        protected InertButtonBase()
-        {
-            SetStyle(ControlStyles.SupportsTransparentBackColor, true);
-            BackColor = Color.Transparent;
+namespace WeifenLuo.WinFormsUI.Docking {
+  internal abstract class InertButtonBase : Control {
+    protected InertButtonBase() {
+      SetStyle(ControlStyles.SupportsTransparentBackColor, true);
+      BackColor = Color.Transparent;
+    }
+
+    public abstract Bitmap Image {
+      get;
+    }
+
+    private bool m_isMouseOver = false;
+    protected bool IsMouseOver {
+      get { return m_isMouseOver; }
+      private set {
+        if (m_isMouseOver == value)
+          return;
+
+        m_isMouseOver = value;
+        Invalidate();
+      }
+    }
+
+    protected override Size DefaultSize {
+      get { return Resources.DockPane_Close.Size; }
+    }
+
+    protected override void OnMouseMove(MouseEventArgs e) {
+      base.OnMouseMove(e);
+      bool over = ClientRectangle.Contains(e.X, e.Y);
+      if (IsMouseOver != over)
+        IsMouseOver = over;
+    }
+
+    protected override void OnMouseEnter(EventArgs e) {
+      base.OnMouseEnter(e);
+      if (!IsMouseOver)
+        IsMouseOver = true;
+    }
+
+    protected override void OnMouseLeave(EventArgs e) {
+      base.OnMouseLeave(e);
+      if (IsMouseOver)
+        IsMouseOver = false;
+    }
+
+    protected override void OnPaint(PaintEventArgs e) {
+      if (IsMouseOver && Enabled) {
+        using (Pen pen = new Pen(ForeColor)) {
+          e.Graphics.DrawRectangle(pen, Rectangle.Inflate(ClientRectangle, -1, -1));
         }
+      }
 
-        public abstract Bitmap Image
-        {
-            get;
-        }
+      using (ImageAttributes imageAttributes = new ImageAttributes()) {
+        ColorMap[] colorMap = new ColorMap[2];
+        colorMap[0] = new ColorMap();
+        colorMap[0].OldColor = Color.FromArgb(0, 0, 0);
+        colorMap[0].NewColor = ForeColor;
+        colorMap[1] = new ColorMap();
+        colorMap[1].OldColor = Image.GetPixel(0, 0);
+        colorMap[1].NewColor = Color.Transparent;
 
-        private bool m_isMouseOver = false;
-        protected bool IsMouseOver
-        {
-            get { return m_isMouseOver; }
-            private set
-            {
-                if (m_isMouseOver == value)
-                    return;
+        imageAttributes.SetRemapTable(colorMap);
 
-                m_isMouseOver = value;
-                Invalidate();
-            }
-        }
+        e.Graphics.DrawImage(
+           Image,
+           new Rectangle(0, 0, Image.Width, Image.Height),
+           0, 0,
+           Image.Width,
+           Image.Height,
+           GraphicsUnit.Pixel,
+           imageAttributes);
+      }
 
-        protected override Size DefaultSize
-        {
-            get { return Resources.DockPane_Close.Size; }
-        }
+      base.OnPaint(e);
+    }
 
-        protected override void OnMouseMove(MouseEventArgs e)
-        {
-            base.OnMouseMove(e);
-            bool over = ClientRectangle.Contains(e.X, e.Y);
-            if (IsMouseOver != over)
-                IsMouseOver = over;
-        }
+    public void RefreshChanges() {
+      if (IsDisposed)
+        return;
 
-        protected override void OnMouseEnter(EventArgs e)
-        {
-            base.OnMouseEnter(e);
-            if (!IsMouseOver)
-                IsMouseOver = true;
-        }
+      bool mouseOver = ClientRectangle.Contains(PointToClient(Control.MousePosition));
+      if (mouseOver != IsMouseOver)
+        IsMouseOver = mouseOver;
 
-        protected override void OnMouseLeave(EventArgs e)
-        {
-            base.OnMouseLeave(e);
-            if (IsMouseOver)
-                IsMouseOver = false;
-        }
+      OnRefreshChanges();
+    }
 
-        protected override void OnPaint(PaintEventArgs e)
-        {
-            if (IsMouseOver && Enabled)
-            {
-                using (Pen pen = new Pen(ForeColor))
-                {
-                    e.Graphics.DrawRectangle(pen, Rectangle.Inflate(ClientRectangle, -1, -1));
-                }
-            }
-
-            using (ImageAttributes imageAttributes = new ImageAttributes())
-            {
-                ColorMap[] colorMap = new ColorMap[2];
-                colorMap[0] = new ColorMap();
-                colorMap[0].OldColor = Color.FromArgb(0, 0, 0);
-                colorMap[0].NewColor = ForeColor;
-                colorMap[1] = new ColorMap();
-                colorMap[1].OldColor = Image.GetPixel(0, 0);
-                colorMap[1].NewColor = Color.Transparent;
-
-                imageAttributes.SetRemapTable(colorMap);
-
-                e.Graphics.DrawImage(
-                   Image,
-                   new Rectangle(0, 0, Image.Width, Image.Height),
-                   0, 0,
-                   Image.Width,
-                   Image.Height,
-                   GraphicsUnit.Pixel,
-                   imageAttributes);
-            }
-
-            base.OnPaint(e);
-        }
-
-        public void RefreshChanges()
-        {
-            if (IsDisposed)
-                return;
-
-            bool mouseOver = ClientRectangle.Contains(PointToClient(Control.MousePosition));
-            if (mouseOver != IsMouseOver)
-                IsMouseOver = mouseOver;
-
-            OnRefreshChanges();
-        }
-
-        protected virtual void OnRefreshChanges()
-        {
-        }
+    protected virtual void OnRefreshChanges() {
     }
+  }
 }
Index: /trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.WinFormsUI/2.3.1/WinFormsUI-2.3.1/Docking/Measures.cs
===================================================================
--- /trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.WinFormsUI/2.3.1/WinFormsUI-2.3.1/Docking/Measures.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.WinFormsUI/2.3.1/WinFormsUI-2.3.1/Docking/Measures.cs	(revision 4068)
@@ -1,14 +1,10 @@
-using System;
 
-namespace WeifenLuo.WinFormsUI.Docking
-{
-	internal static class Measures
-	{
-		public const int SplitterSize = 4;
-	}
+namespace WeifenLuo.WinFormsUI.Docking {
+  internal static class Measures {
+    public const int SplitterSize = 4;
+  }
 
-	internal static class MeasurePane
-	{
-		public const int MinSize = 24;
-	}
+  internal static class MeasurePane {
+    public const int MinSize = 24;
+  }
 }
Index: /trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.WinFormsUI/2.3.1/WinFormsUI-2.3.1/Docking/NestedDockingStatus.cs
===================================================================
--- /trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.WinFormsUI/2.3.1/WinFormsUI-2.3.1/Docking/NestedDockingStatus.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.WinFormsUI/2.3.1/WinFormsUI-2.3.1/Docking/NestedDockingStatus.cs	(revision 4068)
@@ -1,108 +1,89 @@
-using System;
 using System.Drawing;
 
-namespace WeifenLuo.WinFormsUI.Docking
-{
-	public sealed class NestedDockingStatus
-	{
-		internal NestedDockingStatus(DockPane pane)
-		{
-			m_dockPane = pane;
-		}
+namespace WeifenLuo.WinFormsUI.Docking {
+  public sealed class NestedDockingStatus {
+    internal NestedDockingStatus(DockPane pane) {
+      m_dockPane = pane;
+    }
 
-		private DockPane m_dockPane = null;
-		public DockPane DockPane
-		{
-			get	{	return m_dockPane;	}
-		}
-		
-		private NestedPaneCollection m_nestedPanes = null;
-		public NestedPaneCollection NestedPanes
-		{
-			get	{	return m_nestedPanes;	}
-		}
-		
-		private DockPane m_previousPane = null;
-		public DockPane PreviousPane
-		{
-			get	{	return m_previousPane;	}
-		}
+    private DockPane m_dockPane = null;
+    public DockPane DockPane {
+      get { return m_dockPane; }
+    }
 
-		private DockAlignment m_alignment = DockAlignment.Left;
-		public DockAlignment Alignment
-		{
-			get	{	return m_alignment;	}
-		}
+    private NestedPaneCollection m_nestedPanes = null;
+    public NestedPaneCollection NestedPanes {
+      get { return m_nestedPanes; }
+    }
 
-		private double m_proportion = 0.5;
-		public double Proportion
-		{
-			get	{	return m_proportion;	}
-		}
+    private DockPane m_previousPane = null;
+    public DockPane PreviousPane {
+      get { return m_previousPane; }
+    }
 
-		private bool m_isDisplaying = false;
-		public bool IsDisplaying
-		{
-			get	{	return m_isDisplaying;	}
-		}
+    private DockAlignment m_alignment = DockAlignment.Left;
+    public DockAlignment Alignment {
+      get { return m_alignment; }
+    }
 
-		private DockPane m_displayingPreviousPane = null;
-		public DockPane DisplayingPreviousPane
-		{
-			get	{	return m_displayingPreviousPane;	}
-		}
+    private double m_proportion = 0.5;
+    public double Proportion {
+      get { return m_proportion; }
+    }
 
-		private DockAlignment m_displayingAlignment = DockAlignment.Left;
-		public DockAlignment DisplayingAlignment
-		{
-			get	{	return m_displayingAlignment;	}
-		}
+    private bool m_isDisplaying = false;
+    public bool IsDisplaying {
+      get { return m_isDisplaying; }
+    }
 
-		private double m_displayingProportion = 0.5;
-		public double DisplayingProportion
-		{
-			get	{	return m_displayingProportion;	}
-		}
+    private DockPane m_displayingPreviousPane = null;
+    public DockPane DisplayingPreviousPane {
+      get { return m_displayingPreviousPane; }
+    }
 
-		private Rectangle m_logicalBounds = Rectangle.Empty; 
-		public Rectangle LogicalBounds
-		{
-			get	{	return m_logicalBounds;	}
-		}
+    private DockAlignment m_displayingAlignment = DockAlignment.Left;
+    public DockAlignment DisplayingAlignment {
+      get { return m_displayingAlignment; }
+    }
 
-		private Rectangle m_paneBounds = Rectangle.Empty;
-		public Rectangle PaneBounds
-		{
-			get	{	return m_paneBounds;	}
-		}
+    private double m_displayingProportion = 0.5;
+    public double DisplayingProportion {
+      get { return m_displayingProportion; }
+    }
 
-		private Rectangle m_splitterBounds = Rectangle.Empty;
-		public Rectangle SplitterBounds
-		{
-			get	{	return m_splitterBounds;	}
-		}
+    private Rectangle m_logicalBounds = Rectangle.Empty;
+    public Rectangle LogicalBounds {
+      get { return m_logicalBounds; }
+    }
 
-		internal void SetStatus(NestedPaneCollection nestedPanes, DockPane previousPane, DockAlignment alignment, double proportion)
-		{
-			m_nestedPanes = nestedPanes;
-			m_previousPane = previousPane;
-			m_alignment = alignment;
-			m_proportion = proportion;
-		}
+    private Rectangle m_paneBounds = Rectangle.Empty;
+    public Rectangle PaneBounds {
+      get { return m_paneBounds; }
+    }
 
-		internal void SetDisplayingStatus(bool isDisplaying, DockPane displayingPreviousPane, DockAlignment displayingAlignment, double displayingProportion)
-		{
-			m_isDisplaying = isDisplaying;
-			m_displayingPreviousPane = displayingPreviousPane;
-			m_displayingAlignment = displayingAlignment;
-			m_displayingProportion = displayingProportion;
-		}
+    private Rectangle m_splitterBounds = Rectangle.Empty;
+    public Rectangle SplitterBounds {
+      get { return m_splitterBounds; }
+    }
 
-		internal void SetDisplayingBounds(Rectangle logicalBounds, Rectangle paneBounds, Rectangle splitterBounds)
-		{
-			m_logicalBounds = logicalBounds;
-			m_paneBounds = paneBounds;
-			m_splitterBounds = splitterBounds;
-		}
-	}
+    internal void SetStatus(NestedPaneCollection nestedPanes, DockPane previousPane, DockAlignment alignment, double proportion) {
+      m_nestedPanes = nestedPanes;
+      m_previousPane = previousPane;
+      m_alignment = alignment;
+      m_proportion = proportion;
+    }
+
+    internal void SetDisplayingStatus(bool isDisplaying, DockPane displayingPreviousPane, DockAlignment displayingAlignment, double displayingProportion) {
+      m_isDisplaying = isDisplaying;
+      m_displayingPreviousPane = displayingPreviousPane;
+      m_displayingAlignment = displayingAlignment;
+      m_displayingProportion = displayingProportion;
+    }
+
+    internal void SetDisplayingBounds(Rectangle logicalBounds, Rectangle paneBounds, Rectangle splitterBounds) {
+      m_logicalBounds = logicalBounds;
+      m_paneBounds = paneBounds;
+      m_splitterBounds = splitterBounds;
+    }
+  }
 }
Index: /trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.WinFormsUI/2.3.1/WinFormsUI-2.3.1/Docking/NestedPaneCollection.cs
===================================================================
--- /trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.WinFormsUI/2.3.1/WinFormsUI-2.3.1/Docking/NestedPaneCollection.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.WinFormsUI/2.3.1/WinFormsUI-2.3.1/Docking/NestedPaneCollection.cs	(revision 4068)
@@ -1,116 +1,97 @@
-using System;
 using System.Collections.Generic;
 using System.Collections.ObjectModel;
 using System.Drawing;
 
-namespace WeifenLuo.WinFormsUI.Docking
-{
-	public sealed class NestedPaneCollection : ReadOnlyCollection<DockPane>
-	{
-		private INestedPanesContainer m_container;
-		private VisibleNestedPaneCollection m_visibleNestedPanes;
+namespace WeifenLuo.WinFormsUI.Docking {
+  public sealed class NestedPaneCollection : ReadOnlyCollection<DockPane> {
+    private INestedPanesContainer m_container;
+    private VisibleNestedPaneCollection m_visibleNestedPanes;
 
-		internal NestedPaneCollection(INestedPanesContainer container)
-            : base(new List<DockPane>())
-		{
-			m_container = container;
-			m_visibleNestedPanes = new VisibleNestedPaneCollection(this);
-		}
+    internal NestedPaneCollection(INestedPanesContainer container)
+      : base(new List<DockPane>()) {
+      m_container = container;
+      m_visibleNestedPanes = new VisibleNestedPaneCollection(this);
+    }
 
-		public INestedPanesContainer Container
-		{
-			get	{	return m_container;	}
-		}
-		
-		public VisibleNestedPaneCollection VisibleNestedPanes
-		{
-			get	{	return m_visibleNestedPanes;	}
-		}
+    public INestedPanesContainer Container {
+      get { return m_container; }
+    }
 
-		public DockState DockState
-		{
-			get	{	return Container.DockState;	}
-		}
+    public VisibleNestedPaneCollection VisibleNestedPanes {
+      get { return m_visibleNestedPanes; }
+    }
 
-		public bool IsFloat
-		{
-			get	{	return DockState == DockState.Float;	}
-		}
+    public DockState DockState {
+      get { return Container.DockState; }
+    }
 
-		internal void Add(DockPane pane)
-		{
-			if (pane == null)
-				return;
+    public bool IsFloat {
+      get { return DockState == DockState.Float; }
+    }
 
-			NestedPaneCollection oldNestedPanes = (pane.NestedPanesContainer == null) ? null : pane.NestedPanesContainer.NestedPanes;
-			if (oldNestedPanes != null)
-				oldNestedPanes.InternalRemove(pane);
-			Items.Add(pane);
-			if (oldNestedPanes != null)
-				oldNestedPanes.CheckFloatWindowDispose();
-		}
+    internal void Add(DockPane pane) {
+      if (pane == null)
+        return;
 
-		private void CheckFloatWindowDispose()
-		{
-			if (Count == 0 && Container.DockState == DockState.Float)
-			{
-				FloatWindow floatWindow = (FloatWindow)Container;
-				if (!floatWindow.Disposing && !floatWindow.IsDisposed)
-					NativeMethods.PostMessage(((FloatWindow)Container).Handle, FloatWindow.WM_CHECKDISPOSE, 0, 0);
-			}
-		}
+      NestedPaneCollection oldNestedPanes = (pane.NestedPanesContainer == null) ? null : pane.NestedPanesContainer.NestedPanes;
+      if (oldNestedPanes != null)
+        oldNestedPanes.InternalRemove(pane);
+      Items.Add(pane);
+      if (oldNestedPanes != null)
+        oldNestedPanes.CheckFloatWindowDispose();
+    }
 
-		internal void Remove(DockPane pane)
-		{
-			InternalRemove(pane);
-			CheckFloatWindowDispose();
-		}
+    private void CheckFloatWindowDispose() {
+      if (Count == 0 && Container.DockState == DockState.Float) {
+        FloatWindow floatWindow = (FloatWindow)Container;
+        if (!floatWindow.Disposing && !floatWindow.IsDisposed)
+          NativeMethods.PostMessage(((FloatWindow)Container).Handle, FloatWindow.WM_CHECKDISPOSE, 0, 0);
+      }
+    }
 
-		private void InternalRemove(DockPane pane)
-		{
-			if (!Contains(pane))
-				return;
+    internal void Remove(DockPane pane) {
+      InternalRemove(pane);
+      CheckFloatWindowDispose();
+    }
 
-			NestedDockingStatus statusPane = pane.NestedDockingStatus;
-			DockPane lastNestedPane = null;
-			for (int i=Count - 1; i> IndexOf(pane); i--)
-			{
-				if (this[i].NestedDockingStatus.PreviousPane == pane)
-				{
-					lastNestedPane = this[i];
-					break;
-				}
-			}
+    private void InternalRemove(DockPane pane) {
+      if (!Contains(pane))
+        return;
 
-			if (lastNestedPane != null)
-			{
-				int indexLastNestedPane = IndexOf(lastNestedPane);
-				Items.Remove(lastNestedPane);
-				Items[IndexOf(pane)] = lastNestedPane;
-				NestedDockingStatus lastNestedDock = lastNestedPane.NestedDockingStatus;
-				lastNestedDock.SetStatus(this, statusPane.PreviousPane, statusPane.Alignment, statusPane.Proportion);
-				for (int i=indexLastNestedPane - 1; i>IndexOf(lastNestedPane); i--)
-				{
-					NestedDockingStatus status = this[i].NestedDockingStatus;
-					if (status.PreviousPane == pane)
-						status.SetStatus(this, lastNestedPane, status.Alignment, status.Proportion);
-				}
-			}
-			else
-				Items.Remove(pane);
+      NestedDockingStatus statusPane = pane.NestedDockingStatus;
+      DockPane lastNestedPane = null;
+      for (int i = Count - 1; i > IndexOf(pane); i--) {
+        if (this[i].NestedDockingStatus.PreviousPane == pane) {
+          lastNestedPane = this[i];
+          break;
+        }
+      }
 
-			statusPane.SetStatus(null, null, DockAlignment.Left, 0.5);
-			statusPane.SetDisplayingStatus(false, null, DockAlignment.Left, 0.5);
-			statusPane.SetDisplayingBounds(Rectangle.Empty, Rectangle.Empty, Rectangle.Empty);
-		}
+      if (lastNestedPane != null) {
+        int indexLastNestedPane = IndexOf(lastNestedPane);
+        Items.Remove(lastNestedPane);
+        Items[IndexOf(pane)] = lastNestedPane;
+        NestedDockingStatus lastNestedDock = lastNestedPane.NestedDockingStatus;
+        lastNestedDock.SetStatus(this, statusPane.PreviousPane, statusPane.Alignment, statusPane.Proportion);
+        for (int i = indexLastNestedPane - 1; i > IndexOf(lastNestedPane); i--) {
+          NestedDockingStatus status = this[i].NestedDockingStatus;
+          if (status.PreviousPane == pane)
+            status.SetStatus(this, lastNestedPane, status.Alignment, status.Proportion);
+        }
+      } else
+        Items.Remove(pane);
 
-		public DockPane GetDefaultPreviousPane(DockPane pane)
-		{
-			for (int i=Count-1; i>=0; i--)
-				if (this[i] != pane)
-					return this[i];
+      statusPane.SetStatus(null, null, DockAlignment.Left, 0.5);
+      statusPane.SetDisplayingStatus(false, null, DockAlignment.Left, 0.5);
+      statusPane.SetDisplayingBounds(Rectangle.Empty, Rectangle.Empty, Rectangle.Empty);
+    }
 
-			return null;
-		}
-	}
+    public DockPane GetDefaultPreviousPane(DockPane pane) {
+      for (int i = Count - 1; i >= 0; i--)
+        if (this[i] != pane)
+          return this[i];
+
+      return null;
+    }
+  }
 }
Index: /trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.WinFormsUI/2.3.1/WinFormsUI-2.3.1/Docking/Resources.Designer.cs
===================================================================
--- /trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.WinFormsUI/2.3.1/WinFormsUI-2.3.1/Docking/Resources.Designer.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.WinFormsUI/2.3.1/WinFormsUI-2.3.1/Docking/Resources.Designer.cs	(revision 4068)
@@ -10,215 +10,214 @@
 
 namespace WeifenLuo.WinFormsUI.Docking {
-    using System;
-    
-    
+
+
+  /// <summary>
+  ///   A strongly-typed resource class, for looking up localized strings, etc.
+  /// </summary>
+  // This class was auto-generated by the StronglyTypedResourceBuilder
+  // class via a tool like ResGen or Visual Studio.
+  // To add or remove a member, edit your .ResX file then rerun ResGen
+  // with the /str option, or rebuild your VS project.
+  [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "4.0.0.0")]
+  [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
+  [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
+  internal class Resources {
+
+    private static global::System.Resources.ResourceManager resourceMan;
+
+    private static global::System.Globalization.CultureInfo resourceCulture;
+
+    [global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")]
+    internal Resources() {
+    }
+
     /// <summary>
-    ///   A strongly-typed resource class, for looking up localized strings, etc.
+    ///   Returns the cached ResourceManager instance used by this class.
     /// </summary>
-    // This class was auto-generated by the StronglyTypedResourceBuilder
-    // class via a tool like ResGen or Visual Studio.
-    // To add or remove a member, edit your .ResX file then rerun ResGen
-    // with the /str option, or rebuild your VS project.
-    [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "4.0.0.0")]
-    [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
-    [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
-    internal class Resources {
-        
-        private static global::System.Resources.ResourceManager resourceMan;
-        
-        private static global::System.Globalization.CultureInfo resourceCulture;
-        
-        [global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")]
-        internal Resources() {
+    [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
+    internal static global::System.Resources.ResourceManager ResourceManager {
+      get {
+        if (object.ReferenceEquals(resourceMan, null)) {
+          global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("WeifenLuo.WinFormsUI.Docking.Resources", typeof(Resources).Assembly);
+          resourceMan = temp;
         }
-        
-        /// <summary>
-        ///   Returns the cached ResourceManager instance used by this class.
-        /// </summary>
-        [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
-        internal static global::System.Resources.ResourceManager ResourceManager {
-            get {
-                if (object.ReferenceEquals(resourceMan, null)) {
-                    global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("WeifenLuo.WinFormsUI.Docking.Resources", typeof(Resources).Assembly);
-                    resourceMan = temp;
-                }
-                return resourceMan;
-            }
-        }
-        
-        /// <summary>
-        ///   Overrides the current thread's CurrentUICulture property for all
-        ///   resource lookups using this strongly typed resource class.
-        /// </summary>
-        [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
-        internal static global::System.Globalization.CultureInfo Culture {
-            get {
-                return resourceCulture;
-            }
-            set {
-                resourceCulture = value;
-            }
-        }
-        
-        internal static System.Drawing.Bitmap DockIndicator_PaneDiamond {
-            get {
-                object obj = ResourceManager.GetObject("DockIndicator_PaneDiamond", resourceCulture);
-                return ((System.Drawing.Bitmap)(obj));
-            }
-        }
-        
-        internal static System.Drawing.Bitmap DockIndicator_PaneDiamond_Bottom {
-            get {
-                object obj = ResourceManager.GetObject("DockIndicator_PaneDiamond_Bottom", resourceCulture);
-                return ((System.Drawing.Bitmap)(obj));
-            }
-        }
-        
-        internal static System.Drawing.Bitmap DockIndicator_PaneDiamond_Fill {
-            get {
-                object obj = ResourceManager.GetObject("DockIndicator_PaneDiamond_Fill", resourceCulture);
-                return ((System.Drawing.Bitmap)(obj));
-            }
-        }
-        
-        internal static System.Drawing.Bitmap DockIndicator_PaneDiamond_HotSpot {
-            get {
-                object obj = ResourceManager.GetObject("DockIndicator_PaneDiamond_HotSpot", resourceCulture);
-                return ((System.Drawing.Bitmap)(obj));
-            }
-        }
-        
-        internal static System.Drawing.Bitmap DockIndicator_PaneDiamond_HotSpotIndex {
-            get {
-                object obj = ResourceManager.GetObject("DockIndicator_PaneDiamond_HotSpotIndex", resourceCulture);
-                return ((System.Drawing.Bitmap)(obj));
-            }
-        }
-        
-        internal static System.Drawing.Bitmap DockIndicator_PaneDiamond_Left {
-            get {
-                object obj = ResourceManager.GetObject("DockIndicator_PaneDiamond_Left", resourceCulture);
-                return ((System.Drawing.Bitmap)(obj));
-            }
-        }
-        
-        internal static System.Drawing.Bitmap DockIndicator_PaneDiamond_Right {
-            get {
-                object obj = ResourceManager.GetObject("DockIndicator_PaneDiamond_Right", resourceCulture);
-                return ((System.Drawing.Bitmap)(obj));
-            }
-        }
-        
-        internal static System.Drawing.Bitmap DockIndicator_PaneDiamond_Top {
-            get {
-                object obj = ResourceManager.GetObject("DockIndicator_PaneDiamond_Top", resourceCulture);
-                return ((System.Drawing.Bitmap)(obj));
-            }
-        }
-        
-        internal static System.Drawing.Bitmap DockIndicator_PanelBottom {
-            get {
-                object obj = ResourceManager.GetObject("DockIndicator_PanelBottom", resourceCulture);
-                return ((System.Drawing.Bitmap)(obj));
-            }
-        }
-        
-        internal static System.Drawing.Bitmap DockIndicator_PanelBottom_Active {
-            get {
-                object obj = ResourceManager.GetObject("DockIndicator_PanelBottom_Active", resourceCulture);
-                return ((System.Drawing.Bitmap)(obj));
-            }
-        }
-        
-        internal static System.Drawing.Bitmap DockIndicator_PanelFill {
-            get {
-                object obj = ResourceManager.GetObject("DockIndicator_PanelFill", resourceCulture);
-                return ((System.Drawing.Bitmap)(obj));
-            }
-        }
-        
-        internal static System.Drawing.Bitmap DockIndicator_PanelFill_Active {
-            get {
-                object obj = ResourceManager.GetObject("DockIndicator_PanelFill_Active", resourceCulture);
-                return ((System.Drawing.Bitmap)(obj));
-            }
-        }
-        
-        internal static System.Drawing.Bitmap DockIndicator_PanelLeft {
-            get {
-                object obj = ResourceManager.GetObject("DockIndicator_PanelLeft", resourceCulture);
-                return ((System.Drawing.Bitmap)(obj));
-            }
-        }
-        
-        internal static System.Drawing.Bitmap DockIndicator_PanelLeft_Active {
-            get {
-                object obj = ResourceManager.GetObject("DockIndicator_PanelLeft_Active", resourceCulture);
-                return ((System.Drawing.Bitmap)(obj));
-            }
-        }
-        
-        internal static System.Drawing.Bitmap DockIndicator_PanelRight {
-            get {
-                object obj = ResourceManager.GetObject("DockIndicator_PanelRight", resourceCulture);
-                return ((System.Drawing.Bitmap)(obj));
-            }
-        }
-        
-        internal static System.Drawing.Bitmap DockIndicator_PanelRight_Active {
-            get {
-                object obj = ResourceManager.GetObject("DockIndicator_PanelRight_Active", resourceCulture);
-                return ((System.Drawing.Bitmap)(obj));
-            }
-        }
-        
-        internal static System.Drawing.Bitmap DockIndicator_PanelTop {
-            get {
-                object obj = ResourceManager.GetObject("DockIndicator_PanelTop", resourceCulture);
-                return ((System.Drawing.Bitmap)(obj));
-            }
-        }
-        
-        internal static System.Drawing.Bitmap DockIndicator_PanelTop_Active {
-            get {
-                object obj = ResourceManager.GetObject("DockIndicator_PanelTop_Active", resourceCulture);
-                return ((System.Drawing.Bitmap)(obj));
-            }
-        }
-        
-        internal static System.Drawing.Bitmap DockPane_AutoHide {
-            get {
-                object obj = ResourceManager.GetObject("DockPane_AutoHide", resourceCulture);
-                return ((System.Drawing.Bitmap)(obj));
-            }
-        }
-        
-        internal static System.Drawing.Bitmap DockPane_Close {
-            get {
-                object obj = ResourceManager.GetObject("DockPane_Close", resourceCulture);
-                return ((System.Drawing.Bitmap)(obj));
-            }
-        }
-        
-        internal static System.Drawing.Bitmap DockPane_Dock {
-            get {
-                object obj = ResourceManager.GetObject("DockPane_Dock", resourceCulture);
-                return ((System.Drawing.Bitmap)(obj));
-            }
-        }
-        
-        internal static System.Drawing.Bitmap DockPane_Option {
-            get {
-                object obj = ResourceManager.GetObject("DockPane_Option", resourceCulture);
-                return ((System.Drawing.Bitmap)(obj));
-            }
-        }
-        
-        internal static System.Drawing.Bitmap DockPane_OptionOverflow {
-            get {
-                object obj = ResourceManager.GetObject("DockPane_OptionOverflow", resourceCulture);
-                return ((System.Drawing.Bitmap)(obj));
-            }
-        }
-    }
+        return resourceMan;
+      }
+    }
+
+    /// <summary>
+    ///   Overrides the current thread's CurrentUICulture property for all
+    ///   resource lookups using this strongly typed resource class.
+    /// </summary>
+    [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
+    internal static global::System.Globalization.CultureInfo Culture {
+      get {
+        return resourceCulture;
+      }
+      set {
+        resourceCulture = value;
+      }
+    }
+
+    internal static System.Drawing.Bitmap DockIndicator_PaneDiamond {
+      get {
+        object obj = ResourceManager.GetObject("DockIndicator_PaneDiamond", resourceCulture);
+        return ((System.Drawing.Bitmap)(obj));
+      }
+    }
+
+    internal static System.Drawing.Bitmap DockIndicator_PaneDiamond_Bottom {
+      get {
+        object obj = ResourceManager.GetObject("DockIndicator_PaneDiamond_Bottom", resourceCulture);
+        return ((System.Drawing.Bitmap)(obj));
+      }
+    }
+
+    internal static System.Drawing.Bitmap DockIndicator_PaneDiamond_Fill {
+      get {
+        object obj = ResourceManager.GetObject("DockIndicator_PaneDiamond_Fill", resourceCulture);
+        return ((System.Drawing.Bitmap)(obj));
+      }
+    }
+
+    internal static System.Drawing.Bitmap DockIndicator_PaneDiamond_HotSpot {
+      get {
+        object obj = ResourceManager.GetObject("DockIndicator_PaneDiamond_HotSpot", resourceCulture);
+        return ((System.Drawing.Bitmap)(obj));
+      }
+    }
+
+    internal static System.Drawing.Bitmap DockIndicator_PaneDiamond_HotSpotIndex {
+      get {
+        object obj = ResourceManager.GetObject("DockIndicator_PaneDiamond_HotSpotIndex", resourceCulture);
+        return ((System.Drawing.Bitmap)(obj));
+      }
+    }
+
+    internal static System.Drawing.Bitmap DockIndicator_PaneDiamond_Left {
+      get {
+        object obj = ResourceManager.GetObject("DockIndicator_PaneDiamond_Left", resourceCulture);
+        return ((System.Drawing.Bitmap)(obj));
+      }
+    }
+
+    internal static System.Drawing.Bitmap DockIndicator_PaneDiamond_Right {
+      get {
+        object obj = ResourceManager.GetObject("DockIndicator_PaneDiamond_Right", resourceCulture);
+        return ((System.Drawing.Bitmap)(obj));
+      }
+    }
+
+    internal static System.Drawing.Bitmap DockIndicator_PaneDiamond_Top {
+      get {
+        object obj = ResourceManager.GetObject("DockIndicator_PaneDiamond_Top", resourceCulture);
+        return ((System.Drawing.Bitmap)(obj));
+      }
+    }
+
+    internal static System.Drawing.Bitmap DockIndicator_PanelBottom {
+      get {
+        object obj = ResourceManager.GetObject("DockIndicator_PanelBottom", resourceCulture);
+        return ((System.Drawing.Bitmap)(obj));
+      }
+    }
+
+    internal static System.Drawing.Bitmap DockIndicator_PanelBottom_Active {
+      get {
+        object obj = ResourceManager.GetObject("DockIndicator_PanelBottom_Active", resourceCulture);
+        return ((System.Drawing.Bitmap)(obj));
+      }
+    }
+
+    internal static System.Drawing.Bitmap DockIndicator_PanelFill {
+      get {
+        object obj = ResourceManager.GetObject("DockIndicator_PanelFill", resourceCulture);
+        return ((System.Drawing.Bitmap)(obj));
+      }
+    }
+
+    internal static System.Drawing.Bitmap DockIndicator_PanelFill_Active {
+      get {
+        object obj = ResourceManager.GetObject("DockIndicator_PanelFill_Active", resourceCulture);
+        return ((System.Drawing.Bitmap)(obj));
+      }
+    }
+
+    internal static System.Drawing.Bitmap DockIndicator_PanelLeft {
+      get {
+        object obj = ResourceManager.GetObject("DockIndicator_PanelLeft", resourceCulture);
+        return ((System.Drawing.Bitmap)(obj));
+      }
+    }
+
+    internal static System.Drawing.Bitmap DockIndicator_PanelLeft_Active {
+      get {
+        object obj = ResourceManager.GetObject("DockIndicator_PanelLeft_Active", resourceCulture);
+        return ((System.Drawing.Bitmap)(obj));
+      }
+    }
+
+    internal static System.Drawing.Bitmap DockIndicator_PanelRight {
+      get {
+        object obj = ResourceManager.GetObject("DockIndicator_PanelRight", resourceCulture);
+        return ((System.Drawing.Bitmap)(obj));
+      }
+    }
+
+    internal static System.Drawing.Bitmap DockIndicator_PanelRight_Active {
+      get {
+        object obj = ResourceManager.GetObject("DockIndicator_PanelRight_Active", resourceCulture);
+        return ((System.Drawing.Bitmap)(obj));
+      }
+    }
+
+    internal static System.Drawing.Bitmap DockIndicator_PanelTop {
+      get {
+        object obj = ResourceManager.GetObject("DockIndicator_PanelTop", resourceCulture);
+        return ((System.Drawing.Bitmap)(obj));
+      }
+    }
+
+    internal static System.Drawing.Bitmap DockIndicator_PanelTop_Active {
+      get {
+        object obj = ResourceManager.GetObject("DockIndicator_PanelTop_Active", resourceCulture);
+        return ((System.Drawing.Bitmap)(obj));
+      }
+    }
+
+    internal static System.Drawing.Bitmap DockPane_AutoHide {
+      get {
+        object obj = ResourceManager.GetObject("DockPane_AutoHide", resourceCulture);
+        return ((System.Drawing.Bitmap)(obj));
+      }
+    }
+
+    internal static System.Drawing.Bitmap DockPane_Close {
+      get {
+        object obj = ResourceManager.GetObject("DockPane_Close", resourceCulture);
+        return ((System.Drawing.Bitmap)(obj));
+      }
+    }
+
+    internal static System.Drawing.Bitmap DockPane_Dock {
+      get {
+        object obj = ResourceManager.GetObject("DockPane_Dock", resourceCulture);
+        return ((System.Drawing.Bitmap)(obj));
+      }
+    }
+
+    internal static System.Drawing.Bitmap DockPane_Option {
+      get {
+        object obj = ResourceManager.GetObject("DockPane_Option", resourceCulture);
+        return ((System.Drawing.Bitmap)(obj));
+      }
+    }
+
+    internal static System.Drawing.Bitmap DockPane_OptionOverflow {
+      get {
+        object obj = ResourceManager.GetObject("DockPane_OptionOverflow", resourceCulture);
+        return ((System.Drawing.Bitmap)(obj));
+      }
+    }
+  }
 }
Index: /trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.WinFormsUI/2.3.1/WinFormsUI-2.3.1/Docking/SplitterBase.cs
===================================================================
--- /trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.WinFormsUI/2.3.1/WinFormsUI-2.3.1/Docking/SplitterBase.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.WinFormsUI/2.3.1/WinFormsUI-2.3.1/Docking/SplitterBase.cs	(revision 4068)
@@ -1,70 +1,58 @@
-using System;
-using System.Collections;
-using System.ComponentModel;
 using System.Drawing;
 using System.Windows.Forms;
 
-namespace WeifenLuo.WinFormsUI.Docking
-{
-	internal class SplitterBase : Control
-	{
-		public SplitterBase()
-		{
-			SetStyle(ControlStyles.Selectable, false);
-		}
+namespace WeifenLuo.WinFormsUI.Docking {
+  internal class SplitterBase : Control {
+    public SplitterBase() {
+      SetStyle(ControlStyles.Selectable, false);
+    }
 
-		public override DockStyle Dock
-		{
-			get	{	return base.Dock;	}
-			set
-			{
-				SuspendLayout();
-				base.Dock = value;
+    public override DockStyle Dock {
+      get { return base.Dock; }
+      set {
+        SuspendLayout();
+        base.Dock = value;
 
-				if (Dock == DockStyle.Left || Dock == DockStyle.Right)
-					Width = SplitterSize;
-				else if (Dock == DockStyle.Top || Dock == DockStyle.Bottom)
-					Height = SplitterSize;
-				else
-					Bounds = Rectangle.Empty;
+        if (Dock == DockStyle.Left || Dock == DockStyle.Right)
+          Width = SplitterSize;
+        else if (Dock == DockStyle.Top || Dock == DockStyle.Bottom)
+          Height = SplitterSize;
+        else
+          Bounds = Rectangle.Empty;
 
-				if (Dock == DockStyle.Left || Dock == DockStyle.Right)
-					Cursor = Cursors.VSplit;
-				else if (Dock == DockStyle.Top || Dock == DockStyle.Bottom)
-					Cursor = Cursors.HSplit;
-				else
-					Cursor = Cursors.Default;
-					
-				ResumeLayout();
-			}
-		}
+        if (Dock == DockStyle.Left || Dock == DockStyle.Right)
+          Cursor = Cursors.VSplit;
+        else if (Dock == DockStyle.Top || Dock == DockStyle.Bottom)
+          Cursor = Cursors.HSplit;
+        else
+          Cursor = Cursors.Default;
 
-		protected virtual int SplitterSize
-		{
-			get	{	return 0;	}
-		}
+        ResumeLayout();
+      }
+    }
 
-		protected override void OnMouseDown(MouseEventArgs e)
-		{
-			base.OnMouseDown(e);
+    protected virtual int SplitterSize {
+      get { return 0; }
+    }
 
-			if (e.Button != MouseButtons.Left)
-				return;
+    protected override void OnMouseDown(MouseEventArgs e) {
+      base.OnMouseDown(e);
 
-			StartDrag();
-		}
+      if (e.Button != MouseButtons.Left)
+        return;
 
-		protected virtual void StartDrag()
-		{
-		}
+      StartDrag();
+    }
 
-		protected override void WndProc(ref Message m)
-		{
-            // eat the WM_MOUSEACTIVATE message
-			if (m.Msg == (int)Win32.Msgs.WM_MOUSEACTIVATE)
-				return;
+    protected virtual void StartDrag() {
+    }
 
-			base.WndProc(ref m);
-		}
-	}
+    protected override void WndProc(ref Message m) {
+      // eat the WM_MOUSEACTIVATE message
+      if (m.Msg == (int)Win32.Msgs.WM_MOUSEACTIVATE)
+        return;
+
+      base.WndProc(ref m);
+    }
+  }
 }
Index: /trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.WinFormsUI/2.3.1/WinFormsUI-2.3.1/Docking/Strings.Designer.cs
===================================================================
--- /trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.WinFormsUI/2.3.1/WinFormsUI-2.3.1/Docking/Strings.Designer.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.WinFormsUI/2.3.1/WinFormsUI-2.3.1/Docking/Strings.Designer.cs	(revision 4068)
@@ -10,765 +10,764 @@
 
 namespace WeifenLuo.WinFormsUI.Docking {
-    using System;
-    
-    
-    /// <summary>
-    ///   A strongly-typed resource class, for looking up localized strings, etc.
-    /// </summary>
-    // This class was auto-generated by the StronglyTypedResourceBuilder
-    // class via a tool like ResGen or Visual Studio.
-    // To add or remove a member, edit your .ResX file then rerun ResGen
-    // with the /str option, or rebuild your VS project.
-    [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "4.0.0.0")]
-    [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
-    [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
-    internal class Strings {
-        
-        private static global::System.Resources.ResourceManager resourceMan;
-        
-        private static global::System.Globalization.CultureInfo resourceCulture;
-        
-        [global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")]
-        internal Strings() {
+
+
+  /// <summary>
+  ///   A strongly-typed resource class, for looking up localized strings, etc.
+  /// </summary>
+  // This class was auto-generated by the StronglyTypedResourceBuilder
+  // class via a tool like ResGen or Visual Studio.
+  // To add or remove a member, edit your .ResX file then rerun ResGen
+  // with the /str option, or rebuild your VS project.
+  [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "4.0.0.0")]
+  [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
+  [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
+  internal class Strings {
+
+    private static global::System.Resources.ResourceManager resourceMan;
+
+    private static global::System.Globalization.CultureInfo resourceCulture;
+
+    [global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")]
+    internal Strings() {
+    }
+
+    /// <summary>
+    ///   Returns the cached ResourceManager instance used by this class.
+    /// </summary>
+    [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
+    internal static global::System.Resources.ResourceManager ResourceManager {
+      get {
+        if (object.ReferenceEquals(resourceMan, null)) {
+          global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("WeifenLuo.WinFormsUI.Docking.Strings", typeof(Strings).Assembly);
+          resourceMan = temp;
         }
-        
-        /// <summary>
-        ///   Returns the cached ResourceManager instance used by this class.
-        /// </summary>
-        [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
-        internal static global::System.Resources.ResourceManager ResourceManager {
-            get {
-                if (object.ReferenceEquals(resourceMan, null)) {
-                    global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("WeifenLuo.WinFormsUI.Docking.Strings", typeof(Strings).Assembly);
-                    resourceMan = temp;
-                }
-                return resourceMan;
-            }
-        }
-        
-        /// <summary>
-        ///   Overrides the current thread's CurrentUICulture property for all
-        ///   resource lookups using this strongly typed resource class.
-        /// </summary>
-        [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
-        internal static global::System.Globalization.CultureInfo Culture {
-            get {
-                return resourceCulture;
-            }
-            set {
-                resourceCulture = value;
-            }
-        }
-        
-        /// <summary>
-        ///   Looks up a localized string similar to Docking.
-        /// </summary>
-        internal static string Category_Docking {
-            get {
-                return ResourceManager.GetString("Category_Docking", resourceCulture);
-            }
-        }
-        
-        /// <summary>
-        ///   Looks up a localized string similar to Docking Notification.
-        /// </summary>
-        internal static string Category_DockingNotification {
-            get {
-                return ResourceManager.GetString("Category_DockingNotification", resourceCulture);
-            }
-        }
-        
-        /// <summary>
-        ///   Looks up a localized string similar to Property Changed.
-        /// </summary>
-        internal static string Category_PropertyChanged {
-            get {
-                return ResourceManager.GetString("Category_PropertyChanged", resourceCulture);
-            }
-        }
-        
-        /// <summary>
-        ///   Looks up a localized string similar to (Float).
-        /// </summary>
-        internal static string DockAreaEditor_FloatCheckBoxText {
-            get {
-                return ResourceManager.GetString("DockAreaEditor_FloatCheckBoxText", resourceCulture);
-            }
-        }
-        
-        /// <summary>
-        ///   Looks up a localized string similar to Determines if end user drag and drop docking is allowed..
-        /// </summary>
-        internal static string DockContent_AllowEndUserDocking_Description {
-            get {
-                return ResourceManager.GetString("DockContent_AllowEndUserDocking_Description", resourceCulture);
-            }
-        }
-        
-        /// <summary>
-        ///   Looks up a localized string similar to The size to display the content in auto hide mode. Value &lt; 1 to specify the size in portion; value &gt;= 1 to specify the size in pixel..
-        /// </summary>
-        internal static string DockContent_AutoHidePortion_Description {
-            get {
-                return ResourceManager.GetString("DockContent_AutoHidePortion_Description", resourceCulture);
-            }
-        }
-        
-        /// <summary>
-        ///   Looks up a localized string similar to Enable/Disable the close button of the content..
-        /// </summary>
-        internal static string DockContent_CloseButton_Description {
-            get {
-                return ResourceManager.GetString("DockContent_CloseButton_Description", resourceCulture);
-            }
-        }
-        
-        /// <summary>
-        ///   Looks up a localized string similar to Shows or hides the close button of the content. This property does not function with System MDI Document Style..
-        /// </summary>
-        internal static string DockContent_CloseButtonVisible_Description {
-            get {
-                return ResourceManager.GetString("DockContent_CloseButtonVisible_Description", resourceCulture);
-            }
-        }
-        
-        /// <summary>
-        ///   Looks up a localized string similar to The form must be of type IDockContent..
-        /// </summary>
-        internal static string DockContent_Constructor_InvalidForm {
-            get {
-                return ResourceManager.GetString("DockContent_Constructor_InvalidForm", resourceCulture);
-            }
-        }
-        
-        /// <summary>
-        ///   Looks up a localized string similar to Gets or sets a value indicating in which area of the DockPanel the content allowed to show..
-        /// </summary>
-        internal static string DockContent_DockAreas_Description {
-            get {
-                return ResourceManager.GetString("DockContent_DockAreas_Description", resourceCulture);
-            }
-        }
-        
-        /// <summary>
-        ///   Looks up a localized string similar to Occurs when the value of DockState property changed..
-        /// </summary>
-        internal static string DockContent_DockStateChanged_Description {
-            get {
-                return ResourceManager.GetString("DockContent_DockStateChanged_Description", resourceCulture);
-            }
-        }
-        
-        /// <summary>
-        ///   Looks up a localized string similar to Indicates the content will be hidden instead of being closed..
-        /// </summary>
-        internal static string DockContent_HideOnClose_Description {
-            get {
-                return ResourceManager.GetString("DockContent_HideOnClose_Description", resourceCulture);
-            }
-        }
-        
-        /// <summary>
-        ///   Looks up a localized string similar to The desired docking state when first showing..
-        /// </summary>
-        internal static string DockContent_ShowHint_Description {
-            get {
-                return ResourceManager.GetString("DockContent_ShowHint_Description", resourceCulture);
-            }
-        }
-        
-        /// <summary>
-        ///   Looks up a localized string similar to Context menu displayed for the dock pane tab strip..
-        /// </summary>
-        internal static string DockContent_TabPageContextMenu_Description {
-            get {
-                return ResourceManager.GetString("DockContent_TabPageContextMenu_Description", resourceCulture);
-            }
-        }
-        
-        /// <summary>
-        ///   Looks up a localized string similar to The tab text displayed in the dock pane. If not set, the Text property will be used..
-        /// </summary>
-        internal static string DockContent_TabText_Description {
-            get {
-                return ResourceManager.GetString("DockContent_TabText_Description", resourceCulture);
-            }
-        }
-        
-        /// <summary>
-        ///   Looks up a localized string similar to The text displayed when mouse hovers over the tab..
-        /// </summary>
-        internal static string DockContent_ToolTipText_Description {
-            get {
-                return ResourceManager.GetString("DockContent_ToolTipText_Description", resourceCulture);
-            }
-        }
-        
-        /// <summary>
-        ///   Looks up a localized string similar to The provided value is out of range..
-        /// </summary>
-        internal static string DockContentHandler_AutoHidePortion_OutOfRange {
-            get {
-                return ResourceManager.GetString("DockContentHandler_AutoHidePortion_OutOfRange", resourceCulture);
-            }
-        }
-        
-        /// <summary>
-        ///   Looks up a localized string similar to Invalid Value: The value of DockAreas conflicts with current DockState..
-        /// </summary>
-        internal static string DockContentHandler_DockAreas_InvalidValue {
-            get {
-                return ResourceManager.GetString("DockContentHandler_DockAreas_InvalidValue", resourceCulture);
-            }
-        }
-        
-        /// <summary>
-        ///   Looks up a localized string similar to The pane is invalid. Check the IsFloat and DockPanel properties of this dock pane..
-        /// </summary>
-        internal static string DockContentHandler_DockPane_InvalidValue {
-            get {
-                return ResourceManager.GetString("DockContentHandler_DockPane_InvalidValue", resourceCulture);
-            }
-        }
-        
-        /// <summary>
-        ///   Looks up a localized string similar to The pane is invalid. Check the IsFloat and DockPanel properties of this dock pane..
-        /// </summary>
-        internal static string DockContentHandler_FloatPane_InvalidValue {
-            get {
-                return ResourceManager.GetString("DockContentHandler_FloatPane_InvalidValue", resourceCulture);
-            }
-        }
-        
-        /// <summary>
-        ///   Looks up a localized string similar to Invalid value, conflicts with DockableAreas  property..
-        /// </summary>
-        internal static string DockContentHandler_IsFloat_InvalidValue {
-            get {
-                return ResourceManager.GetString("DockContentHandler_IsFloat_InvalidValue", resourceCulture);
-            }
-        }
-        
-        /// <summary>
-        ///   Looks up a localized string similar to The dock state is invalid..
-        /// </summary>
-        internal static string DockContentHandler_SetDockState_InvalidState {
-            get {
-                return ResourceManager.GetString("DockContentHandler_SetDockState_InvalidState", resourceCulture);
-            }
-        }
-        
-        /// <summary>
-        ///   Looks up a localized string similar to The dock panel is null..
-        /// </summary>
-        internal static string DockContentHandler_SetDockState_NullPanel {
-            get {
-                return ResourceManager.GetString("DockContentHandler_SetDockState_NullPanel", resourceCulture);
-            }
-        }
-        
-        /// <summary>
-        ///   Looks up a localized string similar to Invalid beforeContent, it must be contained by the pane..
-        /// </summary>
-        internal static string DockContentHandler_Show_InvalidBeforeContent {
-            get {
-                return ResourceManager.GetString("DockContentHandler_Show_InvalidBeforeContent", resourceCulture);
-            }
-        }
-        
-        /// <summary>
-        ///   Looks up a localized string similar to Invalid DockState: Content can not be showed as &quot;Unknown&quot; or &quot;Hidden&quot;..
-        /// </summary>
-        internal static string DockContentHandler_Show_InvalidDockState {
-            get {
-                return ResourceManager.GetString("DockContentHandler_Show_InvalidDockState", resourceCulture);
-            }
-        }
-        
-        /// <summary>
-        ///   Looks up a localized string similar to The previous pane is invalid. It can not be null, and its docking state must not be auto-hide..
-        /// </summary>
-        internal static string DockContentHandler_Show_InvalidPrevPane {
-            get {
-                return ResourceManager.GetString("DockContentHandler_Show_InvalidPrevPane", resourceCulture);
-            }
-        }
-        
-        /// <summary>
-        ///   Looks up a localized string similar to DockPanel can not be null..
-        /// </summary>
-        internal static string DockContentHandler_Show_NullDockPanel {
-            get {
-                return ResourceManager.GetString("DockContentHandler_Show_NullDockPanel", resourceCulture);
-            }
-        }
-        
-        /// <summary>
-        ///   Looks up a localized string similar to The Pane can not be null..
-        /// </summary>
-        internal static string DockContentHandler_Show_NullPane {
-            get {
-                return ResourceManager.GetString("DockContentHandler_Show_NullPane", resourceCulture);
-            }
-        }
-        
-        /// <summary>
-        ///   Looks up a localized string similar to Invalid value, check DockableAreas property..
-        /// </summary>
-        internal static string DockContentHandler_ShowHint_InvalidValue {
-            get {
-                return ResourceManager.GetString("DockContentHandler_ShowHint_InvalidValue", resourceCulture);
-            }
-        }
-        
-        /// <summary>
-        ///   Looks up a localized string similar to Context menu displayed for the dock pane tab strip..
-        /// </summary>
-        internal static string DockHandler_TabPageContextMenuStrip_Description {
-            get {
-                return ResourceManager.GetString("DockHandler_TabPageContextMenuStrip_Description", resourceCulture);
-            }
-        }
-        
-        /// <summary>
-        ///   Looks up a localized string similar to Press SHIFT for docking to full side..
-        /// </summary>
-        internal static string DockIndicator_ToolTipText {
-            get {
-                return ResourceManager.GetString("DockIndicator_ToolTipText", resourceCulture);
-            }
-        }
-        
-        /// <summary>
-        ///   Looks up a localized string similar to Invalid Content: ActiveContent must be one of the visible contents, or null if there is no visible content..
-        /// </summary>
-        internal static string DockPane_ActiveContent_InvalidValue {
-            get {
-                return ResourceManager.GetString("DockPane_ActiveContent_InvalidValue", resourceCulture);
-            }
-        }
-        
-        /// <summary>
-        ///   Looks up a localized string similar to Invalid argument: Content can not be &quot;null&quot;..
-        /// </summary>
-        internal static string DockPane_Constructor_NullContent {
-            get {
-                return ResourceManager.GetString("DockPane_Constructor_NullContent", resourceCulture);
-            }
-        }
-        
-        /// <summary>
-        ///   Looks up a localized string similar to Invalid argument: The content&apos;s DockPanel can not be &quot;null&quot;..
-        /// </summary>
-        internal static string DockPane_Constructor_NullDockPanel {
-            get {
-                return ResourceManager.GetString("DockPane_Constructor_NullDockPanel", resourceCulture);
-            }
-        }
-        
-        /// <summary>
-        ///   Looks up a localized string similar to The specified container conflicts with the IsFloat property..
-        /// </summary>
-        internal static string DockPane_DockTo_InvalidContainer {
-            get {
-                return ResourceManager.GetString("DockPane_DockTo_InvalidContainer", resourceCulture);
-            }
-        }
-        
-        /// <summary>
-        ///   Looks up a localized string similar to The previous pane does not exist in the nested docking pane collection..
-        /// </summary>
-        internal static string DockPane_DockTo_NoPrevPane {
-            get {
-                return ResourceManager.GetString("DockPane_DockTo_NoPrevPane", resourceCulture);
-            }
-        }
-        
-        /// <summary>
-        ///   Looks up a localized string similar to The container can not be null..
-        /// </summary>
-        internal static string DockPane_DockTo_NullContainer {
-            get {
-                return ResourceManager.GetString("DockPane_DockTo_NullContainer", resourceCulture);
-            }
-        }
-        
-        /// <summary>
-        ///   Looks up a localized string similar to The previous pane can not be null when the nested docking pane collection is not empty..
-        /// </summary>
-        internal static string DockPane_DockTo_NullPrevPane {
-            get {
-                return ResourceManager.GetString("DockPane_DockTo_NullPrevPane", resourceCulture);
-            }
-        }
-        
-        /// <summary>
-        ///   Looks up a localized string similar to The previous pane can not be itself..
-        /// </summary>
-        internal static string DockPane_DockTo_SelfPrevPane {
-            get {
-                return ResourceManager.GetString("DockPane_DockTo_SelfPrevPane", resourceCulture);
-            }
-        }
-        
-        /// <summary>
-        ///   Looks up a localized string similar to FloatWindow property can not be set to &quot;null&quot; when DockState is DockState.Float..
-        /// </summary>
-        internal static string DockPane_FloatWindow_InvalidValue {
-            get {
-                return ResourceManager.GetString("DockPane_FloatWindow_InvalidValue", resourceCulture);
-            }
-        }
-        
-        /// <summary>
-        ///   Looks up a localized string similar to Invalid Content: Content not within the collection..
-        /// </summary>
-        internal static string DockPane_SetContentIndex_InvalidContent {
-            get {
-                return ResourceManager.GetString("DockPane_SetContentIndex_InvalidContent", resourceCulture);
-            }
-        }
-        
-        /// <summary>
-        ///   Looks up a localized string similar to Invalid Index: The index is out of range..
-        /// </summary>
-        internal static string DockPane_SetContentIndex_InvalidIndex {
-            get {
-                return ResourceManager.GetString("DockPane_SetContentIndex_InvalidIndex", resourceCulture);
-            }
-        }
-        
-        /// <summary>
-        ///   Looks up a localized string similar to The state for the dock pane is invalid..
-        /// </summary>
-        internal static string DockPane_SetDockState_InvalidState {
-            get {
-                return ResourceManager.GetString("DockPane_SetDockState_InvalidState", resourceCulture);
-            }
-        }
-        
-        /// <summary>
-        ///   Looks up a localized string similar to Auto Hide.
-        /// </summary>
-        internal static string DockPaneCaption_ToolTipAutoHide {
-            get {
-                return ResourceManager.GetString("DockPaneCaption_ToolTipAutoHide", resourceCulture);
-            }
-        }
-        
-        /// <summary>
-        ///   Looks up a localized string similar to Close.
-        /// </summary>
-        internal static string DockPaneCaption_ToolTipClose {
-            get {
-                return ResourceManager.GetString("DockPaneCaption_ToolTipClose", resourceCulture);
-            }
-        }
-        
-        /// <summary>
-        ///   Looks up a localized string similar to Options.
-        /// </summary>
-        internal static string DockPaneCaption_ToolTipOptions {
-            get {
-                return ResourceManager.GetString("DockPaneCaption_ToolTipOptions", resourceCulture);
-            }
-        }
-        
-        /// <summary>
-        ///   Looks up a localized string similar to Invalid Content: The content must be auto-hide state and associates with this DockPanel..
-        /// </summary>
-        internal static string DockPanel_ActiveAutoHideContent_InvalidValue {
-            get {
-                return ResourceManager.GetString("DockPanel_ActiveAutoHideContent_InvalidValue", resourceCulture);
-            }
-        }
-        
-        /// <summary>
-        ///   Looks up a localized string similar to Occurs when the value of ActiveContentProperty changed..
-        /// </summary>
-        internal static string DockPanel_ActiveContentChanged_Description {
-            get {
-                return ResourceManager.GetString("DockPanel_ActiveContentChanged_Description", resourceCulture);
-            }
-        }
-        
-        /// <summary>
-        ///   Looks up a localized string similar to Occurs when the value of ActiveDocument property changed..
-        /// </summary>
-        internal static string DockPanel_ActiveDocumentChanged_Description {
-            get {
-                return ResourceManager.GetString("DockPanel_ActiveDocumentChanged_Description", resourceCulture);
-            }
-        }
-        
-        /// <summary>
-        ///   Looks up a localized string similar to Occurs when the value of ActivePane property changed..
-        /// </summary>
-        internal static string DockPanel_ActivePaneChanged_Description {
-            get {
-                return ResourceManager.GetString("DockPanel_ActivePaneChanged_Description", resourceCulture);
-            }
-        }
-        
-        /// <summary>
-        ///   Looks up a localized string similar to Determines if the drag and drop docking is allowed..
-        /// </summary>
-        internal static string DockPanel_AllowEndUserDocking_Description {
-            get {
-                return ResourceManager.GetString("DockPanel_AllowEndUserDocking_Description", resourceCulture);
-            }
-        }
-        
-        /// <summary>
-        ///   Looks up a localized string similar to Determines if the drag and drop nested docking is allowed..
-        /// </summary>
-        internal static string DockPanel_AllowEndUserNestedDocking_Description {
-            get {
-                return ResourceManager.GetString("DockPanel_AllowEndUserNestedDocking_Description", resourceCulture);
-            }
-        }
-        
-        /// <summary>
-        ///   Looks up a localized string similar to Occurs when a content added to the DockPanel..
-        /// </summary>
-        internal static string DockPanel_ContentAdded_Description {
-            get {
-                return ResourceManager.GetString("DockPanel_ContentAdded_Description", resourceCulture);
-            }
-        }
-        
-        /// <summary>
-        ///   Looks up a localized string similar to Occurs when a content removed from the DockPanel..
-        /// </summary>
-        internal static string DockPanel_ContentRemoved_Description {
-            get {
-                return ResourceManager.GetString("DockPanel_ContentRemoved_Description", resourceCulture);
-            }
-        }
-        
-        /// <summary>
-        ///   Looks up a localized string similar to The default size of float window..
-        /// </summary>
-        internal static string DockPanel_DefaultFloatWindowSize_Description {
-            get {
-                return ResourceManager.GetString("DockPanel_DefaultFloatWindowSize_Description", resourceCulture);
-            }
-        }
-        
-        /// <summary>
-        ///   Looks up a localized string similar to Provides Visual Studio .Net style docking..
-        /// </summary>
-        internal static string DockPanel_Description {
-            get {
-                return ResourceManager.GetString("DockPanel_Description", resourceCulture);
-            }
-        }
-        
-        /// <summary>
-        ///   Looks up a localized string similar to Size of the bottom docking window. Value &lt; 1 to specify the size in portion; value &gt; 1 to specify the size in pixels..
-        /// </summary>
-        internal static string DockPanel_DockBottomPortion_Description {
-            get {
-                return ResourceManager.GetString("DockPanel_DockBottomPortion_Description", resourceCulture);
-            }
-        }
-        
-        /// <summary>
-        ///   Looks up a localized string similar to Size of the left docking window. Value &lt; 1 to specify the size in portion; value &gt; 1 to specify the size in pixels..
-        /// </summary>
-        internal static string DockPanel_DockLeftPortion_Description {
-            get {
-                return ResourceManager.GetString("DockPanel_DockLeftPortion_Description", resourceCulture);
-            }
-        }
-        
-        /// <summary>
-        ///   Looks up a localized string similar to The visual skin to use when displaying the docked windows..
-        /// </summary>
-        internal static string DockPanel_DockPanelSkin {
-            get {
-                return ResourceManager.GetString("DockPanel_DockPanelSkin", resourceCulture);
-            }
-        }
-        
-        /// <summary>
-        ///   Looks up a localized string similar to Size of the right docking window. Value &lt; 1 to specify the size in portion; value &gt; 1 to specify the size in pixels..
-        /// </summary>
-        internal static string DockPanel_DockRightPortion_Description {
-            get {
-                return ResourceManager.GetString("DockPanel_DockRightPortion_Description", resourceCulture);
-            }
-        }
-        
-        /// <summary>
-        ///   Looks up a localized string similar to Size of the top docking window. Value &lt; 1 to specify the size in portion; value &gt; 1 to specify the size in pixels..
-        /// </summary>
-        internal static string DockPanel_DockTopPortion_Description {
-            get {
-                return ResourceManager.GetString("DockPanel_DockTopPortion_Description", resourceCulture);
-            }
-        }
-        
-        /// <summary>
-        ///   Looks up a localized string similar to The style of the document window..
-        /// </summary>
-        internal static string DockPanel_DocumentStyle_Description {
-            get {
-                return ResourceManager.GetString("DockPanel_DocumentStyle_Description", resourceCulture);
-            }
-        }
-        
-        /// <summary>
-        ///   Looks up a localized string similar to Determines where the tab strip for Document style content is drawn..
-        /// </summary>
-        internal static string DockPanel_DocumentTabStripLocation {
-            get {
-                return ResourceManager.GetString("DockPanel_DocumentTabStripLocation", resourceCulture);
-            }
-        }
-        
-        /// <summary>
-        ///   Looks up a localized string similar to The DockPanel has already been initialized..
-        /// </summary>
-        internal static string DockPanel_LoadFromXml_AlreadyInitialized {
-            get {
-                return ResourceManager.GetString("DockPanel_LoadFromXml_AlreadyInitialized", resourceCulture);
-            }
-        }
-        
-        /// <summary>
-        ///   Looks up a localized string similar to The configuration file&apos;s version is invalid..
-        /// </summary>
-        internal static string DockPanel_LoadFromXml_InvalidFormatVersion {
-            get {
-                return ResourceManager.GetString("DockPanel_LoadFromXml_InvalidFormatVersion", resourceCulture);
-            }
-        }
-        
-        /// <summary>
-        ///   Looks up a localized string similar to The XML file format is invalid..
-        /// </summary>
-        internal static string DockPanel_LoadFromXml_InvalidXmlFormat {
-            get {
-                return ResourceManager.GetString("DockPanel_LoadFromXml_InvalidXmlFormat", resourceCulture);
-            }
-        }
-        
-        /// <summary>
-        ///   Looks up a localized string similar to Invalid parent form. When using DockingMdi or SystemMdi document style, the DockPanel control must be the child control of the main MDI container form..
-        /// </summary>
-        internal static string DockPanel_ParentForm_Invalid {
-            get {
-                return ResourceManager.GetString("DockPanel_ParentForm_Invalid", resourceCulture);
-            }
-        }
-        
-        /// <summary>
-        ///   Looks up a localized string similar to DockPanel configuration file. Author: Weifen Luo, all rights reserved..
-        /// </summary>
-        internal static string DockPanel_Persistor_XmlFileComment1 {
-            get {
-                return ResourceManager.GetString("DockPanel_Persistor_XmlFileComment1", resourceCulture);
-            }
-        }
-        
-        /// <summary>
-        ///   Looks up a localized string similar to !!! AUTOMATICALLY GENERATED FILE. DO NOT MODIFY !!!.
-        /// </summary>
-        internal static string DockPanel_Persistor_XmlFileComment2 {
-            get {
-                return ResourceManager.GetString("DockPanel_Persistor_XmlFileComment2", resourceCulture);
-            }
-        }
-        
-        /// <summary>
-        ///   Looks up a localized string similar to Indicates whether the control layout is right-to-left when the RightToLeft property is set to Yes..
-        /// </summary>
-        internal static string DockPanel_RightToLeftLayout_Description {
-            get {
-                return ResourceManager.GetString("DockPanel_RightToLeftLayout_Description", resourceCulture);
-            }
-        }
-        
-        /// <summary>
-        ///   Looks up a localized string similar to Invalid Index: The index is out of range..
-        /// </summary>
-        internal static string DockPanel_SetPaneIndex_InvalidIndex {
-            get {
-                return ResourceManager.GetString("DockPanel_SetPaneIndex_InvalidIndex", resourceCulture);
-            }
-        }
-        
-        /// <summary>
-        ///   Looks up a localized string similar to Invalid Pane: DockPane not within the collection..
-        /// </summary>
-        internal static string DockPanel_SetPaneIndex_InvalidPane {
-            get {
-                return ResourceManager.GetString("DockPanel_SetPaneIndex_InvalidPane", resourceCulture);
-            }
-        }
-        
-        /// <summary>
-        ///   Looks up a localized string similar to Determines if the document icon will be displayed in the tab strip..
-        /// </summary>
-        internal static string DockPanel_ShowDocumentIcon_Description {
-            get {
-                return ResourceManager.GetString("DockPanel_ShowDocumentIcon_Description", resourceCulture);
-            }
-        }
-        
-        /// <summary>
-        ///   Looks up a localized string similar to Close.
-        /// </summary>
-        internal static string DockPaneStrip_ToolTipClose {
-            get {
-                return ResourceManager.GetString("DockPaneStrip_ToolTipClose", resourceCulture);
-            }
-        }
-        
-        /// <summary>
-        ///   Looks up a localized string similar to Window List.
-        /// </summary>
-        internal static string DockPaneStrip_ToolTipWindowList {
-            get {
-                return ResourceManager.GetString("DockPaneStrip_ToolTipWindowList", resourceCulture);
-            }
-        }
-        
-        /// <summary>
-        ///   Looks up a localized string similar to Invalid argument: DockPanel can not be &quot;null&quot;..
-        /// </summary>
-        internal static string FloatWindow_Constructor_NullDockPanel {
-            get {
-                return ResourceManager.GetString("FloatWindow_Constructor_NullDockPanel", resourceCulture);
-            }
-        }
-        
-        /// <summary>
-        ///   Looks up a localized string similar to Invalid Index: The index is out of range..
-        /// </summary>
-        internal static string FloatWindow_SetPaneIndex_InvalidIndex {
-            get {
-                return ResourceManager.GetString("FloatWindow_SetPaneIndex_InvalidIndex", resourceCulture);
-            }
-        }
-        
-        /// <summary>
-        ///   Looks up a localized string similar to Invalid Pane: DockPane not within the collection..
-        /// </summary>
-        internal static string FloatWindow_SetPaneIndex_InvalidPane {
-            get {
-                return ResourceManager.GetString("FloatWindow_SetPaneIndex_InvalidPane", resourceCulture);
-            }
-        }
-        
-        /// <summary>
-        ///   Looks up a localized string similar to Invalid DockPanel..
-        /// </summary>
-        internal static string IDockDragSource_DockTo_InvalidPanel {
-            get {
-                return ResourceManager.GetString("IDockDragSource_DockTo_InvalidPanel", resourceCulture);
-            }
-        }
-    }
+        return resourceMan;
+      }
+    }
+
+    /// <summary>
+    ///   Overrides the current thread's CurrentUICulture property for all
+    ///   resource lookups using this strongly typed resource class.
+    /// </summary>
+    [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
+    internal static global::System.Globalization.CultureInfo Culture {
+      get {
+        return resourceCulture;
+      }
+      set {
+        resourceCulture = value;
+      }
+    }
+
+    /// <summary>
+    ///   Looks up a localized string similar to Docking.
+    /// </summary>
+    internal static string Category_Docking {
+      get {
+        return ResourceManager.GetString("Category_Docking", resourceCulture);
+      }
+    }
+
+    /// <summary>
+    ///   Looks up a localized string similar to Docking Notification.
+    /// </summary>
+    internal static string Category_DockingNotification {
+      get {
+        return ResourceManager.GetString("Category_DockingNotification", resourceCulture);
+      }
+    }
+
+    /// <summary>
+    ///   Looks up a localized string similar to Property Changed.
+    /// </summary>
+    internal static string Category_PropertyChanged {
+      get {
+        return ResourceManager.GetString("Category_PropertyChanged", resourceCulture);
+      }
+    }
+
+    /// <summary>
+    ///   Looks up a localized string similar to (Float).
+    /// </summary>
+    internal static string DockAreaEditor_FloatCheckBoxText {
+      get {
+        return ResourceManager.GetString("DockAreaEditor_FloatCheckBoxText", resourceCulture);
+      }
+    }
+
+    /// <summary>
+    ///   Looks up a localized string similar to Determines if end user drag and drop docking is allowed..
+    /// </summary>
+    internal static string DockContent_AllowEndUserDocking_Description {
+      get {
+        return ResourceManager.GetString("DockContent_AllowEndUserDocking_Description", resourceCulture);
+      }
+    }
+
+    /// <summary>
+    ///   Looks up a localized string similar to The size to display the content in auto hide mode. Value &lt; 1 to specify the size in portion; value &gt;= 1 to specify the size in pixel..
+    /// </summary>
+    internal static string DockContent_AutoHidePortion_Description {
+      get {
+        return ResourceManager.GetString("DockContent_AutoHidePortion_Description", resourceCulture);
+      }
+    }
+
+    /// <summary>
+    ///   Looks up a localized string similar to Enable/Disable the close button of the content..
+    /// </summary>
+    internal static string DockContent_CloseButton_Description {
+      get {
+        return ResourceManager.GetString("DockContent_CloseButton_Description", resourceCulture);
+      }
+    }
+
+    /// <summary>
+    ///   Looks up a localized string similar to Shows or hides the close button of the content. This property does not function with System MDI Document Style..
+    /// </summary>
+    internal static string DockContent_CloseButtonVisible_Description {
+      get {
+        return ResourceManager.GetString("DockContent_CloseButtonVisible_Description", resourceCulture);
+      }
+    }
+
+    /// <summary>
+    ///   Looks up a localized string similar to The form must be of type IDockContent..
+    /// </summary>
+    internal static string DockContent_Constructor_InvalidForm {
+      get {
+        return ResourceManager.GetString("DockContent_Constructor_InvalidForm", resourceCulture);
+      }
+    }
+
+    /// <summary>
+    ///   Looks up a localized string similar to Gets or sets a value indicating in which area of the DockPanel the content allowed to show..
+    /// </summary>
+    internal static string DockContent_DockAreas_Description {
+      get {
+        return ResourceManager.GetString("DockContent_DockAreas_Description", resourceCulture);
+      }
+    }
+
+    /// <summary>
+    ///   Looks up a localized string similar to Occurs when the value of DockState property changed..
+    /// </summary>
+    internal static string DockContent_DockStateChanged_Description {
+      get {
+        return ResourceManager.GetString("DockContent_DockStateChanged_Description", resourceCulture);
+      }
+    }
+
+    /// <summary>
+    ///   Looks up a localized string similar to Indicates the content will be hidden instead of being closed..
+    /// </summary>
+    internal static string DockContent_HideOnClose_Description {
+      get {
+        return ResourceManager.GetString("DockContent_HideOnClose_Description", resourceCulture);
+      }
+    }
+
+    /// <summary>
+    ///   Looks up a localized string similar to The desired docking state when first showing..
+    /// </summary>
+    internal static string DockContent_ShowHint_Description {
+      get {
+        return ResourceManager.GetString("DockContent_ShowHint_Description", resourceCulture);
+      }
+    }
+
+    /// <summary>
+    ///   Looks up a localized string similar to Context menu displayed for the dock pane tab strip..
+    /// </summary>
+    internal static string DockContent_TabPageContextMenu_Description {
+      get {
+        return ResourceManager.GetString("DockContent_TabPageContextMenu_Description", resourceCulture);
+      }
+    }
+
+    /// <summary>
+    ///   Looks up a localized string similar to The tab text displayed in the dock pane. If not set, the Text property will be used..
+    /// </summary>
+    internal static string DockContent_TabText_Description {
+      get {
+        return ResourceManager.GetString("DockContent_TabText_Description", resourceCulture);
+      }
+    }
+
+    /// <summary>
+    ///   Looks up a localized string similar to The text displayed when mouse hovers over the tab..
+    /// </summary>
+    internal static string DockContent_ToolTipText_Description {
+      get {
+        return ResourceManager.GetString("DockContent_ToolTipText_Description", resourceCulture);
+      }
+    }
+
+    /// <summary>
+    ///   Looks up a localized string similar to The provided value is out of range..
+    /// </summary>
+    internal static string DockContentHandler_AutoHidePortion_OutOfRange {
+      get {
+        return ResourceManager.GetString("DockContentHandler_AutoHidePortion_OutOfRange", resourceCulture);
+      }
+    }
+
+    /// <summary>
+    ///   Looks up a localized string similar to Invalid Value: The value of DockAreas conflicts with current DockState..
+    /// </summary>
+    internal static string DockContentHandler_DockAreas_InvalidValue {
+      get {
+        return ResourceManager.GetString("DockContentHandler_DockAreas_InvalidValue", resourceCulture);
+      }
+    }
+
+    /// <summary>
+    ///   Looks up a localized string similar to The pane is invalid. Check the IsFloat and DockPanel properties of this dock pane..
+    /// </summary>
+    internal static string DockContentHandler_DockPane_InvalidValue {
+      get {
+        return ResourceManager.GetString("DockContentHandler_DockPane_InvalidValue", resourceCulture);
+      }
+    }
+
+    /// <summary>
+    ///   Looks up a localized string similar to The pane is invalid. Check the IsFloat and DockPanel properties of this dock pane..
+    /// </summary>
+    internal static string DockContentHandler_FloatPane_InvalidValue {
+      get {
+        return ResourceManager.GetString("DockContentHandler_FloatPane_InvalidValue", resourceCulture);
+      }
+    }
+
+    /// <summary>
+    ///   Looks up a localized string similar to Invalid value, conflicts with DockableAreas  property..
+    /// </summary>
+    internal static string DockContentHandler_IsFloat_InvalidValue {
+      get {
+        return ResourceManager.GetString("DockContentHandler_IsFloat_InvalidValue", resourceCulture);
+      }
+    }
+
+    /// <summary>
+    ///   Looks up a localized string similar to The dock state is invalid..
+    /// </summary>
+    internal static string DockContentHandler_SetDockState_InvalidState {
+      get {
+        return ResourceManager.GetString("DockContentHandler_SetDockState_InvalidState", resourceCulture);
+      }
+    }
+
+    /// <summary>
+    ///   Looks up a localized string similar to The dock panel is null..
+    /// </summary>
+    internal static string DockContentHandler_SetDockState_NullPanel {
+      get {
+        return ResourceManager.GetString("DockContentHandler_SetDockState_NullPanel", resourceCulture);
+      }
+    }
+
+    /// <summary>
+    ///   Looks up a localized string similar to Invalid beforeContent, it must be contained by the pane..
+    /// </summary>
+    internal static string DockContentHandler_Show_InvalidBeforeContent {
+      get {
+        return ResourceManager.GetString("DockContentHandler_Show_InvalidBeforeContent", resourceCulture);
+      }
+    }
+
+    /// <summary>
+    ///   Looks up a localized string similar to Invalid DockState: Content can not be showed as &quot;Unknown&quot; or &quot;Hidden&quot;..
+    /// </summary>
+    internal static string DockContentHandler_Show_InvalidDockState {
+      get {
+        return ResourceManager.GetString("DockContentHandler_Show_InvalidDockState", resourceCulture);
+      }
+    }
+
+    /// <summary>
+    ///   Looks up a localized string similar to The previous pane is invalid. It can not be null, and its docking state must not be auto-hide..
+    /// </summary>
+    internal static string DockContentHandler_Show_InvalidPrevPane {
+      get {
+        return ResourceManager.GetString("DockContentHandler_Show_InvalidPrevPane", resourceCulture);
+      }
+    }
+
+    /// <summary>
+    ///   Looks up a localized string similar to DockPanel can not be null..
+    /// </summary>
+    internal static string DockContentHandler_Show_NullDockPanel {
+      get {
+        return ResourceManager.GetString("DockContentHandler_Show_NullDockPanel", resourceCulture);
+      }
+    }
+
+    /// <summary>
+    ///   Looks up a localized string similar to The Pane can not be null..
+    /// </summary>
+    internal static string DockContentHandler_Show_NullPane {
+      get {
+        return ResourceManager.GetString("DockContentHandler_Show_NullPane", resourceCulture);
+      }
+    }
+
+    /// <summary>
+    ///   Looks up a localized string similar to Invalid value, check DockableAreas property..
+    /// </summary>
+    internal static string DockContentHandler_ShowHint_InvalidValue {
+      get {
+        return ResourceManager.GetString("DockContentHandler_ShowHint_InvalidValue", resourceCulture);
+      }
+    }
+
+    /// <summary>
+    ///   Looks up a localized string similar to Context menu displayed for the dock pane tab strip..
+    /// </summary>
+    internal static string DockHandler_TabPageContextMenuStrip_Description {
+      get {
+        return ResourceManager.GetString("DockHandler_TabPageContextMenuStrip_Description", resourceCulture);
+      }
+    }
+
+    /// <summary>
+    ///   Looks up a localized string similar to Press SHIFT for docking to full side..
+    /// </summary>
+    internal static string DockIndicator_ToolTipText {
+      get {
+        return ResourceManager.GetString("DockIndicator_ToolTipText", resourceCulture);
+      }
+    }
+
+    /// <summary>
+    ///   Looks up a localized string similar to Invalid Content: ActiveContent must be one of the visible contents, or null if there is no visible content..
+    /// </summary>
+    internal static string DockPane_ActiveContent_InvalidValue {
+      get {
+        return ResourceManager.GetString("DockPane_ActiveContent_InvalidValue", resourceCulture);
+      }
+    }
+
+    /// <summary>
+    ///   Looks up a localized string similar to Invalid argument: Content can not be &quot;null&quot;..
+    /// </summary>
+    internal static string DockPane_Constructor_NullContent {
+      get {
+        return ResourceManager.GetString("DockPane_Constructor_NullContent", resourceCulture);
+      }
+    }
+
+    /// <summary>
+    ///   Looks up a localized string similar to Invalid argument: The content&apos;s DockPanel can not be &quot;null&quot;..
+    /// </summary>
+    internal static string DockPane_Constructor_NullDockPanel {
+      get {
+        return ResourceManager.GetString("DockPane_Constructor_NullDockPanel", resourceCulture);
+      }
+    }
+
+    /// <summary>
+    ///   Looks up a localized string similar to The specified container conflicts with the IsFloat property..
+    /// </summary>
+    internal static string DockPane_DockTo_InvalidContainer {
+      get {
+        return ResourceManager.GetString("DockPane_DockTo_InvalidContainer", resourceCulture);
+      }
+    }
+
+    /// <summary>
+    ///   Looks up a localized string similar to The previous pane does not exist in the nested docking pane collection..
+    /// </summary>
+    internal static string DockPane_DockTo_NoPrevPane {
+      get {
+        return ResourceManager.GetString("DockPane_DockTo_NoPrevPane", resourceCulture);
+      }
+    }
+
+    /// <summary>
+    ///   Looks up a localized string similar to The container can not be null..
+    /// </summary>
+    internal static string DockPane_DockTo_NullContainer {
+      get {
+        return ResourceManager.GetString("DockPane_DockTo_NullContainer", resourceCulture);
+      }
+    }
+
+    /// <summary>
+    ///   Looks up a localized string similar to The previous pane can not be null when the nested docking pane collection is not empty..
+    /// </summary>
+    internal static string DockPane_DockTo_NullPrevPane {
+      get {
+        return ResourceManager.GetString("DockPane_DockTo_NullPrevPane", resourceCulture);
+      }
+    }
+
+    /// <summary>
+    ///   Looks up a localized string similar to The previous pane can not be itself..
+    /// </summary>
+    internal static string DockPane_DockTo_SelfPrevPane {
+      get {
+        return ResourceManager.GetString("DockPane_DockTo_SelfPrevPane", resourceCulture);
+      }
+    }
+
+    /// <summary>
+    ///   Looks up a localized string similar to FloatWindow property can not be set to &quot;null&quot; when DockState is DockState.Float..
+    /// </summary>
+    internal static string DockPane_FloatWindow_InvalidValue {
+      get {
+        return ResourceManager.GetString("DockPane_FloatWindow_InvalidValue", resourceCulture);
+      }
+    }
+
+    /// <summary>
+    ///   Looks up a localized string similar to Invalid Content: Content not within the collection..
+    /// </summary>
+    internal static string DockPane_SetContentIndex_InvalidContent {
+      get {
+        return ResourceManager.GetString("DockPane_SetContentIndex_InvalidContent", resourceCulture);
+      }
+    }
+
+    /// <summary>
+    ///   Looks up a localized string similar to Invalid Index: The index is out of range..
+    /// </summary>
+    internal static string DockPane_SetContentIndex_InvalidIndex {
+      get {
+        return ResourceManager.GetString("DockPane_SetContentIndex_InvalidIndex", resourceCulture);
+      }
+    }
+
+    /// <summary>
+    ///   Looks up a localized string similar to The state for the dock pane is invalid..
+    /// </summary>
+    internal static string DockPane_SetDockState_InvalidState {
+      get {
+        return ResourceManager.GetString("DockPane_SetDockState_InvalidState", resourceCulture);
+      }
+    }
+
+    /// <summary>
+    ///   Looks up a localized string similar to Auto Hide.
+    /// </summary>
+    internal static string DockPaneCaption_ToolTipAutoHide {
+      get {
+        return ResourceManager.GetString("DockPaneCaption_ToolTipAutoHide", resourceCulture);
+      }
+    }
+
+    /// <summary>
+    ///   Looks up a localized string similar to Close.
+    /// </summary>
+    internal static string DockPaneCaption_ToolTipClose {
+      get {
+        return ResourceManager.GetString("DockPaneCaption_ToolTipClose", resourceCulture);
+      }
+    }
+
+    /// <summary>
+    ///   Looks up a localized string similar to Options.
+    /// </summary>
+    internal static string DockPaneCaption_ToolTipOptions {
+      get {
+        return ResourceManager.GetString("DockPaneCaption_ToolTipOptions", resourceCulture);
+      }
+    }
+
+    /// <summary>
+    ///   Looks up a localized string similar to Invalid Content: The content must be auto-hide state and associates with this DockPanel..
+    /// </summary>
+    internal static string DockPanel_ActiveAutoHideContent_InvalidValue {
+      get {
+        return ResourceManager.GetString("DockPanel_ActiveAutoHideContent_InvalidValue", resourceCulture);
+      }
+    }
+
+    /// <summary>
+    ///   Looks up a localized string similar to Occurs when the value of ActiveContentProperty changed..
+    /// </summary>
+    internal static string DockPanel_ActiveContentChanged_Description {
+      get {
+        return ResourceManager.GetString("DockPanel_ActiveContentChanged_Description", resourceCulture);
+      }
+    }
+
+    /// <summary>
+    ///   Looks up a localized string similar to Occurs when the value of ActiveDocument property changed..
+    /// </summary>
+    internal static string DockPanel_ActiveDocumentChanged_Description {
+      get {
+        return ResourceManager.GetString("DockPanel_ActiveDocumentChanged_Description", resourceCulture);
+      }
+    }
+
+    /// <summary>
+    ///   Looks up a localized string similar to Occurs when the value of ActivePane property changed..
+    /// </summary>
+    internal static string DockPanel_ActivePaneChanged_Description {
+      get {
+        return ResourceManager.GetString("DockPanel_ActivePaneChanged_Description", resourceCulture);
+      }
+    }
+
+    /// <summary>
+    ///   Looks up a localized string similar to Determines if the drag and drop docking is allowed..
+    /// </summary>
+    internal static string DockPanel_AllowEndUserDocking_Description {
+      get {
+        return ResourceManager.GetString("DockPanel_AllowEndUserDocking_Description", resourceCulture);
+      }
+    }
+
+    /// <summary>
+    ///   Looks up a localized string similar to Determines if the drag and drop nested docking is allowed..
+    /// </summary>
+    internal static string DockPanel_AllowEndUserNestedDocking_Description {
+      get {
+        return ResourceManager.GetString("DockPanel_AllowEndUserNestedDocking_Description", resourceCulture);
+      }
+    }
+
+    /// <summary>
+    ///   Looks up a localized string similar to Occurs when a content added to the DockPanel..
+    /// </summary>
+    internal static string DockPanel_ContentAdded_Description {
+      get {
+        return ResourceManager.GetString("DockPanel_ContentAdded_Description", resourceCulture);
+      }
+    }
+
+    /// <summary>
+    ///   Looks up a localized string similar to Occurs when a content removed from the DockPanel..
+    /// </summary>
+    internal static string DockPanel_ContentRemoved_Description {
+      get {
+        return ResourceManager.GetString("DockPanel_ContentRemoved_Description", resourceCulture);
+      }
+    }
+
+    /// <summary>
+    ///   Looks up a localized string similar to The default size of float window..
+    /// </summary>
+    internal static string DockPanel_DefaultFloatWindowSize_Description {
+      get {
+        return ResourceManager.GetString("DockPanel_DefaultFloatWindowSize_Description", resourceCulture);
+      }
+    }
+
+    /// <summary>
+    ///   Looks up a localized string similar to Provides Visual Studio .Net style docking..
+    /// </summary>
+    internal static string DockPanel_Description {
+      get {
+        return ResourceManager.GetString("DockPanel_Description", resourceCulture);
+      }
+    }
+
+    /// <summary>
+    ///   Looks up a localized string similar to Size of the bottom docking window. Value &lt; 1 to specify the size in portion; value &gt; 1 to specify the size in pixels..
+    /// </summary>
+    internal static string DockPanel_DockBottomPortion_Description {
+      get {
+        return ResourceManager.GetString("DockPanel_DockBottomPortion_Description", resourceCulture);
+      }
+    }
+
+    /// <summary>
+    ///   Looks up a localized string similar to Size of the left docking window. Value &lt; 1 to specify the size in portion; value &gt; 1 to specify the size in pixels..
+    /// </summary>
+    internal static string DockPanel_DockLeftPortion_Description {
+      get {
+        return ResourceManager.GetString("DockPanel_DockLeftPortion_Description", resourceCulture);
+      }
+    }
+
+    /// <summary>
+    ///   Looks up a localized string similar to The visual skin to use when displaying the docked windows..
+    /// </summary>
+    internal static string DockPanel_DockPanelSkin {
+      get {
+        return ResourceManager.GetString("DockPanel_DockPanelSkin", resourceCulture);
+      }
+    }
+
+    /// <summary>
+    ///   Looks up a localized string similar to Size of the right docking window. Value &lt; 1 to specify the size in portion; value &gt; 1 to specify the size in pixels..
+    /// </summary>
+    internal static string DockPanel_DockRightPortion_Description {
+      get {
+        return ResourceManager.GetString("DockPanel_DockRightPortion_Description", resourceCulture);
+      }
+    }
+
+    /// <summary>
+    ///   Looks up a localized string similar to Size of the top docking window. Value &lt; 1 to specify the size in portion; value &gt; 1 to specify the size in pixels..
+    /// </summary>
+    internal static string DockPanel_DockTopPortion_Description {
+      get {
+        return ResourceManager.GetString("DockPanel_DockTopPortion_Description", resourceCulture);
+      }
+    }
+
+    /// <summary>
+    ///   Looks up a localized string similar to The style of the document window..
+    /// </summary>
+    internal static string DockPanel_DocumentStyle_Description {
+      get {
+        return ResourceManager.GetString("DockPanel_DocumentStyle_Description", resourceCulture);
+      }
+    }
+
+    /// <summary>
+    ///   Looks up a localized string similar to Determines where the tab strip for Document style content is drawn..
+    /// </summary>
+    internal static string DockPanel_DocumentTabStripLocation {
+      get {
+        return ResourceManager.GetString("DockPanel_DocumentTabStripLocation", resourceCulture);
+      }
+    }
+
+    /// <summary>
+    ///   Looks up a localized string similar to The DockPanel has already been initialized..
+    /// </summary>
+    internal static string DockPanel_LoadFromXml_AlreadyInitialized {
+      get {
+        return ResourceManager.GetString("DockPanel_LoadFromXml_AlreadyInitialized", resourceCulture);
+      }
+    }
+
+    /// <summary>
+    ///   Looks up a localized string similar to The configuration file&apos;s version is invalid..
+    /// </summary>
+    internal static string DockPanel_LoadFromXml_InvalidFormatVersion {
+      get {
+        return ResourceManager.GetString("DockPanel_LoadFromXml_InvalidFormatVersion", resourceCulture);
+      }
+    }
+
+    /// <summary>
+    ///   Looks up a localized string similar to The XML file format is invalid..
+    /// </summary>
+    internal static string DockPanel_LoadFromXml_InvalidXmlFormat {
+      get {
+        return ResourceManager.GetString("DockPanel_LoadFromXml_InvalidXmlFormat", resourceCulture);
+      }
+    }
+
+    /// <summary>
+    ///   Looks up a localized string similar to Invalid parent form. When using DockingMdi or SystemMdi document style, the DockPanel control must be the child control of the main MDI container form..
+    /// </summary>
+    internal static string DockPanel_ParentForm_Invalid {
+      get {
+        return ResourceManager.GetString("DockPanel_ParentForm_Invalid", resourceCulture);
+      }
+    }
+
+    /// <summary>
+    ///   Looks up a localized string similar to DockPanel configuration file. Author: Weifen Luo, all rights reserved..
+    /// </summary>
+    internal static string DockPanel_Persistor_XmlFileComment1 {
+      get {
+        return ResourceManager.GetString("DockPanel_Persistor_XmlFileComment1", resourceCulture);
+      }
+    }
+
+    /// <summary>
+    ///   Looks up a localized string similar to !!! AUTOMATICALLY GENERATED FILE. DO NOT MODIFY !!!.
+    /// </summary>
+    internal static string DockPanel_Persistor_XmlFileComment2 {
+      get {
+        return ResourceManager.GetString("DockPanel_Persistor_XmlFileComment2", resourceCulture);
+      }
+    }
+
+    /// <summary>
+    ///   Looks up a localized string similar to Indicates whether the control layout is right-to-left when the RightToLeft property is set to Yes..
+    /// </summary>
+    internal static string DockPanel_RightToLeftLayout_Description {
+      get {
+        return ResourceManager.GetString("DockPanel_RightToLeftLayout_Description", resourceCulture);
+      }
+    }
+
+    /// <summary>
+    ///   Looks up a localized string similar to Invalid Index: The index is out of range..
+    /// </summary>
+    internal static string DockPanel_SetPaneIndex_InvalidIndex {
+      get {
+        return ResourceManager.GetString("DockPanel_SetPaneIndex_InvalidIndex", resourceCulture);
+      }
+    }
+
+    /// <summary>
+    ///   Looks up a localized string similar to Invalid Pane: DockPane not within the collection..
+    /// </summary>
+    internal static string DockPanel_SetPaneIndex_InvalidPane {
+      get {
+        return ResourceManager.GetString("DockPanel_SetPaneIndex_InvalidPane", resourceCulture);
+      }
+    }
+
+    /// <summary>
+    ///   Looks up a localized string similar to Determines if the document icon will be displayed in the tab strip..
+    /// </summary>
+    internal static string DockPanel_ShowDocumentIcon_Description {
+      get {
+        return ResourceManager.GetString("DockPanel_ShowDocumentIcon_Description", resourceCulture);
+      }
+    }
+
+    /// <summary>
+    ///   Looks up a localized string similar to Close.
+    /// </summary>
+    internal static string DockPaneStrip_ToolTipClose {
+      get {
+        return ResourceManager.GetString("DockPaneStrip_ToolTipClose", resourceCulture);
+      }
+    }
+
+    /// <summary>
+    ///   Looks up a localized string similar to Window List.
+    /// </summary>
+    internal static string DockPaneStrip_ToolTipWindowList {
+      get {
+        return ResourceManager.GetString("DockPaneStrip_ToolTipWindowList", resourceCulture);
+      }
+    }
+
+    /// <summary>
+    ///   Looks up a localized string similar to Invalid argument: DockPanel can not be &quot;null&quot;..
+    /// </summary>
+    internal static string FloatWindow_Constructor_NullDockPanel {
+      get {
+        return ResourceManager.GetString("FloatWindow_Constructor_NullDockPanel", resourceCulture);
+      }
+    }
+
+    /// <summary>
+    ///   Looks up a localized string similar to Invalid Index: The index is out of range..
+    /// </summary>
+    internal static string FloatWindow_SetPaneIndex_InvalidIndex {
+      get {
+        return ResourceManager.GetString("FloatWindow_SetPaneIndex_InvalidIndex", resourceCulture);
+      }
+    }
+
+    /// <summary>
+    ///   Looks up a localized string similar to Invalid Pane: DockPane not within the collection..
+    /// </summary>
+    internal static string FloatWindow_SetPaneIndex_InvalidPane {
+      get {
+        return ResourceManager.GetString("FloatWindow_SetPaneIndex_InvalidPane", resourceCulture);
+      }
+    }
+
+    /// <summary>
+    ///   Looks up a localized string similar to Invalid DockPanel..
+    /// </summary>
+    internal static string IDockDragSource_DockTo_InvalidPanel {
+      get {
+        return ResourceManager.GetString("IDockDragSource_DockTo_InvalidPanel", resourceCulture);
+      }
+    }
+  }
 }
Index: /trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.WinFormsUI/2.3.1/WinFormsUI-2.3.1/Docking/VS2005AutoHideStrip.cs
===================================================================
--- /trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.WinFormsUI/2.3.1/WinFormsUI-2.3.1/Docking/VS2005AutoHideStrip.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.WinFormsUI/2.3.1/WinFormsUI-2.3.1/Docking/VS2005AutoHideStrip.cs	(revision 4068)
@@ -1,505 +1,439 @@
 using System;
 using System.Drawing;
+using System.Drawing.Drawing2D;
 using System.Windows.Forms;
-using System.Drawing.Drawing2D;
-using System.ComponentModel;
-
-namespace WeifenLuo.WinFormsUI.Docking
-{
-	internal class VS2005AutoHideStrip : AutoHideStripBase
-	{
-        private class TabVS2005 : Tab
-        {
-            internal TabVS2005(IDockContent content)
-                : base(content)
-            {
-            }
-
-            private int m_tabX = 0;
-            public int TabX
-            {
-                get { return m_tabX; }
-                set { m_tabX = value; }
-            }
-
-            private int m_tabWidth = 0;
-            public int TabWidth
-            {
-                get { return m_tabWidth; }
-                set { m_tabWidth = value; }
-            }
-
+
+namespace WeifenLuo.WinFormsUI.Docking {
+  internal class VS2005AutoHideStrip : AutoHideStripBase {
+    private class TabVS2005 : Tab {
+      internal TabVS2005(IDockContent content)
+        : base(content) {
+      }
+
+      private int m_tabX = 0;
+      public int TabX {
+        get { return m_tabX; }
+        set { m_tabX = value; }
+      }
+
+      private int m_tabWidth = 0;
+      public int TabWidth {
+        get { return m_tabWidth; }
+        set { m_tabWidth = value; }
+      }
+
+    }
+
+    private const int _ImageHeight = 16;
+    private const int _ImageWidth = 16;
+    private const int _ImageGapTop = 2;
+    private const int _ImageGapLeft = 4;
+    private const int _ImageGapRight = 2;
+    private const int _ImageGapBottom = 2;
+    private const int _TextGapLeft = 0;
+    private const int _TextGapRight = 0;
+    private const int _TabGapTop = 3;
+    private const int _TabGapLeft = 4;
+    private const int _TabGapBetween = 10;
+
+    #region Customizable Properties
+    private static Font TextFont {
+      get { return SystemInformation.MenuFont; }
+    }
+
+    private static StringFormat _stringFormatTabHorizontal;
+    private StringFormat StringFormatTabHorizontal {
+      get {
+        if (_stringFormatTabHorizontal == null) {
+          _stringFormatTabHorizontal = new StringFormat();
+          _stringFormatTabHorizontal.Alignment = StringAlignment.Near;
+          _stringFormatTabHorizontal.LineAlignment = StringAlignment.Center;
+          _stringFormatTabHorizontal.FormatFlags = StringFormatFlags.NoWrap;
+          _stringFormatTabHorizontal.Trimming = StringTrimming.None;
         }
 
-		private const int _ImageHeight = 16;
-		private const int _ImageWidth = 16;
-		private const int _ImageGapTop = 2;
-		private const int _ImageGapLeft = 4;
-		private const int _ImageGapRight = 2;
-		private const int _ImageGapBottom = 2;
-		private const int _TextGapLeft = 0;
-		private const int _TextGapRight = 0;
-		private const int _TabGapTop = 3;
-		private const int _TabGapLeft = 4;
-		private const int _TabGapBetween = 10;
-
-		#region Customizable Properties
-        private static Font TextFont
-        {
-            get { return SystemInformation.MenuFont; }
+        if (RightToLeft == RightToLeft.Yes)
+          _stringFormatTabHorizontal.FormatFlags |= StringFormatFlags.DirectionRightToLeft;
+        else
+          _stringFormatTabHorizontal.FormatFlags &= ~StringFormatFlags.DirectionRightToLeft;
+
+        return _stringFormatTabHorizontal;
+      }
+    }
+
+    private static StringFormat _stringFormatTabVertical;
+    private StringFormat StringFormatTabVertical {
+      get {
+        if (_stringFormatTabVertical == null) {
+          _stringFormatTabVertical = new StringFormat();
+          _stringFormatTabVertical.Alignment = StringAlignment.Near;
+          _stringFormatTabVertical.LineAlignment = StringAlignment.Center;
+          _stringFormatTabVertical.FormatFlags = StringFormatFlags.NoWrap | StringFormatFlags.DirectionVertical;
+          _stringFormatTabVertical.Trimming = StringTrimming.None;
         }
-
-		private static StringFormat _stringFormatTabHorizontal;
-		private StringFormat StringFormatTabHorizontal
-		{
-			get
-			{
-				if (_stringFormatTabHorizontal == null)
-				{
-					_stringFormatTabHorizontal = new StringFormat();
-					_stringFormatTabHorizontal.Alignment = StringAlignment.Near;
-					_stringFormatTabHorizontal.LineAlignment = StringAlignment.Center;
-					_stringFormatTabHorizontal.FormatFlags = StringFormatFlags.NoWrap;
-				    _stringFormatTabHorizontal.Trimming = StringTrimming.None;
-				}
-
-                if (RightToLeft == RightToLeft.Yes)
-                    _stringFormatTabHorizontal.FormatFlags |= StringFormatFlags.DirectionRightToLeft;
-                else
-                    _stringFormatTabHorizontal.FormatFlags &= ~StringFormatFlags.DirectionRightToLeft;
-
-				return _stringFormatTabHorizontal;
-			}
-		}
-
-		private static StringFormat _stringFormatTabVertical;
-		private StringFormat StringFormatTabVertical
-		{
-			get
-			{	
-				if (_stringFormatTabVertical == null)
-				{
-					_stringFormatTabVertical = new StringFormat();
-					_stringFormatTabVertical.Alignment = StringAlignment.Near;
-					_stringFormatTabVertical.LineAlignment = StringAlignment.Center;
-					_stringFormatTabVertical.FormatFlags = StringFormatFlags.NoWrap | StringFormatFlags.DirectionVertical;
-				    _stringFormatTabVertical.Trimming = StringTrimming.None;
-				}
-                if (RightToLeft == RightToLeft.Yes)
-                    _stringFormatTabVertical.FormatFlags |= StringFormatFlags.DirectionRightToLeft;
-                else
-                    _stringFormatTabVertical.FormatFlags &= ~StringFormatFlags.DirectionRightToLeft;
-
-                return _stringFormatTabVertical;
-			}
-		}
-
-		private static int ImageHeight
-		{
-			get	{	return _ImageHeight;	}
-		}
-
-		private static int ImageWidth
-		{
-			get	{	return _ImageWidth;	}
-		}
-
-		private static int ImageGapTop
-		{
-			get	{	return _ImageGapTop;	}
-		}
-
-		private static int ImageGapLeft
-		{
-			get	{	return _ImageGapLeft;	}
-		}
-
-		private static int ImageGapRight
-		{
-			get	{	return _ImageGapRight;	}
-		}
-
-		private static int ImageGapBottom
-		{
-			get	{	return _ImageGapBottom;	}
-		}
-
-		private static int TextGapLeft
-		{
-			get	{	return _TextGapLeft;	}
-		}
-
-		private static int TextGapRight
-		{
-			get	{	return _TextGapRight;	}
-		}
-
-		private static int TabGapTop
-		{
-			get	{	return _TabGapTop;	}
-		}
-
-		private static int TabGapLeft
-		{
-			get	{	return _TabGapLeft;	}
-		}
-
-		private static int TabGapBetween
-		{
-			get	{	return _TabGapBetween;	}
-		}
-
-		private static Pen PenTabBorder
-		{
-			get	{	return SystemPens.GrayText;	}
-		}
-		#endregion
-
-        private static Matrix _matrixIdentity = new Matrix();
-        private static Matrix MatrixIdentity
-		{
-            get { return _matrixIdentity; }
-		}
-
-        private static DockState[] _dockStates;
-        private static DockState[] DockStates
-		{
-			get
-            {
-                if (_dockStates == null)
-                {
-                    _dockStates = new DockState[4];
-                    _dockStates[0] = DockState.DockLeftAutoHide;
-                    _dockStates[1] = DockState.DockRightAutoHide;
-                    _dockStates[2] = DockState.DockTopAutoHide;
-                    _dockStates[3] = DockState.DockBottomAutoHide;
-                }
-                return _dockStates;
-            }
-		}
-
-        private static GraphicsPath _graphicsPath;
-        internal static GraphicsPath GraphicsPath
-        {
-            get
-            {
-                if (_graphicsPath == null)
-                    _graphicsPath = new GraphicsPath();
-
-                return _graphicsPath;
-            }
+        if (RightToLeft == RightToLeft.Yes)
+          _stringFormatTabVertical.FormatFlags |= StringFormatFlags.DirectionRightToLeft;
+        else
+          _stringFormatTabVertical.FormatFlags &= ~StringFormatFlags.DirectionRightToLeft;
+
+        return _stringFormatTabVertical;
+      }
+    }
+
+    private static int ImageHeight {
+      get { return _ImageHeight; }
+    }
+
+    private static int ImageWidth {
+      get { return _ImageWidth; }
+    }
+
+    private static int ImageGapTop {
+      get { return _ImageGapTop; }
+    }
+
+    private static int ImageGapLeft {
+      get { return _ImageGapLeft; }
+    }
+
+    private static int ImageGapRight {
+      get { return _ImageGapRight; }
+    }
+
+    private static int ImageGapBottom {
+      get { return _ImageGapBottom; }
+    }
+
+    private static int TextGapLeft {
+      get { return _TextGapLeft; }
+    }
+
+    private static int TextGapRight {
+      get { return _TextGapRight; }
+    }
+
+    private static int TabGapTop {
+      get { return _TabGapTop; }
+    }
+
+    private static int TabGapLeft {
+      get { return _TabGapLeft; }
+    }
+
+    private static int TabGapBetween {
+      get { return _TabGapBetween; }
+    }
+
+    private static Pen PenTabBorder {
+      get { return SystemPens.GrayText; }
+    }
+    #endregion
+
+    private static Matrix _matrixIdentity = new Matrix();
+    private static Matrix MatrixIdentity {
+      get { return _matrixIdentity; }
+    }
+
+    private static DockState[] _dockStates;
+    private static DockState[] DockStates {
+      get {
+        if (_dockStates == null) {
+          _dockStates = new DockState[4];
+          _dockStates[0] = DockState.DockLeftAutoHide;
+          _dockStates[1] = DockState.DockRightAutoHide;
+          _dockStates[2] = DockState.DockTopAutoHide;
+          _dockStates[3] = DockState.DockBottomAutoHide;
         }
-
-		public VS2005AutoHideStrip(DockPanel panel) : base(panel)
-		{
-			SetStyle(ControlStyles.ResizeRedraw | 
+        return _dockStates;
+      }
+    }
+
+    private static GraphicsPath _graphicsPath;
+    internal static GraphicsPath GraphicsPath {
+      get {
+        if (_graphicsPath == null)
+          _graphicsPath = new GraphicsPath();
+
+        return _graphicsPath;
+      }
+    }
+
+    public VS2005AutoHideStrip(DockPanel panel)
+      : base(panel) {
+      SetStyle(ControlStyles.ResizeRedraw |
                 ControlStyles.UserPaint |
                 ControlStyles.AllPaintingInWmPaint |
                 ControlStyles.OptimizedDoubleBuffer, true);
-            BackColor = SystemColors.ControlLight;
-		}
-
-		protected override void OnPaint(PaintEventArgs e)
-		{
-			Graphics g = e.Graphics;
-            
-            Color startColor = DockPanel.Skin.AutoHideStripSkin.DockStripGradient.StartColor;
-            Color endColor = DockPanel.Skin.AutoHideStripSkin.DockStripGradient.EndColor;
-            LinearGradientMode gradientMode = DockPanel.Skin.AutoHideStripSkin.DockStripGradient.LinearGradientMode;
-            using (LinearGradientBrush brush = new LinearGradientBrush(ClientRectangle, startColor, endColor, gradientMode))
-            {
-                g.FillRectangle(brush, ClientRectangle);
-            }
-			
-            DrawTabStrip(g);
-		}
-
-		protected override void OnLayout(LayoutEventArgs levent)
-		{
-			CalculateTabs();
-			base.OnLayout (levent);
-		}
-
-		private void DrawTabStrip(Graphics g)
-		{
-			DrawTabStrip(g, DockState.DockTopAutoHide);
-			DrawTabStrip(g, DockState.DockBottomAutoHide);
-			DrawTabStrip(g, DockState.DockLeftAutoHide);
-			DrawTabStrip(g, DockState.DockRightAutoHide);
-		}
-
-		private void DrawTabStrip(Graphics g, DockState dockState)
-		{
-			Rectangle rectTabStrip = GetLogicalTabStripRectangle(dockState);
-
-			if (rectTabStrip.IsEmpty)
-				return;
-
-            Matrix matrixIdentity = g.Transform;
-            if (dockState == DockState.DockLeftAutoHide || dockState == DockState.DockRightAutoHide)
-			{
-				Matrix matrixRotated = new Matrix();
-				matrixRotated.RotateAt(90, new PointF((float)rectTabStrip.X + (float)rectTabStrip.Height / 2,
-					(float)rectTabStrip.Y + (float)rectTabStrip.Height / 2));
-				g.Transform = matrixRotated;
-			}
-
-			foreach (Pane pane in GetPanes(dockState))
-			{
-				foreach (TabVS2005 tab in pane.AutoHideTabs)
-					DrawTab(g, tab);
-			}
-			g.Transform = matrixIdentity;
-		}
-
-		private void CalculateTabs()
-		{
-			CalculateTabs(DockState.DockTopAutoHide);
-			CalculateTabs(DockState.DockBottomAutoHide);
-			CalculateTabs(DockState.DockLeftAutoHide);
-			CalculateTabs(DockState.DockRightAutoHide);
-		}
-
-        private void CalculateTabs(DockState dockState)
-        {
-            Rectangle rectTabStrip = GetLogicalTabStripRectangle(dockState);
-
-            int imageHeight = rectTabStrip.Height - ImageGapTop - ImageGapBottom;
-            int imageWidth = ImageWidth;
-            if (imageHeight > ImageHeight)
-                imageWidth = ImageWidth * (imageHeight / ImageHeight);
-
-            int x = TabGapLeft + rectTabStrip.X;
-            foreach (Pane pane in GetPanes(dockState))
-            {
-                foreach (TabVS2005 tab in pane.AutoHideTabs)
-                {
-                    int width = imageWidth + ImageGapLeft + ImageGapRight +
-                        TextRenderer.MeasureText(tab.Content.DockHandler.TabText, TextFont).Width +
-                        TextGapLeft + TextGapRight;
-                    tab.TabX = x;
-                    tab.TabWidth = width;
-                    x += width;
-                }
-
-                x += TabGapBetween;
-            }
+      BackColor = SystemColors.ControlLight;
+    }
+
+    protected override void OnPaint(PaintEventArgs e) {
+      Graphics g = e.Graphics;
+
+      Color startColor = DockPanel.Skin.AutoHideStripSkin.DockStripGradient.StartColor;
+      Color endColor = DockPanel.Skin.AutoHideStripSkin.DockStripGradient.EndColor;
+      LinearGradientMode gradientMode = DockPanel.Skin.AutoHideStripSkin.DockStripGradient.LinearGradientMode;
+      using (LinearGradientBrush brush = new LinearGradientBrush(ClientRectangle, startColor, endColor, gradientMode)) {
+        g.FillRectangle(brush, ClientRectangle);
+      }
+
+      DrawTabStrip(g);
+    }
+
+    protected override void OnLayout(LayoutEventArgs levent) {
+      CalculateTabs();
+      base.OnLayout(levent);
+    }
+
+    private void DrawTabStrip(Graphics g) {
+      DrawTabStrip(g, DockState.DockTopAutoHide);
+      DrawTabStrip(g, DockState.DockBottomAutoHide);
+      DrawTabStrip(g, DockState.DockLeftAutoHide);
+      DrawTabStrip(g, DockState.DockRightAutoHide);
+    }
+
+    private void DrawTabStrip(Graphics g, DockState dockState) {
+      Rectangle rectTabStrip = GetLogicalTabStripRectangle(dockState);
+
+      if (rectTabStrip.IsEmpty)
+        return;
+
+      Matrix matrixIdentity = g.Transform;
+      if (dockState == DockState.DockLeftAutoHide || dockState == DockState.DockRightAutoHide) {
+        Matrix matrixRotated = new Matrix();
+        matrixRotated.RotateAt(90, new PointF((float)rectTabStrip.X + (float)rectTabStrip.Height / 2,
+          (float)rectTabStrip.Y + (float)rectTabStrip.Height / 2));
+        g.Transform = matrixRotated;
+      }
+
+      foreach (Pane pane in GetPanes(dockState)) {
+        foreach (TabVS2005 tab in pane.AutoHideTabs)
+          DrawTab(g, tab);
+      }
+      g.Transform = matrixIdentity;
+    }
+
+    private void CalculateTabs() {
+      CalculateTabs(DockState.DockTopAutoHide);
+      CalculateTabs(DockState.DockBottomAutoHide);
+      CalculateTabs(DockState.DockLeftAutoHide);
+      CalculateTabs(DockState.DockRightAutoHide);
+    }
+
+    private void CalculateTabs(DockState dockState) {
+      Rectangle rectTabStrip = GetLogicalTabStripRectangle(dockState);
+
+      int imageHeight = rectTabStrip.Height - ImageGapTop - ImageGapBottom;
+      int imageWidth = ImageWidth;
+      if (imageHeight > ImageHeight)
+        imageWidth = ImageWidth * (imageHeight / ImageHeight);
+
+      int x = TabGapLeft + rectTabStrip.X;
+      foreach (Pane pane in GetPanes(dockState)) {
+        foreach (TabVS2005 tab in pane.AutoHideTabs) {
+          int width = imageWidth + ImageGapLeft + ImageGapRight +
+              TextRenderer.MeasureText(tab.Content.DockHandler.TabText, TextFont).Width +
+              TextGapLeft + TextGapRight;
+          tab.TabX = x;
+          tab.TabWidth = width;
+          x += width;
         }
 
-        private Rectangle RtlTransform(Rectangle rect, DockState dockState)
-        {
-            Rectangle rectTransformed;
-            if (dockState == DockState.DockLeftAutoHide || dockState == DockState.DockRightAutoHide)
-                rectTransformed = rect;
-            else
-                rectTransformed = DrawHelper.RtlTransform(this, rect);
-
-            return rectTransformed;
+        x += TabGapBetween;
+      }
+    }
+
+    private Rectangle RtlTransform(Rectangle rect, DockState dockState) {
+      Rectangle rectTransformed;
+      if (dockState == DockState.DockLeftAutoHide || dockState == DockState.DockRightAutoHide)
+        rectTransformed = rect;
+      else
+        rectTransformed = DrawHelper.RtlTransform(this, rect);
+
+      return rectTransformed;
+    }
+
+    private GraphicsPath GetTabOutline(TabVS2005 tab, bool transformed, bool rtlTransform) {
+      DockState dockState = tab.Content.DockHandler.DockState;
+      Rectangle rectTab = GetTabRectangle(tab, transformed);
+      if (rtlTransform)
+        rectTab = RtlTransform(rectTab, dockState);
+      bool upTab = (dockState == DockState.DockLeftAutoHide || dockState == DockState.DockBottomAutoHide);
+      DrawHelper.GetRoundedCornerTab(GraphicsPath, rectTab, upTab);
+
+      return GraphicsPath;
+    }
+
+    private void DrawTab(Graphics g, TabVS2005 tab) {
+      Rectangle rectTabOrigin = GetTabRectangle(tab);
+      if (rectTabOrigin.IsEmpty)
+        return;
+
+      DockState dockState = tab.Content.DockHandler.DockState;
+      IDockContent content = tab.Content;
+
+      GraphicsPath path = GetTabOutline(tab, false, true);
+
+      Color startColor = DockPanel.Skin.AutoHideStripSkin.TabGradient.StartColor;
+      Color endColor = DockPanel.Skin.AutoHideStripSkin.TabGradient.EndColor;
+      LinearGradientMode gradientMode = DockPanel.Skin.AutoHideStripSkin.TabGradient.LinearGradientMode;
+      g.FillPath(new LinearGradientBrush(rectTabOrigin, startColor, endColor, gradientMode), path);
+      g.DrawPath(PenTabBorder, path);
+
+      // Set no rotate for drawing icon and text
+      Matrix matrixRotate = g.Transform;
+      g.Transform = MatrixIdentity;
+
+      // Draw the icon
+      Rectangle rectImage = rectTabOrigin;
+      rectImage.X += ImageGapLeft;
+      rectImage.Y += ImageGapTop;
+      int imageHeight = rectTabOrigin.Height - ImageGapTop - ImageGapBottom;
+      int imageWidth = ImageWidth;
+      if (imageHeight > ImageHeight)
+        imageWidth = ImageWidth * (imageHeight / ImageHeight);
+      rectImage.Height = imageHeight;
+      rectImage.Width = imageWidth;
+      rectImage = GetTransformedRectangle(dockState, rectImage);
+      g.DrawIcon(((Form)content).Icon, RtlTransform(rectImage, dockState));
+
+      // Draw the text
+      Rectangle rectText = rectTabOrigin;
+      rectText.X += ImageGapLeft + imageWidth + ImageGapRight + TextGapLeft;
+      rectText.Width -= ImageGapLeft + imageWidth + ImageGapRight + TextGapLeft;
+      rectText = RtlTransform(GetTransformedRectangle(dockState, rectText), dockState);
+
+      Color textColor = DockPanel.Skin.AutoHideStripSkin.TabGradient.TextColor;
+
+      if (dockState == DockState.DockLeftAutoHide || dockState == DockState.DockRightAutoHide)
+        g.DrawString(content.DockHandler.TabText, TextFont, new SolidBrush(textColor), rectText, StringFormatTabVertical);
+      else
+        g.DrawString(content.DockHandler.TabText, TextFont, new SolidBrush(textColor), rectText, StringFormatTabHorizontal);
+
+      // Set rotate back
+      g.Transform = matrixRotate;
+    }
+
+    private Rectangle GetLogicalTabStripRectangle(DockState dockState) {
+      return GetLogicalTabStripRectangle(dockState, false);
+    }
+
+    private Rectangle GetLogicalTabStripRectangle(DockState dockState, bool transformed) {
+      if (!DockHelper.IsDockStateAutoHide(dockState))
+        return Rectangle.Empty;
+
+      int leftPanes = GetPanes(DockState.DockLeftAutoHide).Count;
+      int rightPanes = GetPanes(DockState.DockRightAutoHide).Count;
+      int topPanes = GetPanes(DockState.DockTopAutoHide).Count;
+      int bottomPanes = GetPanes(DockState.DockBottomAutoHide).Count;
+
+      int x, y, width, height;
+
+      height = MeasureHeight();
+      if (dockState == DockState.DockLeftAutoHide && leftPanes > 0) {
+        x = 0;
+        y = (topPanes == 0) ? 0 : height;
+        width = Height - (topPanes == 0 ? 0 : height) - (bottomPanes == 0 ? 0 : height);
+      } else if (dockState == DockState.DockRightAutoHide && rightPanes > 0) {
+        x = Width - height;
+        if (leftPanes != 0 && x < height)
+          x = height;
+        y = (topPanes == 0) ? 0 : height;
+        width = Height - (topPanes == 0 ? 0 : height) - (bottomPanes == 0 ? 0 : height);
+      } else if (dockState == DockState.DockTopAutoHide && topPanes > 0) {
+        x = leftPanes == 0 ? 0 : height;
+        y = 0;
+        width = Width - (leftPanes == 0 ? 0 : height) - (rightPanes == 0 ? 0 : height);
+      } else if (dockState == DockState.DockBottomAutoHide && bottomPanes > 0) {
+        x = leftPanes == 0 ? 0 : height;
+        y = Height - height;
+        if (topPanes != 0 && y < height)
+          y = height;
+        width = Width - (leftPanes == 0 ? 0 : height) - (rightPanes == 0 ? 0 : height);
+      } else
+        return Rectangle.Empty;
+
+      if (!transformed)
+        return new Rectangle(x, y, width, height);
+      else
+        return GetTransformedRectangle(dockState, new Rectangle(x, y, width, height));
+    }
+
+    private Rectangle GetTabRectangle(TabVS2005 tab) {
+      return GetTabRectangle(tab, false);
+    }
+
+    private Rectangle GetTabRectangle(TabVS2005 tab, bool transformed) {
+      DockState dockState = tab.Content.DockHandler.DockState;
+      Rectangle rectTabStrip = GetLogicalTabStripRectangle(dockState);
+
+      if (rectTabStrip.IsEmpty)
+        return Rectangle.Empty;
+
+      int x = tab.TabX;
+      int y = rectTabStrip.Y +
+        (dockState == DockState.DockTopAutoHide || dockState == DockState.DockRightAutoHide ?
+        0 : TabGapTop);
+      int width = tab.TabWidth;
+      int height = rectTabStrip.Height - TabGapTop;
+
+      if (!transformed)
+        return new Rectangle(x, y, width, height);
+      else
+        return GetTransformedRectangle(dockState, new Rectangle(x, y, width, height));
+    }
+
+    private Rectangle GetTransformedRectangle(DockState dockState, Rectangle rect) {
+      if (dockState != DockState.DockLeftAutoHide && dockState != DockState.DockRightAutoHide)
+        return rect;
+
+      PointF[] pts = new PointF[1];
+      // the center of the rectangle
+      pts[0].X = (float)rect.X + (float)rect.Width / 2;
+      pts[0].Y = (float)rect.Y + (float)rect.Height / 2;
+      Rectangle rectTabStrip = GetLogicalTabStripRectangle(dockState);
+      Matrix matrix = new Matrix();
+      matrix.RotateAt(90, new PointF((float)rectTabStrip.X + (float)rectTabStrip.Height / 2,
+        (float)rectTabStrip.Y + (float)rectTabStrip.Height / 2));
+      matrix.TransformPoints(pts);
+
+      return new Rectangle((int)(pts[0].X - (float)rect.Height / 2 + .5F),
+        (int)(pts[0].Y - (float)rect.Width / 2 + .5F),
+        rect.Height, rect.Width);
+    }
+
+    protected override IDockContent HitTest(Point ptMouse) {
+      foreach (DockState state in DockStates) {
+        Rectangle rectTabStrip = GetLogicalTabStripRectangle(state, true);
+        if (!rectTabStrip.Contains(ptMouse))
+          continue;
+
+        foreach (Pane pane in GetPanes(state)) {
+          DockState dockState = pane.DockPane.DockState;
+          foreach (TabVS2005 tab in pane.AutoHideTabs) {
+            GraphicsPath path = GetTabOutline(tab, true, true);
+            if (path.IsVisible(ptMouse))
+              return tab.Content;
+          }
         }
-
-        private GraphicsPath GetTabOutline(TabVS2005 tab, bool transformed, bool rtlTransform)
-        {
-            DockState dockState = tab.Content.DockHandler.DockState;
-            Rectangle rectTab = GetTabRectangle(tab, transformed);
-            if (rtlTransform)
-                rectTab = RtlTransform(rectTab, dockState);
-            bool upTab = (dockState == DockState.DockLeftAutoHide || dockState == DockState.DockBottomAutoHide);
-            DrawHelper.GetRoundedCornerTab(GraphicsPath, rectTab, upTab);
-
-            return GraphicsPath;
-        }
-
-		private void DrawTab(Graphics g, TabVS2005 tab)
-		{
-			Rectangle rectTabOrigin = GetTabRectangle(tab);
-			if (rectTabOrigin.IsEmpty)
-				return;
-
-			DockState dockState = tab.Content.DockHandler.DockState;
-			IDockContent content = tab.Content;
-
-            GraphicsPath path = GetTabOutline(tab, false, true);
-
-            Color startColor = DockPanel.Skin.AutoHideStripSkin.TabGradient.StartColor;
-            Color endColor = DockPanel.Skin.AutoHideStripSkin.TabGradient.EndColor;
-            LinearGradientMode gradientMode = DockPanel.Skin.AutoHideStripSkin.TabGradient.LinearGradientMode;
-            g.FillPath(new LinearGradientBrush(rectTabOrigin, startColor, endColor, gradientMode), path);
-            g.DrawPath(PenTabBorder, path);
-
-            // Set no rotate for drawing icon and text
-			Matrix matrixRotate = g.Transform;
-			g.Transform = MatrixIdentity;
-
-			// Draw the icon
-			Rectangle rectImage = rectTabOrigin;
-			rectImage.X += ImageGapLeft;
-			rectImage.Y += ImageGapTop;
-			int imageHeight = rectTabOrigin.Height - ImageGapTop - ImageGapBottom;
-			int imageWidth = ImageWidth;
-			if (imageHeight > ImageHeight)
-				imageWidth = ImageWidth * (imageHeight/ImageHeight);
-			rectImage.Height = imageHeight;
-			rectImage.Width = imageWidth;
-			rectImage = GetTransformedRectangle(dockState, rectImage);
-			g.DrawIcon(((Form)content).Icon, RtlTransform(rectImage, dockState));
-
-			// Draw the text
-			Rectangle rectText = rectTabOrigin;
-			rectText.X += ImageGapLeft + imageWidth + ImageGapRight + TextGapLeft;
-			rectText.Width -= ImageGapLeft + imageWidth + ImageGapRight + TextGapLeft;
-			rectText = RtlTransform(GetTransformedRectangle(dockState, rectText), dockState);
-
-            Color textColor = DockPanel.Skin.AutoHideStripSkin.TabGradient.TextColor;
-            
-			if (dockState == DockState.DockLeftAutoHide || dockState == DockState.DockRightAutoHide)
-				g.DrawString(content.DockHandler.TabText, TextFont, new SolidBrush(textColor), rectText, StringFormatTabVertical);
-			else
-                g.DrawString(content.DockHandler.TabText, TextFont, new SolidBrush(textColor), rectText, StringFormatTabHorizontal);
-
-			// Set rotate back
-			g.Transform = matrixRotate;
-		}
-
-		private Rectangle GetLogicalTabStripRectangle(DockState dockState)
-		{
-			return GetLogicalTabStripRectangle(dockState, false);
-		}
-
-		private Rectangle GetLogicalTabStripRectangle(DockState dockState, bool transformed)
-		{
-			if (!DockHelper.IsDockStateAutoHide(dockState))
-				return Rectangle.Empty;
-
-			int leftPanes = GetPanes(DockState.DockLeftAutoHide).Count;
-			int rightPanes = GetPanes(DockState.DockRightAutoHide).Count;
-			int topPanes = GetPanes(DockState.DockTopAutoHide).Count;
-			int bottomPanes = GetPanes(DockState.DockBottomAutoHide).Count;
-
-			int x, y, width, height;
-
-			height = MeasureHeight();
-			if (dockState == DockState.DockLeftAutoHide && leftPanes > 0)
-			{
-				x = 0;
-				y = (topPanes == 0) ? 0 : height;
-				width = Height - (topPanes == 0 ? 0 : height) - (bottomPanes == 0 ? 0 :height);
-			}
-			else if (dockState == DockState.DockRightAutoHide && rightPanes > 0)
-			{
-				x = Width - height;
-				if (leftPanes != 0 && x < height)
-					x = height;
-				y = (topPanes == 0) ? 0 : height;
-				width = Height - (topPanes == 0 ? 0 : height) - (bottomPanes == 0 ? 0 :height);
-			}
-			else if (dockState == DockState.DockTopAutoHide && topPanes > 0)
-			{
-				x = leftPanes == 0 ? 0 : height;
-				y = 0;
-				width = Width - (leftPanes == 0 ? 0 : height) - (rightPanes == 0 ? 0 : height);
-			}
-			else if (dockState == DockState.DockBottomAutoHide && bottomPanes > 0)
-			{
-				x = leftPanes == 0 ? 0 : height;
-				y = Height - height;
-				if (topPanes != 0 && y < height)
-					y = height;
-				width = Width - (leftPanes == 0 ? 0 : height) - (rightPanes == 0 ? 0 : height);
-			}
-			else
-				return Rectangle.Empty;
-
-			if (!transformed)
-				return new Rectangle(x, y, width, height);
-			else
-				return GetTransformedRectangle(dockState, new Rectangle(x, y, width, height));
-		}
-
-		private Rectangle GetTabRectangle(TabVS2005 tab)
-		{
-			return GetTabRectangle(tab, false);
-		}
-
-		private Rectangle GetTabRectangle(TabVS2005 tab, bool transformed)
-		{
-			DockState dockState = tab.Content.DockHandler.DockState;
-			Rectangle rectTabStrip = GetLogicalTabStripRectangle(dockState);
-
-			if (rectTabStrip.IsEmpty)
-				return Rectangle.Empty;
-
-			int x = tab.TabX;
-			int y = rectTabStrip.Y + 
-				(dockState == DockState.DockTopAutoHide || dockState == DockState.DockRightAutoHide ?
-				0 : TabGapTop);
-			int width = tab.TabWidth;
-			int height = rectTabStrip.Height - TabGapTop;
-
-			if (!transformed)
-				return new Rectangle(x, y, width, height);
-			else
-				return GetTransformedRectangle(dockState, new Rectangle(x, y, width, height));
-		}
-
-		private Rectangle GetTransformedRectangle(DockState dockState, Rectangle rect)
-		{
-			if (dockState != DockState.DockLeftAutoHide && dockState != DockState.DockRightAutoHide)
-				return rect;
-
-			PointF[] pts = new PointF[1];
-			// the center of the rectangle
-			pts[0].X = (float)rect.X + (float)rect.Width / 2;
-			pts[0].Y = (float)rect.Y + (float)rect.Height / 2;
-			Rectangle rectTabStrip = GetLogicalTabStripRectangle(dockState);
-			Matrix matrix = new Matrix();
-			matrix.RotateAt(90, new PointF((float)rectTabStrip.X + (float)rectTabStrip.Height / 2,
-				(float)rectTabStrip.Y + (float)rectTabStrip.Height / 2));
-			matrix.TransformPoints(pts);
-
-			return new Rectangle((int)(pts[0].X - (float)rect.Height / 2 + .5F),
-				(int)(pts[0].Y - (float)rect.Width / 2 + .5F),
-				rect.Height, rect.Width);
-		}
-
-		protected override IDockContent HitTest(Point ptMouse)
-		{
-			foreach(DockState state in DockStates)
-			{
-				Rectangle rectTabStrip = GetLogicalTabStripRectangle(state, true);
-				if (!rectTabStrip.Contains(ptMouse))
-					continue;
-
-				foreach(Pane pane in GetPanes(state))
-				{
-                    DockState dockState = pane.DockPane.DockState;
-					foreach(TabVS2005 tab in pane.AutoHideTabs)
-					{
-                        GraphicsPath path = GetTabOutline(tab, true, true);
-                        if (path.IsVisible(ptMouse))
-							return tab.Content;
-					}
-				}
-			}
-			
-			return null;
-		}
-
-		protected internal override int MeasureHeight()
-		{
-			return Math.Max(ImageGapBottom +
-				ImageGapTop + ImageHeight,
-				TextFont.Height) + TabGapTop;
-		}
-
-		protected override void OnRefreshChanges()
-		{
-			CalculateTabs();
-			Invalidate();
-		}
-
-        protected override AutoHideStripBase.Tab CreateTab(IDockContent content)
-        {
-            return new TabVS2005(content);
-        }
-	}
+      }
+
+      return null;
+    }
+
+    protected internal override int MeasureHeight() {
+      return Math.Max(ImageGapBottom +
+        ImageGapTop + ImageHeight,
+        TextFont.Height) + TabGapTop;
+    }
+
+    protected override void OnRefreshChanges() {
+      CalculateTabs();
+      Invalidate();
+    }
+
+    protected override AutoHideStripBase.Tab CreateTab(IDockContent content) {
+      return new TabVS2005(content);
+    }
+  }
 }
Index: /trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.WinFormsUI/2.3.1/WinFormsUI-2.3.1/Docking/VS2005DockPaneCaption.cs
===================================================================
--- /trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.WinFormsUI/2.3.1/WinFormsUI-2.3.1/Docking/VS2005DockPaneCaption.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.WinFormsUI/2.3.1/WinFormsUI-2.3.1/Docking/VS2005DockPaneCaption.cs	(revision 4068)
@@ -1,478 +1,405 @@
 using System;
+using System.ComponentModel;
 using System.Drawing;
 using System.Drawing.Drawing2D;
 using System.Windows.Forms;
-using System.ComponentModel;
-using System.Windows.Forms.VisualStyles;
-
-namespace WeifenLuo.WinFormsUI.Docking
-{
-	internal class VS2005DockPaneCaption : DockPaneCaptionBase
-	{
-        private sealed class InertButton : InertButtonBase
-        {
-            private Bitmap m_image, m_imageAutoHide;
-
-            public InertButton(VS2005DockPaneCaption dockPaneCaption, Bitmap image, Bitmap imageAutoHide)
-                : base()
-            {
-                m_dockPaneCaption = dockPaneCaption;
-                m_image = image;
-                m_imageAutoHide = imageAutoHide;
-                RefreshChanges();
-            }
-
-            private VS2005DockPaneCaption m_dockPaneCaption;
-            private VS2005DockPaneCaption DockPaneCaption
-            {
-                get { return m_dockPaneCaption; }
-            }
-
-            public bool IsAutoHide
-            {
-                get { return DockPaneCaption.DockPane.IsAutoHide; }
-            }
-
-            public override Bitmap Image
-            {
-                get { return IsAutoHide ? m_imageAutoHide : m_image; }
-            }
-
-            protected override void OnRefreshChanges()
-            {
-                if (DockPaneCaption.DockPane.DockPanel != null)
-                {
-                    if (DockPaneCaption.TextColor != ForeColor)
-                    {
-                        ForeColor = DockPaneCaption.TextColor;
-                        Invalidate();
-                    }
-                }
-            }
-        }
-
-		#region consts
-		private const int _TextGapTop = 2;
-		private const int _TextGapBottom = 0;
-		private const int _TextGapLeft = 3;
-		private const int _TextGapRight = 3;
-		private const int _ButtonGapTop = 2;
-		private const int _ButtonGapBottom = 1;
-		private const int _ButtonGapBetween = 1;
-		private const int _ButtonGapLeft = 1;
-		private const int _ButtonGapRight = 2;
-		#endregion
-
-        private static Bitmap _imageButtonClose;
-        private static Bitmap ImageButtonClose
-        {
-            get
-            {
-                if (_imageButtonClose == null)
-                    _imageButtonClose = Resources.DockPane_Close;
-
-                return _imageButtonClose;
-            }
-        }
-
-		private InertButton m_buttonClose;
-        private InertButton ButtonClose
-        {
-            get
-            {
-                if (m_buttonClose == null)
-                {
-                    m_buttonClose = new InertButton(this, ImageButtonClose, ImageButtonClose);
-                    m_toolTip.SetToolTip(m_buttonClose, ToolTipClose);
-                    m_buttonClose.Click += new EventHandler(Close_Click);
-                    Controls.Add(m_buttonClose);
-                }
-
-                return m_buttonClose;
-            }
-        }
-
-        private static Bitmap _imageButtonAutoHide;
-        private static Bitmap ImageButtonAutoHide
-        {
-            get
-            {
-                if (_imageButtonAutoHide == null)
-                    _imageButtonAutoHide = Resources.DockPane_AutoHide;
-
-                return _imageButtonAutoHide;
-            }
-        }
-
-        private static Bitmap _imageButtonDock;
-        private static Bitmap ImageButtonDock
-        {
-            get
-            {
-                if (_imageButtonDock == null)
-                    _imageButtonDock = Resources.DockPane_Dock;
-
-                return _imageButtonDock;
-            }
-        }
-
-        private InertButton m_buttonAutoHide;
-        private InertButton ButtonAutoHide
-        {
-            get
-            {
-                if (m_buttonAutoHide == null)
-                {
-                    m_buttonAutoHide = new InertButton(this, ImageButtonDock, ImageButtonAutoHide);
-                    m_toolTip.SetToolTip(m_buttonAutoHide, ToolTipAutoHide);
-                    m_buttonAutoHide.Click += new EventHandler(AutoHide_Click);
-                    Controls.Add(m_buttonAutoHide);
-                }
-
-                return m_buttonAutoHide;
-            }
-        }
-
-        private static Bitmap _imageButtonOptions;
-        private static Bitmap ImageButtonOptions
-        {
-            get
-            {
-                if (_imageButtonOptions == null)
-                    _imageButtonOptions = Resources.DockPane_Option;
-
-                return _imageButtonOptions;
-            }
-        }
-
-        private InertButton m_buttonOptions;
-        private InertButton ButtonOptions
-        {
-            get
-            {
-                if (m_buttonOptions == null)
-                {
-                    m_buttonOptions = new InertButton(this, ImageButtonOptions, ImageButtonOptions);
-                    m_toolTip.SetToolTip(m_buttonOptions, ToolTipOptions);
-                    m_buttonOptions.Click += new EventHandler(Options_Click);
-                    Controls.Add(m_buttonOptions);
-                }
-                return m_buttonOptions;
-            }
-        }
-
-        private IContainer m_components;
-        private IContainer Components
-        {
-            get { return m_components; }
-        }
-
-		private ToolTip m_toolTip;
-
-		public VS2005DockPaneCaption(DockPane pane) : base(pane)
-		{
-			SuspendLayout();
-
-            m_components = new Container();
-            m_toolTip = new ToolTip(Components);
-
-			ResumeLayout();
-		}
-
-        protected override void Dispose(bool disposing)
-        {
-            if (disposing)
-                Components.Dispose();
-            base.Dispose(disposing);
-        }
-
-		private static int TextGapTop
-		{
-			get	{	return _TextGapTop;	}
-		}
-
-        private static Font TextFont
-        {
-            get { return SystemInformation.MenuFont; }
-        }
-
-		private static int TextGapBottom
-		{
-			get	{	return _TextGapBottom;	}
-		}
-
-		private static int TextGapLeft
-		{
-			get	{	return _TextGapLeft;	}
-		}
-
-		private static int TextGapRight
-		{
-			get	{	return _TextGapRight;	}
-		}
-
-		private static int ButtonGapTop
-		{
-			get	{	return _ButtonGapTop;	}
-		}
-
-		private static int ButtonGapBottom
-		{
-			get	{	return _ButtonGapBottom;	}
-		}
-
-		private static int ButtonGapLeft
-		{
-			get	{	return _ButtonGapLeft;	}
-		}
-
-		private static int ButtonGapRight
-		{
-			get	{	return _ButtonGapRight;	}
-		}
-
-		private static int ButtonGapBetween
-		{
-			get	{	return _ButtonGapBetween;	}
-		}
-
-		private static string _toolTipClose;
-		private static string ToolTipClose
-		{
-			get
-			{	
-				if (_toolTipClose == null)
-					_toolTipClose = Strings.DockPaneCaption_ToolTipClose;
-				return _toolTipClose;
-			}
-		}
-
-        private static string _toolTipOptions;
-        private static string ToolTipOptions
-        {
-            get
-            {
-                if (_toolTipOptions == null)
-                    _toolTipOptions = Strings.DockPaneCaption_ToolTipOptions;
-
-                return _toolTipOptions;
-            }
-        }
-
-		private static string _toolTipAutoHide;
-		private static string ToolTipAutoHide
-		{
-			get
-			{	
-				if (_toolTipAutoHide == null)
-					_toolTipAutoHide = Strings.DockPaneCaption_ToolTipAutoHide;
-				return _toolTipAutoHide;
-			}
-		}
-
-        private static Blend _activeBackColorGradientBlend;
-        private static Blend ActiveBackColorGradientBlend
-        {
-            get
-            {
-                if (_activeBackColorGradientBlend == null)
-                {
-                    Blend blend = new Blend(2);
-
-                    blend.Factors = new float[]{0.5F, 1.0F};
-                    blend.Positions = new float[]{0.0F, 1.0F};
-                    _activeBackColorGradientBlend = blend;
-                }
-
-                return _activeBackColorGradientBlend;
-            }
-        }
-
-        private Color TextColor
-        {
-            get
-            {
-                if (DockPane.IsActivated)
-                    return DockPane.DockPanel.Skin.DockPaneStripSkin.ToolWindowGradient.ActiveCaptionGradient.TextColor;
-                else
-                    return DockPane.DockPanel.Skin.DockPaneStripSkin.ToolWindowGradient.InactiveCaptionGradient.TextColor;
-            }
-        }
-
-		private static TextFormatFlags _textFormat =
+
+namespace WeifenLuo.WinFormsUI.Docking {
+  internal class VS2005DockPaneCaption : DockPaneCaptionBase {
+    private sealed class InertButton : InertButtonBase {
+      private Bitmap m_image, m_imageAutoHide;
+
+      public InertButton(VS2005DockPaneCaption dockPaneCaption, Bitmap image, Bitmap imageAutoHide)
+        : base() {
+        m_dockPaneCaption = dockPaneCaption;
+        m_image = image;
+        m_imageAutoHide = imageAutoHide;
+        RefreshChanges();
+      }
+
+      private VS2005DockPaneCaption m_dockPaneCaption;
+      private VS2005DockPaneCaption DockPaneCaption {
+        get { return m_dockPaneCaption; }
+      }
+
+      public bool IsAutoHide {
+        get { return DockPaneCaption.DockPane.IsAutoHide; }
+      }
+
+      public override Bitmap Image {
+        get { return IsAutoHide ? m_imageAutoHide : m_image; }
+      }
+
+      protected override void OnRefreshChanges() {
+        if (DockPaneCaption.DockPane.DockPanel != null) {
+          if (DockPaneCaption.TextColor != ForeColor) {
+            ForeColor = DockPaneCaption.TextColor;
+            Invalidate();
+          }
+        }
+      }
+    }
+
+    #region consts
+    private const int _TextGapTop = 2;
+    private const int _TextGapBottom = 0;
+    private const int _TextGapLeft = 3;
+    private const int _TextGapRight = 3;
+    private const int _ButtonGapTop = 2;
+    private const int _ButtonGapBottom = 1;
+    private const int _ButtonGapBetween = 1;
+    private const int _ButtonGapLeft = 1;
+    private const int _ButtonGapRight = 2;
+    #endregion
+
+    private static Bitmap _imageButtonClose;
+    private static Bitmap ImageButtonClose {
+      get {
+        if (_imageButtonClose == null)
+          _imageButtonClose = Resources.DockPane_Close;
+
+        return _imageButtonClose;
+      }
+    }
+
+    private InertButton m_buttonClose;
+    private InertButton ButtonClose {
+      get {
+        if (m_buttonClose == null) {
+          m_buttonClose = new InertButton(this, ImageButtonClose, ImageButtonClose);
+          m_toolTip.SetToolTip(m_buttonClose, ToolTipClose);
+          m_buttonClose.Click += new EventHandler(Close_Click);
+          Controls.Add(m_buttonClose);
+        }
+
+        return m_buttonClose;
+      }
+    }
+
+    private static Bitmap _imageButtonAutoHide;
+    private static Bitmap ImageButtonAutoHide {
+      get {
+        if (_imageButtonAutoHide == null)
+          _imageButtonAutoHide = Resources.DockPane_AutoHide;
+
+        return _imageButtonAutoHide;
+      }
+    }
+
+    private static Bitmap _imageButtonDock;
+    private static Bitmap ImageButtonDock {
+      get {
+        if (_imageButtonDock == null)
+          _imageButtonDock = Resources.DockPane_Dock;
+
+        return _imageButtonDock;
+      }
+    }
+
+    private InertButton m_buttonAutoHide;
+    private InertButton ButtonAutoHide {
+      get {
+        if (m_buttonAutoHide == null) {
+          m_buttonAutoHide = new InertButton(this, ImageButtonDock, ImageButtonAutoHide);
+          m_toolTip.SetToolTip(m_buttonAutoHide, ToolTipAutoHide);
+          m_buttonAutoHide.Click += new EventHandler(AutoHide_Click);
+          Controls.Add(m_buttonAutoHide);
+        }
+
+        return m_buttonAutoHide;
+      }
+    }
+
+    private static Bitmap _imageButtonOptions;
+    private static Bitmap ImageButtonOptions {
+      get {
+        if (_imageButtonOptions == null)
+          _imageButtonOptions = Resources.DockPane_Option;
+
+        return _imageButtonOptions;
+      }
+    }
+
+    private InertButton m_buttonOptions;
+    private InertButton ButtonOptions {
+      get {
+        if (m_buttonOptions == null) {
+          m_buttonOptions = new InertButton(this, ImageButtonOptions, ImageButtonOptions);
+          m_toolTip.SetToolTip(m_buttonOptions, ToolTipOptions);
+          m_buttonOptions.Click += new EventHandler(Options_Click);
+          Controls.Add(m_buttonOptions);
+        }
+        return m_buttonOptions;
+      }
+    }
+
+    private IContainer m_components;
+    private IContainer Components {
+      get { return m_components; }
+    }
+
+    private ToolTip m_toolTip;
+
+    public VS2005DockPaneCaption(DockPane pane)
+      : base(pane) {
+      SuspendLayout();
+
+      m_components = new Container();
+      m_toolTip = new ToolTip(Components);
+
+      ResumeLayout();
+    }
+
+    protected override void Dispose(bool disposing) {
+      if (disposing)
+        Components.Dispose();
+      base.Dispose(disposing);
+    }
+
+    private static int TextGapTop {
+      get { return _TextGapTop; }
+    }
+
+    private static Font TextFont {
+      get { return SystemInformation.MenuFont; }
+    }
+
+    private static int TextGapBottom {
+      get { return _TextGapBottom; }
+    }
+
+    private static int TextGapLeft {
+      get { return _TextGapLeft; }
+    }
+
+    private static int TextGapRight {
+      get { return _TextGapRight; }
+    }
+
+    private static int ButtonGapTop {
+      get { return _ButtonGapTop; }
+    }
+
+    private static int ButtonGapBottom {
+      get { return _ButtonGapBottom; }
+    }
+
+    private static int ButtonGapLeft {
+      get { return _ButtonGapLeft; }
+    }
+
+    private static int ButtonGapRight {
+      get { return _ButtonGapRight; }
+    }
+
+    private static int ButtonGapBetween {
+      get { return _ButtonGapBetween; }
+    }
+
+    private static string _toolTipClose;
+    private static string ToolTipClose {
+      get {
+        if (_toolTipClose == null)
+          _toolTipClose = Strings.DockPaneCaption_ToolTipClose;
+        return _toolTipClose;
+      }
+    }
+
+    private static string _toolTipOptions;
+    private static string ToolTipOptions {
+      get {
+        if (_toolTipOptions == null)
+          _toolTipOptions = Strings.DockPaneCaption_ToolTipOptions;
+
+        return _toolTipOptions;
+      }
+    }
+
+    private static string _toolTipAutoHide;
+    private static string ToolTipAutoHide {
+      get {
+        if (_toolTipAutoHide == null)
+          _toolTipAutoHide = Strings.DockPaneCaption_ToolTipAutoHide;
+        return _toolTipAutoHide;
+      }
+    }
+
+    private static Blend _activeBackColorGradientBlend;
+    private static Blend ActiveBackColorGradientBlend {
+      get {
+        if (_activeBackColorGradientBlend == null) {
+          Blend blend = new Blend(2);
+
+          blend.Factors = new float[] { 0.5F, 1.0F };
+          blend.Positions = new float[] { 0.0F, 1.0F };
+          _activeBackColorGradientBlend = blend;
+        }
+
+        return _activeBackColorGradientBlend;
+      }
+    }
+
+    private Color TextColor {
+      get {
+        if (DockPane.IsActivated)
+          return DockPane.DockPanel.Skin.DockPaneStripSkin.ToolWindowGradient.ActiveCaptionGradient.TextColor;
+        else
+          return DockPane.DockPanel.Skin.DockPaneStripSkin.ToolWindowGradient.InactiveCaptionGradient.TextColor;
+      }
+    }
+
+    private static TextFormatFlags _textFormat =
             TextFormatFlags.SingleLine |
             TextFormatFlags.EndEllipsis |
             TextFormatFlags.VerticalCenter;
-		private TextFormatFlags TextFormat
-		{
-            get
-            {
-                if (RightToLeft == RightToLeft.No)
-                    return _textFormat;
-                else
-                    return _textFormat | TextFormatFlags.RightToLeft | TextFormatFlags.Right;
-            }
-		}
-
-		protected internal override int MeasureHeight()
-		{
-			int height = TextFont.Height + TextGapTop + TextGapBottom;
-
-			if (height < ButtonClose.Image.Height + ButtonGapTop + ButtonGapBottom)
-				height = ButtonClose.Image.Height + ButtonGapTop + ButtonGapBottom;
-
-			return height;
-		}
-
-		protected override void OnPaint(PaintEventArgs e)
-		{
-			base.OnPaint (e);
-			DrawCaption(e.Graphics);
-		}
-
-		private void DrawCaption(Graphics g)
-		{
-            if (ClientRectangle.Width == 0 || ClientRectangle.Height == 0)
-                return;
-
-            if (DockPane.IsActivated)
-            {
-                Color startColor = DockPane.DockPanel.Skin.DockPaneStripSkin.ToolWindowGradient.ActiveCaptionGradient.StartColor;
-                Color endColor = DockPane.DockPanel.Skin.DockPaneStripSkin.ToolWindowGradient.ActiveCaptionGradient.EndColor;
-                LinearGradientMode gradientMode = DockPane.DockPanel.Skin.DockPaneStripSkin.ToolWindowGradient.ActiveCaptionGradient.LinearGradientMode;
-                using (LinearGradientBrush brush = new LinearGradientBrush(ClientRectangle, startColor, endColor, gradientMode))
-                {
-                    brush.Blend = ActiveBackColorGradientBlend;
-                    g.FillRectangle(brush, ClientRectangle);
-                }
-            }
-            else
-            {
-                Color startColor = DockPane.DockPanel.Skin.DockPaneStripSkin.ToolWindowGradient.InactiveCaptionGradient.StartColor;
-                Color endColor = DockPane.DockPanel.Skin.DockPaneStripSkin.ToolWindowGradient.InactiveCaptionGradient.EndColor;
-                LinearGradientMode gradientMode = DockPane.DockPanel.Skin.DockPaneStripSkin.ToolWindowGradient.InactiveCaptionGradient.LinearGradientMode;
-                using (LinearGradientBrush brush = new LinearGradientBrush(ClientRectangle, startColor, endColor, gradientMode))
-                {
-                    g.FillRectangle(brush, ClientRectangle);
-                }
-            }
-
-			Rectangle rectCaption = ClientRectangle;
-
-			Rectangle rectCaptionText = rectCaption;
-            rectCaptionText.X += TextGapLeft;
-            rectCaptionText.Width -= TextGapLeft + TextGapRight;
-            rectCaptionText.Width -= ButtonGapLeft + ButtonClose.Width + ButtonGapRight;
-            if (ShouldShowAutoHideButton)
-                rectCaptionText.Width -= ButtonAutoHide.Width + ButtonGapBetween;
-            if (HasTabPageContextMenu)
-                rectCaptionText.Width -= ButtonOptions.Width + ButtonGapBetween;
-			rectCaptionText.Y += TextGapTop;
-			rectCaptionText.Height -= TextGapTop + TextGapBottom;
-
-            Color colorText;
-            if (DockPane.IsActivated)
-                colorText = DockPane.DockPanel.Skin.DockPaneStripSkin.ToolWindowGradient.ActiveCaptionGradient.TextColor;
-            else
-                colorText = DockPane.DockPanel.Skin.DockPaneStripSkin.ToolWindowGradient.InactiveCaptionGradient.TextColor;
-
-            TextRenderer.DrawText(g, DockPane.CaptionText, TextFont, DrawHelper.RtlTransform(this, rectCaptionText), colorText, TextFormat);
-		}
-
-		protected override void OnLayout(LayoutEventArgs levent)
-		{
-			SetButtonsPosition();
-			base.OnLayout (levent);
-		}
-
-		protected override void OnRefreshChanges()
-		{
-			SetButtons();
-			Invalidate();
-		}
-
-		private bool CloseButtonEnabled
-		{
-			get	{	return (DockPane.ActiveContent != null)? DockPane.ActiveContent.DockHandler.CloseButton : false;	}
-		}
-
-        /// <summary>
-        /// Determines whether the close button is visible on the content
-        /// </summary>
-        private bool CloseButtonVisible
-        {
-            get { return (DockPane.ActiveContent != null) ? DockPane.ActiveContent.DockHandler.CloseButtonVisible : false; }
-        }
-
-		private bool ShouldShowAutoHideButton
-		{
-			get	{	return !DockPane.IsFloat;	}
-		}
-
-		private void SetButtons()
-		{
-			ButtonClose.Enabled = CloseButtonEnabled;
-            ButtonClose.Visible = CloseButtonVisible;
-			ButtonAutoHide.Visible = ShouldShowAutoHideButton;
-            ButtonOptions.Visible = HasTabPageContextMenu;
-            ButtonClose.RefreshChanges();
-            ButtonAutoHide.RefreshChanges();
-            ButtonOptions.RefreshChanges();
-			
-			SetButtonsPosition();
-		}
-
-		private void SetButtonsPosition()
-		{
-			// set the size and location for close and auto-hide buttons
-			Rectangle rectCaption = ClientRectangle;
-			int buttonWidth = ButtonClose.Image.Width;
-			int buttonHeight = ButtonClose.Image.Height;
-			int height = rectCaption.Height - ButtonGapTop - ButtonGapBottom;
-			if (buttonHeight < height)
-			{
-				buttonWidth = buttonWidth * (height / buttonHeight);
-				buttonHeight = height;
-			}
-			Size buttonSize = new Size(buttonWidth, buttonHeight);
-			int x = rectCaption.X + rectCaption.Width - 1 - ButtonGapRight - m_buttonClose.Width;
-			int y = rectCaption.Y + ButtonGapTop;
-			Point point = new Point(x, y);
-            ButtonClose.Bounds = DrawHelper.RtlTransform(this, new Rectangle(point, buttonSize));
-
-            // If the close button is not visible draw the auto hide button overtop.
-            // Otherwise it is drawn to the left of the close button.
-            if (CloseButtonVisible)
-			    point.Offset(-(buttonWidth + ButtonGapBetween), 0);
-            
-            ButtonAutoHide.Bounds = DrawHelper.RtlTransform(this, new Rectangle(point, buttonSize));
-            if (ShouldShowAutoHideButton)
-                point.Offset(-(buttonWidth + ButtonGapBetween), 0);
-            ButtonOptions.Bounds = DrawHelper.RtlTransform(this, new Rectangle(point, buttonSize));
-		}
-
-		private void Close_Click(object sender, EventArgs e)
-		{
-			DockPane.CloseActiveContent();
-		}
-
-		private void AutoHide_Click(object sender, EventArgs e)
-		{
-			DockPane.DockState = DockHelper.ToggleAutoHideState(DockPane.DockState);
-            if (DockHelper.IsDockStateAutoHide(DockPane.DockState))
-                DockPane.DockPanel.ActiveAutoHideContent = null;
-
-		}
-
-        private void Options_Click(object sender, EventArgs e)
-        {
-            ShowTabPageContextMenu(PointToClient(Control.MousePosition));
-        }
-
-        protected override void OnRightToLeftChanged(EventArgs e)
-        {
-            base.OnRightToLeftChanged(e);
-            PerformLayout();
-        }
-	}
+    private TextFormatFlags TextFormat {
+      get {
+        if (RightToLeft == RightToLeft.No)
+          return _textFormat;
+        else
+          return _textFormat | TextFormatFlags.RightToLeft | TextFormatFlags.Right;
+      }
+    }
+
+    protected internal override int MeasureHeight() {
+      int height = TextFont.Height + TextGapTop + TextGapBottom;
+
+      if (height < ButtonClose.Image.Height + ButtonGapTop + ButtonGapBottom)
+        height = ButtonClose.Image.Height + ButtonGapTop + ButtonGapBottom;
+
+      return height;
+    }
+
+    protected override void OnPaint(PaintEventArgs e) {
+      base.OnPaint(e);
+      DrawCaption(e.Graphics);
+    }
+
+    private void DrawCaption(Graphics g) {
+      if (ClientRectangle.Width == 0 || ClientRectangle.Height == 0)
+        return;
+
+      if (DockPane.IsActivated) {
+        Color startColor = DockPane.DockPanel.Skin.DockPaneStripSkin.ToolWindowGradient.ActiveCaptionGradient.StartColor;
+        Color endColor = DockPane.DockPanel.Skin.DockPaneStripSkin.ToolWindowGradient.ActiveCaptionGradient.EndColor;
+        LinearGradientMode gradientMode = DockPane.DockPanel.Skin.DockPaneStripSkin.ToolWindowGradient.ActiveCaptionGradient.LinearGradientMode;
+        using (LinearGradientBrush brush = new LinearGradientBrush(ClientRectangle, startColor, endColor, gradientMode)) {
+          brush.Blend = ActiveBackColorGradientBlend;
+          g.FillRectangle(brush, ClientRectangle);
+        }
+      } else {
+        Color startColor = DockPane.DockPanel.Skin.DockPaneStripSkin.ToolWindowGradient.InactiveCaptionGradient.StartColor;
+        Color endColor = DockPane.DockPanel.Skin.DockPaneStripSkin.ToolWindowGradient.InactiveCaptionGradient.EndColor;
+        LinearGradientMode gradientMode = DockPane.DockPanel.Skin.DockPaneStripSkin.ToolWindowGradient.InactiveCaptionGradient.LinearGradientMode;
+        using (LinearGradientBrush brush = new LinearGradientBrush(ClientRectangle, startColor, endColor, gradientMode)) {
+          g.FillRectangle(brush, ClientRectangle);
+        }
+      }
+
+      Rectangle rectCaption = ClientRectangle;
+
+      Rectangle rectCaptionText = rectCaption;
+      rectCaptionText.X += TextGapLeft;
+      rectCaptionText.Width -= TextGapLeft + TextGapRight;
+      rectCaptionText.Width -= ButtonGapLeft + ButtonClose.Width + ButtonGapRight;
+      if (ShouldShowAutoHideButton)
+        rectCaptionText.Width -= ButtonAutoHide.Width + ButtonGapBetween;
+      if (HasTabPageContextMenu)
+        rectCaptionText.Width -= ButtonOptions.Width + ButtonGapBetween;
+      rectCaptionText.Y += TextGapTop;
+      rectCaptionText.Height -= TextGapTop + TextGapBottom;
+
+      Color colorText;
+      if (DockPane.IsActivated)
+        colorText = DockPane.DockPanel.Skin.DockPaneStripSkin.ToolWindowGradient.ActiveCaptionGradient.TextColor;
+      else
+        colorText = DockPane.DockPanel.Skin.DockPaneStripSkin.ToolWindowGradient.InactiveCaptionGradient.TextColor;
+
+      TextRenderer.DrawText(g, DockPane.CaptionText, TextFont, DrawHelper.RtlTransform(this, rectCaptionText), colorText, TextFormat);
+    }
+
+    protected override void OnLayout(LayoutEventArgs levent) {
+      SetButtonsPosition();
+      base.OnLayout(levent);
+    }
+
+    protected override void OnRefreshChanges() {
+      SetButtons();
+      Invalidate();
+    }
+
+    private bool CloseButtonEnabled {
+      get { return (DockPane.ActiveContent != null) ? DockPane.ActiveContent.DockHandler.CloseButton : false; }
+    }
+
+    /// <summary>
+    /// Determines whether the close button is visible on the content
+    /// </summary>
+    private bool CloseButtonVisible {
+      get { return (DockPane.ActiveContent != null) ? DockPane.ActiveContent.DockHandler.CloseButtonVisible : false; }
+    }
+
+    private bool ShouldShowAutoHideButton {
+      get { return !DockPane.IsFloat; }
+    }
+
+    private void SetButtons() {
+      ButtonClose.Enabled = CloseButtonEnabled;
+      ButtonClose.Visible = CloseButtonVisible;
+      ButtonAutoHide.Visible = ShouldShowAutoHideButton;
+      ButtonOptions.Visible = HasTabPageContextMenu;
+      ButtonClose.RefreshChanges();
+      ButtonAutoHide.RefreshChanges();
+      ButtonOptions.RefreshChanges();
+
+      SetButtonsPosition();
+    }
+
+    private void SetButtonsPosition() {
+      // set the size and location for close and auto-hide buttons
+      Rectangle rectCaption = ClientRectangle;
+      int buttonWidth = ButtonClose.Image.Width;
+      int buttonHeight = ButtonClose.Image.Height;
+      int height = rectCaption.Height - ButtonGapTop - ButtonGapBottom;
+      if (buttonHeight < height) {
+        buttonWidth = buttonWidth * (height / buttonHeight);
+        buttonHeight = height;
+      }
+      Size buttonSize = new Size(buttonWidth, buttonHeight);
+      int x = rectCaption.X + rectCaption.Width - 1 - ButtonGapRight - m_buttonClose.Width;
+      int y = rectCaption.Y + ButtonGapTop;
+      Point point = new Point(x, y);
+      ButtonClose.Bounds = DrawHelper.RtlTransform(this, new Rectangle(point, buttonSize));
+
+      // If the close button is not visible draw the auto hide button overtop.
+      // Otherwise it is drawn to the left of the close button.
+      if (CloseButtonVisible)
+        point.Offset(-(buttonWidth + ButtonGapBetween), 0);
+
+      ButtonAutoHide.Bounds = DrawHelper.RtlTransform(this, new Rectangle(point, buttonSize));
+      if (ShouldShowAutoHideButton)
+        point.Offset(-(buttonWidth + ButtonGapBetween), 0);
+      ButtonOptions.Bounds = DrawHelper.RtlTransform(this, new Rectangle(point, buttonSize));
+    }
+
+    private void Close_Click(object sender, EventArgs e) {
+      DockPane.CloseActiveContent();
+    }
+
+    private void AutoHide_Click(object sender, EventArgs e) {
+      DockPane.DockState = DockHelper.ToggleAutoHideState(DockPane.DockState);
+      if (DockHelper.IsDockStateAutoHide(DockPane.DockState))
+        DockPane.DockPanel.ActiveAutoHideContent = null;
+
+    }
+
+    private void Options_Click(object sender, EventArgs e) {
+      ShowTabPageContextMenu(PointToClient(Control.MousePosition));
+    }
+
+    protected override void OnRightToLeftChanged(EventArgs e) {
+      base.OnRightToLeftChanged(e);
+      PerformLayout();
+    }
+  }
 }
Index: /trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.WinFormsUI/2.3.1/WinFormsUI-2.3.1/Docking/VS2005DockPaneStrip.cs
===================================================================
--- /trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.WinFormsUI/2.3.1/WinFormsUI-2.3.1/Docking/VS2005DockPaneStrip.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.WinFormsUI/2.3.1/WinFormsUI-2.3.1/Docking/VS2005DockPaneStrip.cs	(revision 4068)
@@ -1,1479 +1,1255 @@
 using System;
+using System.ComponentModel;
 using System.Drawing;
 using System.Drawing.Drawing2D;
 using System.Windows.Forms;
-using System.ComponentModel;
-using System.Collections;
-using System.Collections.Generic;
-
-namespace WeifenLuo.WinFormsUI.Docking
-{
-	internal class VS2005DockPaneStrip : DockPaneStripBase
-	{
-        private class TabVS2005 : Tab
-        {
-            public TabVS2005(IDockContent content)
-                : base(content)
-            {
-            }
-
-            private int m_tabX;
-            public int TabX
-            {
-                get { return m_tabX; }
-                set { m_tabX = value; }
-            }
-
-            private int m_tabWidth;
-            public int TabWidth
-            {
-                get { return m_tabWidth; }
-                set { m_tabWidth = value; }
-            }
-
-            private int m_maxWidth;
-            public int MaxWidth
-            {
-                get { return m_maxWidth; }
-                set { m_maxWidth = value; }
-            }
-
-            private bool m_flag;
-            protected internal bool Flag
-            {
-                get { return m_flag; }
-                set { m_flag = value; }
-            }
-        }
-
-        protected internal override DockPaneStripBase.Tab CreateTab(IDockContent content)
-        {
-            return new TabVS2005(content);
-        }
-
-        private sealed class InertButton : InertButtonBase
-        {
-            private Bitmap m_image0, m_image1;
-
-            public InertButton(Bitmap image0, Bitmap image1)
-                : base()
-            {
-                m_image0 = image0;
-                m_image1 = image1;
-            }
-
-            private int m_imageCategory = 0;
-            public int ImageCategory
-            {
-                get { return m_imageCategory; }
-                set
-                {
-                    if (m_imageCategory == value)
-                        return;
-
-                    m_imageCategory = value;
-                    Invalidate();
-                }
-            }
-
-            public override Bitmap Image
-            {
-                get { return ImageCategory == 0 ? m_image0 : m_image1; }
-            }
-        }
-
-		#region consts
-        private const int _ToolWindowStripGapTop = 0;
-        private const int _ToolWindowStripGapBottom = 1;
-		private const int _ToolWindowStripGapLeft = 0;
-		private const int _ToolWindowStripGapRight = 0;
-		private const int _ToolWindowImageHeight = 16;
-		private const int _ToolWindowImageWidth = 16;
-		private const int _ToolWindowImageGapTop = 3;
-		private const int _ToolWindowImageGapBottom = 1;
-		private const int _ToolWindowImageGapLeft = 2;
-		private const int _ToolWindowImageGapRight = 0;
-		private const int _ToolWindowTextGapRight = 3;
-		private const int _ToolWindowTabSeperatorGapTop = 3;
-		private const int _ToolWindowTabSeperatorGapBottom = 3;
-
-        private const int _DocumentStripGapTop = 0;
-        private const int _DocumentStripGapBottom = 1;
-		private const int _DocumentTabMaxWidth = 200;
-		private const int _DocumentButtonGapTop = 4;
-		private const int _DocumentButtonGapBottom = 4;
-		private const int _DocumentButtonGapBetween = 0;
-		private const int _DocumentButtonGapRight = 3;
-		private const int _DocumentTabGapTop = 3;
-		private const int _DocumentTabGapLeft = 3;
-		private const int _DocumentTabGapRight = 3;
-        private const int _DocumentIconGapBottom = 2;
-		private const int _DocumentIconGapLeft = 8;
-        private const int _DocumentIconGapRight = 0;
-		private const int _DocumentIconHeight = 16;
-		private const int _DocumentIconWidth = 16;
-        private const int _DocumentTextGapRight = 3;
-		#endregion
-
-        private static Bitmap _imageButtonClose;
-        private static Bitmap ImageButtonClose
-        {
-            get
-            {
-                if (_imageButtonClose == null)
-                    _imageButtonClose = Resources.DockPane_Close;
-
-                return _imageButtonClose;
-            }
-        }
-
-        private InertButton m_buttonClose;
-        private InertButton ButtonClose
-        {
-            get
-            {
-                if (m_buttonClose == null)
-                {
-                    m_buttonClose = new InertButton(ImageButtonClose, ImageButtonClose);
-                    m_toolTip.SetToolTip(m_buttonClose, ToolTipClose);
-                    m_buttonClose.Click += new EventHandler(Close_Click);
-                    Controls.Add(m_buttonClose);
-                }
-
-                return m_buttonClose;
-            }
-        }
-
-        private static Bitmap _imageButtonWindowList;
-        private static Bitmap ImageButtonWindowList
-        {
-            get
-            {
-                if (_imageButtonWindowList == null)
-                    _imageButtonWindowList = Resources.DockPane_Option;
-
-                return _imageButtonWindowList;
-            }
-        }
-
-        private static Bitmap _imageButtonWindowListOverflow;
-        private static Bitmap ImageButtonWindowListOverflow
-        {
-            get
-            {
-                if (_imageButtonWindowListOverflow == null)
-                    _imageButtonWindowListOverflow = Resources.DockPane_OptionOverflow;
-
-                return _imageButtonWindowListOverflow;
-            }
-        }
-
-        private InertButton m_buttonWindowList;
-        private InertButton ButtonWindowList
-        {
-            get
-            {
-                if (m_buttonWindowList == null)
-                {
-                    m_buttonWindowList = new InertButton(ImageButtonWindowList, ImageButtonWindowListOverflow);
-                    m_toolTip.SetToolTip(m_buttonWindowList, ToolTipSelect);
-                    m_buttonWindowList.Click += new EventHandler(WindowList_Click);
-                    Controls.Add(m_buttonWindowList);
-                }
-
-                return m_buttonWindowList;
-            }
-        }
-
-        private static GraphicsPath GraphicsPath
-        {
-            get { return VS2005AutoHideStrip.GraphicsPath; }
-        }
-
-		private IContainer m_components;
-		private ToolTip m_toolTip;
-		private IContainer Components
-		{
-			get	{	return m_components;	}
-		}
-
-		#region Customizable Properties
-        private static int ToolWindowStripGapTop
-        {
-            get { return _ToolWindowStripGapTop; }
-        }
-
-        private static int ToolWindowStripGapBottom
-        {
-            get { return _ToolWindowStripGapBottom; }
-        }
-
-		private static int ToolWindowStripGapLeft
-		{
-			get	{	return _ToolWindowStripGapLeft;	}
-		}
-
-		private static int ToolWindowStripGapRight
-		{
-			get	{	return _ToolWindowStripGapRight;	}
-		}
-
-		private static int ToolWindowImageHeight
-		{
-			get	{	return _ToolWindowImageHeight;	}
-		}
-
-		private static int ToolWindowImageWidth
-		{
-			get	{	return _ToolWindowImageWidth;	}
-		}
-
-		private static int ToolWindowImageGapTop
-		{
-			get	{	return _ToolWindowImageGapTop;	}
-		}
-
-		private static int ToolWindowImageGapBottom
-		{
-			get	{	return _ToolWindowImageGapBottom;	}
-		}
-
-		private static int ToolWindowImageGapLeft
-		{
-			get	{	return _ToolWindowImageGapLeft;	}
-		}
-
-		private static int ToolWindowImageGapRight
-		{
-			get	{	return _ToolWindowImageGapRight;	}
-		}
-
-		private static int ToolWindowTextGapRight
-		{
-			get	{	return _ToolWindowTextGapRight;	}
-		}
-
-		private static int ToolWindowTabSeperatorGapTop
-		{
-			get	{	return _ToolWindowTabSeperatorGapTop;	}
-		}
-
-		private static int ToolWindowTabSeperatorGapBottom
-		{
-			get	{	return _ToolWindowTabSeperatorGapBottom;	}
-		}
-
-		private static string _toolTipClose;
-		private static string ToolTipClose
-		{
-			get
-			{	
-				if (_toolTipClose == null)
-					_toolTipClose = Strings.DockPaneStrip_ToolTipClose;
-				return _toolTipClose;
-			}
-		}
-
-		private static string _toolTipSelect;
-		private static string ToolTipSelect
-		{
-			get
-			{	
-				if (_toolTipSelect == null)
-					_toolTipSelect = Strings.DockPaneStrip_ToolTipWindowList;
-				return _toolTipSelect;
-			}
-		}
-
-		private TextFormatFlags ToolWindowTextFormat
-		{
-			get
-            {	
-                TextFormatFlags textFormat = TextFormatFlags.EndEllipsis |
-                    TextFormatFlags.HorizontalCenter |
-                    TextFormatFlags.SingleLine |
-                    TextFormatFlags.VerticalCenter;
-                if (RightToLeft == RightToLeft.Yes)
-                    return textFormat | TextFormatFlags.RightToLeft | TextFormatFlags.Right;
-                else
-                    return textFormat;
-            }
-		}
-
-        private static int DocumentStripGapTop
-        {
-            get { return _DocumentStripGapTop; }
-        }
-
-        private static int DocumentStripGapBottom
-        {
-            get { return _DocumentStripGapBottom; }
-        }
-
-		private TextFormatFlags DocumentTextFormat
-		{
-        	get
-            {
-                TextFormatFlags textFormat = TextFormatFlags.EndEllipsis |
-                    TextFormatFlags.SingleLine |
-                    TextFormatFlags.VerticalCenter |
-                    TextFormatFlags.HorizontalCenter;
-                if (RightToLeft == RightToLeft.Yes)
-                    return textFormat | TextFormatFlags.RightToLeft;
-                else
-                    return textFormat;
-            }
-		}
-
-		private static int DocumentTabMaxWidth
-		{
-			get	{	return _DocumentTabMaxWidth;	}
-		}
-
-		private static int DocumentButtonGapTop
-		{
-			get	{	return _DocumentButtonGapTop;	}
-		}
-
-		private static int DocumentButtonGapBottom
-		{
-			get	{	return _DocumentButtonGapBottom;	}
-		}
-
-		private static int DocumentButtonGapBetween
-		{
-			get	{	return _DocumentButtonGapBetween;	}
-		}
-
-		private static int DocumentButtonGapRight
-		{
-			get	{	return _DocumentButtonGapRight;	}
-		}
-
-		private static int DocumentTabGapTop
-		{
-			get	{	return _DocumentTabGapTop;	}
-		}
-
-		private static int DocumentTabGapLeft
-		{
-			get	{	return _DocumentTabGapLeft;	}
-		}
-
-		private static int DocumentTabGapRight
-		{
-			get	{	return _DocumentTabGapRight;	}
-		}
-
-        private static int DocumentIconGapBottom
-        {
-            get { return _DocumentIconGapBottom; }
-        }
-
-		private static int DocumentIconGapLeft
-		{
-            get { return _DocumentIconGapLeft; }
-		}
-
-        private static int DocumentIconGapRight
-        {
-            get { return _DocumentIconGapRight; }
-        }
-
-		private static int DocumentIconWidth
-		{
-			get	{	return _DocumentIconWidth;	}
-		}
-
-		private static int DocumentIconHeight
-		{
-			get	{	return _DocumentIconHeight;	}
-		}
-
-        private static int DocumentTextGapRight
-        {
-            get { return _DocumentTextGapRight; }
-        }
-
-		private static Pen PenToolWindowTabBorder
-		{
-			get	{	return SystemPens.GrayText;	}
-		}
-
-        private static Pen PenDocumentTabActiveBorder
-        {
-            get { return SystemPens.ControlDarkDark; }
-        }
-
-        private static Pen PenDocumentTabInactiveBorder
-        {
-            get { return SystemPens.GrayText; }
-        }
-		#endregion
-
-		public VS2005DockPaneStrip(DockPane pane) : base(pane)
-		{
-			SetStyle(ControlStyles.ResizeRedraw |
+
+namespace WeifenLuo.WinFormsUI.Docking {
+  internal class VS2005DockPaneStrip : DockPaneStripBase {
+    private class TabVS2005 : Tab {
+      public TabVS2005(IDockContent content)
+        : base(content) {
+      }
+
+      private int m_tabX;
+      public int TabX {
+        get { return m_tabX; }
+        set { m_tabX = value; }
+      }
+
+      private int m_tabWidth;
+      public int TabWidth {
+        get { return m_tabWidth; }
+        set { m_tabWidth = value; }
+      }
+
+      private int m_maxWidth;
+      public int MaxWidth {
+        get { return m_maxWidth; }
+        set { m_maxWidth = value; }
+      }
+
+      private bool m_flag;
+      protected internal bool Flag {
+        get { return m_flag; }
+        set { m_flag = value; }
+      }
+    }
+
+    protected internal override DockPaneStripBase.Tab CreateTab(IDockContent content) {
+      return new TabVS2005(content);
+    }
+
+    private sealed class InertButton : InertButtonBase {
+      private Bitmap m_image0, m_image1;
+
+      public InertButton(Bitmap image0, Bitmap image1)
+        : base() {
+        m_image0 = image0;
+        m_image1 = image1;
+      }
+
+      private int m_imageCategory = 0;
+      public int ImageCategory {
+        get { return m_imageCategory; }
+        set {
+          if (m_imageCategory == value)
+            return;
+
+          m_imageCategory = value;
+          Invalidate();
+        }
+      }
+
+      public override Bitmap Image {
+        get { return ImageCategory == 0 ? m_image0 : m_image1; }
+      }
+    }
+
+    #region consts
+    private const int _ToolWindowStripGapTop = 0;
+    private const int _ToolWindowStripGapBottom = 1;
+    private const int _ToolWindowStripGapLeft = 0;
+    private const int _ToolWindowStripGapRight = 0;
+    private const int _ToolWindowImageHeight = 16;
+    private const int _ToolWindowImageWidth = 16;
+    private const int _ToolWindowImageGapTop = 3;
+    private const int _ToolWindowImageGapBottom = 1;
+    private const int _ToolWindowImageGapLeft = 2;
+    private const int _ToolWindowImageGapRight = 0;
+    private const int _ToolWindowTextGapRight = 3;
+    private const int _ToolWindowTabSeperatorGapTop = 3;
+    private const int _ToolWindowTabSeperatorGapBottom = 3;
+
+    private const int _DocumentStripGapTop = 0;
+    private const int _DocumentStripGapBottom = 1;
+    private const int _DocumentTabMaxWidth = 200;
+    private const int _DocumentButtonGapTop = 4;
+    private const int _DocumentButtonGapBottom = 4;
+    private const int _DocumentButtonGapBetween = 0;
+    private const int _DocumentButtonGapRight = 3;
+    private const int _DocumentTabGapTop = 3;
+    private const int _DocumentTabGapLeft = 3;
+    private const int _DocumentTabGapRight = 3;
+    private const int _DocumentIconGapBottom = 2;
+    private const int _DocumentIconGapLeft = 8;
+    private const int _DocumentIconGapRight = 0;
+    private const int _DocumentIconHeight = 16;
+    private const int _DocumentIconWidth = 16;
+    private const int _DocumentTextGapRight = 3;
+    #endregion
+
+    private static Bitmap _imageButtonClose;
+    private static Bitmap ImageButtonClose {
+      get {
+        if (_imageButtonClose == null)
+          _imageButtonClose = Resources.DockPane_Close;
+
+        return _imageButtonClose;
+      }
+    }
+
+    private InertButton m_buttonClose;
+    private InertButton ButtonClose {
+      get {
+        if (m_buttonClose == null) {
+          m_buttonClose = new InertButton(ImageButtonClose, ImageButtonClose);
+          m_toolTip.SetToolTip(m_buttonClose, ToolTipClose);
+          m_buttonClose.Click += new EventHandler(Close_Click);
+          Controls.Add(m_buttonClose);
+        }
+
+        return m_buttonClose;
+      }
+    }
+
+    private static Bitmap _imageButtonWindowList;
+    private static Bitmap ImageButtonWindowList {
+      get {
+        if (_imageButtonWindowList == null)
+          _imageButtonWindowList = Resources.DockPane_Option;
+
+        return _imageButtonWindowList;
+      }
+    }
+
+    private static Bitmap _imageButtonWindowListOverflow;
+    private static Bitmap ImageButtonWindowListOverflow {
+      get {
+        if (_imageButtonWindowListOverflow == null)
+          _imageButtonWindowListOverflow = Resources.DockPane_OptionOverflow;
+
+        return _imageButtonWindowListOverflow;
+      }
+    }
+
+    private InertButton m_buttonWindowList;
+    private InertButton ButtonWindowList {
+      get {
+        if (m_buttonWindowList == null) {
+          m_buttonWindowList = new InertButton(ImageButtonWindowList, ImageButtonWindowListOverflow);
+          m_toolTip.SetToolTip(m_buttonWindowList, ToolTipSelect);
+          m_buttonWindowList.Click += new EventHandler(WindowList_Click);
+          Controls.Add(m_buttonWindowList);
+        }
+
+        return m_buttonWindowList;
+      }
+    }
+
+    private static GraphicsPath GraphicsPath {
+      get { return VS2005AutoHideStrip.GraphicsPath; }
+    }
+
+    private IContainer m_components;
+    private ToolTip m_toolTip;
+    private IContainer Components {
+      get { return m_components; }
+    }
+
+    #region Customizable Properties
+    private static int ToolWindowStripGapTop {
+      get { return _ToolWindowStripGapTop; }
+    }
+
+    private static int ToolWindowStripGapBottom {
+      get { return _ToolWindowStripGapBottom; }
+    }
+
+    private static int ToolWindowStripGapLeft {
+      get { return _ToolWindowStripGapLeft; }
+    }
+
+    private static int ToolWindowStripGapRight {
+      get { return _ToolWindowStripGapRight; }
+    }
+
+    private static int ToolWindowImageHeight {
+      get { return _ToolWindowImageHeight; }
+    }
+
+    private static int ToolWindowImageWidth {
+      get { return _ToolWindowImageWidth; }
+    }
+
+    private static int ToolWindowImageGapTop {
+      get { return _ToolWindowImageGapTop; }
+    }
+
+    private static int ToolWindowImageGapBottom {
+      get { return _ToolWindowImageGapBottom; }
+    }
+
+    private static int ToolWindowImageGapLeft {
+      get { return _ToolWindowImageGapLeft; }
+    }
+
+    private static int ToolWindowImageGapRight {
+      get { return _ToolWindowImageGapRight; }
+    }
+
+    private static int ToolWindowTextGapRight {
+      get { return _ToolWindowTextGapRight; }
+    }
+
+    private static int ToolWindowTabSeperatorGapTop {
+      get { return _ToolWindowTabSeperatorGapTop; }
+    }
+
+    private static int ToolWindowTabSeperatorGapBottom {
+      get { return _ToolWindowTabSeperatorGapBottom; }
+    }
+
+    private static string _toolTipClose;
+    private static string ToolTipClose {
+      get {
+        if (_toolTipClose == null)
+          _toolTipClose = Strings.DockPaneStrip_ToolTipClose;
+        return _toolTipClose;
+      }
+    }
+
+    private static string _toolTipSelect;
+    private static string ToolTipSelect {
+      get {
+        if (_toolTipSelect == null)
+          _toolTipSelect = Strings.DockPaneStrip_ToolTipWindowList;
+        return _toolTipSelect;
+      }
+    }
+
+    private TextFormatFlags ToolWindowTextFormat {
+      get {
+        TextFormatFlags textFormat = TextFormatFlags.EndEllipsis |
+            TextFormatFlags.HorizontalCenter |
+            TextFormatFlags.SingleLine |
+            TextFormatFlags.VerticalCenter;
+        if (RightToLeft == RightToLeft.Yes)
+          return textFormat | TextFormatFlags.RightToLeft | TextFormatFlags.Right;
+        else
+          return textFormat;
+      }
+    }
+
+    private static int DocumentStripGapTop {
+      get { return _DocumentStripGapTop; }
+    }
+
+    private static int DocumentStripGapBottom {
+      get { return _DocumentStripGapBottom; }
+    }
+
+    private TextFormatFlags DocumentTextFormat {
+      get {
+        TextFormatFlags textFormat = TextFormatFlags.EndEllipsis |
+            TextFormatFlags.SingleLine |
+            TextFormatFlags.VerticalCenter |
+            TextFormatFlags.HorizontalCenter;
+        if (RightToLeft == RightToLeft.Yes)
+          return textFormat | TextFormatFlags.RightToLeft;
+        else
+          return textFormat;
+      }
+    }
+
+    private static int DocumentTabMaxWidth {
+      get { return _DocumentTabMaxWidth; }
+    }
+
+    private static int DocumentButtonGapTop {
+      get { return _DocumentButtonGapTop; }
+    }
+
+    private static int DocumentButtonGapBottom {
+      get { return _DocumentButtonGapBottom; }
+    }
+
+    private static int DocumentButtonGapBetween {
+      get { return _DocumentButtonGapBetween; }
+    }
+
+    private static int DocumentButtonGapRight {
+      get { return _DocumentButtonGapRight; }
+    }
+
+    private static int DocumentTabGapTop {
+      get { return _DocumentTabGapTop; }
+    }
+
+    private static int DocumentTabGapLeft {
+      get { return _DocumentTabGapLeft; }
+    }
+
+    private static int DocumentTabGapRight {
+      get { return _DocumentTabGapRight; }
+    }
+
+    private static int DocumentIconGapBottom {
+      get { return _DocumentIconGapBottom; }
+    }
+
+    private static int DocumentIconGapLeft {
+      get { return _DocumentIconGapLeft; }
+    }
+
+    private static int DocumentIconGapRight {
+      get { return _DocumentIconGapRight; }
+    }
+
+    private static int DocumentIconWidth {
+      get { return _DocumentIconWidth; }
+    }
+
+    private static int DocumentIconHeight {
+      get { return _DocumentIconHeight; }
+    }
+
+    private static int DocumentTextGapRight {
+      get { return _DocumentTextGapRight; }
+    }
+
+    private static Pen PenToolWindowTabBorder {
+      get { return SystemPens.GrayText; }
+    }
+
+    private static Pen PenDocumentTabActiveBorder {
+      get { return SystemPens.ControlDarkDark; }
+    }
+
+    private static Pen PenDocumentTabInactiveBorder {
+      get { return SystemPens.GrayText; }
+    }
+    #endregion
+
+    public VS2005DockPaneStrip(DockPane pane)
+      : base(pane) {
+      SetStyle(ControlStyles.ResizeRedraw |
                 ControlStyles.UserPaint |
                 ControlStyles.AllPaintingInWmPaint |
                 ControlStyles.OptimizedDoubleBuffer, true);
 
-			SuspendLayout();
-
-			m_components = new Container();
-			m_toolTip = new ToolTip(Components);
-            m_selectMenu = new ContextMenuStrip(Components);
-
-			ResumeLayout();
-		}
-
-		protected override void Dispose(bool disposing)
-		{
-            if (disposing)
-            {
-                Components.Dispose();
-                if (m_boldFont != null)
-                {
-                    m_boldFont.Dispose();
-                    m_boldFont = null;
-                }
-            }
-			base.Dispose (disposing);
-		}
-
-        private static Font TextFont
-        {
-            get { return SystemInformation.MenuFont; }
-        }
-
-        private Font m_font;
-        private Font m_boldFont;
-        private Font BoldFont
-        {
-            get
-            {
-                if (IsDisposed)
-                    return null;
-
-                if (m_boldFont == null)
-                {
-                    m_font = TextFont;
-                    m_boldFont = new Font(TextFont, FontStyle.Bold);
-                }
-                else if (m_font != TextFont)
-                {
-                    m_boldFont.Dispose();
-                    m_font = TextFont;
-                    m_boldFont = new Font(TextFont, FontStyle.Bold);
-                }
-
-                return m_boldFont;
-            }
-        }
-
-        private int m_startDisplayingTab = 0;
-        private int StartDisplayingTab
-        {
-            get { return m_startDisplayingTab; }
-            set
-            {
-                m_startDisplayingTab = value;
-                Invalidate();
-            }
-        }
-
-        private int m_endDisplayingTab = 0;
-        private int EndDisplayingTab
-        {
-            get { return m_endDisplayingTab; }
-            set { m_endDisplayingTab = value; }
-        }
-
-        private int m_firstDisplayingTab = 0;
-        private int FirstDisplayingTab
-        {
-            get { return m_firstDisplayingTab; }
-            set { m_firstDisplayingTab = value; }
-        }
-
-        private bool m_documentTabsOverflow = false;
-        private bool DocumentTabsOverflow
-        {
-            set
-            {
-                if (m_documentTabsOverflow == value)
-                    return;
-
-                m_documentTabsOverflow = value;
-                if (value)
-                    ButtonWindowList.ImageCategory = 1;
-                else
-                    ButtonWindowList.ImageCategory = 0;
-            }
-        }
-
-		protected internal override int MeasureHeight()
-		{
-			if (Appearance == DockPane.AppearanceStyle.ToolWindow)
-				return MeasureHeight_ToolWindow();
-			else
-				return MeasureHeight_Document();
-		}
-
-		private int MeasureHeight_ToolWindow()
-		{
-			if (DockPane.IsAutoHide || Tabs.Count <= 1)
-				return 0;
-
-            int height = Math.Max(TextFont.Height, ToolWindowImageHeight + ToolWindowImageGapTop + ToolWindowImageGapBottom)
-                + ToolWindowStripGapTop + ToolWindowStripGapBottom;
-
-			return height;
-		}
-
-		private int MeasureHeight_Document()
-		{
-			int height = Math.Max(TextFont.Height + DocumentTabGapTop,
-				ButtonClose.Height + DocumentButtonGapTop + DocumentButtonGapBottom)
+      SuspendLayout();
+
+      m_components = new Container();
+      m_toolTip = new ToolTip(Components);
+      m_selectMenu = new ContextMenuStrip(Components);
+
+      ResumeLayout();
+    }
+
+    protected override void Dispose(bool disposing) {
+      if (disposing) {
+        Components.Dispose();
+        if (m_boldFont != null) {
+          m_boldFont.Dispose();
+          m_boldFont = null;
+        }
+      }
+      base.Dispose(disposing);
+    }
+
+    private static Font TextFont {
+      get { return SystemInformation.MenuFont; }
+    }
+
+    private Font m_font;
+    private Font m_boldFont;
+    private Font BoldFont {
+      get {
+        if (IsDisposed)
+          return null;
+
+        if (m_boldFont == null) {
+          m_font = TextFont;
+          m_boldFont = new Font(TextFont, FontStyle.Bold);
+        } else if (m_font != TextFont) {
+          m_boldFont.Dispose();
+          m_font = TextFont;
+          m_boldFont = new Font(TextFont, FontStyle.Bold);
+        }
+
+        return m_boldFont;
+      }
+    }
+
+    private int m_startDisplayingTab = 0;
+    private int StartDisplayingTab {
+      get { return m_startDisplayingTab; }
+      set {
+        m_startDisplayingTab = value;
+        Invalidate();
+      }
+    }
+
+    private int m_endDisplayingTab = 0;
+    private int EndDisplayingTab {
+      get { return m_endDisplayingTab; }
+      set { m_endDisplayingTab = value; }
+    }
+
+    private int m_firstDisplayingTab = 0;
+    private int FirstDisplayingTab {
+      get { return m_firstDisplayingTab; }
+      set { m_firstDisplayingTab = value; }
+    }
+
+    private bool m_documentTabsOverflow = false;
+    private bool DocumentTabsOverflow {
+      set {
+        if (m_documentTabsOverflow == value)
+          return;
+
+        m_documentTabsOverflow = value;
+        if (value)
+          ButtonWindowList.ImageCategory = 1;
+        else
+          ButtonWindowList.ImageCategory = 0;
+      }
+    }
+
+    protected internal override int MeasureHeight() {
+      if (Appearance == DockPane.AppearanceStyle.ToolWindow)
+        return MeasureHeight_ToolWindow();
+      else
+        return MeasureHeight_Document();
+    }
+
+    private int MeasureHeight_ToolWindow() {
+      if (DockPane.IsAutoHide || Tabs.Count <= 1)
+        return 0;
+
+      int height = Math.Max(TextFont.Height, ToolWindowImageHeight + ToolWindowImageGapTop + ToolWindowImageGapBottom)
+          + ToolWindowStripGapTop + ToolWindowStripGapBottom;
+
+      return height;
+    }
+
+    private int MeasureHeight_Document() {
+      int height = Math.Max(TextFont.Height + DocumentTabGapTop,
+        ButtonClose.Height + DocumentButtonGapTop + DocumentButtonGapBottom)
                 + DocumentStripGapBottom + DocumentStripGapTop;
 
-			return height;
-		}
-
-		protected override void OnPaint(PaintEventArgs e)
-		{
-            Rectangle rect = TabsRectangle;
-
-            if (Appearance == DockPane.AppearanceStyle.Document)
-            {
-                rect.X -= DocumentTabGapLeft;
-
-                // Add these values back in so that the DockStrip color is drawn
-                // beneath the close button and window list button.
-                rect.Width += DocumentTabGapLeft +
-                    DocumentTabGapRight +
-                    DocumentButtonGapRight +
-                    ButtonClose.Width +
-                    ButtonWindowList.Width;
-
-                // It is possible depending on the DockPanel DocumentStyle to have
-                // a Document without a DockStrip.
-                if (rect.Width > 0 && rect.Height > 0)
-                {
-                    Color startColor = DockPane.DockPanel.Skin.DockPaneStripSkin.DocumentGradient.DockStripGradient.StartColor;
-                    Color endColor = DockPane.DockPanel.Skin.DockPaneStripSkin.DocumentGradient.DockStripGradient.EndColor;
-                    LinearGradientMode gradientMode = DockPane.DockPanel.Skin.DockPaneStripSkin.DocumentGradient.DockStripGradient.LinearGradientMode;
-                    using (LinearGradientBrush brush = new LinearGradientBrush(rect, startColor, endColor, gradientMode))
-                    {
-                        e.Graphics.FillRectangle(brush, rect);
-                    }
-                }
-            }
-            else
-            {
-                Color startColor = DockPane.DockPanel.Skin.DockPaneStripSkin.ToolWindowGradient.DockStripGradient.StartColor;
-                Color endColor = DockPane.DockPanel.Skin.DockPaneStripSkin.ToolWindowGradient.DockStripGradient.EndColor;
-                LinearGradientMode gradientMode = DockPane.DockPanel.Skin.DockPaneStripSkin.ToolWindowGradient.DockStripGradient.LinearGradientMode;
-                using (LinearGradientBrush brush = new LinearGradientBrush(rect, startColor, endColor, gradientMode))
-                {
-                    e.Graphics.FillRectangle(brush, rect);
-                }
-            }
-			base.OnPaint (e);
-			CalculateTabs();
-            if (Appearance == DockPane.AppearanceStyle.Document && DockPane.ActiveContent != null)
-            {
-                if (EnsureDocumentTabVisible(DockPane.ActiveContent, false))
-                    CalculateTabs();
-            }
-
-			DrawTabStrip(e.Graphics);
-		}
-
-		protected override void OnRefreshChanges()
-		{
-			SetInertButtons();
-			Invalidate();
-		}
-
-		protected internal override GraphicsPath GetOutline(int index)
-		{
-
-            if (Appearance == DockPane.AppearanceStyle.Document)
-                return GetOutline_Document(index);
-            else
-                return GetOutline_ToolWindow(index);
-
-		}
-
-        private GraphicsPath GetOutline_Document(int index)
-        {
-            Rectangle rectTab = GetTabRectangle(index);
-            rectTab.X -= rectTab.Height / 2;
-            rectTab.Intersect(TabsRectangle);
-            rectTab = RectangleToScreen(DrawHelper.RtlTransform(this, rectTab));
-            Rectangle rectPaneClient = DockPane.RectangleToScreen(DockPane.ClientRectangle);
-
-            GraphicsPath path = new GraphicsPath();
-            GraphicsPath pathTab = GetTabOutline_Document(Tabs[index], true, true, true);
-            path.AddPath(pathTab, true);
-
-            if (DockPane.DockPanel.DocumentTabStripLocation == DocumentTabStripLocation.Bottom)
-            {
-                path.AddLine(rectTab.Right, rectTab.Top, rectPaneClient.Right, rectTab.Top);
-                path.AddLine(rectPaneClient.Right, rectTab.Top, rectPaneClient.Right, rectPaneClient.Top);
-                path.AddLine(rectPaneClient.Right, rectPaneClient.Top, rectPaneClient.Left, rectPaneClient.Top);
-                path.AddLine(rectPaneClient.Left, rectPaneClient.Top, rectPaneClient.Left, rectTab.Top);
-                path.AddLine(rectPaneClient.Left, rectTab.Top, rectTab.Right, rectTab.Top);
-            }
-            else
-            {
-                path.AddLine(rectTab.Right, rectTab.Bottom, rectPaneClient.Right, rectTab.Bottom);
-                path.AddLine(rectPaneClient.Right, rectTab.Bottom, rectPaneClient.Right, rectPaneClient.Bottom);
-                path.AddLine(rectPaneClient.Right, rectPaneClient.Bottom, rectPaneClient.Left, rectPaneClient.Bottom);
-                path.AddLine(rectPaneClient.Left, rectPaneClient.Bottom, rectPaneClient.Left, rectTab.Bottom);
-                path.AddLine(rectPaneClient.Left, rectTab.Bottom, rectTab.Right, rectTab.Bottom);
-            }
-            return path;
-        }
-
-        private GraphicsPath GetOutline_ToolWindow(int index)
-        {
-            Rectangle rectTab = GetTabRectangle(index);
-            rectTab.Intersect(TabsRectangle);
-            rectTab = RectangleToScreen(DrawHelper.RtlTransform(this, rectTab));
-            int y = rectTab.Top;
-            Rectangle rectPaneClient = DockPane.RectangleToScreen(DockPane.ClientRectangle);
-
-            GraphicsPath path = new GraphicsPath();
-            GraphicsPath pathTab = GetTabOutline(Tabs[index], true, true);
-            path.AddPath(pathTab, true);
-            path.AddLine(rectTab.Left, rectTab.Top, rectPaneClient.Left, rectTab.Top);
-            path.AddLine(rectPaneClient.Left, rectTab.Top, rectPaneClient.Left, rectPaneClient.Top);
-            path.AddLine(rectPaneClient.Left, rectPaneClient.Top, rectPaneClient.Right, rectPaneClient.Top);
-            path.AddLine(rectPaneClient.Right, rectPaneClient.Top, rectPaneClient.Right, rectTab.Top);
-            path.AddLine(rectPaneClient.Right, rectTab.Top, rectTab.Right, rectTab.Top);
-            return path;
-        }
-
-		private void CalculateTabs()
-		{
-			if (Appearance == DockPane.AppearanceStyle.ToolWindow)
-				CalculateTabs_ToolWindow();
-			else
-				CalculateTabs_Document();
-		}
-
-		private void CalculateTabs_ToolWindow()
-		{
-			if (Tabs.Count <= 1 || DockPane.IsAutoHide)
-				return;
-
-			Rectangle rectTabStrip = TabStripRectangle;
-
-			// Calculate tab widths
-			int countTabs = Tabs.Count;
-            foreach (TabVS2005 tab in Tabs)
-            {
-                tab.MaxWidth = GetMaxTabWidth(Tabs.IndexOf(tab));
-                tab.Flag = false;
-            }
-
-			// Set tab whose max width less than average width
-			bool anyWidthWithinAverage = true;
-			int totalWidth = rectTabStrip.Width - ToolWindowStripGapLeft - ToolWindowStripGapRight;
-			int totalAllocatedWidth = 0;
-			int averageWidth = totalWidth / countTabs;
-			int remainedTabs = countTabs;
-			for (anyWidthWithinAverage=true; anyWidthWithinAverage && remainedTabs>0;)
-			{
-				anyWidthWithinAverage = false;
-				foreach (TabVS2005 tab in Tabs)
-				{
-					if (tab.Flag)
-						continue;
-
-					if (tab.MaxWidth <= averageWidth)
-					{
-						tab.Flag = true;
-						tab.TabWidth = tab.MaxWidth;
-						totalAllocatedWidth += tab.TabWidth;
-						anyWidthWithinAverage = true;
-						remainedTabs--;
-					}
-				}
-				if (remainedTabs != 0)
-					averageWidth = (totalWidth - totalAllocatedWidth) / remainedTabs;
-			}
-
-			// If any tab width not set yet, set it to the average width
-			if (remainedTabs > 0)
-			{
-				int roundUpWidth = (totalWidth - totalAllocatedWidth) - (averageWidth * remainedTabs);
-				foreach (TabVS2005 tab in Tabs)
-				{
-					if (tab.Flag)
-						continue;
-
-					tab.Flag = true;
-					if (roundUpWidth > 0)
-					{
-						tab.TabWidth = averageWidth + 1;
-						roundUpWidth --;
-					}
-					else
-						tab.TabWidth = averageWidth;
-				}
-			}
-
-			// Set the X position of the tabs
-			int x = rectTabStrip.X + ToolWindowStripGapLeft;
-			foreach (TabVS2005 tab in Tabs)
-			{
-				tab.TabX = x;
-				x += tab.TabWidth;
-			}
-		}
-
-        private bool CalculateDocumentTab(Rectangle rectTabStrip, ref int x, int index)
-        {
-            bool overflow = false;
-
-            TabVS2005 tab = Tabs[index] as TabVS2005;
-            tab.MaxWidth = GetMaxTabWidth(index);
-            int width = Math.Min(tab.MaxWidth, DocumentTabMaxWidth);
-            if (x + width < rectTabStrip.Right || index == StartDisplayingTab)
-            {
-                tab.TabX = x;
-                tab.TabWidth = width;
-                EndDisplayingTab = index;
-            }
-            else
-            {
-                tab.TabX = 0;
-                tab.TabWidth = 0;
-                overflow = true;
-            }
-            x += width;
-
-            return overflow;
-        }
-
-        /// <summary>
-        /// Calculate which tabs are displayed and in what order.
-        /// </summary>
-		private void CalculateTabs_Document()
-		{
-            if (m_startDisplayingTab >= Tabs.Count)
-                m_startDisplayingTab = 0;
-
-            Rectangle rectTabStrip = TabsRectangle;
-
-			int x = rectTabStrip.X + rectTabStrip.Height / 2;
-            bool overflow = false;
-
-            // Originally all new documents that were considered overflow
-            // (not enough pane strip space to show all tabs) were added to
-            // the far left (assuming not right to left) and the tabs on the
-            // right were dropped from view. If StartDisplayingTab is not 0
-            // then we are dealing with making sure a specific tab is kept in focus.
-            if (m_startDisplayingTab > 0)
-            {
-                int tempX = x;
-                TabVS2005 tab = Tabs[m_startDisplayingTab] as TabVS2005;
-                tab.MaxWidth = GetMaxTabWidth(m_startDisplayingTab);
-                int width = Math.Min(tab.MaxWidth, DocumentTabMaxWidth);
-
-                // Add the active tab and tabs to the left
-                for (int i = StartDisplayingTab; i >= 0; i--)
-                    CalculateDocumentTab(rectTabStrip, ref tempX, i);
-
-                // Store which tab is the first one displayed so that it
-                // will be drawn correctly (without part of the tab cut off)
-                FirstDisplayingTab = EndDisplayingTab;
-
-                tempX = x; // Reset X location because we are starting over
-                
-                // Start with the first tab displayed - name is a little misleading.
-                // Loop through each tab and set its location. If there is not enough
-                // room for all of them overflow will be returned.
-                for (int i = EndDisplayingTab; i < Tabs.Count; i++)
-                    overflow = CalculateDocumentTab(rectTabStrip, ref tempX, i);
-
-                // If not all tabs are shown then we have an overflow.
-                if (FirstDisplayingTab != 0)
-                    overflow = true;
-            }
-            else
-            {
-                for (int i = StartDisplayingTab; i < Tabs.Count; i++)
-                    overflow = CalculateDocumentTab(rectTabStrip, ref x, i);
-                for (int i = 0; i < StartDisplayingTab; i++)
-                    overflow = CalculateDocumentTab(rectTabStrip, ref x, i);
-
-                FirstDisplayingTab = StartDisplayingTab;
-            }
-
-            if (!overflow)
-            {
-                m_startDisplayingTab = 0;
-                FirstDisplayingTab = 0;
-                x = rectTabStrip.X + rectTabStrip.Height / 2;
-                foreach (TabVS2005 tab in Tabs)
-                {
-                    tab.TabX = x;
-                    x += tab.TabWidth;
-                }
-            }
-            DocumentTabsOverflow = overflow;
-		}
-
-        protected internal override void EnsureTabVisible(IDockContent content)
-		{
-            if (Appearance != DockPane.AppearanceStyle.Document || !Tabs.Contains(content))
-                return;
-
-            CalculateTabs();
-            EnsureDocumentTabVisible(content, true);
-		}
-
-        private bool EnsureDocumentTabVisible(IDockContent content, bool repaint)
-        {
-            int index = Tabs.IndexOf(content);
-            TabVS2005 tab = Tabs[index] as TabVS2005;
-            if (tab.TabWidth != 0)
-                return false;
-
-            StartDisplayingTab = index;
-            if (repaint)
-                Invalidate();
-
-            return true;
-        }
-
-		private int GetMaxTabWidth(int index)
-		{
-			if (Appearance == DockPane.AppearanceStyle.ToolWindow)
-				return GetMaxTabWidth_ToolWindow(index);
-			else
-				return GetMaxTabWidth_Document(index);
-		}
-
-		private int GetMaxTabWidth_ToolWindow(int index)
-		{
-			IDockContent content = Tabs[index].Content;
-			Size sizeString = TextRenderer.MeasureText(content.DockHandler.TabText, TextFont);
-			return ToolWindowImageWidth + sizeString.Width + ToolWindowImageGapLeft
-				+ ToolWindowImageGapRight + ToolWindowTextGapRight;
-		}
-
-		private int GetMaxTabWidth_Document(int index)
-		{
-			IDockContent content = Tabs[index].Content;
-
-            int height = GetTabRectangle_Document(index).Height;
-
-            Size sizeText = TextRenderer.MeasureText(content.DockHandler.TabText, BoldFont, new Size(DocumentTabMaxWidth, height), DocumentTextFormat);
-
-			if (DockPane.DockPanel.ShowDocumentIcon)
-				return sizeText.Width + DocumentIconWidth + DocumentIconGapLeft + DocumentIconGapRight + DocumentTextGapRight;
-			else
-				return sizeText.Width + DocumentIconGapLeft + DocumentTextGapRight;
-		}
-
-		private void DrawTabStrip(Graphics g)
-		{
-			if (Appearance == DockPane.AppearanceStyle.Document)
-				DrawTabStrip_Document(g);
-			else
-				DrawTabStrip_ToolWindow(g);
-		}
-
-		private void DrawTabStrip_Document(Graphics g)
-		{
-			int count = Tabs.Count;
-			if (count == 0)
-				return;
-
-			Rectangle rectTabStrip = TabStripRectangle;
-
-            // Draw the tabs
-			Rectangle rectTabOnly = TabsRectangle;
-			Rectangle rectTab = Rectangle.Empty;
-            TabVS2005 tabActive = null;
-			g.SetClip(DrawHelper.RtlTransform(this, rectTabOnly));
-			for (int i=0; i<count; i++)
-			{
-				rectTab = GetTabRectangle(i);
-                if (Tabs[i].Content == DockPane.ActiveContent)
-                {
-                    tabActive = Tabs[i] as TabVS2005;
-                    continue;
-                }
-				if (rectTab.IntersectsWith(rectTabOnly))
-					DrawTab(g, Tabs[i] as TabVS2005, rectTab);
-			}
-
-            g.SetClip(rectTabStrip);
-
-            if (DockPane.DockPanel.DocumentTabStripLocation == DocumentTabStripLocation.Bottom)
-                g.DrawLine(PenDocumentTabActiveBorder, rectTabStrip.Left, rectTabStrip.Top + 1,
-                	rectTabStrip.Right, rectTabStrip.Top + 1);
-            else
-                g.DrawLine(PenDocumentTabActiveBorder, rectTabStrip.Left, rectTabStrip.Bottom - 1,
-                    rectTabStrip.Right, rectTabStrip.Bottom - 1);
-
-            g.SetClip(DrawHelper.RtlTransform(this, rectTabOnly));
-            if (tabActive != null)
-            {
-                rectTab = GetTabRectangle(Tabs.IndexOf(tabActive));
-                if (rectTab.IntersectsWith(rectTabOnly))
-                    DrawTab(g, tabActive, rectTab);
-            }
-		}
-
-		private void DrawTabStrip_ToolWindow(Graphics g)
-		{
-			Rectangle rectTabStrip = TabStripRectangle;
-
-			g.DrawLine(PenToolWindowTabBorder, rectTabStrip.Left, rectTabStrip.Top,
-				rectTabStrip.Right, rectTabStrip.Top);
-
-			for (int i=0; i<Tabs.Count; i++)
-				DrawTab(g, Tabs[i] as TabVS2005, GetTabRectangle(i));
-		}
-
-		private Rectangle GetTabRectangle(int index)
-		{
-			if (Appearance == DockPane.AppearanceStyle.ToolWindow)
-				return GetTabRectangle_ToolWindow(index);
-			else
-				return GetTabRectangle_Document(index);
-		}
-
-		private Rectangle GetTabRectangle_ToolWindow(int index)
-		{
-			Rectangle rectTabStrip = TabStripRectangle;
-
-			TabVS2005 tab = (TabVS2005)(Tabs[index]);
-			return new Rectangle(tab.TabX, rectTabStrip.Y, tab.TabWidth, rectTabStrip.Height);
-		}
-
-		private Rectangle GetTabRectangle_Document(int index)
-		{
-			Rectangle rectTabStrip = TabStripRectangle;
-			TabVS2005 tab = (TabVS2005)Tabs[index];
-
-            Rectangle rect = new Rectangle();
-            rect.X = tab.TabX;
-            rect.Width = tab.TabWidth;
-            rect.Height = rectTabStrip.Height - DocumentTabGapTop;
-
-            if (DockPane.DockPanel.DocumentTabStripLocation == DocumentTabStripLocation.Bottom)
-                rect.Y = rectTabStrip.Y + DocumentStripGapBottom;
-            else
-                rect.Y = rectTabStrip.Y + DocumentTabGapTop;
-
-			return rect;
-		}
-
-        private void DrawTab(Graphics g, TabVS2005 tab, Rectangle rect)
-		{
-			if (Appearance == DockPane.AppearanceStyle.ToolWindow)
-				DrawTab_ToolWindow(g, tab, rect);
-			else
-				DrawTab_Document(g, tab, rect);
-		}
-
-        private GraphicsPath GetTabOutline(Tab tab, bool rtlTransform, bool toScreen)
-        {
-            if (Appearance == DockPane.AppearanceStyle.ToolWindow)
-                return GetTabOutline_ToolWindow(tab, rtlTransform, toScreen);
-            else
-                return GetTabOutline_Document(tab, rtlTransform, toScreen, false);
-        }
-
-        private GraphicsPath GetTabOutline_ToolWindow(Tab tab, bool rtlTransform, bool toScreen)
-        {
-            Rectangle rect = GetTabRectangle(Tabs.IndexOf(tab));
-            if (rtlTransform)
-                rect = DrawHelper.RtlTransform(this, rect);
-            if (toScreen)
-                rect = RectangleToScreen(rect);
-
-            DrawHelper.GetRoundedCornerTab(GraphicsPath, rect, false);
-            return GraphicsPath;
-        }
-
-        private GraphicsPath GetTabOutline_Document(Tab tab, bool rtlTransform, bool toScreen, bool full)
-        {
-            int curveSize = 6;
-
-            GraphicsPath.Reset();
-            Rectangle rect = GetTabRectangle(Tabs.IndexOf(tab));
-            if (rtlTransform)
-                rect = DrawHelper.RtlTransform(this, rect);
-            if (toScreen)
-                rect = RectangleToScreen(rect);
-
-            // Draws the full angle piece for active content (or first tab)
-            if (tab.Content == DockPane.ActiveContent || full || Tabs.IndexOf(tab) == FirstDisplayingTab)
-            {
-                if (RightToLeft == RightToLeft.Yes)
-                {
-                    if (DockPane.DockPanel.DocumentTabStripLocation == DocumentTabStripLocation.Bottom)
-                    {
-                        // For some reason the next line draws a line that is not hidden like it is when drawing the tab strip on top.
-                        // It is not needed so it has been commented out.
-                        //GraphicsPath.AddLine(rect.Right, rect.Bottom, rect.Right + rect.Height / 2, rect.Bottom);
-                        GraphicsPath.AddLine(rect.Right + rect.Height / 2, rect.Top, rect.Right - rect.Height / 2 + curveSize / 2, rect.Bottom - curveSize / 2);
-                    }
-                    else
-                    {
-                        GraphicsPath.AddLine(rect.Right, rect.Bottom, rect.Right + rect.Height / 2, rect.Bottom);
-                        GraphicsPath.AddLine(rect.Right + rect.Height / 2, rect.Bottom, rect.Right - rect.Height / 2 + curveSize / 2, rect.Top + curveSize / 2);
-                    }
-                }
-                else
-                {
-                    if (DockPane.DockPanel.DocumentTabStripLocation == DocumentTabStripLocation.Bottom)
-                    {
-                        // For some reason the next line draws a line that is not hidden like it is when drawing the tab strip on top.
-                        // It is not needed so it has been commented out.
-                        //GraphicsPath.AddLine(rect.Left, rect.Top, rect.Left - rect.Height / 2, rect.Top);
-                        GraphicsPath.AddLine(rect.Left - rect.Height / 2, rect.Top, rect.Left + rect.Height / 2 - curveSize / 2, rect.Bottom - curveSize / 2);
-                    }
-                    else
-                    {
-                        GraphicsPath.AddLine(rect.Left, rect.Bottom, rect.Left - rect.Height / 2, rect.Bottom);
-                        GraphicsPath.AddLine(rect.Left - rect.Height / 2, rect.Bottom, rect.Left + rect.Height / 2 - curveSize / 2, rect.Top + curveSize / 2);
-                    }
-                }
-            }
-            // Draws the partial angle for non-active content
-            else
-            {
-                if (RightToLeft == RightToLeft.Yes)
-                {
-                    if (DockPane.DockPanel.DocumentTabStripLocation == DocumentTabStripLocation.Bottom)
-                    {
-                        GraphicsPath.AddLine(rect.Right, rect.Top, rect.Right, rect.Top + rect.Height / 2);
-                        GraphicsPath.AddLine(rect.Right, rect.Top + rect.Height / 2, rect.Right - rect.Height / 2 + curveSize / 2, rect.Bottom - curveSize / 2);
-                    }
-                    else
-                    {
-                        GraphicsPath.AddLine(rect.Right, rect.Bottom, rect.Right, rect.Bottom - rect.Height / 2);
-                        GraphicsPath.AddLine(rect.Right, rect.Bottom - rect.Height / 2, rect.Right - rect.Height / 2 + curveSize / 2, rect.Top + curveSize / 2);
-                    }
-                }
-                else
-                {
-                    if (DockPane.DockPanel.DocumentTabStripLocation == DocumentTabStripLocation.Bottom)
-                    {
-                        GraphicsPath.AddLine(rect.Left, rect.Top, rect.Left, rect.Top + rect.Height / 2);
-                        GraphicsPath.AddLine(rect.Left, rect.Top + rect.Height / 2, rect.Left + rect.Height / 2 - curveSize / 2, rect.Bottom - curveSize / 2);
-                    }
-                    else
-                    {
-                        GraphicsPath.AddLine(rect.Left, rect.Bottom, rect.Left, rect.Bottom - rect.Height / 2);
-                        GraphicsPath.AddLine(rect.Left, rect.Bottom - rect.Height / 2, rect.Left + rect.Height / 2 - curveSize / 2, rect.Top + curveSize / 2);
-                    }
-                }
-            }
-
-            if (RightToLeft == RightToLeft.Yes)
-            {
-                if (DockPane.DockPanel.DocumentTabStripLocation == DocumentTabStripLocation.Bottom)
-                {
-                    // Draws the bottom horizontal line (short side)
-                    GraphicsPath.AddLine(rect.Right - rect.Height / 2 - curveSize / 2, rect.Bottom, rect.Left + curveSize / 2, rect.Bottom);
-
-                    // Drawing the rounded corner is not necessary. The path is automatically connected
-                    //GraphicsPath.AddArc(new Rectangle(rect.Left, rect.Top, curveSize, curveSize), 180, 90);
-                }
-                else
-                {
-                    // Draws the bottom horizontal line (short side)
-                    GraphicsPath.AddLine(rect.Right - rect.Height / 2 - curveSize / 2, rect.Top, rect.Left + curveSize / 2, rect.Top);
-                    GraphicsPath.AddArc(new Rectangle(rect.Left, rect.Top, curveSize, curveSize), 180, 90);
-                }
-            }
-            else
-            {
-                if (DockPane.DockPanel.DocumentTabStripLocation == DocumentTabStripLocation.Bottom)
-                {
-                    // Draws the bottom horizontal line (short side)
-                    GraphicsPath.AddLine(rect.Left + rect.Height / 2 + curveSize / 2, rect.Bottom, rect.Right - curveSize / 2, rect.Bottom);
-
-                    // Drawing the rounded corner is not necessary. The path is automatically connected
-                    //GraphicsPath.AddArc(new Rectangle(rect.Right - curveSize, rect.Bottom, curveSize, curveSize), 90, -90);
-                }
-                else
-                {
-                    // Draws the top horizontal line (short side)
-                    GraphicsPath.AddLine(rect.Left + rect.Height / 2 + curveSize / 2, rect.Top, rect.Right - curveSize / 2, rect.Top);
-
-                    // Draws the rounded corner oppposite the angled side
-                    GraphicsPath.AddArc(new Rectangle(rect.Right - curveSize, rect.Top, curveSize, curveSize), -90, 90);
-                }
-            }
-
-            if (Tabs.IndexOf(tab) != EndDisplayingTab &&
-                (Tabs.IndexOf(tab) != Tabs.Count - 1 && Tabs[Tabs.IndexOf(tab) + 1].Content == DockPane.ActiveContent)
-                && !full)
-            {
-                if (RightToLeft == RightToLeft.Yes)
-                {
-                    if (DockPane.DockPanel.DocumentTabStripLocation == DocumentTabStripLocation.Bottom)
-                    {
-                        GraphicsPath.AddLine(rect.Left, rect.Bottom - curveSize / 2, rect.Left, rect.Bottom - rect.Height / 2);
-                        GraphicsPath.AddLine(rect.Left, rect.Bottom - rect.Height / 2, rect.Left + rect.Height / 2, rect.Top);
-                    }
-                    else
-                    {
-                        GraphicsPath.AddLine(rect.Left, rect.Top + curveSize / 2, rect.Left, rect.Top + rect.Height / 2);
-                        GraphicsPath.AddLine(rect.Left, rect.Top + rect.Height / 2, rect.Left + rect.Height / 2, rect.Bottom);
-                    }
-                }
-                else
-                {
-                    if (DockPane.DockPanel.DocumentTabStripLocation == DocumentTabStripLocation.Bottom)
-                    {
-                        GraphicsPath.AddLine(rect.Right, rect.Bottom - curveSize / 2, rect.Right, rect.Bottom - rect.Height / 2);
-                        GraphicsPath.AddLine(rect.Right, rect.Bottom - rect.Height / 2, rect.Right - rect.Height / 2, rect.Top);
-                    }
-                    else
-                    {
-                        GraphicsPath.AddLine(rect.Right, rect.Top + curveSize / 2, rect.Right, rect.Top + rect.Height / 2);
-                        GraphicsPath.AddLine(rect.Right, rect.Top + rect.Height / 2, rect.Right - rect.Height / 2, rect.Bottom);
-                    }
-                }
-            }
-            else
-            {
-                // Draw the vertical line opposite the angled side
-                if (RightToLeft == RightToLeft.Yes)
-                {
-                    if (DockPane.DockPanel.DocumentTabStripLocation == DocumentTabStripLocation.Bottom)
-                        GraphicsPath.AddLine(rect.Left, rect.Bottom - curveSize / 2, rect.Left, rect.Top);
-                    else
-                        GraphicsPath.AddLine(rect.Left, rect.Top + curveSize / 2, rect.Left, rect.Bottom);
-                }
-                else
-                {
-                    if (DockPane.DockPanel.DocumentTabStripLocation == DocumentTabStripLocation.Bottom)
-                        GraphicsPath.AddLine(rect.Right, rect.Bottom - curveSize / 2, rect.Right, rect.Top);
-                    else
-                        GraphicsPath.AddLine(rect.Right, rect.Top + curveSize / 2, rect.Right, rect.Bottom);
-                }
-            }
-
-            return GraphicsPath;
-        }
-
-		private void DrawTab_ToolWindow(Graphics g, TabVS2005 tab, Rectangle rect)
-		{
-			Rectangle rectIcon = new Rectangle(
-				rect.X + ToolWindowImageGapLeft,
-				rect.Y + rect.Height - 1 - ToolWindowImageGapBottom - ToolWindowImageHeight,
-				ToolWindowImageWidth, ToolWindowImageHeight);
-			Rectangle rectText = rectIcon;
-			rectText.X += rectIcon.Width + ToolWindowImageGapRight;
-			rectText.Width = rect.Width - rectIcon.Width - ToolWindowImageGapLeft - 
-				ToolWindowImageGapRight - ToolWindowTextGapRight;
-
-            Rectangle rectTab = DrawHelper.RtlTransform(this, rect);
-            rectText = DrawHelper.RtlTransform(this, rectText);
-            rectIcon = DrawHelper.RtlTransform(this, rectIcon);
-            GraphicsPath path = GetTabOutline(tab, true, false);
-			if (DockPane.ActiveContent == tab.Content)
-			{
-                Color startColor = DockPane.DockPanel.Skin.DockPaneStripSkin.ToolWindowGradient.ActiveTabGradient.StartColor;
-                Color endColor = DockPane.DockPanel.Skin.DockPaneStripSkin.ToolWindowGradient.ActiveTabGradient.EndColor;
-                LinearGradientMode gradientMode = DockPane.DockPanel.Skin.DockPaneStripSkin.ToolWindowGradient.ActiveTabGradient.LinearGradientMode;
-				g.FillPath(new LinearGradientBrush(rectTab, startColor, endColor, gradientMode), path);
-                g.DrawPath(PenToolWindowTabBorder, path);
-
-                Color textColor = DockPane.DockPanel.Skin.DockPaneStripSkin.ToolWindowGradient.ActiveTabGradient.TextColor;
-                TextRenderer.DrawText(g, tab.Content.DockHandler.TabText, TextFont, rectText, textColor, ToolWindowTextFormat);
-			}
-			else
-			{
-                Color startColor = DockPane.DockPanel.Skin.DockPaneStripSkin.ToolWindowGradient.InactiveTabGradient.StartColor;
-                Color endColor = DockPane.DockPanel.Skin.DockPaneStripSkin.ToolWindowGradient.InactiveTabGradient.EndColor;
-                LinearGradientMode gradientMode = DockPane.DockPanel.Skin.DockPaneStripSkin.ToolWindowGradient.InactiveTabGradient.LinearGradientMode;
-                g.FillPath(new LinearGradientBrush(rectTab, startColor, endColor, gradientMode), path);
-
-                if (Tabs.IndexOf(DockPane.ActiveContent) != Tabs.IndexOf(tab) + 1)
-                {
-                    Point pt1 = new Point(rect.Right, rect.Top + ToolWindowTabSeperatorGapTop);
-                    Point pt2 = new Point(rect.Right, rect.Bottom - ToolWindowTabSeperatorGapBottom); 
-                    g.DrawLine(PenToolWindowTabBorder, DrawHelper.RtlTransform(this, pt1), DrawHelper.RtlTransform(this, pt2));
-                }
-
-                Color textColor = DockPane.DockPanel.Skin.DockPaneStripSkin.ToolWindowGradient.InactiveTabGradient.TextColor;
-                TextRenderer.DrawText(g, tab.Content.DockHandler.TabText, TextFont, rectText, textColor, ToolWindowTextFormat);
-			}
-
-			if (rectTab.Contains(rectIcon))
-				g.DrawIcon(tab.Content.DockHandler.Icon, rectIcon);
-		}
-
-		private void DrawTab_Document(Graphics g, TabVS2005 tab, Rectangle rect)
-		{
-            if (tab.TabWidth == 0)
-                return;
-
-            Rectangle rectIcon = new Rectangle(
-                rect.X + DocumentIconGapLeft,
-                rect.Y + rect.Height - 1 - DocumentIconGapBottom - DocumentIconHeight,
-                DocumentIconWidth, DocumentIconHeight);
-            Rectangle rectText = rectIcon;
-            if (DockPane.DockPanel.ShowDocumentIcon)
-            {
-                rectText.X += rectIcon.Width + DocumentIconGapRight;
-                rectText.Y = rect.Y;
-                rectText.Width = rect.Width - rectIcon.Width - DocumentIconGapLeft -
-                    DocumentIconGapRight - DocumentTextGapRight;
-                rectText.Height = rect.Height;
-            }
-            else
-                rectText.Width = rect.Width - DocumentIconGapLeft - DocumentTextGapRight;
-
-            Rectangle rectTab = DrawHelper.RtlTransform(this, rect);
-            Rectangle rectBack = DrawHelper.RtlTransform(this, rect);
-            rectBack.Width += rect.X;
-            rectBack.X = 0;
-
-            rectText = DrawHelper.RtlTransform(this, rectText);
-            rectIcon = DrawHelper.RtlTransform(this, rectIcon);
-            GraphicsPath path = GetTabOutline(tab, true, false);
-            if (DockPane.ActiveContent == tab.Content)
-            {
-                Color startColor = DockPane.DockPanel.Skin.DockPaneStripSkin.DocumentGradient.ActiveTabGradient.StartColor;
-                Color endColor = DockPane.DockPanel.Skin.DockPaneStripSkin.DocumentGradient.ActiveTabGradient.EndColor;
-                LinearGradientMode gradientMode = DockPane.DockPanel.Skin.DockPaneStripSkin.DocumentGradient.ActiveTabGradient.LinearGradientMode;
-                g.FillPath(new LinearGradientBrush(rectBack, startColor, endColor, gradientMode), path);
-                g.DrawPath(PenDocumentTabActiveBorder, path);
-
-                Color textColor = DockPane.DockPanel.Skin.DockPaneStripSkin.DocumentGradient.ActiveTabGradient.TextColor;
-                if (DockPane.IsActiveDocumentPane)
-                    TextRenderer.DrawText(g, tab.Content.DockHandler.TabText, BoldFont, rectText, textColor, DocumentTextFormat);
-                else
-                    TextRenderer.DrawText(g, tab.Content.DockHandler.TabText, TextFont, rectText, textColor, DocumentTextFormat);
-            }
-            else
-            {
-                Color startColor = DockPane.DockPanel.Skin.DockPaneStripSkin.DocumentGradient.InactiveTabGradient.StartColor;
-                Color endColor = DockPane.DockPanel.Skin.DockPaneStripSkin.DocumentGradient.InactiveTabGradient.EndColor;
-                LinearGradientMode gradientMode = DockPane.DockPanel.Skin.DockPaneStripSkin.DocumentGradient.InactiveTabGradient.LinearGradientMode;
-                g.FillPath(new LinearGradientBrush(rectBack, startColor, endColor, gradientMode), path);
-                g.DrawPath(PenDocumentTabInactiveBorder, path);
-
-                Color textColor = DockPane.DockPanel.Skin.DockPaneStripSkin.DocumentGradient.InactiveTabGradient.TextColor;
-                TextRenderer.DrawText(g, tab.Content.DockHandler.TabText, TextFont, rectText, textColor, DocumentTextFormat);
-            }
-
-            if (rectTab.Contains(rectIcon) && DockPane.DockPanel.ShowDocumentIcon)
-                g.DrawIcon(tab.Content.DockHandler.Icon, rectIcon);
-        }
-
-        private Rectangle TabStripRectangle
-        {
-            get
-            {
-                if (Appearance == DockPane.AppearanceStyle.Document)
-                    return TabStripRectangle_Document;
-                else
-                    return TabStripRectangle_ToolWindow;
-            }
-        }
-
-        private Rectangle TabStripRectangle_ToolWindow
-        {
-            get
-            {
-                Rectangle rect = ClientRectangle;
-                return new Rectangle(rect.X, rect.Top + ToolWindowStripGapTop, rect.Width, rect.Height - ToolWindowStripGapTop - ToolWindowStripGapBottom);
-            }
-        }
-
-        private Rectangle TabStripRectangle_Document
-        {
-            get
-            {
-                Rectangle rect = ClientRectangle;
-                return new Rectangle(rect.X, rect.Top + DocumentStripGapTop, rect.Width, rect.Height - DocumentStripGapTop - ToolWindowStripGapBottom);
-            }
-        }
-
-		private Rectangle TabsRectangle
-		{
-			get	
-			{
-				if (Appearance == DockPane.AppearanceStyle.ToolWindow)
-					return TabStripRectangle;
-
-				Rectangle rectWindow = TabStripRectangle;
-				int x = rectWindow.X;
-				int y = rectWindow.Y;
-				int width = rectWindow.Width;
-				int height = rectWindow.Height;
-
-				x += DocumentTabGapLeft;
-				width -= DocumentTabGapLeft + 
-						DocumentTabGapRight +
-						DocumentButtonGapRight +
-						ButtonClose.Width +
-						ButtonWindowList.Width +
-						2 * DocumentButtonGapBetween;
-
-				return new Rectangle(x, y, width, height);
-			}
-		}
-
-        private ContextMenuStrip m_selectMenu;
-        private ContextMenuStrip SelectMenu
-        {
-            get { return m_selectMenu; }
-        }
-
-        private void WindowList_Click(object sender, EventArgs e)
-        {
-            int x = 0;
-            int y = ButtonWindowList.Location.Y + ButtonWindowList.Height;
-
-            SelectMenu.Items.Clear();
-            foreach (TabVS2005 tab in Tabs)
-            {
-                IDockContent content = tab.Content;
-                ToolStripItem item = SelectMenu.Items.Add(content.DockHandler.TabText, content.DockHandler.Icon.ToBitmap());
-                item.Tag = tab.Content;
-                item.Click += new EventHandler(ContextMenuItem_Click);
-            }
-            SelectMenu.Show(ButtonWindowList, x, y);
-        }
-
-        private void ContextMenuItem_Click(object sender, EventArgs e)
-        {
-            ToolStripMenuItem item = sender as ToolStripMenuItem;
-            if (item != null)
-            {
-                IDockContent content = (IDockContent)item.Tag;
-                DockPane.ActiveContent = content;
-            }
-		}
-	
-		private void SetInertButtons()
-		{
-            if (Appearance == DockPane.AppearanceStyle.ToolWindow)
-            {
-                if (m_buttonClose != null)
-                    m_buttonClose.Left = -m_buttonClose.Width;
-
-                if (m_buttonWindowList != null)
-                    m_buttonWindowList.Left = -m_buttonWindowList.Width;
-            }
-            else
-            {
-                bool showCloseButton = DockPane.ActiveContent == null ? true : DockPane.ActiveContent.DockHandler.CloseButton;
-                ButtonClose.Enabled = showCloseButton;
-                ButtonClose.Visible = DockPane.ActiveContent == null ? true : DockPane.ActiveContent.DockHandler.CloseButtonVisible;
-                ButtonClose.RefreshChanges();
-                ButtonWindowList.RefreshChanges();
-            }
-		}
-
-		protected override void OnLayout(LayoutEventArgs levent)
-		{
-            if (Appearance != DockPane.AppearanceStyle.Document)
-            {
-                base.OnLayout(levent);
-                return;
-            }
-
-			Rectangle rectTabStrip = TabStripRectangle;
-
-            // Set position and size of the buttons
-			int buttonWidth = ButtonClose.Image.Width;
-			int buttonHeight = ButtonClose.Image.Height;
-            int height = rectTabStrip.Height - DocumentButtonGapTop - DocumentButtonGapBottom;
-			if (buttonHeight < height)
-			{
-				buttonWidth = buttonWidth * (height / buttonHeight);
-				buttonHeight = height;
-			}
-			Size buttonSize = new Size(buttonWidth, buttonHeight);
-
-			int x = rectTabStrip.X + rectTabStrip.Width - DocumentTabGapLeft
-				- DocumentButtonGapRight - buttonWidth;
-			int y = rectTabStrip.Y + DocumentButtonGapTop;
-            Point point = new Point(x, y);
-			ButtonClose.Bounds = DrawHelper.RtlTransform(this, new Rectangle(point, buttonSize));
-            
-            // If the close button is not visible draw the window list button overtop.
-            // Otherwise it is drawn to the left of the close button.
-            if (ButtonClose.Visible)
-			    point.Offset(-(DocumentButtonGapBetween + buttonWidth), 0);
-            
-            ButtonWindowList.Bounds = DrawHelper.RtlTransform(this, new Rectangle(point, buttonSize));
-
-			OnRefreshChanges();
-
-			base.OnLayout (levent);
-		}
-
-		private void Close_Click(object sender, EventArgs e)
-		{
-			DockPane.CloseActiveContent();
-		}
-
-		protected internal override int HitTest(Point ptMouse)
-		{
-			Rectangle rectTabStrip = TabsRectangle;
-            if (!TabsRectangle.Contains(ptMouse))
-                return -1;
-
-            foreach (Tab tab in Tabs)
-            {
-                GraphicsPath path = GetTabOutline(tab, true, false);
-                if (path.IsVisible(ptMouse))
-                    return Tabs.IndexOf(tab);
-            }
-            return -1;
-		}
-
-		protected override void OnMouseHover(EventArgs e)
-		{
-			int index = HitTest(PointToClient(Control.MousePosition));
-			string toolTip = string.Empty;
-
-			base.OnMouseHover(e);
-
-            if (index != -1)
-			{
-                TabVS2005 tab = Tabs[index] as TabVS2005;
-                if (!String.IsNullOrEmpty(tab.Content.DockHandler.ToolTipText))
-                    toolTip = tab.Content.DockHandler.ToolTipText;
-                else if (tab.MaxWidth > tab.TabWidth)
-                    toolTip = tab.Content.DockHandler.TabText;
-			}
-
-			if (m_toolTip.GetToolTip(this) != toolTip)
-			{
-				m_toolTip.Active = false;
-				m_toolTip.SetToolTip(this, toolTip);
-				m_toolTip.Active = true;
-			}
-
-            // requires further tracking of mouse hover behavior,
-            ResetMouseEventArgs();
-		}
-
-        protected override void OnRightToLeftChanged(EventArgs e)
-        {
-            base.OnRightToLeftChanged(e);
-            PerformLayout();
-        }
-	}
+      return height;
+    }
+
+    protected override void OnPaint(PaintEventArgs e) {
+      Rectangle rect = TabsRectangle;
+
+      if (Appearance == DockPane.AppearanceStyle.Document) {
+        rect.X -= DocumentTabGapLeft;
+
+        // Add these values back in so that the DockStrip color is drawn
+        // beneath the close button and window list button.
+        rect.Width += DocumentTabGapLeft +
+            DocumentTabGapRight +
+            DocumentButtonGapRight +
+            ButtonClose.Width +
+            ButtonWindowList.Width;
+
+        // It is possible depending on the DockPanel DocumentStyle to have
+        // a Document without a DockStrip.
+        if (rect.Width > 0 && rect.Height > 0) {
+          Color startColor = DockPane.DockPanel.Skin.DockPaneStripSkin.DocumentGradient.DockStripGradient.StartColor;
+          Color endColor = DockPane.DockPanel.Skin.DockPaneStripSkin.DocumentGradient.DockStripGradient.EndColor;
+          LinearGradientMode gradientMode = DockPane.DockPanel.Skin.DockPaneStripSkin.DocumentGradient.DockStripGradient.LinearGradientMode;
+          using (LinearGradientBrush brush = new LinearGradientBrush(rect, startColor, endColor, gradientMode)) {
+            e.Graphics.FillRectangle(brush, rect);
+          }
+        }
+      } else {
+        Color startColor = DockPane.DockPanel.Skin.DockPaneStripSkin.ToolWindowGradient.DockStripGradient.StartColor;
+        Color endColor = DockPane.DockPanel.Skin.DockPaneStripSkin.ToolWindowGradient.DockStripGradient.EndColor;
+        LinearGradientMode gradientMode = DockPane.DockPanel.Skin.DockPaneStripSkin.ToolWindowGradient.DockStripGradient.LinearGradientMode;
+        using (LinearGradientBrush brush = new LinearGradientBrush(rect, startColor, endColor, gradientMode)) {
+          e.Graphics.FillRectangle(brush, rect);
+        }
+      }
+      base.OnPaint(e);
+      CalculateTabs();
+      if (Appearance == DockPane.AppearanceStyle.Document && DockPane.ActiveContent != null) {
+        if (EnsureDocumentTabVisible(DockPane.ActiveContent, false))
+          CalculateTabs();
+      }
+
+      DrawTabStrip(e.Graphics);
+    }
+
+    protected override void OnRefreshChanges() {
+      SetInertButtons();
+      Invalidate();
+    }
+
+    protected internal override GraphicsPath GetOutline(int index) {
+
+      if (Appearance == DockPane.AppearanceStyle.Document)
+        return GetOutline_Document(index);
+      else
+        return GetOutline_ToolWindow(index);
+
+    }
+
+    private GraphicsPath GetOutline_Document(int index) {
+      Rectangle rectTab = GetTabRectangle(index);
+      rectTab.X -= rectTab.Height / 2;
+      rectTab.Intersect(TabsRectangle);
+      rectTab = RectangleToScreen(DrawHelper.RtlTransform(this, rectTab));
+      Rectangle rectPaneClient = DockPane.RectangleToScreen(DockPane.ClientRectangle);
+
+      GraphicsPath path = new GraphicsPath();
+      GraphicsPath pathTab = GetTabOutline_Document(Tabs[index], true, true, true);
+      path.AddPath(pathTab, true);
+
+      if (DockPane.DockPanel.DocumentTabStripLocation == DocumentTabStripLocation.Bottom) {
+        path.AddLine(rectTab.Right, rectTab.Top, rectPaneClient.Right, rectTab.Top);
+        path.AddLine(rectPaneClient.Right, rectTab.Top, rectPaneClient.Right, rectPaneClient.Top);
+        path.AddLine(rectPaneClient.Right, rectPaneClient.Top, rectPaneClient.Left, rectPaneClient.Top);
+        path.AddLine(rectPaneClient.Left, rectPaneClient.Top, rectPaneClient.Left, rectTab.Top);
+        path.AddLine(rectPaneClient.Left, rectTab.Top, rectTab.Right, rectTab.Top);
+      } else {
+        path.AddLine(rectTab.Right, rectTab.Bottom, rectPaneClient.Right, rectTab.Bottom);
+        path.AddLine(rectPaneClient.Right, rectTab.Bottom, rectPaneClient.Right, rectPaneClient.Bottom);
+        path.AddLine(rectPaneClient.Right, rectPaneClient.Bottom, rectPaneClient.Left, rectPaneClient.Bottom);
+        path.AddLine(rectPaneClient.Left, rectPaneClient.Bottom, rectPaneClient.Left, rectTab.Bottom);
+        path.AddLine(rectPaneClient.Left, rectTab.Bottom, rectTab.Right, rectTab.Bottom);
+      }
+      return path;
+    }
+
+    private GraphicsPath GetOutline_ToolWindow(int index) {
+      Rectangle rectTab = GetTabRectangle(index);
+      rectTab.Intersect(TabsRectangle);
+      rectTab = RectangleToScreen(DrawHelper.RtlTransform(this, rectTab));
+      int y = rectTab.Top;
+      Rectangle rectPaneClient = DockPane.RectangleToScreen(DockPane.ClientRectangle);
+
+      GraphicsPath path = new GraphicsPath();
+      GraphicsPath pathTab = GetTabOutline(Tabs[index], true, true);
+      path.AddPath(pathTab, true);
+      path.AddLine(rectTab.Left, rectTab.Top, rectPaneClient.Left, rectTab.Top);
+      path.AddLine(rectPaneClient.Left, rectTab.Top, rectPaneClient.Left, rectPaneClient.Top);
+      path.AddLine(rectPaneClient.Left, rectPaneClient.Top, rectPaneClient.Right, rectPaneClient.Top);
+      path.AddLine(rectPaneClient.Right, rectPaneClient.Top, rectPaneClient.Right, rectTab.Top);
+      path.AddLine(rectPaneClient.Right, rectTab.Top, rectTab.Right, rectTab.Top);
+      return path;
+    }
+
+    private void CalculateTabs() {
+      if (Appearance == DockPane.AppearanceStyle.ToolWindow)
+        CalculateTabs_ToolWindow();
+      else
+        CalculateTabs_Document();
+    }
+
+    private void CalculateTabs_ToolWindow() {
+      if (Tabs.Count <= 1 || DockPane.IsAutoHide)
+        return;
+
+      Rectangle rectTabStrip = TabStripRectangle;
+
+      // Calculate tab widths
+      int countTabs = Tabs.Count;
+      foreach (TabVS2005 tab in Tabs) {
+        tab.MaxWidth = GetMaxTabWidth(Tabs.IndexOf(tab));
+        tab.Flag = false;
+      }
+
+      // Set tab whose max width less than average width
+      bool anyWidthWithinAverage = true;
+      int totalWidth = rectTabStrip.Width - ToolWindowStripGapLeft - ToolWindowStripGapRight;
+      int totalAllocatedWidth = 0;
+      int averageWidth = totalWidth / countTabs;
+      int remainedTabs = countTabs;
+      for (anyWidthWithinAverage = true; anyWidthWithinAverage && remainedTabs > 0; ) {
+        anyWidthWithinAverage = false;
+        foreach (TabVS2005 tab in Tabs) {
+          if (tab.Flag)
+            continue;
+
+          if (tab.MaxWidth <= averageWidth) {
+            tab.Flag = true;
+            tab.TabWidth = tab.MaxWidth;
+            totalAllocatedWidth += tab.TabWidth;
+            anyWidthWithinAverage = true;
+            remainedTabs--;
+          }
+        }
+        if (remainedTabs != 0)
+          averageWidth = (totalWidth - totalAllocatedWidth) / remainedTabs;
+      }
+
+      // If any tab width not set yet, set it to the average width
+      if (remainedTabs > 0) {
+        int roundUpWidth = (totalWidth - totalAllocatedWidth) - (averageWidth * remainedTabs);
+        foreach (TabVS2005 tab in Tabs) {
+          if (tab.Flag)
+            continue;
+
+          tab.Flag = true;
+          if (roundUpWidth > 0) {
+            tab.TabWidth = averageWidth + 1;
+            roundUpWidth--;
+          } else
+            tab.TabWidth = averageWidth;
+        }
+      }
+
+      // Set the X position of the tabs
+      int x = rectTabStrip.X + ToolWindowStripGapLeft;
+      foreach (TabVS2005 tab in Tabs) {
+        tab.TabX = x;
+        x += tab.TabWidth;
+      }
+    }
+
+    private bool CalculateDocumentTab(Rectangle rectTabStrip, ref int x, int index) {
+      bool overflow = false;
+
+      TabVS2005 tab = Tabs[index] as TabVS2005;
+      tab.MaxWidth = GetMaxTabWidth(index);
+      int width = Math.Min(tab.MaxWidth, DocumentTabMaxWidth);
+      if (x + width < rectTabStrip.Right || index == StartDisplayingTab) {
+        tab.TabX = x;
+        tab.TabWidth = width;
+        EndDisplayingTab = index;
+      } else {
+        tab.TabX = 0;
+        tab.TabWidth = 0;
+        overflow = true;
+      }
+      x += width;
+
+      return overflow;
+    }
+
+    /// <summary>
+    /// Calculate which tabs are displayed and in what order.
+    /// </summary>
+    private void CalculateTabs_Document() {
+      if (m_startDisplayingTab >= Tabs.Count)
+        m_startDisplayingTab = 0;
+
+      Rectangle rectTabStrip = TabsRectangle;
+
+      int x = rectTabStrip.X + rectTabStrip.Height / 2;
+      bool overflow = false;
+
+      // Originally all new documents that were considered overflow
+      // (not enough pane strip space to show all tabs) were added to
+      // the far left (assuming not right to left) and the tabs on the
+      // right were dropped from view. If StartDisplayingTab is not 0
+      // then we are dealing with making sure a specific tab is kept in focus.
+      if (m_startDisplayingTab > 0) {
+        int tempX = x;
+        TabVS2005 tab = Tabs[m_startDisplayingTab] as TabVS2005;
+        tab.MaxWidth = GetMaxTabWidth(m_startDisplayingTab);
+        int width = Math.Min(tab.MaxWidth, DocumentTabMaxWidth);
+
+        // Add the active tab and tabs to the left
+        for (int i = StartDisplayingTab; i >= 0; i--)
+          CalculateDocumentTab(rectTabStrip, ref tempX, i);
+
+        // Store which tab is the first one displayed so that it
+        // will be drawn correctly (without part of the tab cut off)
+        FirstDisplayingTab = EndDisplayingTab;
+
+        tempX = x; // Reset X location because we are starting over
+
+        // Start with the first tab displayed - name is a little misleading.
+        // Loop through each tab and set its location. If there is not enough
+        // room for all of them overflow will be returned.
+        for (int i = EndDisplayingTab; i < Tabs.Count; i++)
+          overflow = CalculateDocumentTab(rectTabStrip, ref tempX, i);
+
+        // If not all tabs are shown then we have an overflow.
+        if (FirstDisplayingTab != 0)
+          overflow = true;
+      } else {
+        for (int i = StartDisplayingTab; i < Tabs.Count; i++)
+          overflow = CalculateDocumentTab(rectTabStrip, ref x, i);
+        for (int i = 0; i < StartDisplayingTab; i++)
+          overflow = CalculateDocumentTab(rectTabStrip, ref x, i);
+
+        FirstDisplayingTab = StartDisplayingTab;
+      }
+
+      if (!overflow) {
+        m_startDisplayingTab = 0;
+        FirstDisplayingTab = 0;
+        x = rectTabStrip.X + rectTabStrip.Height / 2;
+        foreach (TabVS2005 tab in Tabs) {
+          tab.TabX = x;
+          x += tab.TabWidth;
+        }
+      }
+      DocumentTabsOverflow = overflow;
+    }
+
+    protected internal override void EnsureTabVisible(IDockContent content) {
+      if (Appearance != DockPane.AppearanceStyle.Document || !Tabs.Contains(content))
+        return;
+
+      CalculateTabs();
+      EnsureDocumentTabVisible(content, true);
+    }
+
+    private bool EnsureDocumentTabVisible(IDockContent content, bool repaint) {
+      int index = Tabs.IndexOf(content);
+      TabVS2005 tab = Tabs[index] as TabVS2005;
+      if (tab.TabWidth != 0)
+        return false;
+
+      StartDisplayingTab = index;
+      if (repaint)
+        Invalidate();
+
+      return true;
+    }
+
+    private int GetMaxTabWidth(int index) {
+      if (Appearance == DockPane.AppearanceStyle.ToolWindow)
+        return GetMaxTabWidth_ToolWindow(index);
+      else
+        return GetMaxTabWidth_Document(index);
+    }
+
+    private int GetMaxTabWidth_ToolWindow(int index) {
+      IDockContent content = Tabs[index].Content;
+      Size sizeString = TextRenderer.MeasureText(content.DockHandler.TabText, TextFont);
+      return ToolWindowImageWidth + sizeString.Width + ToolWindowImageGapLeft
+        + ToolWindowImageGapRight + ToolWindowTextGapRight;
+    }
+
+    private int GetMaxTabWidth_Document(int index) {
+      IDockContent content = Tabs[index].Content;
+
+      int height = GetTabRectangle_Document(index).Height;
+
+      Size sizeText = TextRenderer.MeasureText(content.DockHandler.TabText, BoldFont, new Size(DocumentTabMaxWidth, height), DocumentTextFormat);
+
+      if (DockPane.DockPanel.ShowDocumentIcon)
+        return sizeText.Width + DocumentIconWidth + DocumentIconGapLeft + DocumentIconGapRight + DocumentTextGapRight;
+      else
+        return sizeText.Width + DocumentIconGapLeft + DocumentTextGapRight;
+    }
+
+    private void DrawTabStrip(Graphics g) {
+      if (Appearance == DockPane.AppearanceStyle.Document)
+        DrawTabStrip_Document(g);
+      else
+        DrawTabStrip_ToolWindow(g);
+    }
+
+    private void DrawTabStrip_Document(Graphics g) {
+      int count = Tabs.Count;
+      if (count == 0)
+        return;
+
+      Rectangle rectTabStrip = TabStripRectangle;
+
+      // Draw the tabs
+      Rectangle rectTabOnly = TabsRectangle;
+      Rectangle rectTab = Rectangle.Empty;
+      TabVS2005 tabActive = null;
+      g.SetClip(DrawHelper.RtlTransform(this, rectTabOnly));
+      for (int i = 0; i < count; i++) {
+        rectTab = GetTabRectangle(i);
+        if (Tabs[i].Content == DockPane.ActiveContent) {
+          tabActive = Tabs[i] as TabVS2005;
+          continue;
+        }
+        if (rectTab.IntersectsWith(rectTabOnly))
+          DrawTab(g, Tabs[i] as TabVS2005, rectTab);
+      }
+
+      g.SetClip(rectTabStrip);
+
+      if (DockPane.DockPanel.DocumentTabStripLocation == DocumentTabStripLocation.Bottom)
+        g.DrawLine(PenDocumentTabActiveBorder, rectTabStrip.Left, rectTabStrip.Top + 1,
+          rectTabStrip.Right, rectTabStrip.Top + 1);
+      else
+        g.DrawLine(PenDocumentTabActiveBorder, rectTabStrip.Left, rectTabStrip.Bottom - 1,
+            rectTabStrip.Right, rectTabStrip.Bottom - 1);
+
+      g.SetClip(DrawHelper.RtlTransform(this, rectTabOnly));
+      if (tabActive != null) {
+        rectTab = GetTabRectangle(Tabs.IndexOf(tabActive));
+        if (rectTab.IntersectsWith(rectTabOnly))
+          DrawTab(g, tabActive, rectTab);
+      }
+    }
+
+    private void DrawTabStrip_ToolWindow(Graphics g) {
+      Rectangle rectTabStrip = TabStripRectangle;
+
+      g.DrawLine(PenToolWindowTabBorder, rectTabStrip.Left, rectTabStrip.Top,
+        rectTabStrip.Right, rectTabStrip.Top);
+
+      for (int i = 0; i < Tabs.Count; i++)
+        DrawTab(g, Tabs[i] as TabVS2005, GetTabRectangle(i));
+    }
+
+    private Rectangle GetTabRectangle(int index) {
+      if (Appearance == DockPane.AppearanceStyle.ToolWindow)
+        return GetTabRectangle_ToolWindow(index);
+      else
+        return GetTabRectangle_Document(index);
+    }
+
+    private Rectangle GetTabRectangle_ToolWindow(int index) {
+      Rectangle rectTabStrip = TabStripRectangle;
+
+      TabVS2005 tab = (TabVS2005)(Tabs[index]);
+      return new Rectangle(tab.TabX, rectTabStrip.Y, tab.TabWidth, rectTabStrip.Height);
+    }
+
+    private Rectangle GetTabRectangle_Document(int index) {
+      Rectangle rectTabStrip = TabStripRectangle;
+      TabVS2005 tab = (TabVS2005)Tabs[index];
+
+      Rectangle rect = new Rectangle();
+      rect.X = tab.TabX;
+      rect.Width = tab.TabWidth;
+      rect.Height = rectTabStrip.Height - DocumentTabGapTop;
+
+      if (DockPane.DockPanel.DocumentTabStripLocation == DocumentTabStripLocation.Bottom)
+        rect.Y = rectTabStrip.Y + DocumentStripGapBottom;
+      else
+        rect.Y = rectTabStrip.Y + DocumentTabGapTop;
+
+      return rect;
+    }
+
+    private void DrawTab(Graphics g, TabVS2005 tab, Rectangle rect) {
+      if (Appearance == DockPane.AppearanceStyle.ToolWindow)
+        DrawTab_ToolWindow(g, tab, rect);
+      else
+        DrawTab_Document(g, tab, rect);
+    }
+
+    private GraphicsPath GetTabOutline(Tab tab, bool rtlTransform, bool toScreen) {
+      if (Appearance == DockPane.AppearanceStyle.ToolWindow)
+        return GetTabOutline_ToolWindow(tab, rtlTransform, toScreen);
+      else
+        return GetTabOutline_Document(tab, rtlTransform, toScreen, false);
+    }
+
+    private GraphicsPath GetTabOutline_ToolWindow(Tab tab, bool rtlTransform, bool toScreen) {
+      Rectangle rect = GetTabRectangle(Tabs.IndexOf(tab));
+      if (rtlTransform)
+        rect = DrawHelper.RtlTransform(this, rect);
+      if (toScreen)
+        rect = RectangleToScreen(rect);
+
+      DrawHelper.GetRoundedCornerTab(GraphicsPath, rect, false);
+      return GraphicsPath;
+    }
+
+    private GraphicsPath GetTabOutline_Document(Tab tab, bool rtlTransform, bool toScreen, bool full) {
+      int curveSize = 6;
+
+      GraphicsPath.Reset();
+      Rectangle rect = GetTabRectangle(Tabs.IndexOf(tab));
+      if (rtlTransform)
+        rect = DrawHelper.RtlTransform(this, rect);
+      if (toScreen)
+        rect = RectangleToScreen(rect);
+
+      // Draws the full angle piece for active content (or first tab)
+      if (tab.Content == DockPane.ActiveContent || full || Tabs.IndexOf(tab) == FirstDisplayingTab) {
+        if (RightToLeft == RightToLeft.Yes) {
+          if (DockPane.DockPanel.DocumentTabStripLocation == DocumentTabStripLocation.Bottom) {
+            // For some reason the next line draws a line that is not hidden like it is when drawing the tab strip on top.
+            // It is not needed so it has been commented out.
+            //GraphicsPath.AddLine(rect.Right, rect.Bottom, rect.Right + rect.Height / 2, rect.Bottom);
+            GraphicsPath.AddLine(rect.Right + rect.Height / 2, rect.Top, rect.Right - rect.Height / 2 + curveSize / 2, rect.Bottom - curveSize / 2);
+          } else {
+            GraphicsPath.AddLine(rect.Right, rect.Bottom, rect.Right + rect.Height / 2, rect.Bottom);
+            GraphicsPath.AddLine(rect.Right + rect.Height / 2, rect.Bottom, rect.Right - rect.Height / 2 + curveSize / 2, rect.Top + curveSize / 2);
+          }
+        } else {
+          if (DockPane.DockPanel.DocumentTabStripLocation == DocumentTabStripLocation.Bottom) {
+            // For some reason the next line draws a line that is not hidden like it is when drawing the tab strip on top.
+            // It is not needed so it has been commented out.
+            //GraphicsPath.AddLine(rect.Left, rect.Top, rect.Left - rect.Height / 2, rect.Top);
+            GraphicsPath.AddLine(rect.Left - rect.Height / 2, rect.Top, rect.Left + rect.Height / 2 - curveSize / 2, rect.Bottom - curveSize / 2);
+          } else {
+            GraphicsPath.AddLine(rect.Left, rect.Bottom, rect.Left - rect.Height / 2, rect.Bottom);
+            GraphicsPath.AddLine(rect.Left - rect.Height / 2, rect.Bottom, rect.Left + rect.Height / 2 - curveSize / 2, rect.Top + curveSize / 2);
+          }
+        }
+      }
+        // Draws the partial angle for non-active content
+      else {
+        if (RightToLeft == RightToLeft.Yes) {
+          if (DockPane.DockPanel.DocumentTabStripLocation == DocumentTabStripLocation.Bottom) {
+            GraphicsPath.AddLine(rect.Right, rect.Top, rect.Right, rect.Top + rect.Height / 2);
+            GraphicsPath.AddLine(rect.Right, rect.Top + rect.Height / 2, rect.Right - rect.Height / 2 + curveSize / 2, rect.Bottom - curveSize / 2);
+          } else {
+            GraphicsPath.AddLine(rect.Right, rect.Bottom, rect.Right, rect.Bottom - rect.Height / 2);
+            GraphicsPath.AddLine(rect.Right, rect.Bottom - rect.Height / 2, rect.Right - rect.Height / 2 + curveSize / 2, rect.Top + curveSize / 2);
+          }
+        } else {
+          if (DockPane.DockPanel.DocumentTabStripLocation == DocumentTabStripLocation.Bottom) {
+            GraphicsPath.AddLine(rect.Left, rect.Top, rect.Left, rect.Top + rect.Height / 2);
+            GraphicsPath.AddLine(rect.Left, rect.Top + rect.Height / 2, rect.Left + rect.Height / 2 - curveSize / 2, rect.Bottom - curveSize / 2);
+          } else {
+            GraphicsPath.AddLine(rect.Left, rect.Bottom, rect.Left, rect.Bottom - rect.Height / 2);
+            GraphicsPath.AddLine(rect.Left, rect.Bottom - rect.Height / 2, rect.Left + rect.Height / 2 - curveSize / 2, rect.Top + curveSize / 2);
+          }
+        }
+      }
+
+      if (RightToLeft == RightToLeft.Yes) {
+        if (DockPane.DockPanel.DocumentTabStripLocation == DocumentTabStripLocation.Bottom) {
+          // Draws the bottom horizontal line (short side)
+          GraphicsPath.AddLine(rect.Right - rect.Height / 2 - curveSize / 2, rect.Bottom, rect.Left + curveSize / 2, rect.Bottom);
+
+          // Drawing the rounded corner is not necessary. The path is automatically connected
+          //GraphicsPath.AddArc(new Rectangle(rect.Left, rect.Top, curveSize, curveSize), 180, 90);
+        } else {
+          // Draws the bottom horizontal line (short side)
+          GraphicsPath.AddLine(rect.Right - rect.Height / 2 - curveSize / 2, rect.Top, rect.Left + curveSize / 2, rect.Top);
+          GraphicsPath.AddArc(new Rectangle(rect.Left, rect.Top, curveSize, curveSize), 180, 90);
+        }
+      } else {
+        if (DockPane.DockPanel.DocumentTabStripLocation == DocumentTabStripLocation.Bottom) {
+          // Draws the bottom horizontal line (short side)
+          GraphicsPath.AddLine(rect.Left + rect.Height / 2 + curveSize / 2, rect.Bottom, rect.Right - curveSize / 2, rect.Bottom);
+
+          // Drawing the rounded corner is not necessary. The path is automatically connected
+          //GraphicsPath.AddArc(new Rectangle(rect.Right - curveSize, rect.Bottom, curveSize, curveSize), 90, -90);
+        } else {
+          // Draws the top horizontal line (short side)
+          GraphicsPath.AddLine(rect.Left + rect.Height / 2 + curveSize / 2, rect.Top, rect.Right - curveSize / 2, rect.Top);
+
+          // Draws the rounded corner oppposite the angled side
+          GraphicsPath.AddArc(new Rectangle(rect.Right - curveSize, rect.Top, curveSize, curveSize), -90, 90);
+        }
+      }
+
+      if (Tabs.IndexOf(tab) != EndDisplayingTab &&
+          (Tabs.IndexOf(tab) != Tabs.Count - 1 && Tabs[Tabs.IndexOf(tab) + 1].Content == DockPane.ActiveContent)
+          && !full) {
+        if (RightToLeft == RightToLeft.Yes) {
+          if (DockPane.DockPanel.DocumentTabStripLocation == DocumentTabStripLocation.Bottom) {
+            GraphicsPath.AddLine(rect.Left, rect.Bottom - curveSize / 2, rect.Left, rect.Bottom - rect.Height / 2);
+            GraphicsPath.AddLine(rect.Left, rect.Bottom - rect.Height / 2, rect.Left + rect.Height / 2, rect.Top);
+          } else {
+            GraphicsPath.AddLine(rect.Left, rect.Top + curveSize / 2, rect.Left, rect.Top + rect.Height / 2);
+            GraphicsPath.AddLine(rect.Left, rect.Top + rect.Height / 2, rect.Left + rect.Height / 2, rect.Bottom);
+          }
+        } else {
+          if (DockPane.DockPanel.DocumentTabStripLocation == DocumentTabStripLocation.Bottom) {
+            GraphicsPath.AddLine(rect.Right, rect.Bottom - curveSize / 2, rect.Right, rect.Bottom - rect.Height / 2);
+            GraphicsPath.AddLine(rect.Right, rect.Bottom - rect.Height / 2, rect.Right - rect.Height / 2, rect.Top);
+          } else {
+            GraphicsPath.AddLine(rect.Right, rect.Top + curveSize / 2, rect.Right, rect.Top + rect.Height / 2);
+            GraphicsPath.AddLine(rect.Right, rect.Top + rect.Height / 2, rect.Right - rect.Height / 2, rect.Bottom);
+          }
+        }
+      } else {
+        // Draw the vertical line opposite the angled side
+        if (RightToLeft == RightToLeft.Yes) {
+          if (DockPane.DockPanel.DocumentTabStripLocation == DocumentTabStripLocation.Bottom)
+            GraphicsPath.AddLine(rect.Left, rect.Bottom - curveSize / 2, rect.Left, rect.Top);
+          else
+            GraphicsPath.AddLine(rect.Left, rect.Top + curveSize / 2, rect.Left, rect.Bottom);
+        } else {
+          if (DockPane.DockPanel.DocumentTabStripLocation == DocumentTabStripLocation.Bottom)
+            GraphicsPath.AddLine(rect.Right, rect.Bottom - curveSize / 2, rect.Right, rect.Top);
+          else
+            GraphicsPath.AddLine(rect.Right, rect.Top + curveSize / 2, rect.Right, rect.Bottom);
+        }
+      }
+
+      return GraphicsPath;
+    }
+
+    private void DrawTab_ToolWindow(Graphics g, TabVS2005 tab, Rectangle rect) {
+      Rectangle rectIcon = new Rectangle(
+        rect.X + ToolWindowImageGapLeft,
+        rect.Y + rect.Height - 1 - ToolWindowImageGapBottom - ToolWindowImageHeight,
+        ToolWindowImageWidth, ToolWindowImageHeight);
+      Rectangle rectText = rectIcon;
+      rectText.X += rectIcon.Width + ToolWindowImageGapRight;
+      rectText.Width = rect.Width - rectIcon.Width - ToolWindowImageGapLeft -
+        ToolWindowImageGapRight - ToolWindowTextGapRight;
+
+      Rectangle rectTab = DrawHelper.RtlTransform(this, rect);
+      rectText = DrawHelper.RtlTransform(this, rectText);
+      rectIcon = DrawHelper.RtlTransform(this, rectIcon);
+      GraphicsPath path = GetTabOutline(tab, true, false);
+      if (DockPane.ActiveContent == tab.Content) {
+        Color startColor = DockPane.DockPanel.Skin.DockPaneStripSkin.ToolWindowGradient.ActiveTabGradient.StartColor;
+        Color endColor = DockPane.DockPanel.Skin.DockPaneStripSkin.ToolWindowGradient.ActiveTabGradient.EndColor;
+        LinearGradientMode gradientMode = DockPane.DockPanel.Skin.DockPaneStripSkin.ToolWindowGradient.ActiveTabGradient.LinearGradientMode;
+        g.FillPath(new LinearGradientBrush(rectTab, startColor, endColor, gradientMode), path);
+        g.DrawPath(PenToolWindowTabBorder, path);
+
+        Color textColor = DockPane.DockPanel.Skin.DockPaneStripSkin.ToolWindowGradient.ActiveTabGradient.TextColor;
+        TextRenderer.DrawText(g, tab.Content.DockHandler.TabText, TextFont, rectText, textColor, ToolWindowTextFormat);
+      } else {
+        Color startColor = DockPane.DockPanel.Skin.DockPaneStripSkin.ToolWindowGradient.InactiveTabGradient.StartColor;
+        Color endColor = DockPane.DockPanel.Skin.DockPaneStripSkin.ToolWindowGradient.InactiveTabGradient.EndColor;
+        LinearGradientMode gradientMode = DockPane.DockPanel.Skin.DockPaneStripSkin.ToolWindowGradient.InactiveTabGradient.LinearGradientMode;
+        g.FillPath(new LinearGradientBrush(rectTab, startColor, endColor, gradientMode), path);
+
+        if (Tabs.IndexOf(DockPane.ActiveContent) != Tabs.IndexOf(tab) + 1) {
+          Point pt1 = new Point(rect.Right, rect.Top + ToolWindowTabSeperatorGapTop);
+          Point pt2 = new Point(rect.Right, rect.Bottom - ToolWindowTabSeperatorGapBottom);
+          g.DrawLine(PenToolWindowTabBorder, DrawHelper.RtlTransform(this, pt1), DrawHelper.RtlTransform(this, pt2));
+        }
+
+        Color textColor = DockPane.DockPanel.Skin.DockPaneStripSkin.ToolWindowGradient.InactiveTabGradient.TextColor;
+        TextRenderer.DrawText(g, tab.Content.DockHandler.TabText, TextFont, rectText, textColor, ToolWindowTextFormat);
+      }
+
+      if (rectTab.Contains(rectIcon))
+        g.DrawIcon(tab.Content.DockHandler.Icon, rectIcon);
+    }
+
+    private void DrawTab_Document(Graphics g, TabVS2005 tab, Rectangle rect) {
+      if (tab.TabWidth == 0)
+        return;
+
+      Rectangle rectIcon = new Rectangle(
+          rect.X + DocumentIconGapLeft,
+          rect.Y + rect.Height - 1 - DocumentIconGapBottom - DocumentIconHeight,
+          DocumentIconWidth, DocumentIconHeight);
+      Rectangle rectText = rectIcon;
+      if (DockPane.DockPanel.ShowDocumentIcon) {
+        rectText.X += rectIcon.Width + DocumentIconGapRight;
+        rectText.Y = rect.Y;
+        rectText.Width = rect.Width - rectIcon.Width - DocumentIconGapLeft -
+            DocumentIconGapRight - DocumentTextGapRight;
+        rectText.Height = rect.Height;
+      } else
+        rectText.Width = rect.Width - DocumentIconGapLeft - DocumentTextGapRight;
+
+      Rectangle rectTab = DrawHelper.RtlTransform(this, rect);
+      Rectangle rectBack = DrawHelper.RtlTransform(this, rect);
+      rectBack.Width += rect.X;
+      rectBack.X = 0;
+
+      rectText = DrawHelper.RtlTransform(this, rectText);
+      rectIcon = DrawHelper.RtlTransform(this, rectIcon);
+      GraphicsPath path = GetTabOutline(tab, true, false);
+      if (DockPane.ActiveContent == tab.Content) {
+        Color startColor = DockPane.DockPanel.Skin.DockPaneStripSkin.DocumentGradient.ActiveTabGradient.StartColor;
+        Color endColor = DockPane.DockPanel.Skin.DockPaneStripSkin.DocumentGradient.ActiveTabGradient.EndColor;
+        LinearGradientMode gradientMode = DockPane.DockPanel.Skin.DockPaneStripSkin.DocumentGradient.ActiveTabGradient.LinearGradientMode;
+        g.FillPath(new LinearGradientBrush(rectBack, startColor, endColor, gradientMode), path);
+        g.DrawPath(PenDocumentTabActiveBorder, path);
+
+        Color textColor = DockPane.DockPanel.Skin.DockPaneStripSkin.DocumentGradient.ActiveTabGradient.TextColor;
+        if (DockPane.IsActiveDocumentPane)
+          TextRenderer.DrawText(g, tab.Content.DockHandler.TabText, BoldFont, rectText, textColor, DocumentTextFormat);
+        else
+          TextRenderer.DrawText(g, tab.Content.DockHandler.TabText, TextFont, rectText, textColor, DocumentTextFormat);
+      } else {
+        Color startColor = DockPane.DockPanel.Skin.DockPaneStripSkin.DocumentGradient.InactiveTabGradient.StartColor;
+        Color endColor = DockPane.DockPanel.Skin.DockPaneStripSkin.DocumentGradient.InactiveTabGradient.EndColor;
+        LinearGradientMode gradientMode = DockPane.DockPanel.Skin.DockPaneStripSkin.DocumentGradient.InactiveTabGradient.LinearGradientMode;
+        g.FillPath(new LinearGradientBrush(rectBack, startColor, endColor, gradientMode), path);
+        g.DrawPath(PenDocumentTabInactiveBorder, path);
+
+        Color textColor = DockPane.DockPanel.Skin.DockPaneStripSkin.DocumentGradient.InactiveTabGradient.TextColor;
+        TextRenderer.DrawText(g, tab.Content.DockHandler.TabText, TextFont, rectText, textColor, DocumentTextFormat);
+      }
+
+      if (rectTab.Contains(rectIcon) && DockPane.DockPanel.ShowDocumentIcon)
+        g.DrawIcon(tab.Content.DockHandler.Icon, rectIcon);
+    }
+
+    private Rectangle TabStripRectangle {
+      get {
+        if (Appearance == DockPane.AppearanceStyle.Document)
+          return TabStripRectangle_Document;
+        else
+          return TabStripRectangle_ToolWindow;
+      }
+    }
+
+    private Rectangle TabStripRectangle_ToolWindow {
+      get {
+        Rectangle rect = ClientRectangle;
+        return new Rectangle(rect.X, rect.Top + ToolWindowStripGapTop, rect.Width, rect.Height - ToolWindowStripGapTop - ToolWindowStripGapBottom);
+      }
+    }
+
+    private Rectangle TabStripRectangle_Document {
+      get {
+        Rectangle rect = ClientRectangle;
+        return new Rectangle(rect.X, rect.Top + DocumentStripGapTop, rect.Width, rect.Height - DocumentStripGapTop - ToolWindowStripGapBottom);
+      }
+    }
+
+    private Rectangle TabsRectangle {
+      get {
+        if (Appearance == DockPane.AppearanceStyle.ToolWindow)
+          return TabStripRectangle;
+
+        Rectangle rectWindow = TabStripRectangle;
+        int x = rectWindow.X;
+        int y = rectWindow.Y;
+        int width = rectWindow.Width;
+        int height = rectWindow.Height;
+
+        x += DocumentTabGapLeft;
+        width -= DocumentTabGapLeft +
+            DocumentTabGapRight +
+            DocumentButtonGapRight +
+            ButtonClose.Width +
+            ButtonWindowList.Width +
+            2 * DocumentButtonGapBetween;
+
+        return new Rectangle(x, y, width, height);
+      }
+    }
+
+    private ContextMenuStrip m_selectMenu;
+    private ContextMenuStrip SelectMenu {
+      get { return m_selectMenu; }
+    }
+
+    private void WindowList_Click(object sender, EventArgs e) {
+      int x = 0;
+      int y = ButtonWindowList.Location.Y + ButtonWindowList.Height;
+
+      SelectMenu.Items.Clear();
+      foreach (TabVS2005 tab in Tabs) {
+        IDockContent content = tab.Content;
+        ToolStripItem item = SelectMenu.Items.Add(content.DockHandler.TabText, content.DockHandler.Icon.ToBitmap());
+        item.Tag = tab.Content;
+        item.Click += new EventHandler(ContextMenuItem_Click);
+      }
+      SelectMenu.Show(ButtonWindowList, x, y);
+    }
+
+    private void ContextMenuItem_Click(object sender, EventArgs e) {
+      ToolStripMenuItem item = sender as ToolStripMenuItem;
+      if (item != null) {
+        IDockContent content = (IDockContent)item.Tag;
+        DockPane.ActiveContent = content;
+      }
+    }
+
+    private void SetInertButtons() {
+      if (Appearance == DockPane.AppearanceStyle.ToolWindow) {
+        if (m_buttonClose != null)
+          m_buttonClose.Left = -m_buttonClose.Width;
+
+        if (m_buttonWindowList != null)
+          m_buttonWindowList.Left = -m_buttonWindowList.Width;
+      } else {
+        bool showCloseButton = DockPane.ActiveContent == null ? true : DockPane.ActiveContent.DockHandler.CloseButton;
+        ButtonClose.Enabled = showCloseButton;
+        ButtonClose.Visible = DockPane.ActiveContent == null ? true : DockPane.ActiveContent.DockHandler.CloseButtonVisible;
+        ButtonClose.RefreshChanges();
+        ButtonWindowList.RefreshChanges();
+      }
+    }
+
+    protected override void OnLayout(LayoutEventArgs levent) {
+      if (Appearance != DockPane.AppearanceStyle.Document) {
+        base.OnLayout(levent);
+        return;
+      }
+
+      Rectangle rectTabStrip = TabStripRectangle;
+
+      // Set position and size of the buttons
+      int buttonWidth = ButtonClose.Image.Width;
+      int buttonHeight = ButtonClose.Image.Height;
+      int height = rectTabStrip.Height - DocumentButtonGapTop - DocumentButtonGapBottom;
+      if (buttonHeight < height) {
+        buttonWidth = buttonWidth * (height / buttonHeight);
+        buttonHeight = height;
+      }
+      Size buttonSize = new Size(buttonWidth, buttonHeight);
+
+      int x = rectTabStrip.X + rectTabStrip.Width - DocumentTabGapLeft
+        - DocumentButtonGapRight - buttonWidth;
+      int y = rectTabStrip.Y + DocumentButtonGapTop;
+      Point point = new Point(x, y);
+      ButtonClose.Bounds = DrawHelper.RtlTransform(this, new Rectangle(point, buttonSize));
+
+      // If the close button is not visible draw the window list button overtop.
+      // Otherwise it is drawn to the left of the close button.
+      if (ButtonClose.Visible)
+        point.Offset(-(DocumentButtonGapBetween + buttonWidth), 0);
+
+      ButtonWindowList.Bounds = DrawHelper.RtlTransform(this, new Rectangle(point, buttonSize));
+
+      OnRefreshChanges();
+
+      base.OnLayout(levent);
+    }
+
+    private void Close_Click(object sender, EventArgs e) {
+      DockPane.CloseActiveContent();
+    }
+
+    protected internal override int HitTest(Point ptMouse) {
+      Rectangle rectTabStrip = TabsRectangle;
+      if (!TabsRectangle.Contains(ptMouse))
+        return -1;
+
+      foreach (Tab tab in Tabs) {
+        GraphicsPath path = GetTabOutline(tab, true, false);
+        if (path.IsVisible(ptMouse))
+          return Tabs.IndexOf(tab);
+      }
+      return -1;
+    }
+
+    protected override void OnMouseHover(EventArgs e) {
+      int index = HitTest(PointToClient(Control.MousePosition));
+      string toolTip = string.Empty;
+
+      base.OnMouseHover(e);
+
+      if (index != -1) {
+        TabVS2005 tab = Tabs[index] as TabVS2005;
+        if (!String.IsNullOrEmpty(tab.Content.DockHandler.ToolTipText))
+          toolTip = tab.Content.DockHandler.ToolTipText;
+        else if (tab.MaxWidth > tab.TabWidth)
+          toolTip = tab.Content.DockHandler.TabText;
+      }
+
+      if (m_toolTip.GetToolTip(this) != toolTip) {
+        m_toolTip.Active = false;
+        m_toolTip.SetToolTip(this, toolTip);
+        m_toolTip.Active = true;
+      }
+
+      // requires further tracking of mouse hover behavior,
+      ResetMouseEventArgs();
+    }
+
+    protected override void OnRightToLeftChanged(EventArgs e) {
+      base.OnRightToLeftChanged(e);
+      PerformLayout();
+    }
+  }
 }
Index: /trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.WinFormsUI/2.3.1/WinFormsUI-2.3.1/Docking/VisibleNestedPaneCollection.cs
===================================================================
--- /trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.WinFormsUI/2.3.1/WinFormsUI-2.3.1/Docking/VisibleNestedPaneCollection.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.WinFormsUI/2.3.1/WinFormsUI-2.3.1/Docking/VisibleNestedPaneCollection.cs	(revision 4068)
@@ -1,168 +1,139 @@
-using System;
 using System.Collections.Generic;
 using System.Collections.ObjectModel;
 using System.Drawing;
-using System.Windows.Forms;
 
-namespace WeifenLuo.WinFormsUI.Docking
-{
-	public sealed class VisibleNestedPaneCollection : ReadOnlyCollection<DockPane>
-	{
-		private NestedPaneCollection m_nestedPanes;
+namespace WeifenLuo.WinFormsUI.Docking {
+  public sealed class VisibleNestedPaneCollection : ReadOnlyCollection<DockPane> {
+    private NestedPaneCollection m_nestedPanes;
 
-        internal VisibleNestedPaneCollection(NestedPaneCollection nestedPanes)
-            : base(new List<DockPane>())
-        {
-            m_nestedPanes = nestedPanes;
+    internal VisibleNestedPaneCollection(NestedPaneCollection nestedPanes)
+      : base(new List<DockPane>()) {
+      m_nestedPanes = nestedPanes;
+    }
+
+    public NestedPaneCollection NestedPanes {
+      get { return m_nestedPanes; }
+    }
+
+    public INestedPanesContainer Container {
+      get { return NestedPanes.Container; }
+    }
+
+    public DockState DockState {
+      get { return NestedPanes.DockState; }
+    }
+
+    public bool IsFloat {
+      get { return NestedPanes.IsFloat; }
+    }
+
+    internal void Refresh() {
+      Items.Clear();
+      for (int i = 0; i < NestedPanes.Count; i++) {
+        DockPane pane = NestedPanes[i];
+        NestedDockingStatus status = pane.NestedDockingStatus;
+        status.SetDisplayingStatus(true, status.PreviousPane, status.Alignment, status.Proportion);
+        Items.Add(pane);
+      }
+
+      foreach (DockPane pane in NestedPanes)
+        if (pane.DockState != DockState || pane.IsHidden) {
+          pane.Bounds = Rectangle.Empty;
+          pane.SplitterBounds = Rectangle.Empty;
+          Remove(pane);
         }
 
-		public NestedPaneCollection NestedPanes
-		{
-			get	{	return m_nestedPanes;	}
-		}
+      CalculateBounds();
 
-		public INestedPanesContainer Container
-		{
-			get	{	return NestedPanes.Container;	}
-		}
+      foreach (DockPane pane in this) {
+        NestedDockingStatus status = pane.NestedDockingStatus;
+        pane.Bounds = status.PaneBounds;
+        pane.SplitterBounds = status.SplitterBounds;
+        pane.SplitterAlignment = status.Alignment;
+      }
+    }
 
-		public DockState DockState
-		{
-			get	{	return NestedPanes.DockState;	}
-		}
+    private void Remove(DockPane pane) {
+      if (!Contains(pane))
+        return;
 
-		public bool IsFloat
-		{
-			get	{	return NestedPanes.IsFloat;	}
-		}
+      NestedDockingStatus statusPane = pane.NestedDockingStatus;
+      DockPane lastNestedPane = null;
+      for (int i = Count - 1; i > IndexOf(pane); i--) {
+        if (this[i].NestedDockingStatus.PreviousPane == pane) {
+          lastNestedPane = this[i];
+          break;
+        }
+      }
 
-		internal void Refresh()
-		{
-			Items.Clear();
-			for (int i=0; i<NestedPanes.Count; i++)
-			{
-				DockPane pane = NestedPanes[i];
-				NestedDockingStatus status = pane.NestedDockingStatus;
-				status.SetDisplayingStatus(true, status.PreviousPane, status.Alignment, status.Proportion);
-				Items.Add(pane);
-			}
+      if (lastNestedPane != null) {
+        int indexLastNestedPane = IndexOf(lastNestedPane);
+        Items.Remove(lastNestedPane);
+        Items[IndexOf(pane)] = lastNestedPane;
+        NestedDockingStatus lastNestedDock = lastNestedPane.NestedDockingStatus;
+        lastNestedDock.SetDisplayingStatus(true, statusPane.DisplayingPreviousPane, statusPane.DisplayingAlignment, statusPane.DisplayingProportion);
+        for (int i = indexLastNestedPane - 1; i > IndexOf(lastNestedPane); i--) {
+          NestedDockingStatus status = this[i].NestedDockingStatus;
+          if (status.PreviousPane == pane)
+            status.SetDisplayingStatus(true, lastNestedPane, status.DisplayingAlignment, status.DisplayingProportion);
+        }
+      } else
+        Items.Remove(pane);
 
-			foreach (DockPane pane in NestedPanes)
-				if (pane.DockState != DockState || pane.IsHidden)
-				{
-					pane.Bounds = Rectangle.Empty;
-					pane.SplitterBounds = Rectangle.Empty;
-					Remove(pane);
-				}
+      statusPane.SetDisplayingStatus(false, null, DockAlignment.Left, 0.5);
+    }
 
-			CalculateBounds();
+    private void CalculateBounds() {
+      if (Count == 0)
+        return;
 
-			foreach (DockPane pane in this)
-			{
-				NestedDockingStatus status = pane.NestedDockingStatus;
-				pane.Bounds = status.PaneBounds;
-				pane.SplitterBounds = status.SplitterBounds;
-				pane.SplitterAlignment = status.Alignment;
-			}
-		}
+      this[0].NestedDockingStatus.SetDisplayingBounds(Container.DisplayingRectangle, Container.DisplayingRectangle, Rectangle.Empty);
 
-		private void Remove(DockPane pane)
-		{
-			if (!Contains(pane))
-				return;
+      for (int i = 1; i < Count; i++) {
+        DockPane pane = this[i];
+        NestedDockingStatus status = pane.NestedDockingStatus;
+        DockPane prevPane = status.DisplayingPreviousPane;
+        NestedDockingStatus statusPrev = prevPane.NestedDockingStatus;
 
-			NestedDockingStatus statusPane = pane.NestedDockingStatus;
-			DockPane lastNestedPane = null;
-			for (int i=Count - 1; i> IndexOf(pane); i--)
-			{
-				if (this[i].NestedDockingStatus.PreviousPane == pane)
-				{
-					lastNestedPane = this[i];
-					break;
-				}
-			}
+        Rectangle rect = statusPrev.PaneBounds;
+        bool bVerticalSplitter = (status.DisplayingAlignment == DockAlignment.Left || status.DisplayingAlignment == DockAlignment.Right);
 
-			if (lastNestedPane != null)
-			{
-				int indexLastNestedPane = IndexOf(lastNestedPane);
-				Items.Remove(lastNestedPane);
-				Items[IndexOf(pane)] = lastNestedPane;
-				NestedDockingStatus lastNestedDock = lastNestedPane.NestedDockingStatus;
-				lastNestedDock.SetDisplayingStatus(true, statusPane.DisplayingPreviousPane, statusPane.DisplayingAlignment, statusPane.DisplayingProportion);
-				for (int i=indexLastNestedPane - 1; i>IndexOf(lastNestedPane); i--)
-				{
-					NestedDockingStatus status = this[i].NestedDockingStatus;
-					if (status.PreviousPane == pane)
-						status.SetDisplayingStatus(true, lastNestedPane, status.DisplayingAlignment, status.DisplayingProportion);
-				}
-			}
-			else
-				Items.Remove(pane);
+        Rectangle rectThis = rect;
+        Rectangle rectPrev = rect;
+        Rectangle rectSplitter = rect;
+        if (status.DisplayingAlignment == DockAlignment.Left) {
+          rectThis.Width = (int)((double)rect.Width * status.DisplayingProportion) - (Measures.SplitterSize / 2);
+          rectSplitter.X = rectThis.X + rectThis.Width;
+          rectSplitter.Width = Measures.SplitterSize;
+          rectPrev.X = rectSplitter.X + rectSplitter.Width;
+          rectPrev.Width = rect.Width - rectThis.Width - rectSplitter.Width;
+        } else if (status.DisplayingAlignment == DockAlignment.Right) {
+          rectPrev.Width = (rect.Width - (int)((double)rect.Width * status.DisplayingProportion)) - (Measures.SplitterSize / 2);
+          rectSplitter.X = rectPrev.X + rectPrev.Width;
+          rectSplitter.Width = Measures.SplitterSize;
+          rectThis.X = rectSplitter.X + rectSplitter.Width;
+          rectThis.Width = rect.Width - rectPrev.Width - rectSplitter.Width;
+        } else if (status.DisplayingAlignment == DockAlignment.Top) {
+          rectThis.Height = (int)((double)rect.Height * status.DisplayingProportion) - (Measures.SplitterSize / 2);
+          rectSplitter.Y = rectThis.Y + rectThis.Height;
+          rectSplitter.Height = Measures.SplitterSize;
+          rectPrev.Y = rectSplitter.Y + rectSplitter.Height;
+          rectPrev.Height = rect.Height - rectThis.Height - rectSplitter.Height;
+        } else if (status.DisplayingAlignment == DockAlignment.Bottom) {
+          rectPrev.Height = (rect.Height - (int)((double)rect.Height * status.DisplayingProportion)) - (Measures.SplitterSize / 2);
+          rectSplitter.Y = rectPrev.Y + rectPrev.Height;
+          rectSplitter.Height = Measures.SplitterSize;
+          rectThis.Y = rectSplitter.Y + rectSplitter.Height;
+          rectThis.Height = rect.Height - rectPrev.Height - rectSplitter.Height;
+        } else
+          rectThis = Rectangle.Empty;
 
-			statusPane.SetDisplayingStatus(false, null, DockAlignment.Left, 0.5);
-		}
-
-		private void CalculateBounds()
-		{
-			if (Count == 0)
-				return;
-
-			this[0].NestedDockingStatus.SetDisplayingBounds(Container.DisplayingRectangle, Container.DisplayingRectangle, Rectangle.Empty);
-
-			for (int i=1; i<Count; i++)
-			{
-				DockPane pane = this[i];
-				NestedDockingStatus status = pane.NestedDockingStatus;
-				DockPane prevPane = status.DisplayingPreviousPane;
-				NestedDockingStatus statusPrev = prevPane.NestedDockingStatus;
-
-				Rectangle rect = statusPrev.PaneBounds;
-				bool bVerticalSplitter = (status.DisplayingAlignment == DockAlignment.Left || status.DisplayingAlignment == DockAlignment.Right);
-
-				Rectangle rectThis = rect;
-				Rectangle rectPrev = rect;
-				Rectangle rectSplitter = rect;
-				if (status.DisplayingAlignment == DockAlignment.Left)
-				{
-					rectThis.Width = (int)((double)rect.Width * status.DisplayingProportion) - (Measures.SplitterSize / 2);
-					rectSplitter.X = rectThis.X + rectThis.Width;
-					rectSplitter.Width = Measures.SplitterSize;
-					rectPrev.X = rectSplitter.X + rectSplitter.Width;
-					rectPrev.Width = rect.Width - rectThis.Width - rectSplitter.Width;
-				}
-				else if (status.DisplayingAlignment == DockAlignment.Right)
-				{
-					rectPrev.Width = (rect.Width - (int)((double)rect.Width * status.DisplayingProportion)) - (Measures.SplitterSize / 2);
-					rectSplitter.X = rectPrev.X + rectPrev.Width;
-					rectSplitter.Width = Measures.SplitterSize;
-					rectThis.X = rectSplitter.X + rectSplitter.Width;
-					rectThis.Width = rect.Width - rectPrev.Width - rectSplitter.Width;
-				}
-				else if (status.DisplayingAlignment == DockAlignment.Top)
-				{
-					rectThis.Height = (int)((double)rect.Height * status.DisplayingProportion) - (Measures.SplitterSize / 2);
-					rectSplitter.Y = rectThis.Y + rectThis.Height;
-					rectSplitter.Height = Measures.SplitterSize;
-					rectPrev.Y = rectSplitter.Y + rectSplitter.Height;
-					rectPrev.Height = rect.Height - rectThis.Height - rectSplitter.Height;
-				}
-				else if (status.DisplayingAlignment == DockAlignment.Bottom)
-				{
-					rectPrev.Height = (rect.Height - (int)((double)rect.Height * status.DisplayingProportion)) - (Measures.SplitterSize / 2);
-					rectSplitter.Y = rectPrev.Y + rectPrev.Height;
-					rectSplitter.Height = Measures.SplitterSize;
-					rectThis.Y = rectSplitter.Y + rectSplitter.Height;
-					rectThis.Height = rect.Height - rectPrev.Height - rectSplitter.Height;
-				}
-				else
-					rectThis = Rectangle.Empty;
-
-				rectSplitter.Intersect(rect);
-				rectThis.Intersect(rect);
-				rectPrev.Intersect(rect);
-				status.SetDisplayingBounds(rect, rectThis, rectSplitter);
-				statusPrev.SetDisplayingBounds(statusPrev.LogicalBounds, rectPrev, statusPrev.SplitterBounds);
-			}
-		}
-	}
+        rectSplitter.Intersect(rect);
+        rectThis.Intersect(rect);
+        rectPrev.Intersect(rect);
+        status.SetDisplayingBounds(rect, rectThis, rectSplitter);
+        statusPrev.SetDisplayingBounds(statusPrev.LogicalBounds, rectPrev, statusPrev.SplitterBounds);
+      }
+    }
+  }
 }
Index: /trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.WinFormsUI/2.3.1/WinFormsUI-2.3.1/Docking/Win32/NativeMethods.cs
===================================================================
--- /trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.WinFormsUI/2.3.1/WinFormsUI-2.3.1/Docking/Win32/NativeMethods.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.WinFormsUI/2.3.1/WinFormsUI-2.3.1/Docking/Win32/NativeMethods.cs	(revision 4068)
@@ -1,64 +1,62 @@
 using System;
+using System.Diagnostics.CodeAnalysis;
 using System.Drawing;
 using System.Runtime.InteropServices;
-using System.Diagnostics.CodeAnalysis;
 using WeifenLuo.WinFormsUI.Docking.Win32;
 
-namespace WeifenLuo.WinFormsUI.Docking
-{
-    internal static class NativeMethods
-    {
-		[DllImport("User32.dll", CharSet=CharSet.Auto)]
-        [return: MarshalAs(UnmanagedType.Bool)]
-		public static extern bool DragDetect(IntPtr hWnd, Point pt);
+namespace WeifenLuo.WinFormsUI.Docking {
+  internal static class NativeMethods {
+    [DllImport("User32.dll", CharSet = CharSet.Auto)]
+    [return: MarshalAs(UnmanagedType.Bool)]
+    public static extern bool DragDetect(IntPtr hWnd, Point pt);
 
-        [DllImport("User32.dll", CharSet=CharSet.Auto)]
-        public static extern IntPtr GetFocus();
+    [DllImport("User32.dll", CharSet = CharSet.Auto)]
+    public static extern IntPtr GetFocus();
 
-        [DllImport("User32.dll", CharSet=CharSet.Auto)]
-        public static extern IntPtr SetFocus(IntPtr hWnd);
+    [DllImport("User32.dll", CharSet = CharSet.Auto)]
+    public static extern IntPtr SetFocus(IntPtr hWnd);
 
-        [DllImport("User32.dll", CharSet=CharSet.Auto)]
-        [return: MarshalAs(UnmanagedType.Bool)]
-        public static extern bool PostMessage(IntPtr hWnd, int Msg, uint wParam, uint lParam);
+    [DllImport("User32.dll", CharSet = CharSet.Auto)]
+    [return: MarshalAs(UnmanagedType.Bool)]
+    public static extern bool PostMessage(IntPtr hWnd, int Msg, uint wParam, uint lParam);
 
-        [DllImport("User32.dll", CharSet=CharSet.Auto)]
-        public static extern uint SendMessage(IntPtr hWnd, int Msg, uint wParam, uint lParam);
+    [DllImport("User32.dll", CharSet = CharSet.Auto)]
+    public static extern uint SendMessage(IntPtr hWnd, int Msg, uint wParam, uint lParam);
 
-        [DllImport("User32.dll", CharSet=CharSet.Auto)]
-        public static extern int ShowWindow(IntPtr hWnd, short cmdShow);
+    [DllImport("User32.dll", CharSet = CharSet.Auto)]
+    public static extern int ShowWindow(IntPtr hWnd, short cmdShow);
 
-        [DllImport("User32.dll", CharSet=CharSet.Auto)]
-        public static extern int SetWindowPos(IntPtr hWnd, IntPtr hWndAfter, int X, int Y, int Width, int Height, FlagsSetWindowPos flags);
+    [DllImport("User32.dll", CharSet = CharSet.Auto)]
+    public static extern int SetWindowPos(IntPtr hWnd, IntPtr hWndAfter, int X, int Y, int Width, int Height, FlagsSetWindowPos flags);
 
-		[DllImport("user32.dll", CharSet = CharSet.Auto)]
-		public static extern int GetWindowLong(IntPtr hWnd, int Index);
+    [DllImport("user32.dll", CharSet = CharSet.Auto)]
+    public static extern int GetWindowLong(IntPtr hWnd, int Index);
 
-		[DllImport("user32.dll", CharSet = CharSet.Auto)]
-		public static extern int SetWindowLong(IntPtr hWnd, int Index, int Value);
+    [DllImport("user32.dll", CharSet = CharSet.Auto)]
+    public static extern int SetWindowLong(IntPtr hWnd, int Index, int Value);
 
-		[DllImport("user32.dll", CharSet=CharSet.Auto)]
-		public static extern int ShowScrollBar(IntPtr hWnd, int wBar, int bShow);
+    [DllImport("user32.dll", CharSet = CharSet.Auto)]
+    public static extern int ShowScrollBar(IntPtr hWnd, int wBar, int bShow);
 
-		[DllImport("user32.dll", CharSet=CharSet.Auto)]
-        //*********************************
-        // FxCop bug, suppress the message
-        //*********************************
-        [SuppressMessage("Microsoft.Portability", "CA1901:PInvokeDeclarationsShouldBePortable", MessageId = "0")]
-		public static extern IntPtr WindowFromPoint(Point point);
+    [DllImport("user32.dll", CharSet = CharSet.Auto)]
+    //*********************************
+    // FxCop bug, suppress the message
+    //*********************************
+    [SuppressMessage("Microsoft.Portability", "CA1901:PInvokeDeclarationsShouldBePortable", MessageId = "0")]
+    public static extern IntPtr WindowFromPoint(Point point);
 
-        [DllImport("Kernel32.dll", CharSet = CharSet.Auto)]
-        public static extern int GetCurrentThreadId();
+    [DllImport("Kernel32.dll", CharSet = CharSet.Auto)]
+    public static extern int GetCurrentThreadId();
 
-        public delegate IntPtr HookProc(int code, IntPtr wParam, IntPtr lParam);
+    public delegate IntPtr HookProc(int code, IntPtr wParam, IntPtr lParam);
 
-        [DllImport("user32.dll")]
-        public static extern IntPtr SetWindowsHookEx(Win32.HookType code, HookProc func, IntPtr hInstance, int threadID);
+    [DllImport("user32.dll")]
+    public static extern IntPtr SetWindowsHookEx(Win32.HookType code, HookProc func, IntPtr hInstance, int threadID);
 
-        [DllImport("user32.dll")]
-        public static extern int UnhookWindowsHookEx(IntPtr hhook);
+    [DllImport("user32.dll")]
+    public static extern int UnhookWindowsHookEx(IntPtr hhook);
 
-        [DllImport("user32.dll")]
-        public static extern IntPtr CallNextHookEx(IntPtr hhook, int code, IntPtr wParam, IntPtr lParam);
-	}
+    [DllImport("user32.dll")]
+    public static extern IntPtr CallNextHookEx(IntPtr hhook, int code, IntPtr wParam, IntPtr lParam);
+  }
 }
Index: /trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.WinFormsUI/2.3.1/WinFormsUI-2.3.1/Properties/AssemblyInfo.cs
===================================================================
--- /trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.WinFormsUI/2.3.1/WinFormsUI-2.3.1/Properties/AssemblyInfo.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.WinFormsUI/2.3.1/WinFormsUI-2.3.1/Properties/AssemblyInfo.cs	(revision 4068)
@@ -1,7 +1,6 @@
 ﻿using System;
+using System.Diagnostics.CodeAnalysis;
 using System.Reflection;
-using System.Runtime.CompilerServices;
 using System.Runtime.InteropServices;
-using System.Diagnostics.CodeAnalysis;
 
 [assembly: AssemblyTitle("DockPanel Suite for .Net 2.0")]
Index: /trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.log4net/1.2.10.0/HeuristicLablog4netPlugin.cs
===================================================================
--- /trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.log4net/1.2.10.0/HeuristicLablog4netPlugin.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.log4net/1.2.10.0/HeuristicLablog4netPlugin.cs	(revision 4068)
@@ -20,7 +20,4 @@
 #endregion
 
-using System;
-using System.Collections.Generic;
-using System.Text;
 using HeuristicLab.PluginInfrastructure;
 
Index: /trunk/sources/HeuristicLab.MainForm.WindowsForms/3.3/ActionUserInterfaceItem.cs
===================================================================
--- /trunk/sources/HeuristicLab.MainForm.WindowsForms/3.3/ActionUserInterfaceItem.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.MainForm.WindowsForms/3.3/ActionUserInterfaceItem.cs	(revision 4068)
@@ -21,7 +21,4 @@
 
 using System;
-using System.Collections.Generic;
-using System.Linq;
-using System.Text;
 using System.Windows.Forms;
 
Index: /trunk/sources/HeuristicLab.MainForm.WindowsForms/3.3/AsynchronousContentView.cs
===================================================================
--- /trunk/sources/HeuristicLab.MainForm.WindowsForms/3.3/AsynchronousContentView.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.MainForm.WindowsForms/3.3/AsynchronousContentView.cs	(revision 4068)
@@ -21,13 +21,5 @@
 
 using System;
-using System.Collections.Generic;
-using System.ComponentModel;
-using System.Drawing;
-using System.Data;
-using System.Linq;
-using System.Text;
-using System.Windows.Forms;
 using System.Threading;
-using HeuristicLab.Common;
 
 namespace HeuristicLab.MainForm.WindowsForms {
@@ -62,6 +54,6 @@
       IAsyncResult result = BeginInvoke(method, args);
       result.AsyncWaitHandle.WaitOne(1000, false);
-      if (result.IsCompleted) try { EndInvoke(result); } catch (ObjectDisposedException) { }
-      else {
+      if (result.IsCompleted) try { EndInvoke(result); }
+        catch (ObjectDisposedException) { } else {
         ThreadPool.RegisterWaitForSingleObject(result.AsyncWaitHandle,
           new WaitOrTimerCallback((x, b) => { try { EndInvoke(result); } catch (ObjectDisposedException) { } }),
Index: /trunk/sources/HeuristicLab.MainForm.WindowsForms/3.3/ContentView.cs
===================================================================
--- /trunk/sources/HeuristicLab.MainForm.WindowsForms/3.3/ContentView.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.MainForm.WindowsForms/3.3/ContentView.cs	(revision 4068)
@@ -21,13 +21,7 @@
 
 using System;
-using System.Collections.Generic;
-using System.ComponentModel;
-using System.Drawing;
-using System.Data;
-using System.Linq;
-using System.Text;
+using System.Reflection;
 using System.Windows.Forms;
 using HeuristicLab.Common;
-using System.Reflection;
 
 namespace HeuristicLab.MainForm.WindowsForms {
Index: /trunk/sources/HeuristicLab.MainForm.WindowsForms/3.3/DockForm.cs
===================================================================
--- /trunk/sources/HeuristicLab.MainForm.WindowsForms/3.3/DockForm.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.MainForm.WindowsForms/3.3/DockForm.cs	(revision 4068)
@@ -21,9 +21,4 @@
 
 using System;
-using System.Collections.Generic;
-using System.ComponentModel;
-using System.Data;
-using System.Drawing;
-using System.Text;
 using System.Windows.Forms;
 using WeifenLuo.WinFormsUI.Docking;
Index: /trunk/sources/HeuristicLab.MainForm.WindowsForms/3.3/DockingMainForm.cs
===================================================================
--- /trunk/sources/HeuristicLab.MainForm.WindowsForms/3.3/DockingMainForm.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.MainForm.WindowsForms/3.3/DockingMainForm.cs	(revision 4068)
@@ -21,12 +21,5 @@
 
 using System;
-using System.Collections.Generic;
-using System.ComponentModel;
-using System.Data;
-using System.Drawing;
-using System.Linq;
-using System.Text;
 using System.Windows.Forms;
-using WeifenLuo.WinFormsUI.Docking;
 
 namespace HeuristicLab.MainForm.WindowsForms {
Index: /trunk/sources/HeuristicLab.MainForm.WindowsForms/3.3/DocumentForm.cs
===================================================================
--- /trunk/sources/HeuristicLab.MainForm.WindowsForms/3.3/DocumentForm.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.MainForm.WindowsForms/3.3/DocumentForm.cs	(revision 4068)
@@ -21,9 +21,4 @@
 
 using System;
-using System.Collections.Generic;
-using System.ComponentModel;
-using System.Data;
-using System.Drawing;
-using System.Text;
 using System.Windows.Forms;
 
Index: /trunk/sources/HeuristicLab.MainForm.WindowsForms/3.3/MainForm.cs
===================================================================
--- /trunk/sources/HeuristicLab.MainForm.WindowsForms/3.3/MainForm.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.MainForm.WindowsForms/3.3/MainForm.cs	(revision 4068)
@@ -21,16 +21,11 @@
 
 using System;
+using System.Collections;
 using System.Collections.Generic;
-using System.ComponentModel;
-using System.Data;
-using System.Drawing;
 using System.Linq;
-using System.Text;
 using System.Windows.Forms;
-
+using HeuristicLab.Common;
 using HeuristicLab.PluginInfrastructure;
-using System.Collections;
 using WeifenLuo.WinFormsUI.Docking;
-using HeuristicLab.Common;
 
 namespace HeuristicLab.MainForm.WindowsForms {
Index: /trunk/sources/HeuristicLab.MainForm.WindowsForms/3.3/MenuItem.cs
===================================================================
--- /trunk/sources/HeuristicLab.MainForm.WindowsForms/3.3/MenuItem.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.MainForm.WindowsForms/3.3/MenuItem.cs	(revision 4068)
@@ -19,12 +19,8 @@
  */
 #endregion
-using System;
-using System.Collections.Generic;
-using System.Linq;
-using System.Text;
 using System.Windows.Forms;
 
 namespace HeuristicLab.MainForm.WindowsForms {
-  public abstract class MenuItem : ActionUserInterfaceItem,IMenuItem{
+  public abstract class MenuItem : ActionUserInterfaceItem, IMenuItem {
     public virtual Keys ShortCutKeys {
       get { return Keys.None; }
Index: /trunk/sources/HeuristicLab.MainForm.WindowsForms/3.3/MultipleDocumentMainForm.cs
===================================================================
--- /trunk/sources/HeuristicLab.MainForm.WindowsForms/3.3/MultipleDocumentMainForm.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.MainForm.WindowsForms/3.3/MultipleDocumentMainForm.cs	(revision 4068)
@@ -21,10 +21,4 @@
 
 using System;
-using System.Collections.Generic;
-using System.ComponentModel;
-using System.Data;
-using System.Drawing;
-using System.Linq;
-using System.Text;
 using System.Windows.Forms;
 
Index: /trunk/sources/HeuristicLab.MainForm.WindowsForms/3.3/SideBar.cs
===================================================================
--- /trunk/sources/HeuristicLab.MainForm.WindowsForms/3.3/SideBar.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.MainForm.WindowsForms/3.3/SideBar.cs	(revision 4068)
@@ -20,11 +20,4 @@
 #endregion
 
-using System;
-using System.Collections.Generic;
-using System.ComponentModel;
-using System.Drawing;
-using System.Data;
-using System.Linq;
-using System.Text;
 using System.Windows.Forms;
 using WeifenLuo.WinFormsUI.Docking;
Index: /trunk/sources/HeuristicLab.MainForm.WindowsForms/3.3/SingleDocumentMainForm.cs
===================================================================
--- /trunk/sources/HeuristicLab.MainForm.WindowsForms/3.3/SingleDocumentMainForm.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.MainForm.WindowsForms/3.3/SingleDocumentMainForm.cs	(revision 4068)
@@ -21,12 +21,5 @@
 
 using System;
-using System.Collections.Generic;
-using System.ComponentModel;
-using System.Data;
-using System.Drawing;
-using System.Linq;
-using System.Text;
 using System.Windows.Forms;
-using WeifenLuo.WinFormsUI.Docking;
 
 namespace HeuristicLab.MainForm.WindowsForms {
Index: /trunk/sources/HeuristicLab.MainForm.WindowsForms/3.3/Tests/ContentViewTests.cs
===================================================================
--- /trunk/sources/HeuristicLab.MainForm.WindowsForms/3.3/Tests/ContentViewTests.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.MainForm.WindowsForms/3.3/Tests/ContentViewTests.cs	(revision 4068)
@@ -1,11 +1,8 @@
 ﻿using System;
-using System.Text;
-using System.Collections.Generic;
 using System.Linq;
+using HeuristicLab.Common;
+using HeuristicLab.MainForm.WindowsForms;
+using HeuristicLab.PluginInfrastructure;
 using Microsoft.VisualStudio.TestTools.UnitTesting;
-using HeuristicLab.PluginInfrastructure;
-using HeuristicLab.Common;
-using System.Reflection;
-using HeuristicLab.MainForm.WindowsForms;
 
 namespace HeuristicLab.MainForm.WindowsForms_3._3.Tests {
Index: /trunk/sources/HeuristicLab.MainForm.WindowsForms/3.3/Tests/Properties/AssemblyInfo.cs
===================================================================
--- /trunk/sources/HeuristicLab.MainForm.WindowsForms/3.3/Tests/Properties/AssemblyInfo.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.MainForm.WindowsForms/3.3/Tests/Properties/AssemblyInfo.cs	(revision 4068)
@@ -1,4 +1,3 @@
 ﻿using System.Reflection;
-using System.Runtime.CompilerServices;
 using System.Runtime.InteropServices;
 
Index: /trunk/sources/HeuristicLab.MainForm.WindowsForms/3.3/ToolBarItem.cs
===================================================================
--- /trunk/sources/HeuristicLab.MainForm.WindowsForms/3.3/ToolBarItem.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.MainForm.WindowsForms/3.3/ToolBarItem.cs	(revision 4068)
@@ -20,8 +20,4 @@
 #endregion
 
-using System;
-using System.Collections.Generic;
-using System.Linq;
-using System.Text;
 using System.Windows.Forms;
 
Index: /trunk/sources/HeuristicLab.MainForm.WindowsForms/3.3/View.cs
===================================================================
--- /trunk/sources/HeuristicLab.MainForm.WindowsForms/3.3/View.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.MainForm.WindowsForms/3.3/View.cs	(revision 4068)
@@ -22,7 +22,6 @@
 using System;
 using System.Linq;
+using System.Reflection;
 using System.Windows.Forms;
-using System.Reflection;
-using System.ComponentModel;
 
 namespace HeuristicLab.MainForm.WindowsForms {
Index: /trunk/sources/HeuristicLab.MainForm.WindowsForms/3.3/ViewContextMenuStrip.cs
===================================================================
--- /trunk/sources/HeuristicLab.MainForm.WindowsForms/3.3/ViewContextMenuStrip.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.MainForm.WindowsForms/3.3/ViewContextMenuStrip.cs	(revision 4068)
@@ -22,8 +22,5 @@
 using System;
 using System.Collections.Generic;
-using System.ComponentModel;
-using System.Diagnostics;
 using System.Linq;
-using System.Text;
 using System.Windows.Forms;
 
Index: /trunk/sources/HeuristicLab.MainForm.WindowsForms/3.3/ViewHost.cs
===================================================================
--- /trunk/sources/HeuristicLab.MainForm.WindowsForms/3.3/ViewHost.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.MainForm.WindowsForms/3.3/ViewHost.cs	(revision 4068)
@@ -24,5 +24,4 @@
 using System.Linq;
 using System.Windows.Forms;
-using HeuristicLab.MainForm;
 using HeuristicLab.Common;
 
Index: /trunk/sources/HeuristicLab.MainForm/3.3/ActionUserInterfaceItem.cs
===================================================================
--- /trunk/sources/HeuristicLab.MainForm/3.3/ActionUserInterfaceItem.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.MainForm/3.3/ActionUserInterfaceItem.cs	(revision 4068)
@@ -21,7 +21,4 @@
 
 using System;
-using System.Collections.Generic;
-using System.Linq;
-using System.Text;
 
 namespace HeuristicLab.MainForm {
Index: /trunk/sources/HeuristicLab.MainForm/3.3/ContentAttribute.cs
===================================================================
--- /trunk/sources/HeuristicLab.MainForm/3.3/ContentAttribute.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.MainForm/3.3/ContentAttribute.cs	(revision 4068)
@@ -23,5 +23,4 @@
 using System.Collections.Generic;
 using System.Linq;
-using System.Text;
 using System.Reflection;
 
Index: /trunk/sources/HeuristicLab.MainForm/3.3/Interfaces/IActionUserInterfaceItem.cs
===================================================================
--- /trunk/sources/HeuristicLab.MainForm/3.3/Interfaces/IActionUserInterfaceItem.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.MainForm/3.3/Interfaces/IActionUserInterfaceItem.cs	(revision 4068)
@@ -20,8 +20,4 @@
 #endregion
 
-using System;
-using System.Collections.Generic;
-using System.Linq;
-using System.Text;
 using System.Drawing;
 
Index: /trunk/sources/HeuristicLab.MainForm/3.3/Interfaces/IContentView.cs
===================================================================
--- /trunk/sources/HeuristicLab.MainForm/3.3/Interfaces/IContentView.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.MainForm/3.3/Interfaces/IContentView.cs	(revision 4068)
@@ -21,7 +21,4 @@
 
 using System;
-using System.Collections.Generic;
-using System.Text;
-using System.ComponentModel;
 using HeuristicLab.Common;
 
Index: /trunk/sources/HeuristicLab.MainForm/3.3/Interfaces/IMainForm.cs
===================================================================
--- /trunk/sources/HeuristicLab.MainForm/3.3/Interfaces/IMainForm.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.MainForm/3.3/Interfaces/IMainForm.cs	(revision 4068)
@@ -22,8 +22,4 @@
 using System;
 using System.Collections.Generic;
-using System.Linq;
-using System.Text;
-using System.Drawing;
-using System.ComponentModel;
 using HeuristicLab.Common;
 
Index: /trunk/sources/HeuristicLab.MainForm/3.3/Interfaces/IMenuItem.cs
===================================================================
--- /trunk/sources/HeuristicLab.MainForm/3.3/Interfaces/IMenuItem.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.MainForm/3.3/Interfaces/IMenuItem.cs	(revision 4068)
@@ -20,9 +20,4 @@
 #endregion
 
-using System;
-using System.Collections.Generic;
-using System.Linq;
-using System.Text;
-using System.Drawing;
 
 namespace HeuristicLab.MainForm {
Index: /trunk/sources/HeuristicLab.MainForm/3.3/Interfaces/IMenuSeparatorItem.cs
===================================================================
--- /trunk/sources/HeuristicLab.MainForm/3.3/Interfaces/IMenuSeparatorItem.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.MainForm/3.3/Interfaces/IMenuSeparatorItem.cs	(revision 4068)
@@ -20,8 +20,4 @@
 #endregion
 
-using System;
-using System.Collections.Generic;
-using System.Linq;
-using System.Text;
 
 namespace HeuristicLab.MainForm {
Index: /trunk/sources/HeuristicLab.MainForm/3.3/Interfaces/IPositionableUserInterfaceItem.cs
===================================================================
--- /trunk/sources/HeuristicLab.MainForm/3.3/Interfaces/IPositionableUserInterfaceItem.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.MainForm/3.3/Interfaces/IPositionableUserInterfaceItem.cs	(revision 4068)
@@ -20,8 +20,5 @@
 #endregion
 
-using System;
 using System.Collections.Generic;
-using System.Linq;
-using System.Text;
 
 namespace HeuristicLab.MainForm {
Index: /trunk/sources/HeuristicLab.MainForm/3.3/Interfaces/IToolBarItem.cs
===================================================================
--- /trunk/sources/HeuristicLab.MainForm/3.3/Interfaces/IToolBarItem.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.MainForm/3.3/Interfaces/IToolBarItem.cs	(revision 4068)
@@ -20,8 +20,4 @@
 #endregion
 
-using System;
-using System.Collections.Generic;
-using System.Linq;
-using System.Text;
 
 namespace HeuristicLab.MainForm {
Index: /trunk/sources/HeuristicLab.MainForm/3.3/Interfaces/IToolBarSeparatorItem.cs
===================================================================
--- /trunk/sources/HeuristicLab.MainForm/3.3/Interfaces/IToolBarSeparatorItem.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.MainForm/3.3/Interfaces/IToolBarSeparatorItem.cs	(revision 4068)
@@ -20,8 +20,4 @@
 #endregion
 
-using System;
-using System.Collections.Generic;
-using System.Linq;
-using System.Text;
 
 namespace HeuristicLab.MainForm {
Index: /trunk/sources/HeuristicLab.MainForm/3.3/Interfaces/IUserInterfaceItem.cs
===================================================================
--- /trunk/sources/HeuristicLab.MainForm/3.3/Interfaces/IUserInterfaceItem.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.MainForm/3.3/Interfaces/IUserInterfaceItem.cs	(revision 4068)
@@ -20,9 +20,4 @@
 #endregion
 
-using System;
-using System.Collections.Generic;
-using System.Linq;
-using System.Text;
-using System.Drawing;
 
 namespace HeuristicLab.MainForm {
Index: /trunk/sources/HeuristicLab.MainForm/3.3/Interfaces/IView.cs
===================================================================
--- /trunk/sources/HeuristicLab.MainForm/3.3/Interfaces/IView.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.MainForm/3.3/Interfaces/IView.cs	(revision 4068)
@@ -21,7 +21,4 @@
 
 using System;
-using System.Collections.Generic;
-using System.Text;
-using System.ComponentModel;
 
 namespace HeuristicLab.MainForm {
Index: /trunk/sources/HeuristicLab.MainForm/3.3/MainFormManager.cs
===================================================================
--- /trunk/sources/HeuristicLab.MainForm/3.3/MainFormManager.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.MainForm/3.3/MainFormManager.cs	(revision 4068)
@@ -23,8 +23,6 @@
 using System.Collections.Generic;
 using System.Linq;
-using System.Text;
+using HeuristicLab.Common;
 using HeuristicLab.PluginInfrastructure;
-using System.Diagnostics;
-using HeuristicLab.Common;
 
 namespace HeuristicLab.MainForm {
@@ -162,5 +160,5 @@
 
     private static void CheckForContentType(Type contentType) {
-          if (!typeof(IContent).IsAssignableFrom(contentType))
+      if (!typeof(IContent).IsAssignableFrom(contentType))
         throw new ArgumentException("DefaultViews are only specified for types of IContent and not for " + contentType + ".");
     }
Index: /trunk/sources/HeuristicLab.MainForm/3.3/MenuSeparatorItem.cs
===================================================================
--- /trunk/sources/HeuristicLab.MainForm/3.3/MenuSeparatorItem.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.MainForm/3.3/MenuSeparatorItem.cs	(revision 4068)
@@ -20,8 +20,4 @@
 #endregion
 
-using System;
-using System.Collections.Generic;
-using System.Linq;
-using System.Text;
 
 namespace HeuristicLab.MainForm {
Index: /trunk/sources/HeuristicLab.MainForm/3.3/PositionableUserInterfaceItem.cs
===================================================================
--- /trunk/sources/HeuristicLab.MainForm/3.3/PositionableUserInterfaceItem.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.MainForm/3.3/PositionableUserInterfaceItem.cs	(revision 4068)
@@ -20,8 +20,6 @@
 #endregion
 
-using System;
 using System.Collections.Generic;
 using System.Linq;
-using System.Text;
 
 namespace HeuristicLab.MainForm {
@@ -31,5 +29,5 @@
     public virtual IEnumerable<string> Structure {
       get { return Enumerable.Empty<string>(); }
-    } 
+    }
   }
 }
Index: /trunk/sources/HeuristicLab.MainForm/3.3/ToolBarSeparatorItem.cs
===================================================================
--- /trunk/sources/HeuristicLab.MainForm/3.3/ToolBarSeparatorItem.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.MainForm/3.3/ToolBarSeparatorItem.cs	(revision 4068)
@@ -20,11 +20,7 @@
 #endregion
 
-using System;
-using System.Collections.Generic;
-using System.Linq;
-using System.Text;
 
 namespace HeuristicLab.MainForm {
-  public abstract class ToolBarSeparatorItem : PositionableUserInterfaceItem,IToolBarSeparatorItem {
+  public abstract class ToolBarSeparatorItem : PositionableUserInterfaceItem, IToolBarSeparatorItem {
   }
 }
Index: /trunk/sources/HeuristicLab.MainForm/3.3/TypeExtension.cs
===================================================================
--- /trunk/sources/HeuristicLab.MainForm/3.3/TypeExtension.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.MainForm/3.3/TypeExtension.cs	(revision 4068)
@@ -23,6 +23,4 @@
 using System.Collections.Generic;
 using System.Linq;
-using System.Text;
-using System.Diagnostics;
 
 namespace HeuristicLab.MainForm {
Index: /trunk/sources/HeuristicLab.MainForm/3.3/ViewAttribute.cs
===================================================================
--- /trunk/sources/HeuristicLab.MainForm/3.3/ViewAttribute.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.MainForm/3.3/ViewAttribute.cs	(revision 4068)
@@ -21,7 +21,4 @@
 
 using System;
-using System.Collections.Generic;
-using System.Linq;
-using System.Text;
 using System.Reflection;
 
Index: /trunk/sources/HeuristicLab.MainForm/3.3/ViewEventArgs.cs
===================================================================
--- /trunk/sources/HeuristicLab.MainForm/3.3/ViewEventArgs.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.MainForm/3.3/ViewEventArgs.cs	(revision 4068)
@@ -21,7 +21,4 @@
 
 using System;
-using System.Collections.Generic;
-using System.Linq;
-using System.Text;
 
 namespace HeuristicLab.MainForm {
Index: /trunk/sources/HeuristicLab.MainForm/3.3/ViewShownEventArgs.cs
===================================================================
--- /trunk/sources/HeuristicLab.MainForm/3.3/ViewShownEventArgs.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.MainForm/3.3/ViewShownEventArgs.cs	(revision 4068)
@@ -20,8 +20,4 @@
 #endregion
 
-using System;
-using System.Collections.Generic;
-using System.Linq;
-using System.Text;
 
 namespace HeuristicLab.MainForm {
@@ -33,5 +29,5 @@
 
     private bool firstTimeShown;
-    public bool  FirstTimeShown {
+    public bool FirstTimeShown {
       get { return this.firstTimeShown; }
     }
Index: /trunk/sources/HeuristicLab.Operators.Programmable/3.3/ProgrammableOperator.cs
===================================================================
--- /trunk/sources/HeuristicLab.Operators.Programmable/3.3/ProgrammableOperator.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.Operators.Programmable/3.3/ProgrammableOperator.cs	(revision 4068)
@@ -21,23 +21,19 @@
 
 using System;
+using System.CodeDom;
+using System.CodeDom.Compiler;
 using System.Collections.Generic;
-using System.Text;
-using System.Xml;
 using System.IO;
 using System.Linq;
 using System.Reflection;
-using System.CodeDom;
-using System.CodeDom.Compiler;
-using Microsoft.CSharp;
+using System.Text;
 using System.Text.RegularExpressions;
+using HeuristicLab.Collections;
 using HeuristicLab.Common;
 using HeuristicLab.Core;
-using HeuristicLab.Data;
-using System.Data.Linq;
-using System.Xml.XPath;
+using HeuristicLab.Persistence.Auxiliary;
+using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
 using HeuristicLab.PluginInfrastructure;
-using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
-using HeuristicLab.Persistence.Auxiliary;
-using HeuristicLab.Collections;
+using Microsoft.CSharp;
 
 namespace HeuristicLab.Operators.Programmable {
@@ -80,8 +76,8 @@
     protected Dictionary<Assembly, bool> Assemblies;
 
-    [Storable(Name="SelectedAssemblies")]
+    [Storable(Name = "SelectedAssemblies")]
     private List<string> _selectedAssemblyNames_persistence {
       get {
-        return Assemblies.Where(a => a.Value).Select(a => a.Key.FullName).ToList();        
+        return Assemblies.Where(a => a.Value).Select(a => a.Key.FullName).ToList();
       }
       set {
@@ -244,5 +240,6 @@
             assemblies.Add(a, false);
           }
-        } catch (NotSupportedException) {
+        }
+        catch (NotSupportedException) {
           // NotSupportedException is thrown while accessing 
           // the Location property of the anonymously hosted
Index: /trunk/sources/HeuristicLab.Operators.Programmable/3.3/ProgrammableOperatorView.cs
===================================================================
--- /trunk/sources/HeuristicLab.Operators.Programmable/3.3/ProgrammableOperatorView.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.Operators.Programmable/3.3/ProgrammableOperatorView.cs	(revision 4068)
@@ -22,21 +22,13 @@
 using System;
 using System.Collections.Generic;
-using System.ComponentModel;
-using System.Drawing;
-using System.Data;
+using System.Linq;
+using System.Reflection;
 using System.Text;
-using System.Linq;
 using System.Windows.Forms;
-using HeuristicLab.Common;
-using HeuristicLab.Core;
-using HeuristicLab.Operators;
-using System.CodeDom.Compiler;
-using System.Reflection;
 using HeuristicLab.CodeEditor;
+using HeuristicLab.Common.Resources;
 using HeuristicLab.Core.Views;
-using HeuristicLab.Operators.Views;
 using HeuristicLab.MainForm;
 using HeuristicLab.PluginInfrastructure;
-using HeuristicLab.Common.Resources;
 
 namespace HeuristicLab.Operators.Programmable {
@@ -129,5 +121,6 @@
         ProgrammableOperator.Compile();
         MessageBox.Show("Compilation successful", "Success", MessageBoxButtons.OK, MessageBoxIcon.Information);
-      } catch (Exception ex) {
+      }
+      catch (Exception ex) {
         ErrorHandling.ShowErrorDialog(this, ex);
       }
Index: /trunk/sources/HeuristicLab.Operators.Programmable/3.3/Properties/Resources.Designer.cs
===================================================================
--- /trunk/sources/HeuristicLab.Operators.Programmable/3.3/Properties/Resources.Designer.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.Operators.Programmable/3.3/Properties/Resources.Designer.cs	(revision 4068)
@@ -10,54 +10,53 @@
 
 namespace HeuristicLab.Operators.Programmable.Properties {
-    using System;
-    
-    
+
+
+  /// <summary>
+  ///   A strongly-typed resource class, for looking up localized strings, etc.
+  /// </summary>
+  // This class was auto-generated by the StronglyTypedResourceBuilder
+  // class via a tool like ResGen or Visual Studio.
+  // To add or remove a member, edit your .ResX file then rerun ResGen
+  // with the /str option, or rebuild your VS project.
+  [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "4.0.0.0")]
+  [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
+  [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
+  internal class Resources {
+
+    private static global::System.Resources.ResourceManager resourceMan;
+
+    private static global::System.Globalization.CultureInfo resourceCulture;
+
+    [global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")]
+    internal Resources() {
+    }
+
     /// <summary>
-    ///   A strongly-typed resource class, for looking up localized strings, etc.
+    ///   Returns the cached ResourceManager instance used by this class.
     /// </summary>
-    // This class was auto-generated by the StronglyTypedResourceBuilder
-    // class via a tool like ResGen or Visual Studio.
-    // To add or remove a member, edit your .ResX file then rerun ResGen
-    // with the /str option, or rebuild your VS project.
-    [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "4.0.0.0")]
-    [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
-    [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
-    internal class Resources {
-        
-        private static global::System.Resources.ResourceManager resourceMan;
-        
-        private static global::System.Globalization.CultureInfo resourceCulture;
-        
-        [global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")]
-        internal Resources() {
+    [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
+    internal static global::System.Resources.ResourceManager ResourceManager {
+      get {
+        if (object.ReferenceEquals(resourceMan, null)) {
+          global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("HeuristicLab.Operators.Programmable.Properties.Resources", typeof(Resources).Assembly);
+          resourceMan = temp;
         }
-        
-        /// <summary>
-        ///   Returns the cached ResourceManager instance used by this class.
-        /// </summary>
-        [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
-        internal static global::System.Resources.ResourceManager ResourceManager {
-            get {
-                if (object.ReferenceEquals(resourceMan, null)) {
-                    global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("HeuristicLab.Operators.Programmable.Properties.Resources", typeof(Resources).Assembly);
-                    resourceMan = temp;
-                }
-                return resourceMan;
-            }
-        }
-        
-        /// <summary>
-        ///   Overrides the current thread's CurrentUICulture property for all
-        ///   resource lookups using this strongly typed resource class.
-        /// </summary>
-        [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
-        internal static global::System.Globalization.CultureInfo Culture {
-            get {
-                return resourceCulture;
-            }
-            set {
-                resourceCulture = value;
-            }
-        }
+        return resourceMan;
+      }
     }
+
+    /// <summary>
+    ///   Overrides the current thread's CurrentUICulture property for all
+    ///   resource lookups using this strongly typed resource class.
+    /// </summary>
+    [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
+    internal static global::System.Globalization.CultureInfo Culture {
+      get {
+        return resourceCulture;
+      }
+      set {
+        resourceCulture = value;
+      }
+    }
+  }
 }
Index: /trunk/sources/HeuristicLab.Operators.Views.GraphVisualization/3.3/BidirectionalLookup.cs
===================================================================
--- /trunk/sources/HeuristicLab.Operators.Views.GraphVisualization/3.3/BidirectionalLookup.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.Operators.Views.GraphVisualization/3.3/BidirectionalLookup.cs	(revision 4068)
@@ -22,6 +22,4 @@
 using System;
 using System.Collections.Generic;
-using System.Linq;
-using System.Text;
 using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
 
Index: /trunk/sources/HeuristicLab.Operators.Views.GraphVisualization/3.3/General/ConnectionInfo.cs
===================================================================
--- /trunk/sources/HeuristicLab.Operators.Views.GraphVisualization/3.3/General/ConnectionInfo.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.Operators.Views.GraphVisualization/3.3/General/ConnectionInfo.cs	(revision 4068)
@@ -21,7 +21,5 @@
 
 using System;
-using System.Collections.Generic;
 using System.Linq;
-using System.Text;
 using HeuristicLab.Common;
 using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
@@ -76,5 +74,5 @@
     }
 
-    public override  IDeepCloneable Clone(Cloner cloner) {
+    public override IDeepCloneable Clone(Cloner cloner) {
       ConnectionInfo clone = (ConnectionInfo)base.Clone(cloner);
       clone.from = (IShapeInfo)cloner.Clone(this.from);
Index: /trunk/sources/HeuristicLab.Operators.Views.GraphVisualization/3.3/General/GraphVisualizationInfo.cs
===================================================================
--- /trunk/sources/HeuristicLab.Operators.Views.GraphVisualization/3.3/General/GraphVisualizationInfo.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.Operators.Views.GraphVisualization/3.3/General/GraphVisualizationInfo.cs	(revision 4068)
@@ -23,9 +23,7 @@
 using System.Collections.Generic;
 using System.Linq;
-using System.Text;
-using HeuristicLab.Core;
-using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
 using HeuristicLab.Collections;
 using HeuristicLab.Common;
+using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
 
 namespace HeuristicLab.Operators.Views.GraphVisualization {
@@ -72,5 +70,5 @@
     public virtual void RemoveShapeInfo(IShapeInfo shapeInfo) {
       this.shapeInfos.Remove(shapeInfo);
-      this.connectionInfos.RemoveWhere(c => c.From == shapeInfo); 
+      this.connectionInfos.RemoveWhere(c => c.From == shapeInfo);
       this.connectionInfos.RemoveWhere(c => c.To == shapeInfo);
     }
Index: /trunk/sources/HeuristicLab.Operators.Views.GraphVisualization/3.3/General/GraphVisualizationInfoView.cs
===================================================================
--- /trunk/sources/HeuristicLab.Operators.Views.GraphVisualization/3.3/General/GraphVisualizationInfoView.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.Operators.Views.GraphVisualization/3.3/General/GraphVisualizationInfoView.cs	(revision 4068)
@@ -21,21 +21,13 @@
 
 using System;
-using System.Collections.Generic;
-using System.ComponentModel;
 using System.Drawing;
-using System.Data;
+using System.Drawing.Drawing2D;
 using System.Linq;
-using System.Text;
+using System.Threading;
 using System.Windows.Forms;
+using HeuristicLab.Collections;
 using HeuristicLab.MainForm;
-using HeuristicLab.Core;
-using HeuristicLab.Core.Views;
+using HeuristicLab.MainForm.WindowsForms;
 using Netron.Diagramming.Core;
-using HeuristicLab.Parameters;
-using HeuristicLab.MainForm.WindowsForms;
-using HeuristicLab.Collections;
-using System.Diagnostics;
-using System.Threading;
-using System.Drawing.Drawing2D;
 
 namespace HeuristicLab.Operators.Views.GraphVisualization {
Index: /trunk/sources/HeuristicLab.Operators.Views.GraphVisualization/3.3/General/IConnectionInfo.cs
===================================================================
--- /trunk/sources/HeuristicLab.Operators.Views.GraphVisualization/3.3/General/IConnectionInfo.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.Operators.Views.GraphVisualization/3.3/General/IConnectionInfo.cs	(revision 4068)
@@ -21,7 +21,4 @@
 
 using System;
-using System.Collections.Generic;
-using System.Linq;
-using System.Text;
 using HeuristicLab.Common;
 
Index: /trunk/sources/HeuristicLab.Operators.Views.GraphVisualization/3.3/General/IGraphVisualizationInfo.cs
===================================================================
--- /trunk/sources/HeuristicLab.Operators.Views.GraphVisualization/3.3/General/IGraphVisualizationInfo.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.Operators.Views.GraphVisualization/3.3/General/IGraphVisualizationInfo.cs	(revision 4068)
@@ -22,12 +22,9 @@
 using System;
 using System.Collections.Generic;
-using System.Linq;
-using System.Text;
-using HeuristicLab.Core;
+using HeuristicLab.Collections;
 using HeuristicLab.Common;
-using HeuristicLab.Collections;
 
 namespace HeuristicLab.Operators.Views.GraphVisualization {
-  public interface IGraphVisualizationInfo : IDeepCloneable,IContent {
+  public interface IGraphVisualizationInfo : IDeepCloneable, IContent {
     IShapeInfo InitialShape { get; set; }
     event EventHandler InitialShapeChanged;
Index: /trunk/sources/HeuristicLab.Operators.Views.GraphVisualization/3.3/General/IShapeInfo.cs
===================================================================
--- /trunk/sources/HeuristicLab.Operators.Views.GraphVisualization/3.3/General/IShapeInfo.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.Operators.Views.GraphVisualization/3.3/General/IShapeInfo.cs	(revision 4068)
@@ -22,14 +22,10 @@
 using System;
 using System.Collections.Generic;
-using System.Linq;
-using System.Text;
-using HeuristicLab.Core;
 using System.Drawing;
+using HeuristicLab.Common;
 using Netron.Diagramming.Core;
-using HeuristicLab.Collections;
-using HeuristicLab.Common;
 
 namespace HeuristicLab.Operators.Views.GraphVisualization {
-  public interface IShapeInfo : IDeepCloneable{
+  public interface IShapeInfo : IDeepCloneable {
     Type ShapeType { get; }
     Point Location { get; set; }
Index: /trunk/sources/HeuristicLab.Operators.Views.GraphVisualization/3.3/General/ShapeInfo.cs
===================================================================
--- /trunk/sources/HeuristicLab.Operators.Views.GraphVisualization/3.3/General/ShapeInfo.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.Operators.Views.GraphVisualization/3.3/General/ShapeInfo.cs	(revision 4068)
@@ -22,12 +22,8 @@
 using System;
 using System.Collections.Generic;
-using System.Linq;
-using System.Text;
-using HeuristicLab.Core;
 using System.Drawing;
+using HeuristicLab.Common;
+using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
 using Netron.Diagramming.Core;
-using HeuristicLab.Collections;
-using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
-using HeuristicLab.Common;
 
 namespace HeuristicLab.Operators.Views.GraphVisualization {
Index: /trunk/sources/HeuristicLab.Operators.Views.GraphVisualization/3.3/OperatorGraphVisualization/IOperatorShapeInfo.cs
===================================================================
--- /trunk/sources/HeuristicLab.Operators.Views.GraphVisualization/3.3/OperatorGraphVisualization/IOperatorShapeInfo.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.Operators.Views.GraphVisualization/3.3/OperatorGraphVisualization/IOperatorShapeInfo.cs	(revision 4068)
@@ -20,12 +20,9 @@
 #endregion
 
-using System;
 using System.Collections.Generic;
-using System.Linq;
-using System.Text;
 using System.Drawing;
 
 namespace HeuristicLab.Operators.Views.GraphVisualization {
-  public interface IOperatorShapeInfo : IShapeInfo{
+  public interface IOperatorShapeInfo : IShapeInfo {
     bool Collapsed { get; set; }
     string Title { get; set; }
Index: /trunk/sources/HeuristicLab.Operators.Views.GraphVisualization/3.3/OperatorGraphVisualization/OperatorGraphView.cs
===================================================================
--- /trunk/sources/HeuristicLab.Operators.Views.GraphVisualization/3.3/OperatorGraphVisualization/OperatorGraphView.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.Operators.Views.GraphVisualization/3.3/OperatorGraphVisualization/OperatorGraphView.cs	(revision 4068)
@@ -21,18 +21,11 @@
 
 using System;
-using System.Collections.Generic;
-using System.ComponentModel;
 using System.Drawing;
-using System.Data;
 using System.Linq;
-using System.Text;
 using System.Windows.Forms;
+using HeuristicLab.Core;
 using HeuristicLab.MainForm;
-using HeuristicLab.Core;
-using HeuristicLab.Core.Views;
+using HeuristicLab.MainForm.WindowsForms;
 using Netron.Diagramming.Core;
-using HeuristicLab.Parameters;
-using HeuristicLab.MainForm.WindowsForms;
-using HeuristicLab.Collections;
 
 namespace HeuristicLab.Operators.Views.GraphVisualization {
Index: /trunk/sources/HeuristicLab.Operators.Views.GraphVisualization/3.3/OperatorGraphVisualization/OperatorGraphVisualizationInfo.cs
===================================================================
--- /trunk/sources/HeuristicLab.Operators.Views.GraphVisualization/3.3/OperatorGraphVisualization/OperatorGraphVisualizationInfo.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.Operators.Views.GraphVisualization/3.3/OperatorGraphVisualization/OperatorGraphVisualizationInfo.cs	(revision 4068)
@@ -22,12 +22,10 @@
 using System;
 using System.Collections.Generic;
+using System.Drawing;
 using System.Linq;
-using System.Text;
+using HeuristicLab.Collections;
+using HeuristicLab.Common;
 using HeuristicLab.Core;
-using Netron.Diagramming.Core;
-using System.Drawing;
-using HeuristicLab.Collections;
 using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
-using HeuristicLab.Common;
 
 namespace HeuristicLab.Operators.Views.GraphVisualization {
Index: /trunk/sources/HeuristicLab.Operators.Views.GraphVisualization/3.3/OperatorGraphVisualization/OperatorShape.cs
===================================================================
--- /trunk/sources/HeuristicLab.Operators.Views.GraphVisualization/3.3/OperatorGraphVisualization/OperatorShape.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.Operators.Views.GraphVisualization/3.3/OperatorGraphVisualization/OperatorShape.cs	(revision 4068)
@@ -22,10 +22,9 @@
 using System;
 using System.Collections.Generic;
-using System.Linq;
-using System.Text;
-using Netron.Diagramming.Core;
 using System.Drawing;
 using System.Drawing.Drawing2D;
+using System.Linq;
 using HeuristicLab.Netron;
+using Netron.Diagramming.Core;
 
 
@@ -222,5 +221,5 @@
       SizeF titleSize = g.MeasureString(this.Title, ArtPalette.DefaultBoldFont, Rectangle.Width - 45);
       if (titleSize.Height + 10 > Rectangle.Height) {
-        headerHeight =  (int)titleSize.Height + 10;
+        headerHeight = (int)titleSize.Height + 10;
         this.UpdateLabels();
       }
Index: /trunk/sources/HeuristicLab.Operators.Views.GraphVisualization/3.3/OperatorGraphVisualization/OperatorShapeInfo.cs
===================================================================
--- /trunk/sources/HeuristicLab.Operators.Views.GraphVisualization/3.3/OperatorGraphVisualization/OperatorShapeInfo.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.Operators.Views.GraphVisualization/3.3/OperatorGraphVisualization/OperatorShapeInfo.cs	(revision 4068)
@@ -20,14 +20,10 @@
 #endregion
 
-using System;
 using System.Collections.Generic;
+using System.Drawing;
 using System.Linq;
-using System.Text;
-using HeuristicLab.Core;
-using System.Drawing;
+using HeuristicLab.Common;
+using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
 using Netron.Diagramming.Core;
-using System.Windows.Forms;
-using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
-using HeuristicLab.Common;
 
 namespace HeuristicLab.Operators.Views.GraphVisualization {
Index: /trunk/sources/HeuristicLab.Operators.Views.GraphVisualization/3.3/OperatorGraphVisualization/OperatorShapeInfoFactory.cs
===================================================================
--- /trunk/sources/HeuristicLab.Operators.Views.GraphVisualization/3.3/OperatorGraphVisualization/OperatorShapeInfoFactory.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.Operators.Views.GraphVisualization/3.3/OperatorGraphVisualization/OperatorShapeInfoFactory.cs	(revision 4068)
@@ -20,12 +20,8 @@
 #endregion
 
-using System;
 using System.Collections.Generic;
+using System.Drawing;
 using System.Linq;
-using System.Text;
 using HeuristicLab.Core;
-using Netron.Diagramming.Core;
-using System.Drawing;
-using System.Drawing.Drawing2D;
 
 namespace HeuristicLab.Operators.Views.GraphVisualization {
Index: /trunk/sources/HeuristicLab.Operators.Views/3.3/AlgorithmOperatorView.cs
===================================================================
--- /trunk/sources/HeuristicLab.Operators.Views/3.3/AlgorithmOperatorView.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.Operators.Views/3.3/AlgorithmOperatorView.cs	(revision 4068)
@@ -21,10 +21,9 @@
 
 using System;
-using HeuristicLab.Common;
 using HeuristicLab.Core;
 using HeuristicLab.Core.Views;
 using HeuristicLab.MainForm;
 
-namespace HeuristicLab.Operators.Views { 
+namespace HeuristicLab.Operators.Views {
   /// <summary>
   /// The base class for visual representations of items.
@@ -84,5 +83,5 @@
     }
 
-    
+
 
     protected void Content_BreakpointChanged(object sender, EventArgs e) {
Index: /trunk/sources/HeuristicLab.Operators.Views/3.3/CheckedMultiOperatorView.cs
===================================================================
--- /trunk/sources/HeuristicLab.Operators.Views/3.3/CheckedMultiOperatorView.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.Operators.Views/3.3/CheckedMultiOperatorView.cs	(revision 4068)
@@ -21,10 +21,9 @@
 
 using System;
-using HeuristicLab.Common;
 using HeuristicLab.Core;
 using HeuristicLab.Core.Views;
 using HeuristicLab.MainForm;
 
-namespace HeuristicLab.Operators.Views { 
+namespace HeuristicLab.Operators.Views {
   [View("CheckedMultiOperator View")]
   [Content(typeof(CheckedMultiOperator<>), true)]
Index: /trunk/sources/HeuristicLab.Operators.Views/3.3/MultiOperatorView.cs
===================================================================
--- /trunk/sources/HeuristicLab.Operators.Views/3.3/MultiOperatorView.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.Operators.Views/3.3/MultiOperatorView.cs	(revision 4068)
@@ -21,5 +21,4 @@
 
 using System;
-using HeuristicLab.Common;
 using HeuristicLab.Core;
 using HeuristicLab.Core.Views;
Index: /trunk/sources/HeuristicLab.Operators.Views/3.3/OperatorView.cs
===================================================================
--- /trunk/sources/HeuristicLab.Operators.Views/3.3/OperatorView.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.Operators.Views/3.3/OperatorView.cs	(revision 4068)
@@ -20,9 +20,8 @@
 #endregion
 
-using HeuristicLab.Common;
+using System;
 using HeuristicLab.Core;
 using HeuristicLab.Core.Views;
 using HeuristicLab.MainForm;
-using System;
 
 namespace HeuristicLab.Operators.Views {
Index: /trunk/sources/HeuristicLab.Operators.Views/3.3/ValuesCollectorView.cs
===================================================================
--- /trunk/sources/HeuristicLab.Operators.Views/3.3/ValuesCollectorView.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.Operators.Views/3.3/ValuesCollectorView.cs	(revision 4068)
@@ -21,10 +21,9 @@
 
 using System;
-using HeuristicLab.Common;
 using HeuristicLab.Core;
 using HeuristicLab.Core.Views;
 using HeuristicLab.MainForm;
 
-namespace HeuristicLab.Operators.Views { 
+namespace HeuristicLab.Operators.Views {
   /// <summary>
   /// The base class for visual representations of items.
Index: /trunk/sources/HeuristicLab.Operators/3.3/Assigner.cs
===================================================================
--- /trunk/sources/HeuristicLab.Operators/3.3/Assigner.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.Operators/3.3/Assigner.cs	(revision 4068)
@@ -20,5 +20,4 @@
 #endregion
 
-using HeuristicLab.Common;
 using HeuristicLab.Core;
 using HeuristicLab.Parameters;
Index: /trunk/sources/HeuristicLab.Operators/3.3/CheckedMultiOperator.cs
===================================================================
--- /trunk/sources/HeuristicLab.Operators/3.3/CheckedMultiOperator.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.Operators/3.3/CheckedMultiOperator.cs	(revision 4068)
@@ -20,11 +20,5 @@
 #endregion
 
-using System;
-using System.Collections.Generic;
-using System.Linq;
-using HeuristicLab.Collections;
-using HeuristicLab.Common;
 using HeuristicLab.Core;
-using HeuristicLab.Parameters;
 using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
 
Index: /trunk/sources/HeuristicLab.Operators/3.3/CombinedOperator.cs
===================================================================
--- /trunk/sources/HeuristicLab.Operators/3.3/CombinedOperator.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.Operators/3.3/CombinedOperator.cs	(revision 4068)
@@ -20,6 +20,4 @@
 #endregion
 
-using HeuristicLab.Collections;
-using HeuristicLab.Common;
 using HeuristicLab.Core;
 using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
Index: /trunk/sources/HeuristicLab.Operators/3.3/Comparator.cs
===================================================================
--- /trunk/sources/HeuristicLab.Operators/3.3/Comparator.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.Operators/3.3/Comparator.cs	(revision 4068)
@@ -21,5 +21,4 @@
 
 using System;
-using HeuristicLab.Common;
 using HeuristicLab.Core;
 using HeuristicLab.Data;
Index: /trunk/sources/HeuristicLab.Operators/3.3/ConditionalBranch.cs
===================================================================
--- /trunk/sources/HeuristicLab.Operators/3.3/ConditionalBranch.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.Operators/3.3/ConditionalBranch.cs	(revision 4068)
@@ -20,5 +20,4 @@
 #endregion
 
-using HeuristicLab.Common;
 using HeuristicLab.Core;
 using HeuristicLab.Data;
Index: /trunk/sources/HeuristicLab.Operators/3.3/DoubleCounter.cs
===================================================================
--- /trunk/sources/HeuristicLab.Operators/3.3/DoubleCounter.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.Operators/3.3/DoubleCounter.cs	(revision 4068)
@@ -20,5 +20,4 @@
 #endregion
 
-using HeuristicLab.Common;
 using HeuristicLab.Core;
 using HeuristicLab.Data;
Index: /trunk/sources/HeuristicLab.Operators/3.3/EmptyOperator.cs
===================================================================
--- /trunk/sources/HeuristicLab.Operators/3.3/EmptyOperator.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.Operators/3.3/EmptyOperator.cs	(revision 4068)
@@ -20,5 +20,4 @@
 #endregion
 
-using HeuristicLab.Common;
 using HeuristicLab.Core;
 using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
Index: /trunk/sources/HeuristicLab.Operators/3.3/IntCounter.cs
===================================================================
--- /trunk/sources/HeuristicLab.Operators/3.3/IntCounter.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.Operators/3.3/IntCounter.cs	(revision 4068)
@@ -20,5 +20,4 @@
 #endregion
 
-using HeuristicLab.Common;
 using HeuristicLab.Core;
 using HeuristicLab.Data;
Index: /trunk/sources/HeuristicLab.Operators/3.3/MultiOperator.cs
===================================================================
--- /trunk/sources/HeuristicLab.Operators/3.3/MultiOperator.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.Operators/3.3/MultiOperator.cs	(revision 4068)
@@ -22,5 +22,4 @@
 using System;
 using System.Collections.Generic;
-using System.Linq;
 using HeuristicLab.Collections;
 using HeuristicLab.Common;
Index: /trunk/sources/HeuristicLab.Operators/3.3/Placeholder.cs
===================================================================
--- /trunk/sources/HeuristicLab.Operators/3.3/Placeholder.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.Operators/3.3/Placeholder.cs	(revision 4068)
@@ -20,5 +20,4 @@
 #endregion
 
-using HeuristicLab.Common;
 using HeuristicLab.Core;
 using HeuristicLab.Parameters;
Index: /trunk/sources/HeuristicLab.Operators/3.3/ScopeCleaner.cs
===================================================================
--- /trunk/sources/HeuristicLab.Operators/3.3/ScopeCleaner.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.Operators/3.3/ScopeCleaner.cs	(revision 4068)
@@ -20,5 +20,4 @@
 #endregion
 
-using HeuristicLab.Common;
 using HeuristicLab.Core;
 using HeuristicLab.Parameters;
Index: /trunk/sources/HeuristicLab.Operators/3.3/SingleSuccessorOperator.cs
===================================================================
--- /trunk/sources/HeuristicLab.Operators/3.3/SingleSuccessorOperator.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.Operators/3.3/SingleSuccessorOperator.cs	(revision 4068)
@@ -20,5 +20,4 @@
 #endregion
 
-using HeuristicLab.Common;
 using HeuristicLab.Core;
 using HeuristicLab.Parameters;
Index: /trunk/sources/HeuristicLab.Operators/3.3/StochasticBranch.cs
===================================================================
--- /trunk/sources/HeuristicLab.Operators/3.3/StochasticBranch.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.Operators/3.3/StochasticBranch.cs	(revision 4068)
@@ -20,5 +20,4 @@
 #endregion
 
-using HeuristicLab.Common;
 using HeuristicLab.Core;
 using HeuristicLab.Data;
Index: /trunk/sources/HeuristicLab.Operators/3.3/StochasticMultiBranch.cs
===================================================================
--- /trunk/sources/HeuristicLab.Operators/3.3/StochasticMultiBranch.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.Operators/3.3/StochasticMultiBranch.cs	(revision 4068)
@@ -28,5 +28,4 @@
 using HeuristicLab.Parameters;
 using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
-using HeuristicLab.PluginInfrastructure;
 
 namespace HeuristicLab.Operators {
Index: /trunk/sources/HeuristicLab.Operators/3.3/SubScopesCreator.cs
===================================================================
--- /trunk/sources/HeuristicLab.Operators/3.3/SubScopesCreator.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.Operators/3.3/SubScopesCreator.cs	(revision 4068)
@@ -20,5 +20,4 @@
 #endregion
 
-using HeuristicLab.Common;
 using HeuristicLab.Core;
 using HeuristicLab.Data;
Index: /trunk/sources/HeuristicLab.Operators/3.3/SubScopesProcessor.cs
===================================================================
--- /trunk/sources/HeuristicLab.Operators/3.3/SubScopesProcessor.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.Operators/3.3/SubScopesProcessor.cs	(revision 4068)
@@ -20,12 +20,11 @@
 #endregion
 
+using System;
+using System.Collections.Generic;
 using System.Linq;
-using HeuristicLab.Common;
 using HeuristicLab.Core;
 using HeuristicLab.Data;
 using HeuristicLab.Parameters;
 using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
-using System.Collections.Generic;
-using System;
 
 namespace HeuristicLab.Operators {
Index: /trunk/sources/HeuristicLab.Operators/3.3/SubScopesRemover.cs
===================================================================
--- /trunk/sources/HeuristicLab.Operators/3.3/SubScopesRemover.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.Operators/3.3/SubScopesRemover.cs	(revision 4068)
@@ -20,5 +20,4 @@
 #endregion
 
-using HeuristicLab.Common;
 using HeuristicLab.Core;
 using HeuristicLab.Data;
Index: /trunk/sources/HeuristicLab.Operators/3.3/SubScopesSorter.cs
===================================================================
--- /trunk/sources/HeuristicLab.Operators/3.3/SubScopesSorter.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.Operators/3.3/SubScopesSorter.cs	(revision 4068)
@@ -20,5 +20,4 @@
 #endregion
 
-using HeuristicLab.Common;
 using HeuristicLab.Core;
 using HeuristicLab.Data;
Index: /trunk/sources/HeuristicLab.Operators/3.3/UniformSubScopesProcessor.cs
===================================================================
--- /trunk/sources/HeuristicLab.Operators/3.3/UniformSubScopesProcessor.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.Operators/3.3/UniformSubScopesProcessor.cs	(revision 4068)
@@ -20,12 +20,10 @@
 #endregion
 
-using HeuristicLab.Common;
+using System.Collections.Generic;
+using System.Linq;
 using HeuristicLab.Core;
 using HeuristicLab.Data;
 using HeuristicLab.Parameters;
 using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
-using System.Collections.Generic;
-using System;
-using System.Linq;
 
 namespace HeuristicLab.Operators {
Index: /trunk/sources/HeuristicLab.Operators/3.3/VariableCreator.cs
===================================================================
--- /trunk/sources/HeuristicLab.Operators/3.3/VariableCreator.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.Operators/3.3/VariableCreator.cs	(revision 4068)
@@ -20,5 +20,4 @@
 #endregion
 
-using HeuristicLab.Common;
 using HeuristicLab.Core;
 using HeuristicLab.Parameters;
Index: /trunk/sources/HeuristicLab.Optimization.Operators/3.3/ChildrenCreator.cs
===================================================================
--- /trunk/sources/HeuristicLab.Optimization.Operators/3.3/ChildrenCreator.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.Optimization.Operators/3.3/ChildrenCreator.cs	(revision 4068)
@@ -21,5 +21,4 @@
 
 using System;
-using HeuristicLab.Common;
 using HeuristicLab.Core;
 using HeuristicLab.Data;
Index: /trunk/sources/HeuristicLab.Optimization.Operators/3.3/DiscreteDoubleValueModifier.cs
===================================================================
--- /trunk/sources/HeuristicLab.Optimization.Operators/3.3/DiscreteDoubleValueModifier.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.Optimization.Operators/3.3/DiscreteDoubleValueModifier.cs	(revision 4068)
@@ -20,5 +20,4 @@
 #endregion
 
-using HeuristicLab.Common;
 using HeuristicLab.Core;
 using HeuristicLab.Data;
Index: /trunk/sources/HeuristicLab.Optimization.Operators/3.3/ExponentialDiscreteDoubleValueModifier.cs
===================================================================
--- /trunk/sources/HeuristicLab.Optimization.Operators/3.3/ExponentialDiscreteDoubleValueModifier.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.Optimization.Operators/3.3/ExponentialDiscreteDoubleValueModifier.cs	(revision 4068)
@@ -21,5 +21,4 @@
 
 using System;
-using HeuristicLab.Common;
 using HeuristicLab.Core;
 using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
Index: /trunk/sources/HeuristicLab.Optimization.Operators/3.3/LinearDiscreteDoubleValueModifier.cs
===================================================================
--- /trunk/sources/HeuristicLab.Optimization.Operators/3.3/LinearDiscreteDoubleValueModifier.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.Optimization.Operators/3.3/LinearDiscreteDoubleValueModifier.cs	(revision 4068)
@@ -20,5 +20,4 @@
 #endregion
 
-using HeuristicLab.Common;
 using HeuristicLab.Core;
 using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
Index: /trunk/sources/HeuristicLab.Optimization.Operators/3.3/ProbabilisticQualityComparator.cs
===================================================================
--- /trunk/sources/HeuristicLab.Optimization.Operators/3.3/ProbabilisticQualityComparator.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.Optimization.Operators/3.3/ProbabilisticQualityComparator.cs	(revision 4068)
@@ -21,5 +21,4 @@
 
 using System;
-using HeuristicLab.Common;
 using HeuristicLab.Core;
 using HeuristicLab.Data;
@@ -44,5 +43,5 @@
     public ILookupParameter<IRandom> RandomParameter {
       get { return (ILookupParameter<IRandom>)Parameters["Random"]; }
-    } 
+    }
 
     public ProbabilisticQualityComparator()
Index: /trunk/sources/HeuristicLab.Optimization.Operators/3.3/QuadraticDiscreteDoubleValueModifier.cs
===================================================================
--- /trunk/sources/HeuristicLab.Optimization.Operators/3.3/QuadraticDiscreteDoubleValueModifier.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.Optimization.Operators/3.3/QuadraticDiscreteDoubleValueModifier.cs	(revision 4068)
@@ -20,6 +20,4 @@
 #endregion
 
-using System;
-using HeuristicLab.Common;
 using HeuristicLab.Core;
 using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
Index: /trunk/sources/HeuristicLab.Optimization.Operators/3.3/QualityComparator.cs
===================================================================
--- /trunk/sources/HeuristicLab.Optimization.Operators/3.3/QualityComparator.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.Optimization.Operators/3.3/QualityComparator.cs	(revision 4068)
@@ -20,6 +20,4 @@
 #endregion
 
-using System;
-using HeuristicLab.Common;
 using HeuristicLab.Core;
 using HeuristicLab.Data;
Index: /trunk/sources/HeuristicLab.Optimization.Operators/3.3/ResultsCollector.cs
===================================================================
--- /trunk/sources/HeuristicLab.Optimization.Operators/3.3/ResultsCollector.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.Optimization.Operators/3.3/ResultsCollector.cs	(revision 4068)
@@ -21,5 +21,4 @@
 
 using System.Collections;
-using HeuristicLab.Common;
 using HeuristicLab.Core;
 using HeuristicLab.Data;
Index: /trunk/sources/HeuristicLab.Optimization.Operators/3.3/SASEGASAReunificator.cs
===================================================================
--- /trunk/sources/HeuristicLab.Optimization.Operators/3.3/SASEGASAReunificator.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.Optimization.Operators/3.3/SASEGASAReunificator.cs	(revision 4068)
@@ -22,10 +22,9 @@
 using System;
 using System.Collections.Generic;
-using HeuristicLab.Common;
 using HeuristicLab.Core;
+using HeuristicLab.Data;
 using HeuristicLab.Operators;
+using HeuristicLab.Parameters;
 using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
-using HeuristicLab.Data;
-using HeuristicLab.Parameters;
 
 namespace HeuristicLab.Optimization.Operators {
Index: /trunk/sources/HeuristicLab.Optimization.Operators/3.3/SolutionsCreator.cs
===================================================================
--- /trunk/sources/HeuristicLab.Optimization.Operators/3.3/SolutionsCreator.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.Optimization.Operators/3.3/SolutionsCreator.cs	(revision 4068)
@@ -20,6 +20,4 @@
 #endregion
 
-using System;
-using HeuristicLab.Common;
 using HeuristicLab.Core;
 using HeuristicLab.Data;
Index: /trunk/sources/HeuristicLab.Optimization.Operators/3.3/SquareRootDiscreteDoubleValueModifier.cs
===================================================================
--- /trunk/sources/HeuristicLab.Optimization.Operators/3.3/SquareRootDiscreteDoubleValueModifier.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.Optimization.Operators/3.3/SquareRootDiscreteDoubleValueModifier.cs	(revision 4068)
@@ -21,5 +21,4 @@
 
 using System;
-using HeuristicLab.Common;
 using HeuristicLab.Core;
 using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
Index: /trunk/sources/HeuristicLab.Optimization.Operators/3.3/TabuMaker.cs
===================================================================
--- /trunk/sources/HeuristicLab.Optimization.Operators/3.3/TabuMaker.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.Optimization.Operators/3.3/TabuMaker.cs	(revision 4068)
@@ -20,5 +20,4 @@
 #endregion
 
-using HeuristicLab.Common;
 using HeuristicLab.Core;
 using HeuristicLab.Data;
Index: /trunk/sources/HeuristicLab.Optimization.Operators/3.3/UnidirectionalRingMigrator.cs
===================================================================
--- /trunk/sources/HeuristicLab.Optimization.Operators/3.3/UnidirectionalRingMigrator.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.Optimization.Operators/3.3/UnidirectionalRingMigrator.cs	(revision 4068)
@@ -21,5 +21,4 @@
 
 using System.Collections.Generic;
-using HeuristicLab.Common;
 using HeuristicLab.Core;
 using HeuristicLab.Operators;
Index: /trunk/sources/HeuristicLab.Optimization.Views/3.3/AlgorithmView.cs
===================================================================
--- /trunk/sources/HeuristicLab.Optimization.Views/3.3/AlgorithmView.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.Optimization.Views/3.3/AlgorithmView.cs	(revision 4068)
@@ -27,5 +27,4 @@
 using HeuristicLab.Core.Views;
 using HeuristicLab.MainForm;
-using HeuristicLab.Persistence.Default.Xml;
 using HeuristicLab.PluginInfrastructure;
 
@@ -184,5 +183,5 @@
             IProblem problem = content as IProblem;
             if (problem == null)
-              Invoke(new Action(() => 
+              Invoke(new Action(() =>
                 MessageBox.Show(this, "The selected file does not contain a problem.", "Invalid File", MessageBoxButtons.OK, MessageBoxIcon.Error)));
             else if (!Content.ProblemType.IsInstanceOfType(problem))
Index: /trunk/sources/HeuristicLab.Optimization.Views/3.3/BatchRunView.cs
===================================================================
--- /trunk/sources/HeuristicLab.Optimization.Views/3.3/BatchRunView.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.Optimization.Views/3.3/BatchRunView.cs	(revision 4068)
@@ -26,5 +26,4 @@
 using HeuristicLab.Core.Views;
 using HeuristicLab.MainForm;
-using HeuristicLab.Persistence.Default.Xml;
 using HeuristicLab.PluginInfrastructure;
 
Index: /trunk/sources/HeuristicLab.Optimization.Views/3.3/OptimizerListView.cs
===================================================================
--- /trunk/sources/HeuristicLab.Optimization.Views/3.3/OptimizerListView.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.Optimization.Views/3.3/OptimizerListView.cs	(revision 4068)
@@ -22,5 +22,4 @@
 using System;
 using System.Windows.Forms;
-using HeuristicLab.Collections;
 using HeuristicLab.Core;
 using HeuristicLab.Core.Views;
Index: /trunk/sources/HeuristicLab.Optimization.Views/3.3/ResultCollectionView.cs
===================================================================
--- /trunk/sources/HeuristicLab.Optimization.Views/3.3/ResultCollectionView.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.Optimization.Views/3.3/ResultCollectionView.cs	(revision 4068)
@@ -20,6 +20,4 @@
 #endregion
 
-using HeuristicLab.Collections;
-using HeuristicLab.Common;
 using HeuristicLab.Core;
 using HeuristicLab.Core.Views;
Index: /trunk/sources/HeuristicLab.Optimization.Views/3.3/RunCollectionBubbleChartView.cs
===================================================================
--- /trunk/sources/HeuristicLab.Optimization.Views/3.3/RunCollectionBubbleChartView.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.Optimization.Views/3.3/RunCollectionBubbleChartView.cs	(revision 4068)
@@ -22,17 +22,13 @@
 using System;
 using System.Collections.Generic;
-using System.ComponentModel;
-using System.Data;
 using System.Drawing;
 using System.Linq;
-using System.Text;
 using System.Windows.Forms;
-using HeuristicLab.MainForm.WindowsForms;
-using HeuristicLab.MainForm;
 using System.Windows.Forms.DataVisualization.Charting;
 using HeuristicLab.Common;
 using HeuristicLab.Core;
 using HeuristicLab.Data;
-using System.Threading;
+using HeuristicLab.MainForm;
+using HeuristicLab.MainForm.WindowsForms;
 
 namespace HeuristicLab.Optimization.Views {
Index: /trunk/sources/HeuristicLab.Optimization.Views/3.3/RunCollectionComparisonConstraintView.cs
===================================================================
--- /trunk/sources/HeuristicLab.Optimization.Views/3.3/RunCollectionComparisonConstraintView.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.Optimization.Views/3.3/RunCollectionComparisonConstraintView.cs	(revision 4068)
@@ -23,11 +23,7 @@
 using System.Collections.Generic;
 using System.ComponentModel;
-using System.Drawing;
-using System.Data;
 using System.Linq;
-using System.Text;
-using System.Windows.Forms;
+using HeuristicLab.Data;
 using HeuristicLab.MainForm;
-using HeuristicLab.Data;
 
 namespace HeuristicLab.Optimization.Views {
@@ -73,5 +69,5 @@
           }
         }
-         if (!string.IsNullOrEmpty(Content.ConstraintColumn)) {
+        if (!string.IsNullOrEmpty(Content.ConstraintColumn)) {
           this.cmbConstraintColumn.SelectedItem = Content.ConstraintColumn;
           if (Content.ConstraintData != null)
Index: /trunk/sources/HeuristicLab.Optimization.Views/3.3/RunCollectionConstraintCollectionView.cs
===================================================================
--- /trunk/sources/HeuristicLab.Optimization.Views/3.3/RunCollectionConstraintCollectionView.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.Optimization.Views/3.3/RunCollectionConstraintCollectionView.cs	(revision 4068)
@@ -27,5 +27,4 @@
 using HeuristicLab.Core.Views;
 using HeuristicLab.MainForm;
-using HeuristicLab.Optimization;
 using HeuristicLab.PluginInfrastructure;
 
Index: /trunk/sources/HeuristicLab.Optimization.Views/3.3/RunCollectionConstraintView.cs
===================================================================
--- /trunk/sources/HeuristicLab.Optimization.Views/3.3/RunCollectionConstraintView.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.Optimization.Views/3.3/RunCollectionConstraintView.cs	(revision 4068)
@@ -21,15 +21,9 @@
 
 using System;
-using System.Collections.Generic;
-using System.ComponentModel;
-using System.Drawing;
 using System.Linq;
-using System.Text;
-using System.Windows.Forms;
+using HeuristicLab.Core;
 using HeuristicLab.Core.Views;
-using HeuristicLab.Core;
 using HeuristicLab.Data;
 using HeuristicLab.MainForm;
-using HeuristicLab.Optimization;
 
 namespace HeuristicLab.Optimization.Views {
@@ -106,5 +100,5 @@
     private void cmbConstraintColumn_SelectedIndexChanged(object sender, EventArgs e) {
       if (Content.ConstrainedValue != null) {
-        Content.ConstraintColumn = (string) cmbConstraintColumn.SelectedItem;
+        Content.ConstraintColumn = (string)cmbConstraintColumn.SelectedItem;
       }
     }
Index: /trunk/sources/HeuristicLab.Optimization.Views/3.3/RunCollectionEqualityConstraintView.cs
===================================================================
--- /trunk/sources/HeuristicLab.Optimization.Views/3.3/RunCollectionEqualityConstraintView.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.Optimization.Views/3.3/RunCollectionEqualityConstraintView.cs	(revision 4068)
@@ -21,15 +21,8 @@
 
 using System;
-using System.Collections.Generic;
-using System.ComponentModel;
-using System.Drawing;
-using System.Data;
-using System.Linq;
-using System.Text;
-using System.Windows.Forms;
 using HeuristicLab.MainForm;
 
 namespace HeuristicLab.Optimization.Views {
-  [Content(typeof(RunCollectionEqualityConstraint),true)]
+  [Content(typeof(RunCollectionEqualityConstraint), true)]
   public partial class RunCollectionEqualityConstraintView : RunCollectionConstraintView {
     public RunCollectionEqualityConstraintView() {
@@ -52,5 +45,5 @@
     protected override void SetEnabledStateOfControls() {
       base.SetEnabledStateOfControls();
-      txtConstraintData.ReadOnly = Content == null || this.ReadOnly ;
+      txtConstraintData.ReadOnly = Content == null || this.ReadOnly;
     }
 
Index: /trunk/sources/HeuristicLab.Optimization.Views/3.3/RunCollectionTabularView.cs
===================================================================
--- /trunk/sources/HeuristicLab.Optimization.Views/3.3/RunCollectionTabularView.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.Optimization.Views/3.3/RunCollectionTabularView.cs	(revision 4068)
@@ -22,14 +22,9 @@
 using System;
 using System.Collections.Generic;
-using System.ComponentModel;
-using System.Data;
-using System.Drawing;
 using System.Linq;
-using System.Text;
 using System.Windows.Forms;
+using HeuristicLab.Core;
+using HeuristicLab.Data.Views;
 using HeuristicLab.MainForm;
-using HeuristicLab.Data.Views;
-using HeuristicLab.Collections;
-using HeuristicLab.Core;
 
 namespace HeuristicLab.Optimization.Views {
Index: /trunk/sources/HeuristicLab.Optimization.Views/3.3/RunCollectionTypeCompatibilityConstraintView.cs
===================================================================
--- /trunk/sources/HeuristicLab.Optimization.Views/3.3/RunCollectionTypeCompatibilityConstraintView.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.Optimization.Views/3.3/RunCollectionTypeCompatibilityConstraintView.cs	(revision 4068)
@@ -21,13 +21,5 @@
 
 using System;
-using System.Collections.Generic;
-using System.ComponentModel;
-using System.Drawing;
-using System.Data;
-using System.Linq;
-using System.Text;
-using System.Windows.Forms;
 using HeuristicLab.MainForm;
-using HeuristicLab.Common;
 
 namespace HeuristicLab.Optimization.Views {
Index: /trunk/sources/HeuristicLab.Optimization.Views/3.3/RunCollectionView.Designer.cs
===================================================================
--- /trunk/sources/HeuristicLab.Optimization.Views/3.3/RunCollectionView.Designer.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.Optimization.Views/3.3/RunCollectionView.Designer.cs	(revision 4068)
@@ -22,5 +22,4 @@
 using System;
 using System.Windows.Forms;
-using System.ComponentModel;
 
 namespace HeuristicLab.Optimization.Views {
Index: /trunk/sources/HeuristicLab.Optimization.Views/3.3/RunCollectionView.cs
===================================================================
--- /trunk/sources/HeuristicLab.Optimization.Views/3.3/RunCollectionView.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.Optimization.Views/3.3/RunCollectionView.cs	(revision 4068)
@@ -20,15 +20,14 @@
 #endregion
 
+using System;
+using System.Collections.Generic;
+using System.Drawing;
+using System.Linq;
+using System.Windows.Forms;
 using HeuristicLab.Collections;
-using HeuristicLab.Common;
 using HeuristicLab.Core;
 using HeuristicLab.Core.Views;
 using HeuristicLab.MainForm;
 using HeuristicLab.MainForm.WindowsForms;
-using System.Windows.Forms;
-using System;
-using System.Drawing;
-using System.Collections.Generic;
-using System.Linq;
 
 namespace HeuristicLab.Optimization.Views {
Index: /trunk/sources/HeuristicLab.Optimization.Views/3.3/RunView.cs
===================================================================
--- /trunk/sources/HeuristicLab.Optimization.Views/3.3/RunView.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.Optimization.Views/3.3/RunView.cs	(revision 4068)
@@ -21,5 +21,5 @@
 
 using System;
-using System.Linq;
+using System.Drawing;
 using System.Windows.Forms;
 using HeuristicLab.Common;
@@ -27,5 +27,4 @@
 using HeuristicLab.Core.Views;
 using HeuristicLab.MainForm;
-using System.Drawing;
 
 namespace HeuristicLab.Optimization.Views {
Index: /trunk/sources/HeuristicLab.Optimization.Views/3.3/UserDefinedAlgorithmView.cs
===================================================================
--- /trunk/sources/HeuristicLab.Optimization.Views/3.3/UserDefinedAlgorithmView.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.Optimization.Views/3.3/UserDefinedAlgorithmView.cs	(revision 4068)
@@ -24,7 +24,5 @@
 using HeuristicLab.Common;
 using HeuristicLab.Core;
-using HeuristicLab.Core.Views;
 using HeuristicLab.MainForm;
-using HeuristicLab.Persistence.Default.Xml;
 using HeuristicLab.PluginInfrastructure;
 
Index: /trunk/sources/HeuristicLab.Optimization/3.3/Interfaces/IAlgorithm.cs
===================================================================
--- /trunk/sources/HeuristicLab.Optimization/3.3/Interfaces/IAlgorithm.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.Optimization/3.3/Interfaces/IAlgorithm.cs	(revision 4068)
@@ -22,5 +22,4 @@
 using System;
 using System.Collections.Generic;
-using HeuristicLab.Common;
 using HeuristicLab.Core;
 
Index: /trunk/sources/HeuristicLab.Optimization/3.3/Interfaces/ICrossover.cs
===================================================================
--- /trunk/sources/HeuristicLab.Optimization/3.3/Interfaces/ICrossover.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.Optimization/3.3/Interfaces/ICrossover.cs	(revision 4068)
@@ -20,5 +20,4 @@
 #endregion
 
-using HeuristicLab.Common;
 using HeuristicLab.Core;
 
Index: /trunk/sources/HeuristicLab.Optimization/3.3/Interfaces/IDiscreteDoubleValueModifier.cs
===================================================================
--- /trunk/sources/HeuristicLab.Optimization/3.3/Interfaces/IDiscreteDoubleValueModifier.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.Optimization/3.3/Interfaces/IDiscreteDoubleValueModifier.cs	(revision 4068)
@@ -20,5 +20,4 @@
 #endregion
 
-using HeuristicLab.Common;
 using HeuristicLab.Core;
 using HeuristicLab.Data;
Index: /trunk/sources/HeuristicLab.Optimization/3.3/Interfaces/IEvaluator.cs
===================================================================
--- /trunk/sources/HeuristicLab.Optimization/3.3/Interfaces/IEvaluator.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.Optimization/3.3/Interfaces/IEvaluator.cs	(revision 4068)
@@ -20,5 +20,4 @@
 #endregion
 
-using HeuristicLab.Common;
 using HeuristicLab.Core;
 
Index: /trunk/sources/HeuristicLab.Optimization/3.3/Interfaces/IManipulator.cs
===================================================================
--- /trunk/sources/HeuristicLab.Optimization/3.3/Interfaces/IManipulator.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.Optimization/3.3/Interfaces/IManipulator.cs	(revision 4068)
@@ -20,5 +20,4 @@
 #endregion
 
-using HeuristicLab.Common;
 using HeuristicLab.Core;
 
Index: /trunk/sources/HeuristicLab.Optimization/3.3/Interfaces/IMigrator.cs
===================================================================
--- /trunk/sources/HeuristicLab.Optimization/3.3/Interfaces/IMigrator.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.Optimization/3.3/Interfaces/IMigrator.cs	(revision 4068)
@@ -20,5 +20,4 @@
 #endregion
 
-using HeuristicLab.Common;
 using HeuristicLab.Core;
 
Index: /trunk/sources/HeuristicLab.Optimization/3.3/Interfaces/IMoveGenerator.cs
===================================================================
--- /trunk/sources/HeuristicLab.Optimization/3.3/Interfaces/IMoveGenerator.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.Optimization/3.3/Interfaces/IMoveGenerator.cs	(revision 4068)
@@ -20,5 +20,4 @@
 #endregion
 
-using HeuristicLab.Common;
 using HeuristicLab.Core;
 
Index: /trunk/sources/HeuristicLab.Optimization/3.3/Interfaces/IMoveMaker.cs
===================================================================
--- /trunk/sources/HeuristicLab.Optimization/3.3/Interfaces/IMoveMaker.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.Optimization/3.3/Interfaces/IMoveMaker.cs	(revision 4068)
@@ -20,5 +20,4 @@
 #endregion
 
-using HeuristicLab.Common;
 using HeuristicLab.Core;
 using HeuristicLab.Data;
Index: /trunk/sources/HeuristicLab.Optimization/3.3/Interfaces/IMoveOperator.cs
===================================================================
--- /trunk/sources/HeuristicLab.Optimization/3.3/Interfaces/IMoveOperator.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.Optimization/3.3/Interfaces/IMoveOperator.cs	(revision 4068)
@@ -20,5 +20,4 @@
 #endregion
 
-using HeuristicLab.Common;
 using HeuristicLab.Core;
 
Index: /trunk/sources/HeuristicLab.Optimization/3.3/Interfaces/IMultiMoveGenerator.cs
===================================================================
--- /trunk/sources/HeuristicLab.Optimization/3.3/Interfaces/IMultiMoveGenerator.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.Optimization/3.3/Interfaces/IMultiMoveGenerator.cs	(revision 4068)
@@ -20,5 +20,4 @@
 #endregion
 
-using HeuristicLab.Common;
 using HeuristicLab.Core;
 using HeuristicLab.Data;
Index: /trunk/sources/HeuristicLab.Optimization/3.3/Interfaces/IMultiObjectiveEvaluator.cs
===================================================================
--- /trunk/sources/HeuristicLab.Optimization/3.3/Interfaces/IMultiObjectiveEvaluator.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.Optimization/3.3/Interfaces/IMultiObjectiveEvaluator.cs	(revision 4068)
@@ -20,5 +20,4 @@
 #endregion
 
-using HeuristicLab.Common;
 using HeuristicLab.Core;
 using HeuristicLab.Data;
Index: /trunk/sources/HeuristicLab.Optimization/3.3/Interfaces/IMultiObjectiveSelector.cs
===================================================================
--- /trunk/sources/HeuristicLab.Optimization/3.3/Interfaces/IMultiObjectiveSelector.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.Optimization/3.3/Interfaces/IMultiObjectiveSelector.cs	(revision 4068)
@@ -20,5 +20,4 @@
 #endregion
 
-using HeuristicLab.Common;
 using HeuristicLab.Core;
 using HeuristicLab.Data;
Index: /trunk/sources/HeuristicLab.Optimization/3.3/Interfaces/IOptimizer.cs
===================================================================
--- /trunk/sources/HeuristicLab.Optimization/3.3/Interfaces/IOptimizer.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.Optimization/3.3/Interfaces/IOptimizer.cs	(revision 4068)
@@ -20,5 +20,4 @@
 #endregion
 
-using HeuristicLab.Common;
 using HeuristicLab.Core;
 
Index: /trunk/sources/HeuristicLab.Optimization/3.3/Interfaces/IProblem.cs
===================================================================
--- /trunk/sources/HeuristicLab.Optimization/3.3/Interfaces/IProblem.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.Optimization/3.3/Interfaces/IProblem.cs	(revision 4068)
@@ -22,5 +22,4 @@
 using System;
 using System.Collections.Generic;
-using HeuristicLab.Common;
 using HeuristicLab.Core;
 
Index: /trunk/sources/HeuristicLab.Optimization/3.3/Interfaces/IRealVectorDecoder.cs
===================================================================
--- /trunk/sources/HeuristicLab.Optimization/3.3/Interfaces/IRealVectorDecoder.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.Optimization/3.3/Interfaces/IRealVectorDecoder.cs	(revision 4068)
@@ -20,8 +20,4 @@
 #endregion
 
-using System;
-using System.Collections.Generic;
-using System.Linq;
-using System.Text;
 using HeuristicLab.Core;
 using HeuristicLab.Data;
Index: /trunk/sources/HeuristicLab.Optimization/3.3/Interfaces/IRealVectorEncoder.cs
===================================================================
--- /trunk/sources/HeuristicLab.Optimization/3.3/Interfaces/IRealVectorEncoder.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.Optimization/3.3/Interfaces/IRealVectorEncoder.cs	(revision 4068)
@@ -20,8 +20,6 @@
 #endregion
 
-using HeuristicLab.Common;
 using HeuristicLab.Core;
 using HeuristicLab.Data;
-using System;
 
 namespace HeuristicLab.Optimization {
Index: /trunk/sources/HeuristicLab.Optimization/3.3/Interfaces/IReducer.cs
===================================================================
--- /trunk/sources/HeuristicLab.Optimization/3.3/Interfaces/IReducer.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.Optimization/3.3/Interfaces/IReducer.cs	(revision 4068)
@@ -20,5 +20,4 @@
 #endregion
 
-using HeuristicLab.Common;
 using HeuristicLab.Core;
 
Index: /trunk/sources/HeuristicLab.Optimization/3.3/Interfaces/IResult.cs
===================================================================
--- /trunk/sources/HeuristicLab.Optimization/3.3/Interfaces/IResult.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.Optimization/3.3/Interfaces/IResult.cs	(revision 4068)
@@ -21,5 +21,4 @@
 
 using System;
-using HeuristicLab.Common;
 using HeuristicLab.Core;
 
Index: /trunk/sources/HeuristicLab.Optimization/3.3/Interfaces/IRun.cs
===================================================================
--- /trunk/sources/HeuristicLab.Optimization/3.3/Interfaces/IRun.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.Optimization/3.3/Interfaces/IRun.cs	(revision 4068)
@@ -20,9 +20,8 @@
 #endregion
 
+using System;
 using System.Collections.Generic;
-using HeuristicLab.Common;
+using System.Drawing;
 using HeuristicLab.Core;
-using System.Drawing;
-using System;
 
 namespace HeuristicLab.Optimization {
@@ -35,5 +34,5 @@
     IDictionary<string, IItem> Results { get; }
 
-    Color Color {get;set;}
+    Color Color { get; set; }
     bool Visible { get; set; }
     event EventHandler Changed;
Index: /trunk/sources/HeuristicLab.Optimization/3.3/Interfaces/ISelector.cs
===================================================================
--- /trunk/sources/HeuristicLab.Optimization/3.3/Interfaces/ISelector.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.Optimization/3.3/Interfaces/ISelector.cs	(revision 4068)
@@ -20,5 +20,4 @@
 #endregion
 
-using HeuristicLab.Common;
 using HeuristicLab.Core;
 using HeuristicLab.Data;
Index: /trunk/sources/HeuristicLab.Optimization/3.3/Interfaces/ISelfAdaptiveManipulator.cs
===================================================================
--- /trunk/sources/HeuristicLab.Optimization/3.3/Interfaces/ISelfAdaptiveManipulator.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.Optimization/3.3/Interfaces/ISelfAdaptiveManipulator.cs	(revision 4068)
@@ -21,5 +21,4 @@
 
 using System;
-using HeuristicLab.Common;
 using HeuristicLab.Core;
 
Index: /trunk/sources/HeuristicLab.Optimization/3.3/Interfaces/ISingleObjectiveEvaluator.cs
===================================================================
--- /trunk/sources/HeuristicLab.Optimization/3.3/Interfaces/ISingleObjectiveEvaluator.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.Optimization/3.3/Interfaces/ISingleObjectiveEvaluator.cs	(revision 4068)
@@ -20,5 +20,4 @@
 #endregion
 
-using HeuristicLab.Common;
 using HeuristicLab.Core;
 using HeuristicLab.Data;
Index: /trunk/sources/HeuristicLab.Optimization/3.3/Interfaces/ISingleObjectiveMoveEvaluator.cs
===================================================================
--- /trunk/sources/HeuristicLab.Optimization/3.3/Interfaces/ISingleObjectiveMoveEvaluator.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.Optimization/3.3/Interfaces/ISingleObjectiveMoveEvaluator.cs	(revision 4068)
@@ -20,8 +20,6 @@
 #endregion
 
-using HeuristicLab.Common;
 using HeuristicLab.Core;
 using HeuristicLab.Data;
-using HeuristicLab.Parameters;
 
 namespace HeuristicLab.Optimization {
Index: /trunk/sources/HeuristicLab.Optimization/3.3/Interfaces/ISingleObjectiveProblem.cs
===================================================================
--- /trunk/sources/HeuristicLab.Optimization/3.3/Interfaces/ISingleObjectiveProblem.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.Optimization/3.3/Interfaces/ISingleObjectiveProblem.cs	(revision 4068)
@@ -20,5 +20,4 @@
 #endregion
 
-using HeuristicLab.Common;
 using HeuristicLab.Core;
 
Index: /trunk/sources/HeuristicLab.Optimization/3.3/Interfaces/ISingleObjectiveReplacer.cs
===================================================================
--- /trunk/sources/HeuristicLab.Optimization/3.3/Interfaces/ISingleObjectiveReplacer.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.Optimization/3.3/Interfaces/ISingleObjectiveReplacer.cs	(revision 4068)
@@ -20,5 +20,4 @@
 #endregion
 
-using HeuristicLab.Common;
 using HeuristicLab.Core;
 using HeuristicLab.Data;
Index: /trunk/sources/HeuristicLab.Optimization/3.3/Interfaces/ISingleObjectiveSelector.cs
===================================================================
--- /trunk/sources/HeuristicLab.Optimization/3.3/Interfaces/ISingleObjectiveSelector.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.Optimization/3.3/Interfaces/ISingleObjectiveSelector.cs	(revision 4068)
@@ -20,5 +20,4 @@
 #endregion
 
-using HeuristicLab.Common;
 using HeuristicLab.Core;
 using HeuristicLab.Data;
Index: /trunk/sources/HeuristicLab.Optimization/3.3/Interfaces/ISolutionCreator.cs
===================================================================
--- /trunk/sources/HeuristicLab.Optimization/3.3/Interfaces/ISolutionCreator.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.Optimization/3.3/Interfaces/ISolutionCreator.cs	(revision 4068)
@@ -20,5 +20,4 @@
 #endregion
 
-using HeuristicLab.Common;
 using HeuristicLab.Core;
 
Index: /trunk/sources/HeuristicLab.Optimization/3.3/Interfaces/IStochasticOperator.cs
===================================================================
--- /trunk/sources/HeuristicLab.Optimization/3.3/Interfaces/IStochasticOperator.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.Optimization/3.3/Interfaces/IStochasticOperator.cs	(revision 4068)
@@ -20,5 +20,4 @@
 #endregion
 
-using HeuristicLab.Common;
 using HeuristicLab.Core;
 
Index: /trunk/sources/HeuristicLab.Optimization/3.3/Interfaces/IStrategyParameterCreator.cs
===================================================================
--- /trunk/sources/HeuristicLab.Optimization/3.3/Interfaces/IStrategyParameterCreator.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.Optimization/3.3/Interfaces/IStrategyParameterCreator.cs	(revision 4068)
@@ -20,5 +20,4 @@
 #endregion
 
-using HeuristicLab.Common;
 using HeuristicLab.Core;
 
Index: /trunk/sources/HeuristicLab.Optimization/3.3/Interfaces/IStrategyParameterCrossover.cs
===================================================================
--- /trunk/sources/HeuristicLab.Optimization/3.3/Interfaces/IStrategyParameterCrossover.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.Optimization/3.3/Interfaces/IStrategyParameterCrossover.cs	(revision 4068)
@@ -20,5 +20,4 @@
 #endregion
 
-using HeuristicLab.Common;
 using HeuristicLab.Core;
 
Index: /trunk/sources/HeuristicLab.Optimization/3.3/Interfaces/IStrategyParameterManipulator.cs
===================================================================
--- /trunk/sources/HeuristicLab.Optimization/3.3/Interfaces/IStrategyParameterManipulator.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.Optimization/3.3/Interfaces/IStrategyParameterManipulator.cs	(revision 4068)
@@ -20,5 +20,4 @@
 #endregion
 
-using HeuristicLab.Common;
 using HeuristicLab.Core;
 
Index: /trunk/sources/HeuristicLab.Optimization/3.3/Interfaces/ITabuChecker.cs
===================================================================
--- /trunk/sources/HeuristicLab.Optimization/3.3/Interfaces/ITabuChecker.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.Optimization/3.3/Interfaces/ITabuChecker.cs	(revision 4068)
@@ -20,5 +20,4 @@
 #endregion
 
-using HeuristicLab.Common;
 using HeuristicLab.Core;
 using HeuristicLab.Data;
Index: /trunk/sources/HeuristicLab.Optimization/3.3/Interfaces/ITabuMaker.cs
===================================================================
--- /trunk/sources/HeuristicLab.Optimization/3.3/Interfaces/ITabuMaker.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.Optimization/3.3/Interfaces/ITabuMaker.cs	(revision 4068)
@@ -20,5 +20,4 @@
 #endregion
 
-using HeuristicLab.Common;
 using HeuristicLab.Core;
 using HeuristicLab.Data;
Index: /trunk/sources/HeuristicLab.Optimization/3.3/OptimizerList.cs
===================================================================
--- /trunk/sources/HeuristicLab.Optimization/3.3/OptimizerList.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.Optimization/3.3/OptimizerList.cs	(revision 4068)
@@ -21,6 +21,4 @@
 
 using System.Collections.Generic;
-using System.Linq;
-using HeuristicLab.Common;
 using HeuristicLab.Core;
 using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
Index: /trunk/sources/HeuristicLab.Optimization/3.3/ResultCollection.cs
===================================================================
--- /trunk/sources/HeuristicLab.Optimization/3.3/ResultCollection.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.Optimization/3.3/ResultCollection.cs	(revision 4068)
@@ -21,6 +21,4 @@
 
 using System.Collections.Generic;
-using System.Linq;
-using HeuristicLab.Common;
 using HeuristicLab.Core;
 using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
Index: /trunk/sources/HeuristicLab.Optimization/3.3/Run.cs
===================================================================
--- /trunk/sources/HeuristicLab.Optimization/3.3/Run.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.Optimization/3.3/Run.cs	(revision 4068)
@@ -22,8 +22,8 @@
 using System;
 using System.Collections.Generic;
+using System.Drawing;
 using HeuristicLab.Common;
 using HeuristicLab.Core;
 using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
-using System.Drawing;
 
 namespace HeuristicLab.Optimization {
Index: /trunk/sources/HeuristicLab.Optimization/3.3/RunCollection.cs
===================================================================
--- /trunk/sources/HeuristicLab.Optimization/3.3/RunCollection.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.Optimization/3.3/RunCollection.cs	(revision 4068)
@@ -23,9 +23,9 @@
 using System.Collections.Generic;
 using System.Linq;
+using HeuristicLab.Collections;
 using HeuristicLab.Common;
 using HeuristicLab.Core;
 using HeuristicLab.Data;
 using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
-using HeuristicLab.Collections;
 
 namespace HeuristicLab.Optimization {
Index: /trunk/sources/HeuristicLab.Optimization/3.3/RunCollectionConstraints/IRunCollectionConstraint.cs
===================================================================
--- /trunk/sources/HeuristicLab.Optimization/3.3/RunCollectionConstraints/IRunCollectionConstraint.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.Optimization/3.3/RunCollectionConstraints/IRunCollectionConstraint.cs	(revision 4068)
@@ -21,11 +21,8 @@
 
 using System;
-using System.Collections.Generic;
-using System.Linq;
-using System.Text;
 using HeuristicLab.Core;
 
 namespace HeuristicLab.Optimization {
-  public interface IRunCollectionConstraint : IConstraint{
+  public interface IRunCollectionConstraint : IConstraint {
     new RunCollection ConstrainedValue { get; set; }
     string ConstraintColumn { get; set; }
Index: /trunk/sources/HeuristicLab.Optimization/3.3/RunCollectionConstraints/RunCollectionComparisonConstraint.cs
===================================================================
--- /trunk/sources/HeuristicLab.Optimization/3.3/RunCollectionConstraints/RunCollectionComparisonConstraint.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.Optimization/3.3/RunCollectionConstraints/RunCollectionComparisonConstraint.cs	(revision 4068)
@@ -21,11 +21,9 @@
 
 using System;
-using System.Collections.Generic;
 using System.Linq;
-using System.Text;
+using HeuristicLab.Common;
 using HeuristicLab.Core;
+using HeuristicLab.Data;
 using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
-using HeuristicLab.Data;
-using HeuristicLab.Common;
 
 namespace HeuristicLab.Optimization {
Index: /trunk/sources/HeuristicLab.Optimization/3.3/RunCollectionConstraints/RunCollectionConstraintCollection.cs
===================================================================
--- /trunk/sources/HeuristicLab.Optimization/3.3/RunCollectionConstraints/RunCollectionConstraintCollection.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.Optimization/3.3/RunCollectionConstraints/RunCollectionConstraintCollection.cs	(revision 4068)
@@ -19,10 +19,7 @@
  */
 #endregion
-using System;
 using System.Collections.Generic;
-using System.Linq;
-using System.Text;
+using HeuristicLab.Core;
 using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
-using HeuristicLab.Core;
 
 namespace HeuristicLab.Optimization {
Index: /trunk/sources/HeuristicLab.Optimization/3.3/RunCollectionConstraints/RunCollectionEqualityConstraint.cs
===================================================================
--- /trunk/sources/HeuristicLab.Optimization/3.3/RunCollectionConstraints/RunCollectionEqualityConstraint.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.Optimization/3.3/RunCollectionConstraints/RunCollectionEqualityConstraint.cs	(revision 4068)
@@ -21,11 +21,9 @@
 
 using System;
-using System.Collections.Generic;
 using System.Linq;
-using System.Text;
+using HeuristicLab.Common;
 using HeuristicLab.Core;
+using HeuristicLab.Data;
 using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
-using HeuristicLab.Data;
-using HeuristicLab.Common;
 
 namespace HeuristicLab.Optimization {
Index: /trunk/sources/HeuristicLab.Optimization/3.3/RunCollectionConstraints/RunCollectionTypeCompatiblityConstraint.cs
===================================================================
--- /trunk/sources/HeuristicLab.Optimization/3.3/RunCollectionConstraints/RunCollectionTypeCompatiblityConstraint.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.Optimization/3.3/RunCollectionConstraints/RunCollectionTypeCompatiblityConstraint.cs	(revision 4068)
@@ -21,11 +21,9 @@
 
 using System;
-using System.Collections.Generic;
 using System.Linq;
-using System.Text;
+using HeuristicLab.Common;
 using HeuristicLab.Core;
+using HeuristicLab.Data;
 using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
-using HeuristicLab.Data;
-using HeuristicLab.Common;
 
 namespace HeuristicLab.Optimization {
Index: /trunk/sources/HeuristicLab.Optimization/3.3/UserDefinedAlgorithm.cs
===================================================================
--- /trunk/sources/HeuristicLab.Optimization/3.3/UserDefinedAlgorithm.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.Optimization/3.3/UserDefinedAlgorithm.cs	(revision 4068)
@@ -20,7 +20,4 @@
 #endregion
 
-using System;
-using HeuristicLab.Collections;
-using HeuristicLab.Common;
 using HeuristicLab.Core;
 using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
Index: /trunk/sources/HeuristicLab.Optimizer/3.3/ChartControlsWarning.cs
===================================================================
--- /trunk/sources/HeuristicLab.Optimizer/3.3/ChartControlsWarning.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.Optimizer/3.3/ChartControlsWarning.cs	(revision 4068)
@@ -20,10 +20,4 @@
 #endregion
 using System;
-using System.Collections.Generic;
-using System.ComponentModel;
-using System.Data;
-using System.Drawing;
-using System.Linq;
-using System.Text;
 using System.Windows.Forms;
 
Index: /trunk/sources/HeuristicLab.Optimizer/3.3/FileManager.cs
===================================================================
--- /trunk/sources/HeuristicLab.Optimizer/3.3/FileManager.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.Optimizer/3.3/FileManager.cs	(revision 4068)
@@ -21,8 +21,6 @@
 
 using System;
-using System.Linq;
 using System.Windows.Forms;
 using HeuristicLab.Common;
-using HeuristicLab.Core.Views;
 using HeuristicLab.MainForm;
 using HeuristicLab.PluginInfrastructure;
Index: /trunk/sources/HeuristicLab.Optimizer/3.3/MenuItems/AboutMenuItem.cs
===================================================================
--- /trunk/sources/HeuristicLab.Optimizer/3.3/MenuItems/AboutMenuItem.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.Optimizer/3.3/MenuItems/AboutMenuItem.cs	(revision 4068)
@@ -20,9 +20,6 @@
 #endregion
 
-using System;
 using System.Collections.Generic;
-using System.Linq;
 using System.Windows.Forms;
-using HeuristicLab.Core.Views;
 using HeuristicLab.MainForm;
 using HeuristicLab.PluginInfrastructure.Starter;
Index: /trunk/sources/HeuristicLab.Optimizer/3.3/MenuItems/ClipboardMenuItem.cs
===================================================================
--- /trunk/sources/HeuristicLab.Optimizer/3.3/MenuItems/ClipboardMenuItem.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.Optimizer/3.3/MenuItems/ClipboardMenuItem.cs	(revision 4068)
@@ -22,7 +22,5 @@
 using System;
 using System.Collections.Generic;
-using System.Linq;
 using System.Windows.Forms;
-using HeuristicLab.Common;
 using HeuristicLab.Core;
 using HeuristicLab.Core.Views;
Index: /trunk/sources/HeuristicLab.Optimizer/3.3/MenuItems/ConvertIntoUserDefinedAlgorithmMenuItem.cs
===================================================================
--- /trunk/sources/HeuristicLab.Optimizer/3.3/MenuItems/ConvertIntoUserDefinedAlgorithmMenuItem.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.Optimizer/3.3/MenuItems/ConvertIntoUserDefinedAlgorithmMenuItem.cs	(revision 4068)
@@ -23,7 +23,4 @@
 using System.Collections.Generic;
 using System.Windows.Forms;
-using HeuristicLab.Common;
-using HeuristicLab.Core;
-using HeuristicLab.Core.Views;
 using HeuristicLab.MainForm;
 using HeuristicLab.Optimization;
Index: /trunk/sources/HeuristicLab.Optimizer/3.3/MenuItems/CopyToClipboardMenuItem.cs
===================================================================
--- /trunk/sources/HeuristicLab.Optimizer/3.3/MenuItems/CopyToClipboardMenuItem.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.Optimizer/3.3/MenuItems/CopyToClipboardMenuItem.cs	(revision 4068)
@@ -23,5 +23,4 @@
 using System.Collections.Generic;
 using System.Windows.Forms;
-using HeuristicLab.Common;
 using HeuristicLab.Core;
 using HeuristicLab.Core.Views;
Index: /trunk/sources/HeuristicLab.Optimizer/3.3/MenuItems/ExitMenuItem.cs
===================================================================
--- /trunk/sources/HeuristicLab.Optimizer/3.3/MenuItems/ExitMenuItem.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.Optimizer/3.3/MenuItems/ExitMenuItem.cs	(revision 4068)
@@ -21,5 +21,4 @@
 
 using System.Collections.Generic;
-using System.Windows.Forms;
 using HeuristicLab.MainForm;
 
Index: /trunk/sources/HeuristicLab.Optimizer/3.3/MenuItems/StartPageMenuItem.cs
===================================================================
--- /trunk/sources/HeuristicLab.Optimizer/3.3/MenuItems/StartPageMenuItem.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.Optimizer/3.3/MenuItems/StartPageMenuItem.cs	(revision 4068)
@@ -24,5 +24,4 @@
 using System.Linq;
 using System.Windows.Forms;
-using HeuristicLab.Core.Views;
 using HeuristicLab.MainForm;
 
Index: /trunk/sources/HeuristicLab.Optimizer/3.3/NewItemDialog.cs
===================================================================
--- /trunk/sources/HeuristicLab.Optimizer/3.3/NewItemDialog.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.Optimizer/3.3/NewItemDialog.cs	(revision 4068)
@@ -24,5 +24,4 @@
 using System.Linq;
 using System.Windows.Forms;
-using HeuristicLab.Common;
 using HeuristicLab.Core;
 using HeuristicLab.PluginInfrastructure;
@@ -60,5 +59,5 @@
             IItem i = (IItem)Activator.CreateInstance(creatable);
             items.Add(i);
-            ListViewItem item = new ListViewItem(new string[] { i.ItemName, i.ItemVersion.ToString(), i.ItemDescription}, group);
+            ListViewItem item = new ListViewItem(new string[] { i.ItemName, i.ItemVersion.ToString(), i.ItemDescription }, group);
             itemsListView.SmallImageList.Images.Add(i.ItemImage);
             item.ImageIndex = itemsListView.SmallImageList.Images.Count - 1;
Index: /trunk/sources/HeuristicLab.Optimizer/3.3/OptimizerMainForm.cs
===================================================================
--- /trunk/sources/HeuristicLab.Optimizer/3.3/OptimizerMainForm.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.Optimizer/3.3/OptimizerMainForm.cs	(revision 4068)
@@ -22,4 +22,5 @@
 using System;
 using System.ComponentModel;
+using System.IO;
 using System.Linq;
 using System.Reflection;
@@ -30,5 +31,4 @@
 using HeuristicLab.MainForm;
 using HeuristicLab.MainForm.WindowsForms;
-using System.IO;
 
 namespace HeuristicLab.Optimizer {
Index: /trunk/sources/HeuristicLab.Optimizer/3.3/StartPage.cs
===================================================================
--- /trunk/sources/HeuristicLab.Optimizer/3.3/StartPage.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.Optimizer/3.3/StartPage.cs	(revision 4068)
@@ -21,8 +21,8 @@
 
 using System;
-using System.Collections.Generic;
 using System.IO;
 using System.Linq;
 using System.Reflection;
+using System.Threading;
 using System.Windows.Forms;
 using HeuristicLab.Common;
@@ -30,5 +30,4 @@
 using HeuristicLab.MainForm;
 using HeuristicLab.Persistence.Default.Xml;
-using System.Threading;
 
 namespace HeuristicLab.Optimizer {
Index: /trunk/sources/HeuristicLab.Parameters.Views/3.3/ConstrainedValueParameterView.cs
===================================================================
--- /trunk/sources/HeuristicLab.Parameters.Views/3.3/ConstrainedValueParameterView.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.Parameters.Views/3.3/ConstrainedValueParameterView.cs	(revision 4068)
@@ -23,5 +23,4 @@
 using System.Collections.Generic;
 using HeuristicLab.Collections;
-using HeuristicLab.Common;
 using HeuristicLab.Core;
 using HeuristicLab.Core.Views;
Index: /trunk/sources/HeuristicLab.Parameters.Views/3.3/LookupParameterView.cs
===================================================================
--- /trunk/sources/HeuristicLab.Parameters.Views/3.3/LookupParameterView.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.Parameters.Views/3.3/LookupParameterView.cs	(revision 4068)
@@ -21,5 +21,4 @@
 
 using System;
-using HeuristicLab.Common;
 using HeuristicLab.Core;
 using HeuristicLab.Core.Views;
Index: /trunk/sources/HeuristicLab.Parameters.Views/3.3/ScopeTreeLookupParameterView.cs
===================================================================
--- /trunk/sources/HeuristicLab.Parameters.Views/3.3/ScopeTreeLookupParameterView.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.Parameters.Views/3.3/ScopeTreeLookupParameterView.cs	(revision 4068)
@@ -22,5 +22,4 @@
 using System;
 using System.Windows.Forms;
-using HeuristicLab.Common;
 using HeuristicLab.Core;
 using HeuristicLab.Core.Views;
Index: /trunk/sources/HeuristicLab.Parameters.Views/3.3/ValueLookupParameterView.cs
===================================================================
--- /trunk/sources/HeuristicLab.Parameters.Views/3.3/ValueLookupParameterView.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.Parameters.Views/3.3/ValueLookupParameterView.cs	(revision 4068)
@@ -22,5 +22,4 @@
 using System;
 using System.Windows.Forms;
-using HeuristicLab.Common;
 using HeuristicLab.Core;
 using HeuristicLab.Core.Views;
Index: /trunk/sources/HeuristicLab.Parameters.Views/3.3/ValueParameterView.cs
===================================================================
--- /trunk/sources/HeuristicLab.Parameters.Views/3.3/ValueParameterView.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.Parameters.Views/3.3/ValueParameterView.cs	(revision 4068)
@@ -22,5 +22,4 @@
 using System;
 using System.Windows.Forms;
-using HeuristicLab.Common;
 using HeuristicLab.Core;
 using HeuristicLab.Core.Views;
Index: /trunk/sources/HeuristicLab.Parameters/3.3/ConstrainedValueParameter.cs
===================================================================
--- /trunk/sources/HeuristicLab.Parameters/3.3/ConstrainedValueParameter.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.Parameters/3.3/ConstrainedValueParameter.cs	(revision 4068)
@@ -23,5 +23,4 @@
 using System.Linq;
 using HeuristicLab.Collections;
-using HeuristicLab.Common;
 using HeuristicLab.Core;
 using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
Index: /trunk/sources/HeuristicLab.Parameters/3.3/OperatorParameter.cs
===================================================================
--- /trunk/sources/HeuristicLab.Parameters/3.3/OperatorParameter.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.Parameters/3.3/OperatorParameter.cs	(revision 4068)
@@ -20,5 +20,4 @@
 #endregion
 
-using HeuristicLab.Common;
 using HeuristicLab.Core;
 using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
Index: /trunk/sources/HeuristicLab.Parameters/3.3/ScopeParameter.cs
===================================================================
--- /trunk/sources/HeuristicLab.Parameters/3.3/ScopeParameter.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.Parameters/3.3/ScopeParameter.cs	(revision 4068)
@@ -21,5 +21,4 @@
 
 using System;
-using HeuristicLab.Common;
 using HeuristicLab.Core;
 using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
Index: /trunk/sources/HeuristicLab.Parameters/3.3/ValueParameter.cs
===================================================================
--- /trunk/sources/HeuristicLab.Parameters/3.3/ValueParameter.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.Parameters/3.3/ValueParameter.cs	(revision 4068)
@@ -21,5 +21,4 @@
 
 using System;
-using HeuristicLab.Common;
 using HeuristicLab.Core;
 using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
Index: /trunk/sources/HeuristicLab.Persistence.GUI/3.3/PersistenceAnalysis.cs
===================================================================
--- /trunk/sources/HeuristicLab.Persistence.GUI/3.3/PersistenceAnalysis.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.Persistence.GUI/3.3/PersistenceAnalysis.cs	(revision 4068)
@@ -23,9 +23,6 @@
 using System.Collections.Generic;
 using System.Linq;
-using System.Text;
+using System.Windows.Forms;
 using HeuristicLab.Persistence.Core;
-using System.Windows.Forms;
-using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
-using System.Reflection;
 
 namespace HeuristicLab.Persistence.GUI {
@@ -63,8 +60,8 @@
           assembly.FullName.StartsWith("Netron"))
           continue;
-        foreach (var type in assembly.GetTypes()) {          
+        foreach (var type in assembly.GetTypes()) {
           if (type.IsInterface || type.IsAbstract ||
               type.FullName.StartsWith("System.") ||
-              type.FullName.StartsWith("Microsoft.") ||              
+              type.FullName.StartsWith("Microsoft.") ||
               type.FullName.Contains("<") ||
               type.FullName.Contains(">") ||
@@ -74,5 +71,5 @@
               DerivesFrom(typeof(System.Attribute), type) ||
               type.GetInterface("HeuristicLab.MainForm.IUserInterfaceItem") != null
-            )            
+            )
             continue;
           try {
@@ -81,5 +78,6 @@
             /* if (!IsCorrectlyStorable(type))
               storableInconsistentcy.Add(type); */
-          } catch {
+          }
+          catch {
             types.Add(type);
           }
@@ -98,5 +96,5 @@
       }
       return true;
-    }  */  
+    }  */
   }
 }
Index: /trunk/sources/HeuristicLab.Persistence.GUI/3.3/PersistenceConfigurationForm.cs
===================================================================
--- /trunk/sources/HeuristicLab.Persistence.GUI/3.3/PersistenceConfigurationForm.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.Persistence.GUI/3.3/PersistenceConfigurationForm.cs	(revision 4068)
@@ -27,10 +27,5 @@
 using HeuristicLab.Persistence.Auxiliary;
 using HeuristicLab.Persistence.Core;
-using HeuristicLab.Persistence.Default.Xml;
 using HeuristicLab.Persistence.Interfaces;
-using System.Text;
-using HeuristicLab.Persistence.Default.CompositeSerializers;
-using HeuristicLab.PluginInfrastructure;
-using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
 
 namespace HeuristicLab.Persistence.GUI {
@@ -59,5 +54,6 @@
         ConfigurationService.Instance.LoadSettings(true);
         UpdateFromConfigurationService();
-      } catch (PersistenceException) {
+      }
+      catch (PersistenceException) {
         MessageBox.Show(
           "Persistence settings could not be loaded.\r\n" +
@@ -455,5 +451,5 @@
   }
 
-  
+
 
 }
Index: /trunk/sources/HeuristicLab.Persistence.GUI/3.3/TypeExtensions.cs
===================================================================
--- /trunk/sources/HeuristicLab.Persistence.GUI/3.3/TypeExtensions.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.Persistence.GUI/3.3/TypeExtensions.cs	(revision 4068)
@@ -21,6 +21,4 @@
 
 using System;
-using System.Collections.Generic;
-using System.Linq;
 using System.Text;
 
@@ -51,4 +49,4 @@
 
   }
-  
+
 }
Index: /trunk/sources/HeuristicLab.Persistence/3.3/Auxiliary/ReflectionTools.cs
===================================================================
--- /trunk/sources/HeuristicLab.Persistence/3.3/Auxiliary/ReflectionTools.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.Persistence/3.3/Auxiliary/ReflectionTools.cs	(revision 4068)
@@ -21,7 +21,4 @@
 
 using System;
-using System.Collections.Generic;
-using System.Linq;
-using System.Text;
 using System.Reflection;
 
Index: /trunk/sources/HeuristicLab.Persistence/3.3/Auxiliary/StringExtensions.cs
===================================================================
--- /trunk/sources/HeuristicLab.Persistence/3.3/Auxiliary/StringExtensions.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.Persistence/3.3/Auxiliary/StringExtensions.cs	(revision 4068)
@@ -1,7 +1,3 @@
-﻿using System;
-using System.Collections.Generic;
-using System.Linq;
-using System.Text;
-using System.Text.RegularExpressions;
+﻿using System.Collections.Generic;
 
 namespace HeuristicLab.Persistence.Auxiliary {
@@ -24,5 +20,5 @@
             yield return s.Substring(startIdx, i - startIdx);
           }
-          startIdx = i+1;
+          startIdx = i + 1;
         }
       }
Index: /trunk/sources/HeuristicLab.Persistence/3.3/Auxiliary/TypeExtensions.cs
===================================================================
--- /trunk/sources/HeuristicLab.Persistence/3.3/Auxiliary/TypeExtensions.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.Persistence/3.3/Auxiliary/TypeExtensions.cs	(revision 4068)
@@ -21,5 +21,4 @@
 
 using System;
-using System.Text;
 
 namespace HeuristicLab.Persistence.Auxiliary {
Index: /trunk/sources/HeuristicLab.Persistence/3.3/Auxiliary/TypeLoader.cs
===================================================================
--- /trunk/sources/HeuristicLab.Persistence/3.3/Auxiliary/TypeLoader.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.Persistence/3.3/Auxiliary/TypeLoader.cs	(revision 4068)
@@ -20,12 +20,8 @@
 #endregion
 
-using System.Collections.Generic;
 using System;
-using HeuristicLab.Persistence.Interfaces;
-using HeuristicLab.Persistence.Core.Tokens;
-using HeuristicLab.Persistence.Auxiliary;
-using HeuristicLab.Tracing;
 using System.Reflection;
 using HeuristicLab.Persistence.Core;
+using HeuristicLab.Tracing;
 
 namespace HeuristicLab.Persistence.Auxiliary {
@@ -37,15 +33,17 @@
       try {
         type = Type.GetType(typeNameString, true);
-      } catch (Exception) {
+      }
+      catch (Exception) {
         Logger.Warn(String.Format(
           "Cannot load type \"{0}\", falling back to partial name", typeNameString));
         try {
-          TypeName typeName = TypeNameParser.Parse(typeNameString);             
+          TypeName typeName = TypeNameParser.Parse(typeNameString);
 #pragma warning disable 0618
-          Assembly a = Assembly.LoadWithPartialName(typeName.AssemblyName);          
+          Assembly a = Assembly.LoadWithPartialName(typeName.AssemblyName);
           // the suggested Assembly.Load() method fails to load assemblies outside the GAC
 #pragma warning restore 0618
           type = a.GetType(typeName.ToString(false, false), true);
-        } catch (Exception) {
+        }
+        catch (Exception) {
           throw new PersistenceException(String.Format(
             "Could not load type \"{0}\"",
@@ -65,7 +63,9 @@
               typeNameString,
               type.AssemblyQualifiedName));
-        } catch (PersistenceException) {
+        }
+        catch (PersistenceException) {
           throw;
-        } catch (Exception e) {
+        }
+        catch (Exception e) {
           Logger.Warn(String.Format(
             "Could not perform version check requested type was {0} while loaded type is {1}:",
Index: /trunk/sources/HeuristicLab.Persistence/3.3/Auxiliary/TypeName.cs
===================================================================
--- /trunk/sources/HeuristicLab.Persistence/3.3/Auxiliary/TypeName.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.Persistence/3.3/Auxiliary/TypeName.cs	(revision 4068)
@@ -21,9 +21,7 @@
 
 using System;
+using System.Collections.Generic;
 using System.Linq;
 using System.Text;
-using System.Text.RegularExpressions;
-using System.Reflection.Emit;
-using System.Collections.Generic;
 using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
 
@@ -135,5 +133,5 @@
     /// A <see cref="System.String"/> that represents this instance.
     /// </returns>
-    public string ToString(bool full, bool includeAssembly) {      
+    public string ToString(bool full, bool includeAssembly) {
       StringBuilder sb = new StringBuilder();
       if (!string.IsNullOrEmpty(Namespace))
@@ -236,5 +234,6 @@
         }
         return false;
-      } catch (KeyNotFoundException) {
+      }
+      catch (KeyNotFoundException) {
         throw new Exception("Could not extract version information from type string");
       }
@@ -269,5 +268,6 @@
         }
         return true;
-      } catch (KeyNotFoundException) {
+      }
+      catch (KeyNotFoundException) {
         throw new Exception("Could not extract version infomration from type string");
       }
Index: /trunk/sources/HeuristicLab.Persistence/3.3/Auxiliary/TypeNameParser.cs
===================================================================
--- /trunk/sources/HeuristicLab.Persistence/3.3/Auxiliary/TypeNameParser.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.Persistence/3.3/Auxiliary/TypeNameParser.cs	(revision 4068)
@@ -21,8 +21,7 @@
 
 using System;
+using System.Collections.Generic;
 using System.Text;
 using System.Text.RegularExpressions;
-using System.Reflection.Emit;
-using System.Collections.Generic;
 
 namespace HeuristicLab.Persistence.Auxiliary {
@@ -121,5 +120,5 @@
         }
       }
-      public static IEnumerable<Token> Tokenize(string s) {        
+      public static IEnumerable<Token> Tokenize(string s) {
         int pos = 0;
         foreach (Match m in TokenRegex.Matches(s)) {
@@ -163,5 +162,6 @@
       try {
         return p.TransformTypeSpec();
-      } catch (ParseError x) {
+      }
+      catch (ParseError x) {
         if (p.Position > 0)
           throw new ParseError(String.Format(
Index: /trunk/sources/HeuristicLab.Persistence/3.3/Core/Configuration.cs
===================================================================
--- /trunk/sources/HeuristicLab.Persistence/3.3/Core/Configuration.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.Persistence/3.3/Core/Configuration.cs	(revision 4068)
@@ -21,8 +21,7 @@
 
 using System;
-using System.Linq;
 using System.Collections.Generic;
+using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
 using HeuristicLab.Persistence.Interfaces;
-using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
 
 namespace HeuristicLab.Persistence.Core {
@@ -77,7 +76,7 @@
             "is not compatible with selected format's ({2}) seriali data type ({3})",
             primitiveSerializers.GetType().FullName, primitiveSerializer.SerialDataType.FullName,
-            format.Name, format.SerialDataType.FullName));            
+            format.Name, format.SerialDataType.FullName));
         this.primitiveSerializers.Add(primitiveSerializer.SourceType, primitiveSerializer);
-      }      
+      }
     }
 
Index: /trunk/sources/HeuristicLab.Persistence/3.3/Core/ConfigurationService.cs
===================================================================
--- /trunk/sources/HeuristicLab.Persistence/3.3/Core/ConfigurationService.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.Persistence/3.3/Core/ConfigurationService.cs	(revision 4068)
@@ -21,7 +21,7 @@
 
 using System;
+using System.Collections.Generic;
 using System.IO;
 using System.Linq;
-using System.Collections.Generic;
 using System.Reflection;
 using System.Text;
@@ -29,6 +29,4 @@
 using HeuristicLab.Persistence.Interfaces;
 using HeuristicLab.Tracing;
-using HeuristicLab.Persistence.Core.Tokens;
-using HeuristicLab.Persistence.Auxiliary;
 
 namespace HeuristicLab.Persistence.Core {
@@ -96,5 +94,6 @@
       try {
         TryLoadSettings();
-      } catch (Exception e) {
+      }
+      catch (Exception e) {
         if (throwOnError) {
           throw new PersistenceException("Could not load persistence settings.", e);
@@ -163,5 +162,6 @@
           if (a != defaultAssembly)
             DiscoverFrom(a);
-      } catch (AppDomainUnloadedException x) {
+      }
+      catch (AppDomainUnloadedException x) {
         Logger.Warn("could not get list of assemblies, AppDomain has already been unloaded", x);
       }
@@ -207,5 +207,6 @@
           }
         }
-      } catch (ReflectionTypeLoadException e) {
+      }
+      catch (ReflectionTypeLoadException e) {
         Logger.Warn("could not analyse assembly: " + a.FullName, e);
       }
Index: /trunk/sources/HeuristicLab.Persistence/3.3/Core/DataMemberAccessor.cs
===================================================================
--- /trunk/sources/HeuristicLab.Persistence/3.3/Core/DataMemberAccessor.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.Persistence/3.3/Core/DataMemberAccessor.cs	(revision 4068)
@@ -22,10 +22,8 @@
 using System;
 using System.Reflection;
-using HeuristicLab.Persistence.Core;
 using System.Reflection.Emit;
-using System.Collections.Generic;
 
 namespace HeuristicLab.Persistence.Core {
-  
+
   /// <summary>
   /// Encapsulation and abstraction for access a data member of an object
Index: /trunk/sources/HeuristicLab.Persistence/3.3/Core/DeSerializer.cs
===================================================================
--- /trunk/sources/HeuristicLab.Persistence/3.3/Core/DeSerializer.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.Persistence/3.3/Core/DeSerializer.cs	(revision 4068)
@@ -20,11 +20,9 @@
 #endregion
 
+using System;
 using System.Collections.Generic;
-using System;
+using HeuristicLab.Persistence.Auxiliary;
+using HeuristicLab.Persistence.Core.Tokens;
 using HeuristicLab.Persistence.Interfaces;
-using HeuristicLab.Persistence.Core.Tokens;
-using HeuristicLab.Persistence.Auxiliary;
-using HeuristicLab.Tracing;
-using System.Reflection;
 
 namespace HeuristicLab.Persistence.Core {
@@ -82,5 +80,5 @@
       }
     }
-    
+
     private readonly Dictionary<int, object> id2obj;
     private readonly Dictionary<Type, object> serializerMapping;
@@ -124,7 +122,9 @@
           serializer = Activator.CreateInstance(serializerType, true);
         serializerMapping.Add(type, serializer);
-      } catch (PersistenceException) {
+      }
+      catch (PersistenceException) {
         throw;
-      } catch (Exception e) {
+      }
+      catch (Exception e) {
         throw new PersistenceException(string.Format(
           "Could not add type info for {0} ({1})",
@@ -181,5 +181,6 @@
       try {
         parentStack.Push(new Midwife(type, (ICompositeSerializer)serializerMapping[type], token.Id));
-      } catch (Exception e) {
+      }
+      catch (Exception e) {
         if (e is InvalidCastException || e is KeyNotFoundException) {
           throw new PersistenceException(String.Format(
@@ -210,5 +211,6 @@
           id2obj[(int)token.Id] = value;
         SetValue(token.Name, value);
-      } catch (Exception e) {
+      }
+      catch (Exception e) {
         if (e is InvalidCastException || e is KeyNotFoundException) {
           throw new PersistenceException(String.Format(
Index: /trunk/sources/HeuristicLab.Persistence/3.3/Core/GeneratorBase.cs
===================================================================
--- /trunk/sources/HeuristicLab.Persistence/3.3/Core/GeneratorBase.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.Persistence/3.3/Core/GeneratorBase.cs	(revision 4068)
@@ -20,13 +20,7 @@
 #endregion
 
-using System.Collections.Generic;
 using System;
-using System.Text;
+using HeuristicLab.Persistence.Core.Tokens;
 using HeuristicLab.Persistence.Interfaces;
-using HeuristicLab.Persistence.Core;
-using System.IO;
-using ICSharpCode.SharpZipLib.Zip;
-using HeuristicLab.Tracing;
-using HeuristicLab.Persistence.Core.Tokens;
 
 namespace HeuristicLab.Persistence.Core {
Index: /trunk/sources/HeuristicLab.Persistence/3.3/Core/PersistenceException.cs
===================================================================
--- /trunk/sources/HeuristicLab.Persistence/3.3/Core/PersistenceException.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.Persistence/3.3/Core/PersistenceException.cs	(revision 4068)
@@ -20,9 +20,6 @@
 #endregion
 
+using System;
 using System.Collections.Generic;
-using System;
-using HeuristicLab.Persistence.Interfaces;
-using HeuristicLab.Persistence.Core.Tokens;
-using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
 using System.Text;
 
@@ -32,5 +29,5 @@
   /// Exception thrown by components inside the persistence framework.
   /// </summary>
-  [Serializable]  
+  [Serializable]
   public class PersistenceException : Exception {
 
@@ -87,4 +84,4 @@
     }
   }
-  
+
 }
Index: /trunk/sources/HeuristicLab.Persistence/3.3/Core/Serializer.cs
===================================================================
--- /trunk/sources/HeuristicLab.Persistence/3.3/Core/Serializer.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.Persistence/3.3/Core/Serializer.cs	(revision 4068)
@@ -20,16 +20,12 @@
 #endregion
 
+using System;
+using System.Collections;
 using System.Collections.Generic;
-using System.Collections;
-using System;
-using System.Linq;
+using System.Reflection;
+using System.Text;
 using HeuristicLab.Persistence.Auxiliary;
+using HeuristicLab.Persistence.Core.Tokens;
 using HeuristicLab.Persistence.Interfaces;
-using HeuristicLab.Persistence.Core.Tokens;
-using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
-using System.Text;
-using System.Reflection;
-using System.IO;
-using System.Diagnostics;
 
 namespace HeuristicLab.Persistence.Core {
@@ -94,5 +90,5 @@
       }
     }
-    
+
     /// <summary>
     /// Contains a list of files (mostly assemblies) that are
@@ -207,5 +203,5 @@
 
     private IEnumerator<ISerializationToken> Serialize(DataMemberAccessor accessor, object obj) {
-      
+
       object value = accessor.Get(obj);
       if (value == null)
@@ -244,6 +240,7 @@
             compositeSerializer.CreateMetaInfo(value),
             emitTypeInfo);
-        throw CreatePersistenceException(type, "Could not determine how to serialize a value.");      
-      } catch (Exception x) {
+        throw CreatePersistenceException(type, "Could not determine how to serialize a value.");
+      }
+      catch (Exception x) {
         if (isTestRun) {
           exceptions.Add(x);
@@ -254,5 +251,6 @@
           throw CreatePersistenceException(type, "Uncaught exception during serialization: " + x.Message);
         }
-      } finally {
+      }
+      finally {
         objectGraphTrace.Pop();
       }
Index: /trunk/sources/HeuristicLab.Persistence/3.3/Core/Tag.cs
===================================================================
--- /trunk/sources/HeuristicLab.Persistence/3.3/Core/Tag.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.Persistence/3.3/Core/Tag.cs	(revision 4068)
@@ -20,5 +20,4 @@
 #endregion
 
-using System.Collections.Generic;
 
 namespace HeuristicLab.Persistence.Core {
Index: /trunk/sources/HeuristicLab.Persistence/3.3/Core/Tokens/BeginToken.cs
===================================================================
--- /trunk/sources/HeuristicLab.Persistence/3.3/Core/Tokens/BeginToken.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.Persistence/3.3/Core/Tokens/BeginToken.cs	(revision 4068)
@@ -20,5 +20,4 @@
 #endregion
 
-using HeuristicLab.Persistence.Interfaces;
 
 namespace HeuristicLab.Persistence.Core.Tokens {
Index: /trunk/sources/HeuristicLab.Persistence/3.3/Core/Tokens/EndToken.cs
===================================================================
--- /trunk/sources/HeuristicLab.Persistence/3.3/Core/Tokens/EndToken.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.Persistence/3.3/Core/Tokens/EndToken.cs	(revision 4068)
@@ -20,5 +20,4 @@
 #endregion
 
-using HeuristicLab.Persistence.Interfaces;
 
 namespace HeuristicLab.Persistence.Core.Tokens {
Index: /trunk/sources/HeuristicLab.Persistence/3.3/Core/Tokens/NulLReferenceToken.cs
===================================================================
--- /trunk/sources/HeuristicLab.Persistence/3.3/Core/Tokens/NulLReferenceToken.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.Persistence/3.3/Core/Tokens/NulLReferenceToken.cs	(revision 4068)
@@ -20,5 +20,4 @@
 #endregion
 
-using HeuristicLab.Persistence.Interfaces;
 
 namespace HeuristicLab.Persistence.Core.Tokens {
Index: /trunk/sources/HeuristicLab.Persistence/3.3/Core/Tokens/ReferenceToken.cs
===================================================================
--- /trunk/sources/HeuristicLab.Persistence/3.3/Core/Tokens/ReferenceToken.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.Persistence/3.3/Core/Tokens/ReferenceToken.cs	(revision 4068)
@@ -20,5 +20,4 @@
 #endregion
 
-using HeuristicLab.Persistence.Interfaces;
 
 namespace HeuristicLab.Persistence.Core.Tokens {
Index: /trunk/sources/HeuristicLab.Persistence/3.3/Core/Tokens/SerializationTokenBase.cs
===================================================================
--- /trunk/sources/HeuristicLab.Persistence/3.3/Core/Tokens/SerializationTokenBase.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.Persistence/3.3/Core/Tokens/SerializationTokenBase.cs	(revision 4068)
@@ -20,7 +20,7 @@
 #endregion
 
-using HeuristicLab.Persistence.Interfaces;
 using System.Reflection;
 using System.Text;
+using HeuristicLab.Persistence.Interfaces;
 
 namespace HeuristicLab.Persistence.Core.Tokens {
Index: /trunk/sources/HeuristicLab.Persistence/3.3/Core/Tokens/TypeToken.cs
===================================================================
--- /trunk/sources/HeuristicLab.Persistence/3.3/Core/Tokens/TypeToken.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.Persistence/3.3/Core/Tokens/TypeToken.cs	(revision 4068)
@@ -20,8 +20,4 @@
 #endregion
 
-using System;
-using System.Collections.Generic;
-using System.Linq;
-using System.Text;
 using HeuristicLab.Persistence.Interfaces;
 
Index: /trunk/sources/HeuristicLab.Persistence/3.3/Default/CompositeSerializers/ArraySerializer.cs
===================================================================
--- /trunk/sources/HeuristicLab.Persistence/3.3/Default/CompositeSerializers/ArraySerializer.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.Persistence/3.3/Default/CompositeSerializers/ArraySerializer.cs	(revision 4068)
@@ -21,9 +21,8 @@
 
 using System;
+using System.Collections.Generic;
 using HeuristicLab.Persistence.Core;
+using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
 using HeuristicLab.Persistence.Interfaces;
-using System.Collections.Generic;
-using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
-using System.Text;
 
 namespace HeuristicLab.Persistence.Default.CompositeSerializers {
@@ -96,7 +95,9 @@
         }
         return Array.CreateInstance(t.GetElementType(), lengths, lowerBounds);
-      } catch (InvalidOperationException x) {
+      }
+      catch (InvalidOperationException x) {
         throw new PersistenceException("Insufficient meta information to construct array instance.", x);
-      } catch (InvalidCastException x) {
+      }
+      catch (InvalidCastException x) {
         throw new PersistenceException("Invalid format of array metainfo.", x);
       }
@@ -129,9 +130,12 @@
           }
         }
-      } catch (InvalidOperationException x) {
+      }
+      catch (InvalidOperationException x) {
         throw new PersistenceException("Insufficient data to fill array instance", x);
-      } catch (InvalidCastException x) {
+      }
+      catch (InvalidCastException x) {
         throw new PersistenceException("Invalid element data. Cannot fill array", x);
-      } catch (IndexOutOfRangeException x) {
+      }
+      catch (IndexOutOfRangeException x) {
         throw new PersistenceException("Too many elements during array deserialization", x);
       }
Index: /trunk/sources/HeuristicLab.Persistence/3.3/Default/CompositeSerializers/CompactNumberArray2StringSerializer.cs
===================================================================
--- /trunk/sources/HeuristicLab.Persistence/3.3/Default/CompositeSerializers/CompactNumberArray2StringSerializer.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.Persistence/3.3/Default/CompositeSerializers/CompactNumberArray2StringSerializer.cs	(revision 4068)
@@ -21,13 +21,10 @@
 
 using System;
-using System.Linq;
+using System.Collections.Generic;
+using System.Text;
+using HeuristicLab.Persistence.Auxiliary;
+using HeuristicLab.Persistence.Core;
+using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
 using HeuristicLab.Persistence.Interfaces;
-using HeuristicLab.Persistence.Core;
-using System.Collections.Generic;
-using System.Reflection;
-using System.Globalization;
-using System.Text;
-using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
-using HeuristicLab.Persistence.Auxiliary;
 
 namespace HeuristicLab.Persistence.Default.CompositeSerializers {
@@ -143,7 +140,9 @@
         }
         return a;
-      } catch (InvalidOperationException e) {
+      }
+      catch (InvalidOperationException e) {
         throw new PersistenceException("Insuffictient data to deserialize compact array", e);
-      } catch (InvalidCastException e) {
+      }
+      catch (InvalidCastException e) {
         throw new PersistenceException("Invalid element data during compact array deserialization", e);
       }
Index: /trunk/sources/HeuristicLab.Persistence/3.3/Default/CompositeSerializers/DictionarySerializer.cs
===================================================================
--- /trunk/sources/HeuristicLab.Persistence/3.3/Default/CompositeSerializers/DictionarySerializer.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.Persistence/3.3/Default/CompositeSerializers/DictionarySerializer.cs	(revision 4068)
@@ -22,9 +22,9 @@
 using System;
 using System.Collections;
+using System.Collections.Generic;
+using HeuristicLab.Persistence.Auxiliary;
 using HeuristicLab.Persistence.Core;
+using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
 using HeuristicLab.Persistence.Interfaces;
-using System.Collections.Generic;
-using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
-using HeuristicLab.Persistence.Auxiliary;
 
 namespace HeuristicLab.Persistence.Default.CompositeSerializers {
@@ -75,11 +75,15 @@
           dict.Add(key.Value, value.Value);
         }
-      } catch (InvalidOperationException e) {
+      }
+      catch (InvalidOperationException e) {
         throw new PersistenceException("Dictionaries must contain an even number of elements (key+value).", e);
-      } catch (NotSupportedException e) {
+      }
+      catch (NotSupportedException e) {
         throw new PersistenceException("The serialized dictionary type was read-only or had a fixed size and cannot be deserialized.", e);
-      } catch (ArgumentNullException e) {
+      }
+      catch (ArgumentNullException e) {
         throw new PersistenceException("Dictionary key was null.", e);
-      } catch (ArgumentException e) {
+      }
+      catch (ArgumentException e) {
         throw new PersistenceException("Duplicate dictionary key.", e);
       }
Index: /trunk/sources/HeuristicLab.Persistence/3.3/Default/CompositeSerializers/EnumSerializer.cs
===================================================================
--- /trunk/sources/HeuristicLab.Persistence/3.3/Default/CompositeSerializers/EnumSerializer.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.Persistence/3.3/Default/CompositeSerializers/EnumSerializer.cs	(revision 4068)
@@ -21,8 +21,8 @@
 
 using System;
+using System.Collections.Generic;
 using HeuristicLab.Persistence.Core;
+using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
 using HeuristicLab.Persistence.Interfaces;
-using System.Collections.Generic;
-using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
 
 namespace HeuristicLab.Persistence.Default.CompositeSerializers {
@@ -56,7 +56,9 @@
         it.MoveNext();
         return Enum.Parse(t, (string)it.Current.Value);
-      } catch (InvalidOperationException e) {
+      }
+      catch (InvalidOperationException e) {
         throw new PersistenceException("not enough meta information to recstruct enum", e);
-      } catch (InvalidCastException e) {
+      }
+      catch (InvalidCastException e) {
         throw new PersistenceException("invalid meta information found while trying to reconstruct enum", e);
       }
Index: /trunk/sources/HeuristicLab.Persistence/3.3/Default/CompositeSerializers/EnumerableSerializer.cs
===================================================================
--- /trunk/sources/HeuristicLab.Persistence/3.3/Default/CompositeSerializers/EnumerableSerializer.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.Persistence/3.3/Default/CompositeSerializers/EnumerableSerializer.cs	(revision 4068)
@@ -22,10 +22,10 @@
 using System;
 using System.Collections;
+using System.Collections.Generic;
 using System.Reflection;
+using HeuristicLab.Persistence.Auxiliary;
 using HeuristicLab.Persistence.Core;
+using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
 using HeuristicLab.Persistence.Interfaces;
-using System.Collections.Generic;
-using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
-using HeuristicLab.Persistence.Auxiliary;
 
 namespace HeuristicLab.Persistence.Default.CompositeSerializers {
@@ -53,5 +53,5 @@
         return "interface IEnumerable not implemented";
       if (type.GetMethod("Add") == null)
-        return "no 'Add()' method";      
+        return "no 'Add()' method";
       return "no 'Add()' method with one argument";
     }
@@ -76,5 +76,6 @@
         foreach (var tag in tags)
           addMethod.Invoke(instance, new[] { tag.Value });
-      } catch (Exception e) {
+      }
+      catch (Exception e) {
         throw new PersistenceException("Exception caught while trying to populate enumerable.", e);
       }
Index: /trunk/sources/HeuristicLab.Persistence/3.3/Default/CompositeSerializers/KeyValuePairSerializer.cs
===================================================================
--- /trunk/sources/HeuristicLab.Persistence/3.3/Default/CompositeSerializers/KeyValuePairSerializer.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.Persistence/3.3/Default/CompositeSerializers/KeyValuePairSerializer.cs	(revision 4068)
@@ -21,10 +21,10 @@
 
 using System;
+using System.Collections.Generic;
 using System.Linq;
-using System.Collections.Generic;
+using System.Reflection;
 using HeuristicLab.Persistence.Core;
+using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
 using HeuristicLab.Persistence.Interfaces;
-using System.Reflection;
-using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
 
 namespace HeuristicLab.Persistence.Default.CompositeSerializers {
@@ -42,10 +42,10 @@
     public bool CanSerialize(Type type) {
       return type.IsGenericType &&
-             type.GetGenericTypeDefinition() == genericKeyValuePairType;             
+             type.GetGenericTypeDefinition() == genericKeyValuePairType;
     }
 
     public string JustifyRejection(Type type) {
       if (!type.IsGenericType)
-        return "not even generic";      
+        return "not even generic";
       return "not generic KeyValuePair<,>";
     }
@@ -60,5 +60,6 @@
       try {
         key = new Tag("key", t.GetProperty("Key").GetValue(o, null));
-      } catch (Exception e) {
+      }
+      catch (Exception e) {
         throw new PersistenceException("Exception caught during KeyValuePair decomposition", e);
       }
@@ -66,5 +67,6 @@
       try {
         value = new Tag("value", t.GetProperty("Value").GetValue(o, null));
-      } catch (Exception e) {
+      }
+      catch (Exception e) {
         throw new PersistenceException("Exception caught during KeyValuePair decomposition", e);
       }
@@ -85,7 +87,9 @@
         t.GetFields(BindingFlags.Instance | BindingFlags.Public | BindingFlags.NonPublic)
           .Single(fi => fi.Name == "value").SetValue(instance, iter.Current.Value);
-      } catch (InvalidOperationException e) {
+      }
+      catch (InvalidOperationException e) {
         throw new PersistenceException("Not enough components to populate KeyValuePair instance", e);
-      } catch (Exception e) {
+      }
+      catch (Exception e) {
         throw new PersistenceException("Exception caught during KeyValuePair reconstruction", e);
       }
Index: /trunk/sources/HeuristicLab.Persistence/3.3/Default/CompositeSerializers/Number2StringSerializer.cs
===================================================================
--- /trunk/sources/HeuristicLab.Persistence/3.3/Default/CompositeSerializers/Number2StringSerializer.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.Persistence/3.3/Default/CompositeSerializers/Number2StringSerializer.cs	(revision 4068)
@@ -21,15 +21,12 @@
 
 using System;
+using System.Collections.Generic;
 using System.Linq;
+using HeuristicLab.Persistence.Auxiliary;
+using HeuristicLab.Persistence.Core;
+using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
+using HeuristicLab.Persistence.Default.Xml;
+using HeuristicLab.Persistence.Default.Xml.Primitive;
 using HeuristicLab.Persistence.Interfaces;
-using HeuristicLab.Persistence.Core;
-using HeuristicLab.Persistence.Auxiliary;
-using System.Collections.Generic;
-using System.Reflection;
-using System.Globalization;
-using System.Text;
-using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
-using HeuristicLab.Persistence.Default.Xml.Primitive;
-using HeuristicLab.Persistence.Default.Xml;
 
 namespace HeuristicLab.Persistence.Default.CompositeSerializers {
@@ -63,5 +60,5 @@
 
     static Number2StringSerializer() {
-      numberSerializerMap = new Dictionary<Type,IPrimitiveSerializer>();
+      numberSerializerMap = new Dictionary<Type, IPrimitiveSerializer>();
       foreach (var s in numberSerializers) {
         numberSerializerMap[s.SourceType] = s;
@@ -111,7 +108,9 @@
       try {
         return numberSerializerMap[type].Parse(new XmlString(stringValue));
-      } catch (FormatException e) {
+      }
+      catch (FormatException e) {
         throw new PersistenceException("Invalid element data during number parsing.", e);
-      } catch (OverflowException e) {
+      }
+      catch (OverflowException e) {
         throw new PersistenceException("Overflow during number parsing.", e);
       }
@@ -166,9 +165,11 @@
         it.MoveNext();
         return Parse((string)it.Current.Value, type);
-      } catch (InvalidOperationException e) {
+      }
+      catch (InvalidOperationException e) {
         throw new PersistenceException(
           String.Format("Insufficient meta information to reconstruct number of type {0}.",
           type.VersionInvariantName()), e);
-      } catch (InvalidCastException e) {
+      }
+      catch (InvalidCastException e) {
         throw new PersistenceException("Invalid meta information element type", e);
       }
Index: /trunk/sources/HeuristicLab.Persistence/3.3/Default/CompositeSerializers/NumberEnumerable2StringSerializer.cs
===================================================================
--- /trunk/sources/HeuristicLab.Persistence/3.3/Default/CompositeSerializers/NumberEnumerable2StringSerializer.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.Persistence/3.3/Default/CompositeSerializers/NumberEnumerable2StringSerializer.cs	(revision 4068)
@@ -21,12 +21,11 @@
 
 using System;
-using HeuristicLab.Persistence.Interfaces;
-using HeuristicLab.Persistence.Core;
 using System.Collections.Generic;
 using System.Reflection;
-using System.Globalization;
 using System.Text;
+using HeuristicLab.Persistence.Auxiliary;
+using HeuristicLab.Persistence.Core;
 using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
-using HeuristicLab.Persistence.Auxiliary;
+using HeuristicLab.Persistence.Interfaces;
 
 namespace HeuristicLab.Persistence.Default.CompositeSerializers {
@@ -130,7 +129,9 @@
           addMethod.Invoke(instance, new[] { numberConverter.Parse(value, elementType) });
         }
-      } catch (InvalidOperationException e) {
+      }
+      catch (InvalidOperationException e) {
         throw new PersistenceException("Insufficient element data to reconstruct number enumerable", e);
-      } catch (InvalidCastException e) {
+      }
+      catch (InvalidCastException e) {
         throw new PersistenceException("Invalid element data during reconstruction of number enumerable", e);
       }
Index: /trunk/sources/HeuristicLab.Persistence/3.3/Default/CompositeSerializers/StackSerializer.cs
===================================================================
--- /trunk/sources/HeuristicLab.Persistence/3.3/Default/CompositeSerializers/StackSerializer.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.Persistence/3.3/Default/CompositeSerializers/StackSerializer.cs	(revision 4068)
@@ -22,10 +22,9 @@
 using System;
 using System.Collections;
+using System.Collections.Generic;
 using System.Reflection;
 using HeuristicLab.Persistence.Core;
+using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
 using HeuristicLab.Persistence.Interfaces;
-using System.Collections.Generic;
-using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
-using System.IO;
 
 namespace HeuristicLab.Persistence.Default.CompositeSerializers {
@@ -46,5 +45,5 @@
 
     public string JustifyRejection(Type type) {
-        return "not Stack or generic Stack<>";
+      return "not Stack or generic Stack<>";
     }
 
@@ -73,5 +72,6 @@
         foreach (var tag in tags)
           addMethod.Invoke(instance, new[] { tag.Value });
-      } catch (Exception e) {
+      }
+      catch (Exception e) {
         throw new PersistenceException("Exception caught while trying to populate enumerable.", e);
       }
Index: /trunk/sources/HeuristicLab.Persistence/3.3/Default/CompositeSerializers/Storable/StorableAttribute.cs
===================================================================
--- /trunk/sources/HeuristicLab.Persistence/3.3/Default/CompositeSerializers/Storable/StorableAttribute.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.Persistence/3.3/Default/CompositeSerializers/Storable/StorableAttribute.cs	(revision 4068)
@@ -21,7 +21,4 @@
 
 using System;
-using System.Linq;
-using System.Collections.Generic;
-using System.Reflection;
 using System.Text;
 
@@ -38,5 +35,5 @@
     AttributeTargets.Field | AttributeTargets.Property,
     AllowMultiple = false,
-    Inherited = false)]    
+    Inherited = false)]
   public class StorableAttribute : Attribute {
 
Index: /trunk/sources/HeuristicLab.Persistence/3.3/Default/CompositeSerializers/Storable/StorableClassAttribute.cs
===================================================================
--- /trunk/sources/HeuristicLab.Persistence/3.3/Default/CompositeSerializers/Storable/StorableClassAttribute.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.Persistence/3.3/Default/CompositeSerializers/Storable/StorableClassAttribute.cs	(revision 4068)
@@ -21,9 +21,6 @@
 
 using System;
-using System.Collections.Generic;
-using System.Reflection;
-using System.Linq;
 
-namespace HeuristicLab.Persistence.Default.CompositeSerializers.Storable {  
+namespace HeuristicLab.Persistence.Default.CompositeSerializers.Storable {
 
   /// <summary>
Index: /trunk/sources/HeuristicLab.Persistence/3.3/Default/CompositeSerializers/Storable/StorableClassType.cs
===================================================================
--- /trunk/sources/HeuristicLab.Persistence/3.3/Default/CompositeSerializers/Storable/StorableClassType.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.Persistence/3.3/Default/CompositeSerializers/Storable/StorableClassType.cs	(revision 4068)
@@ -20,8 +20,4 @@
 #endregion
 
-using System;
-using System.Collections.Generic;
-using System.Reflection;
-using System.Linq;
 
 namespace HeuristicLab.Persistence.Default.CompositeSerializers.Storable {
@@ -62,5 +58,5 @@
     /// </summary>    
     AllFieldsAndAllProperties
-  };  
+  };
 }
 
Index: /trunk/sources/HeuristicLab.Persistence/3.3/Default/CompositeSerializers/Storable/StorableConstructorAttribute.cs
===================================================================
--- /trunk/sources/HeuristicLab.Persistence/3.3/Default/CompositeSerializers/Storable/StorableConstructorAttribute.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.Persistence/3.3/Default/CompositeSerializers/Storable/StorableConstructorAttribute.cs	(revision 4068)
@@ -21,9 +21,4 @@
 
 using System;
-using System.Collections.Generic;
-using System.Linq;
-using System.Text;
-using System.Reflection;
-using HeuristicLab.Persistence.Core;
 
 namespace HeuristicLab.Persistence.Default.CompositeSerializers.Storable {
@@ -39,4 +34,4 @@
   /// </summary>
   [AttributeUsage(AttributeTargets.Constructor, Inherited = false, AllowMultiple = false)]
-  public sealed class StorableConstructorAttribute : Attribute {  }
+  public sealed class StorableConstructorAttribute : Attribute { }
 }
Index: /trunk/sources/HeuristicLab.Persistence/3.3/Default/CompositeSerializers/Storable/StorableHookAttribute.cs
===================================================================
--- /trunk/sources/HeuristicLab.Persistence/3.3/Default/CompositeSerializers/Storable/StorableHookAttribute.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.Persistence/3.3/Default/CompositeSerializers/Storable/StorableHookAttribute.cs	(revision 4068)
@@ -21,8 +21,4 @@
 
 using System;
-using System.Collections.Generic;
-using System.Linq;
-using System.Text;
-using System.Reflection;
 
 namespace HeuristicLab.Persistence.Default.CompositeSerializers.Storable {
@@ -39,10 +35,11 @@
     /// </summary>
     BeforeSerialization,
-    
+
     /// <summary>
     /// States that this hook should be called after the storable
     /// serializer hast complete re-assembled the object.
     /// </summary>
-    AfterDeserialization };
+    AfterDeserialization
+  };
 
 
@@ -52,5 +49,5 @@
   /// </summary>
   [AttributeUsage(AttributeTargets.Method, Inherited = false, AllowMultiple = true)]
-  public sealed class StorableHookAttribute : Attribute {    
+  public sealed class StorableHookAttribute : Attribute {
 
     private readonly HookType hookType;
@@ -70,5 +67,5 @@
     public StorableHookAttribute(HookType hookType) {
       this.hookType = hookType;
-    }    
+    }
   }
 }
Index: /trunk/sources/HeuristicLab.Persistence/3.3/Default/CompositeSerializers/Storable/StorableMemberInfo.cs
===================================================================
--- /trunk/sources/HeuristicLab.Persistence/3.3/Default/CompositeSerializers/Storable/StorableMemberInfo.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.Persistence/3.3/Default/CompositeSerializers/Storable/StorableMemberInfo.cs	(revision 4068)
@@ -21,10 +21,5 @@
 
 using System;
-using System.Collections.Generic;
-using System.Linq;
-using HeuristicLab.Persistence.Interfaces;
-using HeuristicLab.Persistence.Core;
 using System.Reflection;
-using HeuristicLab.Persistence.Auxiliary;
 using System.Text;
 
@@ -59,4 +54,4 @@
       return ((PropertyInfo)MemberInfo).GetGetMethod(true).GetBaseDefinition().DeclaringType;
     }
-  }  
+  }
 }
Index: /trunk/sources/HeuristicLab.Persistence/3.3/Default/CompositeSerializers/Storable/StorableReflection.cs
===================================================================
--- /trunk/sources/HeuristicLab.Persistence/3.3/Default/CompositeSerializers/Storable/StorableReflection.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.Persistence/3.3/Default/CompositeSerializers/Storable/StorableReflection.cs	(revision 4068)
@@ -23,10 +23,6 @@
 using System.Collections.Generic;
 using System.Linq;
-using HeuristicLab.Persistence.Interfaces;
+using System.Reflection;
 using HeuristicLab.Persistence.Core;
-using System.Reflection;
-using HeuristicLab.Persistence.Auxiliary;
-using System.Text;
-using System.Reflection.Emit;
 
 namespace HeuristicLab.Persistence.Default.CompositeSerializers.Storable {
Index: /trunk/sources/HeuristicLab.Persistence/3.3/Default/CompositeSerializers/Storable/StorableSerializer.cs
===================================================================
--- /trunk/sources/HeuristicLab.Persistence/3.3/Default/CompositeSerializers/Storable/StorableSerializer.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.Persistence/3.3/Default/CompositeSerializers/Storable/StorableSerializer.cs	(revision 4068)
@@ -23,10 +23,9 @@
 using System.Collections.Generic;
 using System.Linq;
+using System.Reflection;
+using System.Reflection.Emit;
+using System.Text;
+using HeuristicLab.Persistence.Core;
 using HeuristicLab.Persistence.Interfaces;
-using HeuristicLab.Persistence.Core;
-using System.Reflection;
-using HeuristicLab.Persistence.Auxiliary;
-using System.Text;
-using System.Reflection.Emit;
 
 namespace HeuristicLab.Persistence.Default.CompositeSerializers.Storable {
@@ -87,5 +86,5 @@
         sb.Append("class has no default constructor and no [StorableConstructor]");
       if (!StorableReflection.IsEmptyOrStorableType(type, true))
-        sb.Append("class (or one of its bases) is not empty and not marked [Storable]; ");      
+        sb.Append("class (or one of its bases) is not empty and not marked [Storable]; ");
       return sb.ToString();
     }
@@ -123,5 +122,6 @@
       try {
         return GetConstructor(type)();
-      } catch (TargetInvocationException x) {
+      }
+      catch (TargetInvocationException x) {
         throw new PersistenceException(
           "Could not instantiate storable object: Encountered exception during constructor call",
@@ -188,5 +188,5 @@
 
     private Dictionary<HookDesignator, List<StorableReflection.Hook>> hookCache =
-      new Dictionary<HookDesignator, List<StorableReflection.Hook>>();    
+      new Dictionary<HookDesignator, List<StorableReflection.Hook>>();
 
     #endregion
@@ -203,5 +203,5 @@
         accessorListCache[type] = storableMembers;
         return storableMembers;
-      }      
+      }
     }
 
@@ -224,10 +224,10 @@
         return c;
       }
-    }    
+    }
 
     private Constructor GetDefaultConstructor(Type type) {
       ConstructorInfo ci = type.GetConstructor(ALL_CONSTRUCTORS, null, Type.EmptyTypes, null);
       if (ci == null)
-        return null;      
+        return null;
       DynamicMethod dm = new DynamicMethod("", typeof(object), null, type);
       ILGenerator ilgen = dm.GetILGenerator();
@@ -242,5 +242,5 @@
           if (ci.GetParameters().Length != 1 ||
               ci.GetParameters()[0].ParameterType != typeof(bool))
-            throw new PersistenceException("StorableConstructor must have exactly one argument of type bool");          
+            throw new PersistenceException("StorableConstructor must have exactly one argument of type bool");
           DynamicMethod dm = new DynamicMethod("", typeof(object), null, type);
           ILGenerator ilgen = dm.GetILGenerator();
@@ -252,5 +252,5 @@
       }
       return null;
-    }    
+    }
 
     private void InvokeHook(HookType hookType, object obj) {
Index: /trunk/sources/HeuristicLab.Persistence/3.3/Default/CompositeSerializers/StructSerializer.cs
===================================================================
--- /trunk/sources/HeuristicLab.Persistence/3.3/Default/CompositeSerializers/StructSerializer.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.Persistence/3.3/Default/CompositeSerializers/StructSerializer.cs	(revision 4068)
@@ -22,15 +22,13 @@
 using System;
 using System.Collections.Generic;
-using System.Linq;
-using System.Text;
-using HeuristicLab.Persistence.Interfaces;
-using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
 using System.Reflection;
 using HeuristicLab.Persistence.Core;
+using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
+using HeuristicLab.Persistence.Interfaces;
 
 namespace HeuristicLab.Persistence.Default.CompositeSerializers {
 
   [StorableClass]
-  internal sealed class StructSerializer : ICompositeSerializer {    
+  internal sealed class StructSerializer : ICompositeSerializer {
 
     public int Priority {
@@ -39,5 +37,5 @@
 
     public bool CanSerialize(Type type) {
-      return type.IsValueType && !type.IsPrimitive && !type.IsEnum && type.IsSealed;      
+      return type.IsValueType && !type.IsPrimitive && !type.IsEnum && type.IsSealed;
     }
 
@@ -63,5 +61,5 @@
       foreach (MemberInfo mi in t.GetMembers(AllInstanceMembers)) {
         if (mi.MemberType == MemberTypes.Field) {
-          string name = mi.Name.Replace("<", "&lt;").Replace(">", "&gt;");          
+          string name = mi.Name.Replace("<", "&lt;").Replace(">", "&gt;");
           yield return new Tag(name, ((FieldInfo)mi).GetValue(obj));
         }
@@ -81,10 +79,10 @@
         MemberInfo mi = mis[0];
         if (mi.MemberType == MemberTypes.Field)
-          ((FieldInfo)mi).SetValue(instance, t.Value);        
+          ((FieldInfo)mi).SetValue(instance, t.Value);
         else
           throw new PersistenceException("invalid struct member type " + mi.MemberType.ToString());
       }
     }
-    
+
   }
 }
Index: /trunk/sources/HeuristicLab.Persistence/3.3/Default/CompositeSerializers/TypeSerializer.cs
===================================================================
--- /trunk/sources/HeuristicLab.Persistence/3.3/Default/CompositeSerializers/TypeSerializer.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.Persistence/3.3/Default/CompositeSerializers/TypeSerializer.cs	(revision 4068)
@@ -21,9 +21,9 @@
 
 using System;
+using System.Collections.Generic;
+using HeuristicLab.Persistence.Auxiliary;
 using HeuristicLab.Persistence.Core;
-using HeuristicLab.Persistence.Auxiliary;
+using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
 using HeuristicLab.Persistence.Interfaces;
-using System.Collections.Generic;
-using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
 
 namespace HeuristicLab.Persistence.Default.CompositeSerializers {
@@ -57,12 +57,15 @@
       try {
         it.MoveNext();
-      } catch (InvalidOperationException e) {
+      }
+      catch (InvalidOperationException e) {
         throw new PersistenceException("Insufficient meta information to instantiate Type object", e);
       }
       try {
         return TypeLoader.Load((string)it.Current.Value);
-      } catch (InvalidCastException e) {
+      }
+      catch (InvalidCastException e) {
         throw new PersistenceException("Invalid meta information during reconstruction of Type object", e);
-      } catch (TypeLoadException e) {
+      }
+      catch (TypeLoadException e) {
         throw new PersistenceException(String.Format(
           "Cannot load Type {0}, make sure all required assemblies are available.",
Index: /trunk/sources/HeuristicLab.Persistence/3.3/Default/DebugString/DebugString.cs
===================================================================
--- /trunk/sources/HeuristicLab.Persistence/3.3/Default/DebugString/DebugString.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.Persistence/3.3/Default/DebugString/DebugString.cs	(revision 4068)
@@ -20,12 +20,6 @@
 #endregion
 
-using System;
-using System.Collections.Generic;
-using System.Text;
+using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
 using HeuristicLab.Persistence.Interfaces;
-using HeuristicLab.Persistence.Default.Xml;
-using HeuristicLab.Persistence.Core;
-using HeuristicLab.Persistence.Core.Tokens;
-using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
 
 namespace HeuristicLab.Persistence.Default.DebugString {
@@ -34,5 +28,5 @@
   /// Simple write-only format for debugging purposes.
   /// </summary>
-  [StorableClass]  
+  [StorableClass]
   public class DebugString : ISerialData {
 
Index: /trunk/sources/HeuristicLab.Persistence/3.3/Default/DebugString/DebugStringFormat.cs
===================================================================
--- /trunk/sources/HeuristicLab.Persistence/3.3/Default/DebugString/DebugStringFormat.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.Persistence/3.3/Default/DebugString/DebugStringFormat.cs	(revision 4068)
@@ -20,12 +20,6 @@
 #endregion
 
-using System;
-using System.Collections.Generic;
-using System.Text;
+using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
 using HeuristicLab.Persistence.Interfaces;
-using HeuristicLab.Persistence.Default.Xml;
-using HeuristicLab.Persistence.Core;
-using HeuristicLab.Persistence.Core.Tokens;
-using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
 
 namespace HeuristicLab.Persistence.Default.DebugString {
Index: /trunk/sources/HeuristicLab.Persistence/3.3/Default/DebugString/DebugStringGenerator.cs
===================================================================
--- /trunk/sources/HeuristicLab.Persistence/3.3/Default/DebugString/DebugStringGenerator.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.Persistence/3.3/Default/DebugString/DebugStringGenerator.cs	(revision 4068)
@@ -20,11 +20,8 @@
 #endregion
 
-using System;
-using System.Collections.Generic;
 using System.Text;
-using HeuristicLab.Persistence.Interfaces;
-using HeuristicLab.Persistence.Default.Xml;
 using HeuristicLab.Persistence.Core;
 using HeuristicLab.Persistence.Core.Tokens;
+using HeuristicLab.Persistence.Interfaces;
 
 namespace HeuristicLab.Persistence.Default.DebugString {
Index: /trunk/sources/HeuristicLab.Persistence/3.3/Default/DebugString/PrimitiveSerializers/Bool2DebugStringSerializer.cs
===================================================================
--- /trunk/sources/HeuristicLab.Persistence/3.3/Default/DebugString/PrimitiveSerializers/Bool2DebugStringSerializer.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.Persistence/3.3/Default/DebugString/PrimitiveSerializers/Bool2DebugStringSerializer.cs	(revision 4068)
@@ -20,11 +20,4 @@
 #endregion
 
-using System;
-using System.Collections.Generic;
-using System.Text;
-using HeuristicLab.Persistence.Interfaces;
-using HeuristicLab.Persistence.Default.Xml;
-using HeuristicLab.Persistence.Core;
-using HeuristicLab.Persistence.Core.Tokens;
 
 namespace HeuristicLab.Persistence.Default.DebugString.PrimitiveSerializers {
Index: /trunk/sources/HeuristicLab.Persistence/3.3/Default/DebugString/PrimitiveSerializers/Byte2DebugStringSerializer.cs
===================================================================
--- /trunk/sources/HeuristicLab.Persistence/3.3/Default/DebugString/PrimitiveSerializers/Byte2DebugStringSerializer.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.Persistence/3.3/Default/DebugString/PrimitiveSerializers/Byte2DebugStringSerializer.cs	(revision 4068)
@@ -20,11 +20,4 @@
 #endregion
 
-using System;
-using System.Collections.Generic;
-using System.Text;
-using HeuristicLab.Persistence.Interfaces;
-using HeuristicLab.Persistence.Default.Xml;
-using HeuristicLab.Persistence.Core;
-using HeuristicLab.Persistence.Core.Tokens;
 
 namespace HeuristicLab.Persistence.Default.DebugString.PrimitiveSerializers {
Index: /trunk/sources/HeuristicLab.Persistence/3.3/Default/DebugString/PrimitiveSerializers/Char2DebugStringSerializer.cs
===================================================================
--- /trunk/sources/HeuristicLab.Persistence/3.3/Default/DebugString/PrimitiveSerializers/Char2DebugStringSerializer.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.Persistence/3.3/Default/DebugString/PrimitiveSerializers/Char2DebugStringSerializer.cs	(revision 4068)
@@ -20,11 +20,4 @@
 #endregion
 
-using System;
-using System.Collections.Generic;
-using System.Text;
-using HeuristicLab.Persistence.Interfaces;
-using HeuristicLab.Persistence.Default.Xml;
-using HeuristicLab.Persistence.Core;
-using HeuristicLab.Persistence.Core.Tokens;
 
 namespace HeuristicLab.Persistence.Default.DebugString.PrimitiveSerializers {
Index: /trunk/sources/HeuristicLab.Persistence/3.3/Default/DebugString/PrimitiveSerializers/DateTime2DebugStringSerializer.cs
===================================================================
--- /trunk/sources/HeuristicLab.Persistence/3.3/Default/DebugString/PrimitiveSerializers/DateTime2DebugStringSerializer.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.Persistence/3.3/Default/DebugString/PrimitiveSerializers/DateTime2DebugStringSerializer.cs	(revision 4068)
@@ -21,10 +21,4 @@
 
 using System;
-using System.Collections.Generic;
-using System.Text;
-using HeuristicLab.Persistence.Interfaces;
-using HeuristicLab.Persistence.Default.Xml;
-using HeuristicLab.Persistence.Core;
-using HeuristicLab.Persistence.Core.Tokens;
 
 namespace HeuristicLab.Persistence.Default.DebugString.PrimitiveSerializers {
Index: /trunk/sources/HeuristicLab.Persistence/3.3/Default/DebugString/PrimitiveSerializers/Double2DebugStringSerializer.cs
===================================================================
--- /trunk/sources/HeuristicLab.Persistence/3.3/Default/DebugString/PrimitiveSerializers/Double2DebugStringSerializer.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.Persistence/3.3/Default/DebugString/PrimitiveSerializers/Double2DebugStringSerializer.cs	(revision 4068)
@@ -20,11 +20,4 @@
 #endregion
 
-using System;
-using System.Collections.Generic;
-using System.Text;
-using HeuristicLab.Persistence.Interfaces;
-using HeuristicLab.Persistence.Default.Xml;
-using HeuristicLab.Persistence.Core;
-using HeuristicLab.Persistence.Core.Tokens;
 
 namespace HeuristicLab.Persistence.Default.DebugString.PrimitiveSerializers {
Index: /trunk/sources/HeuristicLab.Persistence/3.3/Default/DebugString/PrimitiveSerializers/Float2DebugStringSerializer.cs
===================================================================
--- /trunk/sources/HeuristicLab.Persistence/3.3/Default/DebugString/PrimitiveSerializers/Float2DebugStringSerializer.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.Persistence/3.3/Default/DebugString/PrimitiveSerializers/Float2DebugStringSerializer.cs	(revision 4068)
@@ -20,11 +20,4 @@
 #endregion
 
-using System;
-using System.Collections.Generic;
-using System.Text;
-using HeuristicLab.Persistence.Interfaces;
-using HeuristicLab.Persistence.Default.Xml;
-using HeuristicLab.Persistence.Core;
-using HeuristicLab.Persistence.Core.Tokens;
 
 namespace HeuristicLab.Persistence.Default.DebugString.PrimitiveSerializers {
Index: /trunk/sources/HeuristicLab.Persistence/3.3/Default/DebugString/PrimitiveSerializers/Int2DebugStringSerializer.cs
===================================================================
--- /trunk/sources/HeuristicLab.Persistence/3.3/Default/DebugString/PrimitiveSerializers/Int2DebugStringSerializer.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.Persistence/3.3/Default/DebugString/PrimitiveSerializers/Int2DebugStringSerializer.cs	(revision 4068)
@@ -20,11 +20,4 @@
 #endregion
 
-using System;
-using System.Collections.Generic;
-using System.Text;
-using HeuristicLab.Persistence.Interfaces;
-using HeuristicLab.Persistence.Default.Xml;
-using HeuristicLab.Persistence.Core;
-using HeuristicLab.Persistence.Core.Tokens;
 
 namespace HeuristicLab.Persistence.Default.DebugString.PrimitiveSerializers {
Index: /trunk/sources/HeuristicLab.Persistence/3.3/Default/DebugString/PrimitiveSerializers/Long2DebugStringSerializer.cs
===================================================================
--- /trunk/sources/HeuristicLab.Persistence/3.3/Default/DebugString/PrimitiveSerializers/Long2DebugStringSerializer.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.Persistence/3.3/Default/DebugString/PrimitiveSerializers/Long2DebugStringSerializer.cs	(revision 4068)
@@ -20,11 +20,4 @@
 #endregion
 
-using System;
-using System.Collections.Generic;
-using System.Text;
-using HeuristicLab.Persistence.Interfaces;
-using HeuristicLab.Persistence.Default.Xml;
-using HeuristicLab.Persistence.Core;
-using HeuristicLab.Persistence.Core.Tokens;
 
 namespace HeuristicLab.Persistence.Default.DebugString.PrimitiveSerializers {
Index: /trunk/sources/HeuristicLab.Persistence/3.3/Default/DebugString/PrimitiveSerializers/SByte2DebugStringSerializer.cs
===================================================================
--- /trunk/sources/HeuristicLab.Persistence/3.3/Default/DebugString/PrimitiveSerializers/SByte2DebugStringSerializer.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.Persistence/3.3/Default/DebugString/PrimitiveSerializers/SByte2DebugStringSerializer.cs	(revision 4068)
@@ -20,11 +20,4 @@
 #endregion
 
-using System;
-using System.Collections.Generic;
-using System.Text;
-using HeuristicLab.Persistence.Interfaces;
-using HeuristicLab.Persistence.Default.Xml;
-using HeuristicLab.Persistence.Core;
-using HeuristicLab.Persistence.Core.Tokens;
 
 namespace HeuristicLab.Persistence.Default.DebugString.PrimitiveSerializers {
Index: /trunk/sources/HeuristicLab.Persistence/3.3/Default/DebugString/PrimitiveSerializers/Short2DebugStringSerializer.cs
===================================================================
--- /trunk/sources/HeuristicLab.Persistence/3.3/Default/DebugString/PrimitiveSerializers/Short2DebugStringSerializer.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.Persistence/3.3/Default/DebugString/PrimitiveSerializers/Short2DebugStringSerializer.cs	(revision 4068)
@@ -20,11 +20,4 @@
 #endregion
 
-using System;
-using System.Collections.Generic;
-using System.Text;
-using HeuristicLab.Persistence.Interfaces;
-using HeuristicLab.Persistence.Default.Xml;
-using HeuristicLab.Persistence.Core;
-using HeuristicLab.Persistence.Core.Tokens;
 
 namespace HeuristicLab.Persistence.Default.DebugString.PrimitiveSerializers {
Index: /trunk/sources/HeuristicLab.Persistence/3.3/Default/DebugString/PrimitiveSerializers/String2DebugStringSerializer.cs
===================================================================
--- /trunk/sources/HeuristicLab.Persistence/3.3/Default/DebugString/PrimitiveSerializers/String2DebugStringSerializer.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.Persistence/3.3/Default/DebugString/PrimitiveSerializers/String2DebugStringSerializer.cs	(revision 4068)
@@ -20,11 +20,4 @@
 #endregion
 
-using System;
-using System.Collections.Generic;
-using System.Text;
-using HeuristicLab.Persistence.Interfaces;
-using HeuristicLab.Persistence.Default.Xml;
-using HeuristicLab.Persistence.Core;
-using HeuristicLab.Persistence.Core.Tokens;
 
 namespace HeuristicLab.Persistence.Default.DebugString.PrimitiveSerializers {
Index: /trunk/sources/HeuristicLab.Persistence/3.3/Default/DebugString/PrimitiveSerializers/Type2DebugStringSerializer.cs
===================================================================
--- /trunk/sources/HeuristicLab.Persistence/3.3/Default/DebugString/PrimitiveSerializers/Type2DebugStringSerializer.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.Persistence/3.3/Default/DebugString/PrimitiveSerializers/Type2DebugStringSerializer.cs	(revision 4068)
@@ -21,10 +21,4 @@
 
 using System;
-using System.Collections.Generic;
-using System.Text;
-using HeuristicLab.Persistence.Interfaces;
-using HeuristicLab.Persistence.Default.Xml;
-using HeuristicLab.Persistence.Core;
-using HeuristicLab.Persistence.Core.Tokens;
 
 namespace HeuristicLab.Persistence.Default.DebugString.PrimitiveSerializers {
Index: /trunk/sources/HeuristicLab.Persistence/3.3/Default/DebugString/PrimitiveSerializers/UInt2DebugStringSerializer.cs
===================================================================
--- /trunk/sources/HeuristicLab.Persistence/3.3/Default/DebugString/PrimitiveSerializers/UInt2DebugStringSerializer.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.Persistence/3.3/Default/DebugString/PrimitiveSerializers/UInt2DebugStringSerializer.cs	(revision 4068)
@@ -20,11 +20,4 @@
 #endregion
 
-using System;
-using System.Collections.Generic;
-using System.Text;
-using HeuristicLab.Persistence.Interfaces;
-using HeuristicLab.Persistence.Default.Xml;
-using HeuristicLab.Persistence.Core;
-using HeuristicLab.Persistence.Core.Tokens;
 
 namespace HeuristicLab.Persistence.Default.DebugString.PrimitiveSerializers {
Index: /trunk/sources/HeuristicLab.Persistence/3.3/Default/DebugString/PrimitiveSerializers/ULong2DebugStringSerializer.cs
===================================================================
--- /trunk/sources/HeuristicLab.Persistence/3.3/Default/DebugString/PrimitiveSerializers/ULong2DebugStringSerializer.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.Persistence/3.3/Default/DebugString/PrimitiveSerializers/ULong2DebugStringSerializer.cs	(revision 4068)
@@ -20,11 +20,4 @@
 #endregion
 
-using System;
-using System.Collections.Generic;
-using System.Text;
-using HeuristicLab.Persistence.Interfaces;
-using HeuristicLab.Persistence.Default.Xml;
-using HeuristicLab.Persistence.Core;
-using HeuristicLab.Persistence.Core.Tokens;
 
 namespace HeuristicLab.Persistence.Default.DebugString.PrimitiveSerializers {
Index: /trunk/sources/HeuristicLab.Persistence/3.3/Default/DebugString/PrimitiveSerializers/UShort2DebugStringSerializer.cs
===================================================================
--- /trunk/sources/HeuristicLab.Persistence/3.3/Default/DebugString/PrimitiveSerializers/UShort2DebugStringSerializer.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.Persistence/3.3/Default/DebugString/PrimitiveSerializers/UShort2DebugStringSerializer.cs	(revision 4068)
@@ -20,11 +20,4 @@
 #endregion
 
-using System;
-using System.Collections.Generic;
-using System.Text;
-using HeuristicLab.Persistence.Interfaces;
-using HeuristicLab.Persistence.Default.Xml;
-using HeuristicLab.Persistence.Core;
-using HeuristicLab.Persistence.Core.Tokens;
 
 namespace HeuristicLab.Persistence.Default.DebugString.PrimitiveSerializers {
Index: /trunk/sources/HeuristicLab.Persistence/3.3/Default/DebugString/PrimitiveSerializers/ValueType2DebugStringSerializerBase.cs
===================================================================
--- /trunk/sources/HeuristicLab.Persistence/3.3/Default/DebugString/PrimitiveSerializers/ValueType2DebugStringSerializerBase.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.Persistence/3.3/Default/DebugString/PrimitiveSerializers/ValueType2DebugStringSerializerBase.cs	(revision 4068)
@@ -21,10 +21,5 @@
 
 using System;
-using System.Collections.Generic;
-using System.Text;
 using HeuristicLab.Persistence.Interfaces;
-using HeuristicLab.Persistence.Default.Xml;
-using HeuristicLab.Persistence.Core;
-using HeuristicLab.Persistence.Core.Tokens;
 
 namespace HeuristicLab.Persistence.Default.DebugString.PrimitiveSerializers {
Index: /trunk/sources/HeuristicLab.Persistence/3.3/Default/Xml/Compact/ByteArray2XmlSerializer.cs
===================================================================
--- /trunk/sources/HeuristicLab.Persistence/3.3/Default/Xml/Compact/ByteArray2XmlSerializer.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.Persistence/3.3/Default/Xml/Compact/ByteArray2XmlSerializer.cs	(revision 4068)
@@ -20,8 +20,4 @@
 #endregion
 
-using System;
-using System.Collections.Generic;
-using System.Linq;
-using System.Text;
 
 namespace HeuristicLab.Persistence.Default.Xml.Compact {
Index: /trunk/sources/HeuristicLab.Persistence/3.3/Default/Xml/Compact/CompactXmlSerializerBase.cs
===================================================================
--- /trunk/sources/HeuristicLab.Persistence/3.3/Default/Xml/Compact/CompactXmlSerializerBase.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.Persistence/3.3/Default/Xml/Compact/CompactXmlSerializerBase.cs	(revision 4068)
@@ -20,7 +20,4 @@
 #endregion
 
-using HeuristicLab.Persistence.Interfaces;
-using HeuristicLab.Persistence.Core;
-using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
 
 namespace HeuristicLab.Persistence.Default.Xml.Compact {
Index: /trunk/sources/HeuristicLab.Persistence/3.3/Default/Xml/Compact/DoubleArray2XmlSerializer.cs
===================================================================
--- /trunk/sources/HeuristicLab.Persistence/3.3/Default/Xml/Compact/DoubleArray2XmlSerializer.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.Persistence/3.3/Default/Xml/Compact/DoubleArray2XmlSerializer.cs	(revision 4068)
@@ -20,6 +20,4 @@
 #endregion
 
-using System;
-using HeuristicLab.Persistence.Core;
 using HeuristicLab.Persistence.Default.Xml.Primitive;
 
Index: /trunk/sources/HeuristicLab.Persistence/3.3/Default/Xml/Compact/DoubleList2XmlSerializer.cs
===================================================================
--- /trunk/sources/HeuristicLab.Persistence/3.3/Default/Xml/Compact/DoubleList2XmlSerializer.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.Persistence/3.3/Default/Xml/Compact/DoubleList2XmlSerializer.cs	(revision 4068)
@@ -20,12 +20,10 @@
 #endregion
 
-using System.Collections;
+using System;
 using System.Collections.Generic;
-using System;
-using System.Linq;
+using System.Text;
+using HeuristicLab.Persistence.Auxiliary;
 using HeuristicLab.Persistence.Core;
 using HeuristicLab.Persistence.Default.Xml.Primitive;
-using System.Text;
-using HeuristicLab.Persistence.Auxiliary;
 
 namespace HeuristicLab.Persistence.Default.Xml.Compact {
@@ -48,7 +46,9 @@
         }
         return list;
-      } catch (InvalidCastException e) {
+      }
+      catch (InvalidCastException e) {
         throw new PersistenceException("Invalid element data during reconstruction of List<double>.", e);
-      } catch (OverflowException e) {
+      }
+      catch (OverflowException e) {
         throw new PersistenceException("Overflow during element parsing while trying to reconstruct List<double>.", e);
       }
Index: /trunk/sources/HeuristicLab.Persistence/3.3/Default/Xml/Compact/IntArray2XmlSerializer.cs
===================================================================
--- /trunk/sources/HeuristicLab.Persistence/3.3/Default/Xml/Compact/IntArray2XmlSerializer.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.Persistence/3.3/Default/Xml/Compact/IntArray2XmlSerializer.cs	(revision 4068)
@@ -20,6 +20,4 @@
 #endregion
 
-using System;
-using HeuristicLab.Persistence.Core;
 
 namespace HeuristicLab.Persistence.Default.Xml.Compact {
Index: /trunk/sources/HeuristicLab.Persistence/3.3/Default/Xml/Compact/IntList2XmlSerializer.cs
===================================================================
--- /trunk/sources/HeuristicLab.Persistence/3.3/Default/Xml/Compact/IntList2XmlSerializer.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.Persistence/3.3/Default/Xml/Compact/IntList2XmlSerializer.cs	(revision 4068)
@@ -22,7 +22,4 @@
 using System.Collections;
 using System.Collections.Generic;
-using System;
-using HeuristicLab.Persistence.Core;
-using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
 
 namespace HeuristicLab.Persistence.Default.Xml.Compact {
Index: /trunk/sources/HeuristicLab.Persistence/3.3/Default/Xml/Compact/NumberArray2XmlSerializerBase.cs
===================================================================
--- /trunk/sources/HeuristicLab.Persistence/3.3/Default/Xml/Compact/NumberArray2XmlSerializerBase.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.Persistence/3.3/Default/Xml/Compact/NumberArray2XmlSerializerBase.cs	(revision 4068)
@@ -20,13 +20,11 @@
 #endregion
 
+using System;
 using System.Collections;
+using System.Collections.Generic;
 using System.Text;
-using HeuristicLab.Persistence.Interfaces;
-using System;
+using HeuristicLab.Persistence.Auxiliary;
 using HeuristicLab.Persistence.Core;
 using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
-using HeuristicLab.Persistence.Auxiliary;
-using HeuristicLab.Tracing;
-using System.Collections.Generic;
 
 namespace HeuristicLab.Persistence.Default.Xml.Compact {
@@ -51,5 +49,5 @@
         lengths[i] = a.GetLength(i);
         nElements *= lengths[i];
-      }      
+      }
       sb.EnsureCapacity(sb.Length + nElements * 3);
       for (int i = 0; i < a.Rank; i++) {
@@ -71,5 +69,5 @@
           }
         }
-      }      
+      }
       return new XmlString(sb.ToString());
     }
@@ -92,5 +90,5 @@
         Array a = Array.CreateInstance(this.SourceType.GetElementType(), lengths, lowerBounds);
         int[] positions = (int[])lowerBounds.Clone();
-        while (values.MoveNext()) {          
+        while (values.MoveNext()) {
           a.SetValue(ParseValue(values.Current), positions);
           positions[0] += 1;
@@ -107,9 +105,12 @@
           throw new PersistenceException("Insufficient number of elements while trying to fill number array.");
         return (T)(object)a;
-      } catch (InvalidOperationException e) {
+      }
+      catch (InvalidOperationException e) {
         throw new PersistenceException("Insufficient information to rebuild number array.", e);
-      } catch (InvalidCastException e) {
+      }
+      catch (InvalidCastException e) {
         throw new PersistenceException("Invalid element data or meta data to reconstruct number array.", e);
-      } catch (OverflowException e) {
+      }
+      catch (OverflowException e) {
         throw new PersistenceException("Overflow during element parsing while trying to reconstruct number array.", e);
       }
Index: /trunk/sources/HeuristicLab.Persistence/3.3/Default/Xml/Compact/NumberEnumeration2XmlSerializerBase.cs
===================================================================
--- /trunk/sources/HeuristicLab.Persistence/3.3/Default/Xml/Compact/NumberEnumeration2XmlSerializerBase.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.Persistence/3.3/Default/Xml/Compact/NumberEnumeration2XmlSerializerBase.cs	(revision 4068)
@@ -20,11 +20,10 @@
 #endregion
 
+using System;
 using System.Collections;
 using System.Text;
-using HeuristicLab.Persistence.Interfaces;
-using System;
+using HeuristicLab.Persistence.Auxiliary;
 using HeuristicLab.Persistence.Core;
 using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
-using HeuristicLab.Persistence.Auxiliary;
 
 namespace HeuristicLab.Persistence.Default.Xml.Compact {
@@ -55,7 +54,9 @@
         }
         return (T)enumeration;
-      } catch (InvalidCastException e) {
+      }
+      catch (InvalidCastException e) {
         throw new PersistenceException("Invalid element data during reconstruction of number enumerable.", e);
-      } catch (OverflowException e) {
+      }
+      catch (OverflowException e) {
         throw new PersistenceException("Overflow during element parsing while trying to reconstruct number enumerable.", e);
       }
Index: /trunk/sources/HeuristicLab.Persistence/3.3/Default/Xml/EasyXmlGenerator.cs
===================================================================
--- /trunk/sources/HeuristicLab.Persistence/3.3/Default/Xml/EasyXmlGenerator.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.Persistence/3.3/Default/Xml/EasyXmlGenerator.cs	(revision 4068)
@@ -20,15 +20,12 @@
 #endregion
 
+using System;
 using System.Collections.Generic;
-using System;
-using System.Text;
+using System.IO;
+using HeuristicLab.Persistence.Auxiliary;
+using HeuristicLab.Persistence.Core;
+using HeuristicLab.Persistence.Core.Tokens;
 using HeuristicLab.Persistence.Interfaces;
-using HeuristicLab.Persistence.Core;
-using System.IO;
-using ICSharpCode.SharpZipLib.Zip;
 using HeuristicLab.Tracing;
-using HeuristicLab.Persistence.Core.Tokens;
-using System.IO.Compression;
-using HeuristicLab.Persistence.Auxiliary;
 
 namespace HeuristicLab.Persistence.Default.Xml {
@@ -146,5 +143,5 @@
     /// <param name="filename">The filename.</param>
     /// <param name="config">The configuration.</param>
-    public static void Serialize(object obj, string filename, Configuration config) {      
+    public static void Serialize(object obj, string filename, Configuration config) {
       try {
         string tempfile = Path.GetTempFileName();
@@ -157,5 +154,6 @@
         File.Copy(tempfile, filename, true);
         File.Delete(tempfile);
-      } catch (Exception) {
+      }
+      catch (Exception) {
         Logger.Warn("Exception caught, no data has been written.");
         throw;
@@ -180,5 +178,5 @@
     /// <param name="stream">The stream.</param>
     /// <param name="config">The configuration.</param>
-    public static void Serialize(object obj, Stream stream, Configuration config) {      
+    public static void Serialize(object obj, Stream stream, Configuration config) {
       try {
         using (StreamWriter writer = new StreamWriter(stream)) {
@@ -192,7 +190,9 @@
           writer.Flush();
         }
-      } catch (PersistenceException) {
+      }
+      catch (PersistenceException) {
         throw;
-      } catch (Exception e) {
+      }
+      catch (Exception e) {
         throw new PersistenceException("Unexpected exception during Serialization.", e);
       }
Index: /trunk/sources/HeuristicLab.Persistence/3.3/Default/Xml/Primitive/Bool2XmlSerializer.cs
===================================================================
--- /trunk/sources/HeuristicLab.Persistence/3.3/Default/Xml/Primitive/Bool2XmlSerializer.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.Persistence/3.3/Default/Xml/Primitive/Bool2XmlSerializer.cs	(revision 4068)
@@ -20,9 +20,4 @@
 #endregion
 
-using System;
-using HeuristicLab.Persistence.Core;
-using HeuristicLab.Persistence.Interfaces;
-using System.Reflection;
-using System.Globalization;
 
 namespace HeuristicLab.Persistence.Default.Xml.Primitive {
Index: /trunk/sources/HeuristicLab.Persistence/3.3/Default/Xml/Primitive/Byte2XmlSerializer.cs
===================================================================
--- /trunk/sources/HeuristicLab.Persistence/3.3/Default/Xml/Primitive/Byte2XmlSerializer.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.Persistence/3.3/Default/Xml/Primitive/Byte2XmlSerializer.cs	(revision 4068)
@@ -20,9 +20,4 @@
 #endregion
 
-using System;
-using HeuristicLab.Persistence.Core;
-using HeuristicLab.Persistence.Interfaces;
-using System.Reflection;
-using System.Globalization;
 
 namespace HeuristicLab.Persistence.Default.Xml.Primitive {
Index: /trunk/sources/HeuristicLab.Persistence/3.3/Default/Xml/Primitive/Char2XmlFormatter.cs
===================================================================
--- /trunk/sources/HeuristicLab.Persistence/3.3/Default/Xml/Primitive/Char2XmlFormatter.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.Persistence/3.3/Default/Xml/Primitive/Char2XmlFormatter.cs	(revision 4068)
@@ -20,9 +20,6 @@
 #endregion
 
-using System;
 using HeuristicLab.Persistence.Core;
 using HeuristicLab.Persistence.Interfaces;
-using System.Reflection;
-using System.Globalization;
 
 namespace HeuristicLab.Persistence.Default.Xml.Primitive {
Index: /trunk/sources/HeuristicLab.Persistence/3.3/Default/Xml/Primitive/DateTime2XmlSerializer.cs
===================================================================
--- /trunk/sources/HeuristicLab.Persistence/3.3/Default/Xml/Primitive/DateTime2XmlSerializer.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.Persistence/3.3/Default/Xml/Primitive/DateTime2XmlSerializer.cs	(revision 4068)
@@ -22,5 +22,4 @@
 using System;
 using HeuristicLab.Persistence.Core;
-using HeuristicLab.Persistence.Interfaces;
 
 namespace HeuristicLab.Persistence.Default.Xml.Primitive {
@@ -35,5 +34,6 @@
       try {
         return new DateTime(long.Parse(x.Data));
-      } catch (Exception e) {
+      }
+      catch (Exception e) {
         throw new PersistenceException("Exception caugth while trying to reconstruct DateTime object.", e);
       }
Index: /trunk/sources/HeuristicLab.Persistence/3.3/Default/Xml/Primitive/Decimal2XmlSerializer.cs
===================================================================
--- /trunk/sources/HeuristicLab.Persistence/3.3/Default/Xml/Primitive/Decimal2XmlSerializer.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.Persistence/3.3/Default/Xml/Primitive/Decimal2XmlSerializer.cs	(revision 4068)
@@ -21,7 +21,4 @@
 
 using System;
-using HeuristicLab.Persistence.Core;
-using HeuristicLab.Persistence.Interfaces;
-using System.Reflection;
 using System.Globalization;
 
Index: /trunk/sources/HeuristicLab.Persistence/3.3/Default/Xml/Primitive/Double2XmlSerializer.cs
===================================================================
--- /trunk/sources/HeuristicLab.Persistence/3.3/Default/Xml/Primitive/Double2XmlSerializer.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.Persistence/3.3/Default/Xml/Primitive/Double2XmlSerializer.cs	(revision 4068)
@@ -21,7 +21,4 @@
 
 using System;
-using HeuristicLab.Persistence.Core;
-using HeuristicLab.Persistence.Interfaces;
-using System.Reflection;
 using System.Globalization;
 
@@ -54,6 +51,6 @@
   }
 
-  
-  
+
+
 
 }
Index: /trunk/sources/HeuristicLab.Persistence/3.3/Default/Xml/Primitive/Float2XmlSerializer.cs
===================================================================
--- /trunk/sources/HeuristicLab.Persistence/3.3/Default/Xml/Primitive/Float2XmlSerializer.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.Persistence/3.3/Default/Xml/Primitive/Float2XmlSerializer.cs	(revision 4068)
@@ -21,7 +21,4 @@
 
 using System;
-using HeuristicLab.Persistence.Core;
-using HeuristicLab.Persistence.Interfaces;
-using System.Reflection;
 using System.Globalization;
 
Index: /trunk/sources/HeuristicLab.Persistence/3.3/Default/Xml/Primitive/Guid2XmlSerializer.cs
===================================================================
--- /trunk/sources/HeuristicLab.Persistence/3.3/Default/Xml/Primitive/Guid2XmlSerializer.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.Persistence/3.3/Default/Xml/Primitive/Guid2XmlSerializer.cs	(revision 4068)
@@ -21,9 +21,6 @@
 
 using System;
+using System.Globalization;
 using HeuristicLab.Persistence.Core;
-using HeuristicLab.Persistence.Interfaces;
-using System.Text;
-using System.Text.RegularExpressions;
-using System.Globalization;
 
 
@@ -39,7 +36,9 @@
       try {
         return new Guid(t.Data);
-      } catch (FormatException x) {
+      }
+      catch (FormatException x) {
         throw new PersistenceException("Cannot parse Guid string representation.", x);
-      } catch (OverflowException x) {
+      }
+      catch (OverflowException x) {
         throw new PersistenceException("Overflow during Guid parsing.", x);
       }
Index: /trunk/sources/HeuristicLab.Persistence/3.3/Default/Xml/Primitive/Int2XmlSerializer.cs
===================================================================
--- /trunk/sources/HeuristicLab.Persistence/3.3/Default/Xml/Primitive/Int2XmlSerializer.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.Persistence/3.3/Default/Xml/Primitive/Int2XmlSerializer.cs	(revision 4068)
@@ -20,9 +20,4 @@
 #endregion
 
-using System;
-using HeuristicLab.Persistence.Core;
-using HeuristicLab.Persistence.Interfaces;
-using System.Reflection;
-using System.Globalization;
 
 namespace HeuristicLab.Persistence.Default.Xml.Primitive {
Index: /trunk/sources/HeuristicLab.Persistence/3.3/Default/Xml/Primitive/Long2XmlSerializer.cs
===================================================================
--- /trunk/sources/HeuristicLab.Persistence/3.3/Default/Xml/Primitive/Long2XmlSerializer.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.Persistence/3.3/Default/Xml/Primitive/Long2XmlSerializer.cs	(revision 4068)
@@ -20,9 +20,4 @@
 #endregion
 
-using System;
-using HeuristicLab.Persistence.Core;
-using HeuristicLab.Persistence.Interfaces;
-using System.Reflection;
-using System.Globalization;
 
 namespace HeuristicLab.Persistence.Default.Xml.Primitive {
Index: /trunk/sources/HeuristicLab.Persistence/3.3/Default/Xml/Primitive/PrimitiveXmlSerializerBase.cs
===================================================================
--- /trunk/sources/HeuristicLab.Persistence/3.3/Default/Xml/Primitive/PrimitiveXmlSerializerBase.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.Persistence/3.3/Default/Xml/Primitive/PrimitiveXmlSerializerBase.cs	(revision 4068)
@@ -20,7 +20,4 @@
 #endregion
 
-using HeuristicLab.Persistence.Interfaces;
-using HeuristicLab.Persistence.Core;
-using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
 
 namespace HeuristicLab.Persistence.Default.Xml.Primitive {
Index: /trunk/sources/HeuristicLab.Persistence/3.3/Default/Xml/Primitive/SByte2XmlSerializer.cs
===================================================================
--- /trunk/sources/HeuristicLab.Persistence/3.3/Default/Xml/Primitive/SByte2XmlSerializer.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.Persistence/3.3/Default/Xml/Primitive/SByte2XmlSerializer.cs	(revision 4068)
@@ -20,9 +20,4 @@
 #endregion
 
-using System;
-using HeuristicLab.Persistence.Core;
-using HeuristicLab.Persistence.Interfaces;
-using System.Reflection;
-using System.Globalization;
 
 namespace HeuristicLab.Persistence.Default.Xml.Primitive {
Index: /trunk/sources/HeuristicLab.Persistence/3.3/Default/Xml/Primitive/Short2XmlSerializer.cs
===================================================================
--- /trunk/sources/HeuristicLab.Persistence/3.3/Default/Xml/Primitive/Short2XmlSerializer.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.Persistence/3.3/Default/Xml/Primitive/Short2XmlSerializer.cs	(revision 4068)
@@ -20,9 +20,4 @@
 #endregion
 
-using System;
-using HeuristicLab.Persistence.Core;
-using HeuristicLab.Persistence.Interfaces;
-using System.Reflection;
-using System.Globalization;
 
 namespace HeuristicLab.Persistence.Default.Xml.Primitive {
Index: /trunk/sources/HeuristicLab.Persistence/3.3/Default/Xml/Primitive/SimpleNumber2XmlSerializerBase.cs
===================================================================
--- /trunk/sources/HeuristicLab.Persistence/3.3/Default/Xml/Primitive/SimpleNumber2XmlSerializerBase.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.Persistence/3.3/Default/Xml/Primitive/SimpleNumber2XmlSerializerBase.cs	(revision 4068)
@@ -21,8 +21,6 @@
 
 using System;
+using System.Reflection;
 using HeuristicLab.Persistence.Core;
-using HeuristicLab.Persistence.Interfaces;
-using System.Reflection;
-using System.Globalization;
 
 namespace HeuristicLab.Persistence.Default.Xml.Primitive {
@@ -46,5 +44,6 @@
       try {
         return (T)ParseMethod.Invoke(null, new[] { x.Data });
-      } catch (Exception e) {
+      }
+      catch (Exception e) {
         throw new PersistenceException("Could not parse simple number.", e);
       }
Index: /trunk/sources/HeuristicLab.Persistence/3.3/Default/Xml/Primitive/String2XmlSerializer.cs
===================================================================
--- /trunk/sources/HeuristicLab.Persistence/3.3/Default/Xml/Primitive/String2XmlSerializer.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.Persistence/3.3/Default/Xml/Primitive/String2XmlSerializer.cs	(revision 4068)
@@ -20,10 +20,7 @@
 #endregion
 
-using System;
-using HeuristicLab.Persistence.Core;
-using HeuristicLab.Persistence.Interfaces;
 using System.Text;
 using System.Text.RegularExpressions;
-using System.Globalization;
+using HeuristicLab.Persistence.Core;
 
 
Index: /trunk/sources/HeuristicLab.Persistence/3.3/Default/Xml/Primitive/System.Drawing/Bitmap2XmlSerializer.cs
===================================================================
--- /trunk/sources/HeuristicLab.Persistence/3.3/Default/Xml/Primitive/System.Drawing/Bitmap2XmlSerializer.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.Persistence/3.3/Default/Xml/Primitive/System.Drawing/Bitmap2XmlSerializer.cs	(revision 4068)
@@ -20,13 +20,7 @@
 #endregion
 
-using System;
-using System.Collections.Generic;
-using System.Linq;
-using System.Text;
 using System.Drawing;
+using System.Drawing.Imaging;
 using System.IO;
-using System.Drawing.Imaging;
-using System.Text.RegularExpressions;
-using HeuristicLab.Persistence.Core;
 using HeuristicLab.Persistence.Default.Xml.Compact;
 
Index: /trunk/sources/HeuristicLab.Persistence/3.3/Default/Xml/Primitive/TimeSpan2XmlSerializer.cs
===================================================================
--- /trunk/sources/HeuristicLab.Persistence/3.3/Default/Xml/Primitive/TimeSpan2XmlSerializer.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.Persistence/3.3/Default/Xml/Primitive/TimeSpan2XmlSerializer.cs	(revision 4068)
@@ -22,8 +22,4 @@
 using System;
 using HeuristicLab.Persistence.Core;
-using HeuristicLab.Persistence.Interfaces;
-using System.Text;
-using System.Text.RegularExpressions;
-using System.Globalization;
 
 
@@ -39,7 +35,9 @@
       try {
         return TimeSpan.Parse(t.Data);
-      } catch (FormatException x) {
+      }
+      catch (FormatException x) {
         throw new PersistenceException("Cannot parse TimeSpan string representation.", x);
-      } catch (OverflowException x) {
+      }
+      catch (OverflowException x) {
         throw new PersistenceException("Overflow during TimeSpan parsing.", x);
       }
Index: /trunk/sources/HeuristicLab.Persistence/3.3/Default/Xml/Primitive/UInt2XmlSerializer.cs
===================================================================
--- /trunk/sources/HeuristicLab.Persistence/3.3/Default/Xml/Primitive/UInt2XmlSerializer.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.Persistence/3.3/Default/Xml/Primitive/UInt2XmlSerializer.cs	(revision 4068)
@@ -20,10 +20,4 @@
 #endregion
 
-using System;
-using HeuristicLab.Persistence.Core;
-using HeuristicLab.Persistence.Interfaces;
-using System.Reflection;
-using System.Globalization;
-using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
 
 namespace HeuristicLab.Persistence.Default.Xml.Primitive {
Index: /trunk/sources/HeuristicLab.Persistence/3.3/Default/Xml/Primitive/ULong2XmlSerializer.cs
===================================================================
--- /trunk/sources/HeuristicLab.Persistence/3.3/Default/Xml/Primitive/ULong2XmlSerializer.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.Persistence/3.3/Default/Xml/Primitive/ULong2XmlSerializer.cs	(revision 4068)
@@ -20,9 +20,4 @@
 #endregion
 
-using System;
-using HeuristicLab.Persistence.Core;
-using HeuristicLab.Persistence.Interfaces;
-using System.Reflection;
-using System.Globalization;
 
 namespace HeuristicLab.Persistence.Default.Xml.Primitive {
Index: /trunk/sources/HeuristicLab.Persistence/3.3/Default/Xml/Primitive/UShort2XmlSerializer.cs
===================================================================
--- /trunk/sources/HeuristicLab.Persistence/3.3/Default/Xml/Primitive/UShort2XmlSerializer.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.Persistence/3.3/Default/Xml/Primitive/UShort2XmlSerializer.cs	(revision 4068)
@@ -20,9 +20,4 @@
 #endregion
 
-using System;
-using HeuristicLab.Persistence.Core;
-using HeuristicLab.Persistence.Interfaces;
-using System.Reflection;
-using System.Globalization;
 
 namespace HeuristicLab.Persistence.Default.Xml.Primitive {
Index: /trunk/sources/HeuristicLab.Persistence/3.3/Default/Xml/XmlFormat.cs
===================================================================
--- /trunk/sources/HeuristicLab.Persistence/3.3/Default/Xml/XmlFormat.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.Persistence/3.3/Default/Xml/XmlFormat.cs	(revision 4068)
@@ -20,7 +20,6 @@
 #endregion
 
+using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
 using HeuristicLab.Persistence.Interfaces;
-using HeuristicLab.Persistence.Core;
-using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
 
 namespace HeuristicLab.Persistence.Default.Xml {
Index: /trunk/sources/HeuristicLab.Persistence/3.3/Default/Xml/XmlGenerator.cs
===================================================================
--- /trunk/sources/HeuristicLab.Persistence/3.3/Default/Xml/XmlGenerator.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.Persistence/3.3/Default/Xml/XmlGenerator.cs	(revision 4068)
@@ -20,15 +20,15 @@
 #endregion
 
+using System;
 using System.Collections.Generic;
-using System;
+using System.IO;
+using System.IO.Compression;
+using System.Linq;
 using System.Text;
-using System.Linq;
+using HeuristicLab.Persistence.Core;
+using HeuristicLab.Persistence.Core.Tokens;
 using HeuristicLab.Persistence.Interfaces;
-using HeuristicLab.Persistence.Core;
-using System.IO;
+using HeuristicLab.Tracing;
 using ICSharpCode.SharpZipLib.Zip;
-using HeuristicLab.Tracing;
-using HeuristicLab.Persistence.Core.Tokens;
-using System.IO.Compression;
 
 namespace HeuristicLab.Persistence.Default.Xml {
@@ -257,5 +257,6 @@
           {"typeName", lastTypeToken.TypeName },
           {"serializer", lastTypeToken.Serializer }});
-      } finally {
+      }
+      finally {
         lastTypeToken = null;
       }
@@ -367,5 +368,6 @@
         File.Copy(tempfile, filename, true);
         File.Delete(tempfile);
-      } catch (Exception) {
+      }
+      catch (Exception) {
         Logger.Warn("Exception caught, no data has been written.");
         throw;
@@ -413,7 +415,9 @@
           writer.Flush();
         }
-      } catch (PersistenceException) {
+      }
+      catch (PersistenceException) {
         throw;
-      } catch (Exception e) {
+      }
+      catch (Exception e) {
         throw new PersistenceException("Unexpected exception during Serialization.", e);
       }
Index: /trunk/sources/HeuristicLab.Persistence/3.3/Default/Xml/XmlParser.cs
===================================================================
--- /trunk/sources/HeuristicLab.Persistence/3.3/Default/Xml/XmlParser.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.Persistence/3.3/Default/Xml/XmlParser.cs	(revision 4068)
@@ -20,14 +20,14 @@
 #endregion
 
-using System.Xml;
-using System.Collections.Generic;
 using System;
 using System.Collections;
+using System.Collections.Generic;
 using System.IO;
+using System.IO.Compression;
+using System.Xml;
 using HeuristicLab.Persistence.Core;
+using HeuristicLab.Persistence.Core.Tokens;
 using HeuristicLab.Persistence.Interfaces;
 using ICSharpCode.SharpZipLib.Zip;
-using HeuristicLab.Persistence.Core.Tokens;
-using System.IO.Compression;
 
 namespace HeuristicLab.Persistence.Default.Xml {
@@ -75,5 +75,6 @@
         try {
           iterator = handlers[reader.Name].Invoke();
-        } catch (KeyNotFoundException) {
+        }
+        catch (KeyNotFoundException) {
           throw new PersistenceException(String.Format(
             "Invalid XML tag \"{0}\" in persistence file.",
@@ -175,7 +176,9 @@
         }
         return typeCache;
-      } catch (PersistenceException) {
+      }
+      catch (PersistenceException) {
         throw;
-      } catch (Exception e) {
+      }
+      catch (Exception e) {
         throw new PersistenceException("Unexpected exception during type cache parsing.", e);
       }
@@ -193,5 +196,6 @@
           return Deserialize(file);
         }
-      } finally {
+      }
+      finally {
         TimeSpan end = System.Diagnostics.Process.GetCurrentProcess().TotalProcessorTime;
         Tracing.Logger.Info(string.Format(
@@ -224,7 +228,9 @@
           return deserializer.Deserialize(parser);
         }
-      } catch (PersistenceException) {
+      }
+      catch (PersistenceException) {
         throw;
-      } catch (Exception x) {
+      }
+      catch (Exception x) {
         throw new PersistenceException("Unexpected exception during deserialization", x);
       }
@@ -255,7 +261,9 @@
         zipFile.Close();
         return result;
-      } catch (PersistenceException) {
+      }
+      catch (PersistenceException) {
         throw;
-      } catch (Exception e) {
+      }
+      catch (Exception e) {
         throw new PersistenceException("Unexpected exception during deserialization", e);
       }
Index: /trunk/sources/HeuristicLab.Persistence/3.3/Default/Xml/XmlSerializerBase.cs
===================================================================
--- /trunk/sources/HeuristicLab.Persistence/3.3/Default/Xml/XmlSerializerBase.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.Persistence/3.3/Default/Xml/XmlSerializerBase.cs	(revision 4068)
@@ -21,6 +21,4 @@
 
 using HeuristicLab.Persistence.Interfaces;
-using HeuristicLab.Persistence.Core;
-using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
 
 namespace HeuristicLab.Persistence.Default.Xml {
Index: /trunk/sources/HeuristicLab.Persistence/3.3/Default/Xml/XmlString.cs
===================================================================
--- /trunk/sources/HeuristicLab.Persistence/3.3/Default/Xml/XmlString.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.Persistence/3.3/Default/Xml/XmlString.cs	(revision 4068)
@@ -20,8 +20,7 @@
 #endregion
 
-using HeuristicLab.Persistence.Interfaces;
-using HeuristicLab.Persistence.Core;
 using System.Text;
 using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
+using HeuristicLab.Persistence.Interfaces;
 
 namespace HeuristicLab.Persistence.Default.Xml {
@@ -30,5 +29,5 @@
   /// XML friendly encapsulation of string data.
   /// </summary>
-  [StorableClass]  
+  [StorableClass]
   public class XmlString : ISerialData {
 
Index: /trunk/sources/HeuristicLab.Persistence/3.3/Default/Xml/XmlStringConstants.cs
===================================================================
--- /trunk/sources/HeuristicLab.Persistence/3.3/Default/Xml/XmlStringConstants.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.Persistence/3.3/Default/Xml/XmlStringConstants.cs	(revision 4068)
@@ -20,13 +20,4 @@
 #endregion
 
-using System.Collections.Generic;
-using System;
-using System.Text;
-using HeuristicLab.Persistence.Interfaces;
-using HeuristicLab.Persistence.Core;
-using System.IO;
-using ICSharpCode.SharpZipLib.Zip;
-using HeuristicLab.Tracing;
-using HeuristicLab.Persistence.Core.Tokens;
 
 namespace HeuristicLab.Persistence.Default.Xml {
@@ -41,4 +32,4 @@
     public const string METAINFO = "METAINFO";
   }
-  
+
 }
Index: /trunk/sources/HeuristicLab.Persistence/3.3/Interfaces/ISerialData.cs
===================================================================
--- /trunk/sources/HeuristicLab.Persistence/3.3/Interfaces/ISerialData.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.Persistence/3.3/Interfaces/ISerialData.cs	(revision 4068)
@@ -20,5 +20,4 @@
 #endregion
 
-using System;
 
 namespace HeuristicLab.Persistence.Interfaces {
Index: /trunk/sources/HeuristicLab.Persistence/3.3/Tests/Properties/AssemblyInfo.cs
===================================================================
--- /trunk/sources/HeuristicLab.Persistence/3.3/Tests/Properties/AssemblyInfo.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.Persistence/3.3/Tests/Properties/AssemblyInfo.cs	(revision 4068)
@@ -21,5 +21,4 @@
 
 using System.Reflection;
-using System.Runtime.CompilerServices;
 using System.Runtime.InteropServices;
 
Index: /trunk/sources/HeuristicLab.Persistence/3.3/Tests/StorableAttributeTests.cs
===================================================================
--- /trunk/sources/HeuristicLab.Persistence/3.3/Tests/StorableAttributeTests.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.Persistence/3.3/Tests/StorableAttributeTests.cs	(revision 4068)
@@ -20,14 +20,9 @@
 #endregion
 
-using System;
-using System.Collections.Generic;
-using HeuristicLab.Persistence.Core;
-using Microsoft.VisualStudio.TestTools.UnitTesting;
 using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
-using System.Reflection;
 
 namespace HeuristicLab.Persistence_33.Tests {
 
-  [StorableClass] 
+  [StorableClass]
   class DemoClass {
 
@@ -74,43 +69,43 @@
   }
 
-/*  [TestClass]
-  public class AttributeTest {
+  /*  [TestClass]
+    public class AttributeTest {
 
-    [TestMethod]
-    public void SimpleStorableAttributeTest() {
-      DemoClass t = new DemoClass();
-      IEnumerable<DataMemberAccessor> accessorList = StorableAttribute.GetStorableAccessors(t);
-      Dictionary<string, DataMemberAccessor> accessors = new Dictionary<string, DataMemberAccessor>();
-      foreach (var a in accessorList)
-        accessors.Add(a.Name, a);
-      Assert.IsTrue(accessors.ContainsKey("TestProperty"));
-      Assert.IsTrue(accessors.ContainsKey("x"));
-      Assert.IsFalse(accessors.ContainsKey("y"));
-      object o = new object();
-      t.o = o;
-      Assert.AreSame(accessors["TestProperty"].Get(), o);
-      t.x = 12;
-      Assert.AreEqual(accessors["x"].Get(), 12);
-      t.y = 312890;
-      accessors["TestProperty"].Set(null);
-      Assert.IsNull(t.o);
-      accessors["x"].Set(123);
-      Assert.AreEqual(t.x, 123);
-    }
+      [TestMethod]
+      public void SimpleStorableAttributeTest() {
+        DemoClass t = new DemoClass();
+        IEnumerable<DataMemberAccessor> accessorList = StorableAttribute.GetStorableAccessors(t);
+        Dictionary<string, DataMemberAccessor> accessors = new Dictionary<string, DataMemberAccessor>();
+        foreach (var a in accessorList)
+          accessors.Add(a.Name, a);
+        Assert.IsTrue(accessors.ContainsKey("TestProperty"));
+        Assert.IsTrue(accessors.ContainsKey("x"));
+        Assert.IsFalse(accessors.ContainsKey("y"));
+        object o = new object();
+        t.o = o;
+        Assert.AreSame(accessors["TestProperty"].Get(), o);
+        t.x = 12;
+        Assert.AreEqual(accessors["x"].Get(), 12);
+        t.y = 312890;
+        accessors["TestProperty"].Set(null);
+        Assert.IsNull(t.o);
+        accessors["x"].Set(123);
+        Assert.AreEqual(t.x, 123);
+      }
 
-    [TestMethod]
-    public void TestInheritance() {
-      New n = new New();
-      var accessors = StorableAttribute.GetStorableAccessors(n);
-      var accessDict = new Dictionary<string, DataMemberAccessor>();
-      foreach (var accessor in accessors) // assert uniqueness
-        accessDict.Add(accessor.Name, accessor);
-      Assert.IsTrue(accessDict.ContainsKey(typeof(New).FullName + ".Name"));
-      Assert.IsTrue(accessDict.ContainsKey(typeof(Override).FullName + ".Name"));
-      Assert.AreEqual("New", accessDict[typeof(New).FullName + ".Name"].Get());
-      Assert.AreEqual("Override", accessDict[typeof(Override).FullName + ".Name"].Get());
-    }
+      [TestMethod]
+      public void TestInheritance() {
+        New n = new New();
+        var accessors = StorableAttribute.GetStorableAccessors(n);
+        var accessDict = new Dictionary<string, DataMemberAccessor>();
+        foreach (var accessor in accessors) // assert uniqueness
+          accessDict.Add(accessor.Name, accessor);
+        Assert.IsTrue(accessDict.ContainsKey(typeof(New).FullName + ".Name"));
+        Assert.IsTrue(accessDict.ContainsKey(typeof(Override).FullName + ".Name"));
+        Assert.AreEqual("New", accessDict[typeof(New).FullName + ".Name"].Get());
+        Assert.AreEqual("Override", accessDict[typeof(Override).FullName + ".Name"].Get());
+      }
 
-  }*/
+    }*/
 
 }
Index: /trunk/sources/HeuristicLab.Persistence/3.3/Tests/UseCases.cs
===================================================================
--- /trunk/sources/HeuristicLab.Persistence/3.3/Tests/UseCases.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.Persistence/3.3/Tests/UseCases.cs	(revision 4068)
@@ -21,22 +21,21 @@
 
 using System;
+using System.Collections;
+using System.Collections.Generic;
+using System.Drawing;
+using System.IO;
+using System.Linq;
+using System.Reflection;
 using System.Text;
-using System.Collections.Generic;
-using System.Linq;
+using System.Text.RegularExpressions;
+using HeuristicLab.Persistence.Auxiliary;
+using HeuristicLab.Persistence.Core;
+using HeuristicLab.Persistence.Default.CompositeSerializers;
+using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
+using HeuristicLab.Persistence.Default.DebugString;
+using HeuristicLab.Persistence.Default.Xml;
+using HeuristicLab.Persistence.Default.Xml.Primitive;
+using HeuristicLab.Persistence.Interfaces;
 using Microsoft.VisualStudio.TestTools.UnitTesting;
-using HeuristicLab.Persistence.Core;
-using System.Collections;
-using HeuristicLab.Persistence.Default.Xml;
-using HeuristicLab.Persistence.Default.DebugString;
-using System.IO;
-using System.Reflection;
-using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
-using HeuristicLab.Persistence.Interfaces;
-using HeuristicLab.Persistence.Default.Xml.Primitive;
-using HeuristicLab.Persistence.Default.CompositeSerializers;
-using HeuristicLab.Persistence.Auxiliary;
-using System.Text.RegularExpressions;
-using System.Drawing;
-using System.Drawing.Imaging;
 
 namespace HeuristicLab.Persistence_33.Tests {
@@ -607,5 +606,6 @@
         XmlGenerator.Serialize(c, tempFile);
         Assert.Fail("Exception not thrown");
-      } catch (PersistenceException) {
+      }
+      catch (PersistenceException) {
       }
     }
@@ -619,5 +619,6 @@
         XmlGenerator.Serialize(s, tempFile);
         Assert.Fail("Exception expected");
-      } catch (PersistenceException) { }
+      }
+      catch (PersistenceException) { }
       List<int> newList = (List<int>)XmlParser.Deserialize(tempFile);
       Assert.AreEqual(list[0], newList[0]);
@@ -658,5 +659,6 @@
         }
         Assert.Fail("Exception expected");
-      } catch (PersistenceException px) {
+      }
+      catch (PersistenceException px) {
         Assert.AreEqual(3, px.Data.Count);
       }
@@ -686,5 +688,6 @@
         d = new Deserializer(XmlParser.ParseTypeCache(new StringReader(newTypeString)));
         Assert.Fail("Exception expected");
-      } catch (PersistenceException x) {
+      }
+      catch (PersistenceException x) {
         Assert.IsTrue(x.Message.Contains("incompatible"));
       }
@@ -695,5 +698,6 @@
         d = new Deserializer(XmlParser.ParseTypeCache(new StringReader(newTypeString)));
         Assert.Fail("Exception expected");
-      } catch (PersistenceException x) {
+      }
+      catch (PersistenceException x) {
         Assert.IsTrue(x.Message.Contains("newer"));
       }
@@ -862,5 +866,6 @@
         ExplodingDefaultConstructor newX = (ExplodingDefaultConstructor)XmlParser.Deserialize(tempFile);
         Assert.Fail("Exception expected");
-      } catch (PersistenceException pe) {
+      }
+      catch (PersistenceException pe) {
         Assert.AreEqual(pe.InnerException.Message, "this constructor will always fail");
       }
@@ -873,5 +878,6 @@
         XmlGenerator.Serialize(ns, tempFile);
         Assert.Fail("PersistenceException expected");
-      } catch (PersistenceException x) {
+      }
+      catch (PersistenceException x) {
         Assert.IsTrue(x.Message.Contains(new StorableSerializer().JustifyRejection(typeof(NonSerializable))));
       }
Index: /trunk/sources/HeuristicLab.PluginInfrastructure/3.3/Advanced/AvailablePluginsView.cs
===================================================================
--- /trunk/sources/HeuristicLab.PluginInfrastructure/3.3/Advanced/AvailablePluginsView.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.PluginInfrastructure/3.3/Advanced/AvailablePluginsView.cs	(revision 4068)
@@ -22,8 +22,5 @@
 using System.Collections.Generic;
 using System.ComponentModel;
-using System.Drawing;
-using System.Data;
 using System.Linq;
-using System.Text;
 using System.Windows.Forms;
 using HeuristicLab.PluginInfrastructure.Manager;
Index: /trunk/sources/HeuristicLab.PluginInfrastructure/3.3/Advanced/BasicUpdateView.cs
===================================================================
--- /trunk/sources/HeuristicLab.PluginInfrastructure/3.3/Advanced/BasicUpdateView.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.PluginInfrastructure/3.3/Advanced/BasicUpdateView.cs	(revision 4068)
@@ -23,9 +23,5 @@
 using System.Collections.Generic;
 using System.ComponentModel;
-using System.Drawing;
-using System.Data;
 using System.Linq;
-using System.Text;
-using System.Windows.Forms;
 using HeuristicLab.PluginInfrastructure.Manager;
 
Index: /trunk/sources/HeuristicLab.PluginInfrastructure/3.3/Advanced/ConfirmationDialog.cs
===================================================================
--- /trunk/sources/HeuristicLab.PluginInfrastructure/3.3/Advanced/ConfirmationDialog.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.PluginInfrastructure/3.3/Advanced/ConfirmationDialog.cs	(revision 4068)
@@ -20,15 +20,10 @@
 #endregion
 using System;
-using System.Collections.Generic;
-using System.ComponentModel;
-using System.Data;
-using System.Drawing;
-using System.Linq;
-using System.Text;
 using System.Windows.Forms;
 
 namespace HeuristicLab.PluginInfrastructure.Advanced {
   internal partial class ConfirmationDialog : Form {
-    public ConfirmationDialog() : base() {
+    public ConfirmationDialog()
+      : base() {
       InitializeComponent();
       icon.Image = System.Drawing.SystemIcons.Exclamation.ToBitmap();
Index: /trunk/sources/HeuristicLab.PluginInfrastructure/3.3/Advanced/ConnectionSetupView.cs
===================================================================
--- /trunk/sources/HeuristicLab.PluginInfrastructure/3.3/Advanced/ConnectionSetupView.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.PluginInfrastructure/3.3/Advanced/ConnectionSetupView.cs	(revision 4068)
@@ -20,10 +20,4 @@
 #endregion
 using System;
-using System.Collections.Generic;
-using System.ComponentModel;
-using System.Drawing;
-using System.Data;
-using System.Linq;
-using System.Text;
 using System.Windows.Forms;
 
Index: /trunk/sources/HeuristicLab.PluginInfrastructure/3.3/Advanced/DeploymentService/AdminClientFactory.cs
===================================================================
--- /trunk/sources/HeuristicLab.PluginInfrastructure/3.3/Advanced/DeploymentService/AdminClientFactory.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.PluginInfrastructure/3.3/Advanced/DeploymentService/AdminClientFactory.cs	(revision 4068)
@@ -20,11 +20,7 @@
 #endregion
 
-using System;
-using System.Collections.Generic;
-using System.Linq;
-using System.Text;
+using System.Reflection;
+using System.Security.Cryptography.X509Certificates;
 using System.ServiceModel;
-using System.Security.Cryptography.X509Certificates;
-using System.Reflection;
 
 namespace HeuristicLab.PluginInfrastructure.Advanced.DeploymentService {
Index: /trunk/sources/HeuristicLab.PluginInfrastructure/3.3/Advanced/DeploymentService/DeploymentServerCertificateValidator.cs
===================================================================
--- /trunk/sources/HeuristicLab.PluginInfrastructure/3.3/Advanced/DeploymentService/DeploymentServerCertificateValidator.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.PluginInfrastructure/3.3/Advanced/DeploymentService/DeploymentServerCertificateValidator.cs	(revision 4068)
@@ -1,9 +1,6 @@
 ﻿using System;
-using System.Collections.Generic;
-using System.Linq;
-using System.Text;
-using System.Security.Cryptography.X509Certificates;
 using System.IdentityModel.Selectors;
 using System.IdentityModel.Tokens;
+using System.Security.Cryptography.X509Certificates;
 
 namespace HeuristicLab.PluginInfrastructure.Advanced.DeploymentService {
Index: /trunk/sources/HeuristicLab.PluginInfrastructure/3.3/Advanced/DeploymentService/DeploymentService.cs
===================================================================
--- /trunk/sources/HeuristicLab.PluginInfrastructure/3.3/Advanced/DeploymentService/DeploymentService.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.PluginInfrastructure/3.3/Advanced/DeploymentService/DeploymentService.cs	(revision 4068)
@@ -9,314 +9,255 @@
 //------------------------------------------------------------------------------
 
-namespace HeuristicLab.PluginInfrastructure.Advanced.DeploymentService
-{
-    using System.Runtime.Serialization;
-    
-    
-    [System.Diagnostics.DebuggerStepThroughAttribute()]
-    [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Runtime.Serialization", "3.0.0.0")]
-    [System.Runtime.Serialization.DataContractAttribute(Name="PluginDescription", Namespace="http://schemas.datacontract.org/2004/07/HeuristicLab.Services.Deployment", IsReference=true)]
-    public partial class PluginDescription : object, System.Runtime.Serialization.IExtensibleDataObject
-    {
-        
-        private System.Runtime.Serialization.ExtensionDataObject extensionDataField;
-        
-        private string ContactEmailField;
-        
-        private string ContactNameField;
-        
-        private HeuristicLab.PluginInfrastructure.Advanced.DeploymentService.PluginDescription[] DependenciesField;
-        
-        private string LicenseTextField;
-        
-        private string NameField;
-        
-        private System.Version VersionField;
-        
-        public System.Runtime.Serialization.ExtensionDataObject ExtensionData
-        {
-            get
-            {
-                return this.extensionDataField;
-            }
-            set
-            {
-                this.extensionDataField = value;
-            }
-        }
-        
-        [System.Runtime.Serialization.DataMemberAttribute()]
-        public string ContactEmail
-        {
-            get
-            {
-                return this.ContactEmailField;
-            }
-            set
-            {
-                this.ContactEmailField = value;
-            }
-        }
-        
-        [System.Runtime.Serialization.DataMemberAttribute()]
-        public string ContactName
-        {
-            get
-            {
-                return this.ContactNameField;
-            }
-            set
-            {
-                this.ContactNameField = value;
-            }
-        }
-        
-        [System.Runtime.Serialization.DataMemberAttribute()]
-        public HeuristicLab.PluginInfrastructure.Advanced.DeploymentService.PluginDescription[] Dependencies
-        {
-            get
-            {
-                return this.DependenciesField;
-            }
-            set
-            {
-                this.DependenciesField = value;
-            }
-        }
-        
-        [System.Runtime.Serialization.DataMemberAttribute()]
-        public string LicenseText
-        {
-            get
-            {
-                return this.LicenseTextField;
-            }
-            set
-            {
-                this.LicenseTextField = value;
-            }
-        }
-        
-        [System.Runtime.Serialization.DataMemberAttribute()]
-        public string Name
-        {
-            get
-            {
-                return this.NameField;
-            }
-            set
-            {
-                this.NameField = value;
-            }
-        }
-        
-        [System.Runtime.Serialization.DataMemberAttribute()]
-        public System.Version Version
-        {
-            get
-            {
-                return this.VersionField;
-            }
-            set
-            {
-                this.VersionField = value;
-            }
-        }
-    }
-    
-    [System.Diagnostics.DebuggerStepThroughAttribute()]
-    [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Runtime.Serialization", "3.0.0.0")]
-    [System.Runtime.Serialization.DataContractAttribute(Name="ProductDescription", Namespace="http://schemas.datacontract.org/2004/07/HeuristicLab.Services.Deployment")]
-    public partial class ProductDescription : object, System.Runtime.Serialization.IExtensibleDataObject
-    {
-        
-        private System.Runtime.Serialization.ExtensionDataObject extensionDataField;
-        
-        private string NameField;
-        
-        private HeuristicLab.PluginInfrastructure.Advanced.DeploymentService.PluginDescription[] PluginsField;
-        
-        private System.Version VersionField;
-        
-        public System.Runtime.Serialization.ExtensionDataObject ExtensionData
-        {
-            get
-            {
-                return this.extensionDataField;
-            }
-            set
-            {
-                this.extensionDataField = value;
-            }
-        }
-        
-        [System.Runtime.Serialization.DataMemberAttribute()]
-        public string Name
-        {
-            get
-            {
-                return this.NameField;
-            }
-            set
-            {
-                this.NameField = value;
-            }
-        }
-        
-        [System.Runtime.Serialization.DataMemberAttribute()]
-        public HeuristicLab.PluginInfrastructure.Advanced.DeploymentService.PluginDescription[] Plugins
-        {
-            get
-            {
-                return this.PluginsField;
-            }
-            set
-            {
-                this.PluginsField = value;
-            }
-        }
-        
-        [System.Runtime.Serialization.DataMemberAttribute()]
-        public System.Version Version
-        {
-            get
-            {
-                return this.VersionField;
-            }
-            set
-            {
-                this.VersionField = value;
-            }
-        }
-    }
-    
-    [System.CodeDom.Compiler.GeneratedCodeAttribute("System.ServiceModel", "3.0.0.0")]
-    [System.ServiceModel.ServiceContractAttribute(ConfigurationName="HeuristicLab.PluginInfrastructure.Advanced.DeploymentService.IUpdate")]
-    public interface IUpdate
-    {
-        
-        [System.ServiceModel.OperationContractAttribute(Action="http://tempuri.org/IUpdate/GetPlugin", ReplyAction="http://tempuri.org/IUpdate/GetPluginResponse")]
-        byte[] GetPlugin(HeuristicLab.PluginInfrastructure.Advanced.DeploymentService.PluginDescription description);
-        
-        [System.ServiceModel.OperationContractAttribute(Action="http://tempuri.org/IUpdate/GetProducts", ReplyAction="http://tempuri.org/IUpdate/GetProductsResponse")]
-        HeuristicLab.PluginInfrastructure.Advanced.DeploymentService.ProductDescription[] GetProducts();
-        
-        [System.ServiceModel.OperationContractAttribute(Action="http://tempuri.org/IUpdate/GetPlugins", ReplyAction="http://tempuri.org/IUpdate/GetPluginsResponse")]
-        HeuristicLab.PluginInfrastructure.Advanced.DeploymentService.PluginDescription[] GetPlugins();
-    }
-    
-    [System.CodeDom.Compiler.GeneratedCodeAttribute("System.ServiceModel", "3.0.0.0")]
-    public interface IUpdateChannel : HeuristicLab.PluginInfrastructure.Advanced.DeploymentService.IUpdate, System.ServiceModel.IClientChannel
-    {
-    }
-    
-    [System.Diagnostics.DebuggerStepThroughAttribute()]
-    [System.CodeDom.Compiler.GeneratedCodeAttribute("System.ServiceModel", "3.0.0.0")]
-    public partial class UpdateClient : System.ServiceModel.ClientBase<HeuristicLab.PluginInfrastructure.Advanced.DeploymentService.IUpdate>, HeuristicLab.PluginInfrastructure.Advanced.DeploymentService.IUpdate
-    {
-        
-        public UpdateClient()
-        {
-        }
-        
-        public UpdateClient(string endpointConfigurationName) : 
-                base(endpointConfigurationName)
-        {
-        }
-        
-        public UpdateClient(string endpointConfigurationName, string remoteAddress) : 
-                base(endpointConfigurationName, remoteAddress)
-        {
-        }
-        
-        public UpdateClient(string endpointConfigurationName, System.ServiceModel.EndpointAddress remoteAddress) : 
-                base(endpointConfigurationName, remoteAddress)
-        {
-        }
-        
-        public UpdateClient(System.ServiceModel.Channels.Binding binding, System.ServiceModel.EndpointAddress remoteAddress) : 
-                base(binding, remoteAddress)
-        {
-        }
-        
-        public byte[] GetPlugin(HeuristicLab.PluginInfrastructure.Advanced.DeploymentService.PluginDescription description)
-        {
-            return base.Channel.GetPlugin(description);
-        }
-        
-        public HeuristicLab.PluginInfrastructure.Advanced.DeploymentService.ProductDescription[] GetProducts()
-        {
-            return base.Channel.GetProducts();
-        }
-        
-        public HeuristicLab.PluginInfrastructure.Advanced.DeploymentService.PluginDescription[] GetPlugins()
-        {
-            return base.Channel.GetPlugins();
-        }
-    }
-    
-    [System.CodeDom.Compiler.GeneratedCodeAttribute("System.ServiceModel", "3.0.0.0")]
-    [System.ServiceModel.ServiceContractAttribute(ConfigurationName="HeuristicLab.PluginInfrastructure.Advanced.DeploymentService.IAdmin")]
-    public interface IAdmin
-    {
-        
-        [System.ServiceModel.OperationContractAttribute(Action="http://tempuri.org/IAdmin/DeployProduct", ReplyAction="http://tempuri.org/IAdmin/DeployProductResponse")]
-        void DeployProduct(HeuristicLab.PluginInfrastructure.Advanced.DeploymentService.ProductDescription product);
-        
-        [System.ServiceModel.OperationContractAttribute(Action="http://tempuri.org/IAdmin/DeleteProduct", ReplyAction="http://tempuri.org/IAdmin/DeleteProductResponse")]
-        void DeleteProduct(HeuristicLab.PluginInfrastructure.Advanced.DeploymentService.ProductDescription product);
-        
-        [System.ServiceModel.OperationContractAttribute(Action="http://tempuri.org/IAdmin/DeployPlugin", ReplyAction="http://tempuri.org/IAdmin/DeployPluginResponse")]
-        void DeployPlugin(HeuristicLab.PluginInfrastructure.Advanced.DeploymentService.PluginDescription plugin, byte[] zipFile);
-    }
-    
-    [System.CodeDom.Compiler.GeneratedCodeAttribute("System.ServiceModel", "3.0.0.0")]
-    public interface IAdminChannel : HeuristicLab.PluginInfrastructure.Advanced.DeploymentService.IAdmin, System.ServiceModel.IClientChannel
-    {
-    }
-    
-    [System.Diagnostics.DebuggerStepThroughAttribute()]
-    [System.CodeDom.Compiler.GeneratedCodeAttribute("System.ServiceModel", "3.0.0.0")]
-    public partial class AdminClient : System.ServiceModel.ClientBase<HeuristicLab.PluginInfrastructure.Advanced.DeploymentService.IAdmin>, HeuristicLab.PluginInfrastructure.Advanced.DeploymentService.IAdmin
-    {
-        
-        public AdminClient()
-        {
-        }
-        
-        public AdminClient(string endpointConfigurationName) : 
-                base(endpointConfigurationName)
-        {
-        }
-        
-        public AdminClient(string endpointConfigurationName, string remoteAddress) : 
-                base(endpointConfigurationName, remoteAddress)
-        {
-        }
-        
-        public AdminClient(string endpointConfigurationName, System.ServiceModel.EndpointAddress remoteAddress) : 
-                base(endpointConfigurationName, remoteAddress)
-        {
-        }
-        
-        public AdminClient(System.ServiceModel.Channels.Binding binding, System.ServiceModel.EndpointAddress remoteAddress) : 
-                base(binding, remoteAddress)
-        {
-        }
-        
-        public void DeployProduct(HeuristicLab.PluginInfrastructure.Advanced.DeploymentService.ProductDescription product)
-        {
-            base.Channel.DeployProduct(product);
-        }
-        
-        public void DeleteProduct(HeuristicLab.PluginInfrastructure.Advanced.DeploymentService.ProductDescription product)
-        {
-            base.Channel.DeleteProduct(product);
-        }
-        
-        public void DeployPlugin(HeuristicLab.PluginInfrastructure.Advanced.DeploymentService.PluginDescription plugin, byte[] zipFile)
-        {
-            base.Channel.DeployPlugin(plugin, zipFile);
-        }
-    }
+namespace HeuristicLab.PluginInfrastructure.Advanced.DeploymentService {
+
+
+  [System.Diagnostics.DebuggerStepThroughAttribute()]
+  [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Runtime.Serialization", "3.0.0.0")]
+  [System.Runtime.Serialization.DataContractAttribute(Name = "PluginDescription", Namespace = "http://schemas.datacontract.org/2004/07/HeuristicLab.Services.Deployment", IsReference = true)]
+  public partial class PluginDescription : object, System.Runtime.Serialization.IExtensibleDataObject {
+
+    private System.Runtime.Serialization.ExtensionDataObject extensionDataField;
+
+    private string ContactEmailField;
+
+    private string ContactNameField;
+
+    private HeuristicLab.PluginInfrastructure.Advanced.DeploymentService.PluginDescription[] DependenciesField;
+
+    private string LicenseTextField;
+
+    private string NameField;
+
+    private System.Version VersionField;
+
+    public System.Runtime.Serialization.ExtensionDataObject ExtensionData {
+      get {
+        return this.extensionDataField;
+      }
+      set {
+        this.extensionDataField = value;
+      }
+    }
+
+    [System.Runtime.Serialization.DataMemberAttribute()]
+    public string ContactEmail {
+      get {
+        return this.ContactEmailField;
+      }
+      set {
+        this.ContactEmailField = value;
+      }
+    }
+
+    [System.Runtime.Serialization.DataMemberAttribute()]
+    public string ContactName {
+      get {
+        return this.ContactNameField;
+      }
+      set {
+        this.ContactNameField = value;
+      }
+    }
+
+    [System.Runtime.Serialization.DataMemberAttribute()]
+    public HeuristicLab.PluginInfrastructure.Advanced.DeploymentService.PluginDescription[] Dependencies {
+      get {
+        return this.DependenciesField;
+      }
+      set {
+        this.DependenciesField = value;
+      }
+    }
+
+    [System.Runtime.Serialization.DataMemberAttribute()]
+    public string LicenseText {
+      get {
+        return this.LicenseTextField;
+      }
+      set {
+        this.LicenseTextField = value;
+      }
+    }
+
+    [System.Runtime.Serialization.DataMemberAttribute()]
+    public string Name {
+      get {
+        return this.NameField;
+      }
+      set {
+        this.NameField = value;
+      }
+    }
+
+    [System.Runtime.Serialization.DataMemberAttribute()]
+    public System.Version Version {
+      get {
+        return this.VersionField;
+      }
+      set {
+        this.VersionField = value;
+      }
+    }
+  }
+
+  [System.Diagnostics.DebuggerStepThroughAttribute()]
+  [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Runtime.Serialization", "3.0.0.0")]
+  [System.Runtime.Serialization.DataContractAttribute(Name = "ProductDescription", Namespace = "http://schemas.datacontract.org/2004/07/HeuristicLab.Services.Deployment")]
+  public partial class ProductDescription : object, System.Runtime.Serialization.IExtensibleDataObject {
+
+    private System.Runtime.Serialization.ExtensionDataObject extensionDataField;
+
+    private string NameField;
+
+    private HeuristicLab.PluginInfrastructure.Advanced.DeploymentService.PluginDescription[] PluginsField;
+
+    private System.Version VersionField;
+
+    public System.Runtime.Serialization.ExtensionDataObject ExtensionData {
+      get {
+        return this.extensionDataField;
+      }
+      set {
+        this.extensionDataField = value;
+      }
+    }
+
+    [System.Runtime.Serialization.DataMemberAttribute()]
+    public string Name {
+      get {
+        return this.NameField;
+      }
+      set {
+        this.NameField = value;
+      }
+    }
+
+    [System.Runtime.Serialization.DataMemberAttribute()]
+    public HeuristicLab.PluginInfrastructure.Advanced.DeploymentService.PluginDescription[] Plugins {
+      get {
+        return this.PluginsField;
+      }
+      set {
+        this.PluginsField = value;
+      }
+    }
+
+    [System.Runtime.Serialization.DataMemberAttribute()]
+    public System.Version Version {
+      get {
+        return this.VersionField;
+      }
+      set {
+        this.VersionField = value;
+      }
+    }
+  }
+
+  [System.CodeDom.Compiler.GeneratedCodeAttribute("System.ServiceModel", "3.0.0.0")]
+  [System.ServiceModel.ServiceContractAttribute(ConfigurationName = "HeuristicLab.PluginInfrastructure.Advanced.DeploymentService.IUpdate")]
+  public interface IUpdate {
+
+    [System.ServiceModel.OperationContractAttribute(Action = "http://tempuri.org/IUpdate/GetPlugin", ReplyAction = "http://tempuri.org/IUpdate/GetPluginResponse")]
+    byte[] GetPlugin(HeuristicLab.PluginInfrastructure.Advanced.DeploymentService.PluginDescription description);
+
+    [System.ServiceModel.OperationContractAttribute(Action = "http://tempuri.org/IUpdate/GetProducts", ReplyAction = "http://tempuri.org/IUpdate/GetProductsResponse")]
+    HeuristicLab.PluginInfrastructure.Advanced.DeploymentService.ProductDescription[] GetProducts();
+
+    [System.ServiceModel.OperationContractAttribute(Action = "http://tempuri.org/IUpdate/GetPlugins", ReplyAction = "http://tempuri.org/IUpdate/GetPluginsResponse")]
+    HeuristicLab.PluginInfrastructure.Advanced.DeploymentService.PluginDescription[] GetPlugins();
+  }
+
+  [System.CodeDom.Compiler.GeneratedCodeAttribute("System.ServiceModel", "3.0.0.0")]
+  public interface IUpdateChannel : HeuristicLab.PluginInfrastructure.Advanced.DeploymentService.IUpdate, System.ServiceModel.IClientChannel {
+  }
+
+  [System.Diagnostics.DebuggerStepThroughAttribute()]
+  [System.CodeDom.Compiler.GeneratedCodeAttribute("System.ServiceModel", "3.0.0.0")]
+  public partial class UpdateClient : System.ServiceModel.ClientBase<HeuristicLab.PluginInfrastructure.Advanced.DeploymentService.IUpdate>, HeuristicLab.PluginInfrastructure.Advanced.DeploymentService.IUpdate {
+
+    public UpdateClient() {
+    }
+
+    public UpdateClient(string endpointConfigurationName) :
+      base(endpointConfigurationName) {
+    }
+
+    public UpdateClient(string endpointConfigurationName, string remoteAddress) :
+      base(endpointConfigurationName, remoteAddress) {
+    }
+
+    public UpdateClient(string endpointConfigurationName, System.ServiceModel.EndpointAddress remoteAddress) :
+      base(endpointConfigurationName, remoteAddress) {
+    }
+
+    public UpdateClient(System.ServiceModel.Channels.Binding binding, System.ServiceModel.EndpointAddress remoteAddress) :
+      base(binding, remoteAddress) {
+    }
+
+    public byte[] GetPlugin(HeuristicLab.PluginInfrastructure.Advanced.DeploymentService.PluginDescription description) {
+      return base.Channel.GetPlugin(description);
+    }
+
+    public HeuristicLab.PluginInfrastructure.Advanced.DeploymentService.ProductDescription[] GetProducts() {
+      return base.Channel.GetProducts();
+    }
+
+    public HeuristicLab.PluginInfrastructure.Advanced.DeploymentService.PluginDescription[] GetPlugins() {
+      return base.Channel.GetPlugins();
+    }
+  }
+
+  [System.CodeDom.Compiler.GeneratedCodeAttribute("System.ServiceModel", "3.0.0.0")]
+  [System.ServiceModel.ServiceContractAttribute(ConfigurationName = "HeuristicLab.PluginInfrastructure.Advanced.DeploymentService.IAdmin")]
+  public interface IAdmin {
+
+    [System.ServiceModel.OperationContractAttribute(Action = "http://tempuri.org/IAdmin/DeployProduct", ReplyAction = "http://tempuri.org/IAdmin/DeployProductResponse")]
+    void DeployProduct(HeuristicLab.PluginInfrastructure.Advanced.DeploymentService.ProductDescription product);
+
+    [System.ServiceModel.OperationContractAttribute(Action = "http://tempuri.org/IAdmin/DeleteProduct", ReplyAction = "http://tempuri.org/IAdmin/DeleteProductResponse")]
+    void DeleteProduct(HeuristicLab.PluginInfrastructure.Advanced.DeploymentService.ProductDescription product);
+
+    [System.ServiceModel.OperationContractAttribute(Action = "http://tempuri.org/IAdmin/DeployPlugin", ReplyAction = "http://tempuri.org/IAdmin/DeployPluginResponse")]
+    void DeployPlugin(HeuristicLab.PluginInfrastructure.Advanced.DeploymentService.PluginDescription plugin, byte[] zipFile);
+  }
+
+  [System.CodeDom.Compiler.GeneratedCodeAttribute("System.ServiceModel", "3.0.0.0")]
+  public interface IAdminChannel : HeuristicLab.PluginInfrastructure.Advanced.DeploymentService.IAdmin, System.ServiceModel.IClientChannel {
+  }
+
+  [System.Diagnostics.DebuggerStepThroughAttribute()]
+  [System.CodeDom.Compiler.GeneratedCodeAttribute("System.ServiceModel", "3.0.0.0")]
+  public partial class AdminClient : System.ServiceModel.ClientBase<HeuristicLab.PluginInfrastructure.Advanced.DeploymentService.IAdmin>, HeuristicLab.PluginInfrastructure.Advanced.DeploymentService.IAdmin {
+
+    public AdminClient() {
+    }
+
+    public AdminClient(string endpointConfigurationName) :
+      base(endpointConfigurationName) {
+    }
+
+    public AdminClient(string endpointConfigurationName, string remoteAddress) :
+      base(endpointConfigurationName, remoteAddress) {
+    }
+
+    public AdminClient(string endpointConfigurationName, System.ServiceModel.EndpointAddress remoteAddress) :
+      base(endpointConfigurationName, remoteAddress) {
+    }
+
+    public AdminClient(System.ServiceModel.Channels.Binding binding, System.ServiceModel.EndpointAddress remoteAddress) :
+      base(binding, remoteAddress) {
+    }
+
+    public void DeployProduct(HeuristicLab.PluginInfrastructure.Advanced.DeploymentService.ProductDescription product) {
+      base.Channel.DeployProduct(product);
+    }
+
+    public void DeleteProduct(HeuristicLab.PluginInfrastructure.Advanced.DeploymentService.ProductDescription product) {
+      base.Channel.DeleteProduct(product);
+    }
+
+    public void DeployPlugin(HeuristicLab.PluginInfrastructure.Advanced.DeploymentService.PluginDescription plugin, byte[] zipFile) {
+      base.Channel.DeployPlugin(plugin, zipFile);
+    }
+  }
 }
Index: /trunk/sources/HeuristicLab.PluginInfrastructure/3.3/Advanced/DeploymentService/PluginDescription.cs
===================================================================
--- /trunk/sources/HeuristicLab.PluginInfrastructure/3.3/Advanced/DeploymentService/PluginDescription.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.PluginInfrastructure/3.3/Advanced/DeploymentService/PluginDescription.cs	(revision 4068)
@@ -23,9 +23,4 @@
 using System.Collections.Generic;
 using System.Linq;
-using System.Text;
-using HeuristicLab.PluginInfrastructure.Manager;
-using System.IO;
-using System.ComponentModel;
-using System.Reflection;
 
 namespace HeuristicLab.PluginInfrastructure.Advanced.DeploymentService {
Index: /trunk/sources/HeuristicLab.PluginInfrastructure/3.3/Advanced/DeploymentService/ProductDescription.cs
===================================================================
--- /trunk/sources/HeuristicLab.PluginInfrastructure/3.3/Advanced/DeploymentService/ProductDescription.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.PluginInfrastructure/3.3/Advanced/DeploymentService/ProductDescription.cs	(revision 4068)
@@ -23,9 +23,4 @@
 using System.Collections.Generic;
 using System.Linq;
-using System.Text;
-using HeuristicLab.PluginInfrastructure.Manager;
-using System.IO;
-using System.ComponentModel;
-using System.Reflection;
 
 namespace HeuristicLab.PluginInfrastructure.Advanced.DeploymentService {
@@ -35,5 +30,5 @@
   /// A product has a name, a version and a list of plugins that are part of the product.
   /// </summary>
-  public partial class ProductDescription  {
+  public partial class ProductDescription {
     /// <summary>
     /// Initializes a new instance of <see cref="ProductDescription" />
Index: /trunk/sources/HeuristicLab.PluginInfrastructure/3.3/Advanced/DeploymentService/UpdateClientFactory.cs
===================================================================
--- /trunk/sources/HeuristicLab.PluginInfrastructure/3.3/Advanced/DeploymentService/UpdateClientFactory.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.PluginInfrastructure/3.3/Advanced/DeploymentService/UpdateClientFactory.cs	(revision 4068)
@@ -20,11 +20,7 @@
 #endregion
 
-using System;
-using System.Collections.Generic;
-using System.Linq;
-using System.Text;
+using System.Reflection;
+using System.Security.Cryptography.X509Certificates;
 using System.ServiceModel;
-using System.Security.Cryptography.X509Certificates;
-using System.Reflection;
 
 namespace HeuristicLab.PluginInfrastructure.Advanced.DeploymentService {
Index: /trunk/sources/HeuristicLab.PluginInfrastructure/3.3/Advanced/EditProductsView.cs
===================================================================
--- /trunk/sources/HeuristicLab.PluginInfrastructure/3.3/Advanced/EditProductsView.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.PluginInfrastructure/3.3/Advanced/EditProductsView.cs	(revision 4068)
@@ -23,11 +23,7 @@
 using System.Collections.Generic;
 using System.ComponentModel;
-using System.Drawing;
-using System.Data;
 using System.Linq;
-using System.Text;
+using System.ServiceModel;
 using System.Windows.Forms;
-using System.ServiceModel;
-using HeuristicLab.PluginInfrastructure;
 
 namespace HeuristicLab.PluginInfrastructure.Advanced {
Index: /trunk/sources/HeuristicLab.PluginInfrastructure/3.3/Advanced/IStatusDisplay.cs
===================================================================
--- /trunk/sources/HeuristicLab.PluginInfrastructure/3.3/Advanced/IStatusDisplay.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.PluginInfrastructure/3.3/Advanced/IStatusDisplay.cs	(revision 4068)
@@ -20,14 +20,4 @@
 #endregion
 
-using System;
-using System.Collections.Generic;
-using System.Linq;
-using System.Text;
-using HeuristicLab.PluginInfrastructure.Manager;
-using System.IO;
-using System.ComponentModel;
-using System.Reflection;
-using ICSharpCode.SharpZipLib.Zip;
-using System.ServiceModel;
 
 namespace HeuristicLab.PluginInfrastructure.Advanced {
Index: /trunk/sources/HeuristicLab.PluginInfrastructure/3.3/Advanced/InstallationManager.cs
===================================================================
--- /trunk/sources/HeuristicLab.PluginInfrastructure/3.3/Advanced/InstallationManager.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.PluginInfrastructure/3.3/Advanced/InstallationManager.cs	(revision 4068)
@@ -22,12 +22,9 @@
 using System;
 using System.Collections.Generic;
+using System.IO;
 using System.Linq;
-using System.Text;
+using System.ServiceModel;
 using HeuristicLab.PluginInfrastructure.Manager;
-using System.IO;
-using System.ComponentModel;
-using System.Reflection;
 using ICSharpCode.SharpZipLib.Zip;
-using System.ServiceModel;
 
 namespace HeuristicLab.PluginInfrastructure.Advanced {
Index: /trunk/sources/HeuristicLab.PluginInfrastructure/3.3/Advanced/InstallationManagerConsole.cs
===================================================================
--- /trunk/sources/HeuristicLab.PluginInfrastructure/3.3/Advanced/InstallationManagerConsole.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.PluginInfrastructure/3.3/Advanced/InstallationManagerConsole.cs	(revision 4068)
@@ -22,10 +22,6 @@
 using System;
 using System.Collections.Generic;
-using System.Linq;
-using System.Text;
+using HeuristicLab.PluginInfrastructure.Advanced.DeploymentService;
 using HeuristicLab.PluginInfrastructure.Manager;
-using System.IO;
-using System.ComponentModel;
-using HeuristicLab.PluginInfrastructure.Advanced.DeploymentService;
 
 
Index: /trunk/sources/HeuristicLab.PluginInfrastructure/3.3/Advanced/InstallationManagerControl.cs
===================================================================
--- /trunk/sources/HeuristicLab.PluginInfrastructure/3.3/Advanced/InstallationManagerControl.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.PluginInfrastructure/3.3/Advanced/InstallationManagerControl.cs	(revision 4068)
@@ -19,11 +19,4 @@
  */
 #endregion
-using System;
-using System.Collections.Generic;
-using System.ComponentModel;
-using System.Drawing;
-using System.Data;
-using System.Linq;
-using System.Text;
 using System.Windows.Forms;
 
Index: /trunk/sources/HeuristicLab.PluginInfrastructure/3.3/Advanced/InstallationManagerException.cs
===================================================================
--- /trunk/sources/HeuristicLab.PluginInfrastructure/3.3/Advanced/InstallationManagerException.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.PluginInfrastructure/3.3/Advanced/InstallationManagerException.cs	(revision 4068)
@@ -21,13 +21,4 @@
 
 using System;
-using System.Collections.Generic;
-using System.Linq;
-using System.Text;
-using HeuristicLab.PluginInfrastructure.Manager;
-using System.IO;
-using System.ComponentModel;
-using System.Reflection;
-using ICSharpCode.SharpZipLib.Zip;
-using System.ServiceModel;
 using System.Runtime.Serialization;
 
Index: /trunk/sources/HeuristicLab.PluginInfrastructure/3.3/Advanced/InstallationManagerForm.cs
===================================================================
--- /trunk/sources/HeuristicLab.PluginInfrastructure/3.3/Advanced/InstallationManagerForm.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.PluginInfrastructure/3.3/Advanced/InstallationManagerForm.cs	(revision 4068)
@@ -22,12 +22,10 @@
 using System.Collections.Generic;
 using System.ComponentModel;
-using System.Data;
-using System.Drawing;
+using System.Diagnostics;
+using System.IO;
 using System.Linq;
 using System.Text;
 using System.Windows.Forms;
-using System.IO;
 using HeuristicLab.PluginInfrastructure.Manager;
-using System.Diagnostics;
 
 namespace HeuristicLab.PluginInfrastructure.Advanced {
@@ -37,9 +35,10 @@
     private string pluginDir;
 
-    public InstallationManagerForm(PluginManager pluginManager) : base() {
+    public InstallationManagerForm(PluginManager pluginManager)
+      : base() {
       InitializeComponent();
       FileVersionInfo pluginInfrastructureVersion = FileVersionInfo.GetVersionInfo(GetType().Assembly.Location);
       Text = "HeuristicLab Plugin Manager " + pluginInfrastructureVersion.FileVersion;
-      
+
       this.pluginManager = pluginManager;
 
@@ -82,5 +81,5 @@
       pluginEditor.PluginManager = pluginManager;
 
-      productEditor.StatusView = this;      
+      productEditor.StatusView = this;
     }
 
Index: /trunk/sources/HeuristicLab.PluginInfrastructure/3.3/Advanced/InstalledPluginsView.cs
===================================================================
--- /trunk/sources/HeuristicLab.PluginInfrastructure/3.3/Advanced/InstalledPluginsView.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.PluginInfrastructure/3.3/Advanced/InstalledPluginsView.cs	(revision 4068)
@@ -23,12 +23,6 @@
 using System.Collections.Generic;
 using System.ComponentModel;
-using System.Drawing;
-using System.Data;
 using System.Linq;
-using System.Text;
 using System.Windows.Forms;
-using System.ServiceModel;
-using ICSharpCode.SharpZipLib.Zip;
-using System.IO;
 using HeuristicLab.PluginInfrastructure.Manager;
 
Index: /trunk/sources/HeuristicLab.PluginInfrastructure/3.3/Advanced/LicenseConfirmationDialog.cs
===================================================================
--- /trunk/sources/HeuristicLab.PluginInfrastructure/3.3/Advanced/LicenseConfirmationDialog.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.PluginInfrastructure/3.3/Advanced/LicenseConfirmationDialog.cs	(revision 4068)
@@ -20,19 +20,15 @@
 #endregion
 using System;
-using System.Collections.Generic;
-using System.ComponentModel;
-using System.Data;
-using System.Drawing;
-using System.Linq;
-using System.Text;
 using System.Windows.Forms;
 
 namespace HeuristicLab.PluginInfrastructure.Advanced {
   internal partial class LicenseConfirmationDialog : Form {
-    public LicenseConfirmationDialog() : base() {
+    public LicenseConfirmationDialog()
+      : base() {
       InitializeComponent();
     }
 
-    public LicenseConfirmationDialog(IPluginDescription plugin) : base() {
+    public LicenseConfirmationDialog(IPluginDescription plugin)
+      : base() {
       InitializeComponent();
       richTextBox.Text = plugin.LicenseText;
Index: /trunk/sources/HeuristicLab.PluginInfrastructure/3.3/Advanced/LicenseView.cs
===================================================================
--- /trunk/sources/HeuristicLab.PluginInfrastructure/3.3/Advanced/LicenseView.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.PluginInfrastructure/3.3/Advanced/LicenseView.cs	(revision 4068)
@@ -19,23 +19,17 @@
  */
 #endregion
-using System;
-using System.Collections.Generic;
-using System.ComponentModel;
-using System.Drawing;
-using System.Data;
-using System.Linq;
-using System.Text;
 using System.Windows.Forms;
-using HeuristicLab.PluginInfrastructure;
 
 namespace HeuristicLab.PluginInfrastructure.Advanced {
   internal partial class LicenseView : Form {
 
-    public LicenseView() : base() {
+    public LicenseView()
+      : base() {
       InitializeComponent();
       Name = "License";
     }
 
-    public LicenseView(IPluginDescription plugin) : base() {
+    public LicenseView(IPluginDescription plugin)
+      : base() {
       InitializeComponent();
       Name = "License of: " + plugin;
Index: /trunk/sources/HeuristicLab.PluginInfrastructure/3.3/Advanced/MultiSelectListView.cs
===================================================================
--- /trunk/sources/HeuristicLab.PluginInfrastructure/3.3/Advanced/MultiSelectListView.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.PluginInfrastructure/3.3/Advanced/MultiSelectListView.cs	(revision 4068)
@@ -19,11 +19,6 @@
  */
 #endregion
-using System;
 using System.Collections.Generic;
-using System.ComponentModel;
-using System.Drawing;
-using System.Data;
 using System.Linq;
-using System.Text;
 using System.Windows.Forms;
 
Index: /trunk/sources/HeuristicLab.PluginInfrastructure/3.3/Advanced/PluginView.cs
===================================================================
--- /trunk/sources/HeuristicLab.PluginInfrastructure/3.3/Advanced/PluginView.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.PluginInfrastructure/3.3/Advanced/PluginView.cs	(revision 4068)
@@ -20,13 +20,7 @@
 #endregion
 using System;
-using System.Collections.Generic;
-using System.ComponentModel;
-using System.Drawing;
-using System.Data;
+using System.IO;
 using System.Linq;
-using System.Text;
 using System.Windows.Forms;
-using HeuristicLab.PluginInfrastructure;
-using System.IO;
 using HeuristicLab.PluginInfrastructure.Manager;
 
Index: /trunk/sources/HeuristicLab.PluginInfrastructure/3.3/Advanced/UploadPluginsView.cs
===================================================================
--- /trunk/sources/HeuristicLab.PluginInfrastructure/3.3/Advanced/UploadPluginsView.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.PluginInfrastructure/3.3/Advanced/UploadPluginsView.cs	(revision 4068)
@@ -24,12 +24,10 @@
 using System.ComponentModel;
 using System.Drawing;
-using System.Data;
+using System.IO;
 using System.Linq;
-using System.Text;
+using System.ServiceModel;
 using System.Windows.Forms;
-using System.ServiceModel;
+using HeuristicLab.PluginInfrastructure.Manager;
 using ICSharpCode.SharpZipLib.Zip;
-using System.IO;
-using HeuristicLab.PluginInfrastructure.Manager;
 
 namespace HeuristicLab.PluginInfrastructure.Advanced {
Index: /trunk/sources/HeuristicLab.PluginInfrastructure/3.3/Advanced/Util.cs
===================================================================
--- /trunk/sources/HeuristicLab.PluginInfrastructure/3.3/Advanced/Util.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.PluginInfrastructure/3.3/Advanced/Util.cs	(revision 4068)
@@ -23,11 +23,4 @@
 using System.Collections.Generic;
 using System.Linq;
-using System.Text;
-using HeuristicLab.PluginInfrastructure.Manager;
-using System.IO;
-using System.ComponentModel;
-using System.Reflection;
-using ICSharpCode.SharpZipLib.Zip;
-using System.ServiceModel;
 using System.Windows.Forms;
 
@@ -39,5 +32,5 @@
       columnHeader.AutoResize(ColumnHeaderAutoResizeStyle.ColumnContent);
       int contentSize = columnHeader.Width;
-      columnHeader.Width = Math.Max(headerSize, contentSize);      
+      columnHeader.Width = Math.Max(headerSize, contentSize);
     }
 
Index: /trunk/sources/HeuristicLab.PluginInfrastructure/3.3/ApplicationManager.cs
===================================================================
--- /trunk/sources/HeuristicLab.PluginInfrastructure/3.3/ApplicationManager.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.PluginInfrastructure/3.3/ApplicationManager.cs	(revision 4068)
@@ -21,13 +21,4 @@
 
 using System;
-using System.Collections.Generic;
-using System.Security.Policy;
-using System.Reflection;
-using System.Diagnostics;
-using System.Security.Permissions;
-using System.Security;
-using System.Linq;
-using HeuristicLab.PluginInfrastructure.Manager;
-using System.IO;
 
 namespace HeuristicLab.PluginInfrastructure {
Index: /trunk/sources/HeuristicLab.PluginInfrastructure/3.3/Attributes/ApplicationAttribute.cs
===================================================================
--- /trunk/sources/HeuristicLab.PluginInfrastructure/3.3/Attributes/ApplicationAttribute.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.PluginInfrastructure/3.3/Attributes/ApplicationAttribute.cs	(revision 4068)
@@ -21,6 +21,4 @@
 
 using System;
-using System.Collections.Generic;
-using System.Text;
 
 namespace HeuristicLab.PluginInfrastructure {
Index: /trunk/sources/HeuristicLab.PluginInfrastructure/3.3/Attributes/AssemblyBuildDateAttribute.cs
===================================================================
--- /trunk/sources/HeuristicLab.PluginInfrastructure/3.3/Attributes/AssemblyBuildDateAttribute.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.PluginInfrastructure/3.3/Attributes/AssemblyBuildDateAttribute.cs	(revision 4068)
@@ -21,7 +21,4 @@
 
 using System;
-using System.Collections.Generic;
-using System.Text;
-using System.Globalization;
 
 namespace HeuristicLab.PluginInfrastructure {
Index: /trunk/sources/HeuristicLab.PluginInfrastructure/3.3/Attributes/ContactInformationAttribute.cs
===================================================================
--- /trunk/sources/HeuristicLab.PluginInfrastructure/3.3/Attributes/ContactInformationAttribute.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.PluginInfrastructure/3.3/Attributes/ContactInformationAttribute.cs	(revision 4068)
@@ -21,7 +21,4 @@
 
 using System;
-using System.Collections.Generic;
-using System.Text;
-using System.IO;
 
 namespace HeuristicLab.PluginInfrastructure {
Index: /trunk/sources/HeuristicLab.PluginInfrastructure/3.3/Attributes/PluginAttribute.cs
===================================================================
--- /trunk/sources/HeuristicLab.PluginInfrastructure/3.3/Attributes/PluginAttribute.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.PluginInfrastructure/3.3/Attributes/PluginAttribute.cs	(revision 4068)
@@ -21,6 +21,4 @@
 
 using System;
-using System.Collections.Generic;
-using System.Text;
 
 namespace HeuristicLab.PluginInfrastructure {
Index: /trunk/sources/HeuristicLab.PluginInfrastructure/3.3/Attributes/PluginDependencyAttribute.cs
===================================================================
--- /trunk/sources/HeuristicLab.PluginInfrastructure/3.3/Attributes/PluginDependencyAttribute.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.PluginInfrastructure/3.3/Attributes/PluginDependencyAttribute.cs	(revision 4068)
@@ -21,6 +21,4 @@
 
 using System;
-using System.Collections.Generic;
-using System.Text;
 
 namespace HeuristicLab.PluginInfrastructure {
Index: /trunk/sources/HeuristicLab.PluginInfrastructure/3.3/Attributes/PluginFileAttribute.cs
===================================================================
--- /trunk/sources/HeuristicLab.PluginInfrastructure/3.3/Attributes/PluginFileAttribute.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.PluginInfrastructure/3.3/Attributes/PluginFileAttribute.cs	(revision 4068)
@@ -21,7 +21,4 @@
 
 using System;
-using System.Collections.Generic;
-using System.Text;
-using System.IO;
 
 namespace HeuristicLab.PluginInfrastructure {
Index: /trunk/sources/HeuristicLab.PluginInfrastructure/3.3/BaseClasses/ApplicationBase.cs
===================================================================
--- /trunk/sources/HeuristicLab.PluginInfrastructure/3.3/BaseClasses/ApplicationBase.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.PluginInfrastructure/3.3/BaseClasses/ApplicationBase.cs	(revision 4068)
@@ -20,8 +20,4 @@
 #endregion
 
-using System;
-using System.Collections.Generic;
-using System.Text;
-using System.Diagnostics;
 
 namespace HeuristicLab.PluginInfrastructure {
Index: /trunk/sources/HeuristicLab.PluginInfrastructure/3.3/BaseClasses/PluginBase.cs
===================================================================
--- /trunk/sources/HeuristicLab.PluginInfrastructure/3.3/BaseClasses/PluginBase.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.PluginInfrastructure/3.3/BaseClasses/PluginBase.cs	(revision 4068)
@@ -20,10 +20,4 @@
 #endregion
 
-using System;
-using System.Collections.Generic;
-using System.Text;
-using System.Reflection;
-using System.Diagnostics;
-using System.Linq;
 
 namespace HeuristicLab.PluginInfrastructure {
Index: /trunk/sources/HeuristicLab.PluginInfrastructure/3.3/ControlManager.cs
===================================================================
--- /trunk/sources/HeuristicLab.PluginInfrastructure/3.3/ControlManager.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.PluginInfrastructure/3.3/ControlManager.cs	(revision 4068)
@@ -21,10 +21,4 @@
 
 using System;
-using System.Collections.Generic;
-using System.Security.Policy;
-using System.Reflection;
-using System.Diagnostics;
-using System.Security.Permissions;
-using System.Security;
 
 namespace HeuristicLab.PluginInfrastructure {
Index: /trunk/sources/HeuristicLab.PluginInfrastructure/3.3/DefaultApplicationManager.cs
===================================================================
--- /trunk/sources/HeuristicLab.PluginInfrastructure/3.3/DefaultApplicationManager.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.PluginInfrastructure/3.3/DefaultApplicationManager.cs	(revision 4068)
@@ -22,12 +22,8 @@
 using System;
 using System.Collections.Generic;
-using System.Security.Policy;
+using System.IO;
+using System.Linq;
 using System.Reflection;
-using System.Diagnostics;
-using System.Security.Permissions;
-using System.Security;
-using System.Linq;
 using HeuristicLab.PluginInfrastructure.Manager;
-using System.IO;
 
 namespace HeuristicLab.PluginInfrastructure {
@@ -252,5 +248,6 @@
           if (type.IsAssignableFrom(other.GetGenericTypeDefinition().MakeGenericType(type.GetGenericArguments())))
             return true;
-        } catch (Exception) { }
+        }
+        catch (Exception) { }
       }
       return false;
Index: /trunk/sources/HeuristicLab.PluginInfrastructure/3.3/Interfaces/IApplication.cs
===================================================================
--- /trunk/sources/HeuristicLab.PluginInfrastructure/3.3/Interfaces/IApplication.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.PluginInfrastructure/3.3/Interfaces/IApplication.cs	(revision 4068)
@@ -20,7 +20,4 @@
 #endregion
 
-using System;
-using System.Collections.Generic;
-using System.Text;
 
 namespace HeuristicLab.PluginInfrastructure {
Index: /trunk/sources/HeuristicLab.PluginInfrastructure/3.3/Interfaces/IApplicationDescription.cs
===================================================================
--- /trunk/sources/HeuristicLab.PluginInfrastructure/3.3/Interfaces/IApplicationDescription.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.PluginInfrastructure/3.3/Interfaces/IApplicationDescription.cs	(revision 4068)
@@ -20,6 +20,4 @@
 #endregion
 
-using System;
-using System.Collections.Generic;
 
 namespace HeuristicLab.PluginInfrastructure {
Index: /trunk/sources/HeuristicLab.PluginInfrastructure/3.3/Interfaces/IApplicationManager.cs
===================================================================
--- /trunk/sources/HeuristicLab.PluginInfrastructure/3.3/Interfaces/IApplicationManager.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.PluginInfrastructure/3.3/Interfaces/IApplicationManager.cs	(revision 4068)
@@ -22,7 +22,4 @@
 using System;
 using System.Collections.Generic;
-using System.Text;
-using System.Windows.Forms;
-using System.Reflection;
 
 namespace HeuristicLab.PluginInfrastructure {
Index: /trunk/sources/HeuristicLab.PluginInfrastructure/3.3/Interfaces/IControlManager.cs
===================================================================
--- /trunk/sources/HeuristicLab.PluginInfrastructure/3.3/Interfaces/IControlManager.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.PluginInfrastructure/3.3/Interfaces/IControlManager.cs	(revision 4068)
@@ -20,8 +20,4 @@
 #endregion
 
-using System;
-using System.Collections.Generic;
-using System.Text;
-using System.Windows.Forms;
 
 namespace HeuristicLab.PluginInfrastructure {
Index: /trunk/sources/HeuristicLab.PluginInfrastructure/3.3/Interfaces/IPlugin.cs
===================================================================
--- /trunk/sources/HeuristicLab.PluginInfrastructure/3.3/Interfaces/IPlugin.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.PluginInfrastructure/3.3/Interfaces/IPlugin.cs	(revision 4068)
@@ -20,7 +20,4 @@
 #endregion
 
-using System;
-using System.Collections.Generic;
-using System.Text;
 
 namespace HeuristicLab.PluginInfrastructure {
Index: /trunk/sources/HeuristicLab.PluginInfrastructure/3.3/Interfaces/IPluginFile.cs
===================================================================
--- /trunk/sources/HeuristicLab.PluginInfrastructure/3.3/Interfaces/IPluginFile.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.PluginInfrastructure/3.3/Interfaces/IPluginFile.cs	(revision 4068)
@@ -20,6 +20,4 @@
 #endregion
 
-using System;
-using System.Collections.Generic;
 
 namespace HeuristicLab.PluginInfrastructure {
Index: /trunk/sources/HeuristicLab.PluginInfrastructure/3.3/InvalidPluginException.cs
===================================================================
--- /trunk/sources/HeuristicLab.PluginInfrastructure/3.3/InvalidPluginException.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.PluginInfrastructure/3.3/InvalidPluginException.cs	(revision 4068)
@@ -21,6 +21,4 @@
 
 using System;
-using System.Collections.Generic;
-using System.Text;
 using System.Runtime.Serialization;
 
Index: /trunk/sources/HeuristicLab.PluginInfrastructure/3.3/LightweightApplicationManager.cs
===================================================================
--- /trunk/sources/HeuristicLab.PluginInfrastructure/3.3/LightweightApplicationManager.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.PluginInfrastructure/3.3/LightweightApplicationManager.cs	(revision 4068)
@@ -22,12 +22,6 @@
 using System;
 using System.Collections.Generic;
-using System.Security.Policy;
+using System.Linq;
 using System.Reflection;
-using System.Diagnostics;
-using System.Security.Permissions;
-using System.Security;
-using System.Linq;
-using HeuristicLab.PluginInfrastructure.Manager;
-using System.IO;
 
 namespace HeuristicLab.PluginInfrastructure {
Index: /trunk/sources/HeuristicLab.PluginInfrastructure/3.3/Main.cs
===================================================================
--- /trunk/sources/HeuristicLab.PluginInfrastructure/3.3/Main.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.PluginInfrastructure/3.3/Main.cs	(revision 4068)
@@ -22,9 +22,5 @@
 using System;
 using System.Windows.Forms;
-using System.Text;
-using System.Linq;
 using HeuristicLab.PluginInfrastructure.Starter;
-using System.IO;
-using HeuristicLab.PluginInfrastructure.Advanced;
 
 namespace HeuristicLab.PluginInfrastructure {
Index: /trunk/sources/HeuristicLab.PluginInfrastructure/3.3/Manager/ApplicationDescription.cs
===================================================================
--- /trunk/sources/HeuristicLab.PluginInfrastructure/3.3/Manager/ApplicationDescription.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.PluginInfrastructure/3.3/Manager/ApplicationDescription.cs	(revision 4068)
@@ -21,6 +21,4 @@
 
 using System;
-using System.Collections.Generic;
-using System.Text;
 
 namespace HeuristicLab.PluginInfrastructure.Manager {
Index: /trunk/sources/HeuristicLab.PluginInfrastructure/3.3/Manager/PluginDescription.cs
===================================================================
--- /trunk/sources/HeuristicLab.PluginInfrastructure/3.3/Manager/PluginDescription.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.PluginInfrastructure/3.3/Manager/PluginDescription.cs	(revision 4068)
@@ -22,7 +22,5 @@
 using System;
 using System.Collections.Generic;
-using System.Text;
 using System.Linq;
-using System.Reflection;
 
 namespace HeuristicLab.PluginInfrastructure.Manager {
Index: /trunk/sources/HeuristicLab.PluginInfrastructure/3.3/Manager/PluginFile.cs
===================================================================
--- /trunk/sources/HeuristicLab.PluginInfrastructure/3.3/Manager/PluginFile.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.PluginInfrastructure/3.3/Manager/PluginFile.cs	(revision 4068)
@@ -21,8 +21,4 @@
 
 using System;
-using System.Collections.Generic;
-using System.Text;
-using System.Linq;
-using System.Reflection;
 
 namespace HeuristicLab.PluginInfrastructure.Manager {
Index: /trunk/sources/HeuristicLab.PluginInfrastructure/3.3/Manager/PluginInfrastructureCancelEventArgs.cs
===================================================================
--- /trunk/sources/HeuristicLab.PluginInfrastructure/3.3/Manager/PluginInfrastructureCancelEventArgs.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.PluginInfrastructure/3.3/Manager/PluginInfrastructureCancelEventArgs.cs	(revision 4068)
@@ -22,5 +22,4 @@
 using System;
 using System.Collections.Generic;
-using System.Text;
 using System.ComponentModel;
 
Index: /trunk/sources/HeuristicLab.PluginInfrastructure/3.3/Manager/PluginInfrastructureEventArgs.cs
===================================================================
--- /trunk/sources/HeuristicLab.PluginInfrastructure/3.3/Manager/PluginInfrastructureEventArgs.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.PluginInfrastructure/3.3/Manager/PluginInfrastructureEventArgs.cs	(revision 4068)
@@ -21,6 +21,4 @@
 
 using System;
-using System.Collections.Generic;
-using System.Text;
 
 namespace HeuristicLab.PluginInfrastructure.Manager {
Index: /trunk/sources/HeuristicLab.PluginInfrastructure/3.3/Manager/PluginManager.cs
===================================================================
--- /trunk/sources/HeuristicLab.PluginInfrastructure/3.3/Manager/PluginManager.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.PluginInfrastructure/3.3/Manager/PluginManager.cs	(revision 4068)
@@ -22,10 +22,6 @@
 using System;
 using System.Collections.Generic;
-using System.Security.Policy;
+using System.Linq;
 using System.Reflection;
-using System.Diagnostics;
-using System.Security.Permissions;
-using System.Security;
-using System.Linq;
 
 namespace HeuristicLab.PluginInfrastructure.Manager {
Index: /trunk/sources/HeuristicLab.PluginInfrastructure/3.3/Manager/PluginValidator.cs
===================================================================
--- /trunk/sources/HeuristicLab.PluginInfrastructure/3.3/Manager/PluginValidator.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.PluginInfrastructure/3.3/Manager/PluginValidator.cs	(revision 4068)
@@ -22,10 +22,9 @@
 using System;
 using System.Collections.Generic;
+using System.IO;
+using System.Linq;
+using System.Reflection;
+using System.Security;
 using System.Text;
-using System.Reflection;
-using System.IO;
-using System.Diagnostics;
-using System.Linq;
-using System.Security;
 
 
Index: /trunk/sources/HeuristicLab.PluginInfrastructure/3.3/PluginDescriptionIterator.cs
===================================================================
--- /trunk/sources/HeuristicLab.PluginInfrastructure/3.3/PluginDescriptionIterator.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.PluginInfrastructure/3.3/PluginDescriptionIterator.cs	(revision 4068)
@@ -20,7 +20,5 @@
 #endregion
 
-using System;
 using System.Collections.Generic;
-using System.Text;
 using System.Linq;
 
Index: /trunk/sources/HeuristicLab.PluginInfrastructure/3.3/PluginState.cs
===================================================================
--- /trunk/sources/HeuristicLab.PluginInfrastructure/3.3/PluginState.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.PluginInfrastructure/3.3/PluginState.cs	(revision 4068)
@@ -21,6 +21,4 @@
 
 using System;
-using System.Collections.Generic;
-using System.Text;
 
 namespace HeuristicLab.PluginInfrastructure {
@@ -33,13 +31,13 @@
     /// Undefined state is the default plugin state.
     /// </summary>
-    Undefined, 
+    Undefined,
     /// <summary>
     /// Enabled state means that the plugin has correct meta-data and can be loaded.
     /// </summary>
-    Enabled, 
+    Enabled,
     /// <summary>
     /// Disabled state means that the plugin has incorrect meta-data or missing dependencies and cannot be loaded.
     /// </summary>
-    Disabled, 
+    Disabled,
     /// <summary>
     /// Loaded means the plugin is currently loaded by an application.
Index: /trunk/sources/HeuristicLab.PluginInfrastructure/3.3/Resources.Designer.cs
===================================================================
--- /trunk/sources/HeuristicLab.PluginInfrastructure/3.3/Resources.Designer.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.PluginInfrastructure/3.3/Resources.Designer.cs	(revision 4068)
@@ -10,213 +10,212 @@
 
 namespace HeuristicLab.PluginInfrastructure {
-    using System;
-    
-    
+
+
+  /// <summary>
+  ///   A strongly-typed resource class, for looking up localized strings, etc.
+  /// </summary>
+  // This class was auto-generated by the StronglyTypedResourceBuilder
+  // class via a tool like ResGen or Visual Studio.
+  // To add or remove a member, edit your .ResX file then rerun ResGen
+  // with the /str option, or rebuild your VS project.
+  [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "4.0.0.0")]
+  [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
+  [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
+  internal class Resources {
+
+    private static global::System.Resources.ResourceManager resourceMan;
+
+    private static global::System.Globalization.CultureInfo resourceCulture;
+
+    [global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")]
+    internal Resources() {
+    }
+
     /// <summary>
-    ///   A strongly-typed resource class, for looking up localized strings, etc.
+    ///   Returns the cached ResourceManager instance used by this class.
     /// </summary>
-    // This class was auto-generated by the StronglyTypedResourceBuilder
-    // class via a tool like ResGen or Visual Studio.
-    // To add or remove a member, edit your .ResX file then rerun ResGen
-    // with the /str option, or rebuild your VS project.
-    [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "4.0.0.0")]
-    [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
-    [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
-    internal class Resources {
-        
-        private static global::System.Resources.ResourceManager resourceMan;
-        
-        private static global::System.Globalization.CultureInfo resourceCulture;
-        
-        [global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")]
-        internal Resources() {
+    [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
+    internal static global::System.Resources.ResourceManager ResourceManager {
+      get {
+        if (object.ReferenceEquals(resourceMan, null)) {
+          global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("HeuristicLab.PluginInfrastructure.Resources", typeof(Resources).Assembly);
+          resourceMan = temp;
         }
-        
-        /// <summary>
-        ///   Returns the cached ResourceManager instance used by this class.
-        /// </summary>
-        [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
-        internal static global::System.Resources.ResourceManager ResourceManager {
-            get {
-                if (object.ReferenceEquals(resourceMan, null)) {
-                    global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("HeuristicLab.PluginInfrastructure.Resources", typeof(Resources).Assembly);
-                    resourceMan = temp;
-                }
-                return resourceMan;
-            }
-        }
-        
-        /// <summary>
-        ///   Overrides the current thread's CurrentUICulture property for all
-        ///   resource lookups using this strongly typed resource class.
-        /// </summary>
-        [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
-        internal static global::System.Globalization.CultureInfo Culture {
-            get {
-                return resourceCulture;
-            }
-            set {
-                resourceCulture = value;
-            }
-        }
-        
-        internal static System.Drawing.Bitmap Add {
-            get {
-                object obj = ResourceManager.GetObject("Add", resourceCulture);
-                return ((System.Drawing.Bitmap)(obj));
-            }
-        }
-        
-        internal static System.Drawing.Bitmap ArrowUp {
-            get {
-                object obj = ResourceManager.GetObject("ArrowUp", resourceCulture);
-                return ((System.Drawing.Bitmap)(obj));
-            }
-        }
-        
-        internal static System.Drawing.Bitmap Assembly {
-            get {
-                object obj = ResourceManager.GetObject("Assembly", resourceCulture);
-                return ((System.Drawing.Bitmap)(obj));
-            }
-        }
-        
-        internal static System.Drawing.Bitmap Document {
-            get {
-                object obj = ResourceManager.GetObject("Document", resourceCulture);
-                return ((System.Drawing.Bitmap)(obj));
-            }
-        }
-        
-        internal static System.Drawing.Bitmap Error {
-            get {
-                object obj = ResourceManager.GetObject("Error", resourceCulture);
-                return ((System.Drawing.Bitmap)(obj));
-            }
-        }
-        
-        internal static System.Drawing.Icon ErrorIcon {
-            get {
-                object obj = ResourceManager.GetObject("ErrorIcon", resourceCulture);
-                return ((System.Drawing.Icon)(obj));
-            }
-        }
-        
-        internal static System.Drawing.Bitmap File {
-            get {
-                object obj = ResourceManager.GetObject("File", resourceCulture);
-                return ((System.Drawing.Bitmap)(obj));
-            }
-        }
-        
-        internal static System.Drawing.Icon HeuristicLab {
-            get {
-                object obj = ResourceManager.GetObject("HeuristicLab", resourceCulture);
-                return ((System.Drawing.Icon)(obj));
-            }
-        }
-        
-        internal static System.Drawing.Bitmap HeuristicLabBanner {
-            get {
-                object obj = ResourceManager.GetObject("HeuristicLabBanner", resourceCulture);
-                return ((System.Drawing.Bitmap)(obj));
-            }
-        }
-        
-        internal static System.Drawing.Bitmap HeuristicLabLogo {
-            get {
-                object obj = ResourceManager.GetObject("HeuristicLabLogo", resourceCulture);
-                return ((System.Drawing.Bitmap)(obj));
-            }
-        }
-        
-        internal static System.Drawing.Bitmap Install {
-            get {
-                object obj = ResourceManager.GetObject("Install", resourceCulture);
-                return ((System.Drawing.Bitmap)(obj));
-            }
-        }
-        
-        internal static System.Drawing.Bitmap Internet {
-            get {
-                object obj = ResourceManager.GetObject("Internet", resourceCulture);
-                return ((System.Drawing.Bitmap)(obj));
-            }
-        }
-        
-        /// <summary>
-        ///   Looks up a localized string similar to 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 t [rest of string was truncated]&quot;;.
-        /// </summary>
-        internal static string LicenseText {
-            get {
-                return ResourceManager.GetString("LicenseText", resourceCulture);
-            }
-        }
-        
-        internal static System.Drawing.Bitmap NetworkConnections {
-            get {
-                object obj = ResourceManager.GetObject("NetworkConnections", resourceCulture);
-                return ((System.Drawing.Bitmap)(obj));
-            }
-        }
-        
-        internal static System.Drawing.Bitmap Plugin {
-            get {
-                object obj = ResourceManager.GetObject("Plugin", resourceCulture);
-                return ((System.Drawing.Bitmap)(obj));
-            }
-        }
-        
-        internal static System.Drawing.Bitmap PublishToWeb {
-            get {
-                object obj = ResourceManager.GetObject("PublishToWeb", resourceCulture);
-                return ((System.Drawing.Bitmap)(obj));
-            }
-        }
-        
-        internal static System.Drawing.Bitmap Remove {
-            get {
-                object obj = ResourceManager.GetObject("Remove", resourceCulture);
-                return ((System.Drawing.Bitmap)(obj));
-            }
-        }
-        
-        internal static System.Drawing.Bitmap Repeat {
-            get {
-                object obj = ResourceManager.GetObject("Repeat", resourceCulture);
-                return ((System.Drawing.Bitmap)(obj));
-            }
-        }
-        
-        internal static System.Drawing.Icon Setup_Install {
-            get {
-                object obj = ResourceManager.GetObject("Setup_Install", resourceCulture);
-                return ((System.Drawing.Icon)(obj));
-            }
-        }
-        
-        internal static System.Drawing.Bitmap ShowDetails {
-            get {
-                object obj = ResourceManager.GetObject("ShowDetails", resourceCulture);
-                return ((System.Drawing.Bitmap)(obj));
-            }
-        }
-        
-        internal static System.Drawing.Bitmap ShowIcons {
-            get {
-                object obj = ResourceManager.GetObject("ShowIcons", resourceCulture);
-                return ((System.Drawing.Bitmap)(obj));
-            }
-        }
-    }
+        return resourceMan;
+      }
+    }
+
+    /// <summary>
+    ///   Overrides the current thread's CurrentUICulture property for all
+    ///   resource lookups using this strongly typed resource class.
+    /// </summary>
+    [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
+    internal static global::System.Globalization.CultureInfo Culture {
+      get {
+        return resourceCulture;
+      }
+      set {
+        resourceCulture = value;
+      }
+    }
+
+    internal static System.Drawing.Bitmap Add {
+      get {
+        object obj = ResourceManager.GetObject("Add", resourceCulture);
+        return ((System.Drawing.Bitmap)(obj));
+      }
+    }
+
+    internal static System.Drawing.Bitmap ArrowUp {
+      get {
+        object obj = ResourceManager.GetObject("ArrowUp", resourceCulture);
+        return ((System.Drawing.Bitmap)(obj));
+      }
+    }
+
+    internal static System.Drawing.Bitmap Assembly {
+      get {
+        object obj = ResourceManager.GetObject("Assembly", resourceCulture);
+        return ((System.Drawing.Bitmap)(obj));
+      }
+    }
+
+    internal static System.Drawing.Bitmap Document {
+      get {
+        object obj = ResourceManager.GetObject("Document", resourceCulture);
+        return ((System.Drawing.Bitmap)(obj));
+      }
+    }
+
+    internal static System.Drawing.Bitmap Error {
+      get {
+        object obj = ResourceManager.GetObject("Error", resourceCulture);
+        return ((System.Drawing.Bitmap)(obj));
+      }
+    }
+
+    internal static System.Drawing.Icon ErrorIcon {
+      get {
+        object obj = ResourceManager.GetObject("ErrorIcon", resourceCulture);
+        return ((System.Drawing.Icon)(obj));
+      }
+    }
+
+    internal static System.Drawing.Bitmap File {
+      get {
+        object obj = ResourceManager.GetObject("File", resourceCulture);
+        return ((System.Drawing.Bitmap)(obj));
+      }
+    }
+
+    internal static System.Drawing.Icon HeuristicLab {
+      get {
+        object obj = ResourceManager.GetObject("HeuristicLab", resourceCulture);
+        return ((System.Drawing.Icon)(obj));
+      }
+    }
+
+    internal static System.Drawing.Bitmap HeuristicLabBanner {
+      get {
+        object obj = ResourceManager.GetObject("HeuristicLabBanner", resourceCulture);
+        return ((System.Drawing.Bitmap)(obj));
+      }
+    }
+
+    internal static System.Drawing.Bitmap HeuristicLabLogo {
+      get {
+        object obj = ResourceManager.GetObject("HeuristicLabLogo", resourceCulture);
+        return ((System.Drawing.Bitmap)(obj));
+      }
+    }
+
+    internal static System.Drawing.Bitmap Install {
+      get {
+        object obj = ResourceManager.GetObject("Install", resourceCulture);
+        return ((System.Drawing.Bitmap)(obj));
+      }
+    }
+
+    internal static System.Drawing.Bitmap Internet {
+      get {
+        object obj = ResourceManager.GetObject("Internet", resourceCulture);
+        return ((System.Drawing.Bitmap)(obj));
+      }
+    }
+
+    /// <summary>
+    ///   Looks up a localized string similar to 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 t [rest of string was truncated]&quot;;.
+    /// </summary>
+    internal static string LicenseText {
+      get {
+        return ResourceManager.GetString("LicenseText", resourceCulture);
+      }
+    }
+
+    internal static System.Drawing.Bitmap NetworkConnections {
+      get {
+        object obj = ResourceManager.GetObject("NetworkConnections", resourceCulture);
+        return ((System.Drawing.Bitmap)(obj));
+      }
+    }
+
+    internal static System.Drawing.Bitmap Plugin {
+      get {
+        object obj = ResourceManager.GetObject("Plugin", resourceCulture);
+        return ((System.Drawing.Bitmap)(obj));
+      }
+    }
+
+    internal static System.Drawing.Bitmap PublishToWeb {
+      get {
+        object obj = ResourceManager.GetObject("PublishToWeb", resourceCulture);
+        return ((System.Drawing.Bitmap)(obj));
+      }
+    }
+
+    internal static System.Drawing.Bitmap Remove {
+      get {
+        object obj = ResourceManager.GetObject("Remove", resourceCulture);
+        return ((System.Drawing.Bitmap)(obj));
+      }
+    }
+
+    internal static System.Drawing.Bitmap Repeat {
+      get {
+        object obj = ResourceManager.GetObject("Repeat", resourceCulture);
+        return ((System.Drawing.Bitmap)(obj));
+      }
+    }
+
+    internal static System.Drawing.Icon Setup_Install {
+      get {
+        object obj = ResourceManager.GetObject("Setup_Install", resourceCulture);
+        return ((System.Drawing.Icon)(obj));
+      }
+    }
+
+    internal static System.Drawing.Bitmap ShowDetails {
+      get {
+        object obj = ResourceManager.GetObject("ShowDetails", resourceCulture);
+        return ((System.Drawing.Bitmap)(obj));
+      }
+    }
+
+    internal static System.Drawing.Bitmap ShowIcons {
+      get {
+        object obj = ResourceManager.GetObject("ShowIcons", resourceCulture);
+        return ((System.Drawing.Bitmap)(obj));
+      }
+    }
+  }
 }
Index: /trunk/sources/HeuristicLab.PluginInfrastructure/3.3/Sandboxing/SandboxManager.cs
===================================================================
--- /trunk/sources/HeuristicLab.PluginInfrastructure/3.3/Sandboxing/SandboxManager.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.PluginInfrastructure/3.3/Sandboxing/SandboxManager.cs	(revision 4068)
@@ -22,14 +22,11 @@
 using System;
 using System.Collections.Generic;
+using System.Diagnostics;
 using System.Linq;
-using System.Text;
-using HeuristicLab.PluginInfrastructure.Manager;
-using System.IO;
-using System.ComponentModel;
+using System.Reflection;
 using System.Security;
 using System.Security.Permissions;
 using System.Security.Policy;
-using System.Reflection;
-using System.Diagnostics;
+using HeuristicLab.PluginInfrastructure.Manager;
 
 namespace HeuristicLab.PluginInfrastructure.Sandboxing {
@@ -94,5 +91,5 @@
       applicationManager.PrepareApplicationDomain(apps, plugins);
       //if (files != null && files.Count() > 0)
-        //applicationManager.LoadAssemblies(files);
+      //applicationManager.LoadAssemblies(files);
       return applicationDomain;
     }
Index: /trunk/sources/HeuristicLab.PluginInfrastructure/3.3/Starter/AboutDialog.cs
===================================================================
--- /trunk/sources/HeuristicLab.PluginInfrastructure/3.3/Starter/AboutDialog.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.PluginInfrastructure/3.3/Starter/AboutDialog.cs	(revision 4068)
@@ -22,12 +22,8 @@
 using System;
 using System.Collections.Generic;
-using System.ComponentModel;
-using System.Data;
-using System.Drawing;
+using System.Diagnostics;
 using System.Linq;
-using System.Text;
+using System.Reflection;
 using System.Windows.Forms;
-using System.Reflection;
-using System.Diagnostics;
 using HeuristicLab.PluginInfrastructure.Advanced;
 
@@ -57,5 +53,6 @@
     /// </summary>
     /// <param name="plugins">Enumerable of plugins that should be listed.</param>
-    public AboutDialog(IEnumerable<IPluginDescription> plugins) : this() {
+    public AboutDialog(IEnumerable<IPluginDescription> plugins)
+      : this() {
       UpdatePluginList(plugins);
     }
@@ -101,5 +98,5 @@
 
     private void pluginListView_ItemActivate(object sender, EventArgs e) {
-      if(pluginListView.SelectedItems.Count > 0) {
+      if (pluginListView.SelectedItems.Count > 0) {
         PluginView view = new PluginView((IPluginDescription)pluginListView.SelectedItems[0].Tag);
         view.Show(this);
Index: /trunk/sources/HeuristicLab.PluginInfrastructure/3.3/Starter/SplashScreen.Designer.cs
===================================================================
--- /trunk/sources/HeuristicLab.PluginInfrastructure/3.3/Starter/SplashScreen.Designer.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.PluginInfrastructure/3.3/Starter/SplashScreen.Designer.cs	(revision 4068)
@@ -20,5 +20,4 @@
 #endregion
 
-using HeuristicLab.PluginInfrastructure;
 namespace HeuristicLab.PluginInfrastructure.Starter {
   partial class SplashScreen {
Index: /trunk/sources/HeuristicLab.PluginInfrastructure/3.3/Starter/SplashScreen.cs
===================================================================
--- /trunk/sources/HeuristicLab.PluginInfrastructure/3.3/Starter/SplashScreen.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.PluginInfrastructure/3.3/Starter/SplashScreen.cs	(revision 4068)
@@ -21,13 +21,9 @@
 
 using System;
-using System.Collections.Generic;
-using System.Data;
-using System.Drawing;
+using System.Diagnostics;
+using System.Linq;
+using System.Reflection;
 using System.Windows.Forms;
-using System.Reflection;
-using System.Linq;
-using HeuristicLab.PluginInfrastructure;
 using HeuristicLab.PluginInfrastructure.Manager;
-using System.Diagnostics;
 
 namespace HeuristicLab.PluginInfrastructure.Starter {
Index: /trunk/sources/HeuristicLab.PluginInfrastructure/3.3/Starter/StarterForm.cs
===================================================================
--- /trunk/sources/HeuristicLab.PluginInfrastructure/3.3/Starter/StarterForm.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.PluginInfrastructure/3.3/Starter/StarterForm.cs	(revision 4068)
@@ -21,17 +21,12 @@
 
 using System;
+using System.Collections.Generic;
+using System.Diagnostics;
+using System.IO;
 using System.Linq;
-using System.Collections.Generic;
-using System.ComponentModel;
-using System.Data;
-using System.Drawing;
-using System.Text;
+using System.Threading;
 using System.Windows.Forms;
-using System.Diagnostics;
-using HeuristicLab.PluginInfrastructure;
-using System.Threading;
+using HeuristicLab.PluginInfrastructure.Advanced;
 using HeuristicLab.PluginInfrastructure.Manager;
-using System.IO;
-using HeuristicLab.PluginInfrastructure.Advanced;
 
 namespace HeuristicLab.PluginInfrastructure.Starter {
Index: /trunk/sources/HeuristicLab.Problems.ArtificialAnt.Views/3.3/AntTrailSymbolicExpressionTreeView.cs
===================================================================
--- /trunk/sources/HeuristicLab.Problems.ArtificialAnt.Views/3.3/AntTrailSymbolicExpressionTreeView.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.Problems.ArtificialAnt.Views/3.3/AntTrailSymbolicExpressionTreeView.cs	(revision 4068)
@@ -21,12 +21,8 @@
 
 using System;
-using System.Drawing;
 using System.Windows.Forms;
 using HeuristicLab.Core.Views;
-using HeuristicLab.Data;
+using HeuristicLab.Encodings.SymbolicExpressionTreeEncoding.Views;
 using HeuristicLab.MainForm;
-using HeuristicLab.Encodings.SymbolicExpressionTreeEncoding;
-using System.Collections.Generic;
-using HeuristicLab.Encodings.SymbolicExpressionTreeEncoding.Views;
 
 namespace HeuristicLab.Problems.ArtificialAnt.Views {
@@ -35,5 +31,5 @@
   public sealed partial class AntTrailSymbolicExpressionTreeView : ItemView {
     private GraphicalSymbolicExpressionTreeView treeView;
-    
+
     public new AntTrail Content {
       get { return (AntTrail)base.Content; }
Index: /trunk/sources/HeuristicLab.Problems.ArtificialAnt.Views/3.3/AntTrailView.cs
===================================================================
--- /trunk/sources/HeuristicLab.Problems.ArtificialAnt.Views/3.3/AntTrailView.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.Problems.ArtificialAnt.Views/3.3/AntTrailView.cs	(revision 4068)
@@ -21,11 +21,10 @@
 
 using System;
+using System.Collections.Generic;
 using System.Drawing;
 using System.Windows.Forms;
 using HeuristicLab.Core.Views;
-using HeuristicLab.Data;
+using HeuristicLab.Encodings.SymbolicExpressionTreeEncoding;
 using HeuristicLab.MainForm;
-using HeuristicLab.Encodings.SymbolicExpressionTreeEncoding;
-using System.Collections.Generic;
 
 namespace HeuristicLab.Problems.ArtificialAnt.Views {
Index: /trunk/sources/HeuristicLab.Problems.ArtificialAnt/3.3/Analyzers/BestAntTrailAnalyzer.cs
===================================================================
--- /trunk/sources/HeuristicLab.Problems.ArtificialAnt/3.3/Analyzers/BestAntTrailAnalyzer.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.Problems.ArtificialAnt/3.3/Analyzers/BestAntTrailAnalyzer.cs	(revision 4068)
@@ -21,12 +21,11 @@
 
 using System.Linq;
-using HeuristicLab.Common;
 using HeuristicLab.Core;
 using HeuristicLab.Data;
+using HeuristicLab.Encodings.SymbolicExpressionTreeEncoding;
 using HeuristicLab.Operators;
 using HeuristicLab.Optimization;
 using HeuristicLab.Parameters;
 using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
-using HeuristicLab.Encodings.SymbolicExpressionTreeEncoding;
 
 namespace HeuristicLab.Problems.ArtificialAnt.Analyzers {
Index: /trunk/sources/HeuristicLab.Problems.ArtificialAnt/3.3/Analyzers/IAntTrailAnalyzer.cs
===================================================================
--- /trunk/sources/HeuristicLab.Problems.ArtificialAnt/3.3/Analyzers/IAntTrailAnalyzer.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.Problems.ArtificialAnt/3.3/Analyzers/IAntTrailAnalyzer.cs	(revision 4068)
@@ -20,10 +20,8 @@
 #endregion
 
-using System;
+using HeuristicLab.Core;
+using HeuristicLab.Data;
 using HeuristicLab.Encodings.SymbolicExpressionTreeEncoding;
 using HeuristicLab.Optimization;
-using HeuristicLab.Common;
-using HeuristicLab.Core;
-using HeuristicLab.Data;
 using HeuristicLab.Parameters;
 
Index: /trunk/sources/HeuristicLab.Problems.ArtificialAnt/3.3/AntInterpreter.cs
===================================================================
--- /trunk/sources/HeuristicLab.Problems.ArtificialAnt/3.3/AntInterpreter.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.Problems.ArtificialAnt/3.3/AntInterpreter.cs	(revision 4068)
@@ -21,8 +21,8 @@
 
 using System;
+using System.Collections.Generic;
 using System.Linq;
+using HeuristicLab.Data;
 using HeuristicLab.Encodings.SymbolicExpressionTreeEncoding;
-using HeuristicLab.Data;
-using System.Collections.Generic;
 using HeuristicLab.Encodings.SymbolicExpressionTreeEncoding.Symbols;
 using HeuristicLab.Problems.ArtificialAnt.Symbols;
Index: /trunk/sources/HeuristicLab.Problems.ArtificialAnt/3.3/AntTrail.cs
===================================================================
--- /trunk/sources/HeuristicLab.Problems.ArtificialAnt/3.3/AntTrail.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.Problems.ArtificialAnt/3.3/AntTrail.cs	(revision 4068)
@@ -21,10 +21,10 @@
 
 using System;
+using System.Drawing;
 using HeuristicLab.Common;
 using HeuristicLab.Core;
 using HeuristicLab.Data;
+using HeuristicLab.Encodings.SymbolicExpressionTreeEncoding;
 using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
-using HeuristicLab.Encodings.SymbolicExpressionTreeEncoding;
-using System.Drawing;
 
 namespace HeuristicLab.Problems.ArtificialAnt {
Index: /trunk/sources/HeuristicLab.Problems.ArtificialAnt/3.3/ArtificialAntExpressionGrammar.cs
===================================================================
--- /trunk/sources/HeuristicLab.Problems.ArtificialAnt/3.3/ArtificialAntExpressionGrammar.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.Problems.ArtificialAnt/3.3/ArtificialAntExpressionGrammar.cs	(revision 4068)
@@ -21,12 +21,8 @@
 
 
+using System.Collections.Generic;
 using HeuristicLab.Encodings.SymbolicExpressionTreeEncoding;
-using System.Collections.Generic;
-using System;
-using System.Linq;
-using HeuristicLab.Common;
-using HeuristicLab.Core;
+using HeuristicLab.Encodings.SymbolicExpressionTreeEncoding.Symbols;
 using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
-using HeuristicLab.Encodings.SymbolicExpressionTreeEncoding.Symbols;
 using HeuristicLab.Problems.ArtificialAnt.Symbols;
 namespace HeuristicLab.Problems.ArtificialAnt {
Index: /trunk/sources/HeuristicLab.Problems.ArtificialAnt/3.3/ArtificialAntProblem.cs
===================================================================
--- /trunk/sources/HeuristicLab.Problems.ArtificialAnt/3.3/ArtificialAntProblem.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.Problems.ArtificialAnt/3.3/ArtificialAntProblem.cs	(revision 4068)
@@ -22,21 +22,18 @@
 using System;
 using System.Collections.Generic;
+using System.Drawing;
 using System.Linq;
-using System.Drawing;
 using HeuristicLab.Common;
 using HeuristicLab.Core;
 using HeuristicLab.Data;
+using HeuristicLab.Encodings.SymbolicExpressionTreeEncoding;
+using HeuristicLab.Encodings.SymbolicExpressionTreeEncoding.Analyzers;
+using HeuristicLab.Encodings.SymbolicExpressionTreeEncoding.Creators;
+using HeuristicLab.Encodings.SymbolicExpressionTreeEncoding.Interfaces;
 using HeuristicLab.Optimization;
 using HeuristicLab.Parameters;
 using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
 using HeuristicLab.PluginInfrastructure;
-using HeuristicLab.Encodings.SymbolicExpressionTreeEncoding;
-using HeuristicLab.Encodings.SymbolicExpressionTreeEncoding.Creators;
-using HeuristicLab.Encodings.SymbolicExpressionTreeEncoding.Crossovers;
-using HeuristicLab.Encodings.SymbolicExpressionTreeEncoding.Manipulators;
-using HeuristicLab.Encodings.SymbolicExpressionTreeEncoding.ArchitectureManipulators;
-using HeuristicLab.Encodings.SymbolicExpressionTreeEncoding.Interfaces;
 using HeuristicLab.Problems.ArtificialAnt.Analyzers;
-using HeuristicLab.Encodings.SymbolicExpressionTreeEncoding.Analyzers;
 
 namespace HeuristicLab.Problems.ArtificialAnt {
Index: /trunk/sources/HeuristicLab.Problems.ArtificialAnt/3.3/Evaluator.cs
===================================================================
--- /trunk/sources/HeuristicLab.Problems.ArtificialAnt/3.3/Evaluator.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.Problems.ArtificialAnt/3.3/Evaluator.cs	(revision 4068)
@@ -20,12 +20,11 @@
 #endregion
 
-using HeuristicLab.Common;
 using HeuristicLab.Core;
 using HeuristicLab.Data;
+using HeuristicLab.Encodings.SymbolicExpressionTreeEncoding;
+using HeuristicLab.Operators;
+using HeuristicLab.Optimization;
+using HeuristicLab.Parameters;
 using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
-using HeuristicLab.Operators;
-using HeuristicLab.Encodings.SymbolicExpressionTreeEncoding;
-using HeuristicLab.Parameters;
-using HeuristicLab.Optimization;
 
 namespace HeuristicLab.Problems.ArtificialAnt {
Index: /trunk/sources/HeuristicLab.Problems.ArtificialAnt/3.3/Symbols/IfFoodAhead.cs
===================================================================
--- /trunk/sources/HeuristicLab.Problems.ArtificialAnt/3.3/Symbols/IfFoodAhead.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.Problems.ArtificialAnt/3.3/Symbols/IfFoodAhead.cs	(revision 4068)
@@ -20,9 +20,7 @@
 #endregion
 
-using HeuristicLab.Encodings.SymbolicExpressionTreeEncoding;
-using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
-using HeuristicLab.Common;
 using HeuristicLab.Core;
 using HeuristicLab.Encodings.SymbolicExpressionTreeEncoding.Symbols;
+using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
 namespace HeuristicLab.Problems.ArtificialAnt.Symbols {
   [StorableClass]
Index: /trunk/sources/HeuristicLab.Problems.ArtificialAnt/3.3/Symbols/Left.cs
===================================================================
--- /trunk/sources/HeuristicLab.Problems.ArtificialAnt/3.3/Symbols/Left.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.Problems.ArtificialAnt/3.3/Symbols/Left.cs	(revision 4068)
@@ -20,9 +20,7 @@
 #endregion
 
-using HeuristicLab.Encodings.SymbolicExpressionTreeEncoding;
-using HeuristicLab.Common;
 using HeuristicLab.Core;
+using HeuristicLab.Encodings.SymbolicExpressionTreeEncoding.Symbols;
 using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
-using HeuristicLab.Encodings.SymbolicExpressionTreeEncoding.Symbols;
 namespace HeuristicLab.Problems.ArtificialAnt.Symbols {
   [StorableClass]
Index: /trunk/sources/HeuristicLab.Problems.ArtificialAnt/3.3/Symbols/Move.cs
===================================================================
--- /trunk/sources/HeuristicLab.Problems.ArtificialAnt/3.3/Symbols/Move.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.Problems.ArtificialAnt/3.3/Symbols/Move.cs	(revision 4068)
@@ -20,9 +20,7 @@
 #endregion
 
-using HeuristicLab.Encodings.SymbolicExpressionTreeEncoding;
-using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
-using HeuristicLab.Common;
 using HeuristicLab.Core;
 using HeuristicLab.Encodings.SymbolicExpressionTreeEncoding.Symbols;
+using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
 namespace HeuristicLab.Problems.ArtificialAnt.Symbols {
   [StorableClass]
Index: /trunk/sources/HeuristicLab.Problems.ArtificialAnt/3.3/Symbols/Prog2.cs
===================================================================
--- /trunk/sources/HeuristicLab.Problems.ArtificialAnt/3.3/Symbols/Prog2.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.Problems.ArtificialAnt/3.3/Symbols/Prog2.cs	(revision 4068)
@@ -21,9 +21,7 @@
 
 
-using HeuristicLab.Encodings.SymbolicExpressionTreeEncoding;
-using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
-using HeuristicLab.Common;
 using HeuristicLab.Core;
 using HeuristicLab.Encodings.SymbolicExpressionTreeEncoding.Symbols;
+using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
 namespace HeuristicLab.Problems.ArtificialAnt.Symbols {
   [StorableClass]
Index: /trunk/sources/HeuristicLab.Problems.ArtificialAnt/3.3/Symbols/Prog3.cs
===================================================================
--- /trunk/sources/HeuristicLab.Problems.ArtificialAnt/3.3/Symbols/Prog3.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.Problems.ArtificialAnt/3.3/Symbols/Prog3.cs	(revision 4068)
@@ -20,9 +20,7 @@
 #endregion
 
-using HeuristicLab.Encodings.SymbolicExpressionTreeEncoding;
-using HeuristicLab.Common;
 using HeuristicLab.Core;
+using HeuristicLab.Encodings.SymbolicExpressionTreeEncoding.Symbols;
 using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
-using HeuristicLab.Encodings.SymbolicExpressionTreeEncoding.Symbols;
 namespace HeuristicLab.Problems.ArtificialAnt.Symbols {
   [StorableClass]
Index: /trunk/sources/HeuristicLab.Problems.ArtificialAnt/3.3/Symbols/Right.cs
===================================================================
--- /trunk/sources/HeuristicLab.Problems.ArtificialAnt/3.3/Symbols/Right.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.Problems.ArtificialAnt/3.3/Symbols/Right.cs	(revision 4068)
@@ -20,9 +20,7 @@
 #endregion
 
-using HeuristicLab.Encodings.SymbolicExpressionTreeEncoding;
-using HeuristicLab.Common;
 using HeuristicLab.Core;
+using HeuristicLab.Encodings.SymbolicExpressionTreeEncoding.Symbols;
 using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
-using HeuristicLab.Encodings.SymbolicExpressionTreeEncoding.Symbols;
 namespace HeuristicLab.Problems.ArtificialAnt.Symbols {
   [StorableClass]
Index: /trunk/sources/HeuristicLab.Problems.DataAnalysis.MultiVariate.Regression/3.3/Symbolic/Analyzer/ValidationBestScaledSymbolicVectorRegressionSolutionAnalyzer.cs
===================================================================
--- /trunk/sources/HeuristicLab.Problems.DataAnalysis.MultiVariate.Regression/3.3/Symbolic/Analyzer/ValidationBestScaledSymbolicVectorRegressionSolutionAnalyzer.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.Problems.DataAnalysis.MultiVariate.Regression/3.3/Symbolic/Analyzer/ValidationBestScaledSymbolicVectorRegressionSolutionAnalyzer.cs	(revision 4068)
@@ -20,23 +20,16 @@
 #endregion
 
+using System.Collections.Generic;
 using System.Linq;
-using HeuristicLab.Common;
+using HeuristicLab.Analysis;
 using HeuristicLab.Core;
 using HeuristicLab.Data;
+using HeuristicLab.Encodings.SymbolicExpressionTreeEncoding;
 using HeuristicLab.Operators;
 using HeuristicLab.Optimization;
 using HeuristicLab.Parameters;
 using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
-using HeuristicLab.Encodings.SymbolicExpressionTreeEncoding;
-using HeuristicLab.Problems.DataAnalysis.Regression.Symbolic;
+using HeuristicLab.Problems.DataAnalysis.MultiVariate.Regression.Symbolic.Evaluators;
 using HeuristicLab.Problems.DataAnalysis.Symbolic;
-using System.Collections.Generic;
-using HeuristicLab.Problems.DataAnalysis.Symbolic.Symbols;
-using HeuristicLab.Problems.DataAnalysis;
-using System;
-using HeuristicLab.Problems.DataAnalysis.Regression.Symbolic.Analyzers;
-using HeuristicLab.Problems.DataAnalysis.MultiVariate;
-using HeuristicLab.Problems.DataAnalysis.MultiVariate.Regression.Symbolic.Evaluators;
-using HeuristicLab.Analysis;
 
 namespace HeuristicLab.Problems.DataAnalysis.MultiVariate.Regression.Symbolic.Analyzers {
Index: /trunk/sources/HeuristicLab.Problems.DataAnalysis.MultiVariate.Regression/3.3/Symbolic/Evaluators/SymbolicRegressionNormalizedMeanSquaredErrorEvaluator.cs
===================================================================
--- /trunk/sources/HeuristicLab.Problems.DataAnalysis.MultiVariate.Regression/3.3/Symbolic/Evaluators/SymbolicRegressionNormalizedMeanSquaredErrorEvaluator.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.Problems.DataAnalysis.MultiVariate.Regression/3.3/Symbolic/Evaluators/SymbolicRegressionNormalizedMeanSquaredErrorEvaluator.cs	(revision 4068)
@@ -22,16 +22,9 @@
 using System;
 using System.Collections.Generic;
-using System.Linq;
-using System.Drawing;
-using HeuristicLab.Common;
 using HeuristicLab.Core;
 using HeuristicLab.Data;
-using HeuristicLab.Optimization;
+using HeuristicLab.Encodings.SymbolicExpressionTreeEncoding;
 using HeuristicLab.Parameters;
 using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
-using HeuristicLab.PluginInfrastructure;
-using HeuristicLab.Encodings.SymbolicExpressionTreeEncoding;
-using HeuristicLab.Problems.DataAnalysis;
-using HeuristicLab.Operators;
 using HeuristicLab.Problems.DataAnalysis.Evaluators;
 using HeuristicLab.Problems.DataAnalysis.Symbolic;
Index: /trunk/sources/HeuristicLab.Problems.DataAnalysis.MultiVariate.Regression/3.3/Symbolic/Evaluators/SymbolicRegressionScaledNormalizedMeanSquaredErrorEvaluator.cs
===================================================================
--- /trunk/sources/HeuristicLab.Problems.DataAnalysis.MultiVariate.Regression/3.3/Symbolic/Evaluators/SymbolicRegressionScaledNormalizedMeanSquaredErrorEvaluator.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.Problems.DataAnalysis.MultiVariate.Regression/3.3/Symbolic/Evaluators/SymbolicRegressionScaledNormalizedMeanSquaredErrorEvaluator.cs	(revision 4068)
@@ -22,16 +22,9 @@
 using System;
 using System.Collections.Generic;
-using System.Linq;
-using System.Drawing;
-using HeuristicLab.Common;
 using HeuristicLab.Core;
 using HeuristicLab.Data;
-using HeuristicLab.Optimization;
+using HeuristicLab.Encodings.SymbolicExpressionTreeEncoding;
 using HeuristicLab.Parameters;
 using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
-using HeuristicLab.PluginInfrastructure;
-using HeuristicLab.Encodings.SymbolicExpressionTreeEncoding;
-using HeuristicLab.Problems.DataAnalysis;
-using HeuristicLab.Operators;
 using HeuristicLab.Problems.DataAnalysis.Evaluators;
 using HeuristicLab.Problems.DataAnalysis.Symbolic;
Index: /trunk/sources/HeuristicLab.Problems.DataAnalysis.MultiVariate.Regression/3.3/Symbolic/Evaluators/SymbolicVectorRegressionEvaluator.cs
===================================================================
--- /trunk/sources/HeuristicLab.Problems.DataAnalysis.MultiVariate.Regression/3.3/Symbolic/Evaluators/SymbolicVectorRegressionEvaluator.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.Problems.DataAnalysis.MultiVariate.Regression/3.3/Symbolic/Evaluators/SymbolicVectorRegressionEvaluator.cs	(revision 4068)
@@ -21,21 +21,14 @@
 
 using System;
+using System.Collections.Generic;
 using System.Linq;
-using HeuristicLab.Common;
 using HeuristicLab.Core;
 using HeuristicLab.Data;
+using HeuristicLab.Encodings.SymbolicExpressionTreeEncoding;
+using HeuristicLab.Operators;
+using HeuristicLab.Parameters;
 using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
-using HeuristicLab.Problems.DataAnalysis.SupportVectorMachine;
-using HeuristicLab.Problems.DataAnalysis;
-using HeuristicLab.Problems.DataAnalysis.Evaluators;
-using HeuristicLab.Parameters;
-using HeuristicLab.Optimization;
-using HeuristicLab.Operators;
-using HeuristicLab.Problems.DataAnalysis.Regression.Symbolic;
-using HeuristicLab.Encodings.SymbolicExpressionTreeEncoding;
+using HeuristicLab.Problems.DataAnalysis.Regression;
 using HeuristicLab.Problems.DataAnalysis.Symbolic;
-using System.Collections.Generic;
-using HeuristicLab.Problems.DataAnalysis.Regression;
-using HeuristicLab.Problems.DataAnalysis.MultiVariate;
 
 namespace HeuristicLab.Problems.DataAnalysis.MultiVariate.Regression.Symbolic.Evaluators {
Index: /trunk/sources/HeuristicLab.Problems.DataAnalysis.MultiVariate.Regression/3.3/Symbolic/Evaluators/SymbolicVectorRegressionNormalizedMseEvaluator.cs
===================================================================
--- /trunk/sources/HeuristicLab.Problems.DataAnalysis.MultiVariate.Regression/3.3/Symbolic/Evaluators/SymbolicVectorRegressionNormalizedMseEvaluator.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.Problems.DataAnalysis.MultiVariate.Regression/3.3/Symbolic/Evaluators/SymbolicVectorRegressionNormalizedMseEvaluator.cs	(revision 4068)
@@ -20,22 +20,14 @@
 #endregion
 
-using System;
+using System.Collections.Generic;
 using System.Linq;
-using HeuristicLab.Common;
 using HeuristicLab.Core;
 using HeuristicLab.Data;
+using HeuristicLab.Encodings.SymbolicExpressionTreeEncoding;
+using HeuristicLab.Parameters;
 using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
-using HeuristicLab.Problems.DataAnalysis.SupportVectorMachine;
-using HeuristicLab.Problems.DataAnalysis;
-using HeuristicLab.Problems.DataAnalysis.Evaluators;
-using HeuristicLab.Parameters;
-using HeuristicLab.Optimization;
-using HeuristicLab.Operators;
+using HeuristicLab.Problems.DataAnalysis.MultiVariate.Regression.Symbolic.Interfaces;
 using HeuristicLab.Problems.DataAnalysis.Regression.Symbolic;
-using HeuristicLab.Encodings.SymbolicExpressionTreeEncoding;
 using HeuristicLab.Problems.DataAnalysis.Symbolic;
-using System.Collections.Generic;
-using HeuristicLab.Problems.DataAnalysis.Regression;
-using HeuristicLab.Problems.DataAnalysis.MultiVariate.Regression.Symbolic.Interfaces;
 
 namespace HeuristicLab.Problems.DataAnalysis.MultiVariate.Regression.Symbolic.Evaluators {
@@ -68,5 +60,5 @@
       List<SymbolicExpressionTreeNode> componentBranches = new List<SymbolicExpressionTreeNode>(tree.Root.SubTrees[0].SubTrees);
       while (tree.Root.SubTrees[0].SubTrees.Count > 0) tree.Root.SubTrees[0].RemoveSubTree(0);
-      
+
       for (int i = 0; i < targetVariablesList.Count; i++) {
         tree.Root.SubTrees[0].AddSubTree(componentBranches[i]);
Index: /trunk/sources/HeuristicLab.Problems.DataAnalysis.MultiVariate.Regression/3.3/Symbolic/Evaluators/SymbolicVectorRegressionScaledMseEvaluator.cs
===================================================================
--- /trunk/sources/HeuristicLab.Problems.DataAnalysis.MultiVariate.Regression/3.3/Symbolic/Evaluators/SymbolicVectorRegressionScaledMseEvaluator.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.Problems.DataAnalysis.MultiVariate.Regression/3.3/Symbolic/Evaluators/SymbolicVectorRegressionScaledMseEvaluator.cs	(revision 4068)
@@ -20,22 +20,14 @@
 #endregion
 
-using System;
+using System.Collections.Generic;
 using System.Linq;
-using HeuristicLab.Common;
 using HeuristicLab.Core;
 using HeuristicLab.Data;
+using HeuristicLab.Encodings.SymbolicExpressionTreeEncoding;
+using HeuristicLab.Parameters;
 using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
-using HeuristicLab.Problems.DataAnalysis.SupportVectorMachine;
-using HeuristicLab.Problems.DataAnalysis;
-using HeuristicLab.Problems.DataAnalysis.Evaluators;
-using HeuristicLab.Parameters;
-using HeuristicLab.Optimization;
-using HeuristicLab.Operators;
+using HeuristicLab.Problems.DataAnalysis.MultiVariate.Regression.Symbolic.Interfaces;
 using HeuristicLab.Problems.DataAnalysis.Regression.Symbolic;
-using HeuristicLab.Encodings.SymbolicExpressionTreeEncoding;
 using HeuristicLab.Problems.DataAnalysis.Symbolic;
-using System.Collections.Generic;
-using HeuristicLab.Problems.DataAnalysis.Regression;
-using HeuristicLab.Problems.DataAnalysis.MultiVariate.Regression.Symbolic.Interfaces;
 
 namespace HeuristicLab.Problems.DataAnalysis.MultiVariate.Regression.Symbolic.Evaluators {
Index: /trunk/sources/HeuristicLab.Problems.DataAnalysis.MultiVariate.Regression/3.3/Symbolic/Evaluators/SymbolicVectorRegressionScaledNormalizedMseEvaluator.cs
===================================================================
--- /trunk/sources/HeuristicLab.Problems.DataAnalysis.MultiVariate.Regression/3.3/Symbolic/Evaluators/SymbolicVectorRegressionScaledNormalizedMseEvaluator.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.Problems.DataAnalysis.MultiVariate.Regression/3.3/Symbolic/Evaluators/SymbolicVectorRegressionScaledNormalizedMseEvaluator.cs	(revision 4068)
@@ -20,22 +20,14 @@
 #endregion
 
-using System;
+using System.Collections.Generic;
 using System.Linq;
-using HeuristicLab.Common;
 using HeuristicLab.Core;
 using HeuristicLab.Data;
+using HeuristicLab.Encodings.SymbolicExpressionTreeEncoding;
+using HeuristicLab.Parameters;
 using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
-using HeuristicLab.Problems.DataAnalysis.SupportVectorMachine;
-using HeuristicLab.Problems.DataAnalysis;
-using HeuristicLab.Problems.DataAnalysis.Evaluators;
-using HeuristicLab.Parameters;
-using HeuristicLab.Optimization;
-using HeuristicLab.Operators;
+using HeuristicLab.Problems.DataAnalysis.MultiVariate.Regression.Symbolic.Interfaces;
 using HeuristicLab.Problems.DataAnalysis.Regression.Symbolic;
-using HeuristicLab.Encodings.SymbolicExpressionTreeEncoding;
 using HeuristicLab.Problems.DataAnalysis.Symbolic;
-using System.Collections.Generic;
-using HeuristicLab.Problems.DataAnalysis.Regression;
-using HeuristicLab.Problems.DataAnalysis.MultiVariate.Regression.Symbolic.Interfaces;
 
 namespace HeuristicLab.Problems.DataAnalysis.MultiVariate.Regression.Symbolic.Evaluators {
@@ -76,5 +68,5 @@
       // use only the i-th vector component
       List<SymbolicExpressionTreeNode> componentBranches = new List<SymbolicExpressionTreeNode>(tree.Root.SubTrees[0].SubTrees);
-      while (tree.Root.SubTrees[0].SubTrees.Count > 0) tree.Root.SubTrees[0].RemoveSubTree(0); 
+      while (tree.Root.SubTrees[0].SubTrees.Count > 0) tree.Root.SubTrees[0].RemoveSubTree(0);
       for (int i = 0; i < targetVariablesList.Count; i++) {
         tree.Root.SubTrees[0].AddSubTree(componentBranches[i]);
Index: /trunk/sources/HeuristicLab.Problems.DataAnalysis.MultiVariate.Regression/3.3/Symbolic/Interfaces/IMultiObjectiveSymbolicVectorRegressionEvaluator.cs
===================================================================
--- /trunk/sources/HeuristicLab.Problems.DataAnalysis.MultiVariate.Regression/3.3/Symbolic/Interfaces/IMultiObjectiveSymbolicVectorRegressionEvaluator.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.Problems.DataAnalysis.MultiVariate.Regression/3.3/Symbolic/Interfaces/IMultiObjectiveSymbolicVectorRegressionEvaluator.cs	(revision 4068)
@@ -20,21 +20,9 @@
 #endregion
 
-using System;
-using System.Linq;
-using HeuristicLab.Common;
 using HeuristicLab.Core;
 using HeuristicLab.Data;
-using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
-using HeuristicLab.Problems.DataAnalysis.SupportVectorMachine;
-using HeuristicLab.Problems.DataAnalysis;
-using HeuristicLab.Problems.DataAnalysis.Evaluators;
-using HeuristicLab.Parameters;
+using HeuristicLab.Encodings.SymbolicExpressionTreeEncoding;
 using HeuristicLab.Optimization;
-using HeuristicLab.Operators;
-using HeuristicLab.Problems.DataAnalysis.Regression.Symbolic;
-using HeuristicLab.Encodings.SymbolicExpressionTreeEncoding;
 using HeuristicLab.Problems.DataAnalysis.Symbolic;
-using System.Collections.Generic;
-using HeuristicLab.Problems.DataAnalysis.MultiVariate;
 
 namespace HeuristicLab.Problems.DataAnalysis.MultiVariate.Regression.Symbolic.Interfaces {
Index: /trunk/sources/HeuristicLab.Problems.DataAnalysis.MultiVariate.Regression/3.3/Symbolic/Interfaces/ISingleObjectiveSymbolicVectorRegressionEvaluator.cs
===================================================================
--- /trunk/sources/HeuristicLab.Problems.DataAnalysis.MultiVariate.Regression/3.3/Symbolic/Interfaces/ISingleObjectiveSymbolicVectorRegressionEvaluator.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.Problems.DataAnalysis.MultiVariate.Regression/3.3/Symbolic/Interfaces/ISingleObjectiveSymbolicVectorRegressionEvaluator.cs	(revision 4068)
@@ -20,20 +20,9 @@
 #endregion
 
-using System;
-using System.Linq;
-using HeuristicLab.Common;
 using HeuristicLab.Core;
 using HeuristicLab.Data;
-using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
-using HeuristicLab.Problems.DataAnalysis.SupportVectorMachine;
-using HeuristicLab.Problems.DataAnalysis;
-using HeuristicLab.Problems.DataAnalysis.Evaluators;
-using HeuristicLab.Parameters;
+using HeuristicLab.Encodings.SymbolicExpressionTreeEncoding;
 using HeuristicLab.Optimization;
-using HeuristicLab.Operators;
-using HeuristicLab.Problems.DataAnalysis.Regression.Symbolic;
-using HeuristicLab.Encodings.SymbolicExpressionTreeEncoding;
 using HeuristicLab.Problems.DataAnalysis.Symbolic;
-using System.Collections.Generic;
 
 namespace HeuristicLab.Problems.DataAnalysis.MultiVariate.Regression.Symbolic.Interfaces {
Index: /trunk/sources/HeuristicLab.Problems.DataAnalysis.MultiVariate.Regression/3.3/Symbolic/MultiObjectiveSymbolicVectorRegressionProblem.cs
===================================================================
--- /trunk/sources/HeuristicLab.Problems.DataAnalysis.MultiVariate.Regression/3.3/Symbolic/MultiObjectiveSymbolicVectorRegressionProblem.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.Problems.DataAnalysis.MultiVariate.Regression/3.3/Symbolic/MultiObjectiveSymbolicVectorRegressionProblem.cs	(revision 4068)
@@ -21,5 +21,4 @@
 
 using System;
-using System.Collections.Generic;
 using System.Linq;
 using HeuristicLab.Common;
@@ -29,18 +28,6 @@
 using HeuristicLab.Parameters;
 using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
-using HeuristicLab.PluginInfrastructure;
-using HeuristicLab.Encodings.SymbolicExpressionTreeEncoding;
-using HeuristicLab.Problems.DataAnalysis.Regression;
-using HeuristicLab.Problems.DataAnalysis.Symbolic;
-using HeuristicLab.Encodings.SymbolicExpressionTreeEncoding.ArchitectureManipulators;
-using HeuristicLab.Encodings.SymbolicExpressionTreeEncoding.Manipulators;
-using HeuristicLab.Encodings.SymbolicExpressionTreeEncoding.Crossovers;
-using HeuristicLab.Encodings.SymbolicExpressionTreeEncoding.Creators;
-using HeuristicLab.Encodings.SymbolicExpressionTreeEncoding.Interfaces;
-using HeuristicLab.Problems.DataAnalysis.Regression.Symbolic.Analyzers;
-using HeuristicLab.Encodings.SymbolicExpressionTreeEncoding.Analyzers;
-using HeuristicLab.Problems.DataAnalysis.Regression.Symbolic;
+using HeuristicLab.Problems.DataAnalysis.MultiVariate.Regression.Symbolic.Evaluators;
 using HeuristicLab.Problems.DataAnalysis.MultiVariate.Regression.Symbolic.Interfaces;
-using HeuristicLab.Problems.DataAnalysis.MultiVariate.Regression.Symbolic.Evaluators;
 
 namespace HeuristicLab.Problems.DataAnalysis.MultiVariate.Regression.Symbolic {
Index: /trunk/sources/HeuristicLab.Problems.DataAnalysis.MultiVariate.Regression/3.3/Symbolic/SingleObjectiveSymbolicVectorRegressionProblem.cs
===================================================================
--- /trunk/sources/HeuristicLab.Problems.DataAnalysis.MultiVariate.Regression/3.3/Symbolic/SingleObjectiveSymbolicVectorRegressionProblem.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.Problems.DataAnalysis.MultiVariate.Regression/3.3/Symbolic/SingleObjectiveSymbolicVectorRegressionProblem.cs	(revision 4068)
@@ -21,6 +21,4 @@
 
 using System;
-using System.Collections.Generic;
-using System.Linq;
 using HeuristicLab.Common;
 using HeuristicLab.Core;
@@ -29,19 +27,7 @@
 using HeuristicLab.Parameters;
 using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
-using HeuristicLab.PluginInfrastructure;
-using HeuristicLab.Encodings.SymbolicExpressionTreeEncoding;
-using HeuristicLab.Problems.DataAnalysis.Regression;
-using HeuristicLab.Problems.DataAnalysis.Symbolic;
-using HeuristicLab.Encodings.SymbolicExpressionTreeEncoding.ArchitectureManipulators;
-using HeuristicLab.Encodings.SymbolicExpressionTreeEncoding.Manipulators;
-using HeuristicLab.Encodings.SymbolicExpressionTreeEncoding.Crossovers;
-using HeuristicLab.Encodings.SymbolicExpressionTreeEncoding.Creators;
-using HeuristicLab.Encodings.SymbolicExpressionTreeEncoding.Interfaces;
-using HeuristicLab.Problems.DataAnalysis.Regression.Symbolic.Analyzers;
-using HeuristicLab.Encodings.SymbolicExpressionTreeEncoding.Analyzers;
-using HeuristicLab.Problems.DataAnalysis.Regression.Symbolic;
+using HeuristicLab.Problems.DataAnalysis.MultiVariate.Regression.Symbolic.Analyzers;
+using HeuristicLab.Problems.DataAnalysis.MultiVariate.Regression.Symbolic.Evaluators;
 using HeuristicLab.Problems.DataAnalysis.MultiVariate.Regression.Symbolic.Interfaces;
-using HeuristicLab.Problems.DataAnalysis.MultiVariate.Regression.Symbolic.Evaluators;
-using HeuristicLab.Problems.DataAnalysis.MultiVariate.Regression.Symbolic.Analyzers;
 
 namespace HeuristicLab.Problems.DataAnalysis.MultiVariate.Regression.Symbolic {
Index: /trunk/sources/HeuristicLab.Problems.DataAnalysis.MultiVariate.Regression/3.3/Symbolic/SymbolicVectorRegressionGrammar.cs
===================================================================
--- /trunk/sources/HeuristicLab.Problems.DataAnalysis.MultiVariate.Regression/3.3/Symbolic/SymbolicVectorRegressionGrammar.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.Problems.DataAnalysis.MultiVariate.Regression/3.3/Symbolic/SymbolicVectorRegressionGrammar.cs	(revision 4068)
@@ -20,15 +20,11 @@
 #endregion
 
-using HeuristicLab.Encodings.SymbolicExpressionTreeEncoding;
 using System.Collections.Generic;
-using System;
-using System.Linq;
 using HeuristicLab.Common;
 using HeuristicLab.Core;
+using HeuristicLab.Encodings.SymbolicExpressionTreeEncoding.Symbols;
 using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
-using HeuristicLab.Encodings.SymbolicExpressionTreeEncoding.Symbols;
-using HeuristicLab.Data;
+using HeuristicLab.Problems.DataAnalysis.MultiVariate.Symbolic;
 using HeuristicLab.Problems.DataAnalysis.Symbolic.Symbols;
-using HeuristicLab.Problems.DataAnalysis.MultiVariate.Symbolic;
 
 namespace HeuristicLab.Problems.DataAnalysis.MultiVariate.Regression.Symbolic {
Index: /trunk/sources/HeuristicLab.Problems.DataAnalysis.MultiVariate.Regression/3.3/Symbolic/SymbolicVectorRegressionProblem.cs
===================================================================
--- /trunk/sources/HeuristicLab.Problems.DataAnalysis.MultiVariate.Regression/3.3/Symbolic/SymbolicVectorRegressionProblem.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.Problems.DataAnalysis.MultiVariate.Regression/3.3/Symbolic/SymbolicVectorRegressionProblem.cs	(revision 4068)
@@ -26,19 +26,13 @@
 using HeuristicLab.Core;
 using HeuristicLab.Data;
+using HeuristicLab.Encodings.SymbolicExpressionTreeEncoding;
+using HeuristicLab.Encodings.SymbolicExpressionTreeEncoding.Analyzers;
+using HeuristicLab.Encodings.SymbolicExpressionTreeEncoding.Creators;
+using HeuristicLab.Encodings.SymbolicExpressionTreeEncoding.Interfaces;
 using HeuristicLab.Optimization;
 using HeuristicLab.Parameters;
 using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
 using HeuristicLab.PluginInfrastructure;
-using HeuristicLab.Encodings.SymbolicExpressionTreeEncoding;
-using HeuristicLab.Problems.DataAnalysis.Regression;
 using HeuristicLab.Problems.DataAnalysis.Symbolic;
-using HeuristicLab.Encodings.SymbolicExpressionTreeEncoding.ArchitectureManipulators;
-using HeuristicLab.Encodings.SymbolicExpressionTreeEncoding.Manipulators;
-using HeuristicLab.Encodings.SymbolicExpressionTreeEncoding.Crossovers;
-using HeuristicLab.Encodings.SymbolicExpressionTreeEncoding.Creators;
-using HeuristicLab.Encodings.SymbolicExpressionTreeEncoding.Interfaces;
-using HeuristicLab.Problems.DataAnalysis.Regression.Symbolic.Analyzers;
-using HeuristicLab.Encodings.SymbolicExpressionTreeEncoding.Analyzers;
-using HeuristicLab.Problems.DataAnalysis.Regression.Symbolic;
 
 namespace HeuristicLab.Problems.DataAnalysis.MultiVariate.Regression.Symbolic {
Index: /trunk/sources/HeuristicLab.Problems.DataAnalysis.MultiVariate.Regression/3.3/Symbolic/SymbolicVectorRegressionSolutionLinearScaler.cs
===================================================================
--- /trunk/sources/HeuristicLab.Problems.DataAnalysis.MultiVariate.Regression/3.3/Symbolic/SymbolicVectorRegressionSolutionLinearScaler.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.Problems.DataAnalysis.MultiVariate.Regression/3.3/Symbolic/SymbolicVectorRegressionSolutionLinearScaler.cs	(revision 4068)
@@ -20,18 +20,13 @@
 #endregion
 
+using System.Collections.Generic;
 using System.Linq;
-using HeuristicLab.Common;
 using HeuristicLab.Core;
 using HeuristicLab.Data;
+using HeuristicLab.Encodings.SymbolicExpressionTreeEncoding;
 using HeuristicLab.Operators;
-using HeuristicLab.Optimization;
 using HeuristicLab.Parameters;
 using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
-using HeuristicLab.Encodings.SymbolicExpressionTreeEncoding;
-using HeuristicLab.Problems.DataAnalysis.Regression.Symbolic;
-using HeuristicLab.Problems.DataAnalysis.Symbolic;
-using System.Collections.Generic;
 using HeuristicLab.Problems.DataAnalysis.Symbolic.Symbols;
-using HeuristicLab.Problems.DataAnalysis;
 
 namespace HeuristicLab.Problems.DataAnalysis.MultiVariate.Regression.Symbolic {
@@ -100,5 +95,5 @@
       return scaledTree;
     }
-   
+
     private static SymbolicExpressionTreeNode MakeSum(SymbolicExpressionTreeNode treeNode, double alpha) {
       var node = (new Addition()).CreateTreeNode();
Index: /trunk/sources/HeuristicLab.Problems.DataAnalysis.MultiVariate/3.3/Interfaces/IMultiVariateDataAnalysisEvaluator.cs
===================================================================
--- /trunk/sources/HeuristicLab.Problems.DataAnalysis.MultiVariate/3.3/Interfaces/IMultiVariateDataAnalysisEvaluator.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.Problems.DataAnalysis.MultiVariate/3.3/Interfaces/IMultiVariateDataAnalysisEvaluator.cs	(revision 4068)
@@ -20,9 +20,6 @@
 #endregion
 
-using System;
-using System.Linq;
+using HeuristicLab.Core;
 using HeuristicLab.Optimization;
-using HeuristicLab.Core;
-using HeuristicLab.Data;
 
 namespace HeuristicLab.Problems.DataAnalysis.MultiVariate {
Index: /trunk/sources/HeuristicLab.Problems.DataAnalysis.MultiVariate/3.3/Interfaces/IMultiVariateDataAnalysisModel.cs
===================================================================
--- /trunk/sources/HeuristicLab.Problems.DataAnalysis.MultiVariate/3.3/Interfaces/IMultiVariateDataAnalysisModel.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.Problems.DataAnalysis.MultiVariate/3.3/Interfaces/IMultiVariateDataAnalysisModel.cs	(revision 4068)
@@ -20,7 +20,4 @@
 #endregion
 
-using System;
-using System.Linq;
-using HeuristicLab.Optimization;
 using HeuristicLab.Core;
 
Index: /trunk/sources/HeuristicLab.Problems.DataAnalysis.MultiVariate/3.3/Interfaces/IMultiVariateDataAnalysisProblem.cs
===================================================================
--- /trunk/sources/HeuristicLab.Problems.DataAnalysis.MultiVariate/3.3/Interfaces/IMultiVariateDataAnalysisProblem.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.Problems.DataAnalysis.MultiVariate/3.3/Interfaces/IMultiVariateDataAnalysisProblem.cs	(revision 4068)
@@ -20,6 +20,4 @@
 #endregion
 
-using System;
-using System.Linq;
 using HeuristicLab.Optimization;
 
Index: /trunk/sources/HeuristicLab.Problems.DataAnalysis.MultiVariate/3.3/Interfaces/IMultiVariateDataAnalysisSolution.cs
===================================================================
--- /trunk/sources/HeuristicLab.Problems.DataAnalysis.MultiVariate/3.3/Interfaces/IMultiVariateDataAnalysisSolution.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.Problems.DataAnalysis.MultiVariate/3.3/Interfaces/IMultiVariateDataAnalysisSolution.cs	(revision 4068)
@@ -20,7 +20,4 @@
 #endregion
 
-using System;
-using System.Linq;
-using HeuristicLab.Optimization;
 using HeuristicLab.Core;
 
Index: /trunk/sources/HeuristicLab.Problems.DataAnalysis.MultiVariate/3.3/MultiVariateDataAnalysisProblem.cs
===================================================================
--- /trunk/sources/HeuristicLab.Problems.DataAnalysis.MultiVariate/3.3/MultiVariateDataAnalysisProblem.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.Problems.DataAnalysis.MultiVariate/3.3/MultiVariateDataAnalysisProblem.cs	(revision 4068)
@@ -22,14 +22,10 @@
 using System;
 using System.Collections.Generic;
-using System.Linq;
+using System.Drawing;
 using HeuristicLab.Common;
 using HeuristicLab.Core;
+using HeuristicLab.Optimization;
+using HeuristicLab.Parameters;
 using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
-using HeuristicLab.Parameters;
-using HeuristicLab.Data;
-using HeuristicLab.Problems.DataAnalysis;
-using System.Drawing;
-using System.IO;
-using HeuristicLab.Optimization;
 
 namespace HeuristicLab.Problems.DataAnalysis.MultiVariate {
Index: /trunk/sources/HeuristicLab.Problems.DataAnalysis.MultiVariate/3.3/MultiVariateDataAnalysisProblemData.cs
===================================================================
--- /trunk/sources/HeuristicLab.Problems.DataAnalysis.MultiVariate/3.3/MultiVariateDataAnalysisProblemData.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.Problems.DataAnalysis.MultiVariate/3.3/MultiVariateDataAnalysisProblemData.cs	(revision 4068)
@@ -21,14 +21,11 @@
 
 using System;
-using System.Collections.Generic;
+using System.IO;
 using System.Linq;
 using HeuristicLab.Common;
 using HeuristicLab.Core;
+using HeuristicLab.Data;
+using HeuristicLab.Parameters;
 using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
-using HeuristicLab.Parameters;
-using HeuristicLab.Data;
-using HeuristicLab.Problems.DataAnalysis;
-using System.Drawing;
-using System.IO;
 
 namespace HeuristicLab.Problems.DataAnalysis.MultiVariate {
Index: /trunk/sources/HeuristicLab.Problems.DataAnalysis.MultiVariate/3.3/Symbolic/MultiVariateExpressionGrammar.cs
===================================================================
--- /trunk/sources/HeuristicLab.Problems.DataAnalysis.MultiVariate/3.3/Symbolic/MultiVariateExpressionGrammar.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.Problems.DataAnalysis.MultiVariate/3.3/Symbolic/MultiVariateExpressionGrammar.cs	(revision 4068)
@@ -20,14 +20,9 @@
 #endregion
 
-using HeuristicLab.Encodings.SymbolicExpressionTreeEncoding;
-using System.Collections.Generic;
-using System;
-using System.Linq;
 using HeuristicLab.Common;
 using HeuristicLab.Core;
+using HeuristicLab.Encodings.SymbolicExpressionTreeEncoding;
+using HeuristicLab.Encodings.SymbolicExpressionTreeEncoding.Symbols;
 using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
-using HeuristicLab.Encodings.SymbolicExpressionTreeEncoding.Symbols;
-using HeuristicLab.Data;
-using HeuristicLab.Problems.DataAnalysis.Symbolic.Symbols;
 
 namespace HeuristicLab.Problems.DataAnalysis.MultiVariate.Symbolic {
Index: /trunk/sources/HeuristicLab.Problems.DataAnalysis.Regression/3.3/Analyzers/RegressionSolutionAnalyzer.cs
===================================================================
--- /trunk/sources/HeuristicLab.Problems.DataAnalysis.Regression/3.3/Analyzers/RegressionSolutionAnalyzer.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.Problems.DataAnalysis.Regression/3.3/Analyzers/RegressionSolutionAnalyzer.cs	(revision 4068)
@@ -20,6 +20,5 @@
 #endregion
 
-using System.Linq;
-using HeuristicLab.Common;
+using System.Collections.Generic;
 using HeuristicLab.Core;
 using HeuristicLab.Data;
@@ -28,12 +27,5 @@
 using HeuristicLab.Parameters;
 using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
-using HeuristicLab.Encodings.SymbolicExpressionTreeEncoding;
-using HeuristicLab.Problems.DataAnalysis.Regression.Symbolic;
-using HeuristicLab.Problems.DataAnalysis.Symbolic;
-using System.Collections.Generic;
-using HeuristicLab.Problems.DataAnalysis.Symbolic.Symbols;
-using HeuristicLab.Problems.DataAnalysis;
 using HeuristicLab.Problems.DataAnalysis.Evaluators;
-using System;
 
 namespace HeuristicLab.Problems.DataAnalysis.Regression.Symbolic.Analyzers {
Index: /trunk/sources/HeuristicLab.Problems.DataAnalysis.Regression/3.3/LinearRegression/LinearRegressionSolutionCreator.cs
===================================================================
--- /trunk/sources/HeuristicLab.Problems.DataAnalysis.Regression/3.3/LinearRegression/LinearRegressionSolutionCreator.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.Problems.DataAnalysis.Regression/3.3/LinearRegression/LinearRegressionSolutionCreator.cs	(revision 4068)
@@ -23,15 +23,13 @@
 using System.Collections.Generic;
 using System.Linq;
-using System.Text;
+using HeuristicLab.Core;
+using HeuristicLab.Data;
+using HeuristicLab.Encodings.SymbolicExpressionTreeEncoding;
+using HeuristicLab.Encodings.SymbolicExpressionTreeEncoding.Symbols;
+using HeuristicLab.Operators;
 using HeuristicLab.Optimization;
-using HeuristicLab.Operators;
+using HeuristicLab.Parameters;
 using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
-using HeuristicLab.Core;
-using HeuristicLab.Encodings.SymbolicExpressionTreeEncoding;
-using HeuristicLab.Problems.DataAnalysis.Symbolic;
 using HeuristicLab.Problems.DataAnalysis.Symbolic.Symbols;
-using HeuristicLab.Encodings.SymbolicExpressionTreeEncoding.Symbols;
-using HeuristicLab.Parameters;
-using HeuristicLab.Data;
 
 namespace HeuristicLab.Problems.DataAnalysis.Regression.LinearRegression {
@@ -50,6 +48,6 @@
       Parameters.Add(new LookupParameter<SymbolicExpressionTree>(SymbolicExpressionTreeParameterName, "The resulting solution encoded as a symbolic expression tree."));
       Parameters.Add(new LookupParameter<DataAnalysisProblemData>(DataAnalysisProblemDataParameterName, "The problem data on which the linear regression should be calculated."));
-      Parameters.Add(new ValueLookupParameter<IntValue>(SamplesStartParameterName,"The start of the samples on which the linear regression should be applied."));
-      Parameters.Add(new ValueLookupParameter<IntValue>(SamplesEndParameterName,"The end of the samples on which the linear regression should be applied."));
+      Parameters.Add(new ValueLookupParameter<IntValue>(SamplesStartParameterName, "The start of the samples on which the linear regression should be applied."));
+      Parameters.Add(new ValueLookupParameter<IntValue>(SamplesEndParameterName, "The end of the samples on which the linear regression should be applied."));
     }
     [StorableConstructor]
@@ -94,5 +92,5 @@
 
     public override IOperation Apply() {
-      SymbolicExpressionTree = CreateSymbolicExpressionTree(DataAnalysisProblemData.Dataset,DataAnalysisProblemData.TargetVariable.Value, DataAnalysisProblemData.InputVariables.CheckedItems.Select(x => x.Value.Value), SamplesStart.Value, SamplesEnd.Value);
+      SymbolicExpressionTree = CreateSymbolicExpressionTree(DataAnalysisProblemData.Dataset, DataAnalysisProblemData.TargetVariable.Value, DataAnalysisProblemData.InputVariables.CheckedItems.Select(x => x.Value.Value), SamplesStart.Value, SamplesEnd.Value);
       return base.Apply();
     }
Index: /trunk/sources/HeuristicLab.Problems.DataAnalysis.Regression/3.3/LinearRegression/LinearRegressionUtil.cs
===================================================================
--- /trunk/sources/HeuristicLab.Problems.DataAnalysis.Regression/3.3/LinearRegression/LinearRegressionUtil.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.Problems.DataAnalysis.Regression/3.3/LinearRegression/LinearRegressionUtil.cs	(revision 4068)
@@ -20,8 +20,6 @@
 #endregion
 
-using System;
 using System.Collections.Generic;
 using System.Linq;
-using System.Text;
 
 namespace HeuristicLab.Problems.DataAnalysis.Regression.LinearRegression {
@@ -30,5 +28,5 @@
       List<int> allowedRows = CalculateAllowedRows(dataset, targetVariable, allowedInputVariables, start, end);
 
-      double[,] matrix = new double[allowedRows.Count, allowedInputVariables.Count() +1];
+      double[,] matrix = new double[allowedRows.Count, allowedInputVariables.Count() + 1];
       for (int row = 0; row < allowedRows.Count; row++) {
         int col = 0;
Index: /trunk/sources/HeuristicLab.Problems.DataAnalysis.Regression/3.3/RandomEnumerable.cs
===================================================================
--- /trunk/sources/HeuristicLab.Problems.DataAnalysis.Regression/3.3/RandomEnumerable.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.Problems.DataAnalysis.Regression/3.3/RandomEnumerable.cs	(revision 4068)
@@ -22,6 +22,4 @@
 using System;
 using System.Collections.Generic;
-using System.Linq;
-using System.Text;
 using HeuristicLab.Random;
 
Index: /trunk/sources/HeuristicLab.Problems.DataAnalysis.Regression/3.3/SupportVectorRegression/BestSupportVectorRegressionSolutionAnalyzer.cs
===================================================================
--- /trunk/sources/HeuristicLab.Problems.DataAnalysis.Regression/3.3/SupportVectorRegression/BestSupportVectorRegressionSolutionAnalyzer.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.Problems.DataAnalysis.Regression/3.3/SupportVectorRegression/BestSupportVectorRegressionSolutionAnalyzer.cs	(revision 4068)
@@ -20,21 +20,13 @@
 #endregion
 
+using System.Collections.Generic;
 using System.Linq;
-using HeuristicLab.Common;
 using HeuristicLab.Core;
 using HeuristicLab.Data;
-using HeuristicLab.Operators;
 using HeuristicLab.Optimization;
 using HeuristicLab.Parameters;
 using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
-using HeuristicLab.Encodings.SymbolicExpressionTreeEncoding;
-using HeuristicLab.Problems.DataAnalysis.Regression.Symbolic;
-using HeuristicLab.Problems.DataAnalysis.Symbolic;
-using System.Collections.Generic;
-using HeuristicLab.Problems.DataAnalysis.Symbolic.Symbols;
-using HeuristicLab.Problems.DataAnalysis;
-using HeuristicLab.Problems.DataAnalysis.Evaluators;
+using HeuristicLab.Problems.DataAnalysis.Regression.Symbolic.Analyzers;
 using HeuristicLab.Problems.DataAnalysis.SupportVectorMachine;
-using HeuristicLab.Problems.DataAnalysis.Regression.Symbolic.Analyzers;
 
 namespace HeuristicLab.Problems.DataAnalysis.Regression.SupportVectorRegression {
Index: /trunk/sources/HeuristicLab.Problems.DataAnalysis.Regression/3.3/SupportVectorRegression/SupportVectorRegressionSolution.cs
===================================================================
--- /trunk/sources/HeuristicLab.Problems.DataAnalysis.Regression/3.3/SupportVectorRegression/SupportVectorRegressionSolution.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.Problems.DataAnalysis.Regression/3.3/SupportVectorRegression/SupportVectorRegressionSolution.cs	(revision 4068)
@@ -21,12 +21,9 @@
 
 using System;
-using HeuristicLab.Common;
+using System.Collections.Generic;
+using System.Drawing;
+using System.Linq;
 using HeuristicLab.Core;
-using HeuristicLab.Data;
 using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
-using HeuristicLab.Encodings.SymbolicExpressionTreeEncoding;
-using System.Collections.Generic;
-using System.Linq;
-using System.Drawing;
 using HeuristicLab.Problems.DataAnalysis.SupportVectorMachine;
 using SVM;
@@ -65,5 +62,5 @@
     private Dataset CalculateSupportVectors() {
       if (Model.Model.SupportVectorIndizes.Length == 0)
-        return new Dataset(new List<string>(),new double[0,0]);
+        return new Dataset(new List<string>(), new double[0, 0]);
 
       double[,] data = new double[Model.Model.SupportVectorIndizes.Length, ProblemData.Dataset.Columns];
Index: /trunk/sources/HeuristicLab.Problems.DataAnalysis.Regression/3.3/Symbolic/Analyzers/BestSymbolicRegressionSolutionAnalyzer.cs
===================================================================
--- /trunk/sources/HeuristicLab.Problems.DataAnalysis.Regression/3.3/Symbolic/Analyzers/BestSymbolicRegressionSolutionAnalyzer.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.Problems.DataAnalysis.Regression/3.3/Symbolic/Analyzers/BestSymbolicRegressionSolutionAnalyzer.cs	(revision 4068)
@@ -21,19 +21,12 @@
 
 using System.Linq;
-using HeuristicLab.Common;
+using HeuristicLab.Analysis;
 using HeuristicLab.Core;
 using HeuristicLab.Data;
-using HeuristicLab.Operators;
+using HeuristicLab.Encodings.SymbolicExpressionTreeEncoding;
 using HeuristicLab.Optimization;
 using HeuristicLab.Parameters;
 using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
-using HeuristicLab.Encodings.SymbolicExpressionTreeEncoding;
-using HeuristicLab.Problems.DataAnalysis.Regression.Symbolic;
 using HeuristicLab.Problems.DataAnalysis.Symbolic;
-using System.Collections.Generic;
-using HeuristicLab.Problems.DataAnalysis.Symbolic.Symbols;
-using HeuristicLab.Problems.DataAnalysis;
-using HeuristicLab.Problems.DataAnalysis.Evaluators;
-using HeuristicLab.Analysis;
 
 namespace HeuristicLab.Problems.DataAnalysis.Regression.Symbolic.Analyzers {
Index: /trunk/sources/HeuristicLab.Problems.DataAnalysis.Regression/3.3/Symbolic/Analyzers/FixedValidationBestScaledSymbolicRegressionSolutionAnalyzer.cs
===================================================================
--- /trunk/sources/HeuristicLab.Problems.DataAnalysis.Regression/3.3/Symbolic/Analyzers/FixedValidationBestScaledSymbolicRegressionSolutionAnalyzer.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.Problems.DataAnalysis.Regression/3.3/Symbolic/Analyzers/FixedValidationBestScaledSymbolicRegressionSolutionAnalyzer.cs	(revision 4068)
@@ -20,22 +20,16 @@
 #endregion
 
+using System.Collections.Generic;
 using System.Linq;
-using HeuristicLab.Common;
+using HeuristicLab.Analysis;
 using HeuristicLab.Core;
 using HeuristicLab.Data;
+using HeuristicLab.Encodings.SymbolicExpressionTreeEncoding;
 using HeuristicLab.Operators;
 using HeuristicLab.Optimization;
 using HeuristicLab.Parameters;
 using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
-using HeuristicLab.Encodings.SymbolicExpressionTreeEncoding;
-using HeuristicLab.Problems.DataAnalysis.Regression.Symbolic;
+using HeuristicLab.Problems.DataAnalysis.Evaluators;
 using HeuristicLab.Problems.DataAnalysis.Symbolic;
-using System.Collections.Generic;
-using HeuristicLab.Problems.DataAnalysis.Symbolic.Symbols;
-using HeuristicLab.Problems.DataAnalysis;
-using HeuristicLab.Analysis;
-using System;
-using HeuristicLab.Optimization.Operators;
-using HeuristicLab.Problems.DataAnalysis.Evaluators;
 
 namespace HeuristicLab.Problems.DataAnalysis.Regression.Symbolic.Analyzers {
Index: /trunk/sources/HeuristicLab.Problems.DataAnalysis.Regression/3.3/Symbolic/Analyzers/ISymbolicRegressionAnalyzer.cs
===================================================================
--- /trunk/sources/HeuristicLab.Problems.DataAnalysis.Regression/3.3/Symbolic/Analyzers/ISymbolicRegressionAnalyzer.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.Problems.DataAnalysis.Regression/3.3/Symbolic/Analyzers/ISymbolicRegressionAnalyzer.cs	(revision 4068)
@@ -20,19 +20,9 @@
 #endregion
 
-using System.Linq;
-using HeuristicLab.Common;
 using HeuristicLab.Core;
-using HeuristicLab.Data;
-using HeuristicLab.Operators;
+using HeuristicLab.Encodings.SymbolicExpressionTreeEncoding;
 using HeuristicLab.Optimization;
 using HeuristicLab.Parameters;
-using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
-using HeuristicLab.Encodings.SymbolicExpressionTreeEncoding;
-using HeuristicLab.Problems.DataAnalysis.Evaluators;
-using HeuristicLab.Problems.DataAnalysis.Symbolic;
-using System.Collections.Generic;
-using HeuristicLab.Analysis;
 
-using HeuristicLab.Problems.DataAnalysis.Symbolic.Symbols;
 
 namespace HeuristicLab.Problems.DataAnalysis.Regression.Symbolic.Analyzers {
Index: /trunk/sources/HeuristicLab.Problems.DataAnalysis.Regression/3.3/Symbolic/Analyzers/SymbolicRegressionModelQualityAnalyzer.cs
===================================================================
--- /trunk/sources/HeuristicLab.Problems.DataAnalysis.Regression/3.3/Symbolic/Analyzers/SymbolicRegressionModelQualityAnalyzer.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.Problems.DataAnalysis.Regression/3.3/Symbolic/Analyzers/SymbolicRegressionModelQualityAnalyzer.cs	(revision 4068)
@@ -20,22 +20,17 @@
 #endregion
 
+using System;
+using System.Collections.Generic;
 using System.Linq;
-using HeuristicLab.Common;
+using HeuristicLab.Analysis;
 using HeuristicLab.Core;
 using HeuristicLab.Data;
+using HeuristicLab.Encodings.SymbolicExpressionTreeEncoding;
 using HeuristicLab.Operators;
 using HeuristicLab.Optimization;
 using HeuristicLab.Parameters;
 using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
-using HeuristicLab.Encodings.SymbolicExpressionTreeEncoding;
-using HeuristicLab.Problems.DataAnalysis.Regression.Symbolic;
+using HeuristicLab.Problems.DataAnalysis.Evaluators;
 using HeuristicLab.Problems.DataAnalysis.Symbolic;
-using System.Collections.Generic;
-using HeuristicLab.Problems.DataAnalysis.Symbolic.Symbols;
-using HeuristicLab.Problems.DataAnalysis;
-using HeuristicLab.Analysis;
-using HeuristicLab.Problems.DataAnalysis.Evaluators;
-using HeuristicLab.Optimization.Operators;
-using System;
 
 namespace HeuristicLab.Problems.DataAnalysis.Regression.Symbolic.Analyzers {
Index: /trunk/sources/HeuristicLab.Problems.DataAnalysis.Regression/3.3/Symbolic/Analyzers/SymbolicRegressionModelQualityCalculator.cs
===================================================================
--- /trunk/sources/HeuristicLab.Problems.DataAnalysis.Regression/3.3/Symbolic/Analyzers/SymbolicRegressionModelQualityCalculator.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.Problems.DataAnalysis.Regression/3.3/Symbolic/Analyzers/SymbolicRegressionModelQualityCalculator.cs	(revision 4068)
@@ -20,20 +20,12 @@
 #endregion
 
-using System.Linq;
-using HeuristicLab.Common;
 using HeuristicLab.Core;
 using HeuristicLab.Data;
+using HeuristicLab.Encodings.SymbolicExpressionTreeEncoding;
 using HeuristicLab.Operators;
-using HeuristicLab.Optimization;
 using HeuristicLab.Parameters;
 using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
-using HeuristicLab.Encodings.SymbolicExpressionTreeEncoding;
-using HeuristicLab.Problems.DataAnalysis.Regression.Symbolic;
+using HeuristicLab.Problems.DataAnalysis.Evaluators;
 using HeuristicLab.Problems.DataAnalysis.Symbolic;
-using System.Collections.Generic;
-using HeuristicLab.Problems.DataAnalysis.Symbolic.Symbols;
-using HeuristicLab.Problems.DataAnalysis;
-using HeuristicLab.Analysis;
-using HeuristicLab.Problems.DataAnalysis.Evaluators;
 
 namespace HeuristicLab.Problems.DataAnalysis.Regression.Symbolic.Analyzers {
@@ -102,5 +94,5 @@
       Parameters.Add(new ValueLookupParameter<DoubleValue>(RSQuaredQualityParameterName, "The R² correlation coefficient of the output of the model and the original target values."));
       Parameters.Add(new ValueLookupParameter<DoubleValue>(RelativeErrorQualityParameterName, "The average relative percentage error of the output of the model."));
-      
+
       #region operator initialization
       SimpleSymbolicRegressionEvaluator simpleEvaluator = new SimpleSymbolicRegressionEvaluator();
Index: /trunk/sources/HeuristicLab.Problems.DataAnalysis.Regression/3.3/Symbolic/Analyzers/SymbolicRegressionSolutionLinearScaler.cs
===================================================================
--- /trunk/sources/HeuristicLab.Problems.DataAnalysis.Regression/3.3/Symbolic/Analyzers/SymbolicRegressionSolutionLinearScaler.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.Problems.DataAnalysis.Regression/3.3/Symbolic/Analyzers/SymbolicRegressionSolutionLinearScaler.cs	(revision 4068)
@@ -20,18 +20,11 @@
 #endregion
 
-using System.Linq;
-using HeuristicLab.Common;
 using HeuristicLab.Core;
 using HeuristicLab.Data;
+using HeuristicLab.Encodings.SymbolicExpressionTreeEncoding;
 using HeuristicLab.Operators;
-using HeuristicLab.Optimization;
 using HeuristicLab.Parameters;
 using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
-using HeuristicLab.Encodings.SymbolicExpressionTreeEncoding;
-using HeuristicLab.Problems.DataAnalysis.Regression.Symbolic;
-using HeuristicLab.Problems.DataAnalysis.Symbolic;
-using System.Collections.Generic;
 using HeuristicLab.Problems.DataAnalysis.Symbolic.Symbols;
-using HeuristicLab.Problems.DataAnalysis;
 
 namespace HeuristicLab.Problems.DataAnalysis.Regression.Symbolic.Analyzers {
Index: /trunk/sources/HeuristicLab.Problems.DataAnalysis.Regression/3.3/Symbolic/Analyzers/SymbolicRegressionTournamentPruning.cs
===================================================================
--- /trunk/sources/HeuristicLab.Problems.DataAnalysis.Regression/3.3/Symbolic/Analyzers/SymbolicRegressionTournamentPruning.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.Problems.DataAnalysis.Regression/3.3/Symbolic/Analyzers/SymbolicRegressionTournamentPruning.cs	(revision 4068)
@@ -24,12 +24,10 @@
 using HeuristicLab.Core;
 using HeuristicLab.Data;
-using System;
+using HeuristicLab.Encodings.SymbolicExpressionTreeEncoding;
 using HeuristicLab.Operators;
+using HeuristicLab.Optimization;
 using HeuristicLab.Parameters;
-using HeuristicLab.Encodings.SymbolicExpressionTreeEncoding;
 using HeuristicLab.Problems.DataAnalysis.Symbolic;
 using HeuristicLab.Problems.DataAnalysis.Symbolic.Symbols;
-using HeuristicLab.Encodings.SymbolicExpressionTreeEncoding.Symbols;
-using HeuristicLab.Optimization;
 
 namespace HeuristicLab.Problems.DataAnalysis.Regression.Symbolic.Analyzers {
Index: /trunk/sources/HeuristicLab.Problems.DataAnalysis.Regression/3.3/Symbolic/Analyzers/SymbolicRegressionVariableFrequencyAnalyzer.cs
===================================================================
--- /trunk/sources/HeuristicLab.Problems.DataAnalysis.Regression/3.3/Symbolic/Analyzers/SymbolicRegressionVariableFrequencyAnalyzer.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.Problems.DataAnalysis.Regression/3.3/Symbolic/Analyzers/SymbolicRegressionVariableFrequencyAnalyzer.cs	(revision 4068)
@@ -21,18 +21,12 @@
 
 using System.Linq;
-using HeuristicLab.Common;
+using HeuristicLab.Analysis;
 using HeuristicLab.Core;
-using HeuristicLab.Data;
+using HeuristicLab.Encodings.SymbolicExpressionTreeEncoding;
 using HeuristicLab.Operators;
 using HeuristicLab.Optimization;
 using HeuristicLab.Parameters;
 using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
-using HeuristicLab.Encodings.SymbolicExpressionTreeEncoding;
-using HeuristicLab.Problems.DataAnalysis.Regression.Symbolic;
 using HeuristicLab.Problems.DataAnalysis.Symbolic;
-using System.Collections.Generic;
-using HeuristicLab.Problems.DataAnalysis.Symbolic.Symbols;
-using HeuristicLab.Problems.DataAnalysis;
-using HeuristicLab.Analysis;
 
 namespace HeuristicLab.Problems.DataAnalysis.Regression.Symbolic.Analyzers {
Index: /trunk/sources/HeuristicLab.Problems.DataAnalysis.Regression/3.3/Symbolic/Analyzers/ValidationBestScaledSymbolicRegressionSolutionAnalyzer.cs
===================================================================
--- /trunk/sources/HeuristicLab.Problems.DataAnalysis.Regression/3.3/Symbolic/Analyzers/ValidationBestScaledSymbolicRegressionSolutionAnalyzer.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.Problems.DataAnalysis.Regression/3.3/Symbolic/Analyzers/ValidationBestScaledSymbolicRegressionSolutionAnalyzer.cs	(revision 4068)
@@ -20,21 +20,16 @@
 #endregion
 
-using System.Linq;
+using System;
+using HeuristicLab.Analysis;
 using HeuristicLab.Common;
 using HeuristicLab.Core;
 using HeuristicLab.Data;
+using HeuristicLab.Encodings.SymbolicExpressionTreeEncoding;
 using HeuristicLab.Operators;
 using HeuristicLab.Optimization;
+using HeuristicLab.Optimization.Operators;
 using HeuristicLab.Parameters;
 using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
-using HeuristicLab.Encodings.SymbolicExpressionTreeEncoding;
-using HeuristicLab.Problems.DataAnalysis.Regression.Symbolic;
 using HeuristicLab.Problems.DataAnalysis.Symbolic;
-using System.Collections.Generic;
-using HeuristicLab.Problems.DataAnalysis.Symbolic.Symbols;
-using HeuristicLab.Problems.DataAnalysis;
-using HeuristicLab.Analysis;
-using System;
-using HeuristicLab.Optimization.Operators;
 
 namespace HeuristicLab.Problems.DataAnalysis.Regression.Symbolic.Analyzers {
Index: /trunk/sources/HeuristicLab.Problems.DataAnalysis.Regression/3.3/Symbolic/ISymbolicRegressionEvaluator.cs
===================================================================
--- /trunk/sources/HeuristicLab.Problems.DataAnalysis.Regression/3.3/Symbolic/ISymbolicRegressionEvaluator.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.Problems.DataAnalysis.Regression/3.3/Symbolic/ISymbolicRegressionEvaluator.cs	(revision 4068)
@@ -20,17 +20,8 @@
 #endregion
 
-using System;
-using System.Collections.Generic;
-using System.Linq;
-using System.Drawing;
-using HeuristicLab.Common;
 using HeuristicLab.Core;
 using HeuristicLab.Data;
+using HeuristicLab.Encodings.SymbolicExpressionTreeEncoding;
 using HeuristicLab.Optimization;
-using HeuristicLab.Parameters;
-using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
-using HeuristicLab.PluginInfrastructure;
-using HeuristicLab.Encodings.SymbolicExpressionTreeEncoding;
-using HeuristicLab.Problems.DataAnalysis;
 
 namespace HeuristicLab.Problems.DataAnalysis.Regression.Symbolic {
Index: /trunk/sources/HeuristicLab.Problems.DataAnalysis.Regression/3.3/Symbolic/SimpleSymbolicRegressionEvaluator.cs
===================================================================
--- /trunk/sources/HeuristicLab.Problems.DataAnalysis.Regression/3.3/Symbolic/SimpleSymbolicRegressionEvaluator.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.Problems.DataAnalysis.Regression/3.3/Symbolic/SimpleSymbolicRegressionEvaluator.cs	(revision 4068)
@@ -21,17 +21,11 @@
 
 using System;
-using System.Collections.Generic;
 using System.Linq;
-using System.Drawing;
-using HeuristicLab.Common;
 using HeuristicLab.Core;
 using HeuristicLab.Data;
-using HeuristicLab.Optimization;
+using HeuristicLab.Encodings.SymbolicExpressionTreeEncoding;
+using HeuristicLab.Operators;
 using HeuristicLab.Parameters;
 using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
-using HeuristicLab.PluginInfrastructure;
-using HeuristicLab.Encodings.SymbolicExpressionTreeEncoding;
-using HeuristicLab.Problems.DataAnalysis;
-using HeuristicLab.Operators;
 using HeuristicLab.Problems.DataAnalysis.Symbolic;
 
Index: /trunk/sources/HeuristicLab.Problems.DataAnalysis.Regression/3.3/Symbolic/SymbolicRegressionEvaluator.cs
===================================================================
--- /trunk/sources/HeuristicLab.Problems.DataAnalysis.Regression/3.3/Symbolic/SymbolicRegressionEvaluator.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.Problems.DataAnalysis.Regression/3.3/Symbolic/SymbolicRegressionEvaluator.cs	(revision 4068)
@@ -22,18 +22,11 @@
 using System;
 using System.Collections.Generic;
-using System.Linq;
-using System.Drawing;
-using HeuristicLab.Common;
 using HeuristicLab.Core;
 using HeuristicLab.Data;
-using HeuristicLab.Optimization;
+using HeuristicLab.Encodings.SymbolicExpressionTreeEncoding;
+using HeuristicLab.Operators;
 using HeuristicLab.Parameters;
 using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
-using HeuristicLab.PluginInfrastructure;
-using HeuristicLab.Encodings.SymbolicExpressionTreeEncoding;
-using HeuristicLab.Problems.DataAnalysis;
-using HeuristicLab.Operators;
 using HeuristicLab.Problems.DataAnalysis.Symbolic;
-using HeuristicLab.Random;
 
 namespace HeuristicLab.Problems.DataAnalysis.Regression.Symbolic {
Index: /trunk/sources/HeuristicLab.Problems.DataAnalysis.Regression/3.3/Symbolic/SymbolicRegressionMeanSquaredErrorEvaluator.cs
===================================================================
--- /trunk/sources/HeuristicLab.Problems.DataAnalysis.Regression/3.3/Symbolic/SymbolicRegressionMeanSquaredErrorEvaluator.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.Problems.DataAnalysis.Regression/3.3/Symbolic/SymbolicRegressionMeanSquaredErrorEvaluator.cs	(revision 4068)
@@ -22,16 +22,9 @@
 using System;
 using System.Collections.Generic;
-using System.Linq;
-using System.Drawing;
-using HeuristicLab.Common;
 using HeuristicLab.Core;
 using HeuristicLab.Data;
-using HeuristicLab.Optimization;
+using HeuristicLab.Encodings.SymbolicExpressionTreeEncoding;
 using HeuristicLab.Parameters;
 using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
-using HeuristicLab.PluginInfrastructure;
-using HeuristicLab.Encodings.SymbolicExpressionTreeEncoding;
-using HeuristicLab.Problems.DataAnalysis;
-using HeuristicLab.Operators;
 using HeuristicLab.Problems.DataAnalysis.Evaluators;
 using HeuristicLab.Problems.DataAnalysis.Symbolic;
Index: /trunk/sources/HeuristicLab.Problems.DataAnalysis.Regression/3.3/Symbolic/SymbolicRegressionModel.cs
===================================================================
--- /trunk/sources/HeuristicLab.Problems.DataAnalysis.Regression/3.3/Symbolic/SymbolicRegressionModel.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.Problems.DataAnalysis.Regression/3.3/Symbolic/SymbolicRegressionModel.cs	(revision 4068)
@@ -20,18 +20,10 @@
 #endregion
 
-using System;
 using System.Collections.Generic;
-using System.Drawing;
 using System.Linq;
 using HeuristicLab.Common;
 using HeuristicLab.Core;
-using HeuristicLab.Data;
 using HeuristicLab.Encodings.SymbolicExpressionTreeEncoding;
-using HeuristicLab.Operators;
-using HeuristicLab.Optimization;
-using HeuristicLab.Parameters;
 using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
-using HeuristicLab.PluginInfrastructure;
-using HeuristicLab.Problems.DataAnalysis;
 using HeuristicLab.Problems.DataAnalysis.Symbolic;
 using HeuristicLab.Problems.DataAnalysis.Symbolic.Symbols;
Index: /trunk/sources/HeuristicLab.Problems.DataAnalysis.Regression/3.3/Symbolic/SymbolicRegressionProblem.cs
===================================================================
--- /trunk/sources/HeuristicLab.Problems.DataAnalysis.Regression/3.3/Symbolic/SymbolicRegressionProblem.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.Problems.DataAnalysis.Regression/3.3/Symbolic/SymbolicRegressionProblem.cs	(revision 4068)
@@ -23,22 +23,17 @@
 using System.Collections.Generic;
 using System.Linq;
-using System.Drawing;
 using HeuristicLab.Common;
 using HeuristicLab.Core;
 using HeuristicLab.Data;
+using HeuristicLab.Encodings.SymbolicExpressionTreeEncoding;
+using HeuristicLab.Encodings.SymbolicExpressionTreeEncoding.Analyzers;
+using HeuristicLab.Encodings.SymbolicExpressionTreeEncoding.Creators;
+using HeuristicLab.Encodings.SymbolicExpressionTreeEncoding.Interfaces;
 using HeuristicLab.Optimization;
 using HeuristicLab.Parameters;
 using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
 using HeuristicLab.PluginInfrastructure;
-using HeuristicLab.Encodings.SymbolicExpressionTreeEncoding;
-using HeuristicLab.Problems.DataAnalysis.Regression;
+using HeuristicLab.Problems.DataAnalysis.Regression.Symbolic.Analyzers;
 using HeuristicLab.Problems.DataAnalysis.Symbolic;
-using HeuristicLab.Encodings.SymbolicExpressionTreeEncoding.ArchitectureManipulators;
-using HeuristicLab.Encodings.SymbolicExpressionTreeEncoding.Manipulators;
-using HeuristicLab.Encodings.SymbolicExpressionTreeEncoding.Crossovers;
-using HeuristicLab.Encodings.SymbolicExpressionTreeEncoding.Creators;
-using HeuristicLab.Encodings.SymbolicExpressionTreeEncoding.Interfaces;
-using HeuristicLab.Problems.DataAnalysis.Regression.Symbolic.Analyzers;
-using HeuristicLab.Encodings.SymbolicExpressionTreeEncoding.Analyzers;
 
 namespace HeuristicLab.Problems.DataAnalysis.Regression.Symbolic {
Index: /trunk/sources/HeuristicLab.Problems.DataAnalysis.Regression/3.3/Symbolic/SymbolicRegressionScaledMeanAndVarianceSquaredErrorEvaluator.cs
===================================================================
--- /trunk/sources/HeuristicLab.Problems.DataAnalysis.Regression/3.3/Symbolic/SymbolicRegressionScaledMeanAndVarianceSquaredErrorEvaluator.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.Problems.DataAnalysis.Regression/3.3/Symbolic/SymbolicRegressionScaledMeanAndVarianceSquaredErrorEvaluator.cs	(revision 4068)
@@ -22,16 +22,10 @@
 using System;
 using System.Collections.Generic;
-using System.Linq;
-using System.Drawing;
 using HeuristicLab.Common;
 using HeuristicLab.Core;
 using HeuristicLab.Data;
-using HeuristicLab.Optimization;
+using HeuristicLab.Encodings.SymbolicExpressionTreeEncoding;
 using HeuristicLab.Parameters;
 using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
-using HeuristicLab.PluginInfrastructure;
-using HeuristicLab.Encodings.SymbolicExpressionTreeEncoding;
-using HeuristicLab.Problems.DataAnalysis;
-using HeuristicLab.Operators;
 using HeuristicLab.Problems.DataAnalysis.Evaluators;
 using HeuristicLab.Problems.DataAnalysis.Symbolic;
Index: /trunk/sources/HeuristicLab.Problems.DataAnalysis.Regression/3.3/Symbolic/SymbolicRegressionScaledMeanSquaredErrorEvaluator.cs
===================================================================
--- /trunk/sources/HeuristicLab.Problems.DataAnalysis.Regression/3.3/Symbolic/SymbolicRegressionScaledMeanSquaredErrorEvaluator.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.Problems.DataAnalysis.Regression/3.3/Symbolic/SymbolicRegressionScaledMeanSquaredErrorEvaluator.cs	(revision 4068)
@@ -22,16 +22,10 @@
 using System;
 using System.Collections.Generic;
-using System.Linq;
-using System.Drawing;
 using HeuristicLab.Common;
 using HeuristicLab.Core;
 using HeuristicLab.Data;
-using HeuristicLab.Optimization;
+using HeuristicLab.Encodings.SymbolicExpressionTreeEncoding;
 using HeuristicLab.Parameters;
 using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
-using HeuristicLab.PluginInfrastructure;
-using HeuristicLab.Encodings.SymbolicExpressionTreeEncoding;
-using HeuristicLab.Problems.DataAnalysis;
-using HeuristicLab.Operators;
 using HeuristicLab.Problems.DataAnalysis.Evaluators;
 using HeuristicLab.Problems.DataAnalysis.Symbolic;
@@ -75,5 +69,5 @@
 
     public static double Calculate(ISymbolicExpressionTreeInterpreter interpreter, SymbolicExpressionTree solution, double lowerEstimationLimit, double upperEstimationLimit, Dataset dataset, string targetVariable, IEnumerable<int> rows, out double beta, out double alpha) {
-      IEnumerable<double> originalValues = dataset.GetEnumeratedVariableValues(targetVariable,rows);
+      IEnumerable<double> originalValues = dataset.GetEnumeratedVariableValues(targetVariable, rows);
       IEnumerable<double> estimatedValues = interpreter.GetSymbolicExpressionTreeValues(solution, dataset, rows);
       CalculateScalingParameters(originalValues, estimatedValues, out beta, out alpha);
Index: /trunk/sources/HeuristicLab.Problems.DataAnalysis.Regression/3.3/Symbolic/SymbolicRegressionSolution.cs
===================================================================
--- /trunk/sources/HeuristicLab.Problems.DataAnalysis.Regression/3.3/Symbolic/SymbolicRegressionSolution.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.Problems.DataAnalysis.Regression/3.3/Symbolic/SymbolicRegressionSolution.cs	(revision 4068)
@@ -21,12 +21,9 @@
 
 using System;
-using HeuristicLab.Common;
+using System.Collections.Generic;
+using System.Drawing;
+using System.Linq;
 using HeuristicLab.Core;
-using HeuristicLab.Data;
 using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
-using HeuristicLab.Encodings.SymbolicExpressionTreeEncoding;
-using System.Collections.Generic;
-using System.Linq;
-using System.Drawing;
 
 namespace HeuristicLab.Problems.DataAnalysis.Regression.Symbolic {
Index: /trunk/sources/HeuristicLab.Problems.DataAnalysis.Views/3.3/DataAnalysisProblemDataView.cs
===================================================================
--- /trunk/sources/HeuristicLab.Problems.DataAnalysis.Views/3.3/DataAnalysisProblemDataView.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.Problems.DataAnalysis.Views/3.3/DataAnalysisProblemDataView.cs	(revision 4068)
@@ -21,10 +21,4 @@
 
 using System;
-using System.Collections.Generic;
-using System.ComponentModel;
-using System.Drawing;
-using System.Data;
-using System.Linq;
-using System.Text;
 using System.Windows.Forms;
 using HeuristicLab.Core.Views;
Index: /trunk/sources/HeuristicLab.Problems.DataAnalysis.Views/3.3/DataAnalysisSolutionView.cs
===================================================================
--- /trunk/sources/HeuristicLab.Problems.DataAnalysis.Views/3.3/DataAnalysisSolutionView.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.Problems.DataAnalysis.Views/3.3/DataAnalysisSolutionView.cs	(revision 4068)
@@ -20,10 +20,4 @@
 #endregion
 using System;
-using System.Collections.Generic;
-using System.ComponentModel;
-using System.Drawing;
-using System.Data;
-using System.Linq;
-using System.Text;
 using System.Windows.Forms;
 using HeuristicLab.MainForm;
Index: /trunk/sources/HeuristicLab.Problems.DataAnalysis.Views/3.3/EstimatedValuesView.cs
===================================================================
--- /trunk/sources/HeuristicLab.Problems.DataAnalysis.Views/3.3/EstimatedValuesView.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.Problems.DataAnalysis.Views/3.3/EstimatedValuesView.cs	(revision 4068)
@@ -20,19 +20,10 @@
 #endregion
 using System;
-using System.Collections.Generic;
-using System.Collections.Specialized;
-using System.ComponentModel;
-using System.Data;
-using System.Drawing;
 using System.Linq;
-using System.Text;
 using System.Windows.Forms;
-using HeuristicLab.Common;
+using HeuristicLab.Data;
+using HeuristicLab.Data.Views;
 using HeuristicLab.MainForm;
-using HeuristicLab.Problems.DataAnalysis;
 using HeuristicLab.MainForm.WindowsForms;
-using System.Windows.Forms.DataVisualization.Charting;
-using HeuristicLab.Data.Views;
-using HeuristicLab.Data;
 
 namespace HeuristicLab.Problems.DataAnalysis.Views {
Index: /trunk/sources/HeuristicLab.Problems.DataAnalysis.Views/3.3/LineChartView.cs
===================================================================
--- /trunk/sources/HeuristicLab.Problems.DataAnalysis.Views/3.3/LineChartView.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.Problems.DataAnalysis.Views/3.3/LineChartView.cs	(revision 4068)
@@ -20,17 +20,10 @@
 #endregion
 using System;
-using System.Collections.Generic;
-using System.Collections.Specialized;
-using System.ComponentModel;
-using System.Data;
 using System.Drawing;
 using System.Linq;
-using System.Text;
 using System.Windows.Forms;
-using HeuristicLab.Common;
+using System.Windows.Forms.DataVisualization.Charting;
 using HeuristicLab.MainForm;
-using HeuristicLab.Problems.DataAnalysis;
 using HeuristicLab.MainForm.WindowsForms;
-using System.Windows.Forms.DataVisualization.Charting;
 
 namespace HeuristicLab.Problems.DataAnalysis.Views {
Index: /trunk/sources/HeuristicLab.Problems.DataAnalysis.Views/3.3/ResultsView.cs
===================================================================
--- /trunk/sources/HeuristicLab.Problems.DataAnalysis.Views/3.3/ResultsView.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.Problems.DataAnalysis.Views/3.3/ResultsView.cs	(revision 4068)
@@ -21,18 +21,12 @@
 using System;
 using System.Collections.Generic;
-using System.ComponentModel;
-using System.Drawing;
-using System.Data;
-using System.Linq;
-using System.Text;
 using System.Windows.Forms;
+using HeuristicLab.Data;
 using HeuristicLab.MainForm;
 using HeuristicLab.MainForm.WindowsForms;
-using HeuristicLab.Data.Views;
-using HeuristicLab.Data;
 using HeuristicLab.Problems.DataAnalysis.Evaluators;
 
 namespace HeuristicLab.Problems.DataAnalysis.Views {
-  [Content(typeof(DataAnalysisSolution),false)]
+  [Content(typeof(DataAnalysisSolution), false)]
   [View("Results View")]
   public partial class ResultsView : AsynchronousContentView {
Index: /trunk/sources/HeuristicLab.Problems.DataAnalysis.Views/3.3/RunCollectionVariableImpactView.cs
===================================================================
--- /trunk/sources/HeuristicLab.Problems.DataAnalysis.Views/3.3/RunCollectionVariableImpactView.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.Problems.DataAnalysis.Views/3.3/RunCollectionVariableImpactView.cs	(revision 4068)
@@ -20,18 +20,12 @@
 #endregion
 
-using System;
 using System.Collections.Generic;
-using System.ComponentModel;
-using System.Drawing;
-using System.Data;
 using System.Linq;
-using System.Text;
 using System.Windows.Forms;
+using alglib;
+using HeuristicLab.Common;
+using HeuristicLab.Data;
 using HeuristicLab.MainForm;
 using HeuristicLab.MainForm.WindowsForms;
-using HeuristicLab.Core;
-using HeuristicLab.Common;
-using HeuristicLab.Data;
-using alglib;
 using HeuristicLab.Optimization;
 
@@ -84,5 +78,5 @@
       DoubleMatrix matrix = null;
       if (Content != null) {
-        List<IRun> runsWithVariables = Content.Where(r => r.Results.ContainsKey(variableImpactResultName)).ToList() ;
+        List<IRun> runsWithVariables = Content.Where(r => r.Results.ContainsKey(variableImpactResultName)).ToList();
         IEnumerable<DoubleMatrix> variableImpacts = (from run in runsWithVariables
                                                      select run.Results[variableImpactResultName]).Cast<DoubleMatrix>();
@@ -100,5 +94,5 @@
         matrix.ColumnNames = columnNames;
 
-        for(int i = 0; i< runsWithVariables.Count; i++) {
+        for (int i = 0; i < runsWithVariables.Count; i++) {
           IRun run = runsWithVariables[i];
           DoubleMatrix runVariableImpacts = (DoubleMatrix)run.Results[variableImpactResultName];
Index: /trunk/sources/HeuristicLab.Problems.DataAnalysis.Views/3.3/ScatterPlotView.cs
===================================================================
--- /trunk/sources/HeuristicLab.Problems.DataAnalysis.Views/3.3/ScatterPlotView.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.Problems.DataAnalysis.Views/3.3/ScatterPlotView.cs	(revision 4068)
@@ -21,15 +21,9 @@
 using System;
 using System.Collections.Generic;
-using System.ComponentModel;
 using System.Drawing;
-using System.Data;
 using System.Linq;
-using System.Text;
 using System.Windows.Forms;
 using System.Windows.Forms.DataVisualization.Charting;
-using HeuristicLab.Common;
-using System.Collections.Specialized;
 using HeuristicLab.MainForm;
-using HeuristicLab.Problems.DataAnalysis;
 using HeuristicLab.MainForm.WindowsForms;
 
Index: /trunk/sources/HeuristicLab.Problems.DataAnalysis.Views/3.3/SupportVectorMachineModelView.cs
===================================================================
--- /trunk/sources/HeuristicLab.Problems.DataAnalysis.Views/3.3/SupportVectorMachineModelView.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.Problems.DataAnalysis.Views/3.3/SupportVectorMachineModelView.cs	(revision 4068)
@@ -20,19 +20,9 @@
 #endregion
 using System;
-using System.Collections.Generic;
-using System.Collections.Specialized;
-using System.ComponentModel;
-using System.Data;
-using System.Drawing;
-using System.Linq;
-using System.Text;
+using System.IO;
 using System.Windows.Forms;
-using HeuristicLab.Common;
 using HeuristicLab.MainForm;
-using HeuristicLab.Problems.DataAnalysis;
 using HeuristicLab.MainForm.WindowsForms;
-using System.Windows.Forms.DataVisualization.Charting;
 using HeuristicLab.Problems.DataAnalysis.SupportVectorMachine;
-using System.IO;
 
 namespace HeuristicLab.Problems.DataAnalysis.Views {
Index: /trunk/sources/HeuristicLab.Problems.DataAnalysis.Views/3.3/SupportVectorRegressionSolutionView.cs
===================================================================
--- /trunk/sources/HeuristicLab.Problems.DataAnalysis.Views/3.3/SupportVectorRegressionSolutionView.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.Problems.DataAnalysis.Views/3.3/SupportVectorRegressionSolutionView.cs	(revision 4068)
@@ -19,20 +19,7 @@
  */
 #endregion
-using System;
-using System.Collections.Generic;
-using System.Collections.Specialized;
-using System.ComponentModel;
-using System.Data;
-using System.Drawing;
-using System.Linq;
-using System.Text;
 using System.Windows.Forms;
-using HeuristicLab.Common;
 using HeuristicLab.MainForm;
-using HeuristicLab.Problems.DataAnalysis;
 using HeuristicLab.MainForm.WindowsForms;
-using System.Windows.Forms.DataVisualization.Charting;
-using HeuristicLab.Problems.DataAnalysis.SupportVectorMachine;
-using System.IO;
 using HeuristicLab.Problems.DataAnalysis.Regression.SupportVectorRegression;
 
Index: /trunk/sources/HeuristicLab.Problems.DataAnalysis.Views/3.3/Symbolic/InteractiveSymbolicRegressionSolutionSimplifierView.cs
===================================================================
--- /trunk/sources/HeuristicLab.Problems.DataAnalysis.Views/3.3/Symbolic/InteractiveSymbolicRegressionSolutionSimplifierView.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.Problems.DataAnalysis.Views/3.3/Symbolic/InteractiveSymbolicRegressionSolutionSimplifierView.cs	(revision 4068)
@@ -22,19 +22,15 @@
 using System;
 using System.Collections.Generic;
-using System.ComponentModel;
-using System.Data;
 using System.Drawing;
 using System.Linq;
-using System.Text;
 using System.Windows.Forms;
 using HeuristicLab.Common;
 using HeuristicLab.Encodings.SymbolicExpressionTreeEncoding;
 using HeuristicLab.Encodings.SymbolicExpressionTreeEncoding.Symbols;
-using HeuristicLab.MainForm;
+using HeuristicLab.Encodings.SymbolicExpressionTreeEncoding.Views;
 using HeuristicLab.MainForm.WindowsForms;
 using HeuristicLab.Problems.DataAnalysis.Regression.Symbolic;
 using HeuristicLab.Problems.DataAnalysis.Symbolic;
 using HeuristicLab.Problems.DataAnalysis.Symbolic.Symbols;
-using HeuristicLab.Encodings.SymbolicExpressionTreeEncoding.Views;
 
 namespace HeuristicLab.Problems.DataAnalysis.Views.Symbolic {
Index: /trunk/sources/HeuristicLab.Problems.DataAnalysis.Views/3.3/Symbolic/SimplifiedSymbolicExpressionModelView.cs
===================================================================
--- /trunk/sources/HeuristicLab.Problems.DataAnalysis.Views/3.3/Symbolic/SimplifiedSymbolicExpressionModelView.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.Problems.DataAnalysis.Views/3.3/Symbolic/SimplifiedSymbolicExpressionModelView.cs	(revision 4068)
@@ -20,19 +20,8 @@
 #endregion
 
-using System;
-using System.Collections.Generic;
-using System.ComponentModel;
-using System.Drawing;
-using System.Data;
-using System.Linq;
-using System.Text;
 using System.Windows.Forms;
-using HeuristicLab.Common;
 using HeuristicLab.MainForm;
-using HeuristicLab.Problems.DataAnalysis;
 using HeuristicLab.MainForm.WindowsForms;
 using HeuristicLab.Problems.DataAnalysis.Regression.Symbolic;
-using HeuristicLab.Encodings.SymbolicExpressionTreeEncoding.Views;
-using HeuristicLab.Encodings.SymbolicExpressionTreeEncoding;
 using HeuristicLab.Problems.DataAnalysis.Symbolic;
 
Index: /trunk/sources/HeuristicLab.Problems.DataAnalysis.Views/3.3/Symbolic/SymbolicExpressionModelView.cs
===================================================================
--- /trunk/sources/HeuristicLab.Problems.DataAnalysis.Views/3.3/Symbolic/SymbolicExpressionModelView.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.Problems.DataAnalysis.Views/3.3/Symbolic/SymbolicExpressionModelView.cs	(revision 4068)
@@ -20,24 +20,12 @@
 #endregion
 
-using System;
-using System.Collections.Generic;
-using System.ComponentModel;
-using System.Drawing;
-using System.Data;
-using System.Linq;
-using System.Text;
 using System.Windows.Forms;
-using HeuristicLab.Common;
 using HeuristicLab.MainForm;
-using HeuristicLab.Problems.DataAnalysis;
 using HeuristicLab.MainForm.WindowsForms;
 using HeuristicLab.Problems.DataAnalysis.Regression.Symbolic;
-using HeuristicLab.Encodings.SymbolicExpressionTreeEncoding.Views;
-using HeuristicLab.Encodings.SymbolicExpressionTreeEncoding;
-using HeuristicLab.Problems.DataAnalysis.Symbolic;
 
 namespace HeuristicLab.Problems.DataAnalysis.Views.Symbolic {
   [View("Symbolic Expression Model View")]
-  [Content(typeof(SymbolicRegressionModel),true)]
+  [Content(typeof(SymbolicRegressionModel), true)]
   public partial class SymbolicExpressionModelView : AsynchronousContentView {
     public SymbolicExpressionModelView()
Index: /trunk/sources/HeuristicLab.Problems.DataAnalysis.Views/3.3/Symbolic/SymbolicRegressionSolutionView.cs
===================================================================
--- /trunk/sources/HeuristicLab.Problems.DataAnalysis.Views/3.3/Symbolic/SymbolicRegressionSolutionView.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.Problems.DataAnalysis.Views/3.3/Symbolic/SymbolicRegressionSolutionView.cs	(revision 4068)
@@ -21,10 +21,4 @@
 
 using System;
-using System.Collections.Generic;
-using System.ComponentModel;
-using System.Drawing;
-using System.Data;
-using System.Linq;
-using System.Text;
 using System.Windows.Forms;
 using HeuristicLab.MainForm;
@@ -40,11 +34,11 @@
 
     protected new SymbolicRegressionSolution Content {
-      get { return  (SymbolicRegressionSolution)base.Content; }
-      set { base.Content = value;}
+      get { return (SymbolicRegressionSolution)base.Content; }
+      set { base.Content = value; }
     }
 
     private void btn_SimplifyModel_Click(object sender, EventArgs e) {
       InteractiveSymbolicRegressionSolutionSimplifierView view = new InteractiveSymbolicRegressionSolutionSimplifierView();
-      view.Content = (SymbolicRegressionSolution) this.Content.Clone();
+      view.Content = (SymbolicRegressionSolution)this.Content.Clone();
       view.Show();
     }
Index: /trunk/sources/HeuristicLab.Problems.DataAnalysis.Views/3.3/Symbolic/Symbols/ConstantView.cs
===================================================================
--- /trunk/sources/HeuristicLab.Problems.DataAnalysis.Views/3.3/Symbolic/Symbols/ConstantView.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.Problems.DataAnalysis.Views/3.3/Symbolic/Symbols/ConstantView.cs	(revision 4068)
@@ -21,17 +21,9 @@
 
 using System;
-using System.Collections.Generic;
-using System.ComponentModel;
-using System.Drawing;
-using System.Data;
-using System.Linq;
-using System.Text;
 using System.Windows.Forms;
+using HeuristicLab.Encodings.SymbolicExpressionTreeEncoding.Views;
 using HeuristicLab.MainForm;
 using HeuristicLab.MainForm.WindowsForms;
-using HeuristicLab.Encodings.SymbolicExpressionTreeEncoding.Symbols;
-using HeuristicLab.Core.Views;
 using HeuristicLab.Problems.DataAnalysis.Symbolic.Symbols;
-using HeuristicLab.Encodings.SymbolicExpressionTreeEncoding.Views;
 
 namespace HeuristicLab.Problems.DataAnalysis.Views.Symbolic.Symbols {
Index: /trunk/sources/HeuristicLab.Problems.DataAnalysis.Views/3.3/Symbolic/Symbols/LaggedVariableView.cs
===================================================================
--- /trunk/sources/HeuristicLab.Problems.DataAnalysis.Views/3.3/Symbolic/Symbols/LaggedVariableView.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.Problems.DataAnalysis.Views/3.3/Symbolic/Symbols/LaggedVariableView.cs	(revision 4068)
@@ -21,17 +21,8 @@
 
 using System;
-using System.Collections.Generic;
-using System.ComponentModel;
-using System.Drawing;
-using System.Data;
-using System.Linq;
-using System.Text;
 using System.Windows.Forms;
 using HeuristicLab.MainForm;
 using HeuristicLab.MainForm.WindowsForms;
-using HeuristicLab.Encodings.SymbolicExpressionTreeEncoding.Symbols;
-using HeuristicLab.Core.Views;
 using HeuristicLab.Problems.DataAnalysis.Symbolic.Symbols;
-using HeuristicLab.Encodings.SymbolicExpressionTreeEncoding.Views;
 
 namespace HeuristicLab.Problems.DataAnalysis.Views.Symbolic.Symbols {
Index: /trunk/sources/HeuristicLab.Problems.DataAnalysis.Views/3.3/Symbolic/Symbols/VariableView.cs
===================================================================
--- /trunk/sources/HeuristicLab.Problems.DataAnalysis.Views/3.3/Symbolic/Symbols/VariableView.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.Problems.DataAnalysis.Views/3.3/Symbolic/Symbols/VariableView.cs	(revision 4068)
@@ -21,17 +21,9 @@
 
 using System;
-using System.Collections.Generic;
-using System.ComponentModel;
-using System.Drawing;
-using System.Data;
-using System.Linq;
-using System.Text;
 using System.Windows.Forms;
+using HeuristicLab.Encodings.SymbolicExpressionTreeEncoding.Views;
 using HeuristicLab.MainForm;
 using HeuristicLab.MainForm.WindowsForms;
-using HeuristicLab.Encodings.SymbolicExpressionTreeEncoding.Symbols;
-using HeuristicLab.Core.Views;
 using HeuristicLab.Problems.DataAnalysis.Symbolic.Symbols;
-using HeuristicLab.Encodings.SymbolicExpressionTreeEncoding.Views;
 
 namespace HeuristicLab.Problems.DataAnalysis.Views.Symbolic.Symbols {
Index: /trunk/sources/HeuristicLab.Problems.DataAnalysis/3.3/CsvFileParser.cs
===================================================================
--- /trunk/sources/HeuristicLab.Problems.DataAnalysis/3.3/CsvFileParser.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.Problems.DataAnalysis/3.3/CsvFileParser.cs	(revision 4068)
@@ -25,5 +25,4 @@
 using System.IO;
 using System.Linq;
-using HeuristicLab.Data;
 using System.Text;
 
Index: /trunk/sources/HeuristicLab.Problems.DataAnalysis/3.3/DataAnalysisProblem.cs
===================================================================
--- /trunk/sources/HeuristicLab.Problems.DataAnalysis/3.3/DataAnalysisProblem.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.Problems.DataAnalysis/3.3/DataAnalysisProblem.cs	(revision 4068)
@@ -22,14 +22,10 @@
 using System;
 using System.Collections.Generic;
-using System.Linq;
+using System.Drawing;
 using HeuristicLab.Common;
 using HeuristicLab.Core;
+using HeuristicLab.Optimization;
+using HeuristicLab.Parameters;
 using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
-using HeuristicLab.Parameters;
-using HeuristicLab.Data;
-using HeuristicLab.Problems.DataAnalysis;
-using System.Drawing;
-using System.IO;
-using HeuristicLab.Optimization;
 
 namespace HeuristicLab.Problems.DataAnalysis {
Index: /trunk/sources/HeuristicLab.Problems.DataAnalysis/3.3/DataAnalysisProblemData.cs
===================================================================
--- /trunk/sources/HeuristicLab.Problems.DataAnalysis/3.3/DataAnalysisProblemData.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.Problems.DataAnalysis/3.3/DataAnalysisProblemData.cs	(revision 4068)
@@ -22,13 +22,11 @@
 using System;
 using System.Collections.Generic;
+using System.IO;
 using System.Linq;
 using HeuristicLab.Common;
 using HeuristicLab.Core;
+using HeuristicLab.Data;
+using HeuristicLab.Parameters;
 using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
-using HeuristicLab.Parameters;
-using HeuristicLab.Data;
-using HeuristicLab.Problems.DataAnalysis;
-using System.Drawing;
-using System.IO;
 
 namespace HeuristicLab.Problems.DataAnalysis {
Index: /trunk/sources/HeuristicLab.Problems.DataAnalysis/3.3/DataAnalysisSolution.cs
===================================================================
--- /trunk/sources/HeuristicLab.Problems.DataAnalysis/3.3/DataAnalysisSolution.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.Problems.DataAnalysis/3.3/DataAnalysisSolution.cs	(revision 4068)
@@ -21,12 +21,9 @@
 
 using System;
+using System.Collections.Generic;
+using System.Linq;
 using HeuristicLab.Common;
 using HeuristicLab.Core;
-using HeuristicLab.Data;
 using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
-using HeuristicLab.Encodings.SymbolicExpressionTreeEncoding;
-using System.Collections.Generic;
-using System.Linq;
-using HeuristicLab.Problems.DataAnalysis.Evaluators;
 
 namespace HeuristicLab.Problems.DataAnalysis {
Index: /trunk/sources/HeuristicLab.Problems.DataAnalysis/3.3/DataFormatException.cs
===================================================================
--- /trunk/sources/HeuristicLab.Problems.DataAnalysis/3.3/DataFormatException.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.Problems.DataAnalysis/3.3/DataFormatException.cs	(revision 4068)
@@ -21,7 +21,4 @@
 
 using System;
-using System.Collections.Generic;
-using System.Linq;
-using System.Text;
 
 namespace HeuristicLab.Problems.DataAnalysis {
Index: /trunk/sources/HeuristicLab.Problems.DataAnalysis/3.3/Dataset.cs
===================================================================
--- /trunk/sources/HeuristicLab.Problems.DataAnalysis/3.3/Dataset.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.Problems.DataAnalysis/3.3/Dataset.cs	(revision 4068)
@@ -22,12 +22,9 @@
 using System;
 using System.Collections.Generic;
-using System.Xml;
-using System.Globalization;
-using System.Text;
 using System.Linq;
 using HeuristicLab.Common;
 using HeuristicLab.Core;
+using HeuristicLab.Data;
 using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
-using HeuristicLab.Data;
 
 namespace HeuristicLab.Problems.DataAnalysis {
Index: /trunk/sources/HeuristicLab.Problems.DataAnalysis/3.3/Evaluators/OnlineCovarianceEvaluator.cs
===================================================================
--- /trunk/sources/HeuristicLab.Problems.DataAnalysis/3.3/Evaluators/OnlineCovarianceEvaluator.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.Problems.DataAnalysis/3.3/Evaluators/OnlineCovarianceEvaluator.cs	(revision 4068)
@@ -21,11 +21,4 @@
 
 using System;
-using System.Collections.Generic;
-using System.Linq;
-using System.Text;
-using HeuristicLab.Common;
-using HeuristicLab.Core;
-using HeuristicLab.Data;
-using HeuristicLab.Parameters;
 
 namespace HeuristicLab.Problems.DataAnalysis.Evaluators {
Index: /trunk/sources/HeuristicLab.Problems.DataAnalysis/3.3/Evaluators/OnlineMeanAbsolutePercentageErrorEvaluator.cs
===================================================================
--- /trunk/sources/HeuristicLab.Problems.DataAnalysis/3.3/Evaluators/OnlineMeanAbsolutePercentageErrorEvaluator.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.Problems.DataAnalysis/3.3/Evaluators/OnlineMeanAbsolutePercentageErrorEvaluator.cs	(revision 4068)
@@ -21,11 +21,5 @@
 
 using System;
-using System.Collections.Generic;
-using System.Linq;
-using System.Text;
 using HeuristicLab.Common;
-using HeuristicLab.Core;
-using HeuristicLab.Data;
-using HeuristicLab.Parameters;
 
 namespace HeuristicLab.Problems.DataAnalysis.Evaluators {
Index: /trunk/sources/HeuristicLab.Problems.DataAnalysis/3.3/Evaluators/OnlineMeanAndVarianceCalculator.cs
===================================================================
--- /trunk/sources/HeuristicLab.Problems.DataAnalysis/3.3/Evaluators/OnlineMeanAndVarianceCalculator.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.Problems.DataAnalysis/3.3/Evaluators/OnlineMeanAndVarianceCalculator.cs	(revision 4068)
@@ -21,11 +21,4 @@
 
 using System;
-using System.Collections.Generic;
-using System.Linq;
-using System.Text;
-using HeuristicLab.Common;
-using HeuristicLab.Core;
-using HeuristicLab.Data;
-using HeuristicLab.Parameters;
 
 namespace HeuristicLab.Problems.DataAnalysis.Evaluators {
Index: /trunk/sources/HeuristicLab.Problems.DataAnalysis/3.3/Evaluators/OnlineMeanSquaredErrorEvaluator.cs
===================================================================
--- /trunk/sources/HeuristicLab.Problems.DataAnalysis/3.3/Evaluators/OnlineMeanSquaredErrorEvaluator.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.Problems.DataAnalysis/3.3/Evaluators/OnlineMeanSquaredErrorEvaluator.cs	(revision 4068)
@@ -21,11 +21,4 @@
 
 using System;
-using System.Collections.Generic;
-using System.Linq;
-using System.Text;
-using HeuristicLab.Common;
-using HeuristicLab.Core;
-using HeuristicLab.Data;
-using HeuristicLab.Parameters;
 
 namespace HeuristicLab.Problems.DataAnalysis.Evaluators {
Index: /trunk/sources/HeuristicLab.Problems.DataAnalysis/3.3/Evaluators/OnlineNormalizedMeanSquaredErrorEvaluator.cs
===================================================================
--- /trunk/sources/HeuristicLab.Problems.DataAnalysis/3.3/Evaluators/OnlineNormalizedMeanSquaredErrorEvaluator.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.Problems.DataAnalysis/3.3/Evaluators/OnlineNormalizedMeanSquaredErrorEvaluator.cs	(revision 4068)
@@ -21,11 +21,4 @@
 
 using System;
-using System.Collections.Generic;
-using System.Linq;
-using System.Text;
-using HeuristicLab.Common;
-using HeuristicLab.Core;
-using HeuristicLab.Data;
-using HeuristicLab.Parameters;
 
 namespace HeuristicLab.Problems.DataAnalysis.Evaluators {
Index: /trunk/sources/HeuristicLab.Problems.DataAnalysis/3.3/Evaluators/OnlinePearsonsRSquaredEvaluator.cs
===================================================================
--- /trunk/sources/HeuristicLab.Problems.DataAnalysis/3.3/Evaluators/OnlinePearsonsRSquaredEvaluator.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.Problems.DataAnalysis/3.3/Evaluators/OnlinePearsonsRSquaredEvaluator.cs	(revision 4068)
@@ -21,11 +21,5 @@
 
 using System;
-using System.Collections.Generic;
-using System.Linq;
-using System.Text;
 using HeuristicLab.Common;
-using HeuristicLab.Core;
-using HeuristicLab.Data;
-using HeuristicLab.Parameters;
 
 namespace HeuristicLab.Problems.DataAnalysis.Evaluators {
Index: /trunk/sources/HeuristicLab.Problems.DataAnalysis/3.3/Evaluators/SimpleEvaluator.cs
===================================================================
--- /trunk/sources/HeuristicLab.Problems.DataAnalysis/3.3/Evaluators/SimpleEvaluator.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.Problems.DataAnalysis/3.3/Evaluators/SimpleEvaluator.cs	(revision 4068)
@@ -20,9 +20,4 @@
 #endregion
 
-using System;
-using System.Collections.Generic;
-using System.Linq;
-using System.Text;
-using HeuristicLab.Common;
 using HeuristicLab.Core;
 using HeuristicLab.Data;
Index: /trunk/sources/HeuristicLab.Problems.DataAnalysis/3.3/Evaluators/SimpleMSEEvaluator.cs
===================================================================
--- /trunk/sources/HeuristicLab.Problems.DataAnalysis/3.3/Evaluators/SimpleMSEEvaluator.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.Problems.DataAnalysis/3.3/Evaluators/SimpleMSEEvaluator.cs	(revision 4068)
@@ -23,6 +23,4 @@
 using System.Collections.Generic;
 using System.Linq;
-using System.Text;
-using HeuristicLab.Common;
 using HeuristicLab.Core;
 using HeuristicLab.Data;
Index: /trunk/sources/HeuristicLab.Problems.DataAnalysis/3.3/Evaluators/SimpleMeanAbsolutePercentageErrorEvaluator.cs
===================================================================
--- /trunk/sources/HeuristicLab.Problems.DataAnalysis/3.3/Evaluators/SimpleMeanAbsolutePercentageErrorEvaluator.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.Problems.DataAnalysis/3.3/Evaluators/SimpleMeanAbsolutePercentageErrorEvaluator.cs	(revision 4068)
@@ -23,9 +23,7 @@
 using System.Collections.Generic;
 using System.Linq;
-using System.Text;
 using HeuristicLab.Core;
 using HeuristicLab.Data;
 using HeuristicLab.Parameters;
-using HeuristicLab.Common;
 
 namespace HeuristicLab.Problems.DataAnalysis.Evaluators {
Index: /trunk/sources/HeuristicLab.Problems.DataAnalysis/3.3/Evaluators/SimpleMeanAbsolutePercentageOfRangeErrorEvaluator.cs
===================================================================
--- /trunk/sources/HeuristicLab.Problems.DataAnalysis/3.3/Evaluators/SimpleMeanAbsolutePercentageOfRangeErrorEvaluator.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.Problems.DataAnalysis/3.3/Evaluators/SimpleMeanAbsolutePercentageOfRangeErrorEvaluator.cs	(revision 4068)
@@ -23,7 +23,6 @@
 using System.Collections.Generic;
 using System.Linq;
-using System.Text;
+using HeuristicLab.Common;
 using HeuristicLab.Core;
-using HeuristicLab.Common;
 using HeuristicLab.Data;
 using HeuristicLab.Parameters;
Index: /trunk/sources/HeuristicLab.Problems.DataAnalysis/3.3/Evaluators/SimpleNMSEEvaluator.cs
===================================================================
--- /trunk/sources/HeuristicLab.Problems.DataAnalysis/3.3/Evaluators/SimpleNMSEEvaluator.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.Problems.DataAnalysis/3.3/Evaluators/SimpleNMSEEvaluator.cs	(revision 4068)
@@ -23,6 +23,4 @@
 using System.Collections.Generic;
 using System.Linq;
-using System.Text;
-using HeuristicLab.Common;
 using HeuristicLab.Core;
 using HeuristicLab.Data;
Index: /trunk/sources/HeuristicLab.Problems.DataAnalysis/3.3/Evaluators/SimpleRSquaredEvaluator.cs
===================================================================
--- /trunk/sources/HeuristicLab.Problems.DataAnalysis/3.3/Evaluators/SimpleRSquaredEvaluator.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.Problems.DataAnalysis/3.3/Evaluators/SimpleRSquaredEvaluator.cs	(revision 4068)
@@ -23,7 +23,5 @@
 using System.Collections.Generic;
 using System.Linq;
-using System.Text;
 using HeuristicLab.Core;
-using HeuristicLab.Common;
 using HeuristicLab.Data;
 using HeuristicLab.Parameters;
Index: /trunk/sources/HeuristicLab.Problems.DataAnalysis/3.3/Evaluators/SimpleVarianceAccountedForEvaluator.cs
===================================================================
--- /trunk/sources/HeuristicLab.Problems.DataAnalysis/3.3/Evaluators/SimpleVarianceAccountedForEvaluator.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.Problems.DataAnalysis/3.3/Evaluators/SimpleVarianceAccountedForEvaluator.cs	(revision 4068)
@@ -23,7 +23,6 @@
 using System.Collections.Generic;
 using System.Linq;
-using System.Text;
+using HeuristicLab.Common;
 using HeuristicLab.Core;
-using HeuristicLab.Common;
 using HeuristicLab.Data;
 using HeuristicLab.Parameters;
Index: /trunk/sources/HeuristicLab.Problems.DataAnalysis/3.3/Interfaces/IDataAnalysisModel.cs
===================================================================
--- /trunk/sources/HeuristicLab.Problems.DataAnalysis/3.3/Interfaces/IDataAnalysisModel.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.Problems.DataAnalysis/3.3/Interfaces/IDataAnalysisModel.cs	(revision 4068)
@@ -20,8 +20,5 @@
 #endregion
 
-using System;
 using System.Collections.Generic;
-using System.Linq;
-using System.Text;
 using HeuristicLab.Core;
 
Index: /trunk/sources/HeuristicLab.Problems.DataAnalysis/3.3/Interfaces/IDataAnalysisProblem.cs
===================================================================
--- /trunk/sources/HeuristicLab.Problems.DataAnalysis/3.3/Interfaces/IDataAnalysisProblem.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.Problems.DataAnalysis/3.3/Interfaces/IDataAnalysisProblem.cs	(revision 4068)
@@ -20,15 +20,4 @@
 #endregion
 
-using System;
-using System.Collections.Generic;
-using System.Linq;
-using HeuristicLab.Common;
-using HeuristicLab.Core;
-using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
-using HeuristicLab.Parameters;
-using HeuristicLab.Data;
-using HeuristicLab.Problems.DataAnalysis;
-using System.Drawing;
-using System.IO;
 using HeuristicLab.Optimization;
 
Index: /trunk/sources/HeuristicLab.Problems.DataAnalysis/3.3/Interfaces/IOnlineEvaluator.cs
===================================================================
--- /trunk/sources/HeuristicLab.Problems.DataAnalysis/3.3/Interfaces/IOnlineEvaluator.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.Problems.DataAnalysis/3.3/Interfaces/IOnlineEvaluator.cs	(revision 4068)
@@ -20,9 +20,4 @@
 #endregion
 
-using System;
-using System.Collections.Generic;
-using System.Linq;
-using System.Text;
-using HeuristicLab.Core;
 
 namespace HeuristicLab.Problems.DataAnalysis {
Index: /trunk/sources/HeuristicLab.Problems.DataAnalysis/3.3/MatrixExtensions.cs
===================================================================
--- /trunk/sources/HeuristicLab.Problems.DataAnalysis/3.3/MatrixExtensions.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.Problems.DataAnalysis/3.3/MatrixExtensions.cs	(revision 4068)
@@ -21,7 +21,4 @@
 
 using System;
-using System.Collections.Generic;
-using System.Linq;
-using System.Text;
 
 namespace HeuristicLab.Problems.DataAnalysis {
Index: /trunk/sources/HeuristicLab.Problems.DataAnalysis/3.3/Operators/WeightedParentsQualityVarianceComparator.cs
===================================================================
--- /trunk/sources/HeuristicLab.Problems.DataAnalysis/3.3/Operators/WeightedParentsQualityVarianceComparator.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.Problems.DataAnalysis/3.3/Operators/WeightedParentsQualityVarianceComparator.cs	(revision 4068)
@@ -21,5 +21,4 @@
 
 using System;
-using System.Collections.Generic;
 using System.Linq;
 using alglib;
Index: /trunk/sources/HeuristicLab.Problems.DataAnalysis/3.3/SupportVectorMachine/ParameterAdjustmentProblem/SupportVectorMachineParameterAdjustmentBestSolutionAnalyzer.cs
===================================================================
--- /trunk/sources/HeuristicLab.Problems.DataAnalysis/3.3/SupportVectorMachine/ParameterAdjustmentProblem/SupportVectorMachineParameterAdjustmentBestSolutionAnalyzer.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.Problems.DataAnalysis/3.3/SupportVectorMachine/ParameterAdjustmentProblem/SupportVectorMachineParameterAdjustmentBestSolutionAnalyzer.cs	(revision 4068)
@@ -22,15 +22,12 @@
 using System;
 using System.Linq;
-using HeuristicLab.Common;
 using HeuristicLab.Core;
 using HeuristicLab.Data;
 using HeuristicLab.Encodings.RealVectorEncoding;
+using HeuristicLab.Operators;
+using HeuristicLab.Optimization;
+using HeuristicLab.Parameters;
 using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
-using HeuristicLab.Problems.DataAnalysis.SupportVectorMachine;
-using HeuristicLab.Problems.DataAnalysis;
 using HeuristicLab.Problems.DataAnalysis.Evaluators;
-using HeuristicLab.Parameters;
-using HeuristicLab.Optimization;
-using HeuristicLab.Operators;
 
 namespace HeuristicLab.Problems.DataAnalysis.SupportVectorMachine.ParameterAdjustmentProblem {
Index: /trunk/sources/HeuristicLab.Problems.DataAnalysis/3.3/SupportVectorMachine/ParameterAdjustmentProblem/SupportVectorMachineParameterAdjustmentEvaluator.cs
===================================================================
--- /trunk/sources/HeuristicLab.Problems.DataAnalysis/3.3/SupportVectorMachine/ParameterAdjustmentProblem/SupportVectorMachineParameterAdjustmentEvaluator.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.Problems.DataAnalysis/3.3/SupportVectorMachine/ParameterAdjustmentProblem/SupportVectorMachineParameterAdjustmentEvaluator.cs	(revision 4068)
@@ -21,15 +21,11 @@
 
 using System;
-using HeuristicLab.Common;
 using HeuristicLab.Core;
 using HeuristicLab.Data;
 using HeuristicLab.Encodings.RealVectorEncoding;
+using HeuristicLab.Operators;
+using HeuristicLab.Optimization;
+using HeuristicLab.Parameters;
 using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
-using HeuristicLab.Problems.DataAnalysis.SupportVectorMachine;
-using HeuristicLab.Problems.DataAnalysis;
-using HeuristicLab.Problems.DataAnalysis.Evaluators;
-using HeuristicLab.Parameters;
-using HeuristicLab.Optimization;
-using HeuristicLab.Operators;
 
 namespace HeuristicLab.Problems.DataAnalysis.SupportVectorMachine.ParameterAdjustmentProblem {
Index: /trunk/sources/HeuristicLab.Problems.DataAnalysis/3.3/SupportVectorMachine/ParameterAdjustmentProblem/SupportVectorMachineParameterAdjustmentProblem.cs
===================================================================
--- /trunk/sources/HeuristicLab.Problems.DataAnalysis/3.3/SupportVectorMachine/ParameterAdjustmentProblem/SupportVectorMachineParameterAdjustmentProblem.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.Problems.DataAnalysis/3.3/SupportVectorMachine/ParameterAdjustmentProblem/SupportVectorMachineParameterAdjustmentProblem.cs	(revision 4068)
@@ -22,6 +22,4 @@
 using System;
 using System.Collections.Generic;
-using System.Collections.ObjectModel;
-using System.Drawing;
 using System.Linq;
 using HeuristicLab.Common;
@@ -33,5 +31,4 @@
 using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
 using HeuristicLab.PluginInfrastructure;
-using HeuristicLab.Problems.DataAnalysis;
 
 namespace HeuristicLab.Problems.DataAnalysis.SupportVectorMachine.ParameterAdjustmentProblem {
Index: /trunk/sources/HeuristicLab.Problems.DataAnalysis/3.3/SupportVectorMachine/SupportVectorMachineCrossValidationEvaluator.cs
===================================================================
--- /trunk/sources/HeuristicLab.Problems.DataAnalysis/3.3/SupportVectorMachine/SupportVectorMachineCrossValidationEvaluator.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.Problems.DataAnalysis/3.3/SupportVectorMachine/SupportVectorMachineCrossValidationEvaluator.cs	(revision 4068)
@@ -21,16 +21,12 @@
 
 using System;
-using System.Collections.Generic;
 using System.Linq;
-using System.Text;
 using HeuristicLab.Core;
 using HeuristicLab.Data;
-using System.Threading;
-using HeuristicLab.LibSVM;
 using HeuristicLab.Operators;
+using HeuristicLab.Optimization;
 using HeuristicLab.Parameters;
+using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
 using SVM;
-using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
-using HeuristicLab.Optimization;
 
 namespace HeuristicLab.Problems.DataAnalysis.SupportVectorMachine {
Index: /trunk/sources/HeuristicLab.Problems.DataAnalysis/3.3/SupportVectorMachine/SupportVectorMachineModel.cs
===================================================================
--- /trunk/sources/HeuristicLab.Problems.DataAnalysis/3.3/SupportVectorMachine/SupportVectorMachineModel.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.Problems.DataAnalysis/3.3/SupportVectorMachine/SupportVectorMachineModel.cs	(revision 4068)
@@ -22,13 +22,11 @@
 using System;
 using System.Collections.Generic;
+using System.IO;
+using System.Linq;
 using System.Text;
-using System.Xml;
+using HeuristicLab.Common;
 using HeuristicLab.Core;
-using System.Globalization;
-using System.IO;
 using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
-using HeuristicLab.Common;
 using SVM;
-using System.Linq;
 
 namespace HeuristicLab.Problems.DataAnalysis.SupportVectorMachine {
Index: /trunk/sources/HeuristicLab.Problems.DataAnalysis/3.3/SupportVectorMachine/SupportVectorMachineModelCreator.cs
===================================================================
--- /trunk/sources/HeuristicLab.Problems.DataAnalysis/3.3/SupportVectorMachine/SupportVectorMachineModelCreator.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.Problems.DataAnalysis/3.3/SupportVectorMachine/SupportVectorMachineModelCreator.cs	(revision 4068)
@@ -21,15 +21,10 @@
 
 using System;
-using System.Collections.Generic;
-using System.Linq;
-using System.Text;
 using HeuristicLab.Core;
 using HeuristicLab.Data;
-using System.Threading;
-using HeuristicLab.LibSVM;
 using HeuristicLab.Operators;
 using HeuristicLab.Parameters;
+using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
 using SVM;
-using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
 
 namespace HeuristicLab.Problems.DataAnalysis.SupportVectorMachine {
Index: /trunk/sources/HeuristicLab.Problems.DataAnalysis/3.3/SupportVectorMachine/SupportVectorMachineModelEvaluator.cs
===================================================================
--- /trunk/sources/HeuristicLab.Problems.DataAnalysis/3.3/SupportVectorMachine/SupportVectorMachineModelEvaluator.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.Problems.DataAnalysis/3.3/SupportVectorMachine/SupportVectorMachineModelEvaluator.cs	(revision 4068)
@@ -20,14 +20,10 @@
 #endregion
 
-using System;
-using System.Collections.Generic;
-using System.Linq;
-using System.Text;
 using HeuristicLab.Core;
 using HeuristicLab.Data;
+using HeuristicLab.Operators;
+using HeuristicLab.Parameters;
+using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
 using SVM;
-using HeuristicLab.Operators;
-using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
-using HeuristicLab.Parameters;
 
 namespace HeuristicLab.Problems.DataAnalysis.SupportVectorMachine {
Index: /trunk/sources/HeuristicLab.Problems.DataAnalysis/3.3/SupportVectorMachine/SupportVectorMachineUtil.cs
===================================================================
--- /trunk/sources/HeuristicLab.Problems.DataAnalysis/3.3/SupportVectorMachine/SupportVectorMachineUtil.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.Problems.DataAnalysis/3.3/SupportVectorMachine/SupportVectorMachineUtil.cs	(revision 4068)
@@ -20,11 +20,6 @@
 #endregion
 
-using System;
 using System.Collections.Generic;
 using System.Linq;
-using System.Text;
-using HeuristicLab.Core;
-using HeuristicLab.Data;
-using HeuristicLab.Common;
 
 namespace HeuristicLab.Problems.DataAnalysis.SupportVectorMachine {
Index: /trunk/sources/HeuristicLab.Problems.DataAnalysis/3.3/Symbolic/ArithmeticExpressionGrammar.cs
===================================================================
--- /trunk/sources/HeuristicLab.Problems.DataAnalysis/3.3/Symbolic/ArithmeticExpressionGrammar.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.Problems.DataAnalysis/3.3/Symbolic/ArithmeticExpressionGrammar.cs	(revision 4068)
@@ -20,13 +20,9 @@
 #endregion
 
+using System.Collections.Generic;
+using HeuristicLab.Core;
 using HeuristicLab.Encodings.SymbolicExpressionTreeEncoding;
-using System.Collections.Generic;
-using System;
-using System.Linq;
-using HeuristicLab.Common;
-using HeuristicLab.Core;
+using HeuristicLab.Encodings.SymbolicExpressionTreeEncoding.Symbols;
 using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
-using HeuristicLab.Encodings.SymbolicExpressionTreeEncoding.Symbols;
-using HeuristicLab.Data;
 using HeuristicLab.Problems.DataAnalysis.Symbolic.Symbols;
 namespace HeuristicLab.Problems.DataAnalysis.Symbolic {
Index: /trunk/sources/HeuristicLab.Problems.DataAnalysis/3.3/Symbolic/FullFunctionalExpressionGrammar.cs
===================================================================
--- /trunk/sources/HeuristicLab.Problems.DataAnalysis/3.3/Symbolic/FullFunctionalExpressionGrammar.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.Problems.DataAnalysis/3.3/Symbolic/FullFunctionalExpressionGrammar.cs	(revision 4068)
@@ -20,13 +20,9 @@
 #endregion
 
+using System.Collections.Generic;
+using HeuristicLab.Core;
 using HeuristicLab.Encodings.SymbolicExpressionTreeEncoding;
-using System.Collections.Generic;
-using System;
-using System.Linq;
-using HeuristicLab.Common;
-using HeuristicLab.Core;
+using HeuristicLab.Encodings.SymbolicExpressionTreeEncoding.Symbols;
 using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
-using HeuristicLab.Encodings.SymbolicExpressionTreeEncoding.Symbols;
-using HeuristicLab.Data;
 using HeuristicLab.Problems.DataAnalysis.Symbolic.Symbols;
 namespace HeuristicLab.Problems.DataAnalysis.Symbolic {
Index: /trunk/sources/HeuristicLab.Problems.DataAnalysis/3.3/Symbolic/ISymbolicExpressionTreeInterpreter.cs
===================================================================
--- /trunk/sources/HeuristicLab.Problems.DataAnalysis/3.3/Symbolic/ISymbolicExpressionTreeInterpreter.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.Problems.DataAnalysis/3.3/Symbolic/ISymbolicExpressionTreeInterpreter.cs	(revision 4068)
@@ -20,9 +20,6 @@
 #endregion
 
-using System;
-using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
-using HeuristicLab.Common;
+using System.Collections.Generic;
 using HeuristicLab.Core;
-using System.Collections.Generic;
 using HeuristicLab.Encodings.SymbolicExpressionTreeEncoding;
 
Index: /trunk/sources/HeuristicLab.Problems.DataAnalysis/3.3/Symbolic/SimpleArithmeticExpressionInterpreter.cs
===================================================================
--- /trunk/sources/HeuristicLab.Problems.DataAnalysis/3.3/Symbolic/SimpleArithmeticExpressionInterpreter.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.Problems.DataAnalysis/3.3/Symbolic/SimpleArithmeticExpressionInterpreter.cs	(revision 4068)
@@ -21,13 +21,11 @@
 
 using System;
-using System.Linq;
+using System.Collections.Generic;
+using HeuristicLab.Core;
+using HeuristicLab.Encodings.SymbolicExpressionTreeEncoding;
+using HeuristicLab.Encodings.SymbolicExpressionTreeEncoding.Compiler;
+using HeuristicLab.Encodings.SymbolicExpressionTreeEncoding.Symbols;
 using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
-using HeuristicLab.Common;
-using HeuristicLab.Core;
-using System.Collections.Generic;
-using HeuristicLab.Encodings.SymbolicExpressionTreeEncoding;
-using HeuristicLab.Encodings.SymbolicExpressionTreeEncoding.Symbols;
 using HeuristicLab.Problems.DataAnalysis.Symbolic.Symbols;
-using HeuristicLab.Encodings.SymbolicExpressionTreeEncoding.Compiler;
 
 namespace HeuristicLab.Problems.DataAnalysis.Symbolic {
Index: /trunk/sources/HeuristicLab.Problems.DataAnalysis/3.3/Symbolic/SymbolicSimplifier.cs
===================================================================
--- /trunk/sources/HeuristicLab.Problems.DataAnalysis/3.3/Symbolic/SymbolicSimplifier.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.Problems.DataAnalysis/3.3/Symbolic/SymbolicSimplifier.cs	(revision 4068)
@@ -22,4 +22,5 @@
 using System;
 using System.Collections.Generic;
+using System.Diagnostics;
 using System.Linq;
 using HeuristicLab.Common;
@@ -27,5 +28,4 @@
 using HeuristicLab.Encodings.SymbolicExpressionTreeEncoding.Symbols;
 using HeuristicLab.Problems.DataAnalysis.Symbolic.Symbols;
-using System.Diagnostics;
 
 namespace HeuristicLab.Problems.DataAnalysis.Symbolic {
@@ -308,5 +308,5 @@
       } else if (IsConstant(b) && IsAddition(a)) {
         return a.SubTrees.Select(x => MakeMultiplication(x, b)).Aggregate((c, d) => MakeAddition(c, d));
-      } else if(IsDivision(a) && IsDivision(b)) {
+      } else if (IsDivision(a) && IsDivision(b)) {
         return MakeDivision(MakeMultiplication(a.SubTrees[0], b.SubTrees[0]), MakeMultiplication(a.SubTrees[1], b.SubTrees[1]));
       } else if (IsDivision(a)) {
Index: /trunk/sources/HeuristicLab.Problems.DataAnalysis/3.3/Symbolic/Symbols/Addition.cs
===================================================================
--- /trunk/sources/HeuristicLab.Problems.DataAnalysis/3.3/Symbolic/Symbols/Addition.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.Problems.DataAnalysis/3.3/Symbolic/Symbols/Addition.cs	(revision 4068)
@@ -20,13 +20,12 @@
 #endregion
 
-using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
-using HeuristicLab.Common;
 using HeuristicLab.Core;
 using HeuristicLab.Encodings.SymbolicExpressionTreeEncoding.Symbols;
+using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
 namespace HeuristicLab.Problems.DataAnalysis.Symbolic.Symbols {
   [StorableClass]
   [Item("Addition", "Symbol that represents the + operator.")]
   public sealed class Addition : Symbol {
-    public Addition() :base("Addition","Symbol that represents the + operator.") {}
+    public Addition() : base("Addition", "Symbol that represents the + operator.") { }
   }
 }
Index: /trunk/sources/HeuristicLab.Problems.DataAnalysis/3.3/Symbolic/Symbols/And.cs
===================================================================
--- /trunk/sources/HeuristicLab.Problems.DataAnalysis/3.3/Symbolic/Symbols/And.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.Problems.DataAnalysis/3.3/Symbolic/Symbols/And.cs	(revision 4068)
@@ -20,8 +20,7 @@
 #endregion
 
-using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
-using HeuristicLab.Common;
 using HeuristicLab.Core;
 using HeuristicLab.Encodings.SymbolicExpressionTreeEncoding.Symbols;
+using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
 namespace HeuristicLab.Problems.DataAnalysis.Symbolic.Symbols {
   [StorableClass]
Index: /trunk/sources/HeuristicLab.Problems.DataAnalysis/3.3/Symbolic/Symbols/Average.cs
===================================================================
--- /trunk/sources/HeuristicLab.Problems.DataAnalysis/3.3/Symbolic/Symbols/Average.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.Problems.DataAnalysis/3.3/Symbolic/Symbols/Average.cs	(revision 4068)
@@ -20,8 +20,7 @@
 #endregion
 
-using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
-using HeuristicLab.Common;
 using HeuristicLab.Core;
 using HeuristicLab.Encodings.SymbolicExpressionTreeEncoding.Symbols;
+using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
 namespace HeuristicLab.Problems.DataAnalysis.Symbolic.Symbols {
   [StorableClass]
Index: /trunk/sources/HeuristicLab.Problems.DataAnalysis/3.3/Symbolic/Symbols/Constant.cs
===================================================================
--- /trunk/sources/HeuristicLab.Problems.DataAnalysis/3.3/Symbolic/Symbols/Constant.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.Problems.DataAnalysis/3.3/Symbolic/Symbols/Constant.cs	(revision 4068)
@@ -20,13 +20,10 @@
 #endregion
 
-using HeuristicLab.Encodings.SymbolicExpressionTreeEncoding;
+using System;
 using HeuristicLab.Common;
 using HeuristicLab.Core;
-using HeuristicLab.Operators;
-using HeuristicLab.Data;
+using HeuristicLab.Encodings.SymbolicExpressionTreeEncoding;
+using HeuristicLab.Encodings.SymbolicExpressionTreeEncoding.Symbols;
 using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
-using HeuristicLab.Parameters;
-using HeuristicLab.Encodings.SymbolicExpressionTreeEncoding.Symbols;
-using System;
 namespace HeuristicLab.Problems.DataAnalysis.Symbolic.Symbols {
   [StorableClass]
Index: /trunk/sources/HeuristicLab.Problems.DataAnalysis/3.3/Symbolic/Symbols/ConstantTreeNode.cs
===================================================================
--- /trunk/sources/HeuristicLab.Problems.DataAnalysis/3.3/Symbolic/Symbols/ConstantTreeNode.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.Problems.DataAnalysis/3.3/Symbolic/Symbols/ConstantTreeNode.cs	(revision 4068)
@@ -20,11 +20,7 @@
 #endregion
 
+using HeuristicLab.Core;
 using HeuristicLab.Encodings.SymbolicExpressionTreeEncoding;
-using System;
-using System.Collections.Generic;
 using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
-using HeuristicLab.Common;
-using HeuristicLab.Core;
-using HeuristicLab.Data;
 using HeuristicLab.Random;
 namespace HeuristicLab.Problems.DataAnalysis.Symbolic.Symbols {
Index: /trunk/sources/HeuristicLab.Problems.DataAnalysis/3.3/Symbolic/Symbols/Cosine.cs
===================================================================
--- /trunk/sources/HeuristicLab.Problems.DataAnalysis/3.3/Symbolic/Symbols/Cosine.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.Problems.DataAnalysis/3.3/Symbolic/Symbols/Cosine.cs	(revision 4068)
@@ -20,8 +20,7 @@
 #endregion
 
-using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
-using HeuristicLab.Common;
 using HeuristicLab.Core;
 using HeuristicLab.Encodings.SymbolicExpressionTreeEncoding.Symbols;
+using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
 namespace HeuristicLab.Problems.DataAnalysis.Symbolic.Symbols {
   [StorableClass]
Index: /trunk/sources/HeuristicLab.Problems.DataAnalysis/3.3/Symbolic/Symbols/Division.cs
===================================================================
--- /trunk/sources/HeuristicLab.Problems.DataAnalysis/3.3/Symbolic/Symbols/Division.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.Problems.DataAnalysis/3.3/Symbolic/Symbols/Division.cs	(revision 4068)
@@ -20,8 +20,7 @@
 #endregion
 
-using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
-using HeuristicLab.Common;
 using HeuristicLab.Core;
 using HeuristicLab.Encodings.SymbolicExpressionTreeEncoding.Symbols;
+using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
 namespace HeuristicLab.Problems.DataAnalysis.Symbolic.Symbols {
   [StorableClass]
Index: /trunk/sources/HeuristicLab.Problems.DataAnalysis/3.3/Symbolic/Symbols/Exponential.cs
===================================================================
--- /trunk/sources/HeuristicLab.Problems.DataAnalysis/3.3/Symbolic/Symbols/Exponential.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.Problems.DataAnalysis/3.3/Symbolic/Symbols/Exponential.cs	(revision 4068)
@@ -20,8 +20,7 @@
 #endregion
 
-using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
-using HeuristicLab.Common;
 using HeuristicLab.Core;
 using HeuristicLab.Encodings.SymbolicExpressionTreeEncoding.Symbols;
+using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
 namespace HeuristicLab.Problems.DataAnalysis.Symbolic.Symbols {
   [StorableClass]
Index: /trunk/sources/HeuristicLab.Problems.DataAnalysis/3.3/Symbolic/Symbols/GreaterThan.cs
===================================================================
--- /trunk/sources/HeuristicLab.Problems.DataAnalysis/3.3/Symbolic/Symbols/GreaterThan.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.Problems.DataAnalysis/3.3/Symbolic/Symbols/GreaterThan.cs	(revision 4068)
@@ -20,8 +20,7 @@
 #endregion
 
-using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
-using HeuristicLab.Common;
 using HeuristicLab.Core;
 using HeuristicLab.Encodings.SymbolicExpressionTreeEncoding.Symbols;
+using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
 namespace HeuristicLab.Problems.DataAnalysis.Symbolic.Symbols {
   [StorableClass]
Index: /trunk/sources/HeuristicLab.Problems.DataAnalysis/3.3/Symbolic/Symbols/IfThenElse.cs
===================================================================
--- /trunk/sources/HeuristicLab.Problems.DataAnalysis/3.3/Symbolic/Symbols/IfThenElse.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.Problems.DataAnalysis/3.3/Symbolic/Symbols/IfThenElse.cs	(revision 4068)
@@ -20,8 +20,7 @@
 #endregion
 
-using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
-using HeuristicLab.Common;
 using HeuristicLab.Core;
 using HeuristicLab.Encodings.SymbolicExpressionTreeEncoding.Symbols;
+using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
 namespace HeuristicLab.Problems.DataAnalysis.Symbolic.Symbols {
   [StorableClass]
Index: /trunk/sources/HeuristicLab.Problems.DataAnalysis/3.3/Symbolic/Symbols/LaggedVariable.cs
===================================================================
--- /trunk/sources/HeuristicLab.Problems.DataAnalysis/3.3/Symbolic/Symbols/LaggedVariable.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.Problems.DataAnalysis/3.3/Symbolic/Symbols/LaggedVariable.cs	(revision 4068)
@@ -20,15 +20,8 @@
 #endregion
 
-using HeuristicLab.Encodings.SymbolicExpressionTreeEncoding;
 using HeuristicLab.Common;
 using HeuristicLab.Core;
-using HeuristicLab.Operators;
-using HeuristicLab.Random;
-using HeuristicLab.Data;
+using HeuristicLab.Encodings.SymbolicExpressionTreeEncoding;
 using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
-using HeuristicLab.Parameters;
-using System.Collections.Generic;
-using System;
-using HeuristicLab.Encodings.SymbolicExpressionTreeEncoding.Symbols;
 namespace HeuristicLab.Problems.DataAnalysis.Symbolic.Symbols {
   [StorableClass]
Index: /trunk/sources/HeuristicLab.Problems.DataAnalysis/3.3/Symbolic/Symbols/LaggedVariableTreeNode.cs
===================================================================
--- /trunk/sources/HeuristicLab.Problems.DataAnalysis/3.3/Symbolic/Symbols/LaggedVariableTreeNode.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.Problems.DataAnalysis/3.3/Symbolic/Symbols/LaggedVariableTreeNode.cs	(revision 4068)
@@ -20,12 +20,7 @@
 #endregion
 
-using HeuristicLab.Encodings.SymbolicExpressionTreeEncoding;
 using System;
-using System.Collections.Generic;
+using HeuristicLab.Core;
 using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
-using HeuristicLab.Common;
-using HeuristicLab.Core;
-using HeuristicLab.Data;
-using HeuristicLab.Random;
 namespace HeuristicLab.Problems.DataAnalysis.Symbolic.Symbols {
   [StorableClass]
Index: /trunk/sources/HeuristicLab.Problems.DataAnalysis/3.3/Symbolic/Symbols/LessThan.cs
===================================================================
--- /trunk/sources/HeuristicLab.Problems.DataAnalysis/3.3/Symbolic/Symbols/LessThan.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.Problems.DataAnalysis/3.3/Symbolic/Symbols/LessThan.cs	(revision 4068)
@@ -20,8 +20,7 @@
 #endregion
 
-using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
-using HeuristicLab.Common;
 using HeuristicLab.Core;
 using HeuristicLab.Encodings.SymbolicExpressionTreeEncoding.Symbols;
+using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
 namespace HeuristicLab.Problems.DataAnalysis.Symbolic.Symbols {
   [StorableClass]
Index: /trunk/sources/HeuristicLab.Problems.DataAnalysis/3.3/Symbolic/Symbols/Logarithm.cs
===================================================================
--- /trunk/sources/HeuristicLab.Problems.DataAnalysis/3.3/Symbolic/Symbols/Logarithm.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.Problems.DataAnalysis/3.3/Symbolic/Symbols/Logarithm.cs	(revision 4068)
@@ -20,8 +20,7 @@
 #endregion
 
-using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
-using HeuristicLab.Common;
 using HeuristicLab.Core;
 using HeuristicLab.Encodings.SymbolicExpressionTreeEncoding.Symbols;
+using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
 namespace HeuristicLab.Problems.DataAnalysis.Symbolic.Symbols {
   [StorableClass]
Index: /trunk/sources/HeuristicLab.Problems.DataAnalysis/3.3/Symbolic/Symbols/Multiplication.cs
===================================================================
--- /trunk/sources/HeuristicLab.Problems.DataAnalysis/3.3/Symbolic/Symbols/Multiplication.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.Problems.DataAnalysis/3.3/Symbolic/Symbols/Multiplication.cs	(revision 4068)
@@ -20,8 +20,7 @@
 #endregion
 
-using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
-using HeuristicLab.Common;
 using HeuristicLab.Core;
 using HeuristicLab.Encodings.SymbolicExpressionTreeEncoding.Symbols;
+using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
 namespace HeuristicLab.Problems.DataAnalysis.Symbolic.Symbols {
   [StorableClass]
Index: /trunk/sources/HeuristicLab.Problems.DataAnalysis/3.3/Symbolic/Symbols/Not.cs
===================================================================
--- /trunk/sources/HeuristicLab.Problems.DataAnalysis/3.3/Symbolic/Symbols/Not.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.Problems.DataAnalysis/3.3/Symbolic/Symbols/Not.cs	(revision 4068)
@@ -20,8 +20,7 @@
 #endregion
 
-using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
-using HeuristicLab.Common;
 using HeuristicLab.Core;
 using HeuristicLab.Encodings.SymbolicExpressionTreeEncoding.Symbols;
+using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
 namespace HeuristicLab.Problems.DataAnalysis.Symbolic.Symbols {
   [StorableClass]
Index: /trunk/sources/HeuristicLab.Problems.DataAnalysis/3.3/Symbolic/Symbols/Or.cs
===================================================================
--- /trunk/sources/HeuristicLab.Problems.DataAnalysis/3.3/Symbolic/Symbols/Or.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.Problems.DataAnalysis/3.3/Symbolic/Symbols/Or.cs	(revision 4068)
@@ -20,8 +20,7 @@
 #endregion
 
-using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
-using HeuristicLab.Common;
 using HeuristicLab.Core;
 using HeuristicLab.Encodings.SymbolicExpressionTreeEncoding.Symbols;
+using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
 namespace HeuristicLab.Problems.DataAnalysis.Symbolic.Symbols {
   [StorableClass]
Index: /trunk/sources/HeuristicLab.Problems.DataAnalysis/3.3/Symbolic/Symbols/Sine.cs
===================================================================
--- /trunk/sources/HeuristicLab.Problems.DataAnalysis/3.3/Symbolic/Symbols/Sine.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.Problems.DataAnalysis/3.3/Symbolic/Symbols/Sine.cs	(revision 4068)
@@ -20,8 +20,7 @@
 #endregion
 
-using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
-using HeuristicLab.Common;
 using HeuristicLab.Core;
 using HeuristicLab.Encodings.SymbolicExpressionTreeEncoding.Symbols;
+using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
 namespace HeuristicLab.Problems.DataAnalysis.Symbolic.Symbols {
   [StorableClass]
Index: /trunk/sources/HeuristicLab.Problems.DataAnalysis/3.3/Symbolic/Symbols/Subtraction.cs
===================================================================
--- /trunk/sources/HeuristicLab.Problems.DataAnalysis/3.3/Symbolic/Symbols/Subtraction.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.Problems.DataAnalysis/3.3/Symbolic/Symbols/Subtraction.cs	(revision 4068)
@@ -20,8 +20,7 @@
 #endregion
 
-using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
-using HeuristicLab.Common;
 using HeuristicLab.Core;
 using HeuristicLab.Encodings.SymbolicExpressionTreeEncoding.Symbols;
+using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
 namespace HeuristicLab.Problems.DataAnalysis.Symbolic.Symbols {
   [StorableClass]
Index: /trunk/sources/HeuristicLab.Problems.DataAnalysis/3.3/Symbolic/Symbols/Tangent.cs
===================================================================
--- /trunk/sources/HeuristicLab.Problems.DataAnalysis/3.3/Symbolic/Symbols/Tangent.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.Problems.DataAnalysis/3.3/Symbolic/Symbols/Tangent.cs	(revision 4068)
@@ -20,8 +20,7 @@
 #endregion
 
-using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
-using HeuristicLab.Common;
 using HeuristicLab.Core;
 using HeuristicLab.Encodings.SymbolicExpressionTreeEncoding.Symbols;
+using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
 namespace HeuristicLab.Problems.DataAnalysis.Symbolic.Symbols {
   [StorableClass]
Index: /trunk/sources/HeuristicLab.Problems.DataAnalysis/3.3/Symbolic/Symbols/Variable.cs
===================================================================
--- /trunk/sources/HeuristicLab.Problems.DataAnalysis/3.3/Symbolic/Symbols/Variable.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.Problems.DataAnalysis/3.3/Symbolic/Symbols/Variable.cs	(revision 4068)
@@ -20,15 +20,11 @@
 #endregion
 
-using HeuristicLab.Encodings.SymbolicExpressionTreeEncoding;
+using System;
+using System.Collections.Generic;
 using HeuristicLab.Common;
 using HeuristicLab.Core;
-using HeuristicLab.Operators;
-using HeuristicLab.Random;
-using HeuristicLab.Data;
+using HeuristicLab.Encodings.SymbolicExpressionTreeEncoding;
+using HeuristicLab.Encodings.SymbolicExpressionTreeEncoding.Symbols;
 using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
-using HeuristicLab.Parameters;
-using System.Collections.Generic;
-using System;
-using HeuristicLab.Encodings.SymbolicExpressionTreeEncoding.Symbols;
 namespace HeuristicLab.Problems.DataAnalysis.Symbolic.Symbols {
   [StorableClass]
Index: /trunk/sources/HeuristicLab.Problems.DataAnalysis/3.3/Symbolic/Symbols/VariableTreeNode.cs
===================================================================
--- /trunk/sources/HeuristicLab.Problems.DataAnalysis/3.3/Symbolic/Symbols/VariableTreeNode.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.Problems.DataAnalysis/3.3/Symbolic/Symbols/VariableTreeNode.cs	(revision 4068)
@@ -20,11 +20,7 @@
 #endregion
 
+using HeuristicLab.Core;
 using HeuristicLab.Encodings.SymbolicExpressionTreeEncoding;
-using System;
-using System.Collections.Generic;
 using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
-using HeuristicLab.Common;
-using HeuristicLab.Core;
-using HeuristicLab.Data;
 using HeuristicLab.Random;
 namespace HeuristicLab.Problems.DataAnalysis.Symbolic.Symbols {
Index: /trunk/sources/HeuristicLab.Problems.DataAnalysis/3.3/Symbolic/VariableFrequencyAnalyser.cs
===================================================================
--- /trunk/sources/HeuristicLab.Problems.DataAnalysis/3.3/Symbolic/VariableFrequencyAnalyser.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.Problems.DataAnalysis/3.3/Symbolic/VariableFrequencyAnalyser.cs	(revision 4068)
@@ -24,9 +24,8 @@
 using HeuristicLab.Core;
 using HeuristicLab.Data;
-using System;
+using HeuristicLab.Encodings.SymbolicExpressionTreeEncoding;
+using HeuristicLab.Operators;
+using HeuristicLab.Parameters;
 using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
-using HeuristicLab.Operators;
-using HeuristicLab.Encodings.SymbolicExpressionTreeEncoding;
-using HeuristicLab.Parameters;
 using HeuristicLab.Problems.DataAnalysis.Symbolic.Symbols;
 
Index: /trunk/sources/HeuristicLab.Problems.DataAnalysis/3.3/Tests/Properties/AssemblyInfo.cs
===================================================================
--- /trunk/sources/HeuristicLab.Problems.DataAnalysis/3.3/Tests/Properties/AssemblyInfo.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.Problems.DataAnalysis/3.3/Tests/Properties/AssemblyInfo.cs	(revision 4068)
@@ -21,5 +21,4 @@
 
 using System.Reflection;
-using System.Runtime.CompilerServices;
 using System.Runtime.InteropServices;
 
Index: /trunk/sources/HeuristicLab.Problems.DataAnalysis/3.3/Tests/SimpleArithmeticExpressionInterpreterTest.cs
===================================================================
--- /trunk/sources/HeuristicLab.Problems.DataAnalysis/3.3/Tests/SimpleArithmeticExpressionInterpreterTest.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.Problems.DataAnalysis/3.3/Tests/SimpleArithmeticExpressionInterpreterTest.cs	(revision 4068)
@@ -20,14 +20,12 @@
 #endregion
 
-using System.IO;
 using System;
-using HeuristicLab.Random;
 using System.Collections.Generic;
-using System.Diagnostics;
+using System.Globalization;
+using System.Linq;
 using HeuristicLab.Encodings.SymbolicExpressionTreeEncoding;
 using HeuristicLab.Problems.DataAnalysis.Symbolic;
+using HeuristicLab.Random;
 using Microsoft.VisualStudio.TestTools.UnitTesting;
-using System.Linq;
-using System.Globalization;
 namespace HeuristicLab.Problems.DataAnalysis.Tests {
 
Index: /trunk/sources/HeuristicLab.Problems.DataAnalysis/3.3/Tests/SymbolicExpressionImporter.cs
===================================================================
--- /trunk/sources/HeuristicLab.Problems.DataAnalysis/3.3/Tests/SymbolicExpressionImporter.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.Problems.DataAnalysis/3.3/Tests/SymbolicExpressionImporter.cs	(revision 4068)
@@ -22,11 +22,9 @@
 using System;
 using System.Collections.Generic;
+using System.Diagnostics;
 using System.Linq;
-using System.Text;
-using System.IO;
-using System.Diagnostics;
+using HeuristicLab.Encodings.SymbolicExpressionTreeEncoding;
 using HeuristicLab.Encodings.SymbolicExpressionTreeEncoding.Symbols;
 using HeuristicLab.Problems.DataAnalysis.Symbolic.Symbols;
-using HeuristicLab.Encodings.SymbolicExpressionTreeEncoding;
 
 namespace HeuristicLab.Problems.DataAnalysis.Tests {
Index: /trunk/sources/HeuristicLab.Problems.DataAnalysis/3.3/Tests/Token.cs
===================================================================
--- /trunk/sources/HeuristicLab.Problems.DataAnalysis/3.3/Tests/Token.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.Problems.DataAnalysis/3.3/Tests/Token.cs	(revision 4068)
@@ -20,10 +20,4 @@
 #endregion
 
-using System;
-using System.Collections.Generic;
-using System.Linq;
-using System.Text;
-using System.IO;
-using System.Diagnostics;
 using System.Globalization;
 
Index: /trunk/sources/HeuristicLab.Problems.DataAnalysis/3.3/Tests/Util.cs
===================================================================
--- /trunk/sources/HeuristicLab.Problems.DataAnalysis/3.3/Tests/Util.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.Problems.DataAnalysis/3.3/Tests/Util.cs	(revision 4068)
@@ -20,15 +20,13 @@
 #endregion
 
-using Microsoft.VisualStudio.TestTools.UnitTesting;
-using System;
-using HeuristicLab.Random;
 using System.Collections.Generic;
-using System.Text;
 using System.Diagnostics;
+using System.Linq;
 using HeuristicLab.Encodings.SymbolicExpressionTreeEncoding;
-using HeuristicLab.Problems.DataAnalysis.Symbolic.Symbols;
 using HeuristicLab.Encodings.SymbolicExpressionTreeEncoding.Creators;
 using HeuristicLab.Problems.DataAnalysis.Symbolic;
-using System.Linq;
+using HeuristicLab.Problems.DataAnalysis.Symbolic.Symbols;
+using HeuristicLab.Random;
+using Microsoft.VisualStudio.TestTools.UnitTesting;
 namespace HeuristicLab.Problems.DataAnalysis.Tests {
   internal class Util {
Index: /trunk/sources/HeuristicLab.Problems.ExternalEvaluation.Views/3.3/EvaluationServiceClientView.cs
===================================================================
--- /trunk/sources/HeuristicLab.Problems.ExternalEvaluation.Views/3.3/EvaluationServiceClientView.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.Problems.ExternalEvaluation.Views/3.3/EvaluationServiceClientView.cs	(revision 4068)
@@ -20,14 +20,6 @@
 #endregion
 
-using System;
-using System.Collections.Generic;
-using System.ComponentModel;
-using System.Drawing;
-using System.Data;
-using System.Linq;
-using System.Text;
 using System.Windows.Forms;
 using HeuristicLab.Core.Views;
-using HeuristicLab.Problems.ExternalEvaluation;
 using HeuristicLab.MainForm;
 
Index: /trunk/sources/HeuristicLab.Problems.ExternalEvaluation.Views/3.3/EvaluationTCPChannelView.cs
===================================================================
--- /trunk/sources/HeuristicLab.Problems.ExternalEvaluation.Views/3.3/EvaluationTCPChannelView.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.Problems.ExternalEvaluation.Views/3.3/EvaluationTCPChannelView.cs	(revision 4068)
@@ -21,13 +21,8 @@
 
 using System;
-using System.Collections.Generic;
 using System.ComponentModel;
-using System.Drawing;
-using System.Data;
-using System.Linq;
-using System.Text;
 using System.Windows.Forms;
+using HeuristicLab.Core.Views;
 using HeuristicLab.MainForm;
-using HeuristicLab.Core.Views;
 
 namespace HeuristicLab.Problems.ExternalEvaluation.Views {
Index: /trunk/sources/HeuristicLab.Problems.ExternalEvaluation.Views/3.3/HeuristicLabProblemsExternalEvaluationViewsPlugin.cs
===================================================================
--- /trunk/sources/HeuristicLab.Problems.ExternalEvaluation.Views/3.3/HeuristicLabProblemsExternalEvaluationViewsPlugin.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.Problems.ExternalEvaluation.Views/3.3/HeuristicLabProblemsExternalEvaluationViewsPlugin.cs	(revision 4068)
@@ -20,8 +20,4 @@
 #endregion
 
-using System;
-using System.Collections.Generic;
-using System.Linq;
-using System.Text;
 using HeuristicLab.PluginInfrastructure;
 
Index: /trunk/sources/HeuristicLab.Problems.ExternalEvaluation.Views/3.3/Properties/AssemblyInfo.cs
===================================================================
--- /trunk/sources/HeuristicLab.Problems.ExternalEvaluation.Views/3.3/Properties/AssemblyInfo.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.Problems.ExternalEvaluation.Views/3.3/Properties/AssemblyInfo.cs	(revision 4068)
@@ -1,4 +1,3 @@
 ﻿using System.Reflection;
-using System.Runtime.CompilerServices;
 using System.Runtime.InteropServices;
 
Index: /trunk/sources/HeuristicLab.Problems.ExternalEvaluation.Views/3.3/SolutionMessageBuilderView.cs
===================================================================
--- /trunk/sources/HeuristicLab.Problems.ExternalEvaluation.Views/3.3/SolutionMessageBuilderView.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.Problems.ExternalEvaluation.Views/3.3/SolutionMessageBuilderView.cs	(revision 4068)
@@ -20,11 +20,4 @@
 #endregion
 
-using System;
-using System.Collections.Generic;
-using System.ComponentModel;
-using System.Drawing;
-using System.Data;
-using System.Linq;
-using System.Text;
 using System.Windows.Forms;
 using HeuristicLab.Core.Views;
Index: /trunk/sources/HeuristicLab.Problems.ExternalEvaluation/3.3/Converters/DateTimeValueConverter.cs
===================================================================
--- /trunk/sources/HeuristicLab.Problems.ExternalEvaluation/3.3/Converters/DateTimeValueConverter.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.Problems.ExternalEvaluation/3.3/Converters/DateTimeValueConverter.cs	(revision 4068)
@@ -21,10 +21,7 @@
 
 using System;
-using System.Collections.Generic;
-using System.Linq;
-using System.Text;
 using HeuristicLab.Core;
+using HeuristicLab.Data;
 using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
-using HeuristicLab.Data;
 
 namespace HeuristicLab.Problems.ExternalEvaluation {
@@ -50,5 +47,5 @@
       }
     }
-    
+
     #endregion
 
Index: /trunk/sources/HeuristicLab.Problems.ExternalEvaluation/3.3/Converters/StringConverter.cs
===================================================================
--- /trunk/sources/HeuristicLab.Problems.ExternalEvaluation/3.3/Converters/StringConverter.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.Problems.ExternalEvaluation/3.3/Converters/StringConverter.cs	(revision 4068)
@@ -21,10 +21,7 @@
 
 using System;
-using System.Collections.Generic;
-using System.Linq;
-using System.Text;
 using HeuristicLab.Core;
+using HeuristicLab.Data;
 using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
-using HeuristicLab.Data;
 
 namespace HeuristicLab.Problems.ExternalEvaluation {
@@ -35,5 +32,5 @@
 
     #region IItemToSolutionMessageConverter Members
-    
+
     public Type[] ItemTypes {
       get { return itemTypes; }
Index: /trunk/sources/HeuristicLab.Problems.ExternalEvaluation/3.3/Converters/TimeSpanValueConverter.cs
===================================================================
--- /trunk/sources/HeuristicLab.Problems.ExternalEvaluation/3.3/Converters/TimeSpanValueConverter.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.Problems.ExternalEvaluation/3.3/Converters/TimeSpanValueConverter.cs	(revision 4068)
@@ -21,10 +21,7 @@
 
 using System;
-using System.Collections.Generic;
-using System.Linq;
-using System.Text;
 using HeuristicLab.Core;
+using HeuristicLab.Data;
 using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
-using HeuristicLab.Data;
 
 namespace HeuristicLab.Problems.ExternalEvaluation {
@@ -50,5 +47,5 @@
       }
     }
-    
+
     #endregion
 
Index: /trunk/sources/HeuristicLab.Problems.ExternalEvaluation/3.3/Drivers/EvaluationChannel.cs
===================================================================
--- /trunk/sources/HeuristicLab.Problems.ExternalEvaluation/3.3/Drivers/EvaluationChannel.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.Problems.ExternalEvaluation/3.3/Drivers/EvaluationChannel.cs	(revision 4068)
@@ -20,5 +20,4 @@
 #endregion
 
-using System;
 using Google.ProtocolBuffers;
 using HeuristicLab.Core;
Index: /trunk/sources/HeuristicLab.Problems.ExternalEvaluation/3.3/Drivers/EvaluationServiceClient.cs
===================================================================
--- /trunk/sources/HeuristicLab.Problems.ExternalEvaluation/3.3/Drivers/EvaluationServiceClient.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.Problems.ExternalEvaluation/3.3/Drivers/EvaluationServiceClient.cs	(revision 4068)
@@ -21,11 +21,8 @@
 
 using System;
-using System.Collections.Generic;
-using System.Linq;
-using System.Text;
 using HeuristicLab.Core;
+using HeuristicLab.Data;
+using HeuristicLab.Parameters;
 using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
-using HeuristicLab.Parameters;
-using HeuristicLab.Data;
 
 namespace HeuristicLab.Problems.ExternalEvaluation {
@@ -54,5 +51,5 @@
 
     #region IEvaluationServiceClient Members
-    
+
     public QualityMessage Evaluate(SolutionMessage solution) {
       int tries = 0, maxTries = RetryParameter.Value.Value;
@@ -66,7 +63,9 @@
           result = (QualityMessage)Channel.Receive(QualityMessage.CreateBuilder());
           success = true;
-        } catch (InvalidOperationException) {
+        }
+        catch (InvalidOperationException) {
           throw;
-        } catch {
+        }
+        catch {
           if (tries >= maxTries)
             throw;
@@ -85,7 +84,9 @@
           Channel.Send(solution);
           success = true;
-        } catch (InvalidOperationException) {
+        }
+        catch (InvalidOperationException) {
           throw;
-        } catch {
+        }
+        catch {
           if (tries >= maxTries)
             throw;
@@ -102,5 +103,6 @@
         try {
           Channel.Open();
-        } catch (Exception e) {
+        }
+        catch (Exception e) {
           throw new InvalidOperationException(Name + ": The channel could not be opened.", e);
         }
@@ -112,5 +114,6 @@
       try {
         message = (QualityMessage)Channel.Receive(QualityMessage.CreateBuilder());
-      } catch { }
+      }
+      catch { }
       ((Action<QualityMessage>)callback).Invoke(message);
     }
Index: /trunk/sources/HeuristicLab.Problems.ExternalEvaluation/3.3/ExternalEvaluationProblem.cs
===================================================================
--- /trunk/sources/HeuristicLab.Problems.ExternalEvaluation/3.3/ExternalEvaluationProblem.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.Problems.ExternalEvaluation/3.3/ExternalEvaluationProblem.cs	(revision 4068)
@@ -24,4 +24,5 @@
 using System.Drawing;
 using System.Linq;
+using HeuristicLab.Analysis;
 using HeuristicLab.Collections;
 using HeuristicLab.Common;
@@ -29,8 +30,7 @@
 using HeuristicLab.Data;
 using HeuristicLab.Optimization;
+using HeuristicLab.Optimization.Operators;
 using HeuristicLab.Parameters;
 using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
-using HeuristicLab.Optimization.Operators;
-using HeuristicLab.Analysis;
 
 namespace HeuristicLab.Problems.ExternalEvaluation {
Index: /trunk/sources/HeuristicLab.Problems.ExternalEvaluation/3.3/Interfaces/IEvaluationChannel.cs
===================================================================
--- /trunk/sources/HeuristicLab.Problems.ExternalEvaluation/3.3/Interfaces/IEvaluationChannel.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.Problems.ExternalEvaluation/3.3/Interfaces/IEvaluationChannel.cs	(revision 4068)
@@ -20,5 +20,4 @@
 #endregion
 
-using System;
 using Google.ProtocolBuffers;
 using HeuristicLab.Core;
Index: /trunk/sources/HeuristicLab.Problems.ExternalEvaluation/3.3/SolutionMessageBuilder.cs
===================================================================
--- /trunk/sources/HeuristicLab.Problems.ExternalEvaluation/3.3/SolutionMessageBuilder.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.Problems.ExternalEvaluation/3.3/SolutionMessageBuilder.cs	(revision 4068)
@@ -23,8 +23,7 @@
 using System.Collections.Generic;
 using System.Linq;
-using System.Text;
+using HeuristicLab.Collections;
 using HeuristicLab.Core;
 using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
-using HeuristicLab.Collections;
 
 namespace HeuristicLab.Problems.ExternalEvaluation {
Index: /trunk/sources/HeuristicLab.Problems.Knapsack.Views/3.3/KnapsackSolutionView.cs
===================================================================
--- /trunk/sources/HeuristicLab.Problems.Knapsack.Views/3.3/KnapsackSolutionView.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.Problems.Knapsack.Views/3.3/KnapsackSolutionView.cs	(revision 4068)
@@ -21,11 +21,8 @@
 
 using System;
+using System.Collections.Generic;
 using System.Drawing;
 using System.Windows.Forms;
-using HeuristicLab.Core.Views;
 using HeuristicLab.MainForm;
-using HeuristicLab.Problems.Knapsack;
-using HeuristicLab.Data;
-using System.Collections.Generic;
 
 namespace HeuristicLab.Problems.Knapsack.Views {
Index: /trunk/sources/HeuristicLab.Problems.Knapsack/3.3/Analyzers/BestKnapsackSolutionAnalyzer.cs
===================================================================
--- /trunk/sources/HeuristicLab.Problems.Knapsack/3.3/Analyzers/BestKnapsackSolutionAnalyzer.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.Problems.Knapsack/3.3/Analyzers/BestKnapsackSolutionAnalyzer.cs	(revision 4068)
@@ -20,13 +20,10 @@
 #endregion
 
-using System;
-using System.Collections.Generic;
 using System.Linq;
-using System.Text;
+using HeuristicLab.Core;
+using HeuristicLab.Data;
+using HeuristicLab.Encodings.BinaryVectorEncoding;
+using HeuristicLab.Operators;
 using HeuristicLab.Optimization;
-using HeuristicLab.Data;
-using HeuristicLab.Core;
-using HeuristicLab.Operators;
-using HeuristicLab.Encodings.BinaryVectorEncoding;
 using HeuristicLab.Parameters;
 using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
@@ -93,5 +90,5 @@
 
       int i = -1;
-      if (!max) 
+      if (!max)
         i = qualities.Select((x, index) => new { index, x.Value }).OrderBy(x => x.Value).First().index;
       else i = qualities.Select((x, index) => new { index, x.Value }).OrderByDescending(x => x.Value).First().index;
@@ -110,5 +107,5 @@
         BestSolutionParameter.ActualValue = solution;
         results.Add(new Result("Best Knapsack Solution", solution));
-      }  else {
+      } else {
         if (max && qualities[i].Value > solution.Quality.Value ||
           !max && qualities[i].Value < solution.Quality.Value) {
Index: /trunk/sources/HeuristicLab.Problems.Knapsack/3.3/Evaluators/KnapsackEvaluator.cs
===================================================================
--- /trunk/sources/HeuristicLab.Problems.Knapsack/3.3/Evaluators/KnapsackEvaluator.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.Problems.Knapsack/3.3/Evaluators/KnapsackEvaluator.cs	(revision 4068)
@@ -20,12 +20,11 @@
 #endregion
 
-using HeuristicLab.Common;
+using System;
 using HeuristicLab.Core;
 using HeuristicLab.Data;
+using HeuristicLab.Encodings.BinaryVectorEncoding;
+using HeuristicLab.Operators;
 using HeuristicLab.Parameters;
 using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
-using HeuristicLab.Encodings.BinaryVectorEncoding;
-using HeuristicLab.Operators;
-using System;
 
 namespace HeuristicLab.Problems.Knapsack {
@@ -51,5 +50,5 @@
       get { return (ILookupParameter<DoubleValue>)Parameters["AppliedPenalty"]; }
     }
-    
+
     public ILookupParameter<BinaryVector> BinaryVectorParameter {
       get { return (ILookupParameter<BinaryVector>)Parameters["BinaryVector"]; }
@@ -110,7 +109,7 @@
       if (weight > capacity.Value) {
         appliedPenalty = penalty.Value * (weight - capacity.Value);
-      } 
+      }
 
-      quality =  value - appliedPenalty;
+      quality = value - appliedPenalty;
 
       result.AppliedPenalty = new DoubleValue(appliedPenalty);
@@ -126,7 +125,7 @@
 
       KnapsackEvaluation evaluation = Apply(BinaryVectorParameter.ActualValue,
-        KnapsackCapacityParameter.ActualValue, 
-        PenaltyParameter.ActualValue, 
-        WeightsParameter.ActualValue, 
+        KnapsackCapacityParameter.ActualValue,
+        PenaltyParameter.ActualValue,
+        WeightsParameter.ActualValue,
         ValuesParameter.ActualValue);
 
Index: /trunk/sources/HeuristicLab.Problems.Knapsack/3.3/Interfaces/IKnapsackMoveEvaluator.cs
===================================================================
--- /trunk/sources/HeuristicLab.Problems.Knapsack/3.3/Interfaces/IKnapsackMoveEvaluator.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.Problems.Knapsack/3.3/Interfaces/IKnapsackMoveEvaluator.cs	(revision 4068)
@@ -20,9 +20,7 @@
 #endregion
 
-using HeuristicLab.Common;
 using HeuristicLab.Core;
 using HeuristicLab.Data;
 using HeuristicLab.Optimization;
-using HeuristicLab.Encodings.BinaryVectorEncoding;
 
 namespace HeuristicLab.Problems.Knapsack {
Index: /trunk/sources/HeuristicLab.Problems.Knapsack/3.3/KnapsackSolution.cs
===================================================================
--- /trunk/sources/HeuristicLab.Problems.Knapsack/3.3/KnapsackSolution.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.Problems.Knapsack/3.3/KnapsackSolution.cs	(revision 4068)
@@ -21,13 +21,10 @@
 
 using System;
-using System.Collections.Generic;
-using System.Linq;
-using System.Text;
+using System.Drawing;
+using HeuristicLab.Common;
 using HeuristicLab.Core;
-using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
-using System.Drawing;
 using HeuristicLab.Data;
 using HeuristicLab.Encodings.BinaryVectorEncoding;
-using HeuristicLab.Common;
+using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
 
 namespace HeuristicLab.Problems.Knapsack {
Index: /trunk/sources/HeuristicLab.Problems.Knapsack/3.3/MoveEvaluators/KnapsackMoveEvaluator.cs
===================================================================
--- /trunk/sources/HeuristicLab.Problems.Knapsack/3.3/MoveEvaluators/KnapsackMoveEvaluator.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.Problems.Knapsack/3.3/MoveEvaluators/KnapsackMoveEvaluator.cs	(revision 4068)
@@ -20,12 +20,11 @@
 #endregion
 
-using HeuristicLab.Common;
 using HeuristicLab.Core;
 using HeuristicLab.Data;
+using HeuristicLab.Encodings.BinaryVectorEncoding;
 using HeuristicLab.Operators;
 using HeuristicLab.Optimization;
 using HeuristicLab.Parameters;
 using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
-using HeuristicLab.Encodings.BinaryVectorEncoding;
 
 namespace HeuristicLab.Problems.Knapsack {
Index: /trunk/sources/HeuristicLab.Problems.Knapsack/3.3/MoveEvaluators/KnapsackOneBitflipMoveEvaluator.cs
===================================================================
--- /trunk/sources/HeuristicLab.Problems.Knapsack/3.3/MoveEvaluators/KnapsackOneBitflipMoveEvaluator.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.Problems.Knapsack/3.3/MoveEvaluators/KnapsackOneBitflipMoveEvaluator.cs	(revision 4068)
@@ -20,12 +20,9 @@
 #endregion
 
-using HeuristicLab.Common;
 using HeuristicLab.Core;
 using HeuristicLab.Data;
 using HeuristicLab.Encodings.BinaryVectorEncoding;
-using HeuristicLab.Operators;
 using HeuristicLab.Parameters;
 using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
-using System;
 
 namespace HeuristicLab.Problems.Knapsack {
@@ -59,5 +56,5 @@
 
       double moveQuality = quality.Value;
-      
+
       if (MoveQualityParameter.ActualValue == null) MoveQualityParameter.ActualValue = new DoubleValue(moveQuality);
       else MoveQualityParameter.ActualValue.Value = moveQuality;
Index: /trunk/sources/HeuristicLab.Problems.OneMax.Views/3.3/OneMaxSolutionView.cs
===================================================================
--- /trunk/sources/HeuristicLab.Problems.OneMax.Views/3.3/OneMaxSolutionView.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.Problems.OneMax.Views/3.3/OneMaxSolutionView.cs	(revision 4068)
@@ -21,11 +21,6 @@
 
 using System;
-using System.Drawing;
 using System.Windows.Forms;
-using HeuristicLab.Core.Views;
 using HeuristicLab.MainForm;
-using HeuristicLab.Problems.OneMax;
-using HeuristicLab.Data;
-using System.Collections.Generic;
 
 namespace HeuristicLab.Problems.OneMax.Views {
Index: /trunk/sources/HeuristicLab.Problems.OneMax/3.3/Analyzers/BestOneMaxSolutionAnalyzer.cs
===================================================================
--- /trunk/sources/HeuristicLab.Problems.OneMax/3.3/Analyzers/BestOneMaxSolutionAnalyzer.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.Problems.OneMax/3.3/Analyzers/BestOneMaxSolutionAnalyzer.cs	(revision 4068)
@@ -20,13 +20,10 @@
 #endregion
 
-using System;
-using System.Collections.Generic;
 using System.Linq;
-using System.Text;
+using HeuristicLab.Core;
+using HeuristicLab.Data;
+using HeuristicLab.Encodings.BinaryVectorEncoding;
+using HeuristicLab.Operators;
 using HeuristicLab.Optimization;
-using HeuristicLab.Data;
-using HeuristicLab.Core;
-using HeuristicLab.Operators;
-using HeuristicLab.Encodings.BinaryVectorEncoding;
 using HeuristicLab.Parameters;
 using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
@@ -91,5 +88,5 @@
         BestSolutionParameter.ActualValue = solution;
         results.Add(new Result("Best OneMax Solution", solution));
-      }  else {
+      } else {
         if (max && qualities[i].Value > solution.Quality.Value ||
           !max && qualities[i].Value < solution.Quality.Value) {
Index: /trunk/sources/HeuristicLab.Problems.OneMax/3.3/Evaluators/OneMaxEvaluator.cs
===================================================================
--- /trunk/sources/HeuristicLab.Problems.OneMax/3.3/Evaluators/OneMaxEvaluator.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.Problems.OneMax/3.3/Evaluators/OneMaxEvaluator.cs	(revision 4068)
@@ -20,11 +20,10 @@
 #endregion
 
-using HeuristicLab.Common;
 using HeuristicLab.Core;
 using HeuristicLab.Data;
+using HeuristicLab.Encodings.BinaryVectorEncoding;
+using HeuristicLab.Operators;
 using HeuristicLab.Parameters;
 using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
-using HeuristicLab.Encodings.BinaryVectorEncoding;
-using HeuristicLab.Operators;
 
 namespace HeuristicLab.Problems.OneMax {
@@ -38,5 +37,5 @@
       get { return (ILookupParameter<DoubleValue>)Parameters["Quality"]; }
     }
-    
+
     public ILookupParameter<BinaryVector> BinaryVectorParameter {
       get { return (ILookupParameter<BinaryVector>)Parameters["BinaryVector"]; }
Index: /trunk/sources/HeuristicLab.Problems.OneMax/3.3/Interfaces/IOneMaxMoveEvaluator.cs
===================================================================
--- /trunk/sources/HeuristicLab.Problems.OneMax/3.3/Interfaces/IOneMaxMoveEvaluator.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.Problems.OneMax/3.3/Interfaces/IOneMaxMoveEvaluator.cs	(revision 4068)
@@ -20,9 +20,5 @@
 #endregion
 
-using HeuristicLab.Common;
-using HeuristicLab.Core;
-using HeuristicLab.Data;
 using HeuristicLab.Optimization;
-using HeuristicLab.Encodings.BinaryVectorEncoding;
 
 namespace HeuristicLab.Problems.OneMax {
Index: /trunk/sources/HeuristicLab.Problems.OneMax/3.3/MoveEvaluators/OneMaxMoveEvaluator.cs
===================================================================
--- /trunk/sources/HeuristicLab.Problems.OneMax/3.3/MoveEvaluators/OneMaxMoveEvaluator.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.Problems.OneMax/3.3/MoveEvaluators/OneMaxMoveEvaluator.cs	(revision 4068)
@@ -20,12 +20,11 @@
 #endregion
 
-using HeuristicLab.Common;
 using HeuristicLab.Core;
 using HeuristicLab.Data;
+using HeuristicLab.Encodings.BinaryVectorEncoding;
 using HeuristicLab.Operators;
 using HeuristicLab.Optimization;
 using HeuristicLab.Parameters;
 using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
-using HeuristicLab.Encodings.BinaryVectorEncoding;
 
 namespace HeuristicLab.Problems.OneMax {
Index: /trunk/sources/HeuristicLab.Problems.OneMax/3.3/MoveEvaluators/OneMaxOneBitflipMoveEvaluator.cs
===================================================================
--- /trunk/sources/HeuristicLab.Problems.OneMax/3.3/MoveEvaluators/OneMaxOneBitflipMoveEvaluator.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.Problems.OneMax/3.3/MoveEvaluators/OneMaxOneBitflipMoveEvaluator.cs	(revision 4068)
@@ -20,12 +20,9 @@
 #endregion
 
-using HeuristicLab.Common;
 using HeuristicLab.Core;
 using HeuristicLab.Data;
 using HeuristicLab.Encodings.BinaryVectorEncoding;
-using HeuristicLab.Operators;
 using HeuristicLab.Parameters;
 using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
-using System;
 
 namespace HeuristicLab.Problems.OneMax {
@@ -54,5 +51,5 @@
       else
         moveQuality += 1.0;
-      
+
       if (MoveQualityParameter.ActualValue == null) MoveQualityParameter.ActualValue = new DoubleValue(moveQuality);
       else MoveQualityParameter.ActualValue.Value = moveQuality;
Index: /trunk/sources/HeuristicLab.Problems.OneMax/3.3/OneMaxSolution.cs
===================================================================
--- /trunk/sources/HeuristicLab.Problems.OneMax/3.3/OneMaxSolution.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.Problems.OneMax/3.3/OneMaxSolution.cs	(revision 4068)
@@ -21,13 +21,10 @@
 
 using System;
-using System.Collections.Generic;
-using System.Linq;
-using System.Text;
+using System.Drawing;
+using HeuristicLab.Common;
 using HeuristicLab.Core;
-using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
-using System.Drawing;
 using HeuristicLab.Data;
 using HeuristicLab.Encodings.BinaryVectorEncoding;
-using HeuristicLab.Common;
+using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
 
 namespace HeuristicLab.Problems.OneMax {
Index: /trunk/sources/HeuristicLab.Problems.TestFunctions.Views/3.3/SingleObjectiveTestFunctionSolutionView.cs
===================================================================
--- /trunk/sources/HeuristicLab.Problems.TestFunctions.Views/3.3/SingleObjectiveTestFunctionSolutionView.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.Problems.TestFunctions.Views/3.3/SingleObjectiveTestFunctionSolutionView.cs	(revision 4068)
@@ -25,6 +25,6 @@
 using HeuristicLab.Core.Views;
 using HeuristicLab.Data;
+using HeuristicLab.Encodings.RealVectorEncoding;
 using HeuristicLab.MainForm;
-using HeuristicLab.Encodings.RealVectorEncoding;
 
 namespace HeuristicLab.Problems.TestFunctions.Views {
@@ -198,5 +198,5 @@
       backgroundImage = null;
       pictureBox.Image = null;
- 	    GenerateImage();
+      GenerateImage();
     }
 
Index: /trunk/sources/HeuristicLab.Problems.TestFunctions/3.3/Analyzers/BestSingleObjectiveTestFunctionSolutionAnalyzer.cs
===================================================================
--- /trunk/sources/HeuristicLab.Problems.TestFunctions/3.3/Analyzers/BestSingleObjectiveTestFunctionSolutionAnalyzer.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.Problems.TestFunctions/3.3/Analyzers/BestSingleObjectiveTestFunctionSolutionAnalyzer.cs	(revision 4068)
@@ -20,13 +20,10 @@
 #endregion
 
-using System;
-using System.Collections.Generic;
 using System.Linq;
-using System.Text;
+using HeuristicLab.Core;
+using HeuristicLab.Data;
+using HeuristicLab.Encodings.RealVectorEncoding;
+using HeuristicLab.Operators;
 using HeuristicLab.Optimization;
-using HeuristicLab.Data;
-using HeuristicLab.Core;
-using HeuristicLab.Operators;
-using HeuristicLab.Encodings.RealVectorEncoding;
 using HeuristicLab.Parameters;
 using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
Index: /trunk/sources/HeuristicLab.Problems.TestFunctions/3.3/Evaluators/AckleyEvaluator.cs
===================================================================
--- /trunk/sources/HeuristicLab.Problems.TestFunctions/3.3/Evaluators/AckleyEvaluator.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.Problems.TestFunctions/3.3/Evaluators/AckleyEvaluator.cs	(revision 4068)
@@ -21,5 +21,4 @@
 
 using System;
-using HeuristicLab.Common;
 using HeuristicLab.Core;
 using HeuristicLab.Data;
Index: /trunk/sources/HeuristicLab.Problems.TestFunctions/3.3/Evaluators/BealeEvaluator.cs
===================================================================
--- /trunk/sources/HeuristicLab.Problems.TestFunctions/3.3/Evaluators/BealeEvaluator.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.Problems.TestFunctions/3.3/Evaluators/BealeEvaluator.cs	(revision 4068)
@@ -21,5 +21,4 @@
 
 using System;
-using HeuristicLab.Common;
 using HeuristicLab.Core;
 using HeuristicLab.Data;
Index: /trunk/sources/HeuristicLab.Problems.TestFunctions/3.3/Evaluators/BoothEvaluator.cs
===================================================================
--- /trunk/sources/HeuristicLab.Problems.TestFunctions/3.3/Evaluators/BoothEvaluator.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.Problems.TestFunctions/3.3/Evaluators/BoothEvaluator.cs	(revision 4068)
@@ -21,5 +21,4 @@
 
 using System;
-using HeuristicLab.Common;
 using HeuristicLab.Core;
 using HeuristicLab.Data;
Index: /trunk/sources/HeuristicLab.Problems.TestFunctions/3.3/Evaluators/GriewankEvaluator.cs
===================================================================
--- /trunk/sources/HeuristicLab.Problems.TestFunctions/3.3/Evaluators/GriewankEvaluator.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.Problems.TestFunctions/3.3/Evaluators/GriewankEvaluator.cs	(revision 4068)
@@ -21,5 +21,4 @@
 
 using System;
-using HeuristicLab.Common;
 using HeuristicLab.Core;
 using HeuristicLab.Data;
Index: /trunk/sources/HeuristicLab.Problems.TestFunctions/3.3/Evaluators/LevyEvaluator.cs
===================================================================
--- /trunk/sources/HeuristicLab.Problems.TestFunctions/3.3/Evaluators/LevyEvaluator.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.Problems.TestFunctions/3.3/Evaluators/LevyEvaluator.cs	(revision 4068)
@@ -21,5 +21,4 @@
 
 using System;
-using HeuristicLab.Common;
 using HeuristicLab.Core;
 using HeuristicLab.Data;
Index: /trunk/sources/HeuristicLab.Problems.TestFunctions/3.3/Evaluators/MatyasEvaluator.cs
===================================================================
--- /trunk/sources/HeuristicLab.Problems.TestFunctions/3.3/Evaluators/MatyasEvaluator.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.Problems.TestFunctions/3.3/Evaluators/MatyasEvaluator.cs	(revision 4068)
@@ -21,5 +21,4 @@
 
 using System;
-using HeuristicLab.Common;
 using HeuristicLab.Core;
 using HeuristicLab.Data;
Index: /trunk/sources/HeuristicLab.Problems.TestFunctions/3.3/Evaluators/MultinormalEvaluator.cs
===================================================================
--- /trunk/sources/HeuristicLab.Problems.TestFunctions/3.3/Evaluators/MultinormalEvaluator.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.Problems.TestFunctions/3.3/Evaluators/MultinormalEvaluator.cs	(revision 4068)
@@ -1,12 +1,11 @@
 ﻿using System;
 using System.Collections.Generic;
+using System.Diagnostics;
 using System.Linq;
-using System.Text;
+using HeuristicLab.Core;
 using HeuristicLab.Data;
 using HeuristicLab.Encodings.RealVectorEncoding;
-using System.Diagnostics;
-using HeuristicLab.Core;
+using HeuristicLab.Parameters;
 using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
-using HeuristicLab.Parameters;
 
 namespace HeuristicLab.Problems.TestFunctions.Evaluators {
@@ -14,5 +13,5 @@
   [StorableClass]
   public class MultinormalEvaluator : SingleObjectiveTestFunctionProblemEvaluator {
-    
+
     private ItemList<RealVector> centers {
       get { return (ItemList<RealVector>)Parameters["Centers"].ActualValue; }
@@ -61,5 +60,5 @@
     private IEnumerable<double> GetSigma_2s(int nDim) {
       yield return 0.2;
-      for (int i = 1; i < (1 << nDim)-1; i++) {
+      for (int i = 1; i < (1 << nDim) - 1; i++) {
         yield return Random.NextDouble() * 0.5 + 0.75;
       }
@@ -74,5 +73,5 @@
       s_2s = new RealVector();
     }
-    
+
     private double FastFindOptimum(out RealVector bestSolution) {
       var optima = centers.Select((c, i) => new { f = EvaluateFunction(c), i }).OrderBy(v => v.f).ToList();
@@ -107,5 +106,5 @@
       get {
         if (centers.Count == 0) {
-          return - 1 / (2 * Math.PI * 0.2);
+          return -1 / (2 * Math.PI * 0.2);
         } else {
           RealVector bestSolution;
Index: /trunk/sources/HeuristicLab.Problems.TestFunctions/3.3/Evaluators/RastriginEvaluator.cs
===================================================================
--- /trunk/sources/HeuristicLab.Problems.TestFunctions/3.3/Evaluators/RastriginEvaluator.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.Problems.TestFunctions/3.3/Evaluators/RastriginEvaluator.cs	(revision 4068)
@@ -21,10 +21,9 @@
 
 using System;
-using HeuristicLab.Common;
 using HeuristicLab.Core;
 using HeuristicLab.Data;
 using HeuristicLab.Encodings.RealVectorEncoding;
+using HeuristicLab.Parameters;
 using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
-using HeuristicLab.Parameters;
 
 namespace HeuristicLab.Problems.TestFunctions {
Index: /trunk/sources/HeuristicLab.Problems.TestFunctions/3.3/Evaluators/RosenbrockEvaluator.cs
===================================================================
--- /trunk/sources/HeuristicLab.Problems.TestFunctions/3.3/Evaluators/RosenbrockEvaluator.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.Problems.TestFunctions/3.3/Evaluators/RosenbrockEvaluator.cs	(revision 4068)
@@ -21,5 +21,4 @@
 
 using System;
-using HeuristicLab.Common;
 using HeuristicLab.Core;
 using HeuristicLab.Data;
Index: /trunk/sources/HeuristicLab.Problems.TestFunctions/3.3/Evaluators/SchwefelEvaluator.cs
===================================================================
--- /trunk/sources/HeuristicLab.Problems.TestFunctions/3.3/Evaluators/SchwefelEvaluator.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.Problems.TestFunctions/3.3/Evaluators/SchwefelEvaluator.cs	(revision 4068)
@@ -21,5 +21,4 @@
 
 using System;
-using HeuristicLab.Common;
 using HeuristicLab.Core;
 using HeuristicLab.Data;
Index: /trunk/sources/HeuristicLab.Problems.TestFunctions/3.3/Evaluators/SingleObjectiveTestFunctionProblemEvaluator.cs
===================================================================
--- /trunk/sources/HeuristicLab.Problems.TestFunctions/3.3/Evaluators/SingleObjectiveTestFunctionProblemEvaluator.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.Problems.TestFunctions/3.3/Evaluators/SingleObjectiveTestFunctionProblemEvaluator.cs	(revision 4068)
@@ -20,5 +20,4 @@
 #endregion
 
-using HeuristicLab.Common;
 using HeuristicLab.Core;
 using HeuristicLab.Data;
Index: /trunk/sources/HeuristicLab.Problems.TestFunctions/3.3/Evaluators/SphereEvaluator.cs
===================================================================
--- /trunk/sources/HeuristicLab.Problems.TestFunctions/3.3/Evaluators/SphereEvaluator.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.Problems.TestFunctions/3.3/Evaluators/SphereEvaluator.cs	(revision 4068)
@@ -21,10 +21,9 @@
 
 using System;
-using HeuristicLab.Common;
 using HeuristicLab.Core;
 using HeuristicLab.Data;
 using HeuristicLab.Encodings.RealVectorEncoding;
+using HeuristicLab.Parameters;
 using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
-using HeuristicLab.Parameters;
 
 namespace HeuristicLab.Problems.TestFunctions {
Index: /trunk/sources/HeuristicLab.Problems.TestFunctions/3.3/Evaluators/SumSquaresEvaluator.cs
===================================================================
--- /trunk/sources/HeuristicLab.Problems.TestFunctions/3.3/Evaluators/SumSquaresEvaluator.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.Problems.TestFunctions/3.3/Evaluators/SumSquaresEvaluator.cs	(revision 4068)
@@ -20,6 +20,4 @@
 #endregion
 
-using System;
-using HeuristicLab.Common;
 using HeuristicLab.Core;
 using HeuristicLab.Data;
Index: /trunk/sources/HeuristicLab.Problems.TestFunctions/3.3/Evaluators/ZakharovEvaluator.cs
===================================================================
--- /trunk/sources/HeuristicLab.Problems.TestFunctions/3.3/Evaluators/ZakharovEvaluator.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.Problems.TestFunctions/3.3/Evaluators/ZakharovEvaluator.cs	(revision 4068)
@@ -20,6 +20,4 @@
 #endregion
 
-using System;
-using HeuristicLab.Common;
 using HeuristicLab.Core;
 using HeuristicLab.Data;
Index: /trunk/sources/HeuristicLab.Problems.TestFunctions/3.3/Interfaces/IBestSingleObjectiveTestFunctionSolutionAnalyzer.cs
===================================================================
--- /trunk/sources/HeuristicLab.Problems.TestFunctions/3.3/Interfaces/IBestSingleObjectiveTestFunctionSolutionAnalyzer.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.Problems.TestFunctions/3.3/Interfaces/IBestSingleObjectiveTestFunctionSolutionAnalyzer.cs	(revision 4068)
@@ -21,5 +21,4 @@
 
 using HeuristicLab.Core;
-using HeuristicLab.Data;
 using HeuristicLab.Optimization;
 
Index: /trunk/sources/HeuristicLab.Problems.TestFunctions/3.3/Interfaces/IRastriginMoveEvaluator.cs
===================================================================
--- /trunk/sources/HeuristicLab.Problems.TestFunctions/3.3/Interfaces/IRastriginMoveEvaluator.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.Problems.TestFunctions/3.3/Interfaces/IRastriginMoveEvaluator.cs	(revision 4068)
@@ -20,6 +20,4 @@
 #endregion
 
-using HeuristicLab.Common;
-using HeuristicLab.Core;
 using HeuristicLab.Data;
 
Index: /trunk/sources/HeuristicLab.Problems.TestFunctions/3.3/Interfaces/IRealVectorPSODecoder.cs
===================================================================
--- /trunk/sources/HeuristicLab.Problems.TestFunctions/3.3/Interfaces/IRealVectorPSODecoder.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.Problems.TestFunctions/3.3/Interfaces/IRealVectorPSODecoder.cs	(revision 4068)
@@ -20,10 +20,6 @@
 #endregion
 
-using System;
-using System.Collections.Generic;
-using System.Linq;
-using System.Text;
+using HeuristicLab.Core;
 using HeuristicLab.Optimization;
-using HeuristicLab.Core;
 
 namespace HeuristicLab.Problems.TestFunctions {
Index: /trunk/sources/HeuristicLab.Problems.TestFunctions/3.3/Interfaces/IRealVectorPSOEncoder.cs
===================================================================
--- /trunk/sources/HeuristicLab.Problems.TestFunctions/3.3/Interfaces/IRealVectorPSOEncoder.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.Problems.TestFunctions/3.3/Interfaces/IRealVectorPSOEncoder.cs	(revision 4068)
@@ -20,10 +20,6 @@
 #endregion
 
-using System;
-using System.Collections.Generic;
-using System.Linq;
-using System.Text;
+using HeuristicLab.Core;
 using HeuristicLab.Optimization;
-using HeuristicLab.Core;
 
 namespace HeuristicLab.Problems.TestFunctions {
Index: /trunk/sources/HeuristicLab.Problems.TestFunctions/3.3/Interfaces/ISingleObjectiveTestFunctionAdditiveMoveEvaluator.cs
===================================================================
--- /trunk/sources/HeuristicLab.Problems.TestFunctions/3.3/Interfaces/ISingleObjectiveTestFunctionAdditiveMoveEvaluator.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.Problems.TestFunctions/3.3/Interfaces/ISingleObjectiveTestFunctionAdditiveMoveEvaluator.cs	(revision 4068)
@@ -20,9 +20,5 @@
 #endregion
 
-using HeuristicLab.Common;
-using HeuristicLab.Core;
-using HeuristicLab.Data;
 using HeuristicLab.Encodings.RealVectorEncoding;
-using HeuristicLab.Optimization;
 
 namespace HeuristicLab.Problems.TestFunctions {
Index: /trunk/sources/HeuristicLab.Problems.TestFunctions/3.3/Interfaces/ISingleObjectiveTestFunctionMoveEvaluator.cs
===================================================================
--- /trunk/sources/HeuristicLab.Problems.TestFunctions/3.3/Interfaces/ISingleObjectiveTestFunctionMoveEvaluator.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.Problems.TestFunctions/3.3/Interfaces/ISingleObjectiveTestFunctionMoveEvaluator.cs	(revision 4068)
@@ -21,8 +21,4 @@
 
 using System;
-using HeuristicLab.Common;
-using HeuristicLab.Core;
-using HeuristicLab.Data;
-using HeuristicLab.Encodings.RealVectorEncoding;
 using HeuristicLab.Optimization;
 
Index: /trunk/sources/HeuristicLab.Problems.TestFunctions/3.3/Interfaces/ISingleObjectiveTestFunctionProblemEvaluator.cs
===================================================================
--- /trunk/sources/HeuristicLab.Problems.TestFunctions/3.3/Interfaces/ISingleObjectiveTestFunctionProblemEvaluator.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.Problems.TestFunctions/3.3/Interfaces/ISingleObjectiveTestFunctionProblemEvaluator.cs	(revision 4068)
@@ -20,5 +20,4 @@
 #endregion
 
-using HeuristicLab.Common;
 using HeuristicLab.Core;
 using HeuristicLab.Data;
Index: /trunk/sources/HeuristicLab.Problems.TestFunctions/3.3/Interfaces/ISingleObjectiveTestFunctionProblemSolutionsVisualizer.cs
===================================================================
--- /trunk/sources/HeuristicLab.Problems.TestFunctions/3.3/Interfaces/ISingleObjectiveTestFunctionProblemSolutionsVisualizer.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.Problems.TestFunctions/3.3/Interfaces/ISingleObjectiveTestFunctionProblemSolutionsVisualizer.cs	(revision 4068)
@@ -20,5 +20,4 @@
 #endregion
 
-using HeuristicLab.Common;
 using HeuristicLab.Core;
 using HeuristicLab.Encodings.RealVectorEncoding;
Index: /trunk/sources/HeuristicLab.Problems.TestFunctions/3.3/Interfaces/ISphereMoveEvaluator.cs
===================================================================
--- /trunk/sources/HeuristicLab.Problems.TestFunctions/3.3/Interfaces/ISphereMoveEvaluator.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.Problems.TestFunctions/3.3/Interfaces/ISphereMoveEvaluator.cs	(revision 4068)
@@ -20,6 +20,4 @@
 #endregion
 
-using HeuristicLab.Common;
-using HeuristicLab.Core;
 using HeuristicLab.Data;
 
Index: /trunk/sources/HeuristicLab.Problems.TestFunctions/3.3/MoveEvaluators/AckleyAdditiveMoveEvaluator.cs
===================================================================
--- /trunk/sources/HeuristicLab.Problems.TestFunctions/3.3/MoveEvaluators/AckleyAdditiveMoveEvaluator.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.Problems.TestFunctions/3.3/MoveEvaluators/AckleyAdditiveMoveEvaluator.cs	(revision 4068)
@@ -20,8 +20,7 @@
 #endregion
 
-using HeuristicLab.Common;
 using HeuristicLab.Core;
+using HeuristicLab.Encodings.RealVectorEncoding;
 using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
-using HeuristicLab.Encodings.RealVectorEncoding;
 
 namespace HeuristicLab.Problems.TestFunctions {
Index: /trunk/sources/HeuristicLab.Problems.TestFunctions/3.3/MoveEvaluators/AdditiveMoveEvaluator.cs
===================================================================
--- /trunk/sources/HeuristicLab.Problems.TestFunctions/3.3/MoveEvaluators/AdditiveMoveEvaluator.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.Problems.TestFunctions/3.3/MoveEvaluators/AdditiveMoveEvaluator.cs	(revision 4068)
@@ -21,12 +21,10 @@
 
 using System;
-using HeuristicLab.Common;
 using HeuristicLab.Core;
 using HeuristicLab.Data;
+using HeuristicLab.Encodings.RealVectorEncoding;
 using HeuristicLab.Operators;
-using HeuristicLab.Optimization;
 using HeuristicLab.Parameters;
 using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
-using HeuristicLab.Encodings.RealVectorEncoding;
 
 namespace HeuristicLab.Problems.TestFunctions {
Index: /trunk/sources/HeuristicLab.Problems.TestFunctions/3.3/MoveEvaluators/BealeAdditiveMoveEvaluator.cs
===================================================================
--- /trunk/sources/HeuristicLab.Problems.TestFunctions/3.3/MoveEvaluators/BealeAdditiveMoveEvaluator.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.Problems.TestFunctions/3.3/MoveEvaluators/BealeAdditiveMoveEvaluator.cs	(revision 4068)
@@ -20,8 +20,7 @@
 #endregion
 
-using HeuristicLab.Common;
 using HeuristicLab.Core;
+using HeuristicLab.Encodings.RealVectorEncoding;
 using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
-using HeuristicLab.Encodings.RealVectorEncoding;
 
 namespace HeuristicLab.Problems.TestFunctions {
Index: /trunk/sources/HeuristicLab.Problems.TestFunctions/3.3/MoveEvaluators/BoothAdditiveMoveEvaluator.cs
===================================================================
--- /trunk/sources/HeuristicLab.Problems.TestFunctions/3.3/MoveEvaluators/BoothAdditiveMoveEvaluator.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.Problems.TestFunctions/3.3/MoveEvaluators/BoothAdditiveMoveEvaluator.cs	(revision 4068)
@@ -20,8 +20,7 @@
 #endregion
 
-using HeuristicLab.Common;
 using HeuristicLab.Core;
+using HeuristicLab.Encodings.RealVectorEncoding;
 using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
-using HeuristicLab.Encodings.RealVectorEncoding;
 
 namespace HeuristicLab.Problems.TestFunctions {
Index: /trunk/sources/HeuristicLab.Problems.TestFunctions/3.3/MoveEvaluators/GriewankAdditiveMoveEvaluator.cs
===================================================================
--- /trunk/sources/HeuristicLab.Problems.TestFunctions/3.3/MoveEvaluators/GriewankAdditiveMoveEvaluator.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.Problems.TestFunctions/3.3/MoveEvaluators/GriewankAdditiveMoveEvaluator.cs	(revision 4068)
@@ -20,8 +20,7 @@
 #endregion
 
-using HeuristicLab.Common;
 using HeuristicLab.Core;
+using HeuristicLab.Encodings.RealVectorEncoding;
 using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
-using HeuristicLab.Encodings.RealVectorEncoding;
 
 namespace HeuristicLab.Problems.TestFunctions {
Index: /trunk/sources/HeuristicLab.Problems.TestFunctions/3.3/MoveEvaluators/LevyAdditiveMoveEvaluator.cs
===================================================================
--- /trunk/sources/HeuristicLab.Problems.TestFunctions/3.3/MoveEvaluators/LevyAdditiveMoveEvaluator.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.Problems.TestFunctions/3.3/MoveEvaluators/LevyAdditiveMoveEvaluator.cs	(revision 4068)
@@ -20,8 +20,7 @@
 #endregion
 
-using HeuristicLab.Common;
 using HeuristicLab.Core;
+using HeuristicLab.Encodings.RealVectorEncoding;
 using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
-using HeuristicLab.Encodings.RealVectorEncoding;
 
 namespace HeuristicLab.Problems.TestFunctions {
Index: /trunk/sources/HeuristicLab.Problems.TestFunctions/3.3/MoveEvaluators/MatyasAdditiveMoveEvaluator.cs
===================================================================
--- /trunk/sources/HeuristicLab.Problems.TestFunctions/3.3/MoveEvaluators/MatyasAdditiveMoveEvaluator.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.Problems.TestFunctions/3.3/MoveEvaluators/MatyasAdditiveMoveEvaluator.cs	(revision 4068)
@@ -20,8 +20,7 @@
 #endregion
 
-using HeuristicLab.Common;
 using HeuristicLab.Core;
+using HeuristicLab.Encodings.RealVectorEncoding;
 using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
-using HeuristicLab.Encodings.RealVectorEncoding;
 
 namespace HeuristicLab.Problems.TestFunctions {
Index: /trunk/sources/HeuristicLab.Problems.TestFunctions/3.3/MoveEvaluators/MultinormalAdditiveMoveEvaluator.cs
===================================================================
--- /trunk/sources/HeuristicLab.Problems.TestFunctions/3.3/MoveEvaluators/MultinormalAdditiveMoveEvaluator.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.Problems.TestFunctions/3.3/MoveEvaluators/MultinormalAdditiveMoveEvaluator.cs	(revision 4068)
@@ -20,12 +20,10 @@
 #endregion
 
-using HeuristicLab.Common;
+using System;
 using HeuristicLab.Core;
+using HeuristicLab.Encodings.RealVectorEncoding;
+using HeuristicLab.Parameters;
 using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
-using HeuristicLab.Encodings.RealVectorEncoding;
 using HeuristicLab.Problems.TestFunctions.Evaluators;
-using HeuristicLab.Parameters;
-using HeuristicLab.Data;
-using System;
 
 namespace HeuristicLab.Problems.TestFunctions {
@@ -40,5 +38,5 @@
 
     public MultinormalAdditiveMoveEvaluator() {
-      Parameters.Add(new LookupParameter<ISingleObjectiveTestFunctionProblemEvaluator>("Evaluator", ""));      
+      Parameters.Add(new LookupParameter<ISingleObjectiveTestFunctionProblemEvaluator>("Evaluator", ""));
     }
 
@@ -47,5 +45,5 @@
     }
 
-    protected override double Evaluate(double quality, RealVector point, AdditiveMove move) {      
+    protected override double Evaluate(double quality, RealVector point, AdditiveMove move) {
       RealVectorAdditiveMoveWrapper wrapper = new RealVectorAdditiveMoveWrapper(move, point);
       var eval = EvaluatorParameter.ActualValue as MultinormalEvaluator;
Index: /trunk/sources/HeuristicLab.Problems.TestFunctions/3.3/MoveEvaluators/RastriginAdditiveMoveEvaluator.cs
===================================================================
--- /trunk/sources/HeuristicLab.Problems.TestFunctions/3.3/MoveEvaluators/RastriginAdditiveMoveEvaluator.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.Problems.TestFunctions/3.3/MoveEvaluators/RastriginAdditiveMoveEvaluator.cs	(revision 4068)
@@ -20,5 +20,4 @@
 #endregion
 
-using HeuristicLab.Common;
 using HeuristicLab.Core;
 using HeuristicLab.Data;
Index: /trunk/sources/HeuristicLab.Problems.TestFunctions/3.3/MoveEvaluators/RosenbrockAdditiveMoveEvaluator.cs
===================================================================
--- /trunk/sources/HeuristicLab.Problems.TestFunctions/3.3/MoveEvaluators/RosenbrockAdditiveMoveEvaluator.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.Problems.TestFunctions/3.3/MoveEvaluators/RosenbrockAdditiveMoveEvaluator.cs	(revision 4068)
@@ -20,8 +20,7 @@
 #endregion
 
-using HeuristicLab.Common;
 using HeuristicLab.Core;
+using HeuristicLab.Encodings.RealVectorEncoding;
 using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
-using HeuristicLab.Encodings.RealVectorEncoding;
 
 namespace HeuristicLab.Problems.TestFunctions {
Index: /trunk/sources/HeuristicLab.Problems.TestFunctions/3.3/MoveEvaluators/SchwefelAdditiveMoveEvaluator.cs
===================================================================
--- /trunk/sources/HeuristicLab.Problems.TestFunctions/3.3/MoveEvaluators/SchwefelAdditiveMoveEvaluator.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.Problems.TestFunctions/3.3/MoveEvaluators/SchwefelAdditiveMoveEvaluator.cs	(revision 4068)
@@ -20,8 +20,7 @@
 #endregion
 
-using HeuristicLab.Common;
 using HeuristicLab.Core;
+using HeuristicLab.Encodings.RealVectorEncoding;
 using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
-using HeuristicLab.Encodings.RealVectorEncoding;
 
 namespace HeuristicLab.Problems.TestFunctions {
Index: /trunk/sources/HeuristicLab.Problems.TestFunctions/3.3/MoveEvaluators/SphereAdditiveMoveEvaluator.cs
===================================================================
--- /trunk/sources/HeuristicLab.Problems.TestFunctions/3.3/MoveEvaluators/SphereAdditiveMoveEvaluator.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.Problems.TestFunctions/3.3/MoveEvaluators/SphereAdditiveMoveEvaluator.cs	(revision 4068)
@@ -20,5 +20,4 @@
 #endregion
 
-using HeuristicLab.Common;
 using HeuristicLab.Core;
 using HeuristicLab.Data;
Index: /trunk/sources/HeuristicLab.Problems.TestFunctions/3.3/MoveEvaluators/SumSquaresAdditiveMoveEvaluator.cs
===================================================================
--- /trunk/sources/HeuristicLab.Problems.TestFunctions/3.3/MoveEvaluators/SumSquaresAdditiveMoveEvaluator.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.Problems.TestFunctions/3.3/MoveEvaluators/SumSquaresAdditiveMoveEvaluator.cs	(revision 4068)
@@ -20,8 +20,7 @@
 #endregion
 
-using HeuristicLab.Common;
 using HeuristicLab.Core;
+using HeuristicLab.Encodings.RealVectorEncoding;
 using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
-using HeuristicLab.Encodings.RealVectorEncoding;
 
 namespace HeuristicLab.Problems.TestFunctions {
Index: /trunk/sources/HeuristicLab.Problems.TestFunctions/3.3/MoveEvaluators/ZakharovAdditiveMoveEvaluator.cs
===================================================================
--- /trunk/sources/HeuristicLab.Problems.TestFunctions/3.3/MoveEvaluators/ZakharovAdditiveMoveEvaluator.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.Problems.TestFunctions/3.3/MoveEvaluators/ZakharovAdditiveMoveEvaluator.cs	(revision 4068)
@@ -20,8 +20,7 @@
 #endregion
 
-using HeuristicLab.Common;
 using HeuristicLab.Core;
+using HeuristicLab.Encodings.RealVectorEncoding;
 using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
-using HeuristicLab.Encodings.RealVectorEncoding;
 
 namespace HeuristicLab.Problems.TestFunctions {
Index: /trunk/sources/HeuristicLab.Problems.TestFunctions/3.3/RealVectorToRealVectorEncoder.cs
===================================================================
--- /trunk/sources/HeuristicLab.Problems.TestFunctions/3.3/RealVectorToRealVectorEncoder.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.Problems.TestFunctions/3.3/RealVectorToRealVectorEncoder.cs	(revision 4068)
@@ -20,64 +20,58 @@
 #endregion
 
-using System;
-using System.Collections.Generic;
-using System.Linq;
-using System.Text;
-using HeuristicLab.Optimization;
-using HeuristicLab.Operators;
 using HeuristicLab.Core;
 using HeuristicLab.Data;
+using HeuristicLab.Encodings.RealVectorEncoding;
+using HeuristicLab.Operators;
 using HeuristicLab.Parameters;
-using HeuristicLab.Encodings.RealVectorEncoding;
 
-namespace HeuristicLab.Problems.TestFunctions
-{
-    public class RealVectorToRealVectorEncoder : SingleSuccessorOperator, IRealVectorPSOEncoder, IRealVectorOperator
-    {
-      #region Parameters
+namespace HeuristicLab.Problems.TestFunctions {
+  public class RealVectorToRealVectorEncoder : SingleSuccessorOperator, IRealVectorPSOEncoder, IRealVectorOperator {
+    #region Parameters
 
-      public IParameter OriginalRealVectorParameter {
-        get { return (IParameter)Parameters["OriginalRealVector"]; }
-      }
+    public IParameter OriginalRealVectorParameter {
+      get { return (IParameter)Parameters["OriginalRealVector"]; }
+    }
 
-      public IParameter RealVectorParameter {
-        get { return (IParameter)Parameters["RealVector"]; }
-      }
+    public IParameter RealVectorParameter {
+      get { return (IParameter)Parameters["RealVector"]; }
+    }
 
-      public ILookupParameter<IntValue> LengthParameter {
-        get { return (ILookupParameter<IntValue>)Parameters["Length"]; }
-      }
+    public ILookupParameter<IntValue> LengthParameter {
+      get { return (ILookupParameter<IntValue>)Parameters["Length"]; }
+    }
 
-      public IValueLookupParameter<DoubleMatrix> BoundsParameter {
-        get { return (IValueLookupParameter<DoubleMatrix>)Parameters["Bounds"]; }
-      }
+    public IValueLookupParameter<DoubleMatrix> BoundsParameter {
+      get { return (IValueLookupParameter<DoubleMatrix>)Parameters["Bounds"]; }
+    }
 
-      protected ScopeParameter CurrentScopeParameter {
-        get { return (ScopeParameter)Parameters["CurrentScope"]; }
-      }
-      #endregion
+    protected ScopeParameter CurrentScopeParameter {
+      get { return (ScopeParameter)Parameters["CurrentScope"]; }
+    }
+    #endregion
 
-      public IScope CurrentScope {
-        get { return CurrentScopeParameter.ActualValue; }
-      }
+    public IScope CurrentScope {
+      get { return CurrentScopeParameter.ActualValue; }
+    }
 
-      public RealVectorToRealVectorEncoder() : base() {
-        Parameters.Add(new LookupParameter<RealVector>("OriginalRealVector", "The original real vector."));
-        Parameters.Add(new LookupParameter<RealVector>("RealVector", "The resulting reference to the original real vector."));
-        Parameters.Add(new LookupParameter<IntValue>("Length", "Vector length."));
-        Parameters.Add(new ScopeParameter("CurrentScope", "The current scope bounds matrix should be cloned."));
-        Parameters.Add(new ValueLookupParameter<DoubleMatrix>("Bounds", "The lower and upper bounds in each dimension."));
-      }
+    public RealVectorToRealVectorEncoder()
+      : base() {
+      Parameters.Add(new LookupParameter<RealVector>("OriginalRealVector", "The original real vector."));
+      Parameters.Add(new LookupParameter<RealVector>("RealVector", "The resulting reference to the original real vector."));
+      Parameters.Add(new LookupParameter<IntValue>("Length", "Vector length."));
+      Parameters.Add(new ScopeParameter("CurrentScope", "The current scope bounds matrix should be cloned."));
+      Parameters.Add(new ValueLookupParameter<DoubleMatrix>("Bounds", "The lower and upper bounds in each dimension."));
+    }
 
-      public override IOperation Apply() {
-        RealVectorParameter.ActualValue = OriginalRealVectorParameter.ActualValue;
-        IItem value = (IItem) BoundsParameter.ActualValue.Clone();
-        CurrentScope.Variables.Add(new Variable("ParticleBounds", BoundsParameter.Description, value == null ? null : (IItem)value.Clone()));
-        return base.Apply();
-      }
+    public override IOperation Apply() {
+      RealVectorParameter.ActualValue = OriginalRealVectorParameter.ActualValue;
+      IItem value = (IItem)BoundsParameter.ActualValue.Clone();
+      CurrentScope.Variables.Add(new Variable("ParticleBounds", BoundsParameter.Description, value == null ? null : (IItem)value.Clone()));
+      return base.Apply();
+    }
 
-      public override bool CanChangeName {
-        get { return false; }
-      }
+    public override bool CanChangeName {
+      get { return false; }
     }
+  }
 }
Index: /trunk/sources/HeuristicLab.Problems.TestFunctions/3.3/SingleObjectiveTestFunctionProblem.cs
===================================================================
--- /trunk/sources/HeuristicLab.Problems.TestFunctions/3.3/SingleObjectiveTestFunctionProblem.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.Problems.TestFunctions/3.3/SingleObjectiveTestFunctionProblem.cs	(revision 4068)
@@ -22,5 +22,4 @@
 using System;
 using System.Collections.Generic;
-using System.Collections.ObjectModel;
 using System.Drawing;
 using System.Linq;
@@ -383,5 +382,5 @@
         ((ILookupParameter)op.OriginalRealVectorParameter).ActualName = SolutionCreator.RealVectorParameter.ActualName;
         op.BoundsParameter.Value = (DoubleMatrix)BoundsParameter.Value.Clone();
-        op.BoundsParameter.ActualName = "ParticleBounds"; 
+        op.BoundsParameter.ActualName = "ParticleBounds";
       }
     }
Index: /trunk/sources/HeuristicLab.Problems.TestFunctions/3.3/Tests/AckleyEvaluatorTest.cs
===================================================================
--- /trunk/sources/HeuristicLab.Problems.TestFunctions/3.3/Tests/AckleyEvaluatorTest.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.Problems.TestFunctions/3.3/Tests/AckleyEvaluatorTest.cs	(revision 4068)
@@ -20,17 +20,15 @@
 #endregion
 
+using HeuristicLab.Encodings.RealVectorEncoding;
 using HeuristicLab.Problems.TestFunctions;
 using Microsoft.VisualStudio.TestTools.UnitTesting;
-using HeuristicLab.Encodings.RealVectorEncoding;
-using HeuristicLab.Data;
 
-namespace HeuristicLab.Problems.TestFunctions_33.Tests
-{
-    
-    
-    /// <summary>
-    ///This is a test class for AckleyEvaluatorTest and is intended
-    ///to contain all AckleyEvaluatorTest Unit Tests
-    ///</summary>
+namespace HeuristicLab.Problems.TestFunctions_33.Tests {
+
+
+  /// <summary>
+  ///This is a test class for AckleyEvaluatorTest and is intended
+  ///to contain all AckleyEvaluatorTest Unit Tests
+  ///</summary>
   [TestClass()]
   public class AckleyEvaluatorTest {
Index: /trunk/sources/HeuristicLab.Problems.TestFunctions/3.3/Tests/BealeEvaluatorTest.cs
===================================================================
--- /trunk/sources/HeuristicLab.Problems.TestFunctions/3.3/Tests/BealeEvaluatorTest.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.Problems.TestFunctions/3.3/Tests/BealeEvaluatorTest.cs	(revision 4068)
@@ -20,17 +20,15 @@
 #endregion
 
+using HeuristicLab.Encodings.RealVectorEncoding;
 using HeuristicLab.Problems.TestFunctions;
 using Microsoft.VisualStudio.TestTools.UnitTesting;
-using HeuristicLab.Encodings.RealVectorEncoding;
-using HeuristicLab.Data;
 
-namespace HeuristicLab.Problems.TestFunctions_33.Tests
-{
-    
-    
-    /// <summary>
-    ///This is a test class for BealeEvaluatorTest and is intended
-    ///to contain all BealeEvaluatorTest Unit Tests
-    ///</summary>
+namespace HeuristicLab.Problems.TestFunctions_33.Tests {
+
+
+  /// <summary>
+  ///This is a test class for BealeEvaluatorTest and is intended
+  ///to contain all BealeEvaluatorTest Unit Tests
+  ///</summary>
   [TestClass()]
   public class BealeEvaluatorTest {
Index: /trunk/sources/HeuristicLab.Problems.TestFunctions/3.3/Tests/BoothEvaluatorTest.cs
===================================================================
--- /trunk/sources/HeuristicLab.Problems.TestFunctions/3.3/Tests/BoothEvaluatorTest.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.Problems.TestFunctions/3.3/Tests/BoothEvaluatorTest.cs	(revision 4068)
@@ -20,17 +20,15 @@
 #endregion
 
+using HeuristicLab.Encodings.RealVectorEncoding;
 using HeuristicLab.Problems.TestFunctions;
 using Microsoft.VisualStudio.TestTools.UnitTesting;
-using HeuristicLab.Encodings.RealVectorEncoding;
-using HeuristicLab.Data;
 
-namespace HeuristicLab.Problems.TestFunctions_33.Tests
-{
-    
-    
-    /// <summary>
-    ///This is a test class for BoothEvaluatorTest and is intended
-    ///to contain all BoothEvaluatorTest Unit Tests
-    ///</summary>
+namespace HeuristicLab.Problems.TestFunctions_33.Tests {
+
+
+  /// <summary>
+  ///This is a test class for BoothEvaluatorTest and is intended
+  ///to contain all BoothEvaluatorTest Unit Tests
+  ///</summary>
   [TestClass()]
   public class BoothEvaluatorTest {
Index: /trunk/sources/HeuristicLab.Problems.TestFunctions/3.3/Tests/GriewankEvaluatorTest.cs
===================================================================
--- /trunk/sources/HeuristicLab.Problems.TestFunctions/3.3/Tests/GriewankEvaluatorTest.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.Problems.TestFunctions/3.3/Tests/GriewankEvaluatorTest.cs	(revision 4068)
@@ -20,17 +20,15 @@
 #endregion
 
+using HeuristicLab.Encodings.RealVectorEncoding;
 using HeuristicLab.Problems.TestFunctions;
 using Microsoft.VisualStudio.TestTools.UnitTesting;
-using HeuristicLab.Encodings.RealVectorEncoding;
-using HeuristicLab.Data;
 
-namespace HeuristicLab.Problems.TestFunctions_33.Tests
-{
-    
-    
-    /// <summary>
-    ///This is a test class for GriewankEvaluatorTest and is intended
-    ///to contain all GriewankEvaluatorTest Unit Tests
-    ///</summary>
+namespace HeuristicLab.Problems.TestFunctions_33.Tests {
+
+
+  /// <summary>
+  ///This is a test class for GriewankEvaluatorTest and is intended
+  ///to contain all GriewankEvaluatorTest Unit Tests
+  ///</summary>
   [TestClass()]
   public class GriewankEvaluatorTest {
Index: /trunk/sources/HeuristicLab.Problems.TestFunctions/3.3/Tests/LevyEvaluatorTest.cs
===================================================================
--- /trunk/sources/HeuristicLab.Problems.TestFunctions/3.3/Tests/LevyEvaluatorTest.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.Problems.TestFunctions/3.3/Tests/LevyEvaluatorTest.cs	(revision 4068)
@@ -20,17 +20,15 @@
 #endregion
 
+using HeuristicLab.Encodings.RealVectorEncoding;
 using HeuristicLab.Problems.TestFunctions;
 using Microsoft.VisualStudio.TestTools.UnitTesting;
-using HeuristicLab.Encodings.RealVectorEncoding;
-using HeuristicLab.Data;
 
-namespace HeuristicLab.Problems.TestFunctions_33.Tests
-{
-    
-    
-    /// <summary>
-    ///This is a test class for LevyEvaluatorTest and is intended
-    ///to contain all LevyEvaluatorTest Unit Tests
-    ///</summary>
+namespace HeuristicLab.Problems.TestFunctions_33.Tests {
+
+
+  /// <summary>
+  ///This is a test class for LevyEvaluatorTest and is intended
+  ///to contain all LevyEvaluatorTest Unit Tests
+  ///</summary>
   [TestClass()]
   public class LevyEvaluatorTest {
Index: /trunk/sources/HeuristicLab.Problems.TestFunctions/3.3/Tests/MatyasEvaluatorTest.cs
===================================================================
--- /trunk/sources/HeuristicLab.Problems.TestFunctions/3.3/Tests/MatyasEvaluatorTest.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.Problems.TestFunctions/3.3/Tests/MatyasEvaluatorTest.cs	(revision 4068)
@@ -20,17 +20,15 @@
 #endregion
 
+using HeuristicLab.Encodings.RealVectorEncoding;
 using HeuristicLab.Problems.TestFunctions;
 using Microsoft.VisualStudio.TestTools.UnitTesting;
-using HeuristicLab.Encodings.RealVectorEncoding;
-using HeuristicLab.Data;
 
-namespace HeuristicLab.Problems.TestFunctions_33.Tests
-{
-    
-    
-    /// <summary>
-    ///This is a test class for MatyasEvaluatorTest and is intended
-    ///to contain all MatyasEvaluatorTest Unit Tests
-    ///</summary>
+namespace HeuristicLab.Problems.TestFunctions_33.Tests {
+
+
+  /// <summary>
+  ///This is a test class for MatyasEvaluatorTest and is intended
+  ///to contain all MatyasEvaluatorTest Unit Tests
+  ///</summary>
   [TestClass()]
   public class MatyasEvaluatorTest {
Index: /trunk/sources/HeuristicLab.Problems.TestFunctions/3.3/Tests/Properties/AssemblyInfo.cs
===================================================================
--- /trunk/sources/HeuristicLab.Problems.TestFunctions/3.3/Tests/Properties/AssemblyInfo.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.Problems.TestFunctions/3.3/Tests/Properties/AssemblyInfo.cs	(revision 4068)
@@ -1,4 +1,3 @@
 ﻿using System.Reflection;
-using System.Runtime.CompilerServices;
 using System.Runtime.InteropServices;
 
Index: /trunk/sources/HeuristicLab.Problems.TestFunctions/3.3/Tests/RastriginEvaluatorTest.cs
===================================================================
--- /trunk/sources/HeuristicLab.Problems.TestFunctions/3.3/Tests/RastriginEvaluatorTest.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.Problems.TestFunctions/3.3/Tests/RastriginEvaluatorTest.cs	(revision 4068)
@@ -20,18 +20,15 @@
 #endregion
 
+using HeuristicLab.Encodings.RealVectorEncoding;
 using HeuristicLab.Problems.TestFunctions;
 using Microsoft.VisualStudio.TestTools.UnitTesting;
-using HeuristicLab.Encodings.RealVectorEncoding;
-using HeuristicLab.Data;
-using HeuristicLab.Parameters;
 
-namespace HeuristicLab.Problems.TestFunctions_33.Tests
-{
-    
-    
-    /// <summary>
-    ///This is a test class for RastriginEvaluatorTest and is intended
-    ///to contain all RastriginEvaluatorTest Unit Tests
-    ///</summary>
+namespace HeuristicLab.Problems.TestFunctions_33.Tests {
+
+
+  /// <summary>
+  ///This is a test class for RastriginEvaluatorTest and is intended
+  ///to contain all RastriginEvaluatorTest Unit Tests
+  ///</summary>
   [TestClass()]
   public class RastriginEvaluatorTest {
Index: /trunk/sources/HeuristicLab.Problems.TestFunctions/3.3/Tests/RosenbrockEvaluatorTest.cs
===================================================================
--- /trunk/sources/HeuristicLab.Problems.TestFunctions/3.3/Tests/RosenbrockEvaluatorTest.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.Problems.TestFunctions/3.3/Tests/RosenbrockEvaluatorTest.cs	(revision 4068)
@@ -20,17 +20,15 @@
 #endregion
 
+using HeuristicLab.Encodings.RealVectorEncoding;
 using HeuristicLab.Problems.TestFunctions;
 using Microsoft.VisualStudio.TestTools.UnitTesting;
-using HeuristicLab.Encodings.RealVectorEncoding;
-using HeuristicLab.Data;
 
-namespace HeuristicLab.Problems.TestFunctions_33.Tests
-{
-    
-    
-    /// <summary>
-    ///This is a test class for RosenbrockEvaluatorTest and is intended
-    ///to contain all RosenbrockEvaluatorTest Unit Tests
-    ///</summary>
+namespace HeuristicLab.Problems.TestFunctions_33.Tests {
+
+
+  /// <summary>
+  ///This is a test class for RosenbrockEvaluatorTest and is intended
+  ///to contain all RosenbrockEvaluatorTest Unit Tests
+  ///</summary>
   [TestClass()]
   public class RosenbrockEvaluatorTest {
Index: /trunk/sources/HeuristicLab.Problems.TestFunctions/3.3/Tests/SphereEvaluatorTest.cs
===================================================================
--- /trunk/sources/HeuristicLab.Problems.TestFunctions/3.3/Tests/SphereEvaluatorTest.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.Problems.TestFunctions/3.3/Tests/SphereEvaluatorTest.cs	(revision 4068)
@@ -20,18 +20,15 @@
 #endregion
 
+using HeuristicLab.Encodings.RealVectorEncoding;
 using HeuristicLab.Problems.TestFunctions;
 using Microsoft.VisualStudio.TestTools.UnitTesting;
-using HeuristicLab.Encodings.RealVectorEncoding;
-using HeuristicLab.Data;
-using HeuristicLab.Parameters;
 
-namespace HeuristicLab.Problems.TestFunctions_33.Tests
-{
-    
-    
-    /// <summary>
-    ///This is a test class for SphereEvaluatorTest and is intended
-    ///to contain all SphereEvaluatorTest Unit Tests
-    ///</summary>
+namespace HeuristicLab.Problems.TestFunctions_33.Tests {
+
+
+  /// <summary>
+  ///This is a test class for SphereEvaluatorTest and is intended
+  ///to contain all SphereEvaluatorTest Unit Tests
+  ///</summary>
   [TestClass()]
   public class SphereEvaluatorTest {
Index: /trunk/sources/HeuristicLab.Problems.TestFunctions/3.3/Tests/SumSquaresEvaluatorTest.cs
===================================================================
--- /trunk/sources/HeuristicLab.Problems.TestFunctions/3.3/Tests/SumSquaresEvaluatorTest.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.Problems.TestFunctions/3.3/Tests/SumSquaresEvaluatorTest.cs	(revision 4068)
@@ -20,17 +20,15 @@
 #endregion
 
+using HeuristicLab.Encodings.RealVectorEncoding;
 using HeuristicLab.Problems.TestFunctions;
 using Microsoft.VisualStudio.TestTools.UnitTesting;
-using HeuristicLab.Encodings.RealVectorEncoding;
-using HeuristicLab.Data;
 
-namespace HeuristicLab.Problems.TestFunctions_33.Tests
-{
-    
-    
-    /// <summary>
-    ///This is a test class for SumSquaresEvaluatorTest and is intended
-    ///to contain all SumSquaresEvaluatorTest Unit Tests
-    ///</summary>
+namespace HeuristicLab.Problems.TestFunctions_33.Tests {
+
+
+  /// <summary>
+  ///This is a test class for SumSquaresEvaluatorTest and is intended
+  ///to contain all SumSquaresEvaluatorTest Unit Tests
+  ///</summary>
   [TestClass()]
   public class SumSquaresEvaluatorTest {
Index: /trunk/sources/HeuristicLab.Problems.TestFunctions/3.3/Tests/ZakharovEvaluatorTest.cs
===================================================================
--- /trunk/sources/HeuristicLab.Problems.TestFunctions/3.3/Tests/ZakharovEvaluatorTest.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.Problems.TestFunctions/3.3/Tests/ZakharovEvaluatorTest.cs	(revision 4068)
@@ -20,17 +20,15 @@
 #endregion
 
+using HeuristicLab.Encodings.RealVectorEncoding;
 using HeuristicLab.Problems.TestFunctions;
 using Microsoft.VisualStudio.TestTools.UnitTesting;
-using HeuristicLab.Encodings.RealVectorEncoding;
-using HeuristicLab.Data;
 
-namespace HeuristicLab.Problems.TestFunctions_33.Tests
-{
-    
-    
-    /// <summary>
-    ///This is a test class for ZakharovEvaluatorTest and is intended
-    ///to contain all ZakharovEvaluatorTest Unit Tests
-    ///</summary>
+namespace HeuristicLab.Problems.TestFunctions_33.Tests {
+
+
+  /// <summary>
+  ///This is a test class for ZakharovEvaluatorTest and is intended
+  ///to contain all ZakharovEvaluatorTest Unit Tests
+  ///</summary>
   [TestClass()]
   public class ZakharovEvaluatorTest {
Index: /trunk/sources/HeuristicLab.Problems.TravelingSalesman.Views/3.3/TravelingSalesmanProblemView.cs
===================================================================
--- /trunk/sources/HeuristicLab.Problems.TravelingSalesman.Views/3.3/TravelingSalesmanProblemView.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.Problems.TravelingSalesman.Views/3.3/TravelingSalesmanProblemView.cs	(revision 4068)
@@ -22,5 +22,4 @@
 using System;
 using System.Windows.Forms;
-using HeuristicLab.Common;
 using HeuristicLab.Core;
 using HeuristicLab.Core.Views;
Index: /trunk/sources/HeuristicLab.Problems.TravelingSalesman/3.3/Analyzers/BestTSPSolutionAnalyzer.cs
===================================================================
--- /trunk/sources/HeuristicLab.Problems.TravelingSalesman/3.3/Analyzers/BestTSPSolutionAnalyzer.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.Problems.TravelingSalesman/3.3/Analyzers/BestTSPSolutionAnalyzer.cs	(revision 4068)
@@ -21,5 +21,4 @@
 
 using System.Linq;
-using HeuristicLab.Common;
 using HeuristicLab.Core;
 using HeuristicLab.Data;
@@ -86,5 +85,5 @@
         i = qualities.Select((x, index) => new { index, x.Value }).OrderBy(x => x.Value).First().index;
       else i = qualities.Select((x, index) => new { index, x.Value }).OrderByDescending(x => x.Value).First().index;
-      
+
       if (bestKnownQuality == null ||
           max && qualities[i].Value > bestKnownQuality.Value ||
Index: /trunk/sources/HeuristicLab.Problems.TravelingSalesman/3.3/Evaluators/TSPCoordinatesPathEvaluator.cs
===================================================================
--- /trunk/sources/HeuristicLab.Problems.TravelingSalesman/3.3/Evaluators/TSPCoordinatesPathEvaluator.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.Problems.TravelingSalesman/3.3/Evaluators/TSPCoordinatesPathEvaluator.cs	(revision 4068)
@@ -20,5 +20,4 @@
 #endregion
 
-using HeuristicLab.Common;
 using HeuristicLab.Core;
 using HeuristicLab.Data;
Index: /trunk/sources/HeuristicLab.Problems.TravelingSalesman/3.3/Evaluators/TSPEuclideanPathEvaluator.cs
===================================================================
--- /trunk/sources/HeuristicLab.Problems.TravelingSalesman/3.3/Evaluators/TSPEuclideanPathEvaluator.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.Problems.TravelingSalesman/3.3/Evaluators/TSPEuclideanPathEvaluator.cs	(revision 4068)
@@ -21,5 +21,4 @@
 
 using System;
-using HeuristicLab.Common;
 using HeuristicLab.Core;
 using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
Index: /trunk/sources/HeuristicLab.Problems.TravelingSalesman/3.3/Evaluators/TSPEvaluator.cs
===================================================================
--- /trunk/sources/HeuristicLab.Problems.TravelingSalesman/3.3/Evaluators/TSPEvaluator.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.Problems.TravelingSalesman/3.3/Evaluators/TSPEvaluator.cs	(revision 4068)
@@ -20,5 +20,4 @@
 #endregion
 
-using HeuristicLab.Common;
 using HeuristicLab.Core;
 using HeuristicLab.Data;
Index: /trunk/sources/HeuristicLab.Problems.TravelingSalesman/3.3/Evaluators/TSPGeoPathEvaluator.cs
===================================================================
--- /trunk/sources/HeuristicLab.Problems.TravelingSalesman/3.3/Evaluators/TSPGeoPathEvaluator.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.Problems.TravelingSalesman/3.3/Evaluators/TSPGeoPathEvaluator.cs	(revision 4068)
@@ -21,5 +21,4 @@
 
 using System;
-using HeuristicLab.Common;
 using HeuristicLab.Core;
 using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
Index: /trunk/sources/HeuristicLab.Problems.TravelingSalesman/3.3/Evaluators/TSPRoundedEuclideanPathEvaluator.cs
===================================================================
--- /trunk/sources/HeuristicLab.Problems.TravelingSalesman/3.3/Evaluators/TSPRoundedEuclideanPathEvaluator.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.Problems.TravelingSalesman/3.3/Evaluators/TSPRoundedEuclideanPathEvaluator.cs	(revision 4068)
@@ -21,5 +21,4 @@
 
 using System;
-using HeuristicLab.Common;
 using HeuristicLab.Core;
 using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
Index: /trunk/sources/HeuristicLab.Problems.TravelingSalesman/3.3/Interfaces/ITSPCoordinatesPathEvaluator.cs
===================================================================
--- /trunk/sources/HeuristicLab.Problems.TravelingSalesman/3.3/Interfaces/ITSPCoordinatesPathEvaluator.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.Problems.TravelingSalesman/3.3/Interfaces/ITSPCoordinatesPathEvaluator.cs	(revision 4068)
@@ -20,5 +20,4 @@
 #endregion
 
-using HeuristicLab.Common;
 using HeuristicLab.Core;
 using HeuristicLab.Data;
Index: /trunk/sources/HeuristicLab.Problems.TravelingSalesman/3.3/Interfaces/ITSPMoveEvaluator.cs
===================================================================
--- /trunk/sources/HeuristicLab.Problems.TravelingSalesman/3.3/Interfaces/ITSPMoveEvaluator.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.Problems.TravelingSalesman/3.3/Interfaces/ITSPMoveEvaluator.cs	(revision 4068)
@@ -20,9 +20,6 @@
 #endregion
 
-using HeuristicLab.Common;
-using HeuristicLab.Core;
-using HeuristicLab.Data;
+using System;
 using HeuristicLab.Optimization;
-using System;
 
 namespace HeuristicLab.Problems.TravelingSalesman {
Index: /trunk/sources/HeuristicLab.Problems.TravelingSalesman/3.3/Interfaces/ITSPPathEvaluator.cs
===================================================================
--- /trunk/sources/HeuristicLab.Problems.TravelingSalesman/3.3/Interfaces/ITSPPathEvaluator.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.Problems.TravelingSalesman/3.3/Interfaces/ITSPPathEvaluator.cs	(revision 4068)
@@ -20,5 +20,4 @@
 #endregion
 
-using HeuristicLab.Common;
 using HeuristicLab.Core;
 using HeuristicLab.Encodings.PermutationEncoding;
Index: /trunk/sources/HeuristicLab.Problems.TravelingSalesman/3.3/Interfaces/ITSPPathMoveEvaluator.cs
===================================================================
--- /trunk/sources/HeuristicLab.Problems.TravelingSalesman/3.3/Interfaces/ITSPPathMoveEvaluator.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.Problems.TravelingSalesman/3.3/Interfaces/ITSPPathMoveEvaluator.cs	(revision 4068)
@@ -20,5 +20,4 @@
 #endregion
 
-using HeuristicLab.Common;
 using HeuristicLab.Core;
 using HeuristicLab.Data;
Index: /trunk/sources/HeuristicLab.Problems.TravelingSalesman/3.3/MoveEvaluators/TSPMoveEvaluator.cs
===================================================================
--- /trunk/sources/HeuristicLab.Problems.TravelingSalesman/3.3/MoveEvaluators/TSPMoveEvaluator.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.Problems.TravelingSalesman/3.3/MoveEvaluators/TSPMoveEvaluator.cs	(revision 4068)
@@ -21,5 +21,4 @@
 
 using System;
-using HeuristicLab.Common;
 using HeuristicLab.Core;
 using HeuristicLab.Data;
Index: /trunk/sources/HeuristicLab.Problems.TravelingSalesman/3.3/MoveEvaluators/TSPPathMoveEvaluator.cs
===================================================================
--- /trunk/sources/HeuristicLab.Problems.TravelingSalesman/3.3/MoveEvaluators/TSPPathMoveEvaluator.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.Problems.TravelingSalesman/3.3/MoveEvaluators/TSPPathMoveEvaluator.cs	(revision 4068)
@@ -20,9 +20,7 @@
 #endregion
 
-using HeuristicLab.Common;
 using HeuristicLab.Core;
 using HeuristicLab.Data;
 using HeuristicLab.Encodings.PermutationEncoding;
-using HeuristicLab.Operators;
 using HeuristicLab.Parameters;
 using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
Index: /trunk/sources/HeuristicLab.Problems.TravelingSalesman/3.3/MoveEvaluators/ThreeOpt/TSPTranslocationMoveEuclideanPathEvaluator.cs
===================================================================
--- /trunk/sources/HeuristicLab.Problems.TravelingSalesman/3.3/MoveEvaluators/ThreeOpt/TSPTranslocationMoveEuclideanPathEvaluator.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.Problems.TravelingSalesman/3.3/MoveEvaluators/ThreeOpt/TSPTranslocationMoveEuclideanPathEvaluator.cs	(revision 4068)
@@ -21,5 +21,4 @@
 
 using System;
-using HeuristicLab.Common;
 using HeuristicLab.Core;
 using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
Index: /trunk/sources/HeuristicLab.Problems.TravelingSalesman/3.3/MoveEvaluators/ThreeOpt/TSPTranslocationMoveGeoPathEvaluator.cs
===================================================================
--- /trunk/sources/HeuristicLab.Problems.TravelingSalesman/3.3/MoveEvaluators/ThreeOpt/TSPTranslocationMoveGeoPathEvaluator.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.Problems.TravelingSalesman/3.3/MoveEvaluators/ThreeOpt/TSPTranslocationMoveGeoPathEvaluator.cs	(revision 4068)
@@ -21,5 +21,4 @@
 
 using System;
-using HeuristicLab.Common;
 using HeuristicLab.Core;
 using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
Index: /trunk/sources/HeuristicLab.Problems.TravelingSalesman/3.3/MoveEvaluators/ThreeOpt/TSPTranslocationMovePathEvaluator.cs
===================================================================
--- /trunk/sources/HeuristicLab.Problems.TravelingSalesman/3.3/MoveEvaluators/ThreeOpt/TSPTranslocationMovePathEvaluator.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.Problems.TravelingSalesman/3.3/MoveEvaluators/ThreeOpt/TSPTranslocationMovePathEvaluator.cs	(revision 4068)
@@ -20,10 +20,7 @@
 #endregion
 
-using System;
-using HeuristicLab.Common;
 using HeuristicLab.Core;
 using HeuristicLab.Data;
 using HeuristicLab.Encodings.PermutationEncoding;
-using HeuristicLab.Operators;
 using HeuristicLab.Parameters;
 using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
Index: /trunk/sources/HeuristicLab.Problems.TravelingSalesman/3.3/MoveEvaluators/ThreeOpt/TSPTranslocationMoveRoundedEuclideanPathEvaluator.cs
===================================================================
--- /trunk/sources/HeuristicLab.Problems.TravelingSalesman/3.3/MoveEvaluators/ThreeOpt/TSPTranslocationMoveRoundedEuclideanPathEvaluator.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.Problems.TravelingSalesman/3.3/MoveEvaluators/ThreeOpt/TSPTranslocationMoveRoundedEuclideanPathEvaluator.cs	(revision 4068)
@@ -21,5 +21,4 @@
 
 using System;
-using HeuristicLab.Common;
 using HeuristicLab.Core;
 using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
Index: /trunk/sources/HeuristicLab.Problems.TravelingSalesman/3.3/MoveEvaluators/TwoOpt/TSPInversionMoveEuclideanPathEvaluator.cs
===================================================================
--- /trunk/sources/HeuristicLab.Problems.TravelingSalesman/3.3/MoveEvaluators/TwoOpt/TSPInversionMoveEuclideanPathEvaluator.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.Problems.TravelingSalesman/3.3/MoveEvaluators/TwoOpt/TSPInversionMoveEuclideanPathEvaluator.cs	(revision 4068)
@@ -21,5 +21,4 @@
 
 using System;
-using HeuristicLab.Common;
 using HeuristicLab.Core;
 using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
Index: /trunk/sources/HeuristicLab.Problems.TravelingSalesman/3.3/MoveEvaluators/TwoOpt/TSPInversionMoveGeoPathEvaluator.cs
===================================================================
--- /trunk/sources/HeuristicLab.Problems.TravelingSalesman/3.3/MoveEvaluators/TwoOpt/TSPInversionMoveGeoPathEvaluator.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.Problems.TravelingSalesman/3.3/MoveEvaluators/TwoOpt/TSPInversionMoveGeoPathEvaluator.cs	(revision 4068)
@@ -21,5 +21,4 @@
 
 using System;
-using HeuristicLab.Common;
 using HeuristicLab.Core;
 using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
Index: /trunk/sources/HeuristicLab.Problems.TravelingSalesman/3.3/MoveEvaluators/TwoOpt/TSPInversionMovePathEvaluator.cs
===================================================================
--- /trunk/sources/HeuristicLab.Problems.TravelingSalesman/3.3/MoveEvaluators/TwoOpt/TSPInversionMovePathEvaluator.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.Problems.TravelingSalesman/3.3/MoveEvaluators/TwoOpt/TSPInversionMovePathEvaluator.cs	(revision 4068)
@@ -20,10 +20,7 @@
 #endregion
 
-using System;
-using HeuristicLab.Common;
 using HeuristicLab.Core;
 using HeuristicLab.Data;
 using HeuristicLab.Encodings.PermutationEncoding;
-using HeuristicLab.Operators;
 using HeuristicLab.Parameters;
 using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
Index: /trunk/sources/HeuristicLab.Problems.TravelingSalesman/3.3/MoveEvaluators/TwoOpt/TSPInversionMoveRoundedEuclideanPathEvaluator.cs
===================================================================
--- /trunk/sources/HeuristicLab.Problems.TravelingSalesman/3.3/MoveEvaluators/TwoOpt/TSPInversionMoveRoundedEuclideanPathEvaluator.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.Problems.TravelingSalesman/3.3/MoveEvaluators/TwoOpt/TSPInversionMoveRoundedEuclideanPathEvaluator.cs	(revision 4068)
@@ -21,5 +21,4 @@
 
 using System;
-using HeuristicLab.Common;
 using HeuristicLab.Core;
 using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
Index: /trunk/sources/HeuristicLab.Problems.VehicleRouting.Views/3.3/VRPSolutionView.cs
===================================================================
--- /trunk/sources/HeuristicLab.Problems.VehicleRouting.Views/3.3/VRPSolutionView.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.Problems.VehicleRouting.Views/3.3/VRPSolutionView.cs	(revision 4068)
@@ -25,5 +25,4 @@
 using HeuristicLab.Core.Views;
 using HeuristicLab.Data;
-using HeuristicLab.Encodings.PermutationEncoding;
 using HeuristicLab.MainForm;
 using HeuristicLab.Problems.VehicleRouting.Encodings;
@@ -172,5 +171,5 @@
                   currentTour++;
                 }
-              }               
+              }
             }
           }
Index: /trunk/sources/HeuristicLab.Problems.VehicleRouting.Views/3.3/VehicleRoutingProblemView.cs
===================================================================
--- /trunk/sources/HeuristicLab.Problems.VehicleRouting.Views/3.3/VehicleRoutingProblemView.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.Problems.VehicleRouting.Views/3.3/VehicleRoutingProblemView.cs	(revision 4068)
@@ -21,13 +21,7 @@
 
 using System;
-using System.Collections.Generic;
-using System.ComponentModel;
-using System.Data;
-using System.Drawing;
-using System.Text;
 using System.Windows.Forms;
 using HeuristicLab.MainForm;
 using HeuristicLab.Optimization.Views;
-using HeuristicLab.Problems.VehicleRouting;
 
 namespace HeuristicLab.Problems.VehicleRouting.Views {
@@ -39,5 +33,5 @@
       set { base.Content = value; }
     }
-    
+
     public VehicleRoutingProblemView() {
       InitializeComponent();
Index: /trunk/sources/HeuristicLab.Problems.VehicleRouting/3.3/Analyzers/BestVRPSolutionAnalyzer.cs
===================================================================
--- /trunk/sources/HeuristicLab.Problems.VehicleRouting/3.3/Analyzers/BestVRPSolutionAnalyzer.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.Problems.VehicleRouting/3.3/Analyzers/BestVRPSolutionAnalyzer.cs	(revision 4068)
@@ -21,13 +21,10 @@
 
 using System.Linq;
-using HeuristicLab.Common;
 using HeuristicLab.Core;
 using HeuristicLab.Data;
-using HeuristicLab.Encodings.PermutationEncoding;
 using HeuristicLab.Operators;
 using HeuristicLab.Optimization;
 using HeuristicLab.Parameters;
 using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
-using HeuristicLab.Problems.VehicleRouting;
 
 namespace HeuristicLab.Problems.VehicleRouting {
@@ -122,6 +119,6 @@
         solution = new VRPSolution(coordinates, best.Clone() as IVRPEncoding, new DoubleValue(qualities[i].Value),
           new DoubleValue(distances[i].Value), new DoubleValue(overloads[i].Value), new DoubleValue(tardinesses[i].Value),
-          new DoubleValue(travelTimes[i].Value), new DoubleValue(vehiclesUtilizations[i].Value), 
-          DistanceMatrixParameter.ActualValue, UseDistanceMatrixParameter.ActualValue, 
+          new DoubleValue(travelTimes[i].Value), new DoubleValue(vehiclesUtilizations[i].Value),
+          DistanceMatrixParameter.ActualValue, UseDistanceMatrixParameter.ActualValue,
           ReadyTimeParameter.ActualValue, DueTimeParameter.ActualValue, ServiceTimeParameter.ActualValue);
         BestSolutionParameter.ActualValue = solution;
Index: /trunk/sources/HeuristicLab.Problems.VehicleRouting/3.3/Encodings/Alba/AlbaEncoding.cs
===================================================================
--- /trunk/sources/HeuristicLab.Problems.VehicleRouting/3.3/Encodings/Alba/AlbaEncoding.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.Problems.VehicleRouting/3.3/Encodings/Alba/AlbaEncoding.cs	(revision 4068)
@@ -20,18 +20,14 @@
 #endregion
 
-using System;
-using System.Collections.Generic;
-using System.Linq;
-using System.Text;
-using HeuristicLab.Encodings.PermutationEncoding;
+using HeuristicLab.Common;
 using HeuristicLab.Core;
 using HeuristicLab.Data;
+using HeuristicLab.Encodings.PermutationEncoding;
 using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
-using HeuristicLab.Common;
 
 namespace HeuristicLab.Problems.VehicleRouting.Encodings.Alba {
   [Item("AlbaEncoding", "Represents an alba encoding of VRP solutions.")]
   [StorableClass]
-  class AlbaEncoding: Permutation, IVRPEncoding {
+  class AlbaEncoding : Permutation, IVRPEncoding {
     #region IVRPEncoding Members
     [Storable]
@@ -46,5 +42,6 @@
     }
 
-    public AlbaEncoding(Permutation permutation, int cities): base(PermutationTypes.RelativeDirected) {
+    public AlbaEncoding(Permutation permutation, int cities)
+      : base(PermutationTypes.RelativeDirected) {
       this.array = new int[permutation.Length];
       for (int i = 0; i < array.Length; i++)
@@ -76,5 +73,5 @@
           } else {
             tour.Add(new IntValue(this.array[i] + 1));
-          }       
+          }
         }
 
@@ -95,27 +92,27 @@
 
     public static AlbaEncoding ConvertFrom(IVRPEncoding encoding) {
-        ItemList<Tour> tours = encoding.Tours;
+      ItemList<Tour> tours = encoding.Tours;
 
-        int cities = 0;
-        foreach (Tour tour in tours) {
-          cities += tour.Count;
+      int cities = 0;
+      foreach (Tour tour in tours) {
+        cities += tour.Count;
+      }
+      int[] array = new int[cities + tours.Count - 2];
+      int delimiter = cities;
+      int arrayIndex = 0;
+
+      foreach (Tour tour in tours) {
+        foreach (IntValue city in tour) {
+          array[arrayIndex] = city.Value;
+
+          arrayIndex++;
         }
-        int[] array = new int[cities + tours.Count - 2];
-        int delimiter = cities;
-        int arrayIndex = 0;
 
-        foreach (Tour tour in tours) {
-          foreach(IntValue city in tour) {
-            array[arrayIndex] = city.Value;
-
-            arrayIndex++;
-          }
-
-          if (arrayIndex != array.Length) {
-            array[arrayIndex] = delimiter;
-            delimiter++;
-            arrayIndex++;
-          }
+        if (arrayIndex != array.Length) {
+          array[arrayIndex] = delimiter;
+          delimiter++;
+          arrayIndex++;
         }
+      }
 
       AlbaEncoding solution = new AlbaEncoding(new Permutation(PermutationTypes.RelativeUndirected), cities);
@@ -124,5 +121,5 @@
     }
 
-    
+
 
   }
Index: /trunk/sources/HeuristicLab.Problems.VehicleRouting/3.3/Encodings/Alba/Creators/AlbaPermutationCreator.cs
===================================================================
--- /trunk/sources/HeuristicLab.Problems.VehicleRouting/3.3/Encodings/Alba/Creators/AlbaPermutationCreator.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.Problems.VehicleRouting/3.3/Encodings/Alba/Creators/AlbaPermutationCreator.cs	(revision 4068)
@@ -21,15 +21,11 @@
 
 using System;
-using System.Collections.Generic;
-using System.Linq;
-using System.Text;
-using HeuristicLab.Operators;
+using HeuristicLab.Common;
 using HeuristicLab.Core;
 using HeuristicLab.Data;
+using HeuristicLab.Encodings.PermutationEncoding;
+using HeuristicLab.Optimization;
 using HeuristicLab.Parameters;
-using HeuristicLab.Encodings.PermutationEncoding;
 using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
-using HeuristicLab.Common;
-using HeuristicLab.Optimization;
 
 namespace HeuristicLab.Problems.VehicleRouting.Encodings.Alba {
@@ -46,5 +42,5 @@
     }
     #endregion
-    
+
     public AlbaPermutationCreator()
       : base() {
@@ -62,6 +58,6 @@
     private void Initialize() {
       CitiesParameter.ValueChanged += new EventHandler(CitiesParameter_ValueChanged);
-      if(CitiesParameter.Value != null)
-        CitiesParameter.Value.ValueChanged += new EventHandler(CitiesValue_ValueChanged); 
+      if (CitiesParameter.Value != null)
+        CitiesParameter.Value.ValueChanged += new EventHandler(CitiesValue_ValueChanged);
     }
 
Index: /trunk/sources/HeuristicLab.Problems.VehicleRouting/3.3/Encodings/Alba/Creators/AlbaPushForwardInsertionCreator.cs
===================================================================
--- /trunk/sources/HeuristicLab.Problems.VehicleRouting/3.3/Encodings/Alba/Creators/AlbaPushForwardInsertionCreator.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.Problems.VehicleRouting/3.3/Encodings/Alba/Creators/AlbaPushForwardInsertionCreator.cs	(revision 4068)
@@ -22,14 +22,10 @@
 using System;
 using System.Collections.Generic;
-using System.Linq;
-using System.Text;
-using HeuristicLab.Operators;
 using HeuristicLab.Core;
 using HeuristicLab.Data;
+using HeuristicLab.Encodings.PermutationEncoding;
+using HeuristicLab.Optimization;
 using HeuristicLab.Parameters;
-using HeuristicLab.Encodings.PermutationEncoding;
 using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
-using HeuristicLab.Common;
-using HeuristicLab.Optimization;
 
 namespace HeuristicLab.Problems.VehicleRouting.Encodings.Alba {
@@ -195,6 +191,6 @@
       gamma = N(Gamma.Value.Value, Math.Sqrt(GammaVariance.Value.Value), RandomParameter.ActualValue);
 
-      double x0 = CoordinatesParameter.ActualValue[0,0];
-      double y0 = CoordinatesParameter.ActualValue[0,1];
+      double x0 = CoordinatesParameter.ActualValue[0, 0];
+      double y0 = CoordinatesParameter.ActualValue[0, 1];
       double distance = 0;
       double cost = 0;
@@ -212,8 +208,8 @@
       for (int i = 1; i <= CitiesParameter.ActualValue.Value; i++) {
         distance = Distance(i, 0);
-        if (CoordinatesParameter.ActualValue[i,0] < x0) distance = -distance;
+        if (CoordinatesParameter.ActualValue[i, 0] < x0) distance = -distance;
         cost = -alpha * distance + // distance 0 <-> City[i]
                  beta * (DueTimeParameter.ActualValue[i]) + // latest arrival time
-                 gamma * (Math.Asin((CoordinatesParameter.ActualValue[i,1] - y0) / distance) / 360 * distance); // polar angle
+                 gamma * (Math.Asin((CoordinatesParameter.ActualValue[i, 1] - y0) / distance) / 360 * distance); // polar angle
 
         index = 0;
Index: /trunk/sources/HeuristicLab.Problems.VehicleRouting/3.3/Encodings/Alba/Crossovers/AlbaPermutationCrossover.cs
===================================================================
--- /trunk/sources/HeuristicLab.Problems.VehicleRouting/3.3/Encodings/Alba/Crossovers/AlbaPermutationCrossover.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.Problems.VehicleRouting/3.3/Encodings/Alba/Crossovers/AlbaPermutationCrossover.cs	(revision 4068)
@@ -20,13 +20,8 @@
 #endregion
 
-using System;
-using System.Collections.Generic;
-using System.Linq;
-using System.Text;
-using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
 using HeuristicLab.Core;
 using HeuristicLab.Encodings.PermutationEncoding;
-using HeuristicLab.Operators;
 using HeuristicLab.Parameters;
+using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
 
 namespace HeuristicLab.Problems.VehicleRouting.Encodings.Alba {
@@ -46,7 +41,7 @@
       int cities = 0;
 
-      for(int i = 0; i < ParentsParameter.ActualValue.Length; i++) {
-         IVRPEncoding solution = ParentsParameter.ActualValue[i];
-         cities = solution.Cities;
+      for (int i = 0; i < ParentsParameter.ActualValue.Length; i++) {
+        IVRPEncoding solution = ParentsParameter.ActualValue[i];
+        cities = solution.Cities;
         if (!(solution is AlbaEncoding)) {
           ParentsParameter.ActualValue[i] = AlbaEncoding.ConvertFrom(solution);
Index: /trunk/sources/HeuristicLab.Problems.VehicleRouting/3.3/Encodings/Alba/Interfaces/IAlbaTranslocationMoveOperator.cs
===================================================================
--- /trunk/sources/HeuristicLab.Problems.VehicleRouting/3.3/Encodings/Alba/Interfaces/IAlbaTranslocationMoveOperator.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.Problems.VehicleRouting/3.3/Encodings/Alba/Interfaces/IAlbaTranslocationMoveOperator.cs	(revision 4068)
@@ -20,11 +20,7 @@
 #endregion
 
-using System;
-using System.Collections.Generic;
-using System.Linq;
-using System.Text;
+using HeuristicLab.Core;
+using HeuristicLab.Encodings.PermutationEncoding;
 using HeuristicLab.Optimization;
-using HeuristicLab.Encodings.PermutationEncoding;
-using HeuristicLab.Core;
 
 namespace HeuristicLab.Problems.VehicleRouting.Encodings.Alba {
Index: /trunk/sources/HeuristicLab.Problems.VehicleRouting/3.3/Encodings/Alba/Manipulators/AlbaPermutationManipulator.cs
===================================================================
--- /trunk/sources/HeuristicLab.Problems.VehicleRouting/3.3/Encodings/Alba/Manipulators/AlbaPermutationManipulator.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.Problems.VehicleRouting/3.3/Encodings/Alba/Manipulators/AlbaPermutationManipulator.cs	(revision 4068)
@@ -20,12 +20,8 @@
 #endregion
 
-using System;
-using System.Collections.Generic;
-using System.Linq;
-using System.Text;
 using HeuristicLab.Core;
-using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
 using HeuristicLab.Encodings.PermutationEncoding;
 using HeuristicLab.Parameters;
+using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
 
 namespace HeuristicLab.Problems.VehicleRouting.Encodings.Alba {
Index: /trunk/sources/HeuristicLab.Problems.VehicleRouting/3.3/Encodings/Alba/Moves/AlbaMoveMaker.cs
===================================================================
--- /trunk/sources/HeuristicLab.Problems.VehicleRouting/3.3/Encodings/Alba/Moves/AlbaMoveMaker.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.Problems.VehicleRouting/3.3/Encodings/Alba/Moves/AlbaMoveMaker.cs	(revision 4068)
@@ -20,14 +20,8 @@
 #endregion
 
-using System;
-using System.Collections.Generic;
-using System.Linq;
-using System.Text;
-using HeuristicLab.Encodings.PermutationEncoding;
-using HeuristicLab.Optimization;
 using HeuristicLab.Core;
+using HeuristicLab.Data;
+using HeuristicLab.Parameters;
 using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
-using HeuristicLab.Parameters;
-using HeuristicLab.Data;
 
 namespace HeuristicLab.Problems.VehicleRouting.Encodings.Alba {
Index: /trunk/sources/HeuristicLab.Problems.VehicleRouting/3.3/Encodings/Alba/Moves/AlbaMoveOperator.cs
===================================================================
--- /trunk/sources/HeuristicLab.Problems.VehicleRouting/3.3/Encodings/Alba/Moves/AlbaMoveOperator.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.Problems.VehicleRouting/3.3/Encodings/Alba/Moves/AlbaMoveOperator.cs	(revision 4068)
@@ -20,12 +20,7 @@
 #endregion
 
-using System;
-using System.Collections.Generic;
-using System.Linq;
-using System.Text;
 using HeuristicLab.Core;
+using HeuristicLab.Encodings.PermutationEncoding;
 using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
-using HeuristicLab.Encodings.PermutationEncoding;
-using HeuristicLab.Parameters;
 
 namespace HeuristicLab.Problems.VehicleRouting.Encodings.Alba {
@@ -35,5 +30,5 @@
     [Storable]
     protected abstract IPermutationMoveOperator PermutationMoveOperatorParameter { get; set; }
-    
+
     public override IOperation Apply() {
       IVRPEncoding solution = VRPSolutionParameter.ActualValue;
Index: /trunk/sources/HeuristicLab.Problems.VehicleRouting/3.3/Encodings/Alba/Moves/ThreeOpt/AlbaTranslocationMoveEvaluator.cs
===================================================================
--- /trunk/sources/HeuristicLab.Problems.VehicleRouting/3.3/Encodings/Alba/Moves/ThreeOpt/AlbaTranslocationMoveEvaluator.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.Problems.VehicleRouting/3.3/Encodings/Alba/Moves/ThreeOpt/AlbaTranslocationMoveEvaluator.cs	(revision 4068)
@@ -20,19 +20,14 @@
 #endregion
 
-using System;
-using System.Collections.Generic;
-using System.Linq;
-using System.Text;
+using HeuristicLab.Core;
+using HeuristicLab.Encodings.PermutationEncoding;
+using HeuristicLab.Parameters;
 using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
-using HeuristicLab.Core;
-using HeuristicLab.Parameters;
-using HeuristicLab.Encodings.PermutationEncoding;
 using HeuristicLab.Problems.VehicleRouting.Encodings.Alba;
-using HeuristicLab.Data;
 
 namespace HeuristicLab.Problems.VehicleRouting {
   [Item("AlbaTranslocationMoveEvaluator", "Evaluates a translocation or insertion move (3-opt) for the VRP.")]
   [StorableClass]
-  public sealed class AlbaTranslocationMoveEvaluator: VRPMoveEvaluator {
+  public sealed class AlbaTranslocationMoveEvaluator : VRPMoveEvaluator {
     public ILookupParameter<TranslocationMove> TranslocationMoveParameter {
       get { return (ILookupParameter<TranslocationMove>)Parameters["TranslocationMove"]; }
Index: /trunk/sources/HeuristicLab.Problems.VehicleRouting/3.3/Encodings/Alba/Moves/ThreeOpt/AlbaTranslocationMoveGenerator.cs
===================================================================
--- /trunk/sources/HeuristicLab.Problems.VehicleRouting/3.3/Encodings/Alba/Moves/ThreeOpt/AlbaTranslocationMoveGenerator.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.Problems.VehicleRouting/3.3/Encodings/Alba/Moves/ThreeOpt/AlbaTranslocationMoveGenerator.cs	(revision 4068)
@@ -20,14 +20,11 @@
 #endregion
 
-using System;
 using System.Collections.Generic;
-using System.Linq;
-using System.Text;
+using HeuristicLab.Core;
+using HeuristicLab.Data;
 using HeuristicLab.Encodings.PermutationEncoding;
 using HeuristicLab.Optimization;
-using HeuristicLab.Core;
+using HeuristicLab.Parameters;
 using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
-using HeuristicLab.Parameters;
-using HeuristicLab.Data;
 
 namespace HeuristicLab.Problems.VehicleRouting.Encodings.Alba {
@@ -41,5 +38,5 @@
     protected override IPermutationMoveOperator PermutationMoveOperatorParameter {
       get { return TranslocationMoveGeneratorParameter.Value; }
-      set { 
+      set {
         TranslocationMoveGeneratorParameter.Value = value as TranslocationMoveGenerator;
         if (TranslocationMoveGeneratorParameter.Value is IMultiMoveGenerator) {
@@ -71,6 +68,7 @@
     }
 
-    public AlbaTranslocationMoveGenerator(): base() {
-      Parameters.Add(new ValueLookupParameter<TranslocationMoveGenerator>("TranslocationMoveGenerator", "The move generator.", 
+    public AlbaTranslocationMoveGenerator()
+      : base() {
+      Parameters.Add(new ValueLookupParameter<TranslocationMoveGenerator>("TranslocationMoveGenerator", "The move generator.",
         new StochasticTranslocationMultiMoveGenerator()));
       Parameters.Add(new ValueLookupParameter<IntValue>("SampleSize", "The number of moves to generate."));
@@ -93,6 +91,6 @@
           if (move != null) {
             bool criteria1 = true;
-            if(move.Index1 - 1 >= 0 && 
-              move.Index3 -1 >= 0)
+            if (move.Index1 - 1 >= 0 &&
+              move.Index3 - 1 >= 0)
               criteria1 = (permutation[move.Index1] >= cities &&
                 permutation[move.Index1 - 1] >= cities &&
@@ -107,5 +105,5 @@
                 permutation[index3] >= cities);
 
-            if(criteria1 && criteria2)
+            if (criteria1 && criteria2)
               toBeDeleted.Add(scope);
           }
Index: /trunk/sources/HeuristicLab.Problems.VehicleRouting/3.3/Encodings/Alba/Moves/ThreeOpt/AlbaTranslocationMoveHardTabuCriterion.cs
===================================================================
--- /trunk/sources/HeuristicLab.Problems.VehicleRouting/3.3/Encodings/Alba/Moves/ThreeOpt/AlbaTranslocationMoveHardTabuCriterion.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.Problems.VehicleRouting/3.3/Encodings/Alba/Moves/ThreeOpt/AlbaTranslocationMoveHardTabuCriterion.cs	(revision 4068)
@@ -20,14 +20,9 @@
 #endregion
 
-using System;
-using System.Collections.Generic;
-using System.Linq;
-using System.Text;
+using HeuristicLab.Core;
+using HeuristicLab.Data;
 using HeuristicLab.Encodings.PermutationEncoding;
 using HeuristicLab.Optimization;
-using HeuristicLab.Core;
 using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
-using HeuristicLab.Parameters;
-using HeuristicLab.Data;
 
 namespace HeuristicLab.Problems.VehicleRouting.Encodings.Alba {
Index: /trunk/sources/HeuristicLab.Problems.VehicleRouting/3.3/Encodings/Alba/Moves/ThreeOpt/AlbaTranslocationMoveMaker.cs
===================================================================
--- /trunk/sources/HeuristicLab.Problems.VehicleRouting/3.3/Encodings/Alba/Moves/ThreeOpt/AlbaTranslocationMoveMaker.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.Problems.VehicleRouting/3.3/Encodings/Alba/Moves/ThreeOpt/AlbaTranslocationMoveMaker.cs	(revision 4068)
@@ -20,14 +20,9 @@
 #endregion
 
-using System;
-using System.Collections.Generic;
-using System.Linq;
-using System.Text;
+using HeuristicLab.Core;
+using HeuristicLab.Data;
 using HeuristicLab.Encodings.PermutationEncoding;
 using HeuristicLab.Optimization;
-using HeuristicLab.Core;
 using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
-using HeuristicLab.Parameters;
-using HeuristicLab.Data;
 
 namespace HeuristicLab.Problems.VehicleRouting.Encodings.Alba {
@@ -57,5 +52,6 @@
     }
 
-    public AlbaTranslocationMoveMaker(): base() {
+    public AlbaTranslocationMoveMaker()
+      : base() {
       moveMaker = new TranslocationMoveMaker();
     }
Index: /trunk/sources/HeuristicLab.Problems.VehicleRouting/3.3/Encodings/Alba/Moves/ThreeOpt/AlbaTranslocationMoveSoftTabuCriterion.cs
===================================================================
--- /trunk/sources/HeuristicLab.Problems.VehicleRouting/3.3/Encodings/Alba/Moves/ThreeOpt/AlbaTranslocationMoveSoftTabuCriterion.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.Problems.VehicleRouting/3.3/Encodings/Alba/Moves/ThreeOpt/AlbaTranslocationMoveSoftTabuCriterion.cs	(revision 4068)
@@ -20,14 +20,9 @@
 #endregion
 
-using System;
-using System.Collections.Generic;
-using System.Linq;
-using System.Text;
+using HeuristicLab.Core;
+using HeuristicLab.Data;
 using HeuristicLab.Encodings.PermutationEncoding;
 using HeuristicLab.Optimization;
-using HeuristicLab.Core;
 using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
-using HeuristicLab.Parameters;
-using HeuristicLab.Data;
 
 namespace HeuristicLab.Problems.VehicleRouting.Encodings.Alba {
Index: /trunk/sources/HeuristicLab.Problems.VehicleRouting/3.3/Encodings/Alba/Moves/ThreeOpt/AlbaTranslocationMoveTabuMaker.cs
===================================================================
--- /trunk/sources/HeuristicLab.Problems.VehicleRouting/3.3/Encodings/Alba/Moves/ThreeOpt/AlbaTranslocationMoveTabuMaker.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.Problems.VehicleRouting/3.3/Encodings/Alba/Moves/ThreeOpt/AlbaTranslocationMoveTabuMaker.cs	(revision 4068)
@@ -20,14 +20,9 @@
 #endregion
 
-using System;
-using System.Collections.Generic;
-using System.Linq;
-using System.Text;
+using HeuristicLab.Core;
+using HeuristicLab.Data;
 using HeuristicLab.Encodings.PermutationEncoding;
 using HeuristicLab.Optimization;
-using HeuristicLab.Core;
 using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
-using HeuristicLab.Parameters;
-using HeuristicLab.Data;
 
 namespace HeuristicLab.Problems.VehicleRouting.Encodings.Alba {
Index: /trunk/sources/HeuristicLab.Problems.VehicleRouting/3.3/Encodings/Tour.cs
===================================================================
--- /trunk/sources/HeuristicLab.Problems.VehicleRouting/3.3/Encodings/Tour.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.Problems.VehicleRouting/3.3/Encodings/Tour.cs	(revision 4068)
@@ -20,10 +20,6 @@
 #endregion
 
-using System;
-using System.Collections.Generic;
-using System.Linq;
-using System.Text;
+using HeuristicLab.Core;
 using HeuristicLab.Data;
-using HeuristicLab.Core;
 
 namespace HeuristicLab.Problems.VehicleRouting.Encodings {
Index: /trunk/sources/HeuristicLab.Problems.VehicleRouting/3.3/Encodings/VRPCreator.cs
===================================================================
--- /trunk/sources/HeuristicLab.Problems.VehicleRouting/3.3/Encodings/VRPCreator.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.Problems.VehicleRouting/3.3/Encodings/VRPCreator.cs	(revision 4068)
@@ -20,11 +20,7 @@
 #endregion
 
-using System;
-using System.Collections.Generic;
-using System.Linq;
-using System.Text;
-using HeuristicLab.Operators;
 using HeuristicLab.Core;
 using HeuristicLab.Data;
+using HeuristicLab.Operators;
 using HeuristicLab.Parameters;
 using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
@@ -36,5 +32,5 @@
       get { return false; }
     }
-    
+
     #region IVRPCreator Members
     public IValueLookupParameter<IntValue> CitiesParameter {
Index: /trunk/sources/HeuristicLab.Problems.VehicleRouting/3.3/Encodings/VRPCrossover.cs
===================================================================
--- /trunk/sources/HeuristicLab.Problems.VehicleRouting/3.3/Encodings/VRPCrossover.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.Problems.VehicleRouting/3.3/Encodings/VRPCrossover.cs	(revision 4068)
@@ -20,15 +20,11 @@
 #endregion
 
-using System;
-using System.Collections.Generic;
-using System.Linq;
-using System.Text;
 using HeuristicLab.Core;
+using HeuristicLab.Data;
 using HeuristicLab.Operators;
 using HeuristicLab.Parameters;
-using HeuristicLab.Data;
 
 namespace HeuristicLab.Problems.VehicleRouting.Encodings {
-  public abstract class VRPCrossover: SingleSuccessorOperator, IVRPCrossover {
+  public abstract class VRPCrossover : SingleSuccessorOperator, IVRPCrossover {
     #region IVRPCrossover Members
 
@@ -50,5 +46,5 @@
       ChildParameter.ActualName = "VRPSolution";
       Parameters.Add(new ValueLookupParameter<IntValue>("Cities", "The city count."));
-    } 
+    }
   }
 }
Index: /trunk/sources/HeuristicLab.Problems.VehicleRouting/3.3/Encodings/VRPManipulator.cs
===================================================================
--- /trunk/sources/HeuristicLab.Problems.VehicleRouting/3.3/Encodings/VRPManipulator.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.Problems.VehicleRouting/3.3/Encodings/VRPManipulator.cs	(revision 4068)
@@ -20,8 +20,4 @@
 #endregion
 
-using System;
-using System.Collections.Generic;
-using System.Linq;
-using System.Text;
 using HeuristicLab.Core;
 using HeuristicLab.Operators;
@@ -29,5 +25,5 @@
 
 namespace HeuristicLab.Problems.VehicleRouting.Encodings {
-  public abstract class VRPManipulator: SingleSuccessorOperator, IVRPManipulator {
+  public abstract class VRPManipulator : SingleSuccessorOperator, IVRPManipulator {
     #region IVRPManipulator Members
 
Index: /trunk/sources/HeuristicLab.Problems.VehicleRouting/3.3/Encodings/VRPMoveOperator.cs
===================================================================
--- /trunk/sources/HeuristicLab.Problems.VehicleRouting/3.3/Encodings/VRPMoveOperator.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.Problems.VehicleRouting/3.3/Encodings/VRPMoveOperator.cs	(revision 4068)
@@ -20,8 +20,4 @@
 #endregion
 
-using System;
-using System.Collections.Generic;
-using System.Linq;
-using System.Text;
 using HeuristicLab.Core;
 using HeuristicLab.Operators;
@@ -29,5 +25,5 @@
 
 namespace HeuristicLab.Problems.VehicleRouting.Encodings {
-  public abstract class VRPMoveOperator: SingleSuccessorOperator, IVRPMoveOperator {
+  public abstract class VRPMoveOperator : SingleSuccessorOperator, IVRPMoveOperator {
     #region IVRPManipulator Members
 
Index: /trunk/sources/HeuristicLab.Problems.VehicleRouting/3.3/Evaluators/VRPEvaluator.cs
===================================================================
--- /trunk/sources/HeuristicLab.Problems.VehicleRouting/3.3/Evaluators/VRPEvaluator.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.Problems.VehicleRouting/3.3/Evaluators/VRPEvaluator.cs	(revision 4068)
@@ -20,11 +20,7 @@
 #endregion
 
-using System;
-using System.Collections.Generic;
-using System.Linq;
-using System.Text;
+using HeuristicLab.Core;
+using HeuristicLab.Data;
 using HeuristicLab.Operators;
-using HeuristicLab.Data;
-using HeuristicLab.Core;
 using HeuristicLab.Parameters;
 using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
@@ -40,5 +36,5 @@
     public double Tardiness { get; set; }
   }
-  
+
   [Item("VRPEvaluator", "Evaluates solutions for the VRP problem.")]
   [StorableClass]
@@ -144,5 +140,5 @@
 
     private static TourEvaluation EvaluateTour(Tour tour, DoubleArray dueTimeArray,
-      DoubleArray serviceTimeArray, DoubleArray readyTimeArray, DoubleArray demandArray, DoubleValue capacity, 
+      DoubleArray serviceTimeArray, DoubleArray readyTimeArray, DoubleArray demandArray, DoubleValue capacity,
       DoubleValue fleetUsageFactor, DoubleValue timeFactor, DoubleValue distanceFactor, DoubleValue overloadPenalty, DoubleValue tardinessPenalty,
       DoubleMatrix coordinates, ILookupParameter<DoubleMatrix> distanceMatrix, BoolValue useDistanceMatrix) {
@@ -226,6 +222,6 @@
 
       foreach (Tour tour in solution.Tours) {
-        TourEvaluation eval = EvaluateTour(tour, dueTimeArray, serviceTimeArray, readyTimeArray, demandArray, capacity, 
-          fleetUsageFactor, timeFactor, distanceFactor, overloadPenalty, tardinessPenalty, 
+        TourEvaluation eval = EvaluateTour(tour, dueTimeArray, serviceTimeArray, readyTimeArray, demandArray, capacity,
+          fleetUsageFactor, timeFactor, distanceFactor, overloadPenalty, tardinessPenalty,
           coordinates, distanceMatrix, useDistanceMatrix);
         sumEval.Quality += eval.Quality;
@@ -243,7 +239,7 @@
       IVRPEncoding solution = VRPSolutionParameter.ActualValue;
 
-      TourEvaluation sumEval = Evaluate(solution, DueTimeParameter.ActualValue, ServiceTimeParameter.ActualValue, ReadyTimeParameter.ActualValue, 
+      TourEvaluation sumEval = Evaluate(solution, DueTimeParameter.ActualValue, ServiceTimeParameter.ActualValue, ReadyTimeParameter.ActualValue,
         DemandParameter.ActualValue, CapacityParameter.ActualValue,
-        FleetUsageFactor.ActualValue, TimeFactor.ActualValue, DistanceFactor.ActualValue, OverloadPenalty.ActualValue, TardinessPenalty.ActualValue, 
+        FleetUsageFactor.ActualValue, TimeFactor.ActualValue, DistanceFactor.ActualValue, OverloadPenalty.ActualValue, TardinessPenalty.ActualValue,
         CoordinatesParameter.ActualValue, DistanceMatrixParameter, UseDistanceMatrixParameter.ActualValue);
 
Index: /trunk/sources/HeuristicLab.Problems.VehicleRouting/3.3/Interfaces/IVRPCreator.cs
===================================================================
--- /trunk/sources/HeuristicLab.Problems.VehicleRouting/3.3/Interfaces/IVRPCreator.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.Problems.VehicleRouting/3.3/Interfaces/IVRPCreator.cs	(revision 4068)
@@ -20,11 +20,7 @@
 #endregion
 
-using System;
-using System.Collections.Generic;
-using System.Linq;
-using System.Text;
-using HeuristicLab.Optimization;
 using HeuristicLab.Core;
 using HeuristicLab.Data;
+using HeuristicLab.Optimization;
 
 namespace HeuristicLab.Problems.VehicleRouting {
Index: /trunk/sources/HeuristicLab.Problems.VehicleRouting/3.3/Interfaces/IVRPCrossover.cs
===================================================================
--- /trunk/sources/HeuristicLab.Problems.VehicleRouting/3.3/Interfaces/IVRPCrossover.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.Problems.VehicleRouting/3.3/Interfaces/IVRPCrossover.cs	(revision 4068)
@@ -20,11 +20,6 @@
 #endregion
 
-using System;
-using System.Collections.Generic;
-using System.Linq;
-using System.Text;
 using HeuristicLab.Core;
 using HeuristicLab.Optimization;
-using HeuristicLab.Data;
 
 namespace HeuristicLab.Problems.VehicleRouting {
Index: /trunk/sources/HeuristicLab.Problems.VehicleRouting/3.3/Interfaces/IVRPEncoding.cs
===================================================================
--- /trunk/sources/HeuristicLab.Problems.VehicleRouting/3.3/Interfaces/IVRPEncoding.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.Problems.VehicleRouting/3.3/Interfaces/IVRPEncoding.cs	(revision 4068)
@@ -20,13 +20,9 @@
 #endregion
 
-using System;
-using System.Collections.Generic;
-using System.Linq;
-using System.Text;
+using HeuristicLab.Core;
 using HeuristicLab.Problems.VehicleRouting.Encodings;
-using HeuristicLab.Core;
 
 namespace HeuristicLab.Problems.VehicleRouting {
-  public interface IVRPEncoding: IItem {
+  public interface IVRPEncoding : IItem {
     ItemList<Tour> Tours {
       get;
Index: /trunk/sources/HeuristicLab.Problems.VehicleRouting/3.3/Interfaces/IVRPEvaluator.cs
===================================================================
--- /trunk/sources/HeuristicLab.Problems.VehicleRouting/3.3/Interfaces/IVRPEvaluator.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.Problems.VehicleRouting/3.3/Interfaces/IVRPEvaluator.cs	(revision 4068)
@@ -20,11 +20,7 @@
 #endregion
 
-using System;
-using System.Collections.Generic;
-using System.Linq;
-using System.Text;
+using HeuristicLab.Core;
+using HeuristicLab.Data;
 using HeuristicLab.Optimization;
-using HeuristicLab.Data;
-using HeuristicLab.Core;
 
 namespace HeuristicLab.Problems.VehicleRouting {
Index: /trunk/sources/HeuristicLab.Problems.VehicleRouting/3.3/Interfaces/IVRPManipulator.cs
===================================================================
--- /trunk/sources/HeuristicLab.Problems.VehicleRouting/3.3/Interfaces/IVRPManipulator.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.Problems.VehicleRouting/3.3/Interfaces/IVRPManipulator.cs	(revision 4068)
@@ -20,8 +20,4 @@
 #endregion
 
-using System;
-using System.Collections.Generic;
-using System.Linq;
-using System.Text;
 using HeuristicLab.Core;
 using HeuristicLab.Optimization;
Index: /trunk/sources/HeuristicLab.Problems.VehicleRouting/3.3/Interfaces/IVRPMoveEvaluator.cs
===================================================================
--- /trunk/sources/HeuristicLab.Problems.VehicleRouting/3.3/Interfaces/IVRPMoveEvaluator.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.Problems.VehicleRouting/3.3/Interfaces/IVRPMoveEvaluator.cs	(revision 4068)
@@ -20,11 +20,7 @@
 #endregion
 
-using System;
-using System.Collections.Generic;
-using System.Linq;
-using System.Text;
+using HeuristicLab.Core;
+using HeuristicLab.Data;
 using HeuristicLab.Optimization;
-using HeuristicLab.Data;
-using HeuristicLab.Core;
 
 namespace HeuristicLab.Problems.VehicleRouting {
Index: /trunk/sources/HeuristicLab.Problems.VehicleRouting/3.3/Interfaces/IVRPMoveOperator.cs
===================================================================
--- /trunk/sources/HeuristicLab.Problems.VehicleRouting/3.3/Interfaces/IVRPMoveOperator.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.Problems.VehicleRouting/3.3/Interfaces/IVRPMoveOperator.cs	(revision 4068)
@@ -20,8 +20,4 @@
 #endregion
 
-using System;
-using System.Collections.Generic;
-using System.Linq;
-using System.Text;
 using HeuristicLab.Core;
 using HeuristicLab.Optimization;
Index: /trunk/sources/HeuristicLab.Problems.VehicleRouting/3.3/Interfaces/IVRPOperator.cs
===================================================================
--- /trunk/sources/HeuristicLab.Problems.VehicleRouting/3.3/Interfaces/IVRPOperator.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.Problems.VehicleRouting/3.3/Interfaces/IVRPOperator.cs	(revision 4068)
@@ -20,8 +20,4 @@
 #endregion
 
-using System;
-using System.Collections.Generic;
-using System.Linq;
-using System.Text;
 
 namespace HeuristicLab.Problems.VehicleRouting {
Index: /trunk/sources/HeuristicLab.Problems.VehicleRouting/3.3/MoveEvaluators/VRPMoveEvaluator.cs
===================================================================
--- /trunk/sources/HeuristicLab.Problems.VehicleRouting/3.3/MoveEvaluators/VRPMoveEvaluator.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.Problems.VehicleRouting/3.3/MoveEvaluators/VRPMoveEvaluator.cs	(revision 4068)
@@ -20,12 +20,8 @@
 #endregion
 
-using System;
-using System.Collections.Generic;
-using System.Linq;
-using System.Text;
+using HeuristicLab.Core;
+using HeuristicLab.Data;
 using HeuristicLab.Operators;
 using HeuristicLab.Optimization;
-using HeuristicLab.Data;
-using HeuristicLab.Core;
 using HeuristicLab.Parameters;
 using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
Index: /trunk/sources/HeuristicLab.Problems.VehicleRouting/3.3/SolomonParser.cs
===================================================================
--- /trunk/sources/HeuristicLab.Problems.VehicleRouting/3.3/SolomonParser.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.Problems.VehicleRouting/3.3/SolomonParser.cs	(revision 4068)
@@ -22,6 +22,4 @@
 using System;
 using System.Collections.Generic;
-using System.Linq;
-using System.Text;
 using System.IO;
 using System.Text.RegularExpressions;
Index: /trunk/sources/HeuristicLab.Problems.VehicleRouting/3.3/VehicleRoutingProblem.cs
===================================================================
--- /trunk/sources/HeuristicLab.Problems.VehicleRouting/3.3/VehicleRoutingProblem.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.Problems.VehicleRouting/3.3/VehicleRoutingProblem.cs	(revision 4068)
@@ -22,16 +22,15 @@
 using System;
 using System.Collections.Generic;
+using System.Drawing;
 using System.Linq;
-using System.Text;
+using HeuristicLab.Common;
 using HeuristicLab.Core;
-using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
+using HeuristicLab.Data;
+using HeuristicLab.Encodings.PermutationEncoding;
 using HeuristicLab.Optimization;
 using HeuristicLab.Parameters;
-using HeuristicLab.Data;
-using HeuristicLab.Common;
-using System.Drawing;
+using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
+using HeuristicLab.PluginInfrastructure;
 using HeuristicLab.Problems.VehicleRouting.Encodings.Alba;
-using HeuristicLab.PluginInfrastructure;
-using HeuristicLab.Encodings.PermutationEncoding;
 
 namespace HeuristicLab.Problems.VehicleRouting {
Index: /trunk/sources/HeuristicLab.Random/3.3/NormalRandomizer.cs
===================================================================
--- /trunk/sources/HeuristicLab.Random/3.3/NormalRandomizer.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.Random/3.3/NormalRandomizer.cs	(revision 4068)
@@ -20,13 +20,9 @@
 #endregion
 
-using System;
-using System.Collections.Generic;
-using System.Text;
-using HeuristicLab.Common;
 using HeuristicLab.Core;
 using HeuristicLab.Data;
-using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
 using HeuristicLab.Operators;
 using HeuristicLab.Parameters;
+using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
 
 namespace HeuristicLab.Random {
Index: /trunk/sources/HeuristicLab.Random/3.3/RandomCreator.cs
===================================================================
--- /trunk/sources/HeuristicLab.Random/3.3/RandomCreator.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.Random/3.3/RandomCreator.cs	(revision 4068)
@@ -20,5 +20,4 @@
 #endregion
 
-using HeuristicLab.Common;
 using HeuristicLab.Core;
 using HeuristicLab.Data;
Index: /trunk/sources/HeuristicLab.Random/3.3/UniformRandomizer.cs
===================================================================
--- /trunk/sources/HeuristicLab.Random/3.3/UniformRandomizer.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.Random/3.3/UniformRandomizer.cs	(revision 4068)
@@ -20,13 +20,9 @@
 #endregion
 
-using System;
-using System.Collections.Generic;
-using System.Text;
-using HeuristicLab.Common;
 using HeuristicLab.Core;
 using HeuristicLab.Data;
-using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
 using HeuristicLab.Operators;
 using HeuristicLab.Parameters;
+using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
 
 namespace HeuristicLab.Random {
Index: /trunk/sources/HeuristicLab.Selection/3.3/BestSelector.cs
===================================================================
--- /trunk/sources/HeuristicLab.Selection/3.3/BestSelector.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.Selection/3.3/BestSelector.cs	(revision 4068)
@@ -22,5 +22,4 @@
 using System.Collections.Generic;
 using System.Linq;
-using HeuristicLab.Common;
 using HeuristicLab.Core;
 using HeuristicLab.Data;
Index: /trunk/sources/HeuristicLab.Selection/3.3/ConditionalSelector.cs
===================================================================
--- /trunk/sources/HeuristicLab.Selection/3.3/ConditionalSelector.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.Selection/3.3/ConditionalSelector.cs	(revision 4068)
@@ -20,11 +20,9 @@
 #endregion
 
-using System;
 using System.Collections.Generic;
 using HeuristicLab.Core;
 using HeuristicLab.Data;
-using HeuristicLab.Selection;
+using HeuristicLab.Parameters;
 using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
-using HeuristicLab.Parameters;
 
 namespace HeuristicLab.Selection {
Index: /trunk/sources/HeuristicLab.Selection/3.3/GenderSpecificSelector.cs
===================================================================
--- /trunk/sources/HeuristicLab.Selection/3.3/GenderSpecificSelector.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.Selection/3.3/GenderSpecificSelector.cs	(revision 4068)
@@ -20,15 +20,11 @@
 #endregion
 
-using System.Collections.Generic;
-using System.Linq;
-using HeuristicLab.Common;
+using System;
 using HeuristicLab.Core;
 using HeuristicLab.Data;
+using HeuristicLab.Operators;
 using HeuristicLab.Optimization;
+using HeuristicLab.Parameters;
 using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
-using HeuristicLab.Operators;
-using HeuristicLab.Parameters;
-using HeuristicLab.PluginInfrastructure;
-using System;
 
 namespace HeuristicLab.Selection {
@@ -106,5 +102,5 @@
 
       femaleSelector.OperatorParameter.ActualName = "FemaleSelector";
-      
+
       maleSelector.OperatorParameter.ActualName = "MaleSelector";
 
Index: /trunk/sources/HeuristicLab.Selection/3.3/LeftReducer.cs
===================================================================
--- /trunk/sources/HeuristicLab.Selection/3.3/LeftReducer.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.Selection/3.3/LeftReducer.cs	(revision 4068)
@@ -21,5 +21,4 @@
 
 using System.Collections.Generic;
-using HeuristicLab.Common;
 using HeuristicLab.Core;
 using HeuristicLab.Optimization;
Index: /trunk/sources/HeuristicLab.Selection/3.3/LinearRankSelector.cs
===================================================================
--- /trunk/sources/HeuristicLab.Selection/3.3/LinearRankSelector.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.Selection/3.3/LinearRankSelector.cs	(revision 4068)
@@ -22,5 +22,4 @@
 using System.Collections.Generic;
 using System.Linq;
-using HeuristicLab.Common;
 using HeuristicLab.Core;
 using HeuristicLab.Data;
Index: /trunk/sources/HeuristicLab.Selection/3.3/MergingReducer.cs
===================================================================
--- /trunk/sources/HeuristicLab.Selection/3.3/MergingReducer.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.Selection/3.3/MergingReducer.cs	(revision 4068)
@@ -21,5 +21,4 @@
 
 using System.Collections.Generic;
-using HeuristicLab.Common;
 using HeuristicLab.Core;
 using HeuristicLab.Optimization;
Index: /trunk/sources/HeuristicLab.Selection/3.3/OffspringSelector.cs
===================================================================
--- /trunk/sources/HeuristicLab.Selection/3.3/OffspringSelector.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.Selection/3.3/OffspringSelector.cs	(revision 4068)
@@ -21,6 +21,4 @@
 
 using System;
-using System.Collections.Generic;
-using System.Linq;
 using HeuristicLab.Core;
 using HeuristicLab.Data;
@@ -107,5 +105,5 @@
         OffspringPopulationWinnersParameter.ActualValue = successfulOffspring;
       } else successfulOffspring = OffspringPopulationWinnersParameter.ActualValue;
-      
+
       int worseOffspringNeeded = (int)((1 - successRatio) * populationSize) - (population.Count - successfulOffspring.Value);
       int successfulOffspringAdded = 0;
@@ -150,5 +148,5 @@
         scope.SubScopes.Remove(parents);
         scope.SubScopes.Remove(offspring);
-        while(parents.SubScopes.Count > 0)
+        while (parents.SubScopes.Count > 0)
           scope.SubScopes.Add(parents.SubScopes[0]);
 
Index: /trunk/sources/HeuristicLab.Selection/3.3/ProportionalSelector.cs
===================================================================
--- /trunk/sources/HeuristicLab.Selection/3.3/ProportionalSelector.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.Selection/3.3/ProportionalSelector.cs	(revision 4068)
@@ -23,5 +23,4 @@
 using System.Collections.Generic;
 using System.Linq;
-using HeuristicLab.Common;
 using HeuristicLab.Core;
 using HeuristicLab.Data;
Index: /trunk/sources/HeuristicLab.Selection/3.3/RandomReplacer.cs
===================================================================
--- /trunk/sources/HeuristicLab.Selection/3.3/RandomReplacer.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.Selection/3.3/RandomReplacer.cs	(revision 4068)
@@ -20,8 +20,6 @@
 #endregion
 
-using System;
 using HeuristicLab.Core;
 using HeuristicLab.Data;
-using HeuristicLab.Operators;
 using HeuristicLab.Optimization;
 using HeuristicLab.Parameters;
Index: /trunk/sources/HeuristicLab.Selection/3.3/RandomSelector.cs
===================================================================
--- /trunk/sources/HeuristicLab.Selection/3.3/RandomSelector.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.Selection/3.3/RandomSelector.cs	(revision 4068)
@@ -21,5 +21,4 @@
 
 using System.Collections.Generic;
-using HeuristicLab.Common;
 using HeuristicLab.Core;
 using HeuristicLab.Data;
@@ -46,6 +45,7 @@
       set { CopySelectedParameter.Value = value; }
     }
-    
-    public RandomSelector() : base() {
+
+    public RandomSelector()
+      : base() {
       Parameters.Add(new ValueParameter<BoolValue>("CopySelected", "True if the selected sub-scopes should be copied, otherwise false.", new BoolValue(true)));
       Parameters.Add(new ValueLookupParameter<IntValue>("NumberOfSelectedSubScopes", "The number of sub-scopes which should be selected."));
Index: /trunk/sources/HeuristicLab.Selection/3.3/Reducer.cs
===================================================================
--- /trunk/sources/HeuristicLab.Selection/3.3/Reducer.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.Selection/3.3/Reducer.cs	(revision 4068)
@@ -21,5 +21,4 @@
 
 using System.Collections.Generic;
-using HeuristicLab.Common;
 using HeuristicLab.Core;
 using HeuristicLab.Operators;
Index: /trunk/sources/HeuristicLab.Selection/3.3/RightReducer.cs
===================================================================
--- /trunk/sources/HeuristicLab.Selection/3.3/RightReducer.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.Selection/3.3/RightReducer.cs	(revision 4068)
@@ -21,5 +21,4 @@
 
 using System.Collections.Generic;
-using HeuristicLab.Common;
 using HeuristicLab.Core;
 using HeuristicLab.Optimization;
Index: /trunk/sources/HeuristicLab.Selection/3.3/Selector.cs
===================================================================
--- /trunk/sources/HeuristicLab.Selection/3.3/Selector.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.Selection/3.3/Selector.cs	(revision 4068)
@@ -21,5 +21,4 @@
 
 using System.Collections.Generic;
-using HeuristicLab.Common;
 using HeuristicLab.Core;
 using HeuristicLab.Operators;
Index: /trunk/sources/HeuristicLab.Selection/3.3/SingleObjectiveSelector.cs
===================================================================
--- /trunk/sources/HeuristicLab.Selection/3.3/SingleObjectiveSelector.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.Selection/3.3/SingleObjectiveSelector.cs	(revision 4068)
@@ -20,5 +20,4 @@
 #endregion
 
-using HeuristicLab.Common;
 using HeuristicLab.Core;
 using HeuristicLab.Data;
Index: /trunk/sources/HeuristicLab.Selection/3.3/StochasticSelector.cs
===================================================================
--- /trunk/sources/HeuristicLab.Selection/3.3/StochasticSelector.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.Selection/3.3/StochasticSelector.cs	(revision 4068)
@@ -20,5 +20,4 @@
 #endregion
 
-using HeuristicLab.Common;
 using HeuristicLab.Core;
 using HeuristicLab.Optimization;
Index: /trunk/sources/HeuristicLab.Selection/3.3/StochasticSingleObjectiveSelector.cs
===================================================================
--- /trunk/sources/HeuristicLab.Selection/3.3/StochasticSingleObjectiveSelector.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.Selection/3.3/StochasticSingleObjectiveSelector.cs	(revision 4068)
@@ -20,5 +20,4 @@
 #endregion
 
-using HeuristicLab.Common;
 using HeuristicLab.Core;
 using HeuristicLab.Optimization;
Index: /trunk/sources/HeuristicLab.Selection/3.3/TournamentSelector.cs
===================================================================
--- /trunk/sources/HeuristicLab.Selection/3.3/TournamentSelector.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.Selection/3.3/TournamentSelector.cs	(revision 4068)
@@ -22,5 +22,4 @@
 using System.Collections.Generic;
 using System.Linq;
-using HeuristicLab.Common;
 using HeuristicLab.Core;
 using HeuristicLab.Data;
@@ -40,5 +39,6 @@
     }
 
-    public TournamentSelector() : base() {
+    public TournamentSelector()
+      : base() {
       Parameters.Add(new ValueLookupParameter<IntValue>("GroupSize", "The size of the tournament group.", new IntValue(2)));
     }
Index: /trunk/sources/HeuristicLab.Selection/3.3/WorstReplacer.cs
===================================================================
--- /trunk/sources/HeuristicLab.Selection/3.3/WorstReplacer.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.Selection/3.3/WorstReplacer.cs	(revision 4068)
@@ -20,8 +20,6 @@
 #endregion
 
-using System;
 using HeuristicLab.Core;
 using HeuristicLab.Data;
-using HeuristicLab.Operators;
 using HeuristicLab.Optimization;
 using HeuristicLab.Parameters;
Index: /trunk/sources/HeuristicLab.Selection/3.3/WorstSelector.cs
===================================================================
--- /trunk/sources/HeuristicLab.Selection/3.3/WorstSelector.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.Selection/3.3/WorstSelector.cs	(revision 4068)
@@ -22,5 +22,4 @@
 using System.Collections.Generic;
 using System.Linq;
-using HeuristicLab.Common;
 using HeuristicLab.Core;
 using HeuristicLab.Data;
Index: /trunk/sources/HeuristicLab.SequentialEngine/3.3/SequentialEngine.cs
===================================================================
--- /trunk/sources/HeuristicLab.SequentialEngine/3.3/SequentialEngine.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.SequentialEngine/3.3/SequentialEngine.cs	(revision 4068)
@@ -21,5 +21,4 @@
 
 using System;
-using HeuristicLab.Common;
 using HeuristicLab.Core;
 using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
Index: /trunk/sources/HeuristicLab.Services.Deployment.DataAccess/3.3/PluginStoreClasses.designer.cs
===================================================================
--- /trunk/sources/HeuristicLab.Services.Deployment.DataAccess/3.3/PluginStoreClasses.designer.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.Services.Deployment.DataAccess/3.3/PluginStoreClasses.designer.cs	(revision 4068)
@@ -10,23 +10,16 @@
 //------------------------------------------------------------------------------
 
-namespace HeuristicLab.Services.Deployment.DataAccess
-{
-	using System.Data.Linq;
-	using System.Data.Linq.Mapping;
-	using System.Data;
-	using System.Collections.Generic;
-	using System.Reflection;
-	using System.Linq;
-	using System.Linq.Expressions;
-	using System.ComponentModel;
-	using System;
-	
-	
-	[global::System.Data.Linq.Mapping.DatabaseAttribute(Name="HeuristicLab.PluginStore")]
-	public partial class PluginStoreClassesDataContext : System.Data.Linq.DataContext
-	{
-		
-		private static System.Data.Linq.Mapping.MappingSource mappingSource = new AttributeMappingSource();
-		
+namespace HeuristicLab.Services.Deployment.DataAccess {
+  using System;
+  using System.ComponentModel;
+  using System.Data.Linq;
+  using System.Data.Linq.Mapping;
+
+
+  [global::System.Data.Linq.Mapping.DatabaseAttribute(Name = "HeuristicLab.PluginStore")]
+  public partial class PluginStoreClassesDataContext : System.Data.Linq.DataContext {
+
+    private static System.Data.Linq.Mapping.MappingSource mappingSource = new AttributeMappingSource();
+
     #region Extensibility Method Definitions
     partial void OnCreated();
@@ -47,86 +40,70 @@
     partial void DeleteProduct(Product instance);
     #endregion
-		
-		public PluginStoreClassesDataContext() : 
-				base(global::HeuristicLab.Services.Deployment.DataAccess.Properties.Settings.Default.HeuristicLab_PluginStoreConnectionString, mappingSource)
-		{
-			OnCreated();
-		}
-		
-		public PluginStoreClassesDataContext(string connection) : 
-				base(connection, mappingSource)
-		{
-			OnCreated();
-		}
-		
-		public PluginStoreClassesDataContext(System.Data.IDbConnection connection) : 
-				base(connection, mappingSource)
-		{
-			OnCreated();
-		}
-		
-		public PluginStoreClassesDataContext(string connection, System.Data.Linq.Mapping.MappingSource mappingSource) : 
-				base(connection, mappingSource)
-		{
-			OnCreated();
-		}
-		
-		public PluginStoreClassesDataContext(System.Data.IDbConnection connection, System.Data.Linq.Mapping.MappingSource mappingSource) : 
-				base(connection, mappingSource)
-		{
-			OnCreated();
-		}
-		
-		public System.Data.Linq.Table<Dependency> Dependencies
-		{
-			get
-			{
-				return this.GetTable<Dependency>();
-			}
-		}
-		
-		public System.Data.Linq.Table<ProductPlugin> ProductPlugins
-		{
-			get
-			{
-				return this.GetTable<ProductPlugin>();
-			}
-		}
-		
-		public System.Data.Linq.Table<Plugin> Plugins
-		{
-			get
-			{
-				return this.GetTable<Plugin>();
-			}
-		}
-		
-		public System.Data.Linq.Table<PluginPackage> PluginPackages
-		{
-			get
-			{
-				return this.GetTable<PluginPackage>();
-			}
-		}
-		
-		public System.Data.Linq.Table<Product> Products
-		{
-			get
-			{
-				return this.GetTable<Product>();
-			}
-		}
-	}
-	
-	[global::System.Data.Linq.Mapping.TableAttribute(Name="dbo.Dependencies")]
-	public partial class Dependency : INotifyPropertyChanging, INotifyPropertyChanged
-	{
-		
-		private static PropertyChangingEventArgs emptyChangingEventArgs = new PropertyChangingEventArgs(String.Empty);
-		
-		private long _PluginId;
-		
-		private long _DependencyId;
-		
+
+    public PluginStoreClassesDataContext() :
+      base(global::HeuristicLab.Services.Deployment.DataAccess.Properties.Settings.Default.HeuristicLab_PluginStoreConnectionString, mappingSource) {
+      OnCreated();
+    }
+
+    public PluginStoreClassesDataContext(string connection) :
+      base(connection, mappingSource) {
+      OnCreated();
+    }
+
+    public PluginStoreClassesDataContext(System.Data.IDbConnection connection) :
+      base(connection, mappingSource) {
+      OnCreated();
+    }
+
+    public PluginStoreClassesDataContext(string connection, System.Data.Linq.Mapping.MappingSource mappingSource) :
+      base(connection, mappingSource) {
+      OnCreated();
+    }
+
+    public PluginStoreClassesDataContext(System.Data.IDbConnection connection, System.Data.Linq.Mapping.MappingSource mappingSource) :
+      base(connection, mappingSource) {
+      OnCreated();
+    }
+
+    public System.Data.Linq.Table<Dependency> Dependencies {
+      get {
+        return this.GetTable<Dependency>();
+      }
+    }
+
+    public System.Data.Linq.Table<ProductPlugin> ProductPlugins {
+      get {
+        return this.GetTable<ProductPlugin>();
+      }
+    }
+
+    public System.Data.Linq.Table<Plugin> Plugins {
+      get {
+        return this.GetTable<Plugin>();
+      }
+    }
+
+    public System.Data.Linq.Table<PluginPackage> PluginPackages {
+      get {
+        return this.GetTable<PluginPackage>();
+      }
+    }
+
+    public System.Data.Linq.Table<Product> Products {
+      get {
+        return this.GetTable<Product>();
+      }
+    }
+  }
+
+  [global::System.Data.Linq.Mapping.TableAttribute(Name = "dbo.Dependencies")]
+  public partial class Dependency : INotifyPropertyChanging, INotifyPropertyChanged {
+
+    private static PropertyChangingEventArgs emptyChangingEventArgs = new PropertyChangingEventArgs(String.Empty);
+
+    private long _PluginId;
+
+    private long _DependencyId;
+
     #region Extensibility Method Definitions
     partial void OnLoaded();
@@ -138,81 +115,67 @@
     partial void OnDependencyIdChanged();
     #endregion
-		
-		public Dependency()
-		{
-			OnCreated();
-		}
-		
-		[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_PluginId", DbType="BigInt NOT NULL", IsPrimaryKey=true)]
-		public long PluginId
-		{
-			get
-			{
-				return this._PluginId;
-			}
-			set
-			{
-				if ((this._PluginId != value))
-				{
-					this.OnPluginIdChanging(value);
-					this.SendPropertyChanging();
-					this._PluginId = value;
-					this.SendPropertyChanged("PluginId");
-					this.OnPluginIdChanged();
-				}
-			}
-		}
-		
-		[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_DependencyId", DbType="BigInt NOT NULL", IsPrimaryKey=true)]
-		public long DependencyId
-		{
-			get
-			{
-				return this._DependencyId;
-			}
-			set
-			{
-				if ((this._DependencyId != value))
-				{
-					this.OnDependencyIdChanging(value);
-					this.SendPropertyChanging();
-					this._DependencyId = value;
-					this.SendPropertyChanged("DependencyId");
-					this.OnDependencyIdChanged();
-				}
-			}
-		}
-		
-		public event PropertyChangingEventHandler PropertyChanging;
-		
-		public event PropertyChangedEventHandler PropertyChanged;
-		
-		protected virtual void SendPropertyChanging()
-		{
-			if ((this.PropertyChanging != null))
-			{
-				this.PropertyChanging(this, emptyChangingEventArgs);
-			}
-		}
-		
-		protected virtual void SendPropertyChanged(String propertyName)
-		{
-			if ((this.PropertyChanged != null))
-			{
-				this.PropertyChanged(this, new PropertyChangedEventArgs(propertyName));
-			}
-		}
-	}
-	
-	[global::System.Data.Linq.Mapping.TableAttribute(Name="dbo.ProductPlugin")]
-	public partial class ProductPlugin : INotifyPropertyChanging, INotifyPropertyChanged
-	{
-		
-		private static PropertyChangingEventArgs emptyChangingEventArgs = new PropertyChangingEventArgs(String.Empty);
-		
-		private long _ProductId;
-		
-		private long _PluginId;
-		
+
+    public Dependency() {
+      OnCreated();
+    }
+
+    [global::System.Data.Linq.Mapping.ColumnAttribute(Storage = "_PluginId", DbType = "BigInt NOT NULL", IsPrimaryKey = true)]
+    public long PluginId {
+      get {
+        return this._PluginId;
+      }
+      set {
+        if ((this._PluginId != value)) {
+          this.OnPluginIdChanging(value);
+          this.SendPropertyChanging();
+          this._PluginId = value;
+          this.SendPropertyChanged("PluginId");
+          this.OnPluginIdChanged();
+        }
+      }
+    }
+
+    [global::System.Data.Linq.Mapping.ColumnAttribute(Storage = "_DependencyId", DbType = "BigInt NOT NULL", IsPrimaryKey = true)]
+    public long DependencyId {
+      get {
+        return this._DependencyId;
+      }
+      set {
+        if ((this._DependencyId != value)) {
+          this.OnDependencyIdChanging(value);
+          this.SendPropertyChanging();
+          this._DependencyId = value;
+          this.SendPropertyChanged("DependencyId");
+          this.OnDependencyIdChanged();
+        }
+      }
+    }
+
+    public event PropertyChangingEventHandler PropertyChanging;
+
+    public event PropertyChangedEventHandler PropertyChanged;
+
+    protected virtual void SendPropertyChanging() {
+      if ((this.PropertyChanging != null)) {
+        this.PropertyChanging(this, emptyChangingEventArgs);
+      }
+    }
+
+    protected virtual void SendPropertyChanged(String propertyName) {
+      if ((this.PropertyChanged != null)) {
+        this.PropertyChanged(this, new PropertyChangedEventArgs(propertyName));
+      }
+    }
+  }
+
+  [global::System.Data.Linq.Mapping.TableAttribute(Name = "dbo.ProductPlugin")]
+  public partial class ProductPlugin : INotifyPropertyChanging, INotifyPropertyChanged {
+
+    private static PropertyChangingEventArgs emptyChangingEventArgs = new PropertyChangingEventArgs(String.Empty);
+
+    private long _ProductId;
+
+    private long _PluginId;
+
     #region Extensibility Method Definitions
     partial void OnLoaded();
@@ -224,91 +187,77 @@
     partial void OnPluginIdChanged();
     #endregion
-		
-		public ProductPlugin()
-		{
-			OnCreated();
-		}
-		
-		[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_ProductId", DbType="BigInt NOT NULL", IsPrimaryKey=true)]
-		public long ProductId
-		{
-			get
-			{
-				return this._ProductId;
-			}
-			set
-			{
-				if ((this._ProductId != value))
-				{
-					this.OnProductIdChanging(value);
-					this.SendPropertyChanging();
-					this._ProductId = value;
-					this.SendPropertyChanged("ProductId");
-					this.OnProductIdChanged();
-				}
-			}
-		}
-		
-		[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_PluginId", DbType="BigInt NOT NULL", IsPrimaryKey=true)]
-		public long PluginId
-		{
-			get
-			{
-				return this._PluginId;
-			}
-			set
-			{
-				if ((this._PluginId != value))
-				{
-					this.OnPluginIdChanging(value);
-					this.SendPropertyChanging();
-					this._PluginId = value;
-					this.SendPropertyChanged("PluginId");
-					this.OnPluginIdChanged();
-				}
-			}
-		}
-		
-		public event PropertyChangingEventHandler PropertyChanging;
-		
-		public event PropertyChangedEventHandler PropertyChanged;
-		
-		protected virtual void SendPropertyChanging()
-		{
-			if ((this.PropertyChanging != null))
-			{
-				this.PropertyChanging(this, emptyChangingEventArgs);
-			}
-		}
-		
-		protected virtual void SendPropertyChanged(String propertyName)
-		{
-			if ((this.PropertyChanged != null))
-			{
-				this.PropertyChanged(this, new PropertyChangedEventArgs(propertyName));
-			}
-		}
-	}
-	
-	[global::System.Data.Linq.Mapping.TableAttribute(Name="dbo.Plugin")]
-	public partial class Plugin : INotifyPropertyChanging, INotifyPropertyChanged
-	{
-		
-		private static PropertyChangingEventArgs emptyChangingEventArgs = new PropertyChangingEventArgs(String.Empty);
-		
-		private long _Id;
-		
-		private string _Name;
-		
-		private string _Version;
-		
-		private string _ContactName;
-		
-		private string _ContactEmail;
-		
-		private string _License;
-		
-		private EntityRef<PluginPackage> _PluginPackage;
-		
+
+    public ProductPlugin() {
+      OnCreated();
+    }
+
+    [global::System.Data.Linq.Mapping.ColumnAttribute(Storage = "_ProductId", DbType = "BigInt NOT NULL", IsPrimaryKey = true)]
+    public long ProductId {
+      get {
+        return this._ProductId;
+      }
+      set {
+        if ((this._ProductId != value)) {
+          this.OnProductIdChanging(value);
+          this.SendPropertyChanging();
+          this._ProductId = value;
+          this.SendPropertyChanged("ProductId");
+          this.OnProductIdChanged();
+        }
+      }
+    }
+
+    [global::System.Data.Linq.Mapping.ColumnAttribute(Storage = "_PluginId", DbType = "BigInt NOT NULL", IsPrimaryKey = true)]
+    public long PluginId {
+      get {
+        return this._PluginId;
+      }
+      set {
+        if ((this._PluginId != value)) {
+          this.OnPluginIdChanging(value);
+          this.SendPropertyChanging();
+          this._PluginId = value;
+          this.SendPropertyChanged("PluginId");
+          this.OnPluginIdChanged();
+        }
+      }
+    }
+
+    public event PropertyChangingEventHandler PropertyChanging;
+
+    public event PropertyChangedEventHandler PropertyChanged;
+
+    protected virtual void SendPropertyChanging() {
+      if ((this.PropertyChanging != null)) {
+        this.PropertyChanging(this, emptyChangingEventArgs);
+      }
+    }
+
+    protected virtual void SendPropertyChanged(String propertyName) {
+      if ((this.PropertyChanged != null)) {
+        this.PropertyChanged(this, new PropertyChangedEventArgs(propertyName));
+      }
+    }
+  }
+
+  [global::System.Data.Linq.Mapping.TableAttribute(Name = "dbo.Plugin")]
+  public partial class Plugin : INotifyPropertyChanging, INotifyPropertyChanged {
+
+    private static PropertyChangingEventArgs emptyChangingEventArgs = new PropertyChangingEventArgs(String.Empty);
+
+    private long _Id;
+
+    private string _Name;
+
+    private string _Version;
+
+    private string _ContactName;
+
+    private string _ContactEmail;
+
+    private string _License;
+
+    private EntityRef<PluginPackage> _PluginPackage;
+
     #region Extensibility Method Definitions
     partial void OnLoaded();
@@ -328,193 +277,157 @@
     partial void OnLicenseChanged();
     #endregion
-		
-		public Plugin()
-		{
-			this._PluginPackage = default(EntityRef<PluginPackage>);
-			OnCreated();
-		}
-		
-		[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_Id", AutoSync=AutoSync.OnInsert, DbType="BigInt NOT NULL IDENTITY", IsPrimaryKey=true, IsDbGenerated=true)]
-		public long Id
-		{
-			get
-			{
-				return this._Id;
-			}
-			set
-			{
-				if ((this._Id != value))
-				{
-					this.OnIdChanging(value);
-					this.SendPropertyChanging();
-					this._Id = value;
-					this.SendPropertyChanged("Id");
-					this.OnIdChanged();
-				}
-			}
-		}
-		
-		[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_Name", DbType="NVarChar(300) NOT NULL", CanBeNull=false)]
-		public string Name
-		{
-			get
-			{
-				return this._Name;
-			}
-			set
-			{
-				if ((this._Name != value))
-				{
-					this.OnNameChanging(value);
-					this.SendPropertyChanging();
-					this._Name = value;
-					this.SendPropertyChanged("Name");
-					this.OnNameChanged();
-				}
-			}
-		}
-		
-		[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_Version", DbType="NVarChar(50) NOT NULL", CanBeNull=false)]
-		public string Version
-		{
-			get
-			{
-				return this._Version;
-			}
-			set
-			{
-				if ((this._Version != value))
-				{
-					this.OnVersionChanging(value);
-					this.SendPropertyChanging();
-					this._Version = value;
-					this.SendPropertyChanged("Version");
-					this.OnVersionChanged();
-				}
-			}
-		}
-		
-		[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_ContactName", DbType="Text", UpdateCheck=UpdateCheck.Never)]
-		public string ContactName
-		{
-			get
-			{
-				return this._ContactName;
-			}
-			set
-			{
-				if ((this._ContactName != value))
-				{
-					this.OnContactNameChanging(value);
-					this.SendPropertyChanging();
-					this._ContactName = value;
-					this.SendPropertyChanged("ContactName");
-					this.OnContactNameChanged();
-				}
-			}
-		}
-		
-		[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_ContactEmail", DbType="Text", UpdateCheck=UpdateCheck.Never)]
-		public string ContactEmail
-		{
-			get
-			{
-				return this._ContactEmail;
-			}
-			set
-			{
-				if ((this._ContactEmail != value))
-				{
-					this.OnContactEmailChanging(value);
-					this.SendPropertyChanging();
-					this._ContactEmail = value;
-					this.SendPropertyChanged("ContactEmail");
-					this.OnContactEmailChanged();
-				}
-			}
-		}
-		
-		[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_License", DbType="Text", UpdateCheck=UpdateCheck.Never)]
-		public string License
-		{
-			get
-			{
-				return this._License;
-			}
-			set
-			{
-				if ((this._License != value))
-				{
-					this.OnLicenseChanging(value);
-					this.SendPropertyChanging();
-					this._License = value;
-					this.SendPropertyChanged("License");
-					this.OnLicenseChanged();
-				}
-			}
-		}
-		
-		[global::System.Data.Linq.Mapping.AssociationAttribute(Name="Plugin_PluginPackage", Storage="_PluginPackage", ThisKey="Id", OtherKey="PluginId", IsUnique=true, IsForeignKey=false)]
-		public PluginPackage PluginPackage
-		{
-			get
-			{
-				return this._PluginPackage.Entity;
-			}
-			set
-			{
-				PluginPackage previousValue = this._PluginPackage.Entity;
-				if (((previousValue != value) 
-							|| (this._PluginPackage.HasLoadedOrAssignedValue == false)))
-				{
-					this.SendPropertyChanging();
-					if ((previousValue != null))
-					{
-						this._PluginPackage.Entity = null;
-						previousValue.Plugin = null;
-					}
-					this._PluginPackage.Entity = value;
-					if ((value != null))
-					{
-						value.Plugin = this;
-					}
-					this.SendPropertyChanged("PluginPackage");
-				}
-			}
-		}
-		
-		public event PropertyChangingEventHandler PropertyChanging;
-		
-		public event PropertyChangedEventHandler PropertyChanged;
-		
-		protected virtual void SendPropertyChanging()
-		{
-			if ((this.PropertyChanging != null))
-			{
-				this.PropertyChanging(this, emptyChangingEventArgs);
-			}
-		}
-		
-		protected virtual void SendPropertyChanged(String propertyName)
-		{
-			if ((this.PropertyChanged != null))
-			{
-				this.PropertyChanged(this, new PropertyChangedEventArgs(propertyName));
-			}
-		}
-	}
-	
-	[global::System.Data.Linq.Mapping.TableAttribute(Name="dbo.PluginPackage")]
-	public partial class PluginPackage : INotifyPropertyChanging, INotifyPropertyChanged
-	{
-		
-		private static PropertyChangingEventArgs emptyChangingEventArgs = new PropertyChangingEventArgs(String.Empty);
-		
-		private long _PluginId;
-		
-		private System.Data.Linq.Binary _Data;
-		
-		private EntityRef<Plugin> _Plugin;
-		
+
+    public Plugin() {
+      this._PluginPackage = default(EntityRef<PluginPackage>);
+      OnCreated();
+    }
+
+    [global::System.Data.Linq.Mapping.ColumnAttribute(Storage = "_Id", AutoSync = AutoSync.OnInsert, DbType = "BigInt NOT NULL IDENTITY", IsPrimaryKey = true, IsDbGenerated = true)]
+    public long Id {
+      get {
+        return this._Id;
+      }
+      set {
+        if ((this._Id != value)) {
+          this.OnIdChanging(value);
+          this.SendPropertyChanging();
+          this._Id = value;
+          this.SendPropertyChanged("Id");
+          this.OnIdChanged();
+        }
+      }
+    }
+
+    [global::System.Data.Linq.Mapping.ColumnAttribute(Storage = "_Name", DbType = "NVarChar(300) NOT NULL", CanBeNull = false)]
+    public string Name {
+      get {
+        return this._Name;
+      }
+      set {
+        if ((this._Name != value)) {
+          this.OnNameChanging(value);
+          this.SendPropertyChanging();
+          this._Name = value;
+          this.SendPropertyChanged("Name");
+          this.OnNameChanged();
+        }
+      }
+    }
+
+    [global::System.Data.Linq.Mapping.ColumnAttribute(Storage = "_Version", DbType = "NVarChar(50) NOT NULL", CanBeNull = false)]
+    public string Version {
+      get {
+        return this._Version;
+      }
+      set {
+        if ((this._Version != value)) {
+          this.OnVersionChanging(value);
+          this.SendPropertyChanging();
+          this._Version = value;
+          this.SendPropertyChanged("Version");
+          this.OnVersionChanged();
+        }
+      }
+    }
+
+    [global::System.Data.Linq.Mapping.ColumnAttribute(Storage = "_ContactName", DbType = "Text", UpdateCheck = UpdateCheck.Never)]
+    public string ContactName {
+      get {
+        return this._ContactName;
+      }
+      set {
+        if ((this._ContactName != value)) {
+          this.OnContactNameChanging(value);
+          this.SendPropertyChanging();
+          this._ContactName = value;
+          this.SendPropertyChanged("ContactName");
+          this.OnContactNameChanged();
+        }
+      }
+    }
+
+    [global::System.Data.Linq.Mapping.ColumnAttribute(Storage = "_ContactEmail", DbType = "Text", UpdateCheck = UpdateCheck.Never)]
+    public string ContactEmail {
+      get {
+        return this._ContactEmail;
+      }
+      set {
+        if ((this._ContactEmail != value)) {
+          this.OnContactEmailChanging(value);
+          this.SendPropertyChanging();
+          this._ContactEmail = value;
+          this.SendPropertyChanged("ContactEmail");
+          this.OnContactEmailChanged();
+        }
+      }
+    }
+
+    [global::System.Data.Linq.Mapping.ColumnAttribute(Storage = "_License", DbType = "Text", UpdateCheck = UpdateCheck.Never)]
+    public string License {
+      get {
+        return this._License;
+      }
+      set {
+        if ((this._License != value)) {
+          this.OnLicenseChanging(value);
+          this.SendPropertyChanging();
+          this._License = value;
+          this.SendPropertyChanged("License");
+          this.OnLicenseChanged();
+        }
+      }
+    }
+
+    [global::System.Data.Linq.Mapping.AssociationAttribute(Name = "Plugin_PluginPackage", Storage = "_PluginPackage", ThisKey = "Id", OtherKey = "PluginId", IsUnique = true, IsForeignKey = false)]
+    public PluginPackage PluginPackage {
+      get {
+        return this._PluginPackage.Entity;
+      }
+      set {
+        PluginPackage previousValue = this._PluginPackage.Entity;
+        if (((previousValue != value)
+              || (this._PluginPackage.HasLoadedOrAssignedValue == false))) {
+          this.SendPropertyChanging();
+          if ((previousValue != null)) {
+            this._PluginPackage.Entity = null;
+            previousValue.Plugin = null;
+          }
+          this._PluginPackage.Entity = value;
+          if ((value != null)) {
+            value.Plugin = this;
+          }
+          this.SendPropertyChanged("PluginPackage");
+        }
+      }
+    }
+
+    public event PropertyChangingEventHandler PropertyChanging;
+
+    public event PropertyChangedEventHandler PropertyChanged;
+
+    protected virtual void SendPropertyChanging() {
+      if ((this.PropertyChanging != null)) {
+        this.PropertyChanging(this, emptyChangingEventArgs);
+      }
+    }
+
+    protected virtual void SendPropertyChanged(String propertyName) {
+      if ((this.PropertyChanged != null)) {
+        this.PropertyChanged(this, new PropertyChangedEventArgs(propertyName));
+      }
+    }
+  }
+
+  [global::System.Data.Linq.Mapping.TableAttribute(Name = "dbo.PluginPackage")]
+  public partial class PluginPackage : INotifyPropertyChanging, INotifyPropertyChanged {
+
+    private static PropertyChangingEventArgs emptyChangingEventArgs = new PropertyChangingEventArgs(String.Empty);
+
+    private long _PluginId;
+
+    private System.Data.Linq.Binary _Data;
+
+    private EntityRef<Plugin> _Plugin;
+
     #region Extensibility Method Definitions
     partial void OnLoaded();
@@ -526,122 +439,99 @@
     partial void OnDataChanged();
     #endregion
-		
-		public PluginPackage()
-		{
-			this._Plugin = default(EntityRef<Plugin>);
-			OnCreated();
-		}
-		
-		[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_PluginId", DbType="BigInt NOT NULL", IsPrimaryKey=true)]
-		public long PluginId
-		{
-			get
-			{
-				return this._PluginId;
-			}
-			set
-			{
-				if ((this._PluginId != value))
-				{
-					if (this._Plugin.HasLoadedOrAssignedValue)
-					{
-						throw new System.Data.Linq.ForeignKeyReferenceAlreadyHasValueException();
-					}
-					this.OnPluginIdChanging(value);
-					this.SendPropertyChanging();
-					this._PluginId = value;
-					this.SendPropertyChanged("PluginId");
-					this.OnPluginIdChanged();
-				}
-			}
-		}
-		
-		[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_Data", DbType="Image NOT NULL", CanBeNull=false, UpdateCheck=UpdateCheck.Never)]
-		public System.Data.Linq.Binary Data
-		{
-			get
-			{
-				return this._Data;
-			}
-			set
-			{
-				if ((this._Data != value))
-				{
-					this.OnDataChanging(value);
-					this.SendPropertyChanging();
-					this._Data = value;
-					this.SendPropertyChanged("Data");
-					this.OnDataChanged();
-				}
-			}
-		}
-		
-		[global::System.Data.Linq.Mapping.AssociationAttribute(Name="Plugin_PluginPackage", Storage="_Plugin", ThisKey="PluginId", OtherKey="Id", IsForeignKey=true)]
-		public Plugin Plugin
-		{
-			get
-			{
-				return this._Plugin.Entity;
-			}
-			set
-			{
-				Plugin previousValue = this._Plugin.Entity;
-				if (((previousValue != value) 
-							|| (this._Plugin.HasLoadedOrAssignedValue == false)))
-				{
-					this.SendPropertyChanging();
-					if ((previousValue != null))
-					{
-						this._Plugin.Entity = null;
-						previousValue.PluginPackage = null;
-					}
-					this._Plugin.Entity = value;
-					if ((value != null))
-					{
-						value.PluginPackage = this;
-						this._PluginId = value.Id;
-					}
-					else
-					{
-						this._PluginId = default(long);
-					}
-					this.SendPropertyChanged("Plugin");
-				}
-			}
-		}
-		
-		public event PropertyChangingEventHandler PropertyChanging;
-		
-		public event PropertyChangedEventHandler PropertyChanged;
-		
-		protected virtual void SendPropertyChanging()
-		{
-			if ((this.PropertyChanging != null))
-			{
-				this.PropertyChanging(this, emptyChangingEventArgs);
-			}
-		}
-		
-		protected virtual void SendPropertyChanged(String propertyName)
-		{
-			if ((this.PropertyChanged != null))
-			{
-				this.PropertyChanged(this, new PropertyChangedEventArgs(propertyName));
-			}
-		}
-	}
-	
-	[global::System.Data.Linq.Mapping.TableAttribute(Name="dbo.Product")]
-	public partial class Product : INotifyPropertyChanging, INotifyPropertyChanged
-	{
-		
-		private static PropertyChangingEventArgs emptyChangingEventArgs = new PropertyChangingEventArgs(String.Empty);
-		
-		private long _Id;
-		
-		private string _Name;
-		
-		private string _Version;
-		
+
+    public PluginPackage() {
+      this._Plugin = default(EntityRef<Plugin>);
+      OnCreated();
+    }
+
+    [global::System.Data.Linq.Mapping.ColumnAttribute(Storage = "_PluginId", DbType = "BigInt NOT NULL", IsPrimaryKey = true)]
+    public long PluginId {
+      get {
+        return this._PluginId;
+      }
+      set {
+        if ((this._PluginId != value)) {
+          if (this._Plugin.HasLoadedOrAssignedValue) {
+            throw new System.Data.Linq.ForeignKeyReferenceAlreadyHasValueException();
+          }
+          this.OnPluginIdChanging(value);
+          this.SendPropertyChanging();
+          this._PluginId = value;
+          this.SendPropertyChanged("PluginId");
+          this.OnPluginIdChanged();
+        }
+      }
+    }
+
+    [global::System.Data.Linq.Mapping.ColumnAttribute(Storage = "_Data", DbType = "Image NOT NULL", CanBeNull = false, UpdateCheck = UpdateCheck.Never)]
+    public System.Data.Linq.Binary Data {
+      get {
+        return this._Data;
+      }
+      set {
+        if ((this._Data != value)) {
+          this.OnDataChanging(value);
+          this.SendPropertyChanging();
+          this._Data = value;
+          this.SendPropertyChanged("Data");
+          this.OnDataChanged();
+        }
+      }
+    }
+
+    [global::System.Data.Linq.Mapping.AssociationAttribute(Name = "Plugin_PluginPackage", Storage = "_Plugin", ThisKey = "PluginId", OtherKey = "Id", IsForeignKey = true)]
+    public Plugin Plugin {
+      get {
+        return this._Plugin.Entity;
+      }
+      set {
+        Plugin previousValue = this._Plugin.Entity;
+        if (((previousValue != value)
+              || (this._Plugin.HasLoadedOrAssignedValue == false))) {
+          this.SendPropertyChanging();
+          if ((previousValue != null)) {
+            this._Plugin.Entity = null;
+            previousValue.PluginPackage = null;
+          }
+          this._Plugin.Entity = value;
+          if ((value != null)) {
+            value.PluginPackage = this;
+            this._PluginId = value.Id;
+          } else {
+            this._PluginId = default(long);
+          }
+          this.SendPropertyChanged("Plugin");
+        }
+      }
+    }
+
+    public event PropertyChangingEventHandler PropertyChanging;
+
+    public event PropertyChangedEventHandler PropertyChanged;
+
+    protected virtual void SendPropertyChanging() {
+      if ((this.PropertyChanging != null)) {
+        this.PropertyChanging(this, emptyChangingEventArgs);
+      }
+    }
+
+    protected virtual void SendPropertyChanged(String propertyName) {
+      if ((this.PropertyChanged != null)) {
+        this.PropertyChanged(this, new PropertyChangedEventArgs(propertyName));
+      }
+    }
+  }
+
+  [global::System.Data.Linq.Mapping.TableAttribute(Name = "dbo.Product")]
+  public partial class Product : INotifyPropertyChanging, INotifyPropertyChanged {
+
+    private static PropertyChangingEventArgs emptyChangingEventArgs = new PropertyChangingEventArgs(String.Empty);
+
+    private long _Id;
+
+    private string _Name;
+
+    private string _Version;
+
     #region Extensibility Method Definitions
     partial void OnLoaded();
@@ -655,90 +545,73 @@
     partial void OnVersionChanged();
     #endregion
-		
-		public Product()
-		{
-			OnCreated();
-		}
-		
-		[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_Id", AutoSync=AutoSync.OnInsert, DbType="BigInt NOT NULL IDENTITY", IsPrimaryKey=true, IsDbGenerated=true)]
-		public long Id
-		{
-			get
-			{
-				return this._Id;
-			}
-			set
-			{
-				if ((this._Id != value))
-				{
-					this.OnIdChanging(value);
-					this.SendPropertyChanging();
-					this._Id = value;
-					this.SendPropertyChanged("Id");
-					this.OnIdChanged();
-				}
-			}
-		}
-		
-		[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_Name", DbType="NVarChar(300) NOT NULL", CanBeNull=false)]
-		public string Name
-		{
-			get
-			{
-				return this._Name;
-			}
-			set
-			{
-				if ((this._Name != value))
-				{
-					this.OnNameChanging(value);
-					this.SendPropertyChanging();
-					this._Name = value;
-					this.SendPropertyChanged("Name");
-					this.OnNameChanged();
-				}
-			}
-		}
-		
-		[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_Version", DbType="NVarChar(50) NOT NULL", CanBeNull=false)]
-		public string Version
-		{
-			get
-			{
-				return this._Version;
-			}
-			set
-			{
-				if ((this._Version != value))
-				{
-					this.OnVersionChanging(value);
-					this.SendPropertyChanging();
-					this._Version = value;
-					this.SendPropertyChanged("Version");
-					this.OnVersionChanged();
-				}
-			}
-		}
-		
-		public event PropertyChangingEventHandler PropertyChanging;
-		
-		public event PropertyChangedEventHandler PropertyChanged;
-		
-		protected virtual void SendPropertyChanging()
-		{
-			if ((this.PropertyChanging != null))
-			{
-				this.PropertyChanging(this, emptyChangingEventArgs);
-			}
-		}
-		
-		protected virtual void SendPropertyChanged(String propertyName)
-		{
-			if ((this.PropertyChanged != null))
-			{
-				this.PropertyChanged(this, new PropertyChangedEventArgs(propertyName));
-			}
-		}
-	}
+
+    public Product() {
+      OnCreated();
+    }
+
+    [global::System.Data.Linq.Mapping.ColumnAttribute(Storage = "_Id", AutoSync = AutoSync.OnInsert, DbType = "BigInt NOT NULL IDENTITY", IsPrimaryKey = true, IsDbGenerated = true)]
+    public long Id {
+      get {
+        return this._Id;
+      }
+      set {
+        if ((this._Id != value)) {
+          this.OnIdChanging(value);
+          this.SendPropertyChanging();
+          this._Id = value;
+          this.SendPropertyChanged("Id");
+          this.OnIdChanged();
+        }
+      }
+    }
+
+    [global::System.Data.Linq.Mapping.ColumnAttribute(Storage = "_Name", DbType = "NVarChar(300) NOT NULL", CanBeNull = false)]
+    public string Name {
+      get {
+        return this._Name;
+      }
+      set {
+        if ((this._Name != value)) {
+          this.OnNameChanging(value);
+          this.SendPropertyChanging();
+          this._Name = value;
+          this.SendPropertyChanged("Name");
+          this.OnNameChanged();
+        }
+      }
+    }
+
+    [global::System.Data.Linq.Mapping.ColumnAttribute(Storage = "_Version", DbType = "NVarChar(50) NOT NULL", CanBeNull = false)]
+    public string Version {
+      get {
+        return this._Version;
+      }
+      set {
+        if ((this._Version != value)) {
+          this.OnVersionChanging(value);
+          this.SendPropertyChanging();
+          this._Version = value;
+          this.SendPropertyChanged("Version");
+          this.OnVersionChanged();
+        }
+      }
+    }
+
+    public event PropertyChangingEventHandler PropertyChanging;
+
+    public event PropertyChangedEventHandler PropertyChanged;
+
+    protected virtual void SendPropertyChanging() {
+      if ((this.PropertyChanging != null)) {
+        this.PropertyChanging(this, emptyChangingEventArgs);
+      }
+    }
+
+    protected virtual void SendPropertyChanged(String propertyName) {
+      if ((this.PropertyChanged != null)) {
+        this.PropertyChanged(this, new PropertyChangedEventArgs(propertyName));
+      }
+    }
+  }
 }
 #pragma warning restore 1591
Index: /trunk/sources/HeuristicLab.Tracing/3.3/HiveLogger.cs
===================================================================
--- /trunk/sources/HeuristicLab.Tracing/3.3/HiveLogger.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.Tracing/3.3/HiveLogger.cs	(revision 4068)
@@ -21,9 +21,9 @@
 
 using System;
+using System.Diagnostics;
+using System.IO;
 using HeuristicLab.Tracing.Properties;
 using log4net;
-using System.Diagnostics;
 using log4net.Config;
-using System.IO;
 
 namespace HeuristicLab.Tracing {
Index: /trunk/sources/HeuristicLab.Tracing/3.3/Logger.cs
===================================================================
--- /trunk/sources/HeuristicLab.Tracing/3.3/Logger.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab.Tracing/3.3/Logger.cs	(revision 4068)
@@ -21,9 +21,9 @@
 
 using System;
+using System.Diagnostics;
+using System.IO;
 using HeuristicLab.Tracing.Properties;
 using log4net;
-using System.Diagnostics;
 using log4net.Config;
-using System.IO;
 
 namespace HeuristicLab.Tracing {
Index: /trunk/sources/HeuristicLab/3.3/Program.cs
===================================================================
--- /trunk/sources/HeuristicLab/3.3/Program.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab/3.3/Program.cs	(revision 4068)
@@ -21,10 +21,4 @@
 
 using System;
-using System.Collections.Generic;
-using System.Linq;
-using System.Windows.Forms;
-using System.Text;
-using HeuristicLab;
-using HeuristicLab.PluginInfrastructure.Starter;
 
 namespace HeuristicLab {
Index: /trunk/sources/HeuristicLab/3.3/Properties/Resources.Designer.cs
===================================================================
--- /trunk/sources/HeuristicLab/3.3/Properties/Resources.Designer.cs	(revision 4067)
+++ /trunk/sources/HeuristicLab/3.3/Properties/Resources.Designer.cs	(revision 4068)
@@ -10,54 +10,53 @@
 
 namespace HeuristicLab.Properties {
-    using System;
-    
-    
+
+
+  /// <summary>
+  ///   A strongly-typed resource class, for looking up localized strings, etc.
+  /// </summary>
+  // This class was auto-generated by the StronglyTypedResourceBuilder
+  // class via a tool like ResGen or Visual Studio.
+  // To add or remove a member, edit your .ResX file then rerun ResGen
+  // with the /str option, or rebuild your VS project.
+  [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "4.0.0.0")]
+  [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
+  [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
+  internal class Resources {
+
+    private static global::System.Resources.ResourceManager resourceMan;
+
+    private static global::System.Globalization.CultureInfo resourceCulture;
+
+    [global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")]
+    internal Resources() {
+    }
+
     /// <summary>
-    ///   A strongly-typed resource class, for looking up localized strings, etc.
+    ///   Returns the cached ResourceManager instance used by this class.
     /// </summary>
-    // This class was auto-generated by the StronglyTypedResourceBuilder
-    // class via a tool like ResGen or Visual Studio.
-    // To add or remove a member, edit your .ResX file then rerun ResGen
-    // with the /str option, or rebuild your VS project.
-    [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "4.0.0.0")]
-    [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
-    [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
-    internal class Resources {
-        
-        private static global::System.Resources.ResourceManager resourceMan;
-        
-        private static global::System.Globalization.CultureInfo resourceCulture;
-        
-        [global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")]
-        internal Resources() {
+    [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
+    internal static global::System.Resources.ResourceManager ResourceManager {
+      get {
+        if (object.ReferenceEquals(resourceMan, null)) {
+          global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("HeuristicLab.Properties.Resources", typeof(Resources).Assembly);
+          resourceMan = temp;
         }
-        
-        /// <summary>
-        ///   Returns the cached ResourceManager instance used by this class.
-        /// </summary>
-        [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
-        internal static global::System.Resources.ResourceManager ResourceManager {
-            get {
-                if (object.ReferenceEquals(resourceMan, null)) {
-                    global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("HeuristicLab.Properties.Resources", typeof(Resources).Assembly);
-                    resourceMan = temp;
-                }
-                return resourceMan;
-            }
-        }
-        
-        /// <summary>
-        ///   Overrides the current thread's CurrentUICulture property for all
-        ///   resource lookups using this strongly typed resource class.
-        /// </summary>
-        [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
-        internal static global::System.Globalization.CultureInfo Culture {
-            get {
-                return resourceCulture;
-            }
-            set {
-                resourceCulture = value;
-            }
-        }
+        return resourceMan;
+      }
     }
+
+    /// <summary>
+    ///   Overrides the current thread's CurrentUICulture property for all
+    ///   resource lookups using this strongly typed resource class.
+    /// </summary>
+    [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
+    internal static global::System.Globalization.CultureInfo Culture {
+      get {
+        return resourceCulture;
+      }
+      set {
+        resourceCulture = value;
+      }
+    }
+  }
 }
