Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
07/22/10 00:44:01 (14 years ago)
Author:
swagner
Message:

Sorted usings and removed unused usings in entire solution (#1094)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.Netron/3.0.2672.12446/Netron.Diagramming.Core-3.0.2672.12446/Tools/AlignCentersHorizontallyTool.cs

    r2768 r4068  
    1 using System;
    2 using System.Collections.Generic;
    3 using System.Text;
    4 using System.Collections;
    51using System.Drawing;
    6 using System.Windows.Forms;
    72
    8 namespace Netron.Diagramming.Core
    9 {
    10     // ----------------------------------------------------------------------
     3namespace Netron.Diagramming.Core {
     4  // ----------------------------------------------------------------------
     5  /// <summary>
     6  /// Aligns the center of the selected entities horizontally.
     7  /// </summary>
     8  // ----------------------------------------------------------------------
     9  public class AlignCentersHorizontallyTool : AlignmentToolBase {
     10    // ------------------------------------------------------------------
    1111    /// <summary>
    12     /// Aligns the center of the selected entities horizontally.
     12    /// Constructor.
    1313    /// </summary>
    14     // ----------------------------------------------------------------------
    15     public class AlignCentersHorizontallyTool : AlignmentToolBase
    16     {
    17         // ------------------------------------------------------------------
    18         /// <summary>
    19         /// Constructor.
    20         /// </summary>
    21         /// <param name="toolName">string: The name of this tool</param>
    22         // ------------------------------------------------------------------
    23         public AlignCentersHorizontallyTool(string toolName)
    24             : base(toolName)
    25         {
    26         }
     14    /// <param name="toolName">string: The name of this tool</param>
     15    // ------------------------------------------------------------------
     16    public AlignCentersHorizontallyTool(string toolName)
     17      : base(toolName) {
     18    }
    2719
    28         // ------------------------------------------------------------------
    29         /// <summary>
    30         /// Aligns the center of all selected entities horizontally.  The
    31         /// 'X' component of the center location of the first entity in the
    32         /// selection is used for all other entities.
    33         /// </summary>
    34         // ------------------------------------------------------------------
    35         public override void Align(IDiagramEntity[] entities)
    36         {
    37             // The amount to offset the entities by.
    38             Point offset;
     20    // ------------------------------------------------------------------
     21    /// <summary>
     22    /// Aligns the center of all selected entities horizontally.  The
     23    /// 'X' component of the center location of the first entity in the
     24    /// selection is used for all other entities.
     25    /// </summary>
     26    // ------------------------------------------------------------------
     27    public override void Align(IDiagramEntity[] entities) {
     28      // The amount to offset the entities by.
     29      Point offset;
    3930
    40             for (int i = 1; i < entities.Length; i++)
    41             {
    42                 IDiagramEntity entity = entities[i];
     31      for (int i = 1; i < entities.Length; i++) {
     32        IDiagramEntity entity = entities[i];
    4333
    44                 // Keep the entities same y location but offset it's
    45                 // x location.
    46                 offset = new Point(
    47                     this.centerOfFirstEntity.X - entity.Center.X,
    48                     0);
     34        // Keep the entities same y location but offset it's
     35        // x location.
     36        offset = new Point(
     37            this.centerOfFirstEntity.X - entity.Center.X,
     38            0);
    4939
    50                 // Move the entity by this amount.
    51                 entity.MoveBy(offset);
    52             }
    53         }
     40        // Move the entity by this amount.
     41        entity.MoveBy(offset);
     42      }
    5443    }
     44  }
    5545}
Note: See TracChangeset for help on using the changeset viewer.