/// <summary> /// Creates a multi-move command from the original to the final arrangement. /// </summary> /// <returns></returns> public ICommand CreateLayoutCommand() { MoveShapesToCommand cmd = new MoveShapesToCommand(); for (int i = 0; i < _selectedShapes.Count; ++i) { cmd.AddMoveTo(_selectedShapes[i], SelectedPositions[i].X, SelectedPositions[i].Y, _selectedShapes[i].X, _selectedShapes[i].Y); } RestoreState(); return(cmd); }
/// <summary> /// Creates a multi-move command from the original to the final arrangement. /// </summary> /// <returns></returns> public ICommand CreateLayoutCommand() { MoveShapesToCommand cmd = new MoveShapesToCommand(); for (int i = 0; i < selectedShapes.Count; ++i) cmd.AddMoveTo(selectedShapes[i], selectedPositions[i].X, selectedPositions[i].Y, selectedShapes[i].X, selectedShapes[i].Y); RestoreState(); return cmd; }