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/UndoRedo/Commands/AddMultiPointShapeCommand.cs

    r2768 r4068  
    11using System;
    2 using System.Collections.Generic;
    3 using System.Text;
    42using System.Drawing;
    5 namespace Netron.Diagramming.Core
    6 {
    7     /// <summary>
    8     /// ICommand implementation of the AddShape action
    9     /// </summary>
    10     class AddMultiPointShapeCommand : Command
    11     {
    12         IShape shape;       
     3namespace Netron.Diagramming.Core {
     4  /// <summary>
     5  /// ICommand implementation of the AddShape action
     6  /// </summary>
     7  class AddMultiPointShapeCommand : Command {
     8    IShape shape;
    139
    14         public IShape Shape
    15         {
    16             get { return shape; }
    17         }
     10    public IShape Shape {
     11      get { return shape; }
     12    }
    1813
    19        
    2014
    21         public  AddMultiPointShapeCommand(IController controller, IShape shape) :base(controller)
    22         {
    23             if (shape == null)
    24                 throw new ArgumentNullException("The shape is 'null' and cannot be inserted.");           
    25             this.Text = "Add " + shape.EntityName;         
    2615
    27            
    28             this.shape = shape;
    29         }
     16    public AddMultiPointShapeCommand(IController controller, IShape shape)
     17      : base(controller) {
     18      if (shape == null)
     19        throw new ArgumentNullException("The shape is 'null' and cannot be inserted.");
     20      this.Text = "Add " + shape.EntityName;
    3021
    31         public override void Redo()
    32         {
    33             Controller.Model.AddShape(shape);
    34             Rectangle rec = shape.Rectangle;
    35             rec.Inflate(20, 20);
    36             Controller.View.Invalidate(rec);           
    37         }
    3822
    39         public override void Undo()
    40         {
    41             Rectangle rec = shape.Rectangle;
    42             rec.Inflate(20, 20);
    43             Controller.Model.RemoveShape(shape);
     23      this.shape = shape;
     24    }
    4425
    45             Controller.View.Invalidate(rec);
    46            
    47         }
     26    public override void Redo() {
     27      Controller.Model.AddShape(shape);
     28      Rectangle rec = shape.Rectangle;
     29      rec.Inflate(20, 20);
     30      Controller.View.Invalidate(rec);
     31    }
    4832
     33    public override void Undo() {
     34      Rectangle rec = shape.Rectangle;
     35      rec.Inflate(20, 20);
     36      Controller.Model.RemoveShape(shape);
     37
     38      Controller.View.Invalidate(rec);
    4939
    5040    }
    5141
     42
     43  }
     44
    5245}
Note: See TracChangeset for help on using the changeset viewer.