C# Class SIL.FieldWorks.XWorks.LexText.AreaListener

Inheritance: IxCoreColleague, IFWDisposable
Exibir arquivo Open project: sillsdev/FieldWorks Class Usage Examples

Protected Properties

Property Type Description
m_mediator XCore.Mediator

Public Methods

Method Description
CheckDisposed ( ) : void

Check to see if the object has been disposed. All public Properties and Methods should call this before doing anything else.

Dispose ( ) : void

Must not be virtual.

GetMessageTargets ( ) : IxCoreColleague[]

return an array of all of the objects which should 1) be queried when looking for someone to deliver a message to 2) be potential recipients of a broadcast

Init ( XCore.Mediator mediator, XmlNode configurationParameters ) : void
OnDisplayGrammarToolsList ( object parameters, XCore.UIListDisplayProperties &display ) : bool
OnDisplayLexicalToolsList ( object parameters, XCore.UIListDisplayProperties &display ) : bool
OnDisplayListsToolsList ( object parameters, XCore.UIListDisplayProperties &display ) : bool
OnDisplayNotebookToolsList ( object parameters, XCore.UIListDisplayProperties &display ) : bool
OnDisplayTextToolsList ( object parameters, XCore.UIListDisplayProperties &display ) : bool
OnDisplayWordToolsList ( object parameters, XCore.UIListDisplayProperties &display ) : bool
OnGetContentControlParameters ( object parameterObj ) : bool

This is designed to be called by reflection through the mediator, when something typically in xWorks needs to get the parameter node for a given tool. The last argument is a one-item array used to return the result, since I don't think we handle Out parameters in our SendMessage protocol.

OnGetToolForList ( object parameters ) : bool

This method is called BY REFLECTION through the mediator from LinkListener.FollowActiveLink, because the assembly dependencies are in the wrong direction. It finds the name of the tool we need to invoke to edit a given list.

OnPropertyChanged ( string name ) : void
OnReloadAreaTools ( object areaId ) : bool

This is called by CustomListDlg to get a new/modified list to show up in the tools list.

OnSetInitialContentObject ( object windowConfigurationNode ) : bool

this is called by xWindow just before it sets the initial control which will actually take over the content area.

OnSetToolFromName ( object toolName ) : bool

used by the link listener

Protected Methods

Method Description
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.

GetCurrentAreaName ( ) : string

Private Methods

Method Description
ActivateToolForArea ( string areaName ) : void
AddACustomList ( ICmPossibilityList customList, XmlNode windowConfig ) : void
AddClerkToConfigForList ( ICmPossibilityList curList, XmlNode windowConfig ) : void
AddCommandToConfigForList ( ICmPossibilityList curList, XmlNode windowConfig ) : void
AddContextMenuEntryToConfigForList ( ICmPossibilityList curList, XmlNode windowConfig ) : void
AddListsToWindowConfig ( List customLists, XmlNode windowConfig ) : void

For each list, create an XmlNode (or several) to plug into the windowConfiguration before it gets processed to display the lists in the Lists area.

'internal' for testing

AddToolNodeToDisplay ( ICmPossibilityListRepository possRepo, SIL.FieldWorks.FDO.FdoCache cache, XCore.UIListDisplayProperties display, SIL.Utils.StringTable tbl, XmlNode node ) : void
AddToolToConfigForList ( ICmPossibilityList curList, XmlNode windowConfig ) : void
CreateContextMenuNode ( ICmPossibilityList curList ) : XmlNode
CreateCustomClerkNode ( ICmPossibilityList curList ) : XmlNode
CreateCustomCommandNode ( ICmPossibilityList curList ) : XmlNode
CreateCustomControlNode ( ICmPossibilityList curList ) : XmlNode
CreateCustomToolNode ( ICmPossibilityList curList, XmlNode controlNode ) : XmlNode
FillList ( XCore.UIListDisplayProperties display, string areaId ) : bool
FillListAreaList ( XCore.UIListDisplayProperties display ) : bool
FindClerkNode ( XmlNode toolNode, string clerkId ) : XmlNode
FindMatchingPossibilityListUIName ( XmlNode toolNode, ICmPossibilityListRepository possRepo, SIL.FieldWorks.FDO.FdoCache cache ) : string
FindToolNode ( XmlNode windowConfig, string areaName, string toolName ) : XmlNode
FindToolParamNode ( XmlNode windowConfig, ICmPossibilityList curList ) : XmlNode
GetAreaNeededForTool ( string toolName, XmlNode windowConfiguration ) : string
GetClerkRecordListNodeFromToolNode ( XmlNode toolNode ) : XmlNode
GetCommandsXPath ( ) : string
GetContextMenusXPath ( ) : string
GetCustomListClerkName ( ICmPossibilityList curList ) : string
GetCustomListLabel ( ICmPossibilityList curList, bool ftrim ) : string
GetCustomListToolName ( ICmPossibilityList curList ) : string
GetHvoFromXMLOwnerAttribut ( SIL.FieldWorks.FDO.FdoCache cache, string ownerAttr ) : int

