C# 클래스 SIL.FieldWorks.TE.DraftView

Implementation of the draft view (formerly SeDraftWnd)
상속: SIL.FieldWorks.TE.DraftViewBase, ISelectableView
파일 보기 프로젝트 열기: sillsdev/FieldWorks 1 사용 예제들

보호된 프로퍼티들

프로퍼티 타입 설명
m_fShowInTable bool
m_helpTopicProvider IHelpTopicProvider

Private Properties

프로퍼티 타입 설명
ConvertBookTagAndIndex void
FindNextTranslationInText int
FindPrevTranslationInText int
GetBackTranslationStatus BackTranslationStatus
IsKeyTermsView bool
MoveToNextTranslation void
MoveToPrevTranslation void
ReplaceBookTagAndIndex void
ShowPrintDlgHelp void
SynchFootnoteView void
SynchFootnoteView void

공개 메소드들

메소드 설명
ActivateView ( ) : void

Activates the view and initializes the information bar and styles combo based on the draft view's selection.

DeactivateView ( ) : void

DoHotLinkAction ( object sender, string strData ) : void

Handle hot link action - user clicked on hot link on the view.

DraftView ( FdoCache cache, int filterInstance, IApp app, string viewName, bool fEditable, bool fShowInTable, bool fMakeRootAutomatically, TeViewType viewType, int btWs, IHelpTopicProvider helpTopicProvider ) : System

Initializes a new instance of the DraftView class as a draft view editing pane, for either vernacular or back translation.

GetWritingSystemForHvo ( int hvo ) : int

Gets the writing system for the HVO. This could either be the vernacular or analysis writing system.

OnFilePrint ( object args ) : bool

OnInsertDiffPara ( IVwRootBox rootBox, ITsTextProps ttpDest, ITsTextProps ttpSrc, ITsString tssParas, ITsString tssTrailing ) : VwInsertDiffParaResponse

see OnInsertDiffParas

OnInsertDiffParas ( IVwRootBox rootBox, ITsTextProps ttpDest, int cPara, ITsTextProps ttpSrcArray, ITsString tssParas, ITsString tssTrailing ) : VwInsertDiffParaResponse

Handle insertion of paragraphs (i.e., from clipboard) with properties that don't match the properties of the paragraph where they are being inserted. This gives us the opportunity to create/modify the DB structure to recieve the paragraphs being inserted and to reject certain types of paste operations (such as attempting to paste a book).

OnProblemDeletion ( IVwSelection sel, VwDelProbType dpt ) : VwDelProbResponse

Handle a problem deletion - a complex selection crossing sections or other difficult cases such as BS/DEL at boundaries.

SelectRangeOfChars ( int book, int section, int para, int startCharacter, int endCharacter ) : SelectionHelper

Set an insertion point or character-range selection in this DraftView which is "installed" and scrolled into view.

This method is only used for tests

SetInsertionPoint ( int book, int section, int para, int character, bool fAssocPrev ) : SelectionHelper

Set the insertion point in this draftview to the specified location.

ShowContextMenuAtIp ( IVwRootBox rootb ) : void

Show the context menu for the specified root box at the location of its selection (typically an IP).

보호된 메소드들

메소드 설명
CallMouseDown ( Point pt, Rectangle rcSrcRoot, Rectangle rcDstRoot ) : void

Remember if a picture is selected so that it can be deselected on mouse up, if necessary.

CallMouseUp ( Point pt, Rectangle rcSrcRoot, Rectangle rcDstRoot ) : void

Call MouseUp on the rootbox

CreateEditingHelper ( ) : EditingHelper

Provide a TE specific implementation of the EditingHelper

CreateEditingHelper_Internal ( ) : TeEditingHelper

Internal version of CreateEditingHelper allows subclasses to override to create a subclass of TeEditingHelper without repeating the common initialization code.

CreateViewConstructor ( ) : TeStVc

Creates a view constructor suitable for this kind of view.

GetNonFocusedSelectionState ( Control windowGainingFocus ) : VwSelectionState

If the annotations window is gaining focus, then we don't want the draft view's range selections to be hidden.

HandleSelectionChange ( IVwRootBox rootb, IVwSelection vwselNew ) : void

