Free cookie consent management tool by TermsFeed Policy Generator

Changeset 2899


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

added buttons to view (ticket #867)

Location:
trunk/sources/HeuristicLab.Operators.Views.GraphVisualization/3.3
Files:
1 deleted
4 edited

Legend:

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

    r2893 r2899  
    328328    }
    329329
    330     #region methods for toolbar items
    331     internal void RelayoutOperatorGraph() {
     330    internal void RelayoutGraph() {
    332331      if (this.shapeInfoShapeMapping.Count > 0
    333332        && this.connectionConnectorsMapping.Count > 0
     
    338337      }
    339338    }
    340 
    341     internal void ActivateConnectionTool() {
    342       this.graphVisualization.Controller.ActivateTool(ControllerBase.ConnectionToolName);
    343     }
    344 
    345     internal void ActivateZoomAreaTool() {
    346       this.graphVisualization.Controller.ActivateTool(ControllerBase.ZoomAreaToolName);
    347     }
    348 
    349     internal void ActivateZoomInTool() {
    350       this.graphVisualization.Controller.ActivateTool(ControllerBase.ZoomInToolName);
    351     }
    352 
    353     internal void ActivateZoomOutTool() {
    354       this.graphVisualization.Controller.ActivateTool(ControllerBase.ZoomOutToolName);
    355     }
    356 
    357     internal void ActivatePanTool() {
    358       this.graphVisualization.Controller.ActivateTool(ControllerBase.PanToolName);
    359     }
    360 
    361     internal void ActivateSelectTool() {
    362       this.graphVisualization.Controller.ActivateTool(ControllerBase.SelectionToolName);
    363     }
    364     #endregion
    365339  }
    366340}
  • trunk/sources/HeuristicLab.Operators.Views.GraphVisualization/3.3/HeuristicLab.Operators.Views.GraphVisualization-3.3.csproj

    r2898 r2899  
    110110    </Compile>
    111111    <Compile Include="Model\ShapeInfoFactory.cs" />
    112     <Compile Include="ToolBarItems\ConnectionToolBarItem.cs" />
    113     <Compile Include="ToolBarItems\SelectToolBarItem.cs" />
    114     <Compile Include="ToolBarItems\PanToolBarItem.cs" />
    115     <Compile Include="ToolBarItems\ZoomOutToolBarItem.cs" />
    116     <Compile Include="ToolBarItems\ZoomInToolBarItem.cs" />
    117     <Compile Include="ToolBarItems\ZoomToolBarItem.cs" />
    118     <Compile Include="ToolBarItems\ToolBarItemSeparator.cs" />
    119     <Compile Include="ToolBarItems\RelayoutToolBarItem.cs" />
    120112  </ItemGroup>
    121113  <ItemGroup>
  • trunk/sources/HeuristicLab.Operators.Views.GraphVisualization/3.3/OperatorGraphView.Designer.cs

    r2898 r2899  
    3333      this.detailsGroupBox = new System.Windows.Forms.GroupBox();
    3434      this.detailsViewHost = new HeuristicLab.Core.Views.ViewHost();
    35       this.connectorToolTip = new System.Windows.Forms.ToolTip(this.components);
     35      this.selectButton = new System.Windows.Forms.Button();
     36      this.panButton = new System.Windows.Forms.Button();
     37      this.connectButton = new System.Windows.Forms.Button();
     38      this.relayoutButton = new System.Windows.Forms.Button();
     39      this.zoomAreaButton = new System.Windows.Forms.Button();
     40      this.zoomInButton = new System.Windows.Forms.Button();
     41      this.zoomOutButton = new System.Windows.Forms.Button();
    3642      this.shapeContextMenu.SuspendLayout();
    3743      this.splitContainer.Panel1.SuspendLayout();
     
    4349      // graphVisualizationInfoView
    4450      //
     51      this.graphVisualizationInfoView.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
     52                  | System.Windows.Forms.AnchorStyles.Left)
     53                  | System.Windows.Forms.AnchorStyles.Right)));
    4554      this.graphVisualizationInfoView.Caption = null;
    4655      this.graphVisualizationInfoView.Content = null;
    47       this.graphVisualizationInfoView.Dock = System.Windows.Forms.DockStyle.Fill;
    48       this.graphVisualizationInfoView.Location = new System.Drawing.Point(0, 0);
     56      this.graphVisualizationInfoView.Location = new System.Drawing.Point(0, 27);
    4957      this.graphVisualizationInfoView.Name = "graphVisualizationInfoView";
    50       this.graphVisualizationInfoView.Size = new System.Drawing.Size(665, 279);
     58      this.graphVisualizationInfoView.Size = new System.Drawing.Size(665, 251);
    5159      this.graphVisualizationInfoView.TabIndex = 0;
    5260      //
     
    9199      // splitContainer.Panel1
    92100      //
     101      this.splitContainer.Panel1.Controls.Add(this.zoomOutButton);
     102      this.splitContainer.Panel1.Controls.Add(this.zoomInButton);
     103      this.splitContainer.Panel1.Controls.Add(this.zoomAreaButton);
     104      this.splitContainer.Panel1.Controls.Add(this.relayoutButton);
     105      this.splitContainer.Panel1.Controls.Add(this.connectButton);
     106      this.splitContainer.Panel1.Controls.Add(this.panButton);
     107      this.splitContainer.Panel1.Controls.Add(this.selectButton);
    93108      this.splitContainer.Panel1.Controls.Add(this.graphVisualizationInfoView);
    94109      //
     
    121136      this.detailsViewHost.ViewType = null;
    122137      //
    123       // connectorToolTip
    124       //
    125       this.connectorToolTip.IsBalloon = true;
     138      // selectButton
     139      //
     140      this.selectButton.Image = HeuristicLab.Common.Resources.Resources.FlagGreenIcon;
     141      this.selectButton.Location = new System.Drawing.Point(3, 3);
     142      this.selectButton.Name = "selectButton";
     143      this.selectButton.Size = new System.Drawing.Size(24, 24);
     144      this.selectButton.TabIndex = 1;
     145      this.selectButton.UseVisualStyleBackColor = true;
     146      this.selectButton.Click += new System.EventHandler(selectButton_Click);
     147      //
     148      // panButton
     149      //
     150      this.panButton.Image = HeuristicLab.Common.Resources.Resources.FlagRedIcon;
     151      this.panButton.Location = new System.Drawing.Point(33, 3);
     152      this.panButton.Name = "panButton";
     153      this.panButton.Size = new System.Drawing.Size(24, 24);
     154      this.panButton.TabIndex = 2;
     155      this.panButton.UseVisualStyleBackColor = true;
     156      this.panButton.Click += new System.EventHandler(panButton_Click);
     157      //
     158      // connectButton
     159      //
     160      this.connectButton.Image = HeuristicLab.Common.Resources.VS2008ImageLibrary.Interface;
     161      this.connectButton.Location = new System.Drawing.Point(63, 3);
     162      this.connectButton.Name = "connectButton";
     163      this.connectButton.Size = new System.Drawing.Size(24, 24);
     164      this.connectButton.TabIndex = 3;
     165      this.connectButton.UseVisualStyleBackColor = true;
     166      this.connectButton.Click += new System.EventHandler(connectButton_Click);
     167      //
     168      // relayoutButton
     169      //
     170      this.relayoutButton.Image = HeuristicLab.Common.Resources.VS2008ImageLibrary.RefreshDocument;
     171      this.relayoutButton.Location = new System.Drawing.Point(123, 3);
     172      this.relayoutButton.Name = "relayoutButton";
     173      this.relayoutButton.Size = new System.Drawing.Size(24, 24);
     174      this.relayoutButton.TabIndex = 4;
     175      this.relayoutButton.UseVisualStyleBackColor = true;
     176      this.relayoutButton.Click += new System.EventHandler(relayoutButton_Click);
     177      //
     178      // zoomAreaButton
     179      //
     180      this.zoomAreaButton.Image = HeuristicLab.Common.Resources.VS2008ImageLibrary.Zoom;
     181      this.zoomAreaButton.Location = new System.Drawing.Point(153, 3);
     182      this.zoomAreaButton.Name = "zoomAreaButton";
     183      this.zoomAreaButton.Size = new System.Drawing.Size(24, 24);
     184      this.zoomAreaButton.TabIndex = 5;
     185      this.zoomAreaButton.UseVisualStyleBackColor = true;
     186      this.zoomAreaButton.Click += new System.EventHandler(zoomAreaButton_Click);
     187      //
     188      // zoomInButton
     189      //
     190      this.zoomInButton.Image = HeuristicLab.Common.Resources.Resources.ShowLargeIcons;
     191      this.zoomInButton.Location = new System.Drawing.Point(183, 3);
     192      this.zoomInButton.Name = "zoomInButton";
     193      this.zoomInButton.Size = new System.Drawing.Size(24, 24);
     194      this.zoomInButton.TabIndex = 6;
     195      this.zoomInButton.UseVisualStyleBackColor = true;
     196      this.zoomInButton.Click += new System.EventHandler(zoomInButton_Click);
     197      //
     198      // zoomOutButton
     199      //
     200      this.zoomOutButton.Image = HeuristicLab.Common.Resources.Resources.ShowSmallIcons;
     201      this.zoomOutButton.Location = new System.Drawing.Point(213, 3);
     202      this.zoomOutButton.Name = "zoomOutButton";
     203      this.zoomOutButton.Size = new System.Drawing.Size(24, 24);
     204      this.zoomOutButton.TabIndex = 7;
     205      this.zoomOutButton.UseVisualStyleBackColor = true;
     206      this.zoomOutButton.Click += new System.EventHandler(zoomOutButton_Click);
    126207      //
    127208      // OperatorGraphView
     
    153234    private System.Windows.Forms.GroupBox detailsGroupBox;
    154235    private HeuristicLab.Core.Views.ViewHost detailsViewHost;
    155     private System.Windows.Forms.ToolTip connectorToolTip;
     236    private System.Windows.Forms.Button selectButton;
     237    private System.Windows.Forms.Button zoomOutButton;
     238    private System.Windows.Forms.Button zoomInButton;
     239    private System.Windows.Forms.Button zoomAreaButton;
     240    private System.Windows.Forms.Button relayoutButton;
     241    private System.Windows.Forms.Button connectButton;
     242    private System.Windows.Forms.Button panButton;
    156243  }
    157244}
  • 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.