C# Класс SIL.FieldWorks.Common.Framework.DetailControls.SemanticDomainSelectionUtility

This class contains methods that can be used for displaying the Semantic Domains in a TreeView and ListView. These views are used in FLEX for allowing the user to select Semantic Domains.
Показать файл Открыть проект Примеры использования класса

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

Метод Описание
AdjustSelectedDomainList ( ICmObject domain, IVwStylesheet stylesheet, bool check, ListView selectedDomainsList ) : void

Find the item in the selectedDomainsList if it is there and set the checkmark accordingly, or add it and check it.

AdjustTreeAndListView ( object tag, bool check, TreeView domainTree, ListView domainList ) : void

Adjust the checkbox for the nodes in the TreeView and ListView according to the 'tag' and 'check' parameter values.

CreateLabelListItem ( ICmObject semDom, IVwStylesheet stylesheet, bool createChecked, bool displayUsage ) : System.Windows.Forms.ListViewItem

Creates a ListViewItem for the given ICmObject

SenseReferenceCount ( ICmSemanticDomain domain ) : int

Don't count references to Semantic Domains from other Semantic Domains. The user only cares about how many times in the lexicon the Semantic Domain is used.

UpdateDomainListLabels ( IEnumerable createObjectLabels, IVwStylesheet stylesheet, ListView domainList, bool displayUsage ) : void

Clear the ListView and add createObjectLabels to it. 'displayUsage' determines if the items are checked/unchecked.

UpdateDomainTreeLabels ( IEnumerable labels, bool displayUsage, TreeView domainTree, IVwStylesheet stylesheet, HashSet selectedItems ) : void

Populate the TreeView with the labels and check/uncheck according to the selectedItems and displayUsage parameters.

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

Метод Описание
CreateLabelNode ( ObjectLabel label, IVwStylesheet stylesheet, IEnumerable selectedItems, bool displayUsage ) : DomainNode

Creates the label node.

GetFontForFormFromObjectLabels ( IEnumerable labelList, IVwStylesheet stylesheet ) : Font
RecursivelyAdjustTreeNode ( DomainNode node, object tag, bool check ) : bool

Check/Uncheck the TreeView node and recursively do this to any children nodes if the node matches the 'tag' object.

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

AdjustSelectedDomainList() публичный статический Метод

Find the item in the selectedDomainsList if it is there and set the checkmark accordingly, or add it and check it.
public static AdjustSelectedDomainList ( ICmObject domain, IVwStylesheet stylesheet, bool check, ListView selectedDomainsList ) : void
domain ICmObject
stylesheet IVwStylesheet
check bool
selectedDomainsList System.Windows.Forms.ListView
Результат void

AdjustTreeAndListView() публичный статический Метод

Adjust the checkbox for the nodes in the TreeView and ListView according to the 'tag' and 'check' parameter values.
public static AdjustTreeAndListView ( object tag, bool check, TreeView domainTree, ListView domainList ) : void
tag object
check bool
domainTree System.Windows.Forms.TreeView
domainList System.Windows.Forms.ListView
Результат void

CreateLabelListItem() публичный статический Метод

Creates a ListViewItem for the given ICmObject
public static CreateLabelListItem ( ICmObject semDom, IVwStylesheet stylesheet, bool createChecked, bool displayUsage ) : System.Windows.Forms.ListViewItem
semDom ICmObject A Semantic Domain
stylesheet IVwStylesheet
createChecked bool
displayUsage bool
Результат System.Windows.Forms.ListViewItem

SenseReferenceCount() публичный статический Метод

Don't count references to Semantic Domains from other Semantic Domains. The user only cares about how many times in the lexicon the Semantic Domain is used.
public static SenseReferenceCount ( ICmSemanticDomain domain ) : int
domain ICmSemanticDomain
Результат int

UpdateDomainListLabels() публичный статический Метод

Clear the ListView and add createObjectLabels to it. 'displayUsage' determines if the items are checked/unchecked.
public static UpdateDomainListLabels ( IEnumerable createObjectLabels, IVwStylesheet stylesheet, ListView domainList, bool displayUsage ) : void
createObjectLabels IEnumerable
stylesheet IVwStylesheet
domainList System.Windows.Forms.ListView
displayUsage bool
Результат void

UpdateDomainTreeLabels() публичный статический Метод

Populate the TreeView with the labels and check/uncheck according to the selectedItems and displayUsage parameters.
public static UpdateDomainTreeLabels ( IEnumerable labels, bool displayUsage, TreeView domainTree, IVwStylesheet stylesheet, HashSet selectedItems ) : void
labels IEnumerable
displayUsage bool
domainTree System.Windows.Forms.TreeView
stylesheet IVwStylesheet
selectedItems HashSet
Результат void