void IRecyclingItemContainerGenerator.Recycle(GeneratorPosition position, int count)
        {
            if (position.Offset != 0)
            {
                throw new ArgumentException("Remove requires a position with offset zero");
            }
            if (count <= 0)
            {
                throw new ArgumentException("Remove requires a position with positive count");
            }
            int index = ((IItemContainerGenerator)this).IndexFromGeneratorPosition(position);

            if (index < 0)
            {
                throw new IndexOutOfRangeException("position");
            }
            int numItems = ((IItemContainerGenerator)this).IndexFromGeneratorPosition(new GeneratorPosition(-1, -1)) + 1;

            if (index >= numItems)
            {
                throw new IndexOutOfRangeException("position");
            }
            RecycleHelper(position, count);
        }
 void IRecyclingItemContainerGenerator.Recycle(GeneratorPosition position, int count)
 {
     RecycleHelper(position, count);
 }
 int IItemContainerGenerator.IndexFromGeneratorPosition(GeneratorPosition position)
 {
     return(IndexFromGeneratorPositionHelper(position));
 }
 void IItemContainerGenerator.Remove(GeneratorPosition position, int count)
 {
     RemoveHelper(position, count);
 }
 IDisposable IItemContainerGenerator.StartAt(GeneratorPosition position, GeneratorDirection direction, bool allowStartAtRealizedItem)
 {
     StartAtHelper(position, direction, allowStartAtRealizedItem);
     return(new Generator(this));
 }
 IDisposable IItemContainerGenerator.StartAt(GeneratorPosition position, GeneratorDirection direction)
 {
     return(((IItemContainerGenerator)this).StartAt(position, direction, false));
 }
 private void RecycleHelper(GeneratorPosition position, int count)
 {
     NoesisGUI_PINVOKE.ItemContainerGenerator_RecycleHelper(swigCPtr, ref position, count);
 }
 private void StartAtHelper(GeneratorPosition position, GeneratorDirection direction, bool allowStartAtRealizedItem)
 {
     NoesisGUI_PINVOKE.ItemContainerGenerator_StartAtHelper(swigCPtr, ref position, (int)direction, allowStartAtRealizedItem);
 }
        private int IndexFromGeneratorPositionHelper(GeneratorPosition position)
        {
            int ret = NoesisGUI_PINVOKE.ItemContainerGenerator_IndexFromGeneratorPositionHelper(swigCPtr, ref position);

            return(ret);
        }
 private void GeneratorPositionFromIndexHelper(int itemIndex, ref GeneratorPosition position)
 {
     NoesisGUI_PINVOKE.ItemContainerGenerator_GeneratorPositionFromIndexHelper(swigCPtr, itemIndex, ref position);
 }
示例#11
0
 public ItemsChangedEventArgs(NotifyCollectionChangedAction action, GeneratorPosition position, int itemCount, int itemUICount)
     : this(CreateHelper2((int)action, position, itemCount, itemUICount), true)
 {
 }
示例#12
0
        private static IntPtr CreateHelper2(int action, GeneratorPosition position, int itemCount, int itemUICount)
        {
            IntPtr ret = NoesisGUI_PINVOKE.ItemsChangedEventArgs_CreateHelper2(action, ref position, itemCount, itemUICount);

            return(ret);
        }