Click or drag to resize

IProjectService Interface

Manages the currently open Altaxo project.

Namespace: Altaxo.Main
Assembly: AltaxoBase (in AltaxoBase.dll) Version: 4.8.3179.0 (4.8.3179.0)
Syntax
C#
public interface IProjectService

The IProjectService type exposes the following members.

Properties
 NameDescription
Public propertyCurrentProject Getter / setter for the currently open project.
Public propertyCurrentProjectArchiveManager Gets the object that represents the storage of the current project on disk. If the current project was opened as a COM object, the value is null.
Public propertyCurrentProjectFileName Gets the file name for the currently open project. Is null if the project has not got a file name for now.
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 for a given document.
Public methodCloseProject Closes a project. If the project is dirty, and forceClose is false, the user is asked to save the project.
Public methodCloseViewContent Closes the view content.
Public methodCreateInitialProject Creates the very first document. Used internal into the autostart command.
Public methodDeleteDocument This function will delete a project item and close all corresponding views.
Public methodDisposeProjectAndSetToNull Disposes the entire project and sets the current project to null. Attention: This function is intended to be used during application shutdown only.
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 any neccessary actions immediately before running the main application. When calling this, the services and the workbench are already initialized. The method can for instance load any files that are given in the command line.
Public methodGetMainWindowTitle Gets the title that should be shown as the main window title.
Public methodGetOpenDocuments Gets a set of all open documents, i.e. GraphDocuments, DataTables. (Not Worksheets).
Public methodHasDocumentAnOpenView Returns true if the given document has at least one open view in the workbench.
Public methodIsProjectFileExtension Determines whether the provided file extension is a project extension.
Public methodOpenOrCreateViewContentForDocument Opens a view that shows the document document. If no view for the document can be found, a new default view is created.
Public methodOpenProject Opens a Altaxo project. If the current project is dirty, and showUserInteraction is true, the user is ask to save the current project before.
Public methodOpenProjectFromArchive Opens a project from an archive. This function is intended for opening the project from a COM stream on a freshly started application. Thus it is assumed that no old project has to be saved before!
Public methodSaveProject Saves a project under the current file name.
Public methodSaveProject(IProjectArchive) Saves the project in the provided archive. Is intended for saving the project into a COM stream only. For regular saving into the file system, use one of the other Save.. methods.
Public methodSaveProject(PathName) Saves the project under the given file name, using the standard archive format.
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.
Public methodShowDocumentView Shows a view for the given document.
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 Event fired after any of the following other events is fired: ProjectOpened, ProjectClosed, ProjectRenamed, and ProjectDirtyChanged.
Public eventProjectClosed Fired when the current open project is closed.
Public eventProjectDirtyChanged Fired when the dirty state of the project changed.
Public eventProjectOpened Fired when a project is opened or a new empty project is created.
Public eventProjectRenamed Fired when the current open project is renamed.
Top
See Also