Index: /branches/OptimizationNetworks/HeuristicLab.Networks.Views.NetworkVisualization.Views/3.3/ChartModes/AddNodesChartMode.cs
===================================================================
--- /branches/OptimizationNetworks/HeuristicLab.Networks.Views.NetworkVisualization.Views/3.3/ChartModes/AddNodesChartMode.cs	(revision 13798)
+++ /branches/OptimizationNetworks/HeuristicLab.Networks.Views.NetworkVisualization.Views/3.3/ChartModes/AddNodesChartMode.cs	(revision 13799)
@@ -79,6 +79,8 @@
             var lowerLeft = center - new Offset(size);
             var upperRight = center + new Offset(size);
-            node.VisualProperties = new NodeVisualProperties(new Point2D<double>(lowerLeft.X, lowerLeft.Y),
-                                                             new Point2D<double>(upperRight.X, upperRight.Y));
+            node.VisualProperties = new NodeVisualProperties {
+              LowerLeft = new Point2D<double>(lowerLeft.X, lowerLeft.Y),
+              UpperRight = new Point2D<double>(upperRight.X, upperRight.Y)
+            };
             network.Nodes.Add(node);
             break;
Index: /branches/OptimizationNetworks/HeuristicLab.Networks.Views.NetworkVisualization.Views/3.3/ChartModes/SelectChartMode.cs
===================================================================
--- /branches/OptimizationNetworks/HeuristicLab.Networks.Views.NetworkVisualization.Views/3.3/ChartModes/SelectChartMode.cs	(revision 13798)
+++ /branches/OptimizationNetworks/HeuristicLab.Networks.Views.NetworkVisualization.Views/3.3/ChartModes/SelectChartMode.cs	(revision 13799)
@@ -49,62 +49,4 @@
     }
 
-    public override void HandleOnKeyDown(object sender, KeyEventArgs e) {
-      try {
-        if (!(chartControl.Tag is IUserDefinedNetwork)) return;
-
-        switch (e.KeyCode) {
-          case Keys.Delete:
-            chartControl.SuspendRendering();
-
-            var connectionLines = chartControl.Chart.Group.Primitives.OfType<ConnectionLine>().ToList();
-            var nodeRectangles = chartControl.Chart.Group.Primitives.OfType<NodeRectangle>().ToList();
-            var portRectangles = nodeRectangles.SelectMany(x => x.NetworkItem.Ports.Select(x.GetPortPrimitive)).OfType<PortRectangle>().ToList();
-
-            var deletedNodes = new HashSet<INode>();
-            var deletedPorts = new HashSet<IMessagePort>();
-
-            foreach (var nodeRectangle in nodeRectangles) {
-              if (nodeRectangle.Selected) {
-                var node = nodeRectangle.NetworkItem;
-                if (node == null) continue;
-                deletedNodes.Add(node);
-                foreach (var port in node.Ports.OfType<IMessagePort>())
-                  deletedPorts.Add(port);
-              }
-            }
-
-            foreach (var portRectangle in portRectangles) {
-              if (portRectangle.Selected) {
-                var port = portRectangle.NetworkItem as IMessagePort;
-                if (port == null) continue;
-                port.Parent.Ports.Remove(port);
-                deletedPorts.Add(port);
-              }
-            }
-
-            selectedPortRectangle = null;
-
-            foreach (var connectionLine in connectionLines) {
-              var startPortRectangle = connectionLine.StartPortRectangle;
-              var endPortRectangle = connectionLine.EndPortRectangle;
-              if (startPortRectangle == null || endPortRectangle == null) continue;
-
-              var startPort = startPortRectangle.NetworkItem as IMessagePort;
-              var endPort = endPortRectangle.NetworkItem as IMessagePort;
-              if (startPort == null || endPort == null) continue;
-
-              if (connectionLine.Selected || deletedPorts.Contains(startPort) || deletedPorts.Contains(endPort))
-                startPort.ConnectedPort = null;
-            }
-
-            foreach (var node in deletedNodes)
-              node.Parent.Nodes.Remove(node);
-            break;
-        }
-      } finally {
-        chartControl.ResumeRendering();
-      }
-    }
-
     public override void HandleOnMouseDown(object sender, MouseEventArgs e) {
       try {
@@ -129,4 +71,5 @@
                   selectedPortRectangle = portRectangle;
                   constrainingNodeRectangle = nodeRectangle;
+                  break;
                 }
               }
@@ -134,8 +77,8 @@
 
             if (selectedPortRectangle != null)
-              foreach (var sp in chartControl.Chart.Group.SelectedPrimitives)
+              foreach (var sp in chartControl.Chart.Group.SelectedPrimitives) {
                 sp.Selected = false;
-            else
-              base.HandleOnMouseDown(sender, e);
+                OnSelectedPrimitivesChanged();
+              } else base.HandleOnMouseDown(sender, e);
             break;
         }
@@ -196,4 +139,56 @@
       }
     }
+
+    protected override void DeleteSelectedPrimitives() {
+      if (!(chartControl.Tag is IUserDefinedNetwork)) return;
+
+      try {
+        chartControl.SuspendRendering();
+
+        var connectionLines = chartControl.Chart.Group.Primitives.OfType<ConnectionLine>().ToList();
+        var nodeRectangles = chartControl.Chart.Group.Primitives.OfType<NodeRectangle>().ToList();
+        var portRectangles = nodeRectangles.SelectMany(x => x.NetworkItem.Ports.Select(x.GetPortPrimitive)).OfType<PortRectangle>().ToList();
+
+        var deletedNodes = new HashSet<INode>();
+        var deletedPorts = new HashSet<IMessagePort>();
+
+        foreach (var nodeRectangle in nodeRectangles) {
+          if (nodeRectangle.Selected) {
+            var node = nodeRectangle.NetworkItem;
+            if (node == null) continue;
+            deletedNodes.Add(node);
+            foreach (var port in node.Ports.OfType<IMessagePort>())
+              deletedPorts.Add(port);
+          }
+        }
+
+        foreach (var portRectangle in portRectangles) {
+          if (portRectangle.Selected) {
+            var port = portRectangle.NetworkItem as IMessagePort;
+            if (port == null) continue;
+            port.Parent.Ports.Remove(port);
+            deletedPorts.Add(port);
+          }
+        }
+
+        selectedPortRectangle = null;
+
+        foreach (var connectionLine in connectionLines) {
+          var startPortRectangle = connectionLine.StartPortRectangle;
+          var endPortRectangle = connectionLine.EndPortRectangle;
+          if (startPortRectangle == null || endPortRectangle == null) continue;
+
+          var startPort = startPortRectangle.NetworkItem as IMessagePort;
+          var endPort = endPortRectangle.NetworkItem as IMessagePort;
+          if (startPort == null || endPort == null) continue;
+
+          if (connectionLine.Selected || deletedPorts.Contains(startPort) || deletedPorts.Contains(endPort))
+            startPort.ConnectedPort = null;
+        }
+
+        foreach (var node in deletedNodes)
+          node.Parent.Nodes.Remove(node);
+      } finally { chartControl.ResumeRendering(); }
+    }
   }
 }
