C# Class SIL.FieldWorks.XWorks.XmlDocView

XmlDocView is a view that shows a complete list as a single view. A RecordClerk class does most of the work of managing the list and current object. list management and navigation is entirely(?) handled by the RecordClerk. The actual view of each object is specified by a child node of the view node. This specifies how to display an individual list item.
Inheritance: SIL.FieldWorks.XWorks.XWorksViewBase
Afficher le fichier Open project: sillsdev/FieldWorks Class Usage Examples

Protected Properties

Свойство Type Description
m_configObjectName string
m_currentIndex int
m_currentObject ICmObject
m_hvoOwner int
m_mainView SIL.FieldWorks.Common.Controls.XmlSeqView

Private Properties

Свойство Type Description
AdjustedClerkIndex int
BaseLayoutName string
DisposeTooltip void
ExtractLayoutsFromLayoutTypeList string>>.IEnumerable
FindViewNameInList string
GatherBuiltInAndUserLayouts string>>.IEnumerable
GetBuiltInLayouts string>>.IEnumerable
GetPublicationName string
GetSafeWsName string
GetSelectedConfigView string
GetSelectedPublication string
GetTarget ICmObject
GetUserDefinedDictLayouts string>>.IEnumerable
GetWidthOfStringInPixels int
GiveSimpleWarning void
InitializeComponent void
IsCurrentConfigViewChanged bool
IsCurrentPublicationChanged bool
IsCurrentReversalWsChanged bool
IsDesiredPublication bool
IsObjectVisible bool
MakePublicationTitlePart string
NoReasonToChangeTitle bool
OnMouseClick void
ResetSpacer void
RunConfigureDialog void
SelectAndScrollToCurrentRecord void
SetConfigViewTitle void
SubitemClicked ICmObject
SubitemClicked ICmObject
TrimToMaxPixelWidth string
TryToJumpToSelection void

Méthodes publiques

Méthode Description
GetPubDecorator ( ) : DictionaryPublicationDecorator
Init ( XCore.Mediator mediator, XmlNode configurationParameters ) : void
OnCheckJump ( object argument ) : bool

Check to see if the user needs to be alerted that JumpToRecord is not possible.

OnClerkOwningObjChanged ( object sender ) : bool
OnConfigureXmlDocView ( object commandObject ) : bool

Launch the configure dialog.

OnDeleteRecord ( object commandObject ) : bool

If this gets called (which it never should), just say we did it, unless we are in the context of reversal entries. In the case of reversal entries, we say we did not do it, so the record clerk deals with it.

OnDisplayConfigureXmlDocView ( object commandObject, XCore.UIItemDisplayProperties &display ) : bool

The configure dialog may be launched any time this tool is active. Its name is derived from the name of the tool.

OnDisplayDeleteRecord ( object commandObject, XCore.UIItemDisplayProperties &display ) : bool

see if it makes sense to provide the "delete record" command now. Currently we don't support this in document view, except for reversal entries. If we decide to support it, we will need to do additional work (cf LT-1222) to ensure that (a) The clerk's idea of the current entry corresponds to where the selection is (b) After deleting it, the clerk's list gets updated. The former is not happening because we haven't written a SelectionChange method to notice the selection in the view and change the clerk to match. Not sure why the clerk's list isn't being updated...it may be only a problem for homographs.

OnDisplayFindAndReplaceText ( object commandObject, XCore.UIItemDisplayProperties &display ) : bool

Enables the command that just does Find, without Replace.

OnDisplayLayouts ( object parameter, XCore.UIListDisplayProperties &display ) : bool

Populate the list of layout views for the second dictionary titlebar menu.

OnDisplayPublications ( object parameter, XCore.UIListDisplayProperties &display ) : bool

Populate the list of publications for the first dictionary titlebar menu.

OnDisplayReplaceText ( object commandObject, XCore.UIItemDisplayProperties &display ) : bool

Enables the command that just does Find, without Replace.

OnDisplayShowAllEntries ( object commandObject, XCore.UIItemDisplayProperties &display ) : bool
OnFindAndReplaceText ( object argument ) : bool

Implements the command that just does Find, without Replace.

OnPropertyChanged ( string name ) : void

Receives the broadcast message "PropertyChanged"

OnRecordNavigation ( object argument ) : bool
OnReplaceText ( object argument ) : bool

Implements the command that just does Find, without Replace.

OnSelectionChanged ( object sender, SIL.FieldWorks.Common.Utils.FwObjectSelectionEventArgs e ) : void

