public ItemController CreateItem(int startPosition = 0, int length = 1)
        {
            ItemController item = new ItemController(this, startPosition, length);

            items.Add(item);
            RectangleProvider.InvalidateContentContainerRectangle(item.Rectangle);
            return(item);
        }
        internal void TransferItem(ItemController item, LayerController layer)
        {
            if (layer == this)
            {
                throw new ArgumentException("Layer can't be this layer.");
            }
            if (!items.Exists(x => x == item))
            {
                throw new ArgumentException("This layer doesn't contain given item.");
            }

            RectangleProvider.InvalidateContentContainerRectangle(item.Rectangle);

            items.Remove(item);
            layer.items.Add(item);
            if (Disowning != null)
            {
                Disowning.Invoke(this, new DisownEventArgs(item, layer));
            }

            RectangleProvider.InvalidateContentContainerRectangle(item.Rectangle);
        }
 public void UpdateContentUI()
 {
     rectangleProvider.InvalidateContentContainerRectangle(layerRectangle);
 }
 public void DeleteItem(ItemController item)
 {
     items.Remove(item);
     RectangleProvider.InvalidateContentContainerRectangle(item.Rectangle);
     item.Delete();
 }
Exemple #5
0
 private void UpdateContentUI()
 {
     rectangleProvider.InvalidateContentContainerRectangle(sliceRectangle);
 }