C# 클래스 SIL.FieldWorks.Common.Framework.FwEditingHelper

Extended version of EditingHelper that uses some framework features.
상속: SIL.FieldWorks.Common.RootSites.RootSiteEditingHelper
파일 보기 프로젝트 열기: sillsdev/FieldWorks 1 사용 예제들

Private Properties

프로퍼티 타입 설명

공개 메소드들

메소드 설명
AddHyperlink ( ITsStrBldr strBldr, int ws, string sLinkText, string sUrl, FwStyleSheet stylesheet ) : bool

Appends the given text as a hyperlink to the given URL.

FwEditingHelper ( SIL.FieldWorks.FDO.FdoCache cache, IEditingCallbacks callbacks ) : System

Initializes a new instance of the FwEditingHelper class.

HandleSelectionChange ( IVwRootBox prootb, IVwSelection vwselNew ) : void

Change the system keyboard when the selection changes.

When overriding you should call the base class first.

InsertPicture ( ICmPicture pict ) : void

Inserts an ORC pointing to hvoObjToInsert at the current selection location. Enhance JohnT: should move this to RootSite or similar location where all clients can readily use it.

InsertPicture ( string srcFilename, ITsString captionTss, string sFolder ) : void

Insert a picture at the current selection of the active rootsite.

보호된 메소드들

메소드 설명
Dispose ( bool disposing ) : void

Executes in two distinct scenarios. 1. If disposing is true, the method has been called directly or indirectly by a user's code via the Dispose method. Both managed and unmanaged resources can be disposed. 2. If disposing is false, the method has been called by the runtime from inside the finalizer and you should not reference (access) other managed objects, as they already have been garbage collected. Only unmanaged resources can be disposed.

If any exceptions are thrown, that is fine. If the method is being done in a finalizer, it will be ignored. If it is thrown by client code calling Dispose, it needs to be handled by fixing the bug. If subclasses override this method, they should call the base implementation.

InsertPictureOrc ( ICmPicture pict, ITsString tss, int ich, int hvoObj, int propTag, int ws ) : void

This method is broken out so TeEditingHelper can override and adjust annotations. Probably anything else that does it will need to adjust annotations, too, but nothing else yet uses this kind of picture in an StText.

OnCharAux ( string stuInput, VwShiftStatus ss, Keys modifiers ) : void

Handle typed character

ValidToReplaceSelWithTss ( IVwSelection vwselTargetLocation, ITsString tss ) : bool

Determines whether the given TsString can be pasted in the context of the target selection. An old DN-style embedded picture can only be pasted into paragraph contents.

메소드 상세

AddHyperlink() 공개 정적인 메소드

Appends the given text as a hyperlink to the given URL.
public static AddHyperlink ( ITsStrBldr strBldr, int ws, string sLinkText, string sUrl, FwStyleSheet stylesheet ) : bool
strBldr ITsStrBldr The string builder.
ws int The HVO of the writing system to use for the added text.
sLinkText string The text which should appear as the hyperlink text
sUrl string The URL that is the target of the hyperlink.
stylesheet FwStyleSheet The stylesheet.
리턴 bool

Dispose() 보호된 메소드

Executes in two distinct scenarios. 1. If disposing is true, the method has been called directly or indirectly by a user's code via the Dispose method. Both managed and unmanaged resources can be disposed. 2. If disposing is false, the method has been called by the runtime from inside the finalizer and you should not reference (access) other managed objects, as they already have been garbage collected. Only unmanaged resources can be disposed.
If any exceptions are thrown, that is fine. If the method is being done in a finalizer, it will be ignored. If it is thrown by client code calling Dispose, it needs to be handled by fixing the bug. If subclasses override this method, they should call the base implementation.
protected Dispose ( bool disposing ) : void
disposing bool
리턴 void

FwEditingHelper() 공개 메소드

Initializes a new instance of the FwEditingHelper class.
public FwEditingHelper ( SIL.FieldWorks.FDO.FdoCache cache, IEditingCallbacks callbacks ) : System
cache SIL.FieldWorks.FDO.FdoCache The DB connection
callbacks IEditingCallbacks implementation of
리턴 System

HandleSelectionChange() 공개 메소드

Change the system keyboard when the selection changes.
When overriding you should call the base class first.
public HandleSelectionChange ( IVwRootBox prootb, IVwSelection vwselNew ) : void
prootb IVwRootBox
vwselNew IVwSelection Selection
리턴 void

InsertPicture() 공개 메소드

Inserts an ORC pointing to hvoObjToInsert at the current selection location. Enhance JohnT: should move this to RootSite or similar location where all clients can readily use it.
public InsertPicture ( ICmPicture pict ) : void
pict ICmPicture The picture to insert
리턴 void

InsertPicture() 공개 메소드

Insert a picture at the current selection of the active rootsite.
public InsertPicture ( string srcFilename, ITsString captionTss, string sFolder ) : void
srcFilename string The path to the original filename (an internal copy will /// be made in this method)
captionTss ITsString The caption
sFolder string The name of the CmFolder where picture should be stored
리턴 void

InsertPictureOrc() 보호된 메소드

This method is broken out so TeEditingHelper can override and adjust annotations. Probably anything else that does it will need to adjust annotations, too, but nothing else yet uses this kind of picture in an StText.
protected InsertPictureOrc ( ICmPicture pict, ITsString tss, int ich, int hvoObj, int propTag, int ws ) : void
pict ICmPicture The picture to insert an ORC for
tss ITsString The initial value of the TsString into which the ORC is to be /// inserted.
ich int The character offset into the string.
hvoObj int The hvo of the object that owns the string property that will /// receive the tss after the ORC is inserted (typically a paragraph).
propTag int The property that holds the string.
ws int The writing system ID if the property is a multi-string.
리턴 void

OnCharAux() 보호된 메소드

Handle typed character
protected OnCharAux ( string stuInput, VwShiftStatus ss, Keys modifiers ) : void
stuInput string input string
ss VwShiftStatus Status of Shift/Control/Alt key
modifiers Keys key modifiers - shift status, etc.
리턴 void

ValidToReplaceSelWithTss() 보호된 메소드

Determines whether the given TsString can be pasted in the context of the target selection. An old DN-style embedded picture can only be pasted into paragraph contents.
protected ValidToReplaceSelWithTss ( IVwSelection vwselTargetLocation, ITsString tss ) : bool
vwselTargetLocation IVwSelection selection to be replaced by paste operation
tss ITsString The TsString from the clipboard
리턴 bool