Example #1
0
 public void AddSelectedElement(int id, bool ctrl, bool multi)
 {
     if (SelectedElementsCount != 0 & !multi && !ctrl)
     {
         UnselectElements();
     }
     if (SelectedElements.Contains(id))
     {
         SelectedElements.Remove(id);
         UnselectedElement?.Invoke(id);
     }
     else
     {
         SelectedElements.Add(id);
         SelectedElement?.Invoke(id);
     }
     ModelChanged?.Invoke(this);
 }
Example #2
0
 public void UnselectElements()
 {
     SelectedElements.ForEach(id => UnselectedElement?.Invoke(id));
     SelectedElements.Clear();
     ModelChanged?.Invoke(this);
 }