Index: trunk/sources/HeuristicLab.Operators.Views.GraphVisualization/3.3/GraphVisualizationInfoView.Designer.cs
===================================================================
--- trunk/sources/HeuristicLab.Operators.Views.GraphVisualization/3.3/GraphVisualizationInfoView.Designer.cs	(revision 3431)
+++ 	(revision )
@@ -1,67 +1,0 @@
-﻿namespace HeuristicLab.Operators.Views.GraphVisualization {
-  partial class GraphVisualizationInfoView {
-    /// <summary> 
-    /// Required designer variable.
-    /// </summary>
-    private System.ComponentModel.IContainer components = null;
-
-    /// <summary> 
-    /// Clean up any resources being used.
-    /// </summary>
-    /// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
-    protected override void Dispose(bool disposing) {
-      if (disposing && (components != null)) {
-        components.Dispose();
-      }
-      base.Dispose(disposing);
-    }
-
-    #region Component Designer generated code
-
-    /// <summary> 
-    /// Required method for Designer support - do not modify 
-    /// the contents of this method with the code editor.
-    /// </summary>
-    private void InitializeComponent() {
-      this.components = new System.ComponentModel.Container();
-      this.graphVisualization = new HeuristicLab.Netron.NetronVisualization();
-      ((System.ComponentModel.ISupportInitialize)(this.graphVisualization)).BeginInit();
-      this.SuspendLayout();
-      // 
-      // graphVisualization
-      // 
-      this.graphVisualization.AllowDrop = false;
-      this.graphVisualization.AutoScroll = true;
-      this.graphVisualization.BackColor = System.Drawing.Color.DarkGray;
-      this.graphVisualization.BackgroundType = global::Netron.Diagramming.Core.CanvasBackgroundTypes.FlatColor;
-      this.graphVisualization.Dock = System.Windows.Forms.DockStyle.Fill;
-      this.graphVisualization.EnableAddConnection = true;
-      this.graphVisualization.FileName = "";
-      this.graphVisualization.Location = new System.Drawing.Point(0, 0);
-      this.graphVisualization.Magnification = new System.Drawing.SizeF(80F, 80F);
-      this.graphVisualization.Name = "graphVisualization";
-      this.graphVisualization.Origin = new System.Drawing.Point(0, 0);
-      this.graphVisualization.PageSize = new System.Drawing.Size(100000, 100000);
-      this.graphVisualization.ShowConnectors = true;
-      this.graphVisualization.ShowRulers = false;
-      this.graphVisualization.Size = new System.Drawing.Size(665, 444);
-      this.graphVisualization.TabIndex = 0;
-      this.graphVisualization.OnEntityRemoved += new System.EventHandler<global::Netron.Diagramming.Core.EntityEventArgs>(this.graphVisualization_OnEntityRemoved);
-      this.graphVisualization.OnEntityAdded += new System.EventHandler<global::Netron.Diagramming.Core.EntityEventArgs>(this.graphVisualization_OnEntityAdded);
-     
-      // 
-      // GraphVisualizationInfoView
-      // 
-      this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
-      this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
-      this.Controls.Add(this.graphVisualization);
-      this.Name = "GraphVisualizationInfoView";
-      this.Size = new System.Drawing.Size(665, 444);
-      ((System.ComponentModel.ISupportInitialize)(this.graphVisualization)).EndInit();
-      this.ResumeLayout(false);
-    }
-    #endregion
-
-    private HeuristicLab.Netron.NetronVisualization graphVisualization;
-  }
-}
Index: trunk/sources/HeuristicLab.Operators.Views.GraphVisualization/3.3/GraphVisualizationInfoView.cs
===================================================================
--- trunk/sources/HeuristicLab.Operators.Views.GraphVisualization/3.3/GraphVisualizationInfoView.cs	(revision 3431)
+++ 	(revision )
@@ -1,398 +1,0 @@
-﻿#region License Information
-/* HeuristicLab
- * Copyright (C) 2002-2010 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
- *
- * This file is part of HeuristicLab.
- *
- * HeuristicLab is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * HeuristicLab is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with HeuristicLab. If not, see <http://www.gnu.org/licenses/>.
- */
-#endregion
-
-using System;
-using System.Collections.Generic;
-using System.ComponentModel;
-using System.Drawing;
-using System.Data;
-using System.Linq;
-using System.Text;
-using System.Windows.Forms;
-using HeuristicLab.MainForm;
-using HeuristicLab.Common;
-using HeuristicLab.Core;
-using HeuristicLab.Core.Views;
-using Netron.Diagramming.Core;
-using HeuristicLab.Parameters;
-using HeuristicLab.MainForm.WindowsForms;
-using HeuristicLab.Collections;
-using System.Diagnostics;
-using System.Threading;
-
-namespace HeuristicLab.Operators.Views.GraphVisualization {
-  [View("GraphVisualizationInfo View")]
-  [Content(typeof(GraphVisualizationInfo), false)]
-  public partial class GraphVisualizationInfoView : ContentView {
-    private BidirectionalLookup<IOperatorShapeInfo, IShape> shapeInfoShapeMapping;
-    private BidirectionalLookup<IOperatorShapeInfo, INotifyObservableDictionaryItemsChanged<string, IOperatorShapeInfo>> shapeInfoConnectionsMapping;
-    private BidirectionalLookup<IConnection, KeyValuePair<IConnector, IConnector>> connectionConnectorsMapping;
-
-    private bool causedUpdateOfShapeInfo;
-    public GraphVisualizationInfoView() {
-      InitializeComponent();
-      this.causedUpdateOfShapeInfo = false;
-      this.shapeInfoShapeMapping = new BidirectionalLookup<IOperatorShapeInfo, IShape>();
-      this.shapeInfoConnectionsMapping = new BidirectionalLookup<IOperatorShapeInfo, INotifyObservableDictionaryItemsChanged<string, IOperatorShapeInfo>>();
-      this.connectionConnectorsMapping = new BidirectionalLookup<IConnection, KeyValuePair<IConnector, IConnector>>();
-    }
-
-    public GraphVisualizationInfoView(GraphVisualizationInfo content)
-      : this() {
-      this.Content = content;
-    }
-
-    public IController Controller {
-      get { return this.graphVisualization.Controller; }
-    }
-
-    public new GraphVisualizationInfo Content {
-      get { return (GraphVisualizationInfo)base.Content; }
-      set { base.Content = value; }
-    }
-
-    protected override void OnContentChanged() {
-      base.OnContentChanged();
-      this.UpdateContent();
-    }
-
-    protected override void OnReadOnlyChanged() {
-      base.OnReadOnlyChanged();
-      this.SetEnabledStateOfControls();
-    }
-
-    private void SetEnabledStateOfControls() {
-      DeleteTool deleteTool = (DeleteTool) this.Controller.Tools.Where( t => t.Name == ControllerBase.DeleteToolName).FirstOrDefault();
-      HeuristicLab.Netron.Controller controller = this.Controller as HeuristicLab.Netron.Controller;
-      if (Content == null && deleteTool != null && controller != null)
-        controller.RemoveTool(deleteTool); 
-      else {
-        if (ReadOnly && deleteTool != null && controller != null)
-          controller.RemoveTool(deleteTool);
-        else if (!ReadOnly && deleteTool == null)
-          this.Controller.AddTool(new DeleteTool(ControllerBase.DeleteToolName));
-      }
-    }
-
-    private void UpdateContent() {
-      foreach (IOperatorShapeInfo shapeInfo in this.shapeInfoShapeMapping.FirstValues)
-        this.RemoveShapeInfo(shapeInfo);
-
-      this.shapeInfoShapeMapping.Clear();
-      this.shapeInfoConnectionsMapping.Clear();
-      this.connectionConnectorsMapping.Clear();
-
-      if (Content != null) {
-        foreach (IOperatorShapeInfo shapeInfo in this.Content.OperatorShapeInfos)
-          if (!this.shapeInfoShapeMapping.ContainsFirst(shapeInfo))
-            this.AddShapeInfo(shapeInfo);
-
-        foreach (KeyValuePair<KeyValuePair<IOperatorShapeInfo, string>, IOperatorShapeInfo> connection in this.Content.Connections)
-          this.AddConnection(connection.Key.Key, connection.Key.Value, connection.Value);
-
-        this.UpdateLayoutRoot();
-      }
-      this.SetEnabledStateOfControls();
-    }
-
-    private void UpdateLayoutRoot() {
-      IOperatorShapeInfo shapeInfo = this.Content.InitialShape;
-      if (shapeInfo != null)
-        this.graphVisualization.Controller.Model.LayoutRoot = this.shapeInfoShapeMapping.GetByFirst(shapeInfo);
-      else
-        this.graphVisualization.Controller.Model.LayoutRoot = null;
-    }
-
-    private void VisualizationInfo_InitialShapeChanged(object sender, EventArgs e) {
-      this.UpdateLayoutRoot();
-    }
-
-    protected override void RegisterContentEvents() {
-      base.RegisterContentEvents();
-      this.Content.InitialShapeChanged += new EventHandler(VisualizationInfo_InitialShapeChanged);
-      this.Content.ObserveableShapeInfos.ItemsAdded += new HeuristicLab.Collections.CollectionItemsChangedEventHandler<IOperatorShapeInfo>(ShapeInfos_ItemsAdded);
-      this.Content.ObserveableShapeInfos.ItemsRemoved += new HeuristicLab.Collections.CollectionItemsChangedEventHandler<IOperatorShapeInfo>(ShapeInfos_ItemsRemoved);
-      this.Content.ObserveableShapeInfos.CollectionReset += new HeuristicLab.Collections.CollectionItemsChangedEventHandler<IOperatorShapeInfo>(ShapeInfos_CollectionReset);
-
-      this.Content.ObservableConnections.ItemsAdded += new CollectionItemsChangedEventHandler<KeyValuePair<KeyValuePair<IOperatorShapeInfo, string>, IOperatorShapeInfo>>(Connections_ItemsAdded);
-      this.Content.ObservableConnections.ItemsRemoved += new CollectionItemsChangedEventHandler<KeyValuePair<KeyValuePair<IOperatorShapeInfo, string>, IOperatorShapeInfo>>(Connections_ItemsRemoved);
-      this.Content.ObservableConnections.ItemsReplaced += new CollectionItemsChangedEventHandler<KeyValuePair<KeyValuePair<IOperatorShapeInfo, string>, IOperatorShapeInfo>>(Connections_ItemsReplaced);
-      this.Content.ObservableConnections.CollectionReset += new CollectionItemsChangedEventHandler<KeyValuePair<KeyValuePair<IOperatorShapeInfo, string>, IOperatorShapeInfo>>(Connections_CollectionReset);
-    }
-
-    protected override void DeregisterContentEvents() {
-      base.DeregisterContentEvents();
-      this.Content.InitialShapeChanged -= new EventHandler(VisualizationInfo_InitialShapeChanged);
-      this.Content.ObserveableShapeInfos.ItemsAdded -= new HeuristicLab.Collections.CollectionItemsChangedEventHandler<IOperatorShapeInfo>(ShapeInfos_ItemsAdded);
-      this.Content.ObserveableShapeInfos.ItemsRemoved -= new HeuristicLab.Collections.CollectionItemsChangedEventHandler<IOperatorShapeInfo>(ShapeInfos_ItemsRemoved);
-      this.Content.ObserveableShapeInfos.CollectionReset -= new HeuristicLab.Collections.CollectionItemsChangedEventHandler<IOperatorShapeInfo>(ShapeInfos_CollectionReset);
-
-      this.Content.ObservableConnections.ItemsAdded -= new CollectionItemsChangedEventHandler<KeyValuePair<KeyValuePair<IOperatorShapeInfo, string>, IOperatorShapeInfo>>(Connections_ItemsAdded);
-      this.Content.ObservableConnections.ItemsRemoved -= new CollectionItemsChangedEventHandler<KeyValuePair<KeyValuePair<IOperatorShapeInfo, string>, IOperatorShapeInfo>>(Connections_ItemsRemoved);
-      this.Content.ObservableConnections.ItemsReplaced -= new CollectionItemsChangedEventHandler<KeyValuePair<KeyValuePair<IOperatorShapeInfo, string>, IOperatorShapeInfo>>(Connections_ItemsReplaced);
-      this.Content.ObservableConnections.CollectionReset -= new CollectionItemsChangedEventHandler<KeyValuePair<KeyValuePair<IOperatorShapeInfo, string>, IOperatorShapeInfo>>(Connections_CollectionReset);
-    }
-
-    private void ShapeInfos_CollectionReset(object sender, HeuristicLab.Collections.CollectionItemsChangedEventArgs<IOperatorShapeInfo> e) {
-      foreach (IOperatorShapeInfo shapeInfo in e.OldItems)
-        this.RemoveShapeInfo(shapeInfo);
-      foreach (IOperatorShapeInfo shapeInfo in e.Items)
-        this.AddShapeInfo(shapeInfo);
-    }
-
-    private void ShapeInfos_ItemsAdded(object sender, HeuristicLab.Collections.CollectionItemsChangedEventArgs<IOperatorShapeInfo> e) {
-      foreach (IOperatorShapeInfo shapeInfo in e.Items)
-        this.AddShapeInfo(shapeInfo);
-    }
-
-    private void ShapeInfos_ItemsRemoved(object sender, HeuristicLab.Collections.CollectionItemsChangedEventArgs<IOperatorShapeInfo> e) {
-      foreach (IOperatorShapeInfo shapeInfo in e.Items)
-        this.RemoveShapeInfo(shapeInfo);
-    }
-
-    private void AddShapeInfo(IOperatorShapeInfo shapeInfo) {
-      this.RegisterShapeInfoEvents(shapeInfo);
-
-      IShape shape = shapeInfo.CreateShape();
-      shape.OnEntityChange += new EventHandler<EntityEventArgs>(shape_OnEntityChange);
-      shape.OnMouseEnter += new EventHandler<EntityMouseEventArgs>(shape_OnMouseEnter);
-      shape.OnMouseLeave += new EventHandler<EntityMouseEventArgs>(shape_OnMouseLeave);
-      this.shapeInfoShapeMapping.Add(shapeInfo, shape);
-
-      this.graphVisualization.Controller.Model.AddShape(shape);
-      this.graphVisualization.Invalidate();
-    }
-
-    private void RemoveShapeInfo(IOperatorShapeInfo shapeInfo) {
-      this.DeregisterShapeInfoEvents(shapeInfo);
-      IShape shape = this.shapeInfoShapeMapping.GetByFirst(shapeInfo);
-      shape.OnEntityChange -= new EventHandler<EntityEventArgs>(shape_OnEntityChange);
-      shape.OnMouseEnter -= new EventHandler<EntityMouseEventArgs>(shape_OnMouseEnter);
-      shape.OnMouseLeave -= new EventHandler<EntityMouseEventArgs>(shape_OnMouseLeave);
-
-      IConnection connection;
-      foreach (IConnector connector in shape.Connectors) {
-        connection = this.GetConnection(shapeInfo, connector.Name);
-        this.RemoveConnection(connection);
-      }
-
-      this.shapeInfoShapeMapping.RemoveByFirst(shapeInfo);
-      this.shapeInfoConnectionsMapping.RemoveByFirst(shapeInfo);
-
-      if (this.graphVisualization.Controller.Model.Shapes.Contains(shape)) {
-        this.graphVisualization.Controller.Model.RemoveShape(shape);
-      }
-      this.graphVisualization.Invalidate();
-    }
-
-    private void RegisterShapeInfoEvents(IShapeInfo shapeInfo) {
-      shapeInfo.Changed += new EventHandler(shapeInfo_Changed);
-    }
-
-    private void DeregisterShapeInfoEvents(IShapeInfo shapeInfo) {
-      shapeInfo.Changed -= new EventHandler(shapeInfo_Changed);
-    }
-
-    private void Connections_CollectionReset(object sender, CollectionItemsChangedEventArgs<KeyValuePair<KeyValuePair<IOperatorShapeInfo, string>, IOperatorShapeInfo>> e) {
-      IConnection connection;
-      foreach (KeyValuePair<KeyValuePair<IOperatorShapeInfo, string>, IOperatorShapeInfo> pair in e.Items) {
-        connection = this.GetConnection(pair.Key.Key, pair.Key.Value);
-        this.RemoveConnection(connection);
-      }
-      foreach (KeyValuePair<KeyValuePair<IOperatorShapeInfo, string>, IOperatorShapeInfo> pair in e.Items)
-        this.AddConnection(pair.Key.Key, pair.Key.Value, pair.Value);
-    }
-
-    private void Connections_ItemsReplaced(object sender, CollectionItemsChangedEventArgs<KeyValuePair<KeyValuePair<IOperatorShapeInfo, string>, IOperatorShapeInfo>> e) {
-      IConnection connection;
-      foreach (KeyValuePair<KeyValuePair<IOperatorShapeInfo, string>, IOperatorShapeInfo> pair in e.Items) {
-        connection = this.GetConnection(pair.Key.Key, pair.Key.Value);
-        this.RemoveConnection(connection);
-      }
-      foreach (KeyValuePair<KeyValuePair<IOperatorShapeInfo, string>, IOperatorShapeInfo> pair in e.Items)
-        this.AddConnection(pair.Key.Key, pair.Key.Value, pair.Value);
-    }
-
-    private void Connections_ItemsAdded(object sender, CollectionItemsChangedEventArgs<KeyValuePair<KeyValuePair<IOperatorShapeInfo, string>, IOperatorShapeInfo>> e) {
-      foreach (KeyValuePair<KeyValuePair<IOperatorShapeInfo, string>, IOperatorShapeInfo> pair in e.Items)
-        this.AddConnection(pair.Key.Key, pair.Key.Value, pair.Value);
-    }
-
-    private void Connections_ItemsRemoved(object sender, CollectionItemsChangedEventArgs<KeyValuePair<KeyValuePair<IOperatorShapeInfo, string>, IOperatorShapeInfo>> e) {
-      IConnection connection;
-      foreach (KeyValuePair<KeyValuePair<IOperatorShapeInfo, string>, IOperatorShapeInfo> pair in e.Items) {
-        connection = this.GetConnection(pair.Key.Key, pair.Key.Value);
-        this.RemoveConnection(connection);
-      }
-    }
-
-    private void AddConnection(IOperatorShapeInfo shapeInfoFrom, string connectorName, IOperatorShapeInfo shapeInfoTo) {
-      IShape shapeFrom = this.shapeInfoShapeMapping.GetByFirst(shapeInfoFrom);
-      IShape shapeTo = this.shapeInfoShapeMapping.GetByFirst(shapeInfoTo);
-
-      IConnector connectorFrom = shapeFrom.Connectors.Where(c => c.Name == connectorName).First();
-      IConnector connectorTo = shapeTo.Connectors.Where(c => c.Name == "Predecessor").FirstOrDefault();
-      KeyValuePair<IConnector, IConnector> connectorPair = new KeyValuePair<IConnector, IConnector>(connectorFrom, connectorTo);
-      if (!this.connectionConnectorsMapping.ContainsSecond(connectorPair)) {
-        IConnection connection = Factory.CreateConnection(connectorFrom, connectorTo);
-        this.connectionConnectorsMapping.Add(connection, connectorPair);
-        this.graphVisualization.Controller.Model.AddConnection(connection);
-        this.graphVisualization.Invalidate();
-      }
-    }
-
-    private IConnection GetConnection(IOperatorShapeInfo shapeInfoFrom, string connectorName) {
-      IShape shape = this.shapeInfoShapeMapping.GetByFirst(shapeInfoFrom);
-      IConnector connector = shape.Connectors.Where(c => c.Name == connectorName).First();
-
-      if (!this.connectionConnectorsMapping.SecondValues.Any(p => p.Key == connector))
-        return null;
-
-      KeyValuePair<IConnector, IConnector> connectorPair = this.connectionConnectorsMapping.SecondValues.Where(p => p.Key == connector).FirstOrDefault();
-      return this.connectionConnectorsMapping.GetBySecond(connectorPair);
-    }
-
-    private void ChangeConnection(IOperatorShapeInfo shapeInfoFrom, string connectorName, IOperatorShapeInfo shapeInfoTo) {
-      IConnection connection = this.GetConnection(shapeInfoFrom, connectorName);
-      IShape shapeTo = this.shapeInfoShapeMapping.GetByFirst(shapeInfoFrom);
-      IConnector connectorTo = shapeTo.Connectors.Where(c => c.Name == "Predecessor").First();
-
-      connection.To.DetachFromParent();
-      connection.To.AttachTo(connectorTo);
-      this.graphVisualization.Invalidate();
-    }
-
-    private void RemoveConnection(IConnection connection) {
-      if (connection == null)
-        return;
-
-      if (connection.From.AttachedTo != null)
-        connection.From.DetachFromParent();
-      if (connection.To.AttachedTo != null)
-        connection.To.DetachFromParent();
-
-      if (this.connectionConnectorsMapping.ContainsFirst(connection))
-        this.connectionConnectorsMapping.RemoveByFirst(connection);
-      if (this.graphVisualization.Controller.Model.Connections.Contains(connection))
-        this.graphVisualization.Controller.Model.Remove(connection);
-      this.graphVisualization.Invalidate();
-    }
-
-
-    private void shapeInfo_Changed(object sender, EventArgs e) {
-      if (this.causedUpdateOfShapeInfo)
-        return;
-
-      this.causedUpdateOfShapeInfo = true;
-      IOperatorShapeInfo shapeInfo = (IOperatorShapeInfo)sender;
-      IShape shape = this.shapeInfoShapeMapping.GetByFirst(shapeInfo);
-      shapeInfo.UpdateShape(shape);
-      shape.Invalidate();
-      this.causedUpdateOfShapeInfo = false;
-    }
-
-    private Cursor oldCursor;
-    private void shape_OnMouseEnter(object sender, EntityMouseEventArgs e) {
-      this.oldCursor = this.Cursor;
-      this.Controller.View.CurrentCursor = CursorPalette.Move;
-    }
-
-    private void shape_OnMouseLeave(object sender, EntityMouseEventArgs e) {
-      this.Controller.View.CurrentCursor = this.oldCursor;
-      this.oldCursor = null;
-    }
-
-    private void shape_OnEntityChange(object sender, EntityEventArgs e) {
-      if (this.causedUpdateOfShapeInfo)
-        return;
-
-      this.causedUpdateOfShapeInfo = true;
-      IShape shape = e.Entity as IShape;
-      IOperatorShapeInfo shapeInfo = this.shapeInfoShapeMapping.GetBySecond(shape);
-      shapeInfo.Location = shape.Location;
-
-      OperatorShape operatorShape = shape as OperatorShape;
-      if (operatorShape != null)
-        shapeInfo.Collapsed = operatorShape.Collapsed;
-
-      this.graphVisualization.Invalidate();
-      this.causedUpdateOfShapeInfo = false;
-    }
-
-    private void graphVisualization_OnEntityAdded(object sender, EntityEventArgs e) {
-      IConnection connection = e.Entity as IConnection;
-      if (connection != null && !this.connectionConnectorsMapping.ContainsFirst(connection)) {
-        IConnector connectorFrom = connection.From.AttachedTo;
-        IConnector connectorTo = connection.To.AttachedTo;
-        this.RemoveConnection(connection); //is added again by the model events
-
-        if (connectorFrom != null && connectorTo != null && connectorFrom.Name != "Predecessor") {
-          IShape shapeFrom = (IShape)connectorFrom.Parent;
-          IShape shapeTo = (IShape)connectorTo.Parent;
-          IOperatorShapeInfo shapeInfoFrom = this.shapeInfoShapeMapping.GetBySecond(shapeFrom);
-          IOperatorShapeInfo shapeInfoTo = this.shapeInfoShapeMapping.GetBySecond(shapeTo);
-          string connectorName = connectorFrom.Name;
-
-          if (shapeFrom != shapeTo) //avoid self references
-            this.Content.AddConnection(shapeInfoFrom, connectorName, shapeInfoTo);
-        }
-      }
-    }
-
-    private void graphVisualization_OnEntityRemoved(object sender, EntityEventArgs e) {
-      IShape shape = e.Entity as IShape;
-      if (shape != null && this.shapeInfoShapeMapping.ContainsSecond(shape)) {
-        IOperatorShapeInfo shapeInfo = this.shapeInfoShapeMapping.GetBySecond(shape);
-        this.Content.RemoveShapeInfo(shapeInfo);
-      }
-
-      IConnection connection = e.Entity as IConnection;
-      if (connection != null && this.connectionConnectorsMapping.ContainsFirst(connection)) {
-        IShape parentShape = (IShape)connection.From.AttachedTo.Parent;
-        IOperatorShapeInfo shapeInfo = this.shapeInfoShapeMapping.GetBySecond(parentShape);
-        string connectorName = connection.From.AttachedTo.Name;
-
-        this.Content.RemoveConnection(shapeInfo, connectorName);
-      }
-    }
-
-    internal void RelayoutGraph() {
-      if (this.shapeInfoShapeMapping.Count > 0
-        && this.connectionConnectorsMapping.Count > 0
-        && this.Content.InitialShape != null) { //otherwise the layout does not work
-        string layoutName = "Standard TreeLayout";
-        this.graphVisualization.Controller.RunActivity(layoutName);
-        this.graphVisualization.Invalidate();
-
-        //fix to avoid negative shape positions after layouting
-        Thread.Sleep(300);
-        int minX = this.graphVisualization.Controller.Model.Shapes.Min(s => s.Location.X);
-        int shiftX = minX < 0 ? Math.Abs(minX) + 50 : 0;
-        int minY = this.graphVisualization.Controller.Model.Shapes.Min(s => s.Location.Y);
-        int shiftY = minY < 0 ? Math.Abs(minY) + 50 : 0;
-        if (minX < 0 || minY < 0) {
-          foreach (IShape s in this.Controller.Model.Shapes)
-            s.MoveBy(new Point(shiftX, shiftY));
-        }
-      }
-    }
-  }
-}
Index: trunk/sources/HeuristicLab.Operators.Views.GraphVisualization/3.3/HeuristicLab.Operators.Views.GraphVisualization-3.3.csproj
===================================================================
--- trunk/sources/HeuristicLab.Operators.Views.GraphVisualization/3.3/HeuristicLab.Operators.Views.GraphVisualization-3.3.csproj	(revision 3431)
+++ trunk/sources/HeuristicLab.Operators.Views.GraphVisualization/3.3/HeuristicLab.Operators.Views.GraphVisualization-3.3.csproj	(revision 3437)
@@ -150,11 +150,11 @@
       <Name>Netron.Diagramming.Core-3.0.2672.12446</Name>
     </ProjectReference>
