コード例 #1
0
 public override void Undo()
 {
     foreach (IShape wShape in FShapes)
     {
         wShape.IsSelected = true;
         wShape.Rotate(FAngle * -1);
     }
     FCanvas.Draw();
 }
コード例 #2
0
ファイル: CloneCommand.cs プロジェクト: ko-kato-being/WFCAD
 public override void Undo()
 {
     foreach (IShape wShape in FBaseShapes)
     {
         wShape.IsSelected = true;
         FCanvas.Shapes.RemoveAt(FCanvas.Shapes.Count - 1);
     }
     FCanvas.Draw();
 }
コード例 #3
0
 public override void Undo()
 {
     foreach (IShape wShape in FShapes)
     {
         wShape.IsSelected = true;
         wShape.Move(FEndPoint, FStartPoint);
     }
     FCanvas.Draw();
 }
コード例 #4
0
ファイル: CloneCommand.cs プロジェクト: ko-kato-being/WFCAD
 public override void Execute()
 {
     foreach (IShape wShape in FBaseShapes)
     {
         wShape.IsSelected = false;
     }
     FCanvas.Shapes.AddRange(FShapes);
     FCanvas.Draw();
 }
コード例 #5
0
ファイル: PasteCommand.cs プロジェクト: ko-kato-being/WFCAD
 public override void Execute()
 {
     FShapes = FCanvas.Shapes.Where(x => x.IsSelected).ToList();
     foreach (IShape wShape in FShapes)
     {
         wShape.IsSelected = false;
     }
     FCanvas.Shapes.AddRange(FCanvas.Clipboad.Select(x => x.DeepClone()));
     foreach (IShape wShape in FCanvas.Clipboad)
     {
         wShape.Move(new SizeF(10, 10));
     }
     FCanvas.Draw();
 }
コード例 #6
0
ファイル: PasteCommand.cs プロジェクト: ko-kato-being/WFCAD
 public override void Undo()
 {
     foreach (IShape wShape in FShapes)
     {
         wShape.IsSelected = true;
     }
     for (int i = 0; i < FCanvas.Clipboad.Count; i++)
     {
         FCanvas.Shapes.RemoveAt(FCanvas.Shapes.Count - 1);
     }
     foreach (IShape wShape in FCanvas.Clipboad)
     {
         wShape.Move(new SizeF(-10, -10));
     }
     FCanvas.Draw();
 }
コード例 #7
0
        public override void Execute()
        {
            FShape.IsSelected = true;
            IShape wShape;

            if (FCanvas.IsPreviewing)
            {
                wShape = FShape.DeepClone();
                wShape.FramePoints.Single(x => x.CurrentLocationKind == FramePointLocationKindEnum.Bottom).IsSelected = true;
            }
            else
            {
                wShape = FShape;
            }
            FCanvas.Shapes.Add(wShape);
            FCanvas.Draw();
        }
コード例 #8
0
 public override void Undo()
 {
     FCanvas.Shapes.Remove(FShape);
     FCanvas.Draw();
 }
コード例 #9
0
ファイル: ResetCommand.cs プロジェクト: ko-kato-being/WFCAD
 public override void Execute()
 {
     FCanvas.Shapes.Clear();
     FCanvas.Draw();
 }
コード例 #10
0
ファイル: ResetCommand.cs プロジェクト: ko-kato-being/WFCAD
 public override void Undo()
 {
     FCanvas.Shapes.AddRange(FShapes);
     FCanvas.Draw();
 }