invoked when our XmlDocView selection changes.

OnShowAllEntries ( object args ) : bool
PostLayoutInit ( ) : void

We wait until containing controls are laid out to try to scroll our selection into view, because it depends somewhat on the window being the true size.

PrintFromDetail ( PrintDocument pd, int recordHvo ) : void

Pass command (from RecordEditView) on to printing view.

XmlDocView ( ) : System

Initializes a new instance of the ViewManager class.

Méthodes protégées

Méthode Description
Dispose ( bool disposing ) : void

Clean up any resources being used.

DisposeContextMenu ( object sender, EventArgs e ) : void
GetMessageAdditionalTargets ( List collector ) : void

subclasses should override if they have more targets

InitBase ( XCore.Mediator mediator, XmlNode configurationParameters ) : void

Initialize this as an IxCoreColleague

subclasses must call this from their Init. This was done, rather than providing an Init() here in the normal way, to drive home the point that the subclass must set m_fullyInitialized to true when it is fully initialized.

OnMouseLeave ( EventArgs e ) : void
OnMouseMove ( MouseEventArgs e ) : void
OnPaint ( PaintEventArgs e ) : void

Ensure that we have the current record selected and visible in the window. See LT-9109.

OnParentChanged ( EventArgs e ) : void
OnSizeChanged ( EventArgs e ) : void
ReadParameters ( ) : void

Read in the parameters to determine which sequence/collection we are editing.

RunConfigureDialogAt ( object sender, EventArgs e ) : void
SetInfoBarText ( ) : void
SetupDataContext ( ) : void
SetupStylesheet ( ) : void
ShowRecord ( ) : void
m_contextMenu_Closed ( object sender, System.Windows.Forms.ToolStripDropDownClosedEventArgs e ) : void
m_mainView_MouseClick ( object sender, MouseEventArgs e ) : void
m_mainView_MouseLeave ( object sender, EventArgs e ) : void
m_mainView_MouseMove ( object sender, MouseEventArgs e ) : void

Private Methods

Méthode Description
AdjustedClerkIndex ( ) : int

By default this returns Clerk.CurrentIndex. However, when we are using a decorator for the view, we may need to adjust the index.

BaseLayoutName ( string name ) : string
DisposeTooltip ( ) : void
ExtractLayoutsFromLayoutTypeList ( IEnumerable layouts ) : string>>.IEnumerable
FindViewNameInList ( string>.IEnumerable layoutList ) : string
GatherBuiltInAndUserLayouts ( ) : string>>.IEnumerable
GetBuiltInLayouts ( XmlNode configNode ) : string>>.IEnumerable
GetPublicationName ( ) : string
GetSafeWsName ( ) : string
GetSelectedConfigView ( ) : string
GetSelectedPublication ( ) : string
GetTarget ( ICmObject obj, int clsid ) : ICmObject
GetUserDefinedDictLayouts ( IEnumerable builtInLayouts, IEnumerable layouts ) : string>>.IEnumerable
GetWidthOfStringInPixels ( string sInput ) : int
GiveSimpleWarning ( ExclusionReasonCode xrc ) : void
InitializeComponent ( ) : void

Required method for Designer support - do not modify the contents of this method with the code editor.

IsCurrentConfigViewChanged ( ) : bool
IsCurrentPublicationChanged ( ) : bool
IsCurrentReversalWsChanged ( ) : bool
IsDesiredPublication ( ICmPossibility item, string name ) : bool
IsObjectVisible ( int hvoTarget, ExclusionReasonCode &xrc ) : bool
MakePublicationTitlePart ( string titleStr ) : string
NoReasonToChangeTitle ( string context ) : bool
OnMouseClick ( MouseEventArgs e ) : void
ResetSpacer ( int spacerWidth, string activeLayoutName ) : void
RunConfigureDialog ( string nodePath ) : void
SelectAndScrollToCurrentRecord ( ) : void
SetConfigViewTitle ( ) : void
SubitemClicked ( Point where, int clsid ) : ICmObject

Return the most specific object identified by a click at the specified position. An object is considered indicated if it is or has an owner of the specified class. The object must be different from the outermost indicated object in the selection.

SubitemClicked ( Point where, int clsid, SimpleRootSite view, SIL.FieldWorks.FDO.FdoCache cache, ISortItemProvider sortItemProvider, IPreferedTargetAdjuster adjuster ) : ICmObject

Return an item of the specified class that is indicated by a click at the specified position, but only if it is part of a different object also of that class.

