示例#1
0
        public Filter(string label, Set currentSet, List<Item> availableItems)
        {
            _currentSet = currentSet;

            if (_checkedList != null)
            {
                _checkedList.Reset();
                _checkedList.SetHeading(label);

                foreach (Item item in availableItems)
                {
                    // if the item is currently selected, add it as selected.
                    _checkedList.Add(new CheckedItem(item, currentSet.Contains(item.First)));
                }
            }
        }
示例#2
0
 /// <summary>
 /// Construct a filter dialog with Checked options.
 /// </summary>
 /// <param name="label"></param>
 /// <param name="currentSet"></param>
 /// <param name="availableItems"></param>
 public Filter(int label, Set currentSet, List<Item> availableItems)
     : this(GUILocalizeStrings.Get(label), currentSet, availableItems)
 {
 }