Handle a selection changed event.

OnBackTranslationChecked ( object args ) : bool

Handle a click on the Back Translation Checked menu option

OnBackTranslationFinished ( object args ) : bool

Handle a click on the Back Translation Finished menu option

OnBackTranslationNextUnfinished ( object args ) : bool

Move to the next paragraph in the back translation that is unfinished.

OnBackTranslationPrevUnfinished ( object args ) : bool

Move to the previous paragraph in the back translation that is unfinished.

OnBackTranslationUnfinished ( object args ) : bool

Handle a click on the Back Translation Unfinished menu option

OnDeleteFootnote ( object args ) : bool

Deletes a footnote when the selection is on a footnote marker. Called from context menu.

OnGotFocus ( EventArgs e ) : void

Focus got set to the draft view

OnKeyPress ( KeyPressEventArgs e ) : void

Override to try to repair the situation if re-inserting a missing-data prompt causes there to be no selection.

OnLoadSettings ( RegistryKey key ) : void

Load settings from the registry

OnLostFocus ( EventArgs e ) : void

Raises the E:System.Windows.Forms.Control.LostFocus event.

OnMouseUp ( MouseEventArgs e ) : void

Handle the mouse up event.

OnSaveSettings ( RegistryKey key ) : void

Save passage to the registry

OnUpdateBackTranslationChecked ( object args ) : bool

OnUpdateBackTranslationFinished ( object args ) : bool

OnUpdateBackTranslationNextUnfinished ( object args ) : bool

Update handler for the Next Unfinished Paragraph button

OnUpdateBackTranslationPrevUnfinished ( object args ) : bool

Update handler for the Prev Unfinished Paragraph button

OnUpdateBackTranslationUnfinished ( object args ) : bool

OnUpdateInformationBar ( object args ) : bool

Handles a queued event that will be processed during idle cycles. This will update the information tool bar.

SetBackTranslationStatus ( ICmTranslation trans, BackTranslationStatus status ) : void

Set the status of a back translation object.

SetInsertionPoint ( int tag, int book, int section ) : SelectionHelper

Navigate to the beginning of any Scripture element: Title, Section Head, or Section Content.

SetInsertionPoint ( int tag, int book, int section, int paragraph ) : SelectionHelper

Navigate to the beginning of any Scripture element: Title, Section Head, or Section Content.

SetupPrintHelp ( PrintDialog dlg ) : void

If help is available for the print dialog, set ShowHelp to true, and add an event handler that can display some help. TE has such help available.

ShowContextMenu ( Point loc ) : void

Shows the context menu.

비공개 메소드들

메소드 설명
ConvertBookTagAndIndex ( SelectionHelper helper, SelectionHelper selType ) : void

Convert the scripture book tag to a filter tag. Also, convert book indices to filtered book indices. This is done when loading a selection to make it work in the context of the book filter.

FindNextTranslationInText ( IStText text, int iParaStartSearch, bool>.Func condition ) : int

Look for a translation with a matching status in a paragraph of an StText

FindPrevTranslationInText ( IStText text, BackTranslationStatus searchStatus, int iParaStartSearch ) : int

Look for a previous translation with a matching status in a paragraph of an StText

GetBackTranslationStatus ( ICmTranslation trans ) : BackTranslationStatus

Get the status of a back translation object

IsKeyTermsView ( ) : bool
MoveToNextTranslation ( SelectionHelper selection, bool>.Func condition ) : void

Find and select the next translation meeting a given condition

MoveToPrevTranslation ( SelectionHelper selection, BackTranslationStatus searchStatus ) : void

Find and select the previous translation with a given state

ReplaceBookTagAndIndex ( SelectionHelper helper, SelectionHelper selType ) : void

Replace the filter book tag with a scrpiture books tag. This is done before persisting the selection because the filter tag is not valid across sessions. Also, any filtered book indices are replaced with real scripture book indices for the same reason.

ShowPrintDlgHelp ( object sender, EventArgs e ) : void

Show help for the print dialog

SynchFootnoteView ( ) : void

Synchronizes the footnote view.

SynchFootnoteView ( SelectionHelper helper ) : void

Synchronizes the footnote view.

메소드 상세