TrimToMaxPixelWidth ( int pixelWidthAllowed, string sToTrim ) : string
TryToJumpToSelection ( Point where ) : void

Method Details

Dispose() protected méthode

Clean up any resources being used.
protected Dispose ( bool disposing ) : void
disposing bool true to release both managed and unmanaged /// resources; false to release only unmanaged resources. ///
Résultat void

DisposeContextMenu() protected méthode

protected DisposeContextMenu ( object sender, EventArgs e ) : void
sender object
e System.EventArgs
Résultat void

GetMessageAdditionalTargets() protected méthode

subclasses should override if they have more targets
protected GetMessageAdditionalTargets ( List collector ) : void
collector List
Résultat void

GetPubDecorator() public méthode

public GetPubDecorator ( ) : DictionaryPublicationDecorator
Résultat DictionaryPublicationDecorator

Init() public méthode

public Init ( XCore.Mediator mediator, XmlNode configurationParameters ) : void
mediator XCore.Mediator
configurationParameters System.Xml.XmlNode
Résultat void

InitBase() protected méthode

Initialize this as an IxCoreColleague
subclasses must call this from their Init. This was done, rather than providing an Init() here in the normal way, to drive home the point that the subclass must set m_fullyInitialized to true when it is fully initialized.
protected InitBase ( XCore.Mediator mediator, XmlNode configurationParameters ) : void
mediator XCore.Mediator
configurationParameters System.Xml.XmlNode
Résultat void

OnCheckJump() public méthode

Check to see if the user needs to be alerted that JumpToRecord is not possible.
public OnCheckJump ( object argument ) : bool
argument object the hvo of the record
Résultat bool

OnClerkOwningObjChanged() public méthode

public OnClerkOwningObjChanged ( object sender ) : bool
sender object
Résultat bool

OnConfigureXmlDocView() public méthode

Launch the configure dialog.
public OnConfigureXmlDocView ( object commandObject ) : bool
commandObject object
Résultat bool

OnDeleteRecord() public méthode

If this gets called (which it never should), just say we did it, unless we are in the context of reversal entries. In the case of reversal entries, we say we did not do it, so the record clerk deals with it.
public OnDeleteRecord ( object commandObject ) : bool
commandObject object
Résultat bool

OnDisplayConfigureXmlDocView() public méthode

The configure dialog may be launched any time this tool is active. Its name is derived from the name of the tool.
public OnDisplayConfigureXmlDocView ( object commandObject, XCore.UIItemDisplayProperties &display ) : bool
commandObject object
display XCore.UIItemDisplayProperties
Résultat bool

OnDisplayDeleteRecord() public méthode

see if it makes sense to provide the "delete record" command now. Currently we don't support this in document view, except for reversal entries. If we decide to support it, we will need to do additional work (cf LT-1222) to ensure that (a) The clerk's idea of the current entry corresponds to where the selection is (b) After deleting it, the clerk's list gets updated. The former is not happening because we haven't written a SelectionChange method to notice the selection in the view and change the clerk to match. Not sure why the clerk's list isn't being updated...it may be only a problem for homographs.
public OnDisplayDeleteRecord ( object commandObject, XCore.UIItemDisplayProperties &display ) : bool
commandObject object
display XCore.UIItemDisplayProperties
Résultat bool

OnDisplayFindAndReplaceText() public méthode

Enables the command that just does Find, without Replace.
public OnDisplayFindAndReplaceText ( object commandObject, XCore.UIItemDisplayProperties &display ) : bool
commandObject object
display XCore.UIItemDisplayProperties
Résultat bool

OnDisplayLayouts() public méthode

Populate the list of layout views for the second dictionary titlebar menu.
public OnDisplayLayouts ( object parameter, XCore.UIListDisplayProperties &display ) : bool
parameter object The parameter.
display XCore.UIListDisplayProperties The display.
Résultat bool

OnDisplayPublications() public méthode

Populate the list of publications for the first dictionary titlebar menu.
public OnDisplayPublications ( object parameter, XCore.UIListDisplayProperties &display ) : bool
parameter object The parameter.
display XCore.UIListDisplayProperties The display.
Résultat bool

OnDisplayReplaceText() public méthode

Enables the command that just does Find, without Replace.
public OnDisplayReplaceText ( object commandObject, XCore.UIItemDisplayProperties &display ) : bool
commandObject object
display XCore.UIItemDisplayProperties
Résultat bool

OnDisplayShowAllEntries() public méthode

