Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
03/01/10 15:16:17 (15 years ago)
Author:
mkommend
Message:

added details view for parameters (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

    r2895 r2898  
    173173    </ProjectReference>
    174174  </ItemGroup>
    175   <ItemGroup>
    176     <EmbeddedResource Include="GraphVisualizationInfoView.resx">
    177       <DependentUpon>GraphVisualizationInfoView.cs</DependentUpon>
    178     </EmbeddedResource>
    179   </ItemGroup>
    180175  <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
    181176  <!-- To modify your build process, add your task inside one of the targets below and uncomment it.
  • trunk/sources/HeuristicLab.Operators.Views.GraphVisualization/3.3/OperatorGraphView.Designer.cs

    r2895 r2898  
    3131      this.breakPointToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
    3232      this.splitContainer = new System.Windows.Forms.SplitContainer();
    33       this.propertyGroupBox = new System.Windows.Forms.GroupBox();
    34       this.propertyViewHost = new HeuristicLab.Core.Views.ViewHost();
     33      this.detailsGroupBox = new System.Windows.Forms.GroupBox();
     34      this.detailsViewHost = new HeuristicLab.Core.Views.ViewHost();
     35      this.connectorToolTip = new System.Windows.Forms.ToolTip(this.components);
    3536      this.shapeContextMenu.SuspendLayout();
    3637      this.splitContainer.Panel1.SuspendLayout();
    3738      this.splitContainer.Panel2.SuspendLayout();
    3839      this.splitContainer.SuspendLayout();
    39       this.propertyGroupBox.SuspendLayout();
     40      this.detailsGroupBox.SuspendLayout();
    4041      this.SuspendLayout();
    4142      //
     
    9495      // splitContainer.Panel2
    9596      //
    96       this.splitContainer.Panel2.Controls.Add(this.propertyGroupBox);
     97      this.splitContainer.Panel2.Controls.Add(this.detailsGroupBox);
    9798      this.splitContainer.Size = new System.Drawing.Size(665, 444);
    9899      this.splitContainer.SplitterDistance = 279;
    99100      this.splitContainer.TabIndex = 1;
    100101      //
    101       // propertyGroupBox
     102      // detailsGroupBox
    102103      //
    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";
     104      this.detailsGroupBox.Controls.Add(this.detailsViewHost);
     105      this.detailsGroupBox.Dock = System.Windows.Forms.DockStyle.Fill;
     106      this.detailsGroupBox.Location = new System.Drawing.Point(0, 0);
     107      this.detailsGroupBox.Name = "detailsGroupBox";
     108      this.detailsGroupBox.Size = new System.Drawing.Size(665, 161);
     109      this.detailsGroupBox.TabIndex = 0;
     110      this.detailsGroupBox.TabStop = false;
     111      this.detailsGroupBox.Text = "Details";
    111112      //
    112       // propertyViewHost
     113      // detailsViewHost
    113114      //
    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;
     115      this.detailsViewHost.Content = null;
     116      this.detailsViewHost.Dock = System.Windows.Forms.DockStyle.Fill;
     117      this.detailsViewHost.Location = new System.Drawing.Point(3, 16);
     118      this.detailsViewHost.Name = "detailsViewHost";
     119      this.detailsViewHost.Size = new System.Drawing.Size(659, 142);
     120      this.detailsViewHost.TabIndex = 0;
     121      this.detailsViewHost.ViewType = null;
     122      //
     123      // connectorToolTip
     124      //
     125      this.connectorToolTip.IsBalloon = true;
    121126      //
    122127      // OperatorGraphView
     
    134139      this.splitContainer.Panel2.ResumeLayout(false);
    135140      this.splitContainer.ResumeLayout(false);
    136       this.propertyGroupBox.ResumeLayout(false);
     141      this.detailsGroupBox.ResumeLayout(false);
    137142      this.ResumeLayout(false);
    138143
     
    146151    private System.Windows.Forms.ToolStripMenuItem breakPointToolStripMenuItem;
    147152    private System.Windows.Forms.SplitContainer splitContainer;
    148     private System.Windows.Forms.GroupBox propertyGroupBox;
    149     private HeuristicLab.Core.Views.ViewHost propertyViewHost;
     153    private System.Windows.Forms.GroupBox detailsGroupBox;
     154    private HeuristicLab.Core.Views.ViewHost detailsViewHost;
     155    private System.Windows.Forms.ToolTip connectorToolTip;
    150156  }
    151157}
  • trunk/sources/HeuristicLab.Operators.Views.GraphVisualization/3.3/OperatorGraphView.cs

    r2895 r2898  
    4545
    4646      this.graphVisualizationInfoView.Controller.OnShowContextMenu += new EventHandler<EntityMenuEventArgs>(Controller_OnShowContextMenu);
    47       this.graphVisualizationInfoView.Controller.Model.Selection.OnNewSelection += new EventHandler(Controller_OnShowSelectionProperties);
     47      this.graphVisualizationInfoView.Controller.Model.Selection.OnNewSelection += new EventHandler(Controller_SelectionChanged);
    4848    }
    4949
     
    5959
    6060    protected override void OnContentChanged() {
    61       if (this.VisualizationInfo == null)
     61      bool createdVisualizationInfo = false;
     62      if (this.VisualizationInfo == null) {
    6263        this.VisualizationInfo = new GraphVisualizationInfo(this.Content);
     64        createdVisualizationInfo = true;
     65      }
    6366      this.graphVisualizationInfoView.Content = this.VisualizationInfo;
     67      if (createdVisualizationInfo)
     68        this.graphVisualizationInfoView.RelayoutOperatorGraph();
    6469    }
    6570
     
    6974    }
    7075
    71     private void Controller_OnShowSelectionProperties(object sender, EventArgs e) {
     76
     77    #region connector tooltips
     78
     79    #endregion
     80
     81    private void Controller_SelectionChanged(object sender, EventArgs e) {
    7282      CollectionBase<IDiagramEntity> selectedObjects = this.graphVisualizationInfoView.Controller.Model.Selection.SelectedItems;
    73       this.propertyViewHost.ViewType = null;
     83      this.detailsViewHost.ViewType = null;
    7484      if (selectedObjects.Count == 1) {
    7585        IShape shape = selectedObjects[0] as IShape;
    7686        if (shape != null) {
    7787          IShapeInfo shapeInfo = shape.Tag as ShapeInfo;
    78           this.propertyViewHost.Content = this.VisualizationInfo.GetOperatorForShapeInfo(shapeInfo);
     88          IOperator op = this.VisualizationInfo.GetOperatorForShapeInfo(shapeInfo);
     89          this.detailsViewHost.Content = op;
    7990          return;
    8091        }
    8192      }
    82       this.propertyViewHost.ViewType = null;
    83       this.propertyViewHost.Content = null;
     93      IConnector connector = this.graphVisualizationInfoView.Controller.Model.Selection.Connector;
     94      if (connector != null) {
     95        IShape shape = connector.Parent as IShape;
     96        string connectorName = connector.Name;
     97        if (shape == null) {
     98          shape = connector.AttachedTo.Parent as IShape; //connection connector selected
     99          connectorName = connector.AttachedTo.Name;
     100        }
     101        if (shape != null) {
     102          IShapeInfo shapeInfo = shape.Tag as ShapeInfo;
     103          IOperator op = this.VisualizationInfo.GetOperatorForShapeInfo(shapeInfo);
     104          if (connectorName != "Predecessor") {
     105            IParameter parameter = op.Parameters.Where(p => p.Name == connectorName).First();
     106            this.detailsViewHost.Content = parameter;
     107            return;
     108          }
     109        }
     110      }
     111      this.detailsViewHost.ViewType = null;
     112      this.detailsViewHost.Content = null;
    84113    }
    85114
Note: See TracChangeset for help on using the changeset viewer.