C# Класс SphereStudio.DocumentTab

Represents an open document in the IDE.
Наследование: IDisposable
Показать файл Открыть проект Примеры использования класса

Открытые методы

Метод Описание
Activate ( ) : void

Makes the tab active and notifies the underlying document that it has received focus.

Close ( bool forceClose = false ) : bool

Closes the tab.

Copy ( ) : void

Sends a Copy command to the document view.

Cut ( ) : void

Sends a Cut command to the document view.

Deactivate ( ) : void

Notifies the underlying document that it has lost focus.

Dispose ( ) : void
DocumentTab ( MainWindow ide, DocumentView view, string fileName = null, bool restoreView = false ) : System

Creates a new Sphere Studio document tab.

Paste ( ) : void

Sends a Paste command to the document view.

PromptSave ( ) : bool

Prompts the user to save a modified document. The document will remain open afterwards.

Redo ( ) : void

Sends a Redo command to the document view.

Restyle ( ) : void

Notifies the document that a styling option changed.

Save ( string path = null ) : bool

Saves the document in this tab. If the document hasn't been saved yet, the user will be asked to provide a filename.

SaveAs ( string path = null ) : bool

Saves the document in this tab with a filename provided by the user.

SaveIfDirty ( ) : bool
Undo ( ) : void

Sends an Undo command to the document view.

ZoomIn ( ) : void

Sends a Zoom In command to the document view.

ZoomOut ( ) : void

Sends a Zoom Out command to the document view.

Приватные методы

Метод Описание
SaveViewState ( ) : void
UpdateTabText ( ) : void
on_BreakpointSet ( object sender, BreakpointChangedEventArgs e ) : void
on_DirtyChanged ( object sender, EventArgs e ) : void
on_FormClosed ( object sender, System.Windows.Forms.FormClosedEventArgs e ) : void
on_FormClosing ( object sender, FormClosingEventArgs e ) : void

Описание методов

Activate() публичный Метод

Makes the tab active and notifies the underlying document that it has received focus.
public Activate ( ) : void
Результат void

Close() публичный Метод

Closes the tab.
public Close ( bool forceClose = false ) : bool
forceClose bool 'true' to bypass the Unsaved Changes prompt.
Результат bool

Copy() публичный Метод

Sends a Copy command to the document view.
public Copy ( ) : void
Результат void

Cut() публичный Метод

Sends a Cut command to the document view.
public Cut ( ) : void
Результат void

Deactivate() публичный Метод

Notifies the underlying document that it has lost focus.
public Deactivate ( ) : void
Результат void

Dispose() публичный Метод

public Dispose ( ) : void
Результат void

DocumentTab() публичный Метод

Creates a new Sphere Studio document tab.
public DocumentTab ( MainWindow ide, DocumentView view, string fileName = null, bool restoreView = false ) : System
ide MainWindow The IDE form that the tab will be created in.
view Sphere.Plugins.Views.DocumentView The IDocumentView the tab is hosting.
fileName string The fully-qualified filename of the document, or null if untitled.
restoreView bool 'true' to restore the last saved view state. Has no effect on untitled tabs.
Результат System

Paste() публичный Метод

Sends a Paste command to the document view.
public Paste ( ) : void
Результат void

PromptSave() публичный Метод

Prompts the user to save a modified document. The document will remain open afterwards.
public PromptSave ( ) : bool
Результат bool

Redo() публичный Метод

Sends a Redo command to the document view.
public Redo ( ) : void
Результат void

Restyle() публичный Метод

Notifies the document that a styling option changed.
public Restyle ( ) : void
Результат void

Save() публичный Метод

Saves the document in this tab. If the document hasn't been saved yet, the user will be asked to provide a filename.
public Save ( string path = null ) : bool
path string The default directory for the Save As dialog.
Результат bool

SaveAs() публичный Метод

Saves the document in this tab with a filename provided by the user.
public SaveAs ( string path = null ) : bool
path string The default directory for the Save As dialog.
Результат bool

SaveIfDirty() публичный Метод

public SaveIfDirty ( ) : bool
Результат bool

Undo() публичный Метод

Sends an Undo command to the document view.
public Undo ( ) : void
Результат void

ZoomIn() публичный Метод

Sends a Zoom In command to the document view.
public ZoomIn ( ) : void
Результат void

ZoomOut() публичный Метод

Sends a Zoom Out command to the document view.
public ZoomOut ( ) : void
Результат void