- Timestamp:
- 06/13/12 19:08:05 (12 years ago)
- Location:
- trunk/sources/HeuristicLab.Operators.Views.GraphVisualization.Views/3.3
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/sources/HeuristicLab.Operators.Views.GraphVisualization.Views/3.3/OperatorGraphView.Designer.cs
r7967 r8000 59 59 this.relayoutButton = new System.Windows.Forms.Button(); 60 60 this.connectButton = new System.Windows.Forms.Button(); 61 this.panButton = new System.Windows.Forms.Button();62 61 this.selectButton = new System.Windows.Forms.Button(); 63 62 this.detailsGroupBox = new System.Windows.Forms.GroupBox(); … … 130 129 this.splitContainer.Panel1.Controls.Add(this.relayoutButton); 131 130 this.splitContainer.Panel1.Controls.Add(this.connectButton); 132 this.splitContainer.Panel1.Controls.Add(this.panButton);133 131 this.splitContainer.Panel1.Controls.Add(this.selectButton); 134 132 this.splitContainer.Panel1.Controls.Add(this.graphVisualizationInfoView); … … 144 142 // 145 143 this.screenshotButton.Image = HeuristicLab.Common.Resources.VSImageLibrary.Image; 146 this.screenshotButton.Location = new System.Drawing.Point(2 43, 3);144 this.screenshotButton.Location = new System.Drawing.Point(213, 3); 147 145 this.screenshotButton.Name = "screenshotButton"; 148 146 this.screenshotButton.Size = new System.Drawing.Size(24, 24); 149 this.screenshotButton.TabIndex = 8;147 this.screenshotButton.TabIndex = 7; 150 148 this.buttonToolTip.SetToolTip(this.screenshotButton, "Screenshot"); 151 149 this.screenshotButton.UseVisualStyleBackColor = true; … … 155 153 // 156 154 this.zoomOutButton.Image = HeuristicLab.Common.Resources.VSImageLibrary.ZoomOut; 157 this.zoomOutButton.Location = new System.Drawing.Point( 213, 3);155 this.zoomOutButton.Location = new System.Drawing.Point(183, 3); 158 156 this.zoomOutButton.Name = "zoomOutButton"; 159 157 this.zoomOutButton.Size = new System.Drawing.Size(24, 24); 160 this.zoomOutButton.TabIndex = 7;158 this.zoomOutButton.TabIndex = 6; 161 159 this.buttonToolTip.SetToolTip(this.zoomOutButton, "Zoom Out"); 162 160 this.zoomOutButton.UseVisualStyleBackColor = true; … … 166 164 // 167 165 this.zoomInButton.Image = HeuristicLab.Common.Resources.VSImageLibrary.ZoomIn; 168 this.zoomInButton.Location = new System.Drawing.Point(1 83, 3);166 this.zoomInButton.Location = new System.Drawing.Point(153, 3); 169 167 this.zoomInButton.Name = "zoomInButton"; 170 168 this.zoomInButton.Size = new System.Drawing.Size(24, 24); 171 this.zoomInButton.TabIndex = 6;169 this.zoomInButton.TabIndex = 5; 172 170 this.buttonToolTip.SetToolTip(this.zoomInButton, "Zoom In"); 173 171 this.zoomInButton.UseVisualStyleBackColor = true; … … 177 175 // 178 176 this.zoomToFitButton.Image = HeuristicLab.Common.Resources.VSImageLibrary.ActualSize; 179 this.zoomToFitButton.Location = new System.Drawing.Point(1 53, 3);177 this.zoomToFitButton.Location = new System.Drawing.Point(123, 3); 180 178 this.zoomToFitButton.Name = "zoomAreaButton"; 181 179 this.zoomToFitButton.Size = new System.Drawing.Size(24, 24); 182 this.zoomToFitButton.TabIndex = 5;180 this.zoomToFitButton.TabIndex = 4; 183 181 this.buttonToolTip.SetToolTip(this.zoomToFitButton, "Zoom to Fit"); 184 182 this.zoomToFitButton.UseVisualStyleBackColor = true; … … 188 186 // 189 187 this.relayoutButton.Image = HeuristicLab.Common.Resources.VSImageLibrary.RefreshDocument; 190 this.relayoutButton.Location = new System.Drawing.Point( 123, 3);188 this.relayoutButton.Location = new System.Drawing.Point(93, 3); 191 189 this.relayoutButton.Name = "relayoutButton"; 192 190 this.relayoutButton.Size = new System.Drawing.Size(24, 24); 193 this.relayoutButton.TabIndex = 4;191 this.relayoutButton.TabIndex = 3; 194 192 this.buttonToolTip.SetToolTip(this.relayoutButton, "Relayout Graph"); 195 193 this.relayoutButton.UseVisualStyleBackColor = true; … … 199 197 // 200 198 this.connectButton.Image = HeuristicLab.Common.Resources.VSImageLibrary.Interface; 201 this.connectButton.Location = new System.Drawing.Point( 63, 3);199 this.connectButton.Location = new System.Drawing.Point(33, 3); 202 200 this.connectButton.Name = "connectButton"; 203 201 this.connectButton.Size = new System.Drawing.Size(24, 24); 204 this.connectButton.TabIndex = 3;202 this.connectButton.TabIndex = 2; 205 203 this.buttonToolTip.SetToolTip(this.connectButton, "Connection Tool"); 206 204 this.connectButton.UseVisualStyleBackColor = true; 207 205 this.connectButton.Click += new System.EventHandler(this.connectButton_Click); 208 //209 // panButton210 //211 this.panButton.Image = HeuristicLab.Common.Resources.VSImageLibrary.Breakpoint;212 this.panButton.Location = new System.Drawing.Point(33, 3);213 this.panButton.Name = "panButton";214 this.panButton.Size = new System.Drawing.Size(24, 24);215 this.panButton.TabIndex = 2;216 this.buttonToolTip.SetToolTip(this.panButton, "Pan Tool");217 this.panButton.UseVisualStyleBackColor = true;218 this.panButton.Click += new System.EventHandler(this.panButton_Click);219 206 // 220 207 // selectButton … … 290 277 private System.Windows.Forms.Button relayoutButton; 291 278 private System.Windows.Forms.Button connectButton; 292 private System.Windows.Forms.Button panButton;293 279 private System.Windows.Forms.Button screenshotButton; 294 280 private System.Windows.Forms.ToolTip buttonToolTip; -
trunk/sources/HeuristicLab.Operators.Views.GraphVisualization.Views/3.3/OperatorGraphView.cs
r7259 r8000 27 27 using HeuristicLab.MainForm; 28 28 using HeuristicLab.MainForm.WindowsForms; 29 using HeuristicLab.Netron.CustomTools; 29 30 using Netron.Diagramming.Core; 30 31 … … 33 34 [Content(typeof(OperatorGraph), true)] 34 35 public partial class OperatorGraphView : AsynchronousContentView { 36 private ITool lastActiveTool; 37 35 38 public OperatorGraphView() { 36 39 InitializeComponent(); … … 39 42 this.graphVisualizationInfoView.Controller.Model.Selection.OnNewSelection += new EventHandler(Controller_SelectionChanged); 40 43 this.graphVisualizationInfoView.Controller.OnMouseDown += new EventHandler<MouseEventArgs>(Controller_OnMouseDown); 44 this.graphVisualizationInfoView.Controller.ParentControl.MouseDown += new MouseEventHandler(ParentControl_MouseDown); 45 this.graphVisualizationInfoView.Controller.ParentControl.MouseUp += new MouseEventHandler(ParentControl_MouseUp); 41 46 foreach (ITool tool in this.graphVisualizationInfoView.Controller.Tools) { 42 47 tool.OnToolActivate += new EventHandler<ToolEventArgs>(tool_OnToolActivate); … … 69 74 if (Content == null) { 70 75 selectButton.Enabled = false; 71 panButton.Enabled = false;72 76 relayoutButton.Enabled = false; 73 77 zoomToFitButton.Enabled = false; … … 79 83 } else { 80 84 selectButton.Enabled = true; 81 panButton.Enabled = true;82 85 relayoutButton.Enabled = true; 83 86 zoomToFitButton.Enabled = true; … … 150 153 } 151 154 155 void ParentControl_MouseDown(object sender, MouseEventArgs e) { 156 lastActiveTool = this.graphVisualizationInfoView.Controller.ActiveTool; 157 if (e.Button == MouseButtons.Middle) { 158 if (!(lastActiveTool is CustomPanTool)) this.graphVisualizationInfoView.Controller.ActivateTool(CustomPanTool.ToolName); 159 } 160 } 161 162 void ParentControl_MouseUp(object sender, MouseEventArgs e) { 163 if (e.Button == MouseButtons.Middle) { 164 if (lastActiveTool != null) this.graphVisualizationInfoView.Controller.ActivateTool(lastActiveTool.Name); 165 else this.graphVisualizationInfoView.Controller.DeactivateAllTools(); 166 } 167 } 168 152 169 #region context menu 153 170 private void Controller_OnShowContextMenu(object sender, EntityMenuEventArgs e) { … … 252 269 button = this.selectButton; 253 270 break; 254 case ControllerBase.PanToolName:255 button = this.panButton;256 break;257 271 case ControllerBase.ConnectionToolName: 258 272 button = this.connectButton; … … 268 282 ITool tool = this.graphVisualizationInfoView.Controller.Tools.Where(t => t.Name == ControllerBase.SelectionToolName).First(); 269 283 this.graphVisualizationInfoView.Controller.DeactivateAllTools(); 270 }271 272 private void panButton_Click(object sender, EventArgs e) {273 this.graphVisualizationInfoView.Controller.ActivateTool(ControllerBase.PanToolName);274 284 } 275 285
Note: See TracChangeset
for help on using the changeset viewer.