Index: /branches/OptimizationNetworks/HeuristicLab.Networks.Views.NetworkVisualization.Views/3.3/NetworkVisualizationView.Designer.cs
===================================================================
--- /branches/OptimizationNetworks/HeuristicLab.Networks.Views.NetworkVisualization.Views/3.3/NetworkVisualizationView.Designer.cs	(revision 13798)
+++ /branches/OptimizationNetworks/HeuristicLab.Networks.Views.NetworkVisualization.Views/3.3/NetworkVisualizationView.Designer.cs	(revision 13799)
@@ -25,5 +25,14 @@
     private void InitializeComponent() {
       this.chartControl = new HeuristicLab.Visualization.ChartControl();
+      this.splitContainer = new System.Windows.Forms.SplitContainer();
+      this.detailsToggleButton = new System.Windows.Forms.Button();
+      this.detailsGroupBox = new System.Windows.Forms.GroupBox();
+      this.viewHost = new HeuristicLab.MainForm.WindowsForms.ViewHost();
       ((System.ComponentModel.ISupportInitialize)(this.errorProvider)).BeginInit();
+      ((System.ComponentModel.ISupportInitialize)(this.splitContainer)).BeginInit();
+      this.splitContainer.Panel1.SuspendLayout();
+      this.splitContainer.Panel2.SuspendLayout();
+      this.splitContainer.SuspendLayout();
+      this.detailsGroupBox.SuspendLayout();
       this.SuspendLayout();
       // 
@@ -39,9 +48,73 @@
             | System.Windows.Forms.AnchorStyles.Right)));
       this.chartControl.BackColor = System.Drawing.SystemColors.Control;
-      this.chartControl.Location = new System.Drawing.Point(3, 26);
+      this.chartControl.Location = new System.Drawing.Point(3, 3);
+      this.chartControl.Mode = null;
       this.chartControl.Name = "chartControl";
       this.chartControl.ScaleOnResize = true;
-      this.chartControl.Size = new System.Drawing.Size(639, 488);
+      this.chartControl.ShowToolBar = true;
+      this.chartControl.Size = new System.Drawing.Size(408, 482);
+      this.chartControl.SmoothingMode = System.Drawing.Drawing2D.SmoothingMode.AntiAlias;
       this.chartControl.TabIndex = 3;
+      // 
+      // splitContainer
+      // 
+      this.splitContainer.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) 
+            | System.Windows.Forms.AnchorStyles.Left) 
+            | System.Windows.Forms.AnchorStyles.Right)));
+      this.splitContainer.Location = new System.Drawing.Point(3, 26);
+      this.splitContainer.Name = "splitContainer";
+      // 
+      // splitContainer.Panel1
+      // 
+      this.splitContainer.Panel1.Controls.Add(this.detailsToggleButton);
+      this.splitContainer.Panel1.Controls.Add(this.chartControl);
+      // 
+      // splitContainer.Panel2
+      // 
+      this.splitContainer.Panel2.Controls.Add(this.detailsGroupBox);
+      this.splitContainer.Size = new System.Drawing.Size(639, 488);
+      this.splitContainer.SplitterDistance = 439;
+      this.splitContainer.TabIndex = 4;
+      // 
+      // detailsToggleButton
+      // 
+      this.detailsToggleButton.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) 
+            | System.Windows.Forms.AnchorStyles.Right)));
+      this.detailsToggleButton.Location = new System.Drawing.Point(417, 3);
+      this.detailsToggleButton.Name = "detailsToggleButton";
+      this.detailsToggleButton.Size = new System.Drawing.Size(19, 482);
+      this.detailsToggleButton.TabIndex = 4;
+      this.detailsToggleButton.Text = ">";
+      this.detailsToggleButton.UseVisualStyleBackColor = true;
+      this.detailsToggleButton.Click += new System.EventHandler(this.detailsToggleButton_Click);
+      // 
+      // detailsGroupBox
+      // 
+      this.detailsGroupBox.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) 
+            | System.Windows.Forms.AnchorStyles.Left) 
+            | System.Windows.Forms.AnchorStyles.Right)));
+      this.detailsGroupBox.Controls.Add(this.viewHost);
+      this.detailsGroupBox.Location = new System.Drawing.Point(3, 3);
+      this.detailsGroupBox.Name = "detailsGroupBox";
+      this.detailsGroupBox.Size = new System.Drawing.Size(190, 482);
+      this.detailsGroupBox.TabIndex = 1;
+      this.detailsGroupBox.TabStop = false;
+      this.detailsGroupBox.Text = "Details";
+      // 
+      // viewHost
+      // 
+      this.viewHost.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) 
+            | System.Windows.Forms.AnchorStyles.Left) 
+            | System.Windows.Forms.AnchorStyles.Right)));
+      this.viewHost.Caption = "View";
+      this.viewHost.Content = null;
+      this.viewHost.Enabled = false;
+      this.viewHost.Location = new System.Drawing.Point(6, 19);
+      this.viewHost.Name = "viewHost";
+      this.viewHost.ReadOnly = false;
+      this.viewHost.Size = new System.Drawing.Size(178, 457);
+      this.viewHost.TabIndex = 0;
+      this.viewHost.ViewsLabelVisible = true;
+      this.viewHost.ViewType = null;
       // 
       // NetworkVisualizationView
@@ -49,11 +122,16 @@
       this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
       this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
-      this.Controls.Add(this.chartControl);
+      this.Controls.Add(this.splitContainer);
       this.Name = "NetworkVisualizationView";
       this.Controls.SetChildIndex(this.nameLabel, 0);
       this.Controls.SetChildIndex(this.nameTextBox, 0);
       this.Controls.SetChildIndex(this.infoLabel, 0);
-      this.Controls.SetChildIndex(this.chartControl, 0);
+      this.Controls.SetChildIndex(this.splitContainer, 0);
       ((System.ComponentModel.ISupportInitialize)(this.errorProvider)).EndInit();
+      this.splitContainer.Panel1.ResumeLayout(false);
+      this.splitContainer.Panel2.ResumeLayout(false);
+      ((System.ComponentModel.ISupportInitialize)(this.splitContainer)).EndInit();
+      this.splitContainer.ResumeLayout(false);
+      this.detailsGroupBox.ResumeLayout(false);
       this.ResumeLayout(false);
       this.PerformLayout();
@@ -64,4 +142,8 @@
 
     private Visualization.ChartControl chartControl;
+    private System.Windows.Forms.SplitContainer splitContainer;
+    private System.Windows.Forms.Button detailsToggleButton;
+    private System.Windows.Forms.GroupBox detailsGroupBox;
+    private MainForm.WindowsForms.ViewHost viewHost;
   }
 }