-    <ProjectReference Include="..\..\HeuristicLab.MainForm.WindowsForms\3.2\HeuristicLab.MainForm.WindowsForms-3.2.csproj">
+    <ProjectReference Include="..\..\HeuristicLab.MainForm.WindowsForms\3.3\HeuristicLab.MainForm.WindowsForms-3.3.csproj">
       <Project>{AB687BBE-1BFE-476B-906D-44237135431D}</Project>
-      <Name>HeuristicLab.MainForm.WindowsForms-3.2</Name>
-    </ProjectReference>
-    <ProjectReference Include="..\..\HeuristicLab.MainForm\3.2\HeuristicLab.MainForm-3.2.csproj">
+      <Name>HeuristicLab.MainForm.WindowsForms-3.3</Name>
+    </ProjectReference>
+    <ProjectReference Include="..\..\HeuristicLab.MainForm\3.3\HeuristicLab.MainForm-3.3.csproj">
       <Project>{3BD61258-31DA-4B09-89C0-4F71FEF5F05A}</Project>
-      <Name>HeuristicLab.MainForm-3.2</Name>
+      <Name>HeuristicLab.MainForm-3.3</Name>
     </ProjectReference>
     <ProjectReference Include="..\..\HeuristicLab.Operators.Views\3.3\HeuristicLab.Operators.Views-3.3.csproj">
