NShape Reference
Project Class

<< Click to Display Table of Contents >>

Navigation:  Class Reference > Namespace Dataweb.NShape >

NShape Reference
Project Class

Previous pageReturn to chapter overviewNext page

Represents a NShape project.

Syntax

public class Project: Component, IRegistrarIStyleSetProvider

Description

The project is the mandatory root object in every diagramming application. It holds references to the repository, the diagrams, the history, the security, the designs and the loaded libraries.

Public Properties

Name

Description

AutoGenerateTemplates

Specifies whether the project creates templates for each item in registered shape and model libraries.

AutoLoadLibraries

Specifies whether the project automatically loads missing libraries when opening a repository.

Description

Gets or sets a descriptive text for the project.

Design

Accesses the styles used for the project.

History

Provides undo/redo capability for the project.

IsOpen

Indicates whether the project is open.

Libraries

Retrieves the registered libraries.

LibrarySearchPaths

Specifies the directories, where NShape libraries are looked up when loading a project.

ModelObjectTypes

Lists the model object types of the project.

Name

Specifies the name of the project.
XMLStore will use the Name of the project as file name for the XML repository file.

ProductVersion

Specifies the version of the assembly containing the component.

Repository

Specifies the repository used to store the project.

SecurityManager

Specifies the security manager used for the project.

Settings

Accesses the project settings.

ShapeTypes

Provides access to the registered shape types.

StyleSet

Retrieves the project's styles as IStyleSet.

Public Methods

Name

Description

AddLibrary

Adds a static library to the project.

AddLibraryByName

Adds a dynamic library to the project.
See .NET framework documentation of
public static Assembly Load(string assemblyString)
on details how the assembly name is resolved.

AddLibraryByFilePath

Adds a dynamic library to the project.
Loads the assembly from the given full qualified path.

ApplyDesign

Uses the given design for the project.

Close

Closes the project.

Create

Creates and opens a new project.

Dispose

Releases all resources used by the Component.

Equals

Determines whether the specified System.Object instances are considered equal.

ExecuteCommand

Executes a command and adds it to the project's history.

GetXml

Returns the XML representation of the data stored in the repository.

IsValidLibrary

Checks if the assembly is a valid NShape library.

Open

Opens an existing project.

ReadXml

Reads XML data into the project using the specified System.IO.Stream.
Throws an exception if an IRepository instance is assigned. The repository will be created.

RegisterEntityTypes

Registers all entities with the repository.

RegisterLibrary

Registers a library.

RegisterModelObjectType

Registers a model object type from a library.

RegisterShapeType

Registers a shape type from a library.

RemoveAllLibraries

Unloads and removes all libraries.

RemoveLibrary

Unloads and removes the given library.

ToString

Returns a String containing the name of the Component, if any. This method should not be overridden.

UpgradeVersion

Modifies repository version of this project to the latest version supported by the repository and the loaded libraries.

WriteXml

Reads XML data into the project using the specified System.IO.Stream.  Throws an exception if a Repository instance is assigned. The repository will be created.

Public Events

Name

Description

Closed

Occurs when the project was closed.

Closing

Occurs when the the project is going to be closed.

LibraryLoaded

Occurs when a diagramming library was loaded.

Opened

Occurs when the the project was opened.

StyleChanged

Occurs when styles were changed.

Requirements

Namespace: Dataweb.NShape

Assembly: Dataweb.NShape