Click or drag to resize

ProjectServiceBase Class

Base implementation of the project service.
Inheritance Hierarchy
SystemObject
  Altaxo.DomProjectServiceBase

Namespace: Altaxo.Dom
Assembly: AltaxoBase (in AltaxoBase.dll) Version: 4.8.3572.0 (4.8.3572.0)
Syntax
C#
public abstract class ProjectServiceBase : IProjectService

The ProjectServiceBase type exposes the following members.

Constructors
 NameDescription
Protected methodProjectServiceBaseInitializes a new instance of the ProjectServiceBase class
Top
Properties
 NameDescription
Public propertyCurrentProject Returns the currently open project. For setting, call SetCurrentProject(IProject, Boolean).
Public propertyCurrentProjectArchiveManager Gets or sets the current project archive manager.
Public propertyCurrentProjectFileName Gets the file name for the currently open project. Is null if the project has not got a file name for now. For setting, call SetCurrentProject(IProject, Boolean).
Public propertyProjectFileExtensions Gets all possible file extensions for acceptable project files.
Top
Methods
 NameDescription
Public methodAskForSavingOfProject Asks the user whether or not the project should be saved, and saves it in case the user answers with yes.
Public methodCloseDocumentViews Closes all open views that display the specified document.
Public methodCloseProject Closes the current project and creates a new empty one.
Public methodCloseViewContentThis will remove the controller and its view from the Gui.
Public methodCreateInitialProject Creates the initial project for the application session.
Protected methodCreateNewViewContent_Unsynchronized Creates a new view content for the specified document on the UI thread.
Public methodDeleteDocument This function will delete a project item and close the corresponding views.
Protected methodDeleteDocument_Unsynchronized Deletes a project item on the UI thread.
Public methodDisposeProjectAndSetToNull Replaces the current project with a new unnamed project instance.
Protected methodEhFileOrFolderNameChanged Handles changes of the current project file or folder name.
Protected methodEhProjectDirtyChanged Handles changes of the dirty state of the current project.
Public methodEqualsDetermines whether the specified object is equal to the current object.
(Inherited from Object)
Public methodExchangeCurrentProjectArchiveManagerTemporarilyWithoutDisposing Exchanges the current project archive manager without disposing the old manager. This function is intended to be used twice in succession: 1st to temporarily exchange the current archive manager by another on, and then to change back the new archive manager with the old one.
Public methodExecuteActionsImmediatelyBeforeRunningApplication Executes command-line-driven actions before the application starts its normal run loop.
Protected methodFinalizeAllows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection.
(Inherited from Object)
Public methodGetHashCodeServes as the default hash function.
(Inherited from Object)
Public methodGetMainWindowTitle Gets the title that should be shown as the main window title.
Protected methodGetMainWindowTitleWithComManagerInEmbeddedMode Gets the main window title if the Com manager is in embedded mode.
Protected methodGetMainWindowTitleWithoutComManagerInEmbeddedMode Gets the main window title without being COM manager in embedded mode.
Public methodGetOpenDocuments Gets the set of documents that currently have open views.
Public methodGetTypeGets the Type of the current instance.
(Inherited from Object)
Public methodGetViewContentsForDocument Returns all currently open views that show the given document object document, either directly (ModelObject is the document), or indirectly, if ModelObject is of type IProjectItemPresentationModel, by comparing with Document.
Public methodHasDocumentAnOpenView Determines whether the specified document currently has an open view.
Protected methodInternalCreateNewProject Create a new project, and returns it, without wiring any infrastructure to it yet.
Protected methodInternalCreateProjectArchiveManagerFromFileOrFolderLocation Enumerates the registered types for a manager that implements IFileBasedProjectArchiveManager and searches for the type that can handle the provided file or folder.
Protected methodInternalLoadProjectAndWindowsStateFromArchive Loads the project and the state of the windows from a project archive.
Protected methodInternalSave Internal routine to save a project under a given name.
Public methodIsProjectFileExtension Determines whether the provided file extension is a project file extension. This function uses the abstract function ProjectFileExtensions to determine if the given argument is a project file extension
Protected methodLoadProjectFromFileOrFolder Opens a Altaxo project from a project file (without asking the user). The old project is closed without asking the user.
Protected methodMemberwiseCloneCreates a shallow copy of the current Object.
(Inherited from Object)
Protected methodOnProjectChanged Fires the ProjectChanged event. This occurs after the events ProjectOpened, ProjectClosed, ProjectRenamed, and ProjectDirtyChanged event. Useful if you do not want to subscribe to the above-mentioned single events.
Public methodOpenOrCreateViewContentForDocument Opens a view that shows the document. If no view for the document can be found, a new default view is created.
Protected methodOpenOrCreateViewContentForDocument_Unsynchronized Opens an existing view for the specified document or creates a new one on the UI thread.
Public methodOpenProject Opens a project. If the current project is dirty, and showUserInteraction is true, the user is ask to save the current project before.
Public methodOpenProjectFromArchive Loads the project from project archive.
Public methodSaveProject Saves a project under the current file name.
Public methodSaveProject(IProjectArchive) Saves a project.
Public methodSaveProject(PathName) Saves the current project under a provided file name. If the provided file name differs from the current file name, a project renaming event is triggered.
Public methodSaveProjectAndWindowsState Saves a project.
Public methodSaveProjectAs Asks the user for a file name for the current project, and then saves the project under the given name.
Public methodSaveProjectCopyAs This command is used if in embedded object mode. It saves the current project to a file, but don't set the current file name of the project (in project service). Furthermore, the title in the title bar is not influenced by the saving.
Protected methodSelectFirstAvailableView Selects the first available open view.
Protected methodSetCurrentProject Sets the current project instance, and set it's file name to null. No events raised (events should be raised by the caller). The old project instance will be disposed of.
Public methodShowDocumentView Shows a view for the specified document, creating one if necessary.
Public methodToStringReturns a string that represents the current object.
(Inherited from Object)
Public methodTryOpenProjectItemFile Tests if the provided file name to have an extension that is associated with the extension of a project item (a specific item of the project), and if it is, tries to open the project item and adds it to the current project.
Top
Events
 NameDescription
Public eventProjectChanged Occurs when the current project changes in any relevant way.
Public eventProjectClosed Occurs when a project was closed.
Public eventProjectDirtyChanged Occurs when the dirty state of the current project changes.
Public eventProjectOpened Occurs when a project was opened.
Public eventProjectRenamed Occurs when a project was renamed.
Top
Fields
 NameDescription
Protected field_applicationName Holds the application name used in window titles.
Protected field_currentProject Holds the currently open project.
Protected field_currentProjectArchiveManager Holds the archive manager for the current project.
Top
See Also