Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
02/15/10 15:39:26 (14 years ago)
Author:
mkommend
Message:

added first version of OperatorGraphVisualization (ticket #867)

Location:
trunk/sources/HeuristicLab.Core.Views/3.3
Files:
1 added
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/sources/HeuristicLab.Core.Views/3.3/OperatorGraphView.Designer.cs

    r2790 r2801  
    4949      this.initialOperatorToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
    5050      this.operatorsView = new HeuristicLab.Core.Views.OperatorSetView();
    51       this.graphView = new HeuristicLab.Core.Views.OperatorTreeView();
    5251      this.splitContainer = new System.Windows.Forms.SplitContainer();
    5352      this.graphGroupBox = new System.Windows.Forms.GroupBox();
     53      this.viewHost = new HeuristicLab.Core.Views.ViewHost();
    5454      this.operatorsContextMenuStrip.SuspendLayout();
    5555      this.splitContainer.Panel1.SuspendLayout();
     
    8282                  | System.Windows.Forms.AnchorStyles.Right)));
    8383      this.operatorsView.Caption = "Operator Set";
     84      this.operatorsView.Content = null;
    8485      this.operatorsView.Location = new System.Drawing.Point(3, 3);
    8586      this.operatorsView.Name = "operatorsView";
     
    8788      this.operatorsView.TabIndex = 0;
    8889      this.operatorsView.Load += new System.EventHandler(this.operatorsView_Load);
    89       //
    90       // graphView
    91       //
    92       this.graphView.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
    93                   | System.Windows.Forms.AnchorStyles.Left)
    94                   | System.Windows.Forms.AnchorStyles.Right)));
    95       this.graphView.Caption = "Operator";
    96       this.graphView.Location = new System.Drawing.Point(6, 19);
    97       this.graphView.Name = "graphView";
    98       this.graphView.Size = new System.Drawing.Size(590, 183);
    99       this.graphView.TabIndex = 0;
    10090      //
    10191      // splitContainer
     
    122112                  | System.Windows.Forms.AnchorStyles.Left)
    123113                  | System.Windows.Forms.AnchorStyles.Right)));
    124       this.graphGroupBox.Controls.Add(this.graphView);
     114      this.graphGroupBox.Controls.Add(this.viewHost);
    125115      this.graphGroupBox.Location = new System.Drawing.Point(3, 3);
    126116      this.graphGroupBox.Name = "graphGroupBox";
     
    129119      this.graphGroupBox.TabStop = false;
    130120      this.graphGroupBox.Text = "Operator &Graph";
     121      //
     122      // viewHost
     123      //
     124      this.viewHost.Content = null;
     125      this.viewHost.Dock = System.Windows.Forms.DockStyle.Fill;
     126      this.viewHost.Location = new System.Drawing.Point(3, 16);
     127      this.viewHost.Name = "viewHost";
     128      this.viewHost.Size = new System.Drawing.Size(596, 189);
     129      this.viewHost.TabIndex = 0;
    131130      //
    132131      // OperatorGraphView
     
    151150    protected System.Windows.Forms.ToolStripMenuItem initialOperatorToolStripMenuItem;
    152151    protected OperatorSetView operatorsView;
    153     protected OperatorTreeView graphView;
    154152    protected System.Windows.Forms.SplitContainer splitContainer;
    155153    protected System.Windows.Forms.GroupBox graphGroupBox;
     154    private ViewHost viewHost;
    156155  }
    157156}
  • trunk/sources/HeuristicLab.Core.Views/3.3/OperatorGraphView.cs

    r2790 r2801  
    2525using System.Drawing;
    2626using System.Data;
     27using System.Linq;
    2728using System.Text;
    2829using System.Windows.Forms;
     
    5455      InitializeComponent();
    5556      Caption = "Operator Graph";
     57      this.viewHost.ViewType = typeof(OperatorTreeView);
    5658    }
    5759    /// <summary>
     
    9092    protected override void OnContentChanged() {
    9193      base.OnContentChanged();
     94      Caption = "Operator Graph";
    9295      operatorsView.Content = null;
    9396      operatorsView.Enabled = false;
    94       graphView.Content = null;
    95       graphView.Enabled = false;
    96       if (Content == null) {
    97         Caption = "Operator Graph";
    98         operatorsView.Content = null;
    99         operatorsView.Enabled = false;
    100         graphView.Content = null;
    101         graphView.Enabled = false;
    102       } else {
     97      viewHost.Content = null;
     98      viewHost.Enabled = false;
     99
     100      if (Content != null) {
    103101        Caption = Content.ItemName + " (" + Content.GetType().Name + ")";
    104102        operatorsView.Content = Content.Operators;
    105103        operatorsView.Enabled = true;
    106104        MarkInitialOperator();
    107         graphView.Content = Content.InitialOperator;
    108         graphView.Enabled = true;
     105        viewHost.Content = Content.InitialOperator;
     106        viewHost.Enabled = true;
    109107      }
    110108    }
     
    148146      else {
    149147        MarkInitialOperator();
    150         graphView.Content = Content.InitialOperator;
     148        viewHost.Content = Content.InitialOperator;
    151149      }
    152150    }
Note: See TracChangeset for help on using the changeset viewer.