This project has moved and is read-only. For the latest updates, please go here.

NShape 2.2.0 (Updated Setup)

Rating: No reviews yet
Downloads: 2731
Released: Apr 28, 2014
Updated: Jun 16, 2016 by KurtHolzinger
Dev status: Stable Help Icon

Recommended Download

Application NShape 2.2.0 Installer (incl. Source Code)
application, 11114K, uploaded Jun 13, 2014 - 2731 downloads

Release Notes

In the previous NShape 2.2.0 Setup, the source code for WinFormsUI was missing. In this updated setup, it's included again.
Uninstall NShape 2.2.0 and re-install it using this setup.

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

Changes in 2.2.0:

Interface Changes:
  • IDisplayService.NotifyBoundsChanged is obsolete now. Use the Resized event of the diagram instead (see below).
  • Changed several event args classes:
    • EventArgs class ShapeMouseEventArgs (unused) was deleted.
    • EventArgs class ShapeEventArgs (unused) was renamed to ShapesEventArgs
    • EventArgs class DiagramShapeEventArgs (unused) was renamed to DiagramShapesEventArgs
    • EventArgs class ShapeEventArgs was added.
    • EventArgs class DiagramPresenterShapeEventArgs was added
  • IDiagramPresenter interface is now derived from ISynchronizeInvoke in order to enable thread synchronized timer events (when using System.Timers.Timer's property "SynchronizingObject").
  • Added IDisplayPresenter.CloseCaptionEditor(bool applyChanges)
  • Added three events to IDisplayPresenter:
    • event EventHandler<DiagramPresenterShapeEventArgs> ShapeMoved;
    • event EventHandler<DiagramPresenterShapeEventArgs> ShapeResized;
    • event EventHandler<DiagramPresenterShapeEventArgs> ShapeRotated;
  • Added boolean property CanModifyVersion to the IRepository interface. Specifies whether the current repository implementation supports upgrading the load/save version of the repository.
  • Added Method UpgradeVersion to the IRepository interface which will upgrade the load/save version of a repository (or throw an exception if upgrading is not supported).
  • Added boolean property CanModifyVersion to the Store base class. The shipped XmlStore will support upgrading load/save version whereas the shipped AdoNetStore will not.
  • Added the following members to the XmlStore class (see new features for details):
    • bool LazyLoading { get; set; }
    • ImageFileLocation ImageLocation { get; set; }
  • Added four events to the Diagram class:
    • event EventHandler<ShapeEventArgs> ShapeMoved;
    • event EventHandler<ShapeEventArgs> ShapeResized;
    • event EventHandler<ShapeEventArgs> ShapeRotated;
    • event EventHandler Resized;
  • Base class "Shape" was extended by the following protected members in order to enable custom collection implementations for the Shape.Children collection.
    • protected ShapeAggregation ChildrenCollection { get; } Provides access to the collection that stores and manages the shape's child shapes. The collection is null by default and will be created when needed and deleted when not needed any more.
    • protected virtual ShapeAggregation CreateChildrenCollection(int capacity) Creates an instance of the children collection with the given capacity. Override his method if a custom implementation of the children collection is needed.
  • Added two methods to the ICaptionedShape interface:
    • bool GetCaptionIsVisible(int index)
    • void SetCaptionIsVisible(int index, bool isVisible)
  • For implementing the new methods above, a new property bool IsVisible { get; set; } was added to the Caption class.
  • Base class Tool has now a property DoubleClickTime that takes the interval (in ms) used for interpreting two subsequent clicks as double click.
  • Added three protected virtual methods to ReposioryWriter Base class:
    • protected virtual void DoWriteModelObject(IModelObject modelObject)
    • protected virtual void DoWriteStyle(IStyle style)
    • protected virtual void DoWriteTemplate(Template template)
  • Added constructor overloads to the DelegateMenuItemDef class
  • Data type of Geometry.Signum changed from int to sbyte.
  • Moved the following (never implemented) methods from class CachedRepository to class Project and implemented them:
    • string GetXml()
    • void WriteXml(Stream stream)
    • void OpenXml(Stream stream)

Changed Behavior:
  • The CachedRepository now allows the assignment of a store while repository is open in case that no store exists yet.
  • NShapeDesigner no longer asks for a file name when creating a new XML project. Instead, no store is created in this case in the first place. It will be created when saving the project for the first time.
  • Holding down the control key while moving a shape means now 'Toggle snapping to grid' instead of 'Do not snap to grid'.
  • When clicking on overlapping shapes (with OverlappingShapesAction != None), the selection of the next/topmost shape will be deferred until the double click detection time elapses.
  • Tools never received MouseUp events with clicks > 1 because WinForms controls reset the click count before raising the MouseUp event of the double click's second click. In Addition to that, multi-clicks are now supported (tripple-click, quadruple-click, etc) as the click count will not be reset after a double click (as WinForms controls do).

New Features:
  • XmlStore now supports partial loading for improved performance. Partial loading is disabled by default (for backwards compatibility) and can be enabled using the XmlStore.LazyLoading property: When loading diagrams, the diagram instance is loaded without contents. The diagram contents have to be loaded explicitly by calling the IRepository.GetDiagramShapes method. Make sure that all diagram shapes have been loaded before saving!
  • XmlStore provides a new property ImageLocation which specifies whether images are stored in a seperate directory (as it was until now) or whether images are embedded into the XML file as base64 encoded string. When loading an existing XML file, the ImageLocation setting of the file will be determined and used until it the XmlStore is closed or the ImageLocation is overridden by setting the ImageLocation property while the XmlStore is open.
  • NShapeDesigner implements the new 'Upgrade Version' feature (see Interface changes above.
  • NShapeDesigner implements the new 'Use Embedded Images' feature (see above).
  • NShapeDesigner implements Project.GetXml (see above) with menu item "Export Repository to Clipboard (XML)" located in the "File" menu.
  • NShapeDesigner implements Project.OpenXml (see above) with menu item "Import Repository from Clipboard (XML)" located in the "File" menu.

  • XmlStore has an additional constructor that takes a stream instead of a directory and a file extension. If the XmlStore was constructed using this constructor, the stream will be used for loading/saving for the lifetime of the XmlStore.
  • Inserting diagrams with duplicate names in the repository will now raise an exception.
  • You can now select "None" as color for line caps. In this case, the line cap will be filled with the color of the line.
  • Updated all demo projects to version 5 (using embedded images).
  • Updated documentation to reflect all interface changes of the last few versions and added several yet undocumentated classes.

Bug Fixes:
  • Clicking the save button in NShapeDesigner while editing the caption of a shape will no longer cause an exception.
  • NShape components will now remove all registered event handlers propertly.
  • Undoing "ungroup" on a rotated group now reverts the rotation of the group members correctly
  • When creating linear shapes, the connection points near the mouse cursor are now drawn.
  • Constructor AggregatedCommand(IRepository repository, IEnumerable<ICommand> commands) no longer raises a NullRegerenceException.
  • XmlRepositoryReader.ReadDate() did not advance the underlying XmlReader to the next attribute.
  • NShape 1.0.0 to 1.0.3 "Repository Version 2" stored templates including their title. NShape 1.0.4 to NShape 2.1.1 neither store nor read the template's title for version 2 repositories, thus breaking compatibility with old repository files. As NShape 1.0.4 also introduced the "Repository Version 3" storage format (default for new projects), we repaired the compatibility issue so you can now open "Version 2" repositories created with NShape 1.0.0 - 1.0.3 but not "Version 2" repositories created with NShape 1.0.4 - 2.1.1. If you need to open old version 2 files, please insert an attribute "title" between the "name" and the "description" attribute of all template tags: <template id="xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx" name="xxxxxxxx" description=""> becomes <template id="xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx" name="xxxxxxxx" title="" description="">
  • The project component no longer accepts version 1 as minimum repository version. Version 2 is the correct minimum load/save version as NShape 1.0.0 was released creating version 2.
  • XmlStore did never call "SaveInnerObjects" method of model objects.
  • Added a workaround for an issue that causes an OutOfMemoryException in the underlying GDI+ Flat API functions when trying to draw lines with intersecting line caps.

Reviews for this release

No reviews yet for this release.