C# Class SIL.FieldWorks.XWorks.PossibilityTreeBarHandler

makes a hierarchical tree of possibility items, *even if the record list is flattened*
Inheritance: TreeBarHandler
Mostrar archivo Open project: sillsdev/FieldWorks

Public Methods

Method Description
PopulateRecordBar ( SIL.FieldWorks.XWorks.RecordList list ) : void

Protected Methods

Method Description
AddSubNodes ( ICmObject obj, TreeNodeCollection parentsCollection ) : void

add any subitems to the tree. Note! This assumes that the list has been preloaded (e.g., using PreLoadList), so it bypasses normal load operations for speed purposes. Withoug preloading, it took almost 19,000 queries to start FW showing semantic domain list. With preloading it reduced the number to 200 queries.

ShouldAddNode ( ICmObject obj ) : bool

this is overridden because we actually need to avoid adding items from the top-level if they are not top-level possibilities. They will show up under their respective parents.in other words, if the list we are given has been flattened, we need to un-flatten it.

UpdateHeaderVisibility ( ) : void

It's possible that another tree bar handler recently turned over control of the RecordBar to us, if so, we want to make sure they didn't leave the optional info bar visible.

tree_moveDown ( ) : void
tree_moveUp ( ) : void

Private Methods

Method Description
CreateTreebarContextMenuStrip ( ) : ContextMenuStrip
MoveItem ( int distance ) : void

Move the clicked item the specified distance (currently +/- 1) in its owning list.

Method Details

AddSubNodes() protected method

add any subitems to the tree. Note! This assumes that the list has been preloaded (e.g., using PreLoadList), so it bypasses normal load operations for speed purposes. Withoug preloading, it took almost 19,000 queries to start FW showing semantic domain list. With preloading it reduced the number to 200 queries.
protected AddSubNodes ( ICmObject obj, TreeNodeCollection parentsCollection ) : void
obj ICmObject
parentsCollection System.Windows.Forms.TreeNodeCollection
return void

PopulateRecordBar() public method

public PopulateRecordBar ( SIL.FieldWorks.XWorks.RecordList list ) : void
list SIL.FieldWorks.XWorks.RecordList
return void

ShouldAddNode() protected method

this is overridden because we actually need to avoid adding items from the top-level if they are not top-level possibilities. They will show up under their respective parents.in other words, if the list we are given has been flattened, we need to un-flatten it.
protected ShouldAddNode ( ICmObject obj ) : bool
obj ICmObject
return bool

UpdateHeaderVisibility() protected method

It's possible that another tree bar handler recently turned over control of the RecordBar to us, if so, we want to make sure they didn't leave the optional info bar visible.
protected UpdateHeaderVisibility ( ) : void
return void

tree_moveDown() protected method

protected tree_moveDown ( ) : void
return void

tree_moveUp() protected method

protected tree_moveUp ( ) : void
return void