C# 클래스 XSharp.Project.VOEditorPane

상속: Microsoft.VisualStudio.Shell.WindowPane, IVsPersistDocData, IPersistFileFormat, IVsFileChangeEvents, IVsDocDataFileChangeControl, IVsFileBackup, IExtensibleObject, IEditor
파일 보기 프로젝트 열기: X-Sharp/XSharpPublic 1 사용 예제들

보호된 프로퍼티들

프로퍼티 타입 설명
MyExtension string
editorControl VOWEDControl

Private Properties

프로퍼티 타입 설명
CanEditFile bool
Dispose void
GetResourceString string
IExtensibleObject void
IPersistFileFormat int
IPersistFileFormat int
IPersistFileFormat int
IPersistFileFormat int
IPersistFileFormat int
IPersistFileFormat int
IPersistFileFormat int
IVsDocDataFileChangeControl int
IVsFileBackup int
IVsFileBackup int
IVsFileChangeEvents int
IVsFileChangeEvents int
IVsPersistDocData int
IVsPersistDocData int
IVsPersistDocData int
IVsPersistDocData int
IVsPersistDocData int
IVsPersistDocData int
IVsPersistDocData int
IVsPersistDocData int
IsDirtyChangedHandler void
Microsoft int
NotifyDocChanged void
OnFileChangeEvent void
OnSelectionChanged void
PrivateInit void
SetFileChangeNotification int
SetReadOnly void
StatusBarMessageHandler void
SuspendFileChangeNotification int
TriggerSaveHandler void

공개 메소드들

메소드 설명
Copy ( ) : int

This function performs the copy operation in the editor.

Cut ( ) : int

This function performs the cut operation in the editor.

Delete ( long unit, long count ) : int

This function performs a delete in the editor.

Paste ( ) : int

This function performs the paste operation in the editor.

VOEditorPane ( XSharpProjectPackage package ) : System

보호된 메소드들

메소드 설명
OnClose ( ) : void
_GetClassID ( ) : System.Guid
addCommand ( IMenuCommandService mcs, System.Guid menuGroup, int cmdID, EventHandler commandEvent, EventHandler queryEvent ) : void

Helper function used to add commands using IMenuCommandService

getFormatList ( ) : string
onQueryUnimplemented ( object sender, EventArgs e ) : void
onUnimplemented ( object sender, EventArgs e ) : void
setupCommands ( ) : void

비공개 메소드들

메소드 설명
CanEditFile ( ) : bool

This function asks to the QueryEditQuerySave service if it is possible to edit the file.

Dispose ( bool disposing ) : void
GetResourceString ( string resourceName ) : string

This method loads a localized string based on the specified resource.

IExtensibleObject ( string Name, IExtensibleObjectSite pParent, Object &ppDisp ) : void

This function is used for Macro playback. Whenever a macro gets played this funtion will be called and then the IEditor functions will be called on the object that ppDisp is set to. Since VOFormEditorPane implements IEditor we will just set it to "this".

IPersistFileFormat ( System.Guid &pClassID ) : int

Returns the class identifier of the editor type

IPersistFileFormat ( int &pfIsDirty ) : int

Determines whether an object has changed since being saved to its current file

IPersistFileFormat ( string strFileName ) : int

Notifies the object that it has concluded the Save transaction

IPersistFileFormat ( string strFileName, int fRemember, uint nFormatIndex ) : int

Save the contents of the editor into the specified file. If doing the save on the same file, we need to suspend notifications for file changes during the save operation.

IPersistFileFormat ( string &pstrFileName, uint &pnFormatIndex ) : int

Returns the path to the object's current working file

IPersistFileFormat ( string filename, uint grfMode, int fReadOnly ) : int

Loads the file content into the editor

IPersistFileFormat ( uint nFormatIndex ) : int

Initialization for the object

IVsDocDataFileChangeControl ( int fIgnore ) : int

Used to determine whether changes to DocData in files should be ignored or not

IVsFileBackup ( int &pbObsolete ) : int

Used to set the backup dirty bit. This bit should be set when the object is modified and cleared on calls to BackupFile and any Save method

IVsFileBackup ( string strBackupFileName ) : int

This method is used to Persist the data to a single file. On a successful backup this should clear up the backup dirty bit

IVsFileChangeEvents ( string pszDirectory ) : int

Notify the editor of the changes made to a directory

IVsFileChangeEvents ( uint cChanges, string rgpszFile, uint rggrfChange ) : int

Notify the editor of the changes made to one or more files

IVsPersistDocData ( ) : int

Close the IVsPersistDocData object

IVsPersistDocData ( System.Guid &pClassID ) : int

Returns the Guid of the editor factory that created the IVsPersistDocData object

IVsPersistDocData ( Microsoft dwSave, string &pbstrMkDocumentNew, int &pfSaveCanceled ) : int