Finds a Major Object from the cache and returns its Hvo. If the search string is unknown, it returns zero.

GetListByGuid ( ICmPossibilityListRepository possRepo, string listGuid ) : ICmPossibilityList
GetListBySda ( SIL.FieldWorks.FDO.FdoCache cache, string ownerAttr, string propertyAttr ) : ICmPossibilityList
GetListClerksXPath ( ) : string
GetListOfOwnerlessLists ( ) : List

Use the Mediator to get the CmPossibilityList repo and find all the ownerless lists.

GetListToolsXPath ( ) : string
GetToolNodeForArea ( string areaName, string &toolName ) : XmlNode
GetToolParamNodeXPath ( ICmPossibilityList curList ) : string
GetToolXPath ( string areaId ) : string
IsToolInArea ( string toolName, string area, XmlNode windowConfiguration ) : bool
IsValidAreaName ( string areaName ) : bool

Tests whether the parameters node for the given areaName is still valid. Changing areas can cause a crash if we don't check that they're valid (cf. LT-7977).

LoadAllCustomLists ( List customLists, XmlNode windowConfig ) : void
TryGetAreaParametersNode ( string areaName, XmlNode &areaParams ) : bool

Get the parameters node for the given areaName

TryGetToolNode ( string areaName, string toolName, XmlNode &node ) : bool
UpdateMediatorConfig ( XmlNode windowConfig ) : void
UpdateWinConfig ( bool fcustomChanged, List customLists, XmlNode windowConfig ) : void

Method Details

CheckDisposed() public method

Check to see if the object has been disposed. All public Properties and Methods should call this before doing anything else.
public CheckDisposed ( ) : void
return void

Dispose() public method

Must not be virtual.
public Dispose ( ) : void
return void

Dispose() protected method

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
return void

GetCurrentAreaName() protected method

protected GetCurrentAreaName ( ) : string
return string

GetMessageTargets() public method

return an array of all of the objects which should 1) be queried when looking for someone to deliver a message to 2) be potential recipients of a broadcast
public GetMessageTargets ( ) : IxCoreColleague[]
return IxCoreColleague[]

Init() public method

public Init ( XCore.Mediator mediator, XmlNode configurationParameters ) : void
mediator XCore.Mediator
configurationParameters System.Xml.XmlNode
return void

OnDisplayGrammarToolsList() public method

public OnDisplayGrammarToolsList ( object parameters, XCore.UIListDisplayProperties &display ) : bool
parameters object
display XCore.UIListDisplayProperties
return bool

OnDisplayLexicalToolsList() public method

public OnDisplayLexicalToolsList ( object parameters, XCore.UIListDisplayProperties &display ) : bool
parameters object
display XCore.UIListDisplayProperties
return bool

OnDisplayListsToolsList() public method

public OnDisplayListsToolsList ( object parameters, XCore.UIListDisplayProperties &display ) : bool
parameters object
display XCore.UIListDisplayProperties
return bool

OnDisplayNotebookToolsList() public method

public OnDisplayNotebookToolsList ( object parameters, XCore.UIListDisplayProperties &display ) : bool
parameters object
display XCore.UIListDisplayProperties
return bool

OnDisplayTextToolsList() public method

public OnDisplayTextToolsList ( object parameters, XCore.UIListDisplayProperties &display ) : bool
parameters object
display XCore.UIListDisplayProperties
return bool

OnDisplayWordToolsList() public method

public OnDisplayWordToolsList ( object parameters, XCore.UIListDisplayProperties &display ) : bool
parameters object
display XCore.UIListDisplayProperties
return bool

OnGetContentControlParameters() public method

This is designed to be called by reflection through the mediator, when something typically in xWorks needs to get the parameter node for a given tool. The last argument is a one-item array used to return the result, since I don't think we handle Out parameters in our SendMessage protocol.
public OnGetContentControlParameters ( object parameterObj ) : bool
parameterObj object
return bool

OnGetToolForList() public method

This method is called BY REFLECTION through the mediator from LinkListener.FollowActiveLink, because the assembly dependencies are in the wrong direction. It finds the name of the tool we need to invoke to edit a given list.
public OnGetToolForList ( object parameters ) : bool
parameters object
return bool

OnPropertyChanged() public method

public OnPropertyChanged ( string name ) : void
name string
return void

OnReloadAreaTools() public method

This is called by CustomListDlg to get a new/modified list to show up in the tools list.
public OnReloadAreaTools ( object areaId ) : bool
areaId object
return bool

OnSetInitialContentObject() public method

this is called by xWindow just before it sets the initial control which will actually take over the content area.
public OnSetInitialContentObject ( object windowConfigurationNode ) : bool
windowConfigurationNode object
return bool

OnSetToolFromName() public method

used by the link listener
public OnSetToolFromName ( object toolName ) : bool
toolName object
return bool

Property Details

m_mediator protected_oe property

protected Mediator,XCore m_mediator
return XCore.Mediator