public OnDisplayShowAllEntries ( object commandObject, XCore.UIItemDisplayProperties &display ) : bool
commandObject object
display XCore.UIItemDisplayProperties
Résultat bool

OnFindAndReplaceText() public méthode

Implements the command that just does Find, without Replace.
public OnFindAndReplaceText ( object argument ) : bool
argument object
Résultat bool

OnMouseLeave() protected méthode

protected OnMouseLeave ( EventArgs e ) : void
e System.EventArgs
Résultat void

OnMouseMove() protected méthode

protected OnMouseMove ( MouseEventArgs e ) : void
e MouseEventArgs
Résultat void

OnPaint() protected méthode

Ensure that we have the current record selected and visible in the window. See LT-9109.
protected OnPaint ( PaintEventArgs e ) : void
e PaintEventArgs
Résultat void

OnParentChanged() protected méthode

protected OnParentChanged ( EventArgs e ) : void
e System.EventArgs
Résultat void

OnPropertyChanged() public méthode

Receives the broadcast message "PropertyChanged"
public OnPropertyChanged ( string name ) : void
name string
Résultat void

OnRecordNavigation() public méthode

public OnRecordNavigation ( object argument ) : bool
argument object
Résultat bool

OnReplaceText() public méthode

Implements the command that just does Find, without Replace.
public OnReplaceText ( object argument ) : bool
argument object
Résultat bool

OnSelectionChanged() public méthode

invoked when our XmlDocView selection changes.
public OnSelectionChanged ( object sender, SIL.FieldWorks.Common.Utils.FwObjectSelectionEventArgs e ) : void
sender object unused
e SIL.FieldWorks.Common.Utils.FwObjectSelectionEventArgs the event arguments
Résultat void

OnShowAllEntries() public méthode

public OnShowAllEntries ( object args ) : bool
args object
Résultat bool

OnSizeChanged() protected méthode

protected OnSizeChanged ( EventArgs e ) : void
e System.EventArgs
Résultat void

PostLayoutInit() public méthode

We wait until containing controls are laid out to try to scroll our selection into view, because it depends somewhat on the window being the true size.
public PostLayoutInit ( ) : void
Résultat void

PrintFromDetail() public méthode

Pass command (from RecordEditView) on to printing view.
public PrintFromDetail ( PrintDocument pd, int recordHvo ) : void
pd PrintDocument PrintDocument
recordHvo int
Résultat void

ReadParameters() protected méthode

Read in the parameters to determine which sequence/collection we are editing.
protected ReadParameters ( ) : void
Résultat void

RunConfigureDialogAt() protected méthode

protected RunConfigureDialogAt ( object sender, EventArgs e ) : void
sender object
e System.EventArgs
Résultat void

SetInfoBarText() protected méthode

protected SetInfoBarText ( ) : void
Résultat void

SetupDataContext() protected méthode

protected SetupDataContext ( ) : void
Résultat void

SetupStylesheet() protected méthode

protected SetupStylesheet ( ) : void
Résultat void

ShowRecord() protected méthode

protected ShowRecord ( ) : void
Résultat void

XmlDocView() public méthode

Initializes a new instance of the ViewManager class.
public XmlDocView ( ) : System
Résultat System

m_contextMenu_Closed() protected méthode

protected m_contextMenu_Closed ( object sender, System.Windows.Forms.ToolStripDropDownClosedEventArgs e ) : void
sender object
e System.Windows.Forms.ToolStripDropDownClosedEventArgs
Résultat void

m_mainView_MouseClick() protected méthode

protected m_mainView_MouseClick ( object sender, MouseEventArgs e ) : void
sender object
e MouseEventArgs
Résultat void

m_mainView_MouseLeave() protected méthode

protected m_mainView_MouseLeave ( object sender, EventArgs e ) : void
sender object
e System.EventArgs
Résultat void

m_mainView_MouseMove() protected méthode

protected m_mainView_MouseMove ( object sender, MouseEventArgs e ) : void
sender object
e MouseEventArgs
Résultat void

Property Details

m_configObjectName protected_oe property

protected string m_configObjectName
Résultat string

m_currentIndex protected_oe property

protected int m_currentIndex
Résultat int

m_currentObject protected_oe property

Object currently being edited.
protected ICmObject m_currentObject
Résultat ICmObject

m_hvoOwner protected_oe property

protected int m_hvoOwner
Résultat int

m_mainView protected_oe property

protected XmlSeqView,SIL.FieldWorks.Common.Controls m_mainView
Résultat SIL.FieldWorks.Common.Controls.XmlSeqView