public void RemoveFromSelection(DrawableItem item) { if (this.selectedItems.Remove(item)) { this.InvalidateSelectionRect(item); } }
private void InvalidateSelectionRect(DrawableItem item) { var r = item.Bounds; this.OnLayerChanged(new Rectangle(r.Left, r.Top, r.Width, 1)); this.OnLayerChanged(new Rectangle(r.Left, r.Top, 1, r.Height)); this.OnLayerChanged(new Rectangle(r.Right, r.Top, 1, r.Height)); this.OnLayerChanged(new Rectangle(r.Left, r.Bottom, r.Width + 1, 1)); }
public bool SelectedItemsContains(DrawableItem item) { return(this.selectedItems.Contains(item)); }
public void AddToSelection(DrawableItem item) { this.InvalidateSelectionRect(item); this.selectedItems.Add(item); }
private void OnRemoveItem(DrawableItem item) { item.AreaChanged -= this.ItemAreaChanged; this.OnLayerChanged(item.Bounds); }