Free cookie consent management tool by TermsFeed Policy Generator

Changeset 2895


Ignore:
Timestamp:
03/01/10 13:01:03 (14 years ago)
Author:
mkommend
Message:

added properties view in graph visualization (ticket #867)

Location:
trunk/sources/HeuristicLab.Operators.Views.GraphVisualization/3.3
Files:
1 deleted
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/sources/HeuristicLab.Operators.Views.GraphVisualization/3.3/HeuristicLab.Operators.Views.GraphVisualization-3.3.csproj

    r2893 r2895  
    177177      <DependentUpon>GraphVisualizationInfoView.cs</DependentUpon>
    178178    </EmbeddedResource>
    179     <EmbeddedResource Include="OperatorGraphView.resx">
    180       <DependentUpon>OperatorGraphView.cs</DependentUpon>
    181     </EmbeddedResource>
    182179  </ItemGroup>
    183180  <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
  • trunk/sources/HeuristicLab.Operators.Views.GraphVisualization/3.3/OperatorGraphView.Designer.cs

    r2893 r2895  
    2424    /// </summary>
    2525    private void InitializeComponent() {
     26      this.components = new System.ComponentModel.Container();
    2627      this.graphVisualizationInfoView = new HeuristicLab.Operators.Views.GraphVisualization.GraphVisualizationInfoView();
    27       this.shapeContextMenu = new System.Windows.Forms.ContextMenuStrip();
     28      this.shapeContextMenu = new System.Windows.Forms.ContextMenuStrip(this.components);
    2829      this.openViewToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
    2930      this.initialToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
    3031      this.breakPointToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
     32      this.splitContainer = new System.Windows.Forms.SplitContainer();
     33      this.propertyGroupBox = new System.Windows.Forms.GroupBox();
     34      this.propertyViewHost = new HeuristicLab.Core.Views.ViewHost();
     35      this.shapeContextMenu.SuspendLayout();
     36      this.splitContainer.Panel1.SuspendLayout();
     37      this.splitContainer.Panel2.SuspendLayout();
     38      this.splitContainer.SuspendLayout();
     39      this.propertyGroupBox.SuspendLayout();
    3140      this.SuspendLayout();
    32       this.shapeContextMenu.SuspendLayout();
    3341      //
    3442      // graphVisualizationInfoView
    3543      //
    36       this.graphVisualizationInfoView.AllowDrop = false;
    37       this.graphVisualizationInfoView.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
    38                   | System.Windows.Forms.AnchorStyles.Left)
    39                   | System.Windows.Forms.AnchorStyles.Right)));
    4044      this.graphVisualizationInfoView.Caption = null;
    4145      this.graphVisualizationInfoView.Content = null;
    42       this.graphVisualizationInfoView.Location = new System.Drawing.Point(3, 3);
     46      this.graphVisualizationInfoView.Dock = System.Windows.Forms.DockStyle.Fill;
     47      this.graphVisualizationInfoView.Location = new System.Drawing.Point(0, 0);
    4348      this.graphVisualizationInfoView.Name = "graphVisualizationInfoView";
    44       this.graphVisualizationInfoView.Size = new System.Drawing.Size(659, 336);
     49      this.graphVisualizationInfoView.Size = new System.Drawing.Size(665, 279);
    4550      this.graphVisualizationInfoView.TabIndex = 0;
    4651      //
     
    5358      this.shapeContextMenu.Name = "shapeContextMenu";
    5459      this.shapeContextMenu.Size = new System.Drawing.Size(154, 70);
    55       this.shapeContextMenu.Opening += new System.ComponentModel.CancelEventHandler(shapeContextMenu_Opening);
     60      this.shapeContextMenu.Opening += new System.ComponentModel.CancelEventHandler(this.shapeContextMenu_Opening);
    5661      //
    5762      // openViewToolStripMenuItem
     
    6974      this.initialToolStripMenuItem.Click += new System.EventHandler(this.initialOperatorToolStripMenuItem_Click);
    7075      //
    71       // BreakPointToolStripMenuItem
     76      // breakPointToolStripMenuItem
    7277      //
    7378      this.breakPointToolStripMenuItem.Name = "breakPointToolStripMenuItem";
     
    7681      this.breakPointToolStripMenuItem.Click += new System.EventHandler(this.breakPointToolStripMenuItem_Click);
    7782      //
     83      // splitContainer
     84      //
     85      this.splitContainer.Dock = System.Windows.Forms.DockStyle.Fill;
     86      this.splitContainer.Location = new System.Drawing.Point(0, 0);
     87      this.splitContainer.Name = "splitContainer";
     88      this.splitContainer.Orientation = System.Windows.Forms.Orientation.Horizontal;
     89      //
     90      // splitContainer.Panel1
     91      //
     92      this.splitContainer.Panel1.Controls.Add(this.graphVisualizationInfoView);
     93      //
     94      // splitContainer.Panel2
     95      //
     96      this.splitContainer.Panel2.Controls.Add(this.propertyGroupBox);
     97      this.splitContainer.Size = new System.Drawing.Size(665, 444);
     98      this.splitContainer.SplitterDistance = 279;
     99      this.splitContainer.TabIndex = 1;
     100      //
     101      // propertyGroupBox
     102      //
     103      this.propertyGroupBox.Controls.Add(this.propertyViewHost);
     104      this.propertyGroupBox.Dock = System.Windows.Forms.DockStyle.Fill;
     105      this.propertyGroupBox.Location = new System.Drawing.Point(0, 0);
     106      this.propertyGroupBox.Name = "propertyGroupBox";
     107      this.propertyGroupBox.Size = new System.Drawing.Size(665, 161);
     108      this.propertyGroupBox.TabIndex = 0;
     109      this.propertyGroupBox.TabStop = false;
     110      this.propertyGroupBox.Text = "Properties";
     111      //
     112      // propertyViewHost
     113      //
     114      this.propertyViewHost.Content = null;
     115      this.propertyViewHost.Dock = System.Windows.Forms.DockStyle.Fill;
     116      this.propertyViewHost.Location = new System.Drawing.Point(3, 16);
     117      this.propertyViewHost.Name = "propertyViewHost";
     118      this.propertyViewHost.Size = new System.Drawing.Size(659, 142);
     119      this.propertyViewHost.TabIndex = 0;
     120      this.propertyViewHost.ViewType = null;
     121      //
    78122      // OperatorGraphView
    79123      //
     
    81125      this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
    82126      this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
    83       this.Controls.Add(this.graphVisualizationInfoView);
     127      this.Controls.Add(this.splitContainer);
    84128      this.Name = "OperatorGraphView";
    85129      this.Size = new System.Drawing.Size(665, 444);
     
    87131      this.DragEnter += new System.Windows.Forms.DragEventHandler(this.OperatorGraphView_DragEnter);
    88132      this.shapeContextMenu.ResumeLayout(false);
     133      this.splitContainer.Panel1.ResumeLayout(false);
     134      this.splitContainer.Panel2.ResumeLayout(false);
     135      this.splitContainer.ResumeLayout(false);
     136      this.propertyGroupBox.ResumeLayout(false);
    89137      this.ResumeLayout(false);
     138
    90139    }
    91140    #endregion
     
    96145    private System.Windows.Forms.ToolStripMenuItem initialToolStripMenuItem;
    97146    private System.Windows.Forms.ToolStripMenuItem breakPointToolStripMenuItem;
     147    private System.Windows.Forms.SplitContainer splitContainer;
     148    private System.Windows.Forms.GroupBox propertyGroupBox;
     149    private HeuristicLab.Core.Views.ViewHost propertyViewHost;
    98150  }
    99151}
  • trunk/sources/HeuristicLab.Operators.Views.GraphVisualization/3.3/OperatorGraphView.cs

    r2893 r2895  
    4545
    4646      this.graphVisualizationInfoView.Controller.OnShowContextMenu += new EventHandler<EntityMenuEventArgs>(Controller_OnShowContextMenu);
     47      this.graphVisualizationInfoView.Controller.Model.Selection.OnNewSelection += new EventHandler(Controller_OnShowSelectionProperties);
    4748    }
    4849
     
    6667      get { return Content.VisualizationInfo as GraphVisualizationInfo; }
    6768      set { this.Content.VisualizationInfo = value; }
     69    }
     70
     71    private void Controller_OnShowSelectionProperties(object sender, EventArgs e) {
     72      CollectionBase<IDiagramEntity> selectedObjects = this.graphVisualizationInfoView.Controller.Model.Selection.SelectedItems;
     73      this.propertyViewHost.ViewType = null;
     74      if (selectedObjects.Count == 1) {
     75        IShape shape = selectedObjects[0] as IShape;
     76        if (shape != null) {
     77          IShapeInfo shapeInfo = shape.Tag as ShapeInfo;
     78          this.propertyViewHost.Content = this.VisualizationInfo.GetOperatorForShapeInfo(shapeInfo);
     79          return;
     80        }
     81      }
     82      this.propertyViewHost.ViewType = null;
     83      this.propertyViewHost.Content = null;
    6884    }
    6985
Note: See TracChangeset for help on using the changeset viewer.