Esempio n. 1
0
        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);
        }
Esempio n. 2
0
        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);
        }
Esempio n. 3
0
 public void UpdateContentUI()
 {
     rectangleProvider.InvalidateContentContainerRectangle(layerRectangle);
 }
Esempio n. 4
0
 public void DeleteItem(ItemController item)
 {
     items.Remove(item);
     RectangleProvider.InvalidateContentContainerRectangle(item.Rectangle);
     item.Delete();
 }
Esempio n. 5
0
 private void UpdateContentUI()
 {
     rectangleProvider.InvalidateContentContainerRectangle(sliceRectangle);
 }