Index: /branches/OptimizationNetworks/HeuristicLab.Networks.Views.NetworkVisualization.Views/3.3/NetworkVisualizationView.cs
===================================================================
--- /branches/OptimizationNetworks/HeuristicLab.Networks.Views.NetworkVisualization.Views/3.3/NetworkVisualizationView.cs	(revision 13798)
+++ /branches/OptimizationNetworks/HeuristicLab.Networks.Views.NetworkVisualization.Views/3.3/NetworkVisualizationView.cs	(revision 13799)
@@ -20,4 +20,5 @@
 #endregion
 
+using System;
 using System.Collections.Generic;
 using System.Linq;
@@ -46,7 +47,8 @@
       InitializeComponent();
 
-      var initialMode = new SelectChartMode(chartControl);
+      var selectMode = new SelectChartMode(chartControl);
+      selectMode.SelectedPrimitivesChanged += SelectMode_SelectedPrimitivesChanged;
       chartControl.AddChartModes(
-        initialMode,
+        selectMode,
         new PanChartMode(chartControl),
         new RulerChartMode(chartControl),
@@ -57,5 +59,5 @@
         new ConnectPortsChartMode(chartControl)
       );
-      chartControl.Mode = initialMode;
+      chartControl.Mode = selectMode;
     }
 
@@ -87,4 +89,10 @@
 
     #region Event Handlers
+    private void SelectMode_SelectedPrimitivesChanged(object sender, EventArgs e) {
+      var selectedPrimitives = chartControl.Chart.Group.SelectedPrimitives;
+      var nodePrimitive = selectedPrimitives.OfType<NodeRectangle>().SingleOrDefault();
+      viewHost.Content = nodePrimitive != null ? nodePrimitive.NetworkItem : null;
+    }
+
     #region Nodes Event Handlers
     private void Nodes_ItemsAdded(object sender, CollectionItemsChangedEventArgs<INode> e) {
@@ -111,4 +119,9 @@
     private void Ports_ItemsReplaced(object sender, CollectionItemsChangedEventArgs<IPort> e) { }
     #endregion
+
+    private void detailsToggleButton_Click(object sender, EventArgs e) {
+      splitContainer.Panel2Collapsed = !splitContainer.Panel2Collapsed;
+      detailsToggleButton.Text = splitContainer.Panel2Collapsed ? "<" : ">";
+    }
     #endregion
 
Index: /branches/OptimizationNetworks/HeuristicLab.Networks.Views.NetworkVisualization/3.3/HeuristicLab.Networks.Views.NetworkVisualization-3.3.csproj
===================================================================
--- /branches/OptimizationNetworks/HeuristicLab.Networks.Views.NetworkVisualization/3.3/HeuristicLab.Networks.Views.NetworkVisualization-3.3.csproj	(revision 13798)
+++ /branches/OptimizationNetworks/HeuristicLab.Networks.Views.NetworkVisualization/3.3/HeuristicLab.Networks.Views.NetworkVisualization-3.3.csproj	(revision 13799)
@@ -75,13 +75,19 @@
     <Reference Include="HeuristicLab.Collections-3.3, Version=3.3.0.0, Culture=neutral, PublicKeyToken=ba48961d6f65dcec, processorArchitecture=MSIL">
       <SpecificVersion>False</SpecificVersion>
+      <Private>False</Private>
     </Reference>
     <Reference Include="HeuristicLab.Common-3.3, Version=3.3.0.0, Culture=neutral, PublicKeyToken=ba48961d6f65dcec, processorArchitecture=MSIL">
       <SpecificVersion>False</SpecificVersion>
       <HintPath>..\..\..\..\trunk\sources\bin\HeuristicLab.Common-3.3.dll</HintPath>
-      <Private>True</Private>
+      <Private>False</Private>
     </Reference>
     <Reference Include="HeuristicLab.Core-3.3, Version=3.3.0.0, Culture=neutral, PublicKeyToken=ba48961d6f65dcec, processorArchitecture=MSIL">
       <SpecificVersion>False</SpecificVersion>
       <HintPath>..\..\..\..\trunk\sources\bin\HeuristicLab.Core-3.3.dll</HintPath>
+      <Private>False</Private>
+    </Reference>
+    <Reference Include="HeuristicLab.Optimization-3.3, Version=3.3.0.0, Culture=neutral, PublicKeyToken=ba48961d6f65dcec, processorArchitecture=MSIL">
+      <SpecificVersion>False</SpecificVersion>
+      <HintPath>..\..\..\..\trunk\sources\bin\HeuristicLab.Optimization-3.3.dll</HintPath>
       <Private>False</Private>
     </Reference>
@@ -101,4 +107,5 @@
     <Reference Include="System.Core" />
     <Reference Include="System.Drawing" />
+    <Reference Include="System.Windows.Forms" />
   </ItemGroup>
   <ItemGroup>
@@ -109,6 +116,8 @@
     <Compile Include="Orientation.cs" />
     <Compile Include="PortVisualProperties.cs" />
+    <Compile Include="Primitives\AlgorithmNodeRectangle.cs" />
     <Compile Include="Primitives\ConnectionLine.cs" />
     <Compile Include="Plugin.cs" />
+    <Compile Include="Primitives\MessagePortRectangle.cs" />
     <Compile Include="Primitives\NodeRectangle.cs" />
     <Compile Include="Primitives\PortRectangle.cs" />
Index: /branches/OptimizationNetworks/HeuristicLab.Networks.Views.NetworkVisualization/3.3/INodeVisualProperties.cs
===================================================================
--- /branches/OptimizationNetworks/HeuristicLab.Networks.Views.NetworkVisualization/3.3/INodeVisualProperties.cs	(revision 13798)
+++ /branches/OptimizationNetworks/HeuristicLab.Networks.Views.NetworkVisualization/3.3/INodeVisualProperties.cs	(revision 13799)
@@ -20,4 +20,5 @@
 #endregion
 
+using System.Drawing;
 using HeuristicLab.Common;
 using HeuristicLab.Core.Networks;
@@ -27,4 +28,6 @@
     Point2D<double> LowerLeft { get; set; }
     Point2D<double> UpperRight { get; set; }
+    Color BrushColor { get; set; }
+    Color PenColor { get; set; }
   }
 }
Index: /branches/OptimizationNetworks/HeuristicLab.Networks.Views.NetworkVisualization/3.3/IPortVisualProperties.cs
===================================================================
--- /branches/OptimizationNetworks/HeuristicLab.Networks.Views.NetworkVisualization/3.3/IPortVisualProperties.cs	(revision 13798)
+++ /branches/OptimizationNetworks/HeuristicLab.Networks.Views.NetworkVisualization/3.3/IPortVisualProperties.cs	(revision 13799)
@@ -20,4 +20,5 @@
 #endregion
 
+using System.Drawing;
 using HeuristicLab.Core.Networks;
 
@@ -26,4 +27,6 @@
     Orientation Orientation { get; set; }
     double Offset { get; set; }