ActivateView() 공개 메소드

Activates the view and initializes the information bar and styles combo based on the draft view's selection.
public ActivateView ( ) : void
리턴 void

CallMouseDown() 보호된 메소드

Remember if a picture is selected so that it can be deselected on mouse up, if necessary.
protected CallMouseDown ( Point pt, Rectangle rcSrcRoot, Rectangle rcDstRoot ) : void
pt Point
rcSrcRoot Rectangle
rcDstRoot Rectangle
리턴 void

CallMouseUp() 보호된 메소드

Call MouseUp on the rootbox
protected CallMouseUp ( Point pt, Rectangle rcSrcRoot, Rectangle rcDstRoot ) : void
pt Point
rcSrcRoot Rectangle
rcDstRoot Rectangle
리턴 void

CreateEditingHelper() 보호된 메소드

Provide a TE specific implementation of the EditingHelper
protected CreateEditingHelper ( ) : EditingHelper
리턴 EditingHelper

CreateEditingHelper_Internal() 보호된 메소드

Internal version of CreateEditingHelper allows subclasses to override to create a subclass of TeEditingHelper without repeating the common initialization code.
protected CreateEditingHelper_Internal ( ) : TeEditingHelper
리턴 TeEditingHelper

CreateViewConstructor() 보호된 메소드

Creates a view constructor suitable for this kind of view.
protected CreateViewConstructor ( ) : TeStVc
리턴 TeStVc

DeactivateView() 공개 메소드

public DeactivateView ( ) : void
리턴 void

DoHotLinkAction() 공개 메소드

Handle hot link action - user clicked on hot link on the view.
public DoHotLinkAction ( object sender, string strData ) : void
sender object Ignored. The view constructor that detected the click
strData string String-representation of the link, including the type of link /// and the GUID of the linked object
리턴 void

DraftView() 공개 메소드

Initializes a new instance of the DraftView class as a draft view editing pane, for either vernacular or back translation.
public DraftView ( FdoCache cache, int filterInstance, IApp app, string viewName, bool fEditable, bool fShowInTable, bool fMakeRootAutomatically, TeViewType viewType, int btWs, IHelpTopicProvider helpTopicProvider ) : System
cache FdoCache The cache.
filterInstance int The tag that identifies the book filter instance.
app IApp The application.
viewName string The name of the view.
fEditable bool true if view is to be editable.
fShowInTable bool true if the paragraphs are to be displayed in a /// table.
fMakeRootAutomatically bool true to make the root automatically /// when the window handle is created.
viewType TeViewType Bit-flags indicating type of view.
btWs int The back translation writing system (if needed).
helpTopicProvider IHelpTopicProvider The help topic provider.
리턴 System

GetNonFocusedSelectionState() 보호된 메소드

If the annotations window is gaining focus, then we don't want the draft view's range selections to be hidden.
protected GetNonFocusedSelectionState ( Control windowGainingFocus ) : VwSelectionState
windowGainingFocus Control
리턴 VwSelectionState

GetWritingSystemForHvo() 공개 메소드

Gets the writing system for the HVO. This could either be the vernacular or analysis writing system.
public GetWritingSystemForHvo ( int hvo ) : int
hvo int HVO
리턴 int

HandleSelectionChange() 보호된 메소드

Handle a selection changed event.
protected HandleSelectionChange ( IVwRootBox rootb, IVwSelection vwselNew ) : void
rootb IVwRootBox root box that has the selection change
vwselNew IVwSelection Selection
리턴 void

OnBackTranslationChecked() 보호된 메소드

Handle a click on the Back Translation Checked menu option
protected OnBackTranslationChecked ( object args ) : bool
args object
리턴 bool

OnBackTranslationFinished() 보호된 메소드

Handle a click on the Back Translation Finished menu option
protected OnBackTranslationFinished ( object args ) : bool
args object
리턴 bool

OnBackTranslationNextUnfinished() 보호된 메소드

Move to the next paragraph in the back translation that is unfinished.
protected OnBackTranslationNextUnfinished ( object args ) : bool
args object
리턴 bool

OnBackTranslationPrevUnfinished() 보호된 메소드

