Exemplo n.º 1
0
        /// <summary>
        /// Replace selction with a single item
        /// </summary>
        /// <param name="item"></param>
        public void Select(Visible item)
        {
            var copy = items.ToArray();

            items.Clear();
            items.Add(item);
            UpdateSelected(copy);
            UpdatePropertyEditor();
        }
Exemplo n.º 2
0
        /// <summary>
        /// Toggle the selection status of an item (ctrl-click)
        /// </summary>
        /// <param name="item"></param>
        public void Toggle(Visible item)
        {
            var copy = items.ToArray();

            if (items.Contains(item))
            {
                items.Remove(item);
            }
            else
            {
                items.Add(item);
            }
            UpdateSelected(copy);
            UpdatePropertyEditor();
        }
Exemplo n.º 3
0
 /// <summary>
 /// Check if an item is selected
 /// </summary>
 /// <param name="item"></param>
 /// <returns></returns>
 public bool IsSelected(Visible item)
 {
     return(items.Contains(item));
 }