+    Color BrushColor { get; set; }
+    Color PenColor { get; set; }
   }
 }
Index: /branches/OptimizationNetworks/HeuristicLab.Networks.Views.NetworkVisualization/3.3/NodeVisualProperties.cs
===================================================================
--- /branches/OptimizationNetworks/HeuristicLab.Networks.Views.NetworkVisualization/3.3/NodeVisualProperties.cs	(revision 13798)
+++ /branches/OptimizationNetworks/HeuristicLab.Networks.Views.NetworkVisualization/3.3/NodeVisualProperties.cs	(revision 13799)
@@ -20,4 +20,5 @@
 #endregion
 
+using System.Drawing;
 using HeuristicLab.Common;
 using HeuristicLab.Core.Networks;
@@ -49,4 +50,26 @@
     }
 
+    [Storable]
+    private Color brushColor;
+    public Color BrushColor {
+      get { return brushColor; }
+      set {
+        if (brushColor == value) return;
+        brushColor = value;
+        OnChanged();
+      }
+    }
+
+    [Storable]
+    private Color penColor;
+    public Color PenColor {
+      get { return penColor; }
+      set {
+        if (penColor == value) return;
+        penColor = value;
+        OnChanged();
+      }
+    }
+
     #region Constructors & Cloning
     [StorableConstructor]
@@ -56,9 +79,13 @@
       lowerLeft = original.lowerLeft;
       upperRight = original.upperRight;
+      brushColor = original.brushColor;
+      penColor = original.penColor;
     }
 
-    public NodeVisualProperties(Point2D<double> lowerLeft, Point2D<double> upperRight) {
-      this.lowerLeft = lowerLeft;
-      this.upperRight = upperRight;
+    public NodeVisualProperties() {
+      lowerLeft = new Point2D<double>(0.0, 0.0);
+      upperRight = new Point2D<double>(200.0, 100.0);
+      brushColor = Color.FromArgb(255, 120, 200, 240);
+      penColor = Color.Black;
     }
 
Index: /branches/OptimizationNetworks/HeuristicLab.Networks.Views.NetworkVisualization/3.3/PortVisualProperties.cs
===================================================================
--- /branches/OptimizationNetworks/HeuristicLab.Networks.Views.NetworkVisualization/3.3/PortVisualProperties.cs	(revision 13798)
+++ /branches/OptimizationNetworks/HeuristicLab.Networks.Views.NetworkVisualization/3.3/PortVisualProperties.cs	(revision 13799)
@@ -20,4 +20,5 @@
 #endregion
 
+using System.Drawing;
 using HeuristicLab.Common;
 using HeuristicLab.Core.Networks;
@@ -49,4 +50,26 @@
     }
 
+    [Storable]
+    private Color brushColor;
+    public Color BrushColor {
+      get { return brushColor; }
+      set {
+        if (brushColor == value) return;
+        brushColor = value;
+        OnChanged();
+      }
+    }
+
+    [Storable]
+    private Color penColor;
+    public Color PenColor {
+      get { return penColor; }
+      set {
+        if (penColor == value) return;
+        penColor = value;
+        OnChanged();
+      }
+    }
+
     #region Constructors & Cloning
     [StorableConstructor]
@@ -56,9 +79,13 @@
       orientation = original.orientation;
       offset = original.offset;
+      brushColor = original.brushColor;
+      penColor = original.penColor;
     }
 
-    public PortVisualProperties(Orientation orientation, double offset) {
-      this.orientation = orientation;
-      this.offset = offset;
+    public PortVisualProperties() {
+      orientation = Orientation.South;
+      offset = 0.5;
+      brushColor = Color.RosyBrown;
+      penColor = Color.Black;
     }
 
Index: /branches/OptimizationNetworks/HeuristicLab.Networks.Views.NetworkVisualization/3.3/Primitives/AlgorithmNodeRectangle.cs
===================================================================
--- /branches/OptimizationNetworks/HeuristicLab.Networks.Views.NetworkVisualization/3.3/Primitives/AlgorithmNodeRectangle.cs	(revision 13799)
+++ /branches/OptimizationNetworks/HeuristicLab.Networks.Views.NetworkVisualization/3.3/Primitives/AlgorithmNodeRectangle.cs	(revision 13799)
@@ -0,0 +1,40 @@
+﻿#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2016 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
+ *
+ * This file is part of HeuristicLab.
+ *
+ * HeuristicLab is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * HeuristicLab is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with HeuristicLab. If not, see <http://www.gnu.org/licenses/>.
+ */
+#endregion
+
+using System.Drawing;
+using System.Linq;
+using HeuristicLab.Visualization;
+
+namespace HeuristicLab.Networks.Views.NetworkVisualization {
+  [Primitive(typeof(IAlgorithmNode), true)]
+  public class AlgorithmNodeRectangle : NodeRectangle {
+    protected readonly Brush InactiveBrush = new SolidBrush(Color.FromArgb(255, 255, 200, 100));
+    protected readonly Brush ActiveBrush = new SolidBrush(Color.FromArgb(255, 100, 200, 100));
+
+    public AlgorithmNodeRectangle(IChart chart, IAlgorithmNode node)
+      : base(chart, node) {
+      Brush = InactiveBrush;
+      node.Algorithm.Started += (sender, args) => Brush = ActiveBrush;
+      node.Algorithm.Stopped += (sender, args) => Brush = InactiveBrush;
+      node.StartedAlgorithmsChanged += (sender, args) => Brush = ((IAlgorithmNode)sender).StartedAlgorithms.Any() ? ActiveBrush : InactiveBrush;
+    }
+  }
+}
Index: /branches/OptimizationNetworks/HeuristicLab.Networks.Views.NetworkVisualization/3.3/Primitives/ConnectionLine.cs
===================================================================
--- /branches/OptimizationNetworks/HeuristicLab.Networks.Views.NetworkVisualization/3.3/Primitives/ConnectionLine.cs	(revision 13798)
+++ /branches/OptimizationNetworks/HeuristicLab.Networks.Views.NetworkVisualization/3.3/Primitives/ConnectionLine.cs	(revision 13799)
@@ -81,5 +81,5 @@
       double bx = -2.5 * ax - ay, by = -2.5 * ay + ax;
       double cx = -2.5 * ax + ay, cy = -2.5 * ay - ax;
-      double mul = 4 * Chart.WorldToPixelRatio.Width;
+      double mul = 5 * Chart.WorldToPixelRatio.Width;
       bx *= mul; by *= mul;
       cx *= mul; cy *= mul;
Index: /branches/OptimizationNetworks/HeuristicLab.Networks.Views.NetworkVisualization/3.3/Primitives/MessagePortRectangle.cs
===================================================================
--- /branches/OptimizationNetworks/HeuristicLab.Networks.Views.NetworkVisualization/3.3/Primitives/MessagePortRectangle.cs	(revision 13799)
+++ /branches/OptimizationNetworks/HeuristicLab.Networks.Views.NetworkVisualization/3.3/Primitives/MessagePortRectangle.cs	(revision 13799)
@@ -0,0 +1,52 @@
+﻿#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2016 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
+ *
+ * This file is part of HeuristicLab.
+ *
+ * HeuristicLab is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * HeuristicLab is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with HeuristicLab. If not, see <http://www.gnu.org/licenses/>.
+ */
+#endregion
+
+using System.Drawing;
+using System.Threading.Tasks;
+using HeuristicLab.Core.Networks;
+using HeuristicLab.Visualization;
+
+namespace HeuristicLab.Networks.Views.NetworkVisualization {
+  [Primitive(typeof(IMessagePort), true)]
+  public class MessagePortRectangle : PortRectangle {
+    protected readonly Brush IdleBrush;
+    protected readonly Brush MessageSentBrush = Brushes.Yellow;
+    protected readonly Brush MessageReceivedBrush = Brushes.Red;
+
+    public new IMessagePort NetworkItem {
+      get { return (IMessagePort)base.NetworkItem; }
+      set { base.NetworkItem = value; }
+    }
+
+    public MessagePortRectangle(IChart chart, IMessagePort port, INode node)
+      : base(chart, port, node) {
+      IdleBrush = new SolidBrush(VisualProperties.BrushColor);
+      port.MessageSent += (sender, args) => Highlight(MessageSentBrush);
+      port.MessageReceived += (sender, args) => Highlight(MessageReceivedBrush);
+    }
+
+    private async Task Highlight(Brush brush) {
+      Brush = brush;
+      await Task.Delay(200);
+      Brush = IdleBrush;
+    }
+  }
+}
Index: /branches/OptimizationNetworks/HeuristicLab.Networks.Views.NetworkVisualization/3.3/Primitives/NodeRectangle.cs
===================================================================
--- /branches/OptimizationNetworks/HeuristicLab.Networks.Views.NetworkVisualization/3.3/Primitives/NodeRectangle.cs	(revision 13798)
+++ /branches/OptimizationNetworks/HeuristicLab.Networks.Views.NetworkVisualization/3.3/Primitives/NodeRectangle.cs	(revision 13799)
@@ -23,4 +23,6 @@
 using System.Collections.Generic;
 using System.Drawing;
+using System.Drawing.Drawing2D;
+using System.Windows.Forms;
 using HeuristicLab.Common;
 using HeuristicLab.Core.Networks;
@@ -33,4 +35,11 @@
     protected readonly IGroup portRectangles;
 
+    protected INodeVisualProperties VisualProperties {
+      get { return (INodeVisualProperties)networkItem.VisualProperties; }
+      set {
+        if (networkItem.VisualProperties == value) return;
+        networkItem.VisualProperties = value;
+      }
+    }
     protected bool IgnoreVisualPropertiesChanges { get; set; }
 
@@ -48,6 +57,25 @@
     }
 
