AdjustSelectedDomainList() public static method

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
return void
Esempio n. 1
0
 private void OnDomainTreeCheck(object sender, TreeViewEventArgs e)
 {
     if (e.Action != TreeViewAction.Unknown)
     {
         var domain = (e.Node.Tag as ObjectLabel).Object;
         SemanticDomainSelectionUtility.AdjustSelectedDomainList(domain, e.Node.Checked, selectedDomainsList);
     }
 }
Esempio n. 2
0
        private void OnSuggestClicked(object sender, EventArgs e)
        {
            IEnumerable <ICmSemanticDomain> partialMatches;
            var semDomainsToShow = m_semdomRepo.FindDomainsThatMatchWordsIn(Sense, out partialMatches);

            foreach (var domain in semDomainsToShow)
            {
                SemanticDomainSelectionUtility.AdjustSelectedDomainList(domain, true, selectedDomainsList);
            }
            // Add all the partial matches to the list also, but do not check them by default
            foreach (var domainMatch in partialMatches)
            {
                SemanticDomainSelectionUtility.AdjustSelectedDomainList(domainMatch, false, selectedDomainsList);
            }
        }
Esempio n. 3
0
        private void OnDomainListChecked(object sender, ItemCheckedEventArgs e)
        {
            var domain = m_semdomRepo.GetObject((int)e.Item.Tag);

            SemanticDomainSelectionUtility.AdjustSelectedDomainList(domain, e.Item.Checked, selectedDomainsList);
        }