Saves the document data. Before actually saving the file, we first need to indicate to the environment that a file is about to be saved. This is done through the "SVsQueryEditQuerySave" service. We call the "QuerySaveFile" function on the service instance and then proceed depending on the result returned as follows: If result is QSR_SaveOK - We go ahead and save the file and the file is not read only at this point. If result is QSR_ForceSaveAs - We invoke the "Save As" functionality which will bring up the Save file name dialog If result is QSR_NoSave_Cancel - We cancel the save operation and indicate that the document could not be saved by setting the "pfSaveCanceled" flag If result is QSR_NoSave_Continue - Nothing to do here as the file need not be saved

IVsPersistDocData ( int &pfDirty ) : int

Used to determine if the document data has changed since the last time it was saved

IVsPersistDocData ( string pszMkDocument ) : int

Loads the document data from the file specified

IVsPersistDocData ( uint grfFlags ) : int

Reloads the document data

IVsPersistDocData ( uint docCookie, IVsHierarchy pHierNew, uint itemidNew ) : int

Called by the Running Document Table when it registers the document data.

IVsPersistDocData ( uint grfAttribs, IVsHierarchy pHierNew, uint itemidNew, string pszMkDocumentNew ) : int

Renames the document data

IsDirtyChangedHandler ( object o, EventArgs e ) : void
Microsoft ( System.Guid &pClassID ) : int
NotifyDocChanged ( ) : void

Gets an instance of the RunningDocumentTable (RDT) service which manages the set of currently open documents in the environment and then notifies the client that an open document has changed

OnFileChangeEvent ( object sender, System e ) : void

This event is triggered when one of the files loaded into the environment has changed outside of the editor

OnSelectionChanged ( object sender, EventArgs e ) : void
PrivateInit ( XSharpProjectPackage package ) : void

Initialization routine for the Editor. Loads the list of properties for the document which will show up in the properties window

SetFileChangeNotification ( string strFileName, bool fStart ) : int

In this function we inform the shell when we wish to receive events when our file is changed or we inform the shell when we wish not to receive events anymore.

SetReadOnly ( bool _isFileReadOnly ) : void

Used to ReadOnly property for the Rich TextBox and correspondingly update the editor caption

StatusBarMessageHandler ( string cText ) : void
SuspendFileChangeNotification ( string strFileName, int fSuspend ) : int

In this function we suspend receiving file change events for a file or we reinstate a previously suspended file depending on the value of the given fSuspend flag.

TriggerSaveHandler ( object o, EventArgs e ) : void

메소드 상세

Copy() 공개 메소드

This function performs the copy operation in the editor.
public Copy ( ) : int
리턴 int

Cut() 공개 메소드

This function performs the cut operation in the editor.
public Cut ( ) : int
리턴 int

Delete() 공개 메소드

This function performs a delete in the editor.
public Delete ( long unit, long count ) : int
unit long The type of units that we are going to delete. The two valid options /// for this are TOMWord and TOMCharacter, which are defined in the TOMConstants enumeration.
count long The number of units that we are going to delete. Passing in a negative number /// will be similar to pressing backspace and passing in a positive number will be similar to /// pressing delete.
리턴 int

OnClose() 보호된 메소드

protected OnClose ( ) : void
리턴 void

Paste() 공개 메소드

This function performs the paste operation in the editor.
public Paste ( ) : int
리턴 int

VOEditorPane() 공개 메소드

public VOEditorPane ( XSharpProjectPackage package ) : System
package XSharpProjectPackage Our Package instance.
리턴 System

_GetClassID() 보호된 메소드

protected _GetClassID ( ) : System.Guid
리턴 System.Guid

addCommand() 보호된 정적인 메소드

Helper function used to add commands using IMenuCommandService
protected static addCommand ( IMenuCommandService mcs, System.Guid menuGroup, int cmdID, EventHandler commandEvent, EventHandler queryEvent ) : void
mcs IMenuCommandService The IMenuCommandService interface.
menuGroup System.Guid This guid represents the menu group of the command.
cmdID int The command ID of the command.
commandEvent EventHandler An EventHandler which will be called whenever the command is invoked.
queryEvent EventHandler An EventHandler which will be called whenever we want to query the status of /// the command. If null is passed in here then no EventHandler will be added.
리턴 void

getFormatList() 보호된 메소드

protected getFormatList ( ) : string
리턴 string

onQueryUnimplemented() 보호된 메소드

protected onQueryUnimplemented ( object sender, EventArgs e ) : void
sender object
e System.EventArgs
리턴 void

onUnimplemented() 보호된 메소드

protected onUnimplemented ( object sender, EventArgs e ) : void
sender object
e System.EventArgs
리턴 void

setupCommands() 보호된 메소드

protected setupCommands ( ) : void
리턴 void

프로퍼티 상세

MyExtension 보호되어 있는 프로퍼티

protected string MyExtension
리턴 string

editorControl 보호되어 있는 프로퍼티

protected VOWEDControl editorControl
리턴 VOWEDControl