Changeset 3176
- Timestamp:
- 03/22/10 16:28:27 (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/sources/HeuristicLab.Operators.Views.GraphVisualization/3.3/OperatorGraphView.cs
r3173 r3176 46 46 this.graphVisualizationInfoView.Controller.OnShowContextMenu += new EventHandler<EntityMenuEventArgs>(Controller_OnShowContextMenu); 47 47 this.graphVisualizationInfoView.Controller.Model.Selection.OnNewSelection += new EventHandler(Controller_SelectionChanged); 48 this.graphVisualizationInfoView.Controller.OnMouseDown += new EventHandler<MouseEventArgs>(Controller_OnMouseDown); 48 49 foreach (ITool tool in this.graphVisualizationInfoView.Controller.Tools) { 49 50 tool.OnToolActivate += new EventHandler<ToolEventArgs>(tool_OnToolActivate); … … 114 115 } 115 116 117 private void Controller_OnMouseDown(object sender, MouseEventArgs e) { 118 if (e.Clicks >= 2) { 119 IShape shape = this.graphVisualizationInfoView.Controller.Model.GetShapeAt(e.Location); 120 if (shape != null) { 121 IOperatorShapeInfo shapeInfo = shape.Tag as IOperatorShapeInfo; 122 if (shapeInfo != null) { 123 IOperator op = this.VisualizationInfo.GetOperatorForShapeInfo(shapeInfo); 124 MainFormManager.CreateDefaultView(op).Show(); 125 HandledMouseEventArgs eventArgs = e as HandledMouseEventArgs; 126 if (eventArgs != null) 127 eventArgs.Handled = true; 128 } 129 } 130 } 131 } 132 116 133 #region context menu 117 134 private void Controller_OnShowContextMenu(object sender, EntityMenuEventArgs e) { … … 249 266 250 267 private void screenshotButton_Click(object sender, EventArgs e) { 251 Bitmap bitmap = ImageExporter.FromBundle(new Bundle(this.graphVisualizationInfoView.Controller.Model.Paintables), this.graphVisualizationInfoView.Controller.View.Graphics);268 Bitmap bitmap = ImageExporter.FromBundle(new Bundle(this.graphVisualizationInfoView.Controller.Model.Paintables), this.graphVisualizationInfoView.Controller.View.Graphics); 252 269 SaveFileDialog saveFileDialog = new SaveFileDialog(); 253 270 saveFileDialog.Title = "Save Screenshot";
Note: See TracChangeset
for help on using the changeset viewer.