Changeset 2898
- Timestamp:
- 03/01/10 15:16:17 (15 years ago)
- Location:
- trunk/sources
- Files:
-
- 1 deleted
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.Netron/3.0.2672.12446/Netron.Diagramming.Core-3.0.2672.12446/Utils/Selection.cs
r2868 r2898 267 267 connector = con.From; 268 268 connector.IsSelected = true; 269 this.RaiseOnNewSelection(); 269 270 Invalidate(); 270 271 return; … … 273 274 connector = con.To; 274 275 connector.IsSelected = true; 276 this.RaiseOnNewSelection(); 275 277 Invalidate(); 276 278 return; … … 285 287 connector = cn; 286 288 connector.IsSelected = true; 289 this.RaiseOnNewSelection(); 287 290 Invalidate();//this will invalidate only the selected connector 288 291 return; //we hit a connector and quit the selection. If the user intended to select the entity it had to be away from the connector! -
trunk/sources/HeuristicLab.Operators.Views.GraphVisualization/3.3/HeuristicLab.Operators.Views.GraphVisualization-3.3.csproj
r2895 r2898 173 173 </ProjectReference> 174 174 </ItemGroup> 175 <ItemGroup>176 <EmbeddedResource Include="GraphVisualizationInfoView.resx">177 <DependentUpon>GraphVisualizationInfoView.cs</DependentUpon>178 </EmbeddedResource>179 </ItemGroup>180 175 <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" /> 181 176 <!-- 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 31 31 this.breakPointToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); 32 32 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); 35 36 this.shapeContextMenu.SuspendLayout(); 36 37 this.splitContainer.Panel1.SuspendLayout(); 37 38 this.splitContainer.Panel2.SuspendLayout(); 38 39 this.splitContainer.SuspendLayout(); 39 this. propertyGroupBox.SuspendLayout();40 this.detailsGroupBox.SuspendLayout(); 40 41 this.SuspendLayout(); 41 42 // … … 94 95 // splitContainer.Panel2 95 96 // 96 this.splitContainer.Panel2.Controls.Add(this. propertyGroupBox);97 this.splitContainer.Panel2.Controls.Add(this.detailsGroupBox); 97 98 this.splitContainer.Size = new System.Drawing.Size(665, 444); 98 99 this.splitContainer.SplitterDistance = 279; 99 100 this.splitContainer.TabIndex = 1; 100 101 // 101 // propertyGroupBox102 // detailsGroupBox 102 103 // 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"; 111 112 // 112 // propertyViewHost113 // detailsViewHost 113 114 // 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; 121 126 // 122 127 // OperatorGraphView … … 134 139 this.splitContainer.Panel2.ResumeLayout(false); 135 140 this.splitContainer.ResumeLayout(false); 136 this. propertyGroupBox.ResumeLayout(false);141 this.detailsGroupBox.ResumeLayout(false); 137 142 this.ResumeLayout(false); 138 143 … … 146 151 private System.Windows.Forms.ToolStripMenuItem breakPointToolStripMenuItem; 147 152 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; 150 156 } 151 157 } -
trunk/sources/HeuristicLab.Operators.Views.GraphVisualization/3.3/OperatorGraphView.cs
r2895 r2898 45 45 46 46 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); 48 48 } 49 49 … … 59 59 60 60 protected override void OnContentChanged() { 61 if (this.VisualizationInfo == null) 61 bool createdVisualizationInfo = false; 62 if (this.VisualizationInfo == null) { 62 63 this.VisualizationInfo = new GraphVisualizationInfo(this.Content); 64 createdVisualizationInfo = true; 65 } 63 66 this.graphVisualizationInfoView.Content = this.VisualizationInfo; 67 if (createdVisualizationInfo) 68 this.graphVisualizationInfoView.RelayoutOperatorGraph(); 64 69 } 65 70 … … 69 74 } 70 75 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) { 72 82 CollectionBase<IDiagramEntity> selectedObjects = this.graphVisualizationInfoView.Controller.Model.Selection.SelectedItems; 73 this. propertyViewHost.ViewType = null;83 this.detailsViewHost.ViewType = null; 74 84 if (selectedObjects.Count == 1) { 75 85 IShape shape = selectedObjects[0] as IShape; 76 86 if (shape != null) { 77 87 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; 79 90 return; 80 91 } 81 92 } 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; 84 113 } 85 114
Note: See TracChangeset
for help on using the changeset viewer.