+    public override Brush Brush {
+      get { return base.Brush; }
+      set {
+        if (base.Brush == value) return;
+        base.Brush = value;
+        SaveVisualProperties();
+      }
+    }
+
+    public override Pen Pen {
+      get { return base.Pen; }
+      set {
+        if (base.Pen == value) return;
+        base.Pen = value;
+        SaveVisualProperties();
+      }
+    }
+
     public NodeRectangle(IChart chart, INode node)
       : base(chart, PointD.Empty, PointD.Empty) {
+      bool adjustSize = node.VisualProperties == null;
       NetworkItem = node;
 
@@ -59,11 +87,13 @@
       }
       portRectangles.RedrawRequired += (sender, args) => OnRedrawRequired();
+
+      if (adjustSize) AdjustSize();
     }
 
     protected virtual void RegisterNetworkItemEvents() {
+      if (VisualProperties != null) {
+        VisualProperties.Changed += VisualProperties_Changed;
+      }
       networkItem.NameChanged += NetworkItem_NameChanged;
-      if (networkItem.VisualProperties != null) {
-        networkItem.VisualProperties.Changed += VisualProperties_Changed;
-      }
       if (networkItem.Ports != null) {
         networkItem.Ports.ItemsAdded += Ports_ItemsAdded;
@@ -73,8 +103,8 @@
 
     protected virtual void DeregisterNetworkItemEvents() {
+      if (VisualProperties != null) {
+        VisualProperties.Changed -= VisualProperties_Changed;
+      }
       networkItem.NameChanged -= NetworkItem_NameChanged;
-      if (networkItem.VisualProperties != null) {
-        networkItem.VisualProperties.Changed -= VisualProperties_Changed;
-      }
       if (networkItem.Ports != null) {
         networkItem.Ports.ItemsAdded -= Ports_ItemsAdded;
@@ -90,11 +120,86 @@
 
     public override void Draw(Graphics graphics) {
-      base.Draw(graphics);
+      int cornerRadius = (int)Math.Round(6 * Chart.WorldToPixelRatio.Width);
+      var point = Chart.TransformWorldToPixel(new PointD(LowerLeft.X, LowerLeft.Y + Size.Height));
+      var size = Chart.TransformWorldToPixel(Size);
+      var bounds = new System.Drawing.Rectangle(point.X, point.Y, size.Width, size.Height);
+      var arc = new System.Drawing.Rectangle(point, new Size(cornerRadius * 2, cornerRadius * 2));
+
+      using (var path = new GraphicsPath()) {
+        path.AddArc(arc, 180f, 90f);
+        arc.X = bounds.Right - cornerRadius * 2;
+        path.AddArc(arc, 270f, 90);
+        arc.Y = bounds.Bottom - cornerRadius * 2;
+        path.AddArc(arc, 0f, 90f);
+        arc.X = bounds.Left;
+        path.AddArc(arc, 90f, 90f);
+        path.CloseFigure();
+
+        graphics.FillPath(Brush, path);
+        graphics.DrawPath(Pen, path);
+      }
 
       var p = Chart.TransformWorldToPixel(new PointD(LowerLeft.X, LowerLeft.Y + Size.Height));
 
       if (networkItem != null) {
-        using (var font = new Font(FontFamily.GenericSansSerif, (float)Math.Round(8.25 * Chart.WorldToPixelRatio.Width))) {
-          graphics.DrawString(networkItem.Name, font, Brushes.Black, p.X + 5, p.Y + 5);
+        using (var headerFont = new Font(FontFamily.GenericSansSerif, (float)Math.Round(8.25 * Chart.WorldToPixelRatio.Width), FontStyle.Bold))
+        using (var contentFont = new Font(FontFamily.GenericSansSerif, (float)Math.Round(8.25 * Chart.WorldToPixelRatio.Width))) {
+          int margin = 4, x, y, lastY;
+
+          x = p.X + (int)Math.Round(margin * Chart.WorldToPixelRatio.Width);
+          y = p.Y + (int)Math.Round(margin * Chart.WorldToPixelRatio.Height);
+
+          var imageSize = networkItem.ItemImage.Size;
+          float imageWidth = (float)Math.Round(imageSize.Width * Chart.WorldToPixelRatio.Width);
+          float imageHeight = (float)Math.Round(imageSize.Height * Chart.WorldToPixelRatio.Height);
+          graphics.DrawImage(networkItem.ItemImage, x, y, imageWidth, imageHeight);
+          lastY = y;
+
+          var textSize = graphics.MeasureString(networkItem.Name, headerFont);
+          x += (int)Math.Round((imageSize.Width + margin) * Chart.WorldToPixelRatio.Width);
+          y += (int)Math.Round((imageSize.Height - textSize.Height * Chart.PixelToWorldRatio.Height) / 2 * Chart.WorldToPixelRatio.Height);
+          graphics.DrawString(networkItem.Name, headerFont, Brushes.Black, x, y);
+          y = lastY + (int)Math.Round(imageSize.Height * Chart.WorldToPixelRatio.Height);
+
+          x = p.X;
+          y += (int)Math.Round(margin * Chart.WorldToPixelRatio.Height);
+          graphics.DrawLine(Pen, x, y, x + size.Width, y);
+
+          foreach (var port in networkItem.Ports) {
+            x = p.X + (int)Math.Round(margin * Chart.WorldToPixelRatio.Width);
+            y += (int)Math.Round(margin * Chart.WorldToPixelRatio.Height);
+
+            imageSize = port.ItemImage.Size;
+            imageWidth = (float)Math.Round(imageSize.Width * Chart.WorldToPixelRatio.Width);
+            imageHeight = (float)Math.Round(imageSize.Height * Chart.WorldToPixelRatio.Height);
+            graphics.DrawImage(port.ItemImage, x, y, imageWidth, imageHeight);
+            lastY = y;
+
+            textSize = graphics.MeasureString(port.Name, contentFont);
+            x += (int)Math.Round((imageSize.Width + margin) * Chart.WorldToPixelRatio.Width);
+            y += (int)Math.Round((imageSize.Height - textSize.Height * Chart.PixelToWorldRatio.Height) / 2 * Chart.WorldToPixelRatio.Height);
+            graphics.DrawString(port.Name, contentFont, Brushes.Black, x, y);
+            y = lastY + (int)Math.Round(imageSize.Height * Chart.WorldToPixelRatio.Height);
+
+            var parameterizedPort = port as IParameterizedPort;
+            if (parameterizedPort != null) {
+              foreach (var param in parameterizedPort.Parameters) {
+                x = p.X + (int)Math.Round(4 * margin * Chart.WorldToPixelRatio.Width);
+                y += (int)Math.Round(margin * Chart.WorldToPixelRatio.Height);
+
+                imageSize = param.ItemImage.Size;
+                imageWidth = (float)Math.Round(imageSize.Width * Chart.WorldToPixelRatio.Width);
+                imageHeight = (float)Math.Round(imageSize.Height * Chart.WorldToPixelRatio.Height);
+                graphics.DrawImage(param.ItemImage, x, y, imageWidth, imageHeight);
+                lastY = y;
+
+                textSize = graphics.MeasureString(param.Name, contentFont);
+                x += (int)Math.Round((imageSize.Width + margin) * Chart.WorldToPixelRatio.Width);
+                y += (int)Math.Round((imageSize.Height - textSize.Height * Chart.PixelToWorldRatio.Height) / 2 * Chart.WorldToPixelRatio.Height);
+                graphics.DrawString(param.Name, contentFont, Brushes.Black, x, y);
+                y = lastY + (int)Math.Round(imageSize.Height * Chart.WorldToPixelRatio.Height);
+              }
+            }
+          }
         }
       }
@@ -128,4 +233,6 @@
 
     private void Ports_ItemsAdded(object sender, Collections.CollectionItemsChangedEventArgs<IPort> e) {
+      AdjustSize();
+
       foreach (var port in e.Items) {
         var portRectangle = PrimitiveAttribute.CreateDefaultPrimitive(port.GetType(), Chart, port, networkItem);
@@ -133,9 +240,9 @@
         portRectangles.Add(portRectangle);
       }
-
-      OnRedrawRequired();
     }
 
     private void Ports_ItemsRemoved(object sender, Collections.CollectionItemsChangedEventArgs<IPort> e) {
+      AdjustSize();
+
       foreach (var port in e.Items) {
         var portRectangle = port2primitive[port];
@@ -143,37 +250,64 @@
         portRectangles.Remove(portRectangle);
       }
-
-      OnRedrawRequired();
     }
     #endregion
 
     #region Helpers
-    private INodeVisualProperties CreateDefaultVisualProperties() {
-      var offset = Chart.UpperRight - Chart.LowerLeft;
-      var center = new PointD(Chart.LowerLeft.X + offset.DX * 0.5, Chart.LowerLeft.Y + offset.DY * 0.5);
-      var size = Chart.TransformPixelToWorld(new Size(200, 100));
-      var lowerLeft = center - new Offset(size.Width * 0.5, size.Height * 0.5);
-      var upperRight = center + new Offset(size.Width * 0.5, size.Height * 0.5);
-      return new NodeVisualProperties(new Point2D<double>(lowerLeft.X, lowerLeft.Y), new Point2D<double>(upperRight.X, upperRight.Y));
-    }
-
     private void LoadVisualProperties() {
-      if (networkItem.VisualProperties == null)
-        networkItem.VisualProperties = CreateDefaultVisualProperties();
-
-      var vp = (INodeVisualProperties)networkItem.VisualProperties;
-      SetPosition(new PointD(vp.LowerLeft.X, vp.LowerLeft.Y), new PointD(vp.UpperRight.X, vp.UpperRight.Y));
+      if (VisualProperties == null)
+        VisualProperties = new NodeVisualProperties();
+
+      var vp = VisualProperties;
+      IgnoreVisualPropertiesChanges = true;
+      try {
+        SetPosition(new PointD(vp.LowerLeft.X, vp.LowerLeft.Y), new PointD(vp.UpperRight.X, vp.UpperRight.Y));
+        Brush = new SolidBrush(vp.BrushColor);
+        Pen = new Pen(vp.PenColor);
+      } finally { IgnoreVisualPropertiesChanges = false; }
     }
 
     private void SaveVisualProperties() {
-      if (networkItem == null) return;
-
-      var vp = (INodeVisualProperties)networkItem.VisualProperties;
-
+      if (networkItem == null || IgnoreVisualPropertiesChanges) return;
+
+      var vp = VisualProperties;
       IgnoreVisualPropertiesChanges = true;
       try {
         vp.LowerLeft = new Point2D<double>(LowerLeft.X, LowerLeft.Y);
         vp.UpperRight = new Point2D<double>(UpperRight.X, UpperRight.Y);
+        vp.BrushColor = ((SolidBrush)Brush).Color;
+        vp.PenColor = Pen.Color;
       } finally { IgnoreVisualPropertiesChanges = false; }
+    }
+
+    private void AdjustSize() {
+      if (networkItem == null) return;
+
+      var p = Chart.TransformWorldToPixel(new PointD(LowerLeft.X, LowerLeft.Y + Size.Height));
+      int margin = 4, x = p.X, y = p.Y;
+      using (var headerFont = new Font(FontFamily.GenericSansSerif, (float)Math.Round(8.25), FontStyle.Bold))
+      using (var contentFont = new Font(FontFamily.GenericSansSerif, (float)Math.Round(8.25))) {
+        x += 2 * margin; y += 2 * margin;
+        int headerWidth = networkItem.ItemImage.Width + margin + TextRenderer.MeasureText(networkItem.Name, headerFont).Width;
+        y += networkItem.ItemImage.Height + margin;
+        int maxPortWidth = 0, maxPortParamWidth = 0;
+        foreach (var port in networkItem.Ports) {
+          int portWidth = port.ItemImage.Width + margin + TextRenderer.MeasureText(port.Name, contentFont).Width;
+          if (portWidth > maxPortWidth) maxPortWidth = portWidth;
+          y += margin + port.ItemImage.Height;
+          var parameterizedPort = port as IParameterizedPort;
+          if (parameterizedPort != null) {
+            foreach (var param in parameterizedPort.Parameters) {
+              int portParamWidth = param.ItemImage.Width + 3 * margin + TextRenderer.MeasureText(param.Name, contentFont).Width;
+              if (portParamWidth > maxPortParamWidth) maxPortParamWidth = portParamWidth;
+              y += margin + param.ItemImage.Height;
+            }
+          }
+        }
+
+        x += Math.Max(headerWidth, Math.Max(maxPortWidth, maxPortParamWidth));
+        var ll = Chart.TransformPixelToWorld(new Point(p.X, y));
+        var ur = Chart.TransformPixelToWorld(new Point(x, p.Y));
+        SetPosition(ll, ur);
+      }
     }
     #endregion
Index: /branches/OptimizationNetworks/HeuristicLab.Networks.Views.NetworkVisualization/3.3/Primitives/PortRectangle.cs
===================================================================
--- /branches/OptimizationNetworks/HeuristicLab.Networks.Views.NetworkVisualization/3.3/Primitives/PortRectangle.cs	(revision 13798)
+++ /branches/OptimizationNetworks/HeuristicLab.Networks.Views.NetworkVisualization/3.3/Primitives/PortRectangle.cs	(revision 13799)
@@ -35,4 +35,11 @@
     protected readonly INodeVisualProperties nodeVisualProperties;
 
+    protected IPortVisualProperties VisualProperties {
+      get { return (IPortVisualProperties)networkItem.VisualProperties; }
+      set {
+        if (networkItem.VisualProperties == value) return;
+        networkItem.VisualProperties = value;
+      }
+    }
     protected bool IgnoreVisualPropertiesChanges { get; set; }
 
@@ -57,6 +64,24 @@
     }
 
+    public override Brush Brush {
+      get { return base.Brush; }
+      set {
+        if (base.Brush == value) return;
+        base.Brush = value;
+        SaveVisualProperties();
+      }
+    }
+
+    public override Pen Pen {
+      get { return base.Pen; }
+      set {
+        if (base.Pen == value) return;
+        base.Pen = value;
+        SaveVisualProperties();
+      }
+    }
+
     public PortRectangle(IChart chart, IPort port, INode node)
-      : base(chart, PointD.Empty, Size.Empty, Pens.Black, Brushes.Red) {
+      : base(chart, PointD.Empty, Size.Empty) {
       nodeVisualProperties = (INodeVisualProperties)node.VisualProperties;
       nodeVisualProperties.Changed += NodeVisualProperties_Changed;
@@ -65,8 +90,8 @@
 
     protected virtual void RegisterNetworkItemEvents() {
+      if (VisualProperties != null) {
+        VisualProperties.Changed += VisualProperties_Changed;
+      }
       networkItem.NameChanged += NetworkItem_NameChanged;
-      if (networkItem.VisualProperties != null) {
-        networkItem.VisualProperties.Changed += VisualProperties_Changed;
-      }
       var connectablePort = networkItem as IConnectablePort;
       if (connectablePort != null) {
@@ -76,8 +101,8 @@
 
     protected virtual void DeregisterNetworkItemEvents() {
+      if (VisualProperties != null) {
+        VisualProperties.Changed -= VisualProperties_Changed;
+      }
       networkItem.NameChanged -= NetworkItem_NameChanged;
-      if (networkItem.VisualProperties != null) {
-        networkItem.VisualProperties.Changed -= VisualProperties_Changed;
-      }
       var connectablePort = networkItem as IConnectablePort;
       if (connectablePort != null) {
@@ -97,8 +122,8 @@
       var p = Chart.TransformWorldToPixel(Point);
 
-      if (networkItem != null && networkItem.VisualProperties != null) {
+      if (networkItem != null && VisualProperties != null) {
         using (var font = new Font(FontFamily.GenericSansSerif, (float)Math.Round(8.25 * Chart.WorldToPixelRatio.Width))) {
           var textSize = graphics.MeasureString(networkItem.Name, font);
-          var vp = (IPortVisualProperties)networkItem.VisualProperties;
+          var vp = VisualProperties;
           switch (vp.Orientation) {
             case Orientation.North: p = new Point((int)(p.X - textSize.Width / 2), (int)(p.Y - Size.Height - textSize.Height)); break;
@@ -179,45 +204,44 @@
 
     #region Helpers
-
-    private IPortVisualProperties CreateDefaultVisualProperties() {
-      return new PortVisualProperties(Orientation.South, 0.5);
-    }
-
     private void LoadVisualProperties() {
-      if (networkItem.VisualProperties == null)
-        networkItem.VisualProperties = CreateDefaultVisualProperties();
-
-      var vp = (IPortVisualProperties)networkItem.VisualProperties;
-      var p = PointD.Empty;
-      double nodeWidth = nodeVisualProperties.UpperRight.X - nodeVisualProperties.LowerLeft.X;
-      double nodeHeight = nodeVisualProperties.UpperRight.Y - nodeVisualProperties.LowerLeft.Y;
-
-      switch (vp.Orientation) {
-        case Orientation.North:
-          p.X = nodeVisualProperties.LowerLeft.X + vp.Offset * nodeWidth;
-          p.Y = nodeVisualProperties.UpperRight.Y;
-          break;
-        case Orientation.East:
-          p.X = nodeVisualProperties.UpperRight.X;
-          p.Y = nodeVisualProperties.UpperRight.Y - vp.Offset * nodeHeight;
-          break;
-        case Orientation.South:
-          p.X = nodeVisualProperties.UpperRight.X - vp.Offset * nodeWidth;
-          p.Y = nodeVisualProperties.LowerLeft.Y;
-          break;
-        case Orientation.West:
-          p.X = nodeVisualProperties.LowerLeft.X;
-          p.Y = nodeVisualProperties.LowerLeft.Y + vp.Offset * nodeHeight;
-          break;
-      }
-
-      SetPosition(p);
+      if (VisualProperties == null)
+        VisualProperties = new PortVisualProperties();
+
+      var vp = VisualProperties;
+      IgnoreVisualPropertiesChanges = true;
+      try {
+        var p = PointD.Empty;
+        double nodeWidth = nodeVisualProperties.UpperRight.X - nodeVisualProperties.LowerLeft.X;
+        double nodeHeight = nodeVisualProperties.UpperRight.Y - nodeVisualProperties.LowerLeft.Y;
+
+        switch (vp.Orientation) {
+          case Orientation.North:
+            p.X = nodeVisualProperties.LowerLeft.X + vp.Offset * nodeWidth;
+            p.Y = nodeVisualProperties.UpperRight.Y;
+            break;
+          case Orientation.East:
+            p.X = nodeVisualProperties.UpperRight.X;
+            p.Y = nodeVisualProperties.UpperRight.Y - vp.Offset * nodeHeight;
+            break;
+          case Orientation.South:
+            p.X = nodeVisualProperties.UpperRight.X - vp.Offset * nodeWidth;
+            p.Y = nodeVisualProperties.LowerLeft.Y;
+            break;
+          case Orientation.West:
+            p.X = nodeVisualProperties.LowerLeft.X;
+            p.Y = nodeVisualProperties.LowerLeft.Y + vp.Offset * nodeHeight;
+            break;
+        }
+
+        SetPosition(p);
+        Brush = new SolidBrush(vp.BrushColor);
+        Pen = new Pen(vp.PenColor);
+      } finally { IgnoreVisualPropertiesChanges = false; }
     }
 
     private void SaveVisualProperties() {
-      if (networkItem == null) return;
-
-      var vp = (IPortVisualProperties)networkItem.VisualProperties;
-
+      if (networkItem == null || IgnoreVisualPropertiesChanges) return;
+
+      var vp = VisualProperties;
       IgnoreVisualPropertiesChanges = true;
       try {
@@ -245,7 +269,8 @@
           }
         }
-      } finally {
-        IgnoreVisualPropertiesChanges = false;
-      }
+
+        vp.BrushColor = ((SolidBrush)Brush).Color;
+        vp.PenColor = Pen.Color;
+      } finally { IgnoreVisualPropertiesChanges = false; }
     }
 
Index: /branches/OptimizationNetworks/HeuristicLab.Networks/3.3/AlgorithmNode.cs
===================================================================
--- /branches/OptimizationNetworks/HeuristicLab.Networks/3.3/AlgorithmNode.cs	(revision 13798)
+++ /branches/OptimizationNetworks/HeuristicLab.Networks/3.3/AlgorithmNode.cs	(revision 13799)
@@ -59,4 +59,10 @@
     }
 
+    [Storable]
+    private IItemCollection<IAlgorithm> startedAlgorithms;
+    public IItemCollection<IAlgorithm> StartedAlgorithms {
+      get { return startedAlgorithms; }
+    }
+
     [StorableConstructor]
     protected AlgorithmNode(bool deserializing) : base(deserializing) { }
@@ -65,20 +71,43 @@
       algorithm = cloner.Clone(original.algorithm);
       runs = cloner.Clone(original.runs);
+      startedAlgorithms = cloner.Clone(original.startedAlgorithms);
+      RegisterStartedAlgorithmsEvents();
     }
     public AlgorithmNode()
       : base("AlgorithmNode") {
       runs = new RunCollection();
-    }
+      startedAlgorithms = new ItemCollection<IAlgorithm>();
+      RegisterStartedAlgorithmsEvents();
+    }
+
     public AlgorithmNode(string name)
       : base(name) {
       runs = new RunCollection();
+      startedAlgorithms = new ItemCollection<IAlgorithm>();
+      RegisterStartedAlgorithmsEvents();
     }
     public AlgorithmNode(string name, string description)
       : base(name, description) {
       runs = new RunCollection();
+      startedAlgorithms = new ItemCollection<IAlgorithm>();
+      RegisterStartedAlgorithmsEvents();
     }
 
     public override IDeepCloneable Clone(Cloner cloner) {
       return new AlgorithmNode(this, cloner);
+    }
+
+    [StorableHook(HookType.AfterDeserialization)]
+    private void AfterDeserialization() {
+      RegisterStartedAlgorithmsEvents();
+    }
+
+    protected virtual void RegisterStartedAlgorithmsEvents() {
+      startedAlgorithms.ItemsAdded += StartedAlgorithms_ItemsChanged;
+      startedAlgorithms.ItemsRemoved += StartedAlgorithms_ItemsChanged;
+    }
+
+    private void StartedAlgorithms_ItemsChanged(object sender, Collections.CollectionItemsChangedEventArgs<IAlgorithm> e) {
+      OnStartedAlgorithmsChanged();
     }
 
@@ -146,6 +175,6 @@
         algorithm.Prepare(true);
         algorithm.ExceptionOccurred += (sender, args) => { exception = args.Value; };
-        algorithm.Started += (sender, args) => { started.Set(); };
-        algorithm.Stopped += (sender, args) => { stopped.Set(); };
+        algorithm.Started += (sender, args) => { started.Set(); startedAlgorithms.Add((IAlgorithm)sender); };
+        algorithm.Stopped += (sender, args) => { stopped.Set(); startedAlgorithms.Remove((IAlgorithm)sender); };
         algorithm.Start();
         stopped.WaitOne();
@@ -175,4 +204,10 @@
     }
 
+    public event EventHandler StartedAlgorithmsChanged;
+    protected virtual void OnStartedAlgorithmsChanged() {
+      var handler = StartedAlgorithmsChanged;
+      if (handler != null) handler(this, EventArgs.Empty);
+    }
+
     #region Ports Events
     protected override void RegisterPortsEvents() {
Index: /branches/OptimizationNetworks/HeuristicLab.Networks/3.3/IAlgorithmNode.cs
===================================================================
--- /branches/OptimizationNetworks/HeuristicLab.Networks/3.3/IAlgorithmNode.cs	(revision 13798)
+++ /branches/OptimizationNetworks/HeuristicLab.Networks/3.3/IAlgorithmNode.cs	(revision 13799)
@@ -20,7 +20,8 @@
 #endregion
 
+using System;
+using HeuristicLab.Core;
 using HeuristicLab.Core.Networks;
 using HeuristicLab.Optimization;
-using System;
 
 namespace HeuristicLab.Networks {
@@ -29,6 +30,8 @@
     IAlgorithm Algorithm { get; set; }
     RunCollection Runs { get; }
+    IItemCollection<IAlgorithm> StartedAlgorithms { get; }
 
     event EventHandler AlgorithmChanged;
+    event EventHandler StartedAlgorithmsChanged;
   }
 }