Move to the previous paragraph in the back translation that is unfinished.
protected OnBackTranslationPrevUnfinished ( object args ) : bool
args object
리턴 bool

OnBackTranslationUnfinished() 보호된 메소드

Handle a click on the Back Translation Unfinished menu option
protected OnBackTranslationUnfinished ( object args ) : bool
args object
리턴 bool

OnDeleteFootnote() 보호된 메소드

Deletes a footnote when the selection is on a footnote marker. Called from context menu.
protected OnDeleteFootnote ( object args ) : bool
args object
리턴 bool

OnFilePrint() 공개 메소드

public OnFilePrint ( object args ) : bool
args object
리턴 bool

OnGotFocus() 보호된 메소드

Focus got set to the draft view
protected OnGotFocus ( EventArgs e ) : void
e EventArgs The event data
리턴 void

OnInsertDiffPara() 공개 메소드

see OnInsertDiffParas
public OnInsertDiffPara ( IVwRootBox rootBox, ITsTextProps ttpDest, ITsTextProps ttpSrc, ITsString tssParas, ITsString tssTrailing ) : VwInsertDiffParaResponse
rootBox IVwRootBox
ttpDest ITsTextProps
ttpSrc ITsTextProps
tssParas ITsString
tssTrailing ITsString
리턴 VwInsertDiffParaResponse

OnInsertDiffParas() 공개 메소드

