NShape 2.1.0

Rating:        Based on 1 rating
Reviewed:  1 review
Downloads: 168
Released: Dec 20, 2013
Updated: Dec 20, 2013 by KurtHolzinger
Dev status: Stable Help Icon

Downloads

Application NShape_2.1.0.msi
application, 8270K, uploaded Dec 20, 2013 - 168 downloads

Release Notes

There are breaking changes regarding NShape 1.0.8 - please check the ReadMe.txt (installation folder) or Changes.txt (source code).

Changes in 2.1.0:

Interface Changes:
  • Added new method CanConnect to the Dataweb.NShape.Shape interface base class and a default implementation to the ShapeBase class. This method can be used for implementing custom connection behavior like accepting a limited number of connections or accepting only connections of a certain shape type.
  • Added string property "Data" to the Dataweb.NShape.Shape interface class. It can be used for storing user defined string data that will be saved to and loaded from the repository (in contrast to the Tag property).
  • Published constants for the control point ids of most planar shape classes through the nested class ControlPointIds that provides all suitable constants. Derived shapes that change the number of available ControlPoints or their id's have to override this class.
  • protected Point[] PlanarShapeBase.controlPoints is now private.
  • protected void PlanarShapeBase.ResizeControlPoints(int length) has been added. You can resize the control points array using the new method and access its points using the public property ControlPoints. This addresses the problem that controlPoints and ControlPoints did only differ in casing, making it impossible for VB.NET programmers to implement their own PathBasedShapes without changing the source code.
  • Classes PropertyMappingIdAttribute and RequiredPermissionAttribute have been sealed
  • Added a new method GetZOrder to the IShapeCollection interface.
  • Added string property "Description" to the Dataweb.NShape.Project class.
  • Added an overloaded version of Project.IsValidLibrary(...) that returns the reason why the assembly is considered as invalid library assembly (as out parameter).
  • Access modifiers of the following members of the SelectionTool class changed:
    • SelectionTool.FindPreviewOfShape(Shape shape) is now public
    • SelectionTool.FindShapeOfPreview(Shape previewShape) is now public
    • SelectionTool.Action is now a protected enum.
  • Display.EnsureVisible now has an overloaded version that accepts a margin
  • IDiagramPresenter.AcitveTool gives access to the currently used Tool of the diagram presenter
  • Display.ShowGrid was renamed to Display.IsGridVisible (ShowGrid is still available but marked as obsolete)
  • Display.CurrentTool was renamed to Display.ActiveTool (CurrentTool is still available but marked as obsolete)

Changed Behavior:
  • FreeTriangle shapes throw an ArgumentException in CalculateRelativePosition in case the given point is not part of the shape. This shape type does not support points outside the shape bounds.
  • Methods taking an index parameter as argument will no longer throw an "IndexOutOfRangeException" but an "ArgumentOutOfRangeException" (except the style collection's indexer).
  • Backup files created by the XmlStore component now preserve the original file extension by adding the backup file extension instead of replacing it.
  • IDiagramPresenter.EnsureVisible no longer add a margin to the given parameters. There are new overloaded versions of these methods in the Display control offering a margin parameter.

New Features:
  • The SelectionTool provides a new property "OverlappingShapesAction" that specifies the action when clicking on overlapping shapes. The default value is "Cycle" so the default behavior does not change. Alternative values: Do not change the selection ("None") or select the topmost shape ("Topmost").
  • The XmlStore now has a string property BackupFileExtension which allows to customize the file extension of automatically created backup files.
  • Display.IsSheetVisible allows to hide the diagram sheet (including its shadow).

Improvements:
  • ImageBasedShape has now (very basic) implementations of CalculateRelativePosition and CalculateAbsolutePosition
  • Connected linear shapes can now be rotated.
  • Resizing multi segment polylines in "MaintainAspect" mode improved (also affects connected multi segment lines).
  • Setup now allows to specify the installation path for the source code

Bug Fixes:
  • Corrected an error in AutoDisconnectShapesCommand that occured when deleting a shape with model object.
  • Geometry.LineIntersectsLine() returned true for parallel lines with opposing direction vectors
  • DoubleClick with SelectionTool on overlapping shapes no longer results in selecting the shape below the double-clicked shape.
  • Display.DiagramChanging event is now raised before bounds and layers are reset to defaults
  • Methods UnselectShape() and UnselectAll() do not raise any longer a Display.ShapesSelected event if no shapes are selected.
  • Display.ShapesInserted is now raised before Display.ShapesSelected.
  • AggregatedCommand caused endless self-recursion if a necessecary permission was not granted.
  • When inserting a shape into the repository, the display component fired the ShapesSelected event before the ShapesInserted event.
  • Pasting a shape fired multiple ShapesSelected events
  • Removed a Debug Assertion when copying diagrams as metafile to the clipboard. This assertion failed when copying larger diagrams or diagrams with complex graphics due to timing problems of asynchroneous calls.
  • NShapeDesigner's "Select All" menu items now use Display.SelectAll() instead of Display.SelectShapes(Display.Diagram.Shapes, false)
  • LabelBase did not calculate the correct number of cells for the diagram's spatial index when connected. This caused "Entity Not Found in Repository" exceptions when trying to delete these labels in case the glue point was in another spatial index cell as the label's body.
  • LineShapeBase did not check whether the cap's shape points were calculated before performing an intersection calcuation in StartCapIntersectsWith and EndCapIntersectsWith which resulted in an ArgumentNullException.
  • Events Display.KeyDown, Display.KeyUp and Display.KeyPress now take EventArgs.Handled into account correctly.
  • The following shape classes did not calculate the correct relative and/or absolute position:
    • ShapeGroup
    • RegularPolygon
    • ImageBasedShape
  • Connections between grouped (or aggregated) shapes were not stored to XML
  • Connected shapes inside groups or composite shapes were moved to the wrong positions when moving, rotating or resizing the group/composite shape
  • Hit test did not work correctly when clicking a line cap of type "OpenArrow"
  • Trying to open LayerPresenter's content menu caused a ArgumentNullException when the attached display had no diagram.
  • When creating the SelectionTool, the ToolBoxController no longer raises the ToolSelected event before the ToolAdded event.
  • Corrected example in documentation "Programmer Tasks > Customizing Context Menus > Integrate NShape Commands in your Own Context Menus": The code of the lambda expression now extracts the MenuItemDef from the context menu item and executes it.
  • SoftwareArchitecture.EntityShape now handles deleting items of string array property "ColumnNames" correctly when assigning an other string array to this property. Throws an exception if connected control points should be removed.
  • A PolyLine connected to the center point of a RegularPolygone did not calculate the preview shape's position correctly.
  • XmlStore now deletes the existing (old) XML file (and its image directory) when setting XmlStore.BackupGenerationMode to BackupFileGenerationMode.None.
  • Moving connected lines that are grouped or selected together with their partner shapes will no longer move their vertices to strange positions (REQ 20411)
  • When deleting a Shape without its attached model object (delete shape only), the model object will now be correctly detached from the shape.
  • When trying to save a new project over an existing one, there is no longer an "already exists" error message

Reviews for this release

     
Good! It's very helpful to me.
by ew8cn on Jan 3, 2014 at 2:27 AM