Index: trunk/sources/HeuristicLab.Operators.Views.GraphVisualization/3.3/HeuristicLabOperatorsViewsGraphVisualizationPlugin.cs.frame
===================================================================
--- trunk/sources/HeuristicLab.Operators.Views.GraphVisualization/3.3/HeuristicLabOperatorsViewsGraphVisualizationPlugin.cs.frame	(revision 3431)
+++ trunk/sources/HeuristicLab.Operators.Views.GraphVisualization/3.3/HeuristicLabOperatorsViewsGraphVisualizationPlugin.cs.frame	(revision 3437)
@@ -35,6 +35,6 @@
   [PluginDependency("HeuristicLab.Core", "3.3")]
   [PluginDependency("HeuristicLab.Core.Views", "3.3")]
-  [PluginDependency("HeuristicLab.MainForm", "3.2")]
-  [PluginDependency("HeuristicLab.MainForm.WindowsForms", "3.2")]
+  [PluginDependency("HeuristicLab.MainForm", "3.3")]
+  [PluginDependency("HeuristicLab.MainForm.WindowsForms", "3.3")]
   [PluginDependency("HeuristicLab.Netron", "3.0")]
   [PluginDependency("HeuristicLab.Operators", "3.3")]
Index: trunk/sources/HeuristicLab.Operators.Views.GraphVisualization/3.3/OperatorGraphView.Designer.cs
===================================================================
--- trunk/sources/HeuristicLab.Operators.Views.GraphVisualization/3.3/OperatorGraphView.Designer.cs	(revision 3431)
+++ 	(revision )
@@ -1,267 +1,0 @@
-﻿namespace HeuristicLab.Operators.Views.GraphVisualization {
-  partial class OperatorGraphView {
-    /// <summary> 
-    /// Required designer variable.
-    /// </summary>
-    private System.ComponentModel.IContainer components = null;
-
-    /// <summary> 
-    /// Clean up any resources being used.
-    /// </summary>
-    /// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
-    protected override void Dispose(bool disposing) {
-      if (disposing && (components != null)) {
-        components.Dispose();
-      }
-      base.Dispose(disposing);
-    }
-
-    #region Component Designer generated code
-
-    /// <summary> 
-    /// Required method for Designer support - do not modify 
-    /// the contents of this method with the code editor.
-    /// </summary>
-    private void InitializeComponent() {
-      this.components = new System.ComponentModel.Container();
-      this.graphVisualizationInfoView = new HeuristicLab.Operators.Views.GraphVisualization.GraphVisualizationInfoView();
-      this.shapeContextMenu = new System.Windows.Forms.ContextMenuStrip(this.components);
-      this.openViewToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
-      this.initialToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
-      this.breakPointToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
-      this.splitContainer = new System.Windows.Forms.SplitContainer();
-      this.detailsGroupBox = new System.Windows.Forms.GroupBox();
-      this.detailsViewHost = new HeuristicLab.MainForm.WindowsForms.ViewHost();
-      this.selectButton = new System.Windows.Forms.Button();
-      this.panButton = new System.Windows.Forms.Button();
-      this.connectButton = new System.Windows.Forms.Button();
-      this.relayoutButton = new System.Windows.Forms.Button();
-      this.zoomAreaButton = new System.Windows.Forms.Button();
-      this.zoomInButton = new System.Windows.Forms.Button();
-      this.zoomOutButton = new System.Windows.Forms.Button();
-      this.screenshotButton = new System.Windows.Forms.Button();
-      this.buttonToolTip = new System.Windows.Forms.ToolTip();
-      this.shapeContextMenu.SuspendLayout();
-      this.splitContainer.Panel1.SuspendLayout();
-      this.splitContainer.Panel2.SuspendLayout();
-      this.splitContainer.SuspendLayout();
-      this.detailsGroupBox.SuspendLayout();
-      this.SuspendLayout();
-      // 
-      // graphVisualizationInfoView
-      // 
-      this.graphVisualizationInfoView.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.graphVisualizationInfoView.Caption = null;
-      this.graphVisualizationInfoView.Content = null;
-      this.graphVisualizationInfoView.Location = new System.Drawing.Point(3, 30);
-      this.graphVisualizationInfoView.Name = "graphVisualizationInfoView";
-      this.graphVisualizationInfoView.Size = new System.Drawing.Size(662, 248);
-      this.graphVisualizationInfoView.TabIndex = 0;
-      // 
-      // shapeContextMenu
-      // 
-      this.shapeContextMenu.Items.AddRange(new System.Windows.Forms.ToolStripItem[] {
-            this.openViewToolStripMenuItem,
-            this.initialToolStripMenuItem,
-            this.breakPointToolStripMenuItem});
-      this.shapeContextMenu.Name = "shapeContextMenu";
-      this.shapeContextMenu.Size = new System.Drawing.Size(154, 70);
-      this.shapeContextMenu.Opening += new System.ComponentModel.CancelEventHandler(this.shapeContextMenu_Opening);
-      // 
-      // openViewToolStripMenuItem
-      // 
-      this.openViewToolStripMenuItem.Name = "openViewToolStripMenuItem";
-      this.openViewToolStripMenuItem.Size = new System.Drawing.Size(153, 22);
-      this.openViewToolStripMenuItem.Text = "Open View";
-      this.openViewToolStripMenuItem.Click += new System.EventHandler(this.openViewToolStripMenuItem_Click);
-      // 
-      // initialToolStripMenuItem
-      // 
-      this.initialToolStripMenuItem.Name = "initialToolStripMenuItem";
-      this.initialToolStripMenuItem.Size = new System.Drawing.Size(153, 22);
-      this.initialToolStripMenuItem.Text = "Initial Operator";
-      this.initialToolStripMenuItem.Click += new System.EventHandler(this.initialOperatorToolStripMenuItem_Click);
-      // 
-      // breakPointToolStripMenuItem
-      // 
-      this.breakPointToolStripMenuItem.Name = "breakPointToolStripMenuItem";
-      this.breakPointToolStripMenuItem.Size = new System.Drawing.Size(153, 22);
-      this.breakPointToolStripMenuItem.Text = "Break Point";
-      this.breakPointToolStripMenuItem.Click += new System.EventHandler(this.breakPointToolStripMenuItem_Click);
-      // 
-      // splitContainer
-      // 
-      this.splitContainer.Dock = System.Windows.Forms.DockStyle.Fill;
-      this.splitContainer.Location = new System.Drawing.Point(0, 0);
-      this.splitContainer.Name = "splitContainer";
-      this.splitContainer.Orientation = System.Windows.Forms.Orientation.Horizontal;
-      // 
-      // splitContainer.Panel1
-      // 
-      this.splitContainer.Panel1.Controls.Add(this.screenshotButton);
-      this.splitContainer.Panel1.Controls.Add(this.zoomOutButton);
-      this.splitContainer.Panel1.Controls.Add(this.zoomInButton);
-      this.splitContainer.Panel1.Controls.Add(this.zoomAreaButton);
-      this.splitContainer.Panel1.Controls.Add(this.relayoutButton);
-      this.splitContainer.Panel1.Controls.Add(this.connectButton);
-      this.splitContainer.Panel1.Controls.Add(this.panButton);
-      this.splitContainer.Panel1.Controls.Add(this.selectButton);
-      this.splitContainer.Panel1.Controls.Add(this.graphVisualizationInfoView);
-      // 
-      // splitContainer.Panel2
-      // 
-      this.splitContainer.Panel2.Controls.Add(this.detailsGroupBox);
-      this.splitContainer.Size = new System.Drawing.Size(665, 444);
-      this.splitContainer.SplitterDistance = 279;
-      this.splitContainer.TabIndex = 1;
-      // 
-      // detailsGroupBox
-      // 
-      this.detailsGroupBox.Controls.Add(this.detailsViewHost);
-      this.detailsGroupBox.Dock = System.Windows.Forms.DockStyle.Fill;
-      this.detailsGroupBox.Location = new System.Drawing.Point(0, 0);
-      this.detailsGroupBox.Name = "detailsGroupBox";
-      this.detailsGroupBox.Size = new System.Drawing.Size(665, 161);
-      this.detailsGroupBox.TabIndex = 0;
-      this.detailsGroupBox.TabStop = false;
-      this.detailsGroupBox.Text = "Details";
-      // 
-      // detailsViewHost
-      // 
-      this.detailsViewHost.Content = null;
-      this.detailsViewHost.Dock = System.Windows.Forms.DockStyle.Fill;
-      this.detailsViewHost.Location = new System.Drawing.Point(3, 16);
-      this.detailsViewHost.Name = "detailsViewHost";
-      this.detailsViewHost.Size = new System.Drawing.Size(659, 142);
-      this.detailsViewHost.TabIndex = 0;
-      this.detailsViewHost.ViewType = null;
-      // 
-      // selectButton
-      // 
-      this.selectButton.Image = HeuristicLab.Common.Resources.VS2008ImageLibrary.Pointer;
-      this.selectButton.Location = new System.Drawing.Point(3, 3);
-      this.selectButton.Name = "selectButton";
-      this.selectButton.Size = new System.Drawing.Size(24, 24);
-      this.selectButton.TabIndex = 1;
-      this.selectButton.UseVisualStyleBackColor = true;
-      this.selectButton.Click += new System.EventHandler(selectButton_Click);
-      this.buttonToolTip.SetToolTip(this.selectButton, "Select Tool");
-      // 
-      // panButton
-      // 
-      this.panButton.Image = HeuristicLab.Common.Resources.VS2008ImageLibrary.Breakpoint;
-      this.panButton.Location = new System.Drawing.Point(33, 3);
-      this.panButton.Name = "panButton";
-      this.panButton.Size = new System.Drawing.Size(24, 24);
-      this.panButton.TabIndex = 2;
-      this.panButton.UseVisualStyleBackColor = true;
-      this.panButton.Click += new System.EventHandler(panButton_Click);
-      this.buttonToolTip.SetToolTip(this.panButton, "Pan Tool");
-      // 
-      // connectButton
-      // 
-      this.connectButton.Image = HeuristicLab.Common.Resources.VS2008ImageLibrary.Interface;
-      this.connectButton.Location = new System.Drawing.Point(63, 3);
-      this.connectButton.Name = "connectButton";
-      this.connectButton.Size = new System.Drawing.Size(24, 24);
-      this.connectButton.TabIndex = 3;
-      this.connectButton.UseVisualStyleBackColor = true;
-      this.connectButton.Click += new System.EventHandler(connectButton_Click);
-      this.buttonToolTip.SetToolTip(this.connectButton, "Connection Tool");
-      // 
-      // relayoutButton
-      // 
-      this.relayoutButton.Image = HeuristicLab.Common.Resources.VS2008ImageLibrary.RefreshDocument;
-      this.relayoutButton.Location = new System.Drawing.Point(123, 3);
-      this.relayoutButton.Name = "relayoutButton";
-      this.relayoutButton.Size = new System.Drawing.Size(24, 24);
-      this.relayoutButton.TabIndex = 4;
-      this.relayoutButton.UseVisualStyleBackColor = true;
-      this.relayoutButton.Click += new System.EventHandler(relayoutButton_Click);
-      this.buttonToolTip.SetToolTip(this.relayoutButton, "Relayout Graph");
-      // 
-      // zoomAreaButton
-      // 
-      this.zoomAreaButton.Image = HeuristicLab.Common.Resources.VS2008ImageLibrary.Zoom;
-      this.zoomAreaButton.Location = new System.Drawing.Point(153, 3);
-      this.zoomAreaButton.Name = "zoomAreaButton";
-      this.zoomAreaButton.Size = new System.Drawing.Size(24, 24);
-      this.zoomAreaButton.TabIndex = 5;
-      this.zoomAreaButton.UseVisualStyleBackColor = true;
-      this.zoomAreaButton.Click += new System.EventHandler(zoomAreaButton_Click);
-      this.buttonToolTip.SetToolTip(this.zoomAreaButton, "Zoom Area Tool");
-      // 
-      // zoomInButton
-      // 
-      this.zoomInButton.Image = HeuristicLab.Common.Resources.VS2008ImageLibrary.ZoomIn;
-      this.zoomInButton.Location = new System.Drawing.Point(183, 3);
-      this.zoomInButton.Name = "zoomInButton";
-      this.zoomInButton.Size = new System.Drawing.Size(24, 24);
-      this.zoomInButton.TabIndex = 6;
-      this.zoomInButton.UseVisualStyleBackColor = true;
-      this.zoomInButton.Click += new System.EventHandler(zoomInButton_Click);
-      this.buttonToolTip.SetToolTip(this.zoomInButton, "Zoom In");
-      // 
-      // zoomOutButton
-      // 
-      this.zoomOutButton.Image = HeuristicLab.Common.Resources.VS2008ImageLibrary.ZoomOut;
-      this.zoomOutButton.Location = new System.Drawing.Point(213, 3);
-      this.zoomOutButton.Name = "zoomOutButton";
-      this.zoomOutButton.Size = new System.Drawing.Size(24, 24);
-      this.zoomOutButton.TabIndex = 7;
-      this.zoomOutButton.UseVisualStyleBackColor = true;
-      this.zoomOutButton.Click += new System.EventHandler(zoomOutButton_Click);
-      this.buttonToolTip.SetToolTip(this.zoomOutButton, "Zoom Out");
-      // 
-      // screenshotButton
-      // 
-      this.screenshotButton.Image = HeuristicLab.Common.Resources.VS2008ImageLibrary.Copy;
-      this.screenshotButton.Location = new System.Drawing.Point(243, 3);
-      this.screenshotButton.Name = "screenshotButton";
-      this.screenshotButton.Size = new System.Drawing.Size(24, 24);
-      this.screenshotButton.TabIndex = 8;
-      this.screenshotButton.UseVisualStyleBackColor = true;
-      this.screenshotButton.Click += new System.EventHandler(screenshotButton_Click);
-      this.buttonToolTip.SetToolTip(this.screenshotButton, "Screenshot");
-      // 
-      // OperatorGraphView
-      // 
-      this.AllowDrop = true;
-      this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
-      this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
-      this.Controls.Add(this.splitContainer);
-      this.Name = "OperatorGraphView";
-      this.Size = new System.Drawing.Size(665, 444);
-      this.DragDrop += new System.Windows.Forms.DragEventHandler(this.OperatorGraphView_DragDrop);
-      this.DragEnter += new System.Windows.Forms.DragEventHandler(this.OperatorGraphView_DragEnter);
-      this.shapeContextMenu.ResumeLayout(false);
-      this.splitContainer.Panel1.ResumeLayout(false);
-      this.splitContainer.Panel2.ResumeLayout(false);
-      this.splitContainer.ResumeLayout(false);
-      this.detailsGroupBox.ResumeLayout(false);
-      this.ResumeLayout(false);
-
-    }
-    #endregion
-
-    private GraphVisualizationInfoView graphVisualizationInfoView;
-    private System.Windows.Forms.ContextMenuStrip shapeContextMenu;
-    private System.Windows.Forms.ToolStripMenuItem openViewToolStripMenuItem;
-    private System.Windows.Forms.ToolStripMenuItem initialToolStripMenuItem;
-    private System.Windows.Forms.ToolStripMenuItem breakPointToolStripMenuItem;
-    private System.Windows.Forms.SplitContainer splitContainer;
-    private System.Windows.Forms.GroupBox detailsGroupBox;
-    private HeuristicLab.MainForm.WindowsForms.ViewHost detailsViewHost;
-    private System.Windows.Forms.Button selectButton;
-    private System.Windows.Forms.Button zoomOutButton;
-    private System.Windows.Forms.Button zoomInButton;
-    private System.Windows.Forms.Button zoomAreaButton;
-    private System.Windows.Forms.Button relayoutButton;
-    private System.Windows.Forms.Button connectButton;
-    private System.Windows.Forms.Button panButton;
-    private System.Windows.Forms.Button screenshotButton;
-    private System.Windows.Forms.ToolTip buttonToolTip;
-  }
-}
Index: trunk/sources/HeuristicLab.Operators.Views.GraphVisualization/3.3/OperatorGraphView.cs
===================================================================
--- trunk/sources/HeuristicLab.Operators.Views.GraphVisualization/3.3/OperatorGraphView.cs	(revision 3431)
+++ 	(revision )
@@ -1,321 +1,0 @@
-﻿#region License Information
-/* HeuristicLab
- * Copyright (C) 2002-2008 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
- *
- * This file is part of HeuristicLab.
- *
- * HeuristicLab is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * HeuristicLab is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with HeuristicLab. If not, see <http://www.gnu.org/licenses/>.
- */
-#endregion
-
-using System;
-using System.Collections.Generic;
-using System.ComponentModel;
-using System.Drawing;
-using System.Data;
-using System.Linq;
-using System.Text;
-using System.Windows.Forms;
-using HeuristicLab.MainForm;
-using HeuristicLab.Common;
-using HeuristicLab.Core;
-using HeuristicLab.Core.Views;
-using Netron.Diagramming.Core;
-using HeuristicLab.Parameters;
-using HeuristicLab.MainForm.WindowsForms;
-using HeuristicLab.Collections;
-
-namespace HeuristicLab.Operators.Views.GraphVisualization {
-  [View("OperatorGraph View (Chart)")]
-  [Content(typeof(OperatorGraph), true)]
-  public partial class OperatorGraphView : ContentView {
-    public OperatorGraphView() {
-      InitializeComponent();
-      Caption = "Operator Graph Visualization";
-
-      this.graphVisualizationInfoView.Controller.OnShowContextMenu += new EventHandler<EntityMenuEventArgs>(Controller_OnShowContextMenu);
-      this.graphVisualizationInfoView.Controller.Model.Selection.OnNewSelection += new EventHandler(Controller_SelectionChanged);
-      this.graphVisualizationInfoView.Controller.OnMouseDown += new EventHandler<MouseEventArgs>(Controller_OnMouseDown);
-      foreach (ITool tool in this.graphVisualizationInfoView.Controller.Tools) {
-        tool.OnToolActivate += new EventHandler<ToolEventArgs>(tool_OnToolActivate);
-        tool.OnToolDeactivate += new EventHandler<ToolEventArgs>(tool_OnToolDeactivate);
-      }
-    }
-
-    public OperatorGraphView(OperatorGraph content)
-      : this() {
-      this.Content = content;
-    }
-
-    public new OperatorGraph Content {
-      get { return (OperatorGraph)base.Content; }
-      set { base.Content = value; }
-    }
-
-    protected override void OnContentChanged() {
-      bool createdVisualizationInfo = false;
-      if (this.VisualizationInfo == null) {
-        this.VisualizationInfo = new GraphVisualizationInfo(this.Content);
-        createdVisualizationInfo = true;
-      }
-      this.graphVisualizationInfoView.Content = this.VisualizationInfo;
-      if (createdVisualizationInfo)
-        this.graphVisualizationInfoView.RelayoutGraph();
-
-      this.SetEnabledStateOfControls();
-    }
-
-    protected override void OnReadOnlyChanged() {
-      base.OnReadOnlyChanged();
-      this.SetEnabledStateOfControls();
-    }
-
-    private void SetEnabledStateOfControls() {
-      if (Content == null) {
-        selectButton.Enabled = false;
-        panButton.Enabled = false;
-        relayoutButton.Enabled = false;
-        zoomAreaButton.Enabled = false;
-        zoomInButton.Enabled = false;
-        zoomOutButton.Enabled = false;
-        screenshotButton.Enabled = false;
-        detailsViewHost.Enabled = false;
-        graphVisualizationInfoView.ReadOnly = true;
-        connectButton.Enabled = false;
-      } else {
-        selectButton.Enabled = true;
-        panButton.Enabled = true;
-        relayoutButton.Enabled = true;
-        zoomAreaButton.Enabled = true;
-        zoomInButton.Enabled = true;
-        zoomOutButton.Enabled = true;
-        screenshotButton.Enabled = true;
-        detailsViewHost.Enabled = true;
-        detailsViewHost.ReadOnly = ReadOnly;
-        graphVisualizationInfoView.ReadOnly = ReadOnly;
-        connectButton.Enabled = !ReadOnly;
-      }
-    } 
-
-    private GraphVisualizationInfo VisualizationInfo {
-      get { return Content.VisualizationInfo as GraphVisualizationInfo; }
-      set { this.Content.VisualizationInfo = value; }
-    }
-
-    private void Controller_SelectionChanged(object sender, EventArgs e) {
-      CollectionBase<IDiagramEntity> selectedObjects = this.graphVisualizationInfoView.Controller.Model.Selection.SelectedItems;
-      this.detailsViewHost.ViewType = null;
-      if (selectedObjects.Count == 1) {
-        IShape shape = selectedObjects[0] as IShape;
-        if (shape != null) {
-          IOperatorShapeInfo shapeInfo = shape.Tag as IOperatorShapeInfo;
-          IOperator op = this.VisualizationInfo.GetOperatorForShapeInfo(shapeInfo);
-          this.detailsViewHost.ViewType = null;
-          this.detailsViewHost.Content = op;
-          return;
-        }
-      }
-      IConnector connector = this.graphVisualizationInfoView.Controller.Model.Selection.Connector;
-      if (connector != null) {
-        IShape shape = connector.Parent as IShape;
-        string connectorName = connector.Name;
-        if (shape == null) {
-          shape = connector.AttachedTo.Parent as IShape; //connection connector selected
-          connectorName = connector.AttachedTo.Name;
-        }
-        if (shape != null) {
-          IOperatorShapeInfo shapeInfo = shape.Tag as IOperatorShapeInfo;
-          IOperator op = this.VisualizationInfo.GetOperatorForShapeInfo(shapeInfo);
-          if (connectorName != "Predecessor") {
-            IParameter parameter = op.Parameters.Where(p => p.Name == connectorName).First();
-            this.detailsViewHost.ViewType = null;
-            this.detailsViewHost.Content = parameter;
-            return;
-          }
-        }
-      }
-      this.detailsViewHost.ViewType = null;
-      this.detailsViewHost.Content = null;
-    }
-
-    private void Controller_OnMouseDown(object sender, MouseEventArgs e) {
-      if (e.Clicks >= 2) {
-        IShape shape = this.graphVisualizationInfoView.Controller.Model.GetShapeAt(e.Location);
-        if (shape != null) {
-          IOperatorShapeInfo shapeInfo = shape.Tag as IOperatorShapeInfo;
-          if (shapeInfo != null) {
-            IOperator op = this.VisualizationInfo.GetOperatorForShapeInfo(shapeInfo);
-            MainFormManager.CreateDefaultView(op).Show();
-            HandledMouseEventArgs eventArgs = e as HandledMouseEventArgs;
-            if (eventArgs != null)
-              eventArgs.Handled = true;
-          }
-        }
-      }
-    }
-
-    #region context menu
-    private void Controller_OnShowContextMenu(object sender, EntityMenuEventArgs e) {
-      IShape shape = this.graphVisualizationInfoView.Controller.Model.GetShapeAt(e.MouseEventArgs.Location);
-      if (shape != null) {
-        IShapeInfo shapeInfo = shape.Tag as IShapeInfo;
-        this.shapeContextMenu.Tag = shapeInfo;
-        PointF worldPoint = this.graphVisualizationInfoView.Controller.View.WorldToView(e.MouseEventArgs.Location);
-        this.shapeContextMenu.Show(this, Point.Round(worldPoint));
-      }
-    }
-
-    private void shapeContextMenu_Opening(object sender, System.ComponentModel.CancelEventArgs e) {
-      IOperatorShapeInfo shapeInfo = this.shapeContextMenu.Tag as IOperatorShapeInfo;
-      if (shapeInfo != null) {
-        IOperator op = this.VisualizationInfo.GetOperatorForShapeInfo(shapeInfo);
-        this.initialToolStripMenuItem.Checked = this.Content.InitialOperator == op;
-        this.breakPointToolStripMenuItem.Checked = op.Breakpoint;
-      }
-    }
-
-    private void openViewToolStripMenuItem_Click(object sender, EventArgs e) {
-      IOperatorShapeInfo shapeInfo = this.shapeContextMenu.Tag as IOperatorShapeInfo;
-      if (shapeInfo != null) {
-        IOperator op = this.VisualizationInfo.GetOperatorForShapeInfo(shapeInfo);
-        MainFormManager.CreateDefaultView(op).Show();
-      }
-    }
-
-    private void initialOperatorToolStripMenuItem_Click(object sender, EventArgs e) {
-      if (!ReadOnly) {
-        IOperatorShapeInfo shapeInfo = this.shapeContextMenu.Tag as IOperatorShapeInfo;
-        if (this.VisualizationInfo.InitialShape == shapeInfo)
-          this.VisualizationInfo.InitialShape = null;
-        else
-          this.VisualizationInfo.InitialShape = shapeInfo;
-      }
-    }
-
-    private void breakPointToolStripMenuItem_Click(object sender, EventArgs e) {
-      if (!ReadOnly) {
-        IOperatorShapeInfo shapeInfo = this.shapeContextMenu.Tag as IOperatorShapeInfo;
-        if (shapeInfo != null) {
-          IOperator op = this.VisualizationInfo.GetOperatorForShapeInfo(shapeInfo);
-          op.Breakpoint = !op.Breakpoint;
-        }
-      }
-    }
-    #endregion
-
-    #region drag and drop
-    private void OperatorGraphView_DragEnter(object sender, DragEventArgs e) {
-      e.Effect = DragDropEffects.None;
-      if (ReadOnly)
-        return;
-      Type type = e.Data.GetData("Type") as Type;
-      if ((type != null) && (typeof(IOperator).IsAssignableFrom(type))) {
-        e.Effect = DragDropEffects.Copy;
-      }
-    }
-
-    private void OperatorGraphView_DragDrop(object sender, DragEventArgs e) {
-      if (e.Effect != DragDropEffects.None) {
-        IOperator op = e.Data.GetData("Value") as IOperator;
-        IOperatorShapeInfo shapeInfo = Factory.CreateOperatorShapeInfo(op);
-        Point mouse = new Point(MousePosition.X, MousePosition.Y);
-        Point screen = this.graphVisualizationInfoView.PointToScreen(new Point(0, 0));
-        Point control = new Point(mouse.X - screen.X, mouse.Y - screen.Y);
-        PointF worldPoint = this.graphVisualizationInfoView.Controller.View.ViewToWorld(control);
-
-        if (worldPoint.X < 0)
-          worldPoint.X = 0;
-        if (worldPoint.Y < 0)
-          worldPoint.Y = 0;
-
-        shapeInfo.Location = Point.Round(worldPoint);
-        this.VisualizationInfo.AddShapeInfo(op, shapeInfo);
-      }
-    }
-    #endregion
-
-    private void tool_OnToolActivate(object sender, ToolEventArgs e) {
-      Button button = GetButtonForTool(e.Properties.Name);
-      if (button != null)
-        button.Enabled = false;
-    }
-
-    private void tool_OnToolDeactivate(object sender, ToolEventArgs e) {
-      Button button = GetButtonForTool(e.Properties.Name);
-      if (button != null)
-        button.Enabled = true;
-    }
-
-    private Button GetButtonForTool(string toolName) {
-      Button button = null;
-      switch (toolName) {
-        case ControllerBase.SelectionToolName:
-          button = this.selectButton;
-          break;
-        case ControllerBase.PanToolName:
-          button = this.panButton;
-          break;
-        case ControllerBase.ConnectionToolName:
-          button = this.connectButton;
-          break;
-        case ControllerBase.ZoomAreaToolName:
-          button = this.zoomAreaButton;
-          break;
-      }
-      return button;
-    }
-
-    private void selectButton_Click(object sender, EventArgs e) {
-      ITool tool = this.graphVisualizationInfoView.Controller.Tools.Where(t => t.Name == ControllerBase.SelectionToolName).First();
-      this.graphVisualizationInfoView.Controller.DeactivateAllTools();
-    }
-
-    private void panButton_Click(object sender, EventArgs e) {
-      this.graphVisualizationInfoView.Controller.ActivateTool(ControllerBase.PanToolName);
-    }
-
-    private void connectButton_Click(object sender, EventArgs e) {
-      this.graphVisualizationInfoView.Controller.ActivateTool(ControllerBase.ConnectionToolName);
-    }
-
-    private void relayoutButton_Click(object sender, EventArgs e) {
-      this.graphVisualizationInfoView.RelayoutGraph();
-    }
-
-    private void zoomAreaButton_Click(object sender, EventArgs e) {
-      this.graphVisualizationInfoView.Controller.View.ZoomFit();
-    }
-
-    private void zoomInButton_Click(object sender, EventArgs e) {
-      this.graphVisualizationInfoView.Controller.ActivateTool(ControllerBase.ZoomInToolName);
-    }
-
-    private void zoomOutButton_Click(object sender, EventArgs e) {
-      this.graphVisualizationInfoView.Controller.ActivateTool(ControllerBase.ZoomOutToolName);
-    }
-
-    private void screenshotButton_Click(object sender, EventArgs e) {
-      Bitmap bitmap = ImageExporter.FromBundle(new Bundle(this.graphVisualizationInfoView.Controller.Model.Paintables), this.graphVisualizationInfoView.Controller.View.Graphics);
-      SaveFileDialog saveFileDialog = new SaveFileDialog();
-      saveFileDialog.Title = "Save Screenshot";
-      saveFileDialog.DefaultExt = "bmp";
-      saveFileDialog.Filter = "Bitmap|*.bmp|All Files|*.*";
-      saveFileDialog.FilterIndex = 1;
-
-      if (saveFileDialog.ShowDialog() == DialogResult.OK) {
-        bitmap.Save(saveFileDialog.FileName);
-      }
-    }
-  }
-}
