C# Класс 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.
Наследование: SIL.FieldWorks.XWorks.XWorksViewBase
Показать файл Открыть проект Примеры использования класса

Защищенные свойства (Protected)

Свойство Тип Описание
m_configObjectName string
m_currentIndex int
m_currentObject ICmObject
m_hvoOwner int
m_mainView SIL.FieldWorks.Common.Controls.XmlSeqView

Private Properties

Свойство Тип Описание
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

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

Метод Описание
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.

Защищенные методы

Метод Описание
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

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

Метод Описание
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

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

Dispose() защищенный Метод

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. ///
Результат void

DisposeContextMenu() защищенный Метод

protected DisposeContextMenu ( object sender, EventArgs e ) : void
sender object
e System.EventArgs
Результат void

GetMessageAdditionalTargets() защищенный Метод

subclasses should override if they have more targets
protected GetMessageAdditionalTargets ( List collector ) : void
collector List
Результат void

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

public GetPubDecorator ( ) : DictionaryPublicationDecorator
Результат DictionaryPublicationDecorator

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

public Init ( XCore.Mediator mediator, XmlNode configurationParameters ) : void
mediator XCore.Mediator
configurationParameters System.Xml.XmlNode
Результат void

InitBase() защищенный Метод

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
Результат void

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

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
Результат bool

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

public OnClerkOwningObjChanged ( object sender ) : bool
sender object
Результат bool

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

Launch the configure dialog.
public OnConfigureXmlDocView ( object commandObject ) : bool
commandObject object
Результат bool

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

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
Результат bool

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

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
Результат bool

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

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
Результат bool

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

Enables the command that just does Find, without Replace.
public OnDisplayFindAndReplaceText ( object commandObject, XCore.UIItemDisplayProperties &display ) : bool
commandObject object
display XCore.UIItemDisplayProperties
Результат bool

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

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.
Результат bool

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

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.
Результат bool

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

Enables the command that just does Find, without Replace.
public OnDisplayReplaceText ( object commandObject, XCore.UIItemDisplayProperties &display ) : bool
commandObject object
display XCore.UIItemDisplayProperties
Результат bool

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

public OnDisplayShowAllEntries ( object commandObject, XCore.UIItemDisplayProperties &display ) : bool
commandObject object
display XCore.UIItemDisplayProperties
Результат bool

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

Implements the command that just does Find, without Replace.
public OnFindAndReplaceText ( object argument ) : bool
argument object
Результат bool

OnMouseLeave() защищенный Метод

protected OnMouseLeave ( EventArgs e ) : void
e System.EventArgs
Результат void

OnMouseMove() защищенный Метод

protected OnMouseMove ( MouseEventArgs e ) : void
e MouseEventArgs
Результат void

OnPaint() защищенный Метод

Ensure that we have the current record selected and visible in the window. See LT-9109.
protected OnPaint ( PaintEventArgs e ) : void
e PaintEventArgs
Результат void

OnParentChanged() защищенный Метод

protected OnParentChanged ( EventArgs e ) : void
e System.EventArgs
Результат void

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

Receives the broadcast message "PropertyChanged"
public OnPropertyChanged ( string name ) : void
name string
Результат void

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

public OnRecordNavigation ( object argument ) : bool
argument object
Результат bool

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

Implements the command that just does Find, without Replace.
public OnReplaceText ( object argument ) : bool
argument object
Результат bool

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

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
Результат void

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

public OnShowAllEntries ( object args ) : bool
args object
Результат bool

OnSizeChanged() защищенный Метод

protected OnSizeChanged ( EventArgs e ) : void
e System.EventArgs
Результат void

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

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
Результат void

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

Pass command (from RecordEditView) on to printing view.
public PrintFromDetail ( PrintDocument pd, int recordHvo ) : void
pd PrintDocument PrintDocument
recordHvo int
Результат void

ReadParameters() защищенный Метод

Read in the parameters to determine which sequence/collection we are editing.
protected ReadParameters ( ) : void
Результат void

RunConfigureDialogAt() защищенный Метод

protected RunConfigureDialogAt ( object sender, EventArgs e ) : void
sender object
e System.EventArgs
Результат void

SetInfoBarText() защищенный Метод

protected SetInfoBarText ( ) : void
Результат void

SetupDataContext() защищенный Метод

protected SetupDataContext ( ) : void
Результат void

SetupStylesheet() защищенный Метод

protected SetupStylesheet ( ) : void
Результат void

ShowRecord() защищенный Метод

protected ShowRecord ( ) : void
Результат void

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

Initializes a new instance of the ViewManager class.
public XmlDocView ( ) : System
Результат System

m_contextMenu_Closed() защищенный Метод

protected m_contextMenu_Closed ( object sender, System.Windows.Forms.ToolStripDropDownClosedEventArgs e ) : void
sender object
e System.Windows.Forms.ToolStripDropDownClosedEventArgs
Результат void

m_mainView_MouseClick() защищенный Метод

protected m_mainView_MouseClick ( object sender, MouseEventArgs e ) : void
sender object
e MouseEventArgs
Результат void

m_mainView_MouseLeave() защищенный Метод

protected m_mainView_MouseLeave ( object sender, EventArgs e ) : void
sender object
e System.EventArgs
Результат void

m_mainView_MouseMove() защищенный Метод

protected m_mainView_MouseMove ( object sender, MouseEventArgs e ) : void
sender object
e MouseEventArgs
Результат void

Описание свойств

m_configObjectName защищенное свойство

protected string m_configObjectName
Результат string

m_currentIndex защищенное свойство

protected int m_currentIndex
Результат int

m_currentObject защищенное свойство

Object currently being edited.
protected ICmObject m_currentObject
Результат ICmObject

m_hvoOwner защищенное свойство

protected int m_hvoOwner
Результат int

m_mainView защищенное свойство

protected XmlSeqView,SIL.FieldWorks.Common.Controls m_mainView
Результат SIL.FieldWorks.Common.Controls.XmlSeqView