Handle insertion of paragraphs (i.e., from clipboard) with properties that don't match the properties of the paragraph where they are being inserted. This gives us the opportunity to create/modify the DB structure to recieve the paragraphs being inserted and to reject certain types of paste operations (such as attempting to paste a book).
public OnInsertDiffParas ( IVwRootBox rootBox, ITsTextProps ttpDest, int cPara, ITsTextProps ttpSrcArray, ITsString tssParas, ITsString tssTrailing ) : VwInsertDiffParaResponse
rootBox IVwRootBox the sender
ttpDest ITsTextProps properties of destination paragraph
cPara int number of paragraphs to be inserted
ttpSrcArray ITsTextProps Array of props of each para to be inserted
tssParas ITsString Array of TsStrings for each para to be inserted
tssTrailing ITsString Text of an incomplete paragraph to insert at end (with /// the properties of the destination paragraph.
리턴 VwInsertDiffParaResponse

OnKeyPress() 보호된 메소드

Override to try to repair the situation if re-inserting a missing-data prompt causes there to be no selection.
protected OnKeyPress ( KeyPressEventArgs e ) : void
e KeyPressEventArgs
리턴 void

OnLoadSettings() 보호된 메소드

Load settings from the registry
protected OnLoadSettings ( RegistryKey key ) : void
key RegistryKey Location in the registry
리턴 void

OnLostFocus() 보호된 메소드

Raises the E:System.Windows.Forms.Control.LostFocus event.
protected OnLostFocus ( EventArgs e ) : void
e EventArgs An that contains the event data.
리턴 void

OnMouseUp() 보호된 메소드

Handle the mouse up event.
protected OnMouseUp ( MouseEventArgs e ) : void
e MouseEventArgs
리턴 void

OnProblemDeletion() 공개 메소드

Handle a problem deletion - a complex selection crossing sections or other difficult cases such as BS/DEL at boundaries.
public OnProblemDeletion ( IVwSelection sel, VwDelProbType dpt ) : VwDelProbResponse
sel IVwSelection
dpt VwDelProbType
리턴 VwDelProbResponse

OnSaveSettings() 보호된 메소드

Save passage to the registry
protected OnSaveSettings ( RegistryKey key ) : void
key RegistryKey Location in the registry
리턴 void

OnUpdateBackTranslationChecked() 보호된 메소드

protected OnUpdateBackTranslationChecked ( object args ) : bool
args object
리턴 bool

OnUpdateBackTranslationFinished() 보호된 메소드

protected OnUpdateBackTranslationFinished ( object args ) : bool
args object
리턴 bool

OnUpdateBackTranslationNextUnfinished() 보호된 메소드

Update handler for the Next Unfinished Paragraph button
protected OnUpdateBackTranslationNextUnfinished ( object args ) : bool
args object
리턴 bool

OnUpdateBackTranslationPrevUnfinished() 보호된 메소드

Update handler for the Prev Unfinished Paragraph button
protected OnUpdateBackTranslationPrevUnfinished ( object args ) : bool
args object
리턴 bool

OnUpdateBackTranslationUnfinished() 보호된 메소드

protected OnUpdateBackTranslationUnfinished ( object args ) : bool
args object
리턴 bool

OnUpdateInformationBar() 보호된 메소드

Handles a queued event that will be processed during idle cycles. This will update the information tool bar.
protected OnUpdateInformationBar ( object args ) : bool
args object
리턴 bool

SelectRangeOfChars() 공개 메소드

Set an insertion point or character-range selection in this DraftView which is "installed" and scrolled into view.
This method is only used for tests
public SelectRangeOfChars ( int book, int section, int para, int startCharacter, int endCharacter ) : SelectionHelper
book int The 0-based index of the Scripture book in which to put the /// insertion point
section int The 0-based index of the Scripture section in which to put the /// insertion point
para int The 0-based index of the paragraph in which to put the insertion /// point
startCharacter int The 0-based index of the character at which the /// selection begins (or before which the insertion point is to be placed if /// startCharacter == endCharacter)
endCharacter int The character location to end the selection
리턴 SelectionHelper

SetBackTranslationStatus() 보호된 메소드

Set the status of a back translation object.
protected SetBackTranslationStatus ( ICmTranslation trans, BackTranslationStatus status ) : void
trans ICmTranslation
status BackTranslationStatus
리턴 void

SetInsertionPoint() 보호된 메소드

Navigate to the beginning of any Scripture element: Title, Section Head, or Section Content.
protected SetInsertionPoint ( int tag, int book, int section ) : SelectionHelper
tag int Indicates whether selection should be made in the title, section /// Heading or section Content
book int The 0-based index of the Scripture book in which to put the /// insertion point
section int The 0-based index of the Scripture section in which to put the /// insertion point. Ignored if tag is ///
리턴 SelectionHelper

SetInsertionPoint() 보호된 메소드

Navigate to the beginning of any Scripture element: Title, Section Head, or Section Content.
protected SetInsertionPoint ( int tag, int book, int section, int paragraph ) : SelectionHelper
tag int Indicates whether selection should be made in the title, section /// Heading or section Content
book int The 0-based index of the Scripture book in which to put the /// insertion point
section int The 0-based index of the Scripture section in which to put the /// insertion point. Ignored if tag is ///
paragraph int The 0-based index of the paragraph which to put the /// insertion point.
리턴 SelectionHelper

SetInsertionPoint() 공개 메소드

Set the insertion point in this draftview to the specified location.
public SetInsertionPoint ( int book, int section, int para, int character, bool fAssocPrev ) : SelectionHelper
book int The 0-based index of the Scripture book in which to put the /// insertion point
section int The 0-based index of the Scripture section in which to put the /// insertion point
para int The 0-based index of the paragraph in which to put the insertion /// point
character int The 0-based index of the character before which the /// insertion point is to be placed
fAssocPrev bool True if the properties of the text entered at the new /// insertion point should be associated with the properties of the text before the new /// insertion point. False if text entered at the new insertion point should be /// associated with the text following the new insertion point.
리턴 SelectionHelper

SetupPrintHelp() 보호된 메소드

If help is available for the print dialog, set ShowHelp to true, and add an event handler that can display some help. TE has such help available.
protected SetupPrintHelp ( PrintDialog dlg ) : void
dlg PrintDialog
리턴 void

ShowContextMenu() 보호된 메소드

Shows the context menu.
protected ShowContextMenu ( Point loc ) : void
loc Point The loc.
리턴 void

ShowContextMenuAtIp() 공개 메소드

Show the context menu for the specified root box at the location of its selection (typically an IP).
public ShowContextMenuAtIp ( IVwRootBox rootb ) : void
rootb IVwRootBox
리턴 void

프로퍼티 상세

m_fShowInTable 보호되어 있는 프로퍼티

true to layout data in a table
protected bool m_fShowInTable
리턴 bool

m_helpTopicProvider 보호되어 있는 프로퍼티

protected IHelpTopicProvider m_helpTopicProvider
리턴 IHelpTopicProvider