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/AlignTopEdgesTool.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 top edges of the selected entities.
     7  /// </summary>
     8  // ----------------------------------------------------------------------
     9  public class AlignTopEdgesTool : AlignmentToolBase {
     10    // ------------------------------------------------------------------
    1111    /// <summary>
    12     /// Aligns the top edges of the selected entities.
     12    /// Constructor.
    1313    /// </summary>
    14     // ----------------------------------------------------------------------
    15     public class AlignTopEdgesTool : AlignmentToolBase
    16     {
    17         // ------------------------------------------------------------------
    18         /// <summary>
    19         /// Constructor.
    20         /// </summary>
    21         /// <param name="toolName">string: The name of this tool</param>
    22         // ------------------------------------------------------------------
    23         public AlignTopEdgesTool(string toolName)
    24             : base(toolName)
    25         {
    26         }
     14    /// <param name="toolName">string: The name of this tool</param>
     15    // ------------------------------------------------------------------
     16    public AlignTopEdgesTool(string toolName)
     17      : base(toolName) {
     18    }
    2719
    28         // ------------------------------------------------------------------
    29         /// <summary>
    30         /// Aligns the top edges of all selected entities.  The vertical
    31         /// location of the first entity in the selection is used for all
    32         /// other entities vertical location.
    33         /// </summary>
    34         // ------------------------------------------------------------------
    35         public override void Align(IDiagramEntity[] entities)
    36         {
    37             // We want to align the top edges, so we need to set the
    38             // vertical location of each shape to one value.  We're
    39             // going use the first entity in the selection to determine
    40             // this setting.
    41             Point offset;
     20    // ------------------------------------------------------------------
     21    /// <summary>
     22    /// Aligns the top edges of all selected entities.  The vertical
     23    /// location of the first entity in the selection is used for all
     24    /// other entities vertical location.
     25    /// </summary>
     26    // ------------------------------------------------------------------
     27    public override void Align(IDiagramEntity[] entities) {
     28      // We want to align the top edges, so we need to set the
     29      // vertical location of each shape to one value.  We're
     30      // going use the first entity in the selection to determine
     31      // this setting.
     32      Point offset;
    4233
    43             for (int i = 1; i < entities.Length; i++)
    44             {
    45                 IDiagramEntity entity = entities[i];
     34      for (int i = 1; i < entities.Length; i++) {
     35        IDiagramEntity entity = entities[i];
    4636
    47                 // Keep the entities same y location but offset it's
    48                 // x location.
    49                 offset = new Point(
    50                     0,
    51                     this.topEdgeOfFirstEntity - entity.Rectangle.Top);
     37        // Keep the entities same y location but offset it's
     38        // x location.
     39        offset = new Point(
     40            0,
     41            this.topEdgeOfFirstEntity - entity.Rectangle.Top);
    5242
    53                 // Move the entity by this amount.
    54                 entity.MoveBy(offset);
    55             }
    56         }
     43        // Move the entity by this amount.
     44        entity.MoveBy(offset);
     45      }
    5746    }
     47  }
    5848}
Note: See TracChangeset for help on using the changeset viewer.