Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
03/01/10 16:22:11 (14 years ago)
Author:
mkommend
Message:

added buttons to view (ticket #867)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/sources/HeuristicLab.Operators.Views.GraphVisualization/3.3/OperatorGraphView.cs

    r2898 r2899  
    6666      this.graphVisualizationInfoView.Content = this.VisualizationInfo;
    6767      if (createdVisualizationInfo)
    68         this.graphVisualizationInfoView.RelayoutOperatorGraph();
     68        this.graphVisualizationInfoView.RelayoutGraph();
    6969    }
    7070
     
    158158    #endregion
    159159
    160     #region methods for toolbar items
    161     internal void RelayoutOperatorGraph() {
    162       this.graphVisualizationInfoView.RelayoutOperatorGraph();
    163     }
    164 
    165     internal void ActivateConnectionTool() {
    166       this.graphVisualizationInfoView.ActivateConnectionTool();
    167     }
    168 
    169     internal void ActivateZoomAreaTool() {
    170       this.graphVisualizationInfoView.ActivateZoomAreaTool();
    171     }
    172 
    173     internal void ActivateZoomInTool() {
    174       this.graphVisualizationInfoView.ActivateZoomInTool();
    175     }
    176 
    177     internal void ActivateZoomOutTool() {
    178       this.graphVisualizationInfoView.ActivateZoomOutTool();
    179     }
    180 
    181     internal void ActivatePanTool() {
    182       this.graphVisualizationInfoView.ActivatePanTool();
    183     }
    184 
    185     internal void ActivateSelectTool() {
    186       this.graphVisualizationInfoView.ActivateSelectTool();
    187     }
    188     #endregion
    189 
    190160    #region drag and drop
    191161    private void OperatorGraphView_DragEnter(object sender, DragEventArgs e) {
     
    212182
    213183    #endregion
     184
     185    private void selectButton_Click(object sender, EventArgs e) {
     186      ITool tool = this.graphVisualizationInfoView.Controller.Tools.Where(t => t.Name == ControllerBase.SelectionToolName).First();
     187      tool.IsSuspended = false;
     188      tool = this.graphVisualizationInfoView.Controller.Tools.Where(t => t.Name == ControllerBase.PanToolName).First();
     189      this.graphVisualizationInfoView.Controller.DeactivateTool(tool);
     190    }
     191
     192    private void panButton_Click(object sender, EventArgs e) {
     193      ITool tool = this.graphVisualizationInfoView.Controller.Tools.Where(t => t.Name == ControllerBase.SelectionToolName).First();
     194      tool.IsSuspended = true;
     195      this.graphVisualizationInfoView.Controller.ActivateTool(ControllerBase.PanToolName);
     196    }
     197
     198    private void connectButton_Click(object sender, EventArgs e) {
     199      this.graphVisualizationInfoView.Controller.ActivateTool(ControllerBase.ConnectionToolName);
     200    }
     201
     202    private void relayoutButton_Click(object sender, EventArgs e) {
     203      this.graphVisualizationInfoView.RelayoutGraph();
     204    }
     205
     206    private void zoomAreaButton_Click(object sender, EventArgs e) {
     207      this.graphVisualizationInfoView.Controller.ActivateTool(ControllerBase.ZoomAreaToolName);
     208    }
     209
     210    private void zoomInButton_Click(object sender, EventArgs e) {
     211      this.graphVisualizationInfoView.Controller.ActivateTool(ControllerBase.ZoomInToolName);
     212    }
     213
     214    private void zoomOutButton_Click(object sender, EventArgs e) {
     215      this.graphVisualizationInfoView.Controller.ActivateTool(ControllerBase.ZoomOutToolName);
     216    }
    214217  }
    215218}
Note: See TracChangeset for help